1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-10 19:20:13 +00:00
Commit graph

17 commits

Author SHA1 Message Date
Dragorn421
4e55168eaa
Update ZAPD (#1569)
* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "094e79734"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "094e79734"
git-subrepo:
  version:  "0.4.6"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "110b9eb"

* Add EnumData.xml where some names are now externalized

* Remove legacy typedefs for zapd, no longer needed!
2023-10-24 21:36:10 -04:00
Dragorn421
9e9d62cf71
Cleanup/add bgcheck macros (#1478)
* Cleanup/add bgcheck macros

* vIA -> vI

* parentheses around bit&

* achivement get: formatter contrarian

* COLPOLY_VTX_FLAGS -> COLPOLY_VTX_FLAGS_MASKED

* & before << in WATERBOX_PROPERTIES packing macro

* & before << in SURFACETYPE* packing macro and fix parentheses
2023-08-15 22:12:50 +02:00
engineer124
c7a61aa670
Document Surface Material (#1447)
* material

* cleanup

* iron boots

* climb

* more docs

* rename

* small fix

* comments

* adjust bug comment

* simplify comment
2022-11-26 18:11:06 -05:00
Dragorn421
d2191a5d48
Some doc on env light settings (#1307)
* remove `LightSettings` struct, typedef for zapd

* more decimal

* fog far -> z far

* `LIGHTCTX_FOGNEAR_MAX`, `LIGHTCTX_ZFAR_MAX`

* name sp88,sp8C in `Environment_Update`

* `EnvLightSettings.fogNear` -> `blendRateAndFogNear` and macros

* A different struct for `EnvironmentContext.lightSettings`

* Uniform zapd compat typedefs todos

* `LIGHTCTX_` -> `ENV_`

* Comment on `blendRateAndFogNear` + "fogFar"

* Move fogFar~1000 comment to zFar

* comment rewrite attempt

* move relevant macros down

Co-authored-by: fig02 <fig02srl@gmail.com>
2022-11-01 19:00:38 -04:00
engineer124
e4c1a4b512
Document Crawlspaces (#1286)
* Crawlspace docs, first draft

* Add wall docs

* OnePointDemo, fix

* format

* More player docs

* Document bgCamData

* Magic docs WIP

* More docs, first round finished

* Better docs

* More renaming

* Simpler name

* Another small adjustment

* rm if(1)

* Better names again after in-game testing

* Change comments

* change comment

* Big rename based on all the suggestions

* Small touch-up

* More PR Suggestions

* RESTORE_IDLE -> RESET

* More docs

* Capitalization

* PR suggestions

* Make declaration consistent

* Health_ChangeBy (amount)

* cleanup

* Document bgCamData

* More changes and cleanup

* More docs

* Clarify comments

* PR Suggestions

* Missed one

* More PR Suggestions

* Change comment

* Add another clarity comment

* format

* PR Feedback, rename bgcheck functions

* remove fallthrough cleanup (other pr that deals with that)

* PR Suggestions

* bug report

* sync with bgCamData PR

* small cleanup

* Another comment

* bgCamDataIndexBeforeUnderwater

* PR/Discord Discussions

* Missed some

* sync function header args

* Another suggestion

* cleanup

* Comments

* Change bgCamData to s16 for now

* PR suggestions

* the

* use "info"

* Missed a suggestion

* Discord Discussion

* Document playerFlag

* typo

* Revert bgCamFuncData to Vec3s

* format

* format

* First PR suggestion

* Some PR Suggestions, still need to test

* followup docs

* small cleanup

* target offset

* more PR

* forwardYaw

* crawlspace func/flag

* comment

* format

* Update include/z64player.h

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* More PR Suggestions

* Update src/overlays/actors/ovl_player_actor/z_player.c

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
2022-10-23 17:32:51 -04:00
Dragorn421
c0cf83a814
Doc room drawing (#1283)
* (wip) some doc on room draw2

* doc room_draw2

* do what can be done for `func_80095AA0`

* wip

* more cleanup around Room_DrawBackground2D

* format"

* commit to naming things

* move forward declarations of draw handlers to draw handlers array

* two z_room regs

* `R_MESH2_` -> `R_ROOM_CULL_`

* offset -> quakeOffset

* kb -> kB

* Improve cull mesh type doc

* `Sphere16` MeshHeaderCullEntry.bounds

* Revert "`Sphere16` MeshHeaderCullEntry.bounds" (ZAPD...)

This reverts commit cbe55e8090.

* Mesh header type: "cull" -> "cullable"

* Reword some Cullable doc

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>

* `boundsSphere*` for now for the can't-be-`Sphere16 bounds`

* Improve the PrerenderMulti bgCamInfo usage situation

* Comment on `overrideBgCamIndex`

* "are left" -> "remain"

* enum and defines for room draw debug regs

* drawBg -> drawBackground

* "mesh header all" -> "mesh header normal" 🤷

* array_count back to define

* Name some temps a lot less specifically

* "mesh header" -> "room shape"

* "Room shape prerender" -> "Room shape image"

* `ROOM_SHAPE_IMAGE_FORMAT_` -> `ROOM_SHAPE_IMAGE_AMOUNT_`

* `RoomShapeImageMultiBackgroundEntry` -> `RoomShapeImageMultiBgEntry`

* Remove references to "header" (old "mesh header" name)

* Axe variable names

Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
2022-08-31 19:28:51 -04:00
mzxrules
327a813b37
Fix RaycastFloor flags (#1328)
* fix raycast floor flags

* format.sh

* Name flags

* Rename RaycastFloor functions, clean up caller code, document z_bg_spot15_rrbox

* change comment to prevent format wrap

* change to "if BGCHECK_GROUND_CHECK_ON is set"

* roman suggestions
2022-08-30 17:49:51 +02:00
Dragorn421
7cfee3d8a9
Doc pass on bgcheck-waterbox properties (#1288)
* Doc pass on bgcheck-waterbox properties

* `WATERBOX_ROOM_INDEX...` -> `WATERBOX_ROOM...`

* Fix `WATERBOX_PROPERTIES` macro (was completely wrong)

* `((setFlag19) & 1) << WATERBOX_FLAG_19_SHIFT` instead of ternary

* Fix `WATERBOX_PROPERTIES` macro (hopefully for good)
2022-08-29 13:52:42 -04:00
Dragorn421
706d5596bf
Doc, macros, enums for SurfaceType.data (#1293)
* `SURFACETYPE`0/1 getter macros

* Cleanup/assess/revert existing names

* `SURFACETYPE0_30` -> "soft"

* `SURFACETYPE0_`13/26 -> floortype/floorproperty

* Introduce `SURFACETYPE_FLOORTYPE_` enum

* Introduce `SURFACETYPE_FLOORPROPERTY_` enum

* `SURFACETYPE0_21` -> "wall type", and maps to "wall flags"

* Introduce `SURFACETYPE_WALLTYPE_` enum

* Introduce `SURFACETYPE_WALLFLAG_` defines

* `SURFACETYPE1_0` -> "sfx type"

* `SurfaceType_GetSfx` -> `GetSfxId` and cleanup

* Introduce `SURFACETYPE_SFXTYPE_` enum

* Note oddity on `Player.unk_89E` (more docs needed)

* `SURFACETYPE1_4` -> "floor effect" (not 100% set on the name, just something different from type and property)

* Introduce `SURFACETYPE_FLOOREFFECT_` enum

* Introduce `SURFACETYPE_CONVEYORSPEED_` enum

* Add `SURFACETYPE_CONVEYORDIRECTION_TO_BINANG` macro

* `wallDamage` -> `hasFlag27`

* Be more underscore-happy

* Revert "`SURFACETYPE`0/1 getter macros"

This reverts commit e61cccf2e6.

* remove mention to removed define

* Remove surfacetype_ prefix, `SFX_TYPE_` -> `SURFACE_SFX_TYPE_`, `FLOOREFFECT_` -> `FLOOR_EFFECT_`

* Formatting

* 0-pad litteral to 8 nibbles
2022-07-31 20:57:18 +02:00
Dragorn421
ed0ab877c9
Some names and docs on dynapoly (#1287)
* Add `BG_DYNA_ACTOR_FLAG_` for `DynaCollisionContext.bgActorFlags`

* Document 3/4 bgActor flags

* `func_8003EE6C` -> `DynaPoly_InvalidateLookup`

* `DynaPoly_ExpandSRT` -> `DynaPoly_AddBgActorToLookup`

* Add `DYNAPOLYACTOR_UNK160_` for `DynaPolyActor.unk_160`

* More dynapoly docs

* One comment

* Some `DynaPoly_` -> `DynaPolyActor_`

* run formatter

* .

* `BG_DYNA_ACTOR_FLAG_IS_USED` -> `BG_DYNA_ACTOR_FLAG_IN_USE`

* `BG_DYNA_ACTOR_FLAG_` -> `BGACTOR_`

* `DYNAPOLYACTOR_INTERACT_FLAG_` -> `DYNA_INTERACT_`

* `ResetInteractFlags` -> `ClearInteractFlags`

* Remove Has/Is prefix on dyna interact flags getters

* format

* remove now useless comments

* Remove `!= 0` on interact flags getter usage

* ceilings collision -> ceiling collision

* `ClearInteractFlags` -> `UnsetInteractFlags` (pepega)

* `UnsetInteractFlags` -> `UnsetAllInteractFlags` (pepega x2)

* Add back `Is` prefix (no `Has` this time) to dyna interact flags getters
2022-06-25 09:53:26 -04:00
engineer124
849fdbf9ea
Document Camera BgCamData (#1232)
* Document bgCamData

* More changes and cleanup

* More docs

* Clarify comments

* PR Feedback, rename bgcheck functions

* remove fallthrough cleanup (other pr that deals with that)

* PR Suggestions

* bug report

* bgCamDataIndexBeforeUnderwater

* PR/Discord Discussions

* Missed some

* sync function header args

* Another suggestion

* cleanup

* Comments

* Change bgCamData to s16 for now

* PR suggestions

* the

* use "info"

* Missed a suggestion

* Discord Discussion

* Revert bgCamFuncData to Vec3s

* format
2022-06-17 20:25:42 +02:00
fig02
2e6279bc8e
PlayState Rename (#1231)
* global context -> play

* fix PlayState* PlayState
2022-05-21 14:23:43 -04:00
louist103
e3f1ccd902
Fix all headers to comply with C standard (#957)
* Fix all headers to comply with C standard

* fix a file in libultra

* Update include/stdbool.h

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* Update stdbool.h

* Update z64animation.h

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2021-09-15 19:24:19 -04:00
Zelllll
7551dc2b71
Global Context And General Cleanup (#863)
* door context

* renames

* done

* fix unintended change

* all nb gone

* more nb gone

* merge fishing

* fix size commentX

* door changes suggested by dragorn

* fix accidental semicolon

* another

* change all texture pointers to void*

* error fix and format

* Update src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c

Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl>

* fix ostime

* correct mistake in SkyboxContext

* probably fix nonmatching

* Update include/z64.h

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* roman's suggestions, fix incorrect type definition in z64scene.h

* typo in struct

* make typedef use u8 array

* forgot one

* pull in master and format.sh

Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2021-08-15 19:15:58 -04:00
mzxrules
d373661acd
Minor z_bgcheck documentation fixes (#675)
* Fix minor documentation issues

* Update include/z64bgcheck.h

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
2021-02-12 17:30:21 -05:00
fig02
1ff2f0f849
ZAPD update (#612)
* remove roompoly

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "fd4d53a26"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "fd4d53a26"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"
2021-01-08 19:38:28 -05:00
mzxrules
3cef03f5ff
z_bgcheck.c, 800430A0.c, 80043480.c (#256)
* beginning of migrating changes

* got matching

* changed order a bit

* clean up bgcheck

* fix conflict

* fix conflict again

* first stab at identifying types, some oks

* Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs

* more OKs, z_bgcheck.bss migration, update some sys_math3d.c args

* couple more OKs

* pushing some OKs

* fix compilation issues

* code_800430A0.c OK, more files decomp'd

* 8003A3E0 big OK :)

* Decomp most of func_8003C614, decomp helper funcs

* Decomp SurfaceType, CamData, and WaterBox property related functions

* more OKs, big OK in 8003C078

* more OKs, more progress, move a function definition in z_collision_check to functions.h

* more clean-ups, more OKs, dyn_vtx is now defined as u8*

* 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better

* data migrated, more OKs

* 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled

* func_80040284, 800409A8 non_matching, add IS_ZERO macro

* All asm files have C representations, some big OKs, lots of minor tweaks

* More OKs, non-matching code cleanup

* 8003FBF4 and 80040BE4 OK, improve codegen for most functions

* format z_bgcheck.c

* fix warnings, compile errors on NON_MATCHING

* func_8003EE80 is now NON_MATCHING

* begin documenting some functions

* formatting

* more documentation, func_8003A95C OK

* fix PHYSICAL_TO_VIRTUAL changes

* fix var rename

* More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP

* func_8004239C ok, more NON_MATCHING improvements, more documentation

* Implement most suggested changes

* Convert comments to slower comments

* /**

* Implement ZAP2 changes

* my anti-virus ate my format.sh results

* Rename a couple hundred functions, fix minor stuff

* rename var so that clang formats correctly

* run format.sh

* implement Petrie's matches/suggestions

* format

* matches

* and the asm

* slight error

* Add SSList

* two more matches

* stuff

* implement code changes

* clean up Petrie's matchings

Co-authored-by: Arthur <arthurtilly413@gmail.com>
Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
2021-01-08 06:12:58 -05:00