summaryrefslogtreecommitdiff
path: root/src/code
AgeCommit message (Collapse)Author
2024-01-09Create debug macros for common functions (#1597)cadmic
* Create debug macros for common functions * Revert NDEBUG change * MALLOCR -> MALLOC_R * DEBUG -> OOT_DEBUG * Use the same name for debug and non-debug matrix functions * Fix file/line argument order * Revert g[s]DPNoOp[Tag] * Use SystemArena_MallocDebug directly in GameAlloc_MallocDebug * MTXF_TO_MTX -> MATRIX_TO_MTX
2024-01-08Introduce Face Reaction Enum (#1586)engineer124
* face reactions * cleanup * cleanup fake match * PR Review * while I'm here * mask reaction * small fix * Small cleanup * oops
2023-12-10Doc Actor: En_Ma1 (Child Malon) (#1584)hiisuya
* started malon documentation * docd all event and inf table checks * doc cleanup * ran formatter * fixed misnamed eventcheck * revert isNotSinging oops * removed unnecessary comments * changed from handle to update * revert vec3f name change * moved texture information * isNotSinging to singingDisabled * rename of inftable and eventchk * small cleanup * anim enum change * enum names for child malon limbs
2023-11-30Document a bug in Actor_ChangeCategory where actors may not be updated ↵cadmic
correctly (#1587) * Document Actor_ChangeCategory bug * Reword * actor update function -> actor update
2023-11-30Documentation for audio_thread_manager.c (#1562)Tharo
* Documentation for audio_thread_manager.c * Fixes * Move AudioTask back to z64audio.h and include in audiomgr.h, adjust bug comment * Adjust AudioMgrDebugLevel enum
2023-11-22Misc Cleanup (#1585)engineer124
* misc cleanup * more fake matches * revert for sym
2023-11-19Struct Returns (#1574)engineer124
* change args * PR Review * format
2023-11-19Document Actor "OfferTalk" (#1567)engineer124
* OfferTalk * rm comment * exch to offer in comment * reword again * Partial PR Review * Actor_AcknowledgeTalking * Actor_TalkOfferAccepted * PR Review * rm part of comment * rm comment
2023-11-19More Camera Flags (#1453)engineer124
* Generic Camera Flags * New flag names * Add flags to functions * Finish flag docs * More docs * More cleanup * More clarity * Better shrinkwindow flag docs * Improve name * CAM_INTERFACE_FLAGS * Better approach to edge cases * Change ordering for consistency * Oops * Add masks to macro * PR/Discord discussions * cleanup comment * Oops * PR Suggestions * More PR Feedback * More PR Suggestions * More Camera Flags * PR Suggestions * More flag style change * Small cleanup * More flag docs * Another flag * Fix flags * sync names with other PRs * more fixes * fix comments * update with hud visibility mode docs * missed one * fix comments * Roman PR Suggestions * interfaceField * small fix * letterbox cleanup * cleanup * fix macro arg * fix func declaration * many more docs * better docs? * missed some * oops, revert * add flags to name * cleanup * flag * double signal * simplify cam func name * more suggestions * PR Suggestion
2023-11-12Fix misc 21 (#1573)Dragorn421
* Make `sNew` in (unused) `code_800FC620.c` a string It is passed as a filename to `__osMallocDebug` so should be a nul-terminated string, not a char[3] missing an explicit \0 * Fix gcc warning in `JpegDecoder_ParseNextSymbol` about SLL on negative value -1U is an unsigned value, aka 0xFFFFFFFF I keep -1 because it seems that's what a jpeg standard has too References: https://stackoverflow.com/questions/40508958/shifting-a-negative-signed-value-is-undefined https://www.w3.org/Graphics/JPEG/itu-t81.pdf (page 105, figure F.12) * Small cleanup * Fix few mistakes (thanks gcc warnings) * Add `@bug` in file select settings draw code, using the wrong array * format * format main * rename arg for a happy formatter * Move important function call out of a printf
2023-11-12Changed gLinkChildSlinghotStringDL to gLinkChildSlingshotStringDL (#1576)Javarooster
2023-11-07Rename "ITEM_LAST_USED" (#1572)fig02
* rename * format * remove formatter changes * change model group comments
2023-10-30Remove `(ActorFunc)` casts in initvars (#1571)Dragorn421
* Remove `(ActorFunc)` casts in initvars, use `/**/` trick for format Achieved by using the following regex: (ActorInit.*)(\n\s+)(.*)(\n\s+)(.*)(\n\s+)(.*)(\n\s+)(.*)(\n\s+)(.*)(\n\s+)(?:\(ActorFunc\))?(.*)(\n\s+)(?:\(ActorFunc\))?(.*)(\n\s+)(?:\(ActorFunc\))?(.*)(\n\s+)(?:\(ActorFunc\))?(.*\n\};) replaced with $1$2/**/ $3$4/**/ $5$6/**/ $7$8/**/ $9$10/**/ $11$12/**/ $13$14/**/ $15$16/**/ $17$18/**/ $19 plus a change from /**/ to #if 0 #endif in docs/ * Manual fixes
2023-10-28Player Docs: public facing csAction things (#1561)fig02
* name public csAction functions * format * adjust function comment * format
2023-10-27libc cleanup (#1568)Tharo
* libc cleanup * Suggested changes, small alloca tweak * Remove printf include
2023-10-17Use `long` over `int` for s32/u32 types (#1546)Tharo
* long s32 * Suggested changes
2023-10-07Rename Math3D_CylOutsideCyl and Math3D_CylOutsideCylDist (#1557)cadmic
* Rename Math3D_CylOutsideCyl and Math3D_CylOutsideCylDist * radix -> radii Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * Make Math3D sphere/cylinder collision check function names more consistent --------- Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
2023-10-07Player Docs: Propose Named Unions For Shared Variables (#1560)fig02
* make unions * format * adjust comment on halt thing
2023-09-26Player Docs: csMode -> csAction (#1547)fig02
* csmode -> cs action * format
2023-09-25Speedmeter Small cleanup (#1554)Derek Hensley
* Small cleanup * x
2023-09-22Name the main pause state and add placeholder enum for main (sub)states (#1551)Dragorn421
2023-09-19Player docs: Control Stick Input and Movement (#1539)fig02
* document input stuff and movement speed+yaw * curve -> curved, and other cleanups * fix + format * function declaration * name arguments * add mode descriptions * fix typos * move comment down
2023-09-19Doc/Cleanup pass on object handling (#1227)Dragorn421
* `Object_InitBank` -> `Object_InitContext` * Add and use `OBJECT_SPACE_SIZE_BASE` * Remove `OBJECT_EXCHANGE_BANK_MAX` -> use `ARRAY_COUNT()` instead * "object status" -> "object load entry" * Misc. cleanup/renames * Partial docs and way too much batch renaming and cleanup for a single commit * ctrl shift h * format * format clang-11.1 * fix regressions * Improve a `@bug` comment * Move `OBJECT_SPACE_SIZE_BASE` from header to near `Object_InitContext` * "objectID" -> "objectId" * Revert iterator index to `i` in `Actor_KillActorsWithUnloadedObject` * "object load entry index" -> "object entry" * `Object_UpdateLoadEntries` -> `Object_UpdateEntries` * Run format.sh * "object entry" -> "object slot" (except internal usage) * Proper `Object_SpawnPersistent` doc Co-authored-by: fig02 <fig02srl@gmail.com> * fixup one comment "object bank index" -> "object slot" * Amend `Object_SpawnPersistent` comment to mention running out of free slots * `Actor_KillActorsWithUnloadedObject` -> `Actor_KillAllWithMissingObject` * Remove useless mention of what uses `Object_SpawnPersistent` * Fix mistake on `Object_SpawnPersistent` doing sync dma, not async * run formatter * `Object_InitContext` -> `Object_Init` * `waitObjectSlot` -> `requiredObjectSlot` * `Object_Init` -> `func_80097DD8` * one objectIndex -> objectSlot * Remove `OBJECT_SPACE_SIZE_BASE` * light fix on the merge (rm OBJECT_EXCHANGE_BANK_MAX) * `func_80097DD8` -> `Object_InitContext` --------- Co-authored-by: fig02 <fig02srl@gmail.com>
2023-09-16Document Framebuffer Filters, VisCvg and VisZbuf (#1534)Tharo
* Document z_viscvg and z_viszbuf Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Few more notes * Some more notes Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * Review * Americanisation, FB RGB * Oops * Review * Minor documentation modifications * Header, base struct and enums Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * functions.h fix * Suggested changes, further adjustments to file doc comments * Further suggested changes, standardize capitalization of gfxP * g --------- Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2023-09-14remove the extra ``CS_CMD_STOP`` (#1535)Yanis42
2023-09-13Document Camera Special9 (door) angle bug (#1525)fig02
* document special9 angle bug * Update src/code/z_camera.c Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2023-09-09Apply noreturn attribute where applicable (#1532)Tharo
2023-09-06Document pause states (excluding gameover) (#1483)Dragorn421
* Document PauseContext.state * Very light docs surrounding pause states * PAUSE_STATE_UNPAUSE -> PAUSE_STATE_RESUME_GAMEPLAY and comment on purpose in the enum * PAUSE_STATE_MAIN -> PAUSE_STATE_6 * format * Player_InitDrawPause -> Player_InitPauseDrawData
2023-08-19En_Cow Doc (#1492)Billy
* Add Documentation for Cows * Better naming for cow unlock flag * Update with MM solutions and PR suggestions * Readable conditions * Decimal cycle counter * Replace params with cow type * Clean up type usage and function names * Clean up cylinders * Fix collider enum * Rename EnCow rear collider * Fix spacing * PR fixes: COLL -> COLLIDER enum static prefix Missed MM function naming Specific actor flags naming * Rename of healRot and breathTimer * Document Epona's song reset behavior * anon review * fig review * whitespace * rework milk interaction stuff * changes to milk comment --------- Co-authored-by: fig02 <fig02srl@gmail.com>
2023-08-15Doc/cleanup pass on effects 1 (#1421)Dragorn421
* Some doc/cleanup on `Effect_Ss_Fhg_Flash` * Some doc/cleanup on `Effect_Ss_Blast` * 11DA0 -> Billboard * doc three lerp funcs in effectss * Some doc/cleanup on `Effect_Ss_Bomb` * `rTexIdx` -> `rTexIndex` * lifespan * `LIFESPAN` -> `EFFSSBOMB_LIFESPAN` * --parentheses * Add todo about "having zapd forward declare static variables" * try rework comments on effects scale * lightning -> "a ball of electrical arcs" ?
2023-08-15Placeholder names for skelanime moveflags (#1489)Dragorn421
* Add defines for all used animflags * Use named constants (and add two) for players `func_80832F54` flags * note which flags are player-only * Attempt at documenting but too FeelsUnkMan again * forgot something * ANIM_FLAG_PLAYER_0 -> ANIM_FLAG_0 and amend comment from "player-only" to "no effect outside player" * 1<<n flags
2023-08-15Cleanup/add bgcheck macros (#1478)Dragorn421
* 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-15Split z64.h: move various things, state, sram, gfx, jpeg, prerender, ↵Dragorn421
speedmeter (#1487) * Split z64.h more * fix speedmeter.h (expect this kind of issue resolution to pop up eventually) * fix z64object.h * fix z64state.h * fix (probably only partially) z64play.h * fix fix speedmeter.h :) * revert making a play header (sadge), add/split transition & transition_instances * move stuff to cutscene, interface * Move `TransitionCircle%` enums to `z64transition_instances.h` * z64state.h -> z64game.h with a "this is not final" comment * forward declare GraphicsContext in z64game.h instead of including the header file for it * don't comment on where the forward declarations are from reasoning: 1) it's easy to go out of sync (like this comment, it was outdated anyway) 2) any IDE can easily find the struct anyway
2023-08-15Document z_lib Sfx Functions (#1470)engineer124
* document lib sfx * rename functions
2023-08-15Mention why PrimDepth is used in `PreRender_FetchFbufCoverage` (#1520)Tharo
* Mention why PrimDepth is used in PreRender_FetchFbufCoverage * Clarify that this only affects the memory alpha blender input, not all alpha blender inputs * Try to make the subtle difference between coverage and memory alpha more clear
2023-08-13Split `SaveContext` into sub-structs (#1393)Dragorn421
* Split SaveContext struct * run formatter * Remove temporary-until-split stuff in z_sram * . * run formatter
2023-08-13document bugs (#1519)fig02
2023-08-13Cleanup?: Use gotos in z_play for large else blocks (#1486)Dragorn421
* remove else when using `goto Play_Draw_DrawOverlayElements` * Add `goto Play_Draw_skip`, use on prerender save * format
2023-07-27Prefer clang-format-14 (#1517)Dragorn421
* Change preferred clang version to 14 (for formatting) * Add `--show-paths` arg to format.py for printing paths to clang-* binaries used * Run formatter (clang-format-14) * run formatter
2023-07-10Use intptr in most remaining code files (#1438)Roman971
* Use intptr in most remaining code files * Fix missing uintptr_t in actor * Use u8* casts for texture pointer arithmetic * Use bg + 1 instead of casting in Room_DrawBackground2D
2023-07-06Reorganize Audio Files & Name Remaining Audio Files (#1494)engineer124
* reorganize audio files * audio code files * split audio and libaudio * audio_init_params to audio_configuration * simplify file names * move aisetnextbuf to libaudio * move src/audio -> src/code/audio * adjust makefile comment * reorganize again into internal/external * adjust comment * restructure again
2023-07-05Minor Misc Cleanup 3 (#1502)engineer124
* more misc cleanup * remove z64 conflicts * undo ISVDbg
2023-07-05Reduce hardcoded constants in Lights_GlowCheck, some more comments on the ↵Tharo
CPU driven depth test and z-buffer value conversion (#1506)
2023-07-04Generate gamestate overlay table with an `include/tables/` header (#1504)Tharo
* Generate gamestate overlay table from an include/tables/ header * GameStateIndex -> GameStateId, move to z64.h, add GameStateId enum name field to the gamestate table, adjust and improve gamestate table comment * Shorten zeros in table definition * Generate linker symbols, other suggested changes * GAMESTATE_MAX -> GAMESTATE_ID_MAX like the others
2023-07-03Documentation for skybox drawing (#1515)Tharo
2023-07-03Fix comment about RM_VISCVG in PreRender_FetchFbufCoverage (#1514)Tharo
2023-02-27Further documentation for overlay relocation (#1498)Tharo
* Further documentation for overlay relocation * Suggested changes * Format * REL_ -> RELOC_
2023-02-26Minor Misc Cleanup 2 (#1422)engineer124
* misc cleanup * more cleanup * more cleanup * PR Suggestions * cleanup cond
2023-01-12Document OnePointCutscene Init Field (#1465)engineer124
* player csmode enum * cleanup * missed one, player2 * spell out enum name * use CSMODE_MAX for data * doc OnePointDemo Field * PR Suggestions * another suggestion * duplicate word * adjust comment * cleanup comments * oops
2023-01-12`EnHoll` docs (door-less transition between rooms) (#1419)Dragorn421
* some EnHoll cleanup * some more EnHoll cleanup * even more EnHoll cleanup * EnHoll docs * `enHollFillAlpha` -> `bgCoverAlpha` * Dl -> DL * one temp: action -> type * Move static data out of `EnHoll_HorizontalVisibleNarrow` * "fade" -> "bgcover" * spread sentence over several lines * tweak comments formatting Co-authored-by: fig02 <fig02srl@gmail.com>