summaryrefslogtreecommitdiff
path: root/src/code
AgeCommit message (Collapse)Author
2022-10-16Misc Sequence Docs (#1400)engineer124
* misc bgm and fanfare docs * more docs * function.h cleanup * fix horse * typo * add comment to song of storms cutscene in windmill * PR review * woopsie * seqId macros * revert macro
2022-10-15Enum comments on some arrays (#1404)Dragorn421
* Comment enums on some big arrays * z_camera_data too * comment in get item table on own lines * `sDebugSaveInventory.ammo` * More in z_sram * `0xFF` -> `ITEM_NONE` in `sNewSaveInventory.items`
2022-10-15Lightweight trigonometry doc (#1356)Dragorn421
* Doc units of trig functions * "Very simple" yet I made a mistake * sins returns in [-0x7FFF,0x7FFF] as the [-1,1] range * Also `sys_math_atan.c` * Remove `@param`s without descriptions * Add note on Math_Atan2S/F arguments being unlike atan2 * "from (1,0) to (x,y)" -> "from vector ..." * arg names -> `angle` * Improve `@return` comment on atans
2022-10-15`gbi.h` and `ucode_disas.c` cleanups (#1267)Tharo
* Merge GfxMod and Gfx, various ucode_disas improvements, gdSPDefMtx, gbi.h formatting improvements * Suggested changes * Further suggested changes * Fix matrix Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Formatting changes Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Clarify Gnoop callback * the thing Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Switch spaces, uintptr Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-10-15Document elf_message scripting system (#1398)fig02
* `cUpElfMsgs` -> `cUpMsgs` Motivation: ElfMessage is the name of the system that handles c-up messages from navi, but also messages from child/adult saria so it would make sense to name this after the system name like "ElfMsg" but "cUpElf" primarily reads like (to me) "c up navi" since the actor implementing navi is EnElf I think it'd be better to clear that confusion between "navi" and "elfmsg system" by just not using "elf" in the name * Standardize c-up navi messages ElfMessage data to be named after "CUp" * -> "Navi" * Make symbols in `elf_message_` segments static * new docs * change commands, format * introduce navi file id * use enum * remove concat * add clarifying comment for skip * concat cmd type * Hints -> QuestHint * rename command header * s -> g * missed enum name * singular * missed one Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-10-15Improve match for `DbCamera_CalcUpFromPitchYawRoll`, add docs (#1408)engineer124
* improve match * found solution without void
2022-10-15Cleanup `VecSph`: Better Distinguish Between "Spherical" vs. "Geographic" ↵engineer124
Coordinates (#1407) * begin geo and sph docs * cleanup * cleanup * cleanup struct * PR suggestions * spacing
2022-10-15Document Talon (En_Ta) (#1348)Lauri Koskela
* Rename flags related to Talon * Document Talon (ovl_En_Ta) * Formatting * ovl_En_Ta review fixes * Add horse eventinf flag usage comments * Rename TALON_STATE_FLAG_3 * Review fixes * More review fixes * Fix super-cucco zero-gravity time comment * Fix formatting * Talon review comment fixes * Review comment fixes * Rename waking up action funcs
2022-10-15Quake Documentation Pass (#1402)engineer124
* begin quake docs * continue cleanup * quake offset * many more docs * cleanup * more cleanup * cleanup headers * move quake value to internal * update, still need to test shake zoom/yaw * more docs * better docs * add file descriptions * fix comment * explain random index * cleanup comments * better type 6 docs * expand orientation comment * fix old names, add comment * remove comment, twas a mistake * easy PR feedback * duration in dec * rm offset, clear up roll * oops * merge shakeInfo and QuakeCamData * match order that always appears in code * more PR suggestions * adjust comment * zeroVec * rm extra space * roman PR suggestions
2022-10-15`GameInfo` -> `RegEditor` (#1354)Dragorn421
* -> `RegsContext* gRegsContext` * Name regs-related functions * Revert naming `GameState_UpdateRegs` * -> `gRegEditor` * `Regs_InitContext` -> `Regs_Init` * remove mistakenly added file
2022-10-13Fix misc 17 (#1392)Dragorn421
* Some cleanup on bgcheck waterbox y funcs * Fix some typo/spelling * EnFz_ApplyDamage match fixup * Turn another sus construction into a switch * Fixup comment on restoring MS as adult * "doesnt, isnt" -> "doesn't, isn't" * Hunt down whitespace at end of lines * Format (clang-format does not like figs bug comment on bongo cutscene unskip sadge) * Viewport z scale/translation: `0x1FF` -> `G_MAXZ/2` (see proman "9.7 Mixing CPU and SP Addresses", "12.7.6 Depth Source") * static symbols: g -> s prefix * Link young/old -> child/adult * Fixups * Get rid of signed vs unsigned comparison warning by changing room temps to s32 * waterbox search funcs consistency * Revert "waterbox search funcs consistency" This reverts commit 8f386e038f5e735f0f5f1240fc4da7bec4e8c7e2. * `curWaterBox` -> `waterBox`
2022-10-12Document object_bdoor (boss doors) (#1403)Tom Overton
2022-10-12Doc dynapoly move flags (#1372)Dragorn421
* Doc dynapoly move flags * Use `DYNAPOLYMOVE_UPD_` more * remove `DynaPolyActor.unk_15A` (padding) * `DYNAPOLYMOVE_UPD_` -> `DYNA_MOVE_` * Remove `DYNA_MOVE_POS_AND_ROT_Y` * Actual docs * Update function names * transformFlags and Carried names Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * Fixup comment on `DynaPolyActor_UpdateCarriedActorPos` * Format * `DYNA_TRANSFORM_NONE` -> 0 * Touch up mentioning the `DYNA_TRANSFORM_` flags in docs Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
2022-10-10Document Malon's Singing (#1395)engineer124
* malon singing docs * typo * more cleanup * more cleanup * cleanup comments * PR Suggestions * add more comments for clarity * grammar
2022-10-09Document Scene Sequences and Remaining SeqFlags (#1308)engineer124
* Begin scene sequence docs * Better docs * cleanup * Better Docs * cleanup * Move flag * Off -> None * Fix comment * spacing * address pr, spot -> resumePoint * SEQ_IO_VAL_NONE * missed one
2022-10-09`PlayerActionParam` -> `PlayerItemAction` (#1394)Dragorn421
* `PLAYER_AP_` -> `PLAYER_IA_` * Change temps, args, comments, members to "item action" * Format
2022-10-07rename audio context (#1388)engineer124
2022-10-07Document code_800F9280.c -> audio_seqcmd.c i.e. (Audio_QueueSeqCmd) (#1234)engineer124
* Document SoundSources * PR Suggestions * Duration timers to dec * `PlaySfxByPosAndId` -> `PlaySoundByPosition` * Begin importing docs from MM * Finish cleanup using code from MM * Start documenting commands * First attempt at thorough AudioSeqCmd wrappers * Improve names * Merge branch 'master' into audio_seqCmd fix name to minimize conflicts * Combine macros, implement them through repo * Improve docs * More progress, begin sequence command docs * seqcmd.h * More documentation of seqcmd.h * More docs * cleanup * More cleanup * More docs * VOL_SCALE_INDEX enum * missed enums * More Cleanup * docs * More docs * Add comments about sfxChannelLayout * More cleanup * Even better docs * Add a file description * small touchups * More cleanup of comments * more * More cleanup * More cleanup * Missing space * typos * Audio_SetVolumeScaleNow * More cleanup * Fill in enum * one more cleanup * Capitalize macros * remove AUDIO_ * cleanup * more cleanup * Small Fix * Add a lot of backticks for docs * Restructuring docs * More cleanup * swap channel args, cleanup * Typos * Many suggestions, revert filename * pr suggestions * even more PR * more pr suggestions * pr suggestion
2022-10-04Some pause menu inputs doc (#1370)Dragorn421
* `PauseContext.pageSwitchTimer` -> `delaySwitchPageInputTimer` * Document stick input repeat in the pause menu * format * `delaySwitchPageInputTimer` -> `pageSwitchInputTimer` * Fix swapped delay and delay_first, oops * Move timer incrs on their own lines Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2022-10-04Skip compiling C-included files during the build (#1386)Roman971
* Update the makefile to skip .inc.c files when building * Rename all C-included source files to .inc.c
2022-10-04Fix many missing NULLs (#1389)Roman971
* Fix many missing NULLs * Fix a raw actor id in en_horse
2022-10-02Various minor fixes (#1383)Roman971
* Swap REGION_US and REGION_JP * Fix a few missing EXCH_ITEM enum values * Remove unnecessary casts on alloc functions * Fix a double slash in the spec file * Swap top and bottom args in StackCheck_Init * Remove some unnecessary & in array references * Run formatter * Fix the comments for US and JP codes
2022-10-02Use intptr types in more code files (#1385)Roman971
* Use intptr types for segments and a few system files * Use intptr types for more dma rom addresses * Use intptr types in data referring to rom files * Update and cleanup a few message casts * Change sys_cfb functions and debugHeapStart to use pointers * Update graph.c for the sys_cfb return type change
2022-09-27Rumble doc (#1375)Tharo
* Rumble doc * Fixes, suggested changes * Improve padmgr retrace callback related code * Name some rumble-adjacent things, further suggested changes * Further suggested changes * Suggested changes
2022-09-12Replace player animation names with original names derived from OoT3D (#1369)Tom Overton
* Name every player animation after the original name from OoT3D * Also update link_animetion with original names
2022-09-03More documentation for padmgr.c (#1336)Tharo
* More documentation for padmgr.c * Update comments * Further suggested changes * Suggested changes * LOG_SEVERITY_INFO -> LOG_SEVERITY_CRITICAL * Adjust PadMgr_RequestPadData comment * Avoid array notation for args, adjust comment, rename the FaultMgr padInput field to inputs to better reflect it's an array
2022-08-31Doc room drawing (#1283)Dragorn421
* (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 cbe55e8090f2fcd00be3a81e64ae133254417599. * 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" :shrug: * 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-30Fix misc 16 (#1371)Dragorn421
* Replace tabs in exceptasm.s source * Replace tabs with \t in strings * Fix grammar in various comments * Fix "initalize" typos in code * (fix typo) `__osMallocIsInitalized` -> `__osMallocIsInitialized` * Some Link -> Player * Use `EXCH_ITEM_` more * "bgm music" -> "background music" * Fix typos in `place_title_cards.xml` * `SkelAnime_Update` returns a boolean * Run formatter
2022-08-30`OREG` cleanup & Doc `Camera_GetPitchAdjFromFloorHeightDiffs` (#1355)Dragorn421
* Doc `func_80044ADC` (draft) * Replace `OREG` accesses with existing macros * Small `Camera_GetPitchAdjFromFloorHeightDiffs` cleanup * Simplify names with near/far * Name regs used in `Camera_GetPitchAdjFromFloorHeightDiffs` * Parentheses/misc cleanup * update OREG names, except `R_CAM_YOFFSET_NORM` which looks too sketchy for this PR's scope
2022-08-30`stickRel` -> `stickAdj` (#1367)Dragorn421
* kaleido and filselect * ocarina and KaleidoScope_UpdatePrompt
2022-08-30Fix RaycastFloor flags (#1328)mzxrules
* 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-29Improve match for `Camera_CalcUpFromPitchYawRoll`, add docs (#1361)engineer124
* doc Camera_CalcUpFromPitchYawRoll * reword comments
2022-08-29Doc pass on bgcheck-waterbox properties (#1288)Dragorn421
* 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-28More documentation for PreRender.c (#1340)Tharo
* More documentation for PreRender.c * Comment fix * Suggested changes * More on coverage reading functions * Further comment changes * Further suggestions
2022-08-28Document the Haas Effect (#1302)engineer124
* Document Haas Effect * More docs * cleanup * add comments * Adjust comment * More cleanup * Fix * Add description of the Haas Effect * roman suggestion
2022-08-23Minor Misc Cleanup (#1360)engineer124
* misc cleanup * missed one * EffectSsDust_UpdateFire * revert change, needs more testing
2022-08-15Doc shrink_window, rename system to Letterbox (#1341)fig02
* docs * missed some hex * document Gfx_SetupFrame * review
2022-08-13Convert Blure to use array colours (#1347)EllipticEllipsis
2022-07-31sceneNum -> sceneId (#1338)Derek Hensley
* sceneNum -> sceneId * forgot to save play * scene -> sceneId where appropriate * Missed 1 + format * Update src/code/z_sram.c Co-authored-by: mzxrules <mzxrules@gmail.com> * Update src/code/z_sram.c Co-authored-by: mzxrules <mzxrules@gmail.com> * PR * Fix Co-authored-by: mzxrules <mzxrules@gmail.com>
2022-07-31Doc, macros, enums for `SurfaceType.data` (#1293)Dragorn421
* `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 e61cccf2e69a71c292a3680f9263b3eaf78c25f1. * 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-30Doc pass on EnDoor and transition actors (#1243)Dragorn421
* Doc pass on EnDoor and transition actors * (re)Name things * Forgot to change gameplay_keep.xml * "actor transition index" -> "transition actor index" * Run formatter * Better names for `DOOR_DL_` enum * `TRANSITION_ACTOR_INDEX` -> `GET_TRANSITION_ACTOR_INDEX` * name endoor params macros with get/is, _mask to _flag for the doubledoor flag * Move last ; from `DOOR_ACTOR_BASE` expansion to usage
2022-07-30Fix various small gfx issues (#1313)Tharo
* Fix various small gfx issues * Use 0xFFFF instead of -1 for max prim depth * More fixed point numbers * scale -> texCoordScale, better cycle 2 render mode in z_title * GFXP_CHAR_* defines renamed to SPACING * Fix some gDPLoadMultiBlock uses
2022-07-30Rename "Scene Setup Index" to "Scene Layer" (#1300)fig02
* setup -> layer * IS_CUTSCENE_LAYER * review * backtick * remove some more mentions of setup * alt header block * clarifying comment
2022-07-30Move fault_drawer bss to data/ asm because -g3 bss is fun (#1335)Dragorn421
2022-07-30Rename "Sound" to "Sfx" (#1292)engineer124
* First attempt * More * rename * more sound -> sfx / sound effect (#7) * PR Suggestions * PR Suggestions * Small fix Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> Co-authored-by: fig02 <fig02srl@gmail.com>
2022-07-29Fix audio strings with -use_readwrite_const and -signed (#1324)Roman971
* Fix audio strings with -use_readwrite_const and -signed * Add comments for audio flags in makefile
2022-07-27Clean up audio sample counts: bytes, samples, frames (#1289)engineer124
* Clean up bytes, samples, frames * Improve macro usage * More missed macros * rename macro now that it crosses files * redefine macros in terms of frames * Another use of macro * Fix, it's number of samples, not size * Partial PR Suggestions * Small change * size to length * Correct/Clarify comments * remove comment * More PR suggestions, cleanup * Bad formatting, fixed
2022-07-27Fix TEXTBOX_POS issue (#1329)mzxrules
2022-07-14Cleanup z_debug (reg editor) (#1290)Dragorn421
* Cleanup z_debug * misc * pad reg names column to """allow""" 40 characters because why not * safety parentheses in regs.h * More safety parentheses, in named regs defines * sort named regs in order, except for message system regs (?) * put all regs in order (message system ones too)
2022-07-14Misc Cleanup/Docs (#1315)engineer124
* Misc Cleanup * More cleanup