summaryrefslogtreecommitdiff
path: root/src/code/game.c
AgeCommit message (Collapse)Author
2025-06-10Introduce `CAM_DATA_SET_`, `CAM_ITEM_TYPE_` and name ↵Dragorn421
`Player_SetTurnAroundCamera`, `Player_RequestCameraSetting` (#2608) * Introduce `CAM_SET_CAMERA_DATA_`, `CAM_ITEM_TYPE_` and name `Player_CameraChangeSettingTurnAround` * bss and formatting * func_80835E44 -> Player_RequestCameraSetting * -> Player_SetTurnAroundCamera * -> CAM_DATA_SET_
2025-06-04Remove "z64" prefix from all headers (#2518)fig02
* z64 - a * z64 - b * z64 - c * z64 - d * z64 - e * z64 - f * z64 - g * z64 - h * z64 - i * z64 - l * z64 - m * z64 - o * z64 - p * z64 - q * z64 - r * z64 - s * z64 - t * z64 - v * restore file * fix merge * fix merge --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2025-05-02Fix game.c typo (#2523)GhostlyDark
2025-04-27Delete macros.h; Delete global.h (#2516)fig02
2025-04-26add array_count.h (#2514)fig02
2025-04-23macros.h 1/?: `PRINTF` and `T` (#2509)fig02
* create printf and translation headers * non-overlays complete * printf finished * move T macro * edit comment * fix error * fix bss * remove is_64 * fix bss
2025-04-19Remove Variables.h; Decouple z64.h from global.h (#2507)fig02
* progress * z64.h issues sorted * remove variables.h * format * n64 fix * another fix * did the wrong fix * fix libleo * fix bss * review * remove instead of comment
2025-04-16variables.h: migrate all remaining varaibles, remove other dependencies ↵fig02
except z64.h (#2505) * move remaining variables from variables.h * fix other dependencies * extra newline * fix and adjust comment * is this the problem * fix bss
2025-02-26Reduce dependencies on global.h (10) (#2490)mzxrules
* reduce z64.h size * fix z_cheap_proc.inc.c * ,bss * remove temp delcaration
2025-02-22Clean out z64.h (#2484)fig02
* Clean out z64.h * fix version include * overlay.h * pr suggestion * try fixing main.c * add back forward declare * fix bss * header guard * prefix
2025-02-19Reduce overlay dependencies on global.h (8) (#2478)mzxrules
* move variables into z64environment.h * z_room.h * z64sram.h, z64ss_sram.h, z64font.h, kanread.h * z64lifemeter.h, z64debug.h, debug_arena.h * buffers.h * remove z_bgcheck global * gamealloc.h * suggestions * .bdd
2025-01-08[iQue] Create/update macros for printing debug strings (#2398)cadmic
2024-12-26Fix iQue audio and line numbers (#2386)cadmic
2024-12-15Add macros for line number differences (#2365)fig02
* initial work, think I got all of them * cleanup line_numbers.h * fix gc-eu-mq-dbg * fix matching problems * remove old lines * format * missed some stuff * comment fixes * other * review changes
2024-12-02Fix some more GCC warnings, mark some bugs based on GCC warnings (#2309)Tharo
* Fix some more GCC warnings, mark some bugs based on GCC warnings * Weird formatting * Suggested changes * More weird indentation I guess * UNREACHABLE() macro, add missing NORETURNs to fault_n64.c * AVOID_UB for PAL path in z_file_nameset.c * Remove comments about return types * Remove temp no longer needed
2024-11-17Decouple Debug Features From gc-eu-mq-dbg (#2296)fig02
* rename OOT_DEBUG to DEBUG_FEATURES * makefile changes * add DEBUG_ASSETS * fix DEBUG_FEATURES usages * format * fix errors * review * fix problem and review2 * review * add DEBUG_FEATURES to DEBUG_ASSETS check * review * whoops * format
2024-10-09[ntsc-1.0/1.1] Match line numbers in debug strings (#2255)cadmic
2024-09-27[ntsc-1.0/1.1] Match PAL 1.0 viconfig changes (#2231)cadmic
* [ntsc-1.0/1.1] Match viconfig changes * SREG(48) -> R_VI_MODE_EDIT_STATE
2024-09-08[headers 13] osMalloc.h -> include/libc64/os_malloc.h (#2175)Dragorn421
* [headers 13] osMalloc.h -> include/libc64/os_malloc.h * also update the #includes :)
2024-09-06T() macro 8 (#2142)Dragorn421
* T() macro in fault * T() macro in game.c, gfxprint.c * T() macro in ucode_disas.c * T() macro in z_actor.c * T() macro in z_message.c * push fault key combo T() * z_message T: koko -> "here" * format
2024-09-06Miscellaneous libultra header fixes (#2139)cadmic
* Miscellaneous libultra header fixes * Fix bss? * Reword RCP timeout
2024-09-05[ntsc-1.2] Organize n64dd declarations and convert to 1.0 addresses (#2127)cadmic
* Reorganize n64dd declarations * Fix bss * Really fix bss
2024-09-04[ntsc-1.2] Match __osMalloc.c and code_800FC620.c (new/delete) (#2106)cadmic
* Match __osMalloc * Match src/code/code_800FC620.c (new/delete) * Wrap versions-specific files in ifdefs to fix compilation * Fix bss * Remove {FAULT,RAND,OSMALLOC}_VERSION in favor of PLATFORM_N64 * Fix __osMalloc data splits, add unused strings * __osMalloc.h -> osMalloc.h * Fix merge
2024-09-04[ntsc-1.2] Match game.c, z_play.c, z_room.c (#2117)cadmic
* Match z_room.c * Match game.c and z_play.c * Add undefined syms * Rewrite condition based on other file matches
2024-09-03Rename FaultDrawer_ functions to Fault_ (#2113)cadmic
* Rename FaultDrawer_ functions to Fault_ * Rename FaultDrawer_Init to Fault_InitDrawer
2024-08-28[ntsc-1.2] Decompile fault.c (#2046)Dragorn421
* wip decomp ntsc-1.2 fault.c * more ntsc-1.2 fault.c * decompiled fault_v1.c * name fault_v1 functions, wip * try to clean up build system (two versions of the fault system coexisting) * cleanup * cleanup2 * fix build gc-eu-mq-dbg * match 2 more, ty anon * matched * review * more review * fixup spec * `(uintptr_t)ptr op int` instead of `ptr op (type*)int` * move fault.h out of global headers, properly include fault.h and versions.h * compile all fault_*.c files regardless of version by overriding FAULT_VERSION * n64 FaultMgr.framebuffer s32 -> u16* * FaultMgr.framebuffer -> FaultMgr.fb * make gc FaultMgr.fb u16* (yes, thats everything) * bss * fix Fault_Printf return type * noop FaultDrawer_SetFontColor, FaultDrawer_SetCharPad in fault_n64 * fault_color_ stuff is only for fault_gc * rm empty line in makefile * I guess `D_80105A90_unknown` is `[sg]TotalAllocFailures` * bss * `Fault_WaitInput` -> `Fault_WaitForInput` * use named fault funcs in pointers array * FAULT_OOT{N64,GC} -> FAULT_{N64,GC} * Apply suggestions from code review Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> * review, sync fault_{gc,n64} * Apply `FPCSR_CE` suggestions from code review Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> --------- Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
2024-08-25[ntsc-1.2] Decompile cic6105.c, main.c (#2068)Dragorn421
* decompile-OK Main, cic6105.c * names cleanup / minimal doc * match versions * fix bad disasm metadata format * bss * bss * review 1 * review 2 * review 3 * review 4 * cleanup * bss * add some sizes to disasm metadata symbols
2024-08-22Add T macro for translated debug strings (#2064)Dragorn421
* Add T macro for translated debug strings * Hyral -> Hyrule * put some more care into z_std_dma
2024-08-17Fixup printf args fake matches (#2049)Dragorn421
2024-08-10Add "do {} while (0);" to CLOSE_DISPS (#2025)cadmic
2024-02-27Filename & line number args cleanup (#1891)Tharo
* Filename & line number args cleanup * Use int for line number args over s32/u32 * Add missing const qualifiers from filename args * Fix gcc warning in game.c * Add comment to weird assignments in GameState_Init
2024-02-27Match retail code data sizes (#1741)cadmic
* Match retail audio data * Fix various small code data problems * Disable terminal colors in debug builds * Match z_actor_dlftbls.c .rodata * Use _3 for unused nameString macro parameter * Move sDebugCutsceneScriptBuf to be in-function static * Comment on actor name being NULL * Split out padding the fault_drawer.bss.s
2024-01-31Gamealloc, Graph, and Graphalloc retail OK (#1675)Derek Hensley
* Gamealloc OK * Graph + Graphalloc OK * PR review * gfxalloc * new lines * Remove imposter
2024-01-31Document Audio Thread Commands (#1399)engineer124
* begin docs * cleanup * copy over progress * cleanup * small cleanup * more docs, fill out cmds * small touchup * pan weight ganon comment * fix specId * seqcmd cleanup * format * small cleanup * one more thing * small feedback from MM * partial PR * some PR Suggestions * small adjustments * ticks, seqticks, frames, updates: term cleanup * small fix * PR Review * PR Review * PR Review * rm param * adjust comment * update renamed functions * format --------- Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2024-01-30Define OOT_DEBUG=0 in retail builds (#1658)cadmic
* Define OOT_DEBUG=0 in retail builds * Fix ifndef * Replace VI_MODE_EDITOR_INACTIVE * Revert "Replace VI_MODE_EDITOR_INACTIVE" This reverts commit f7c4cae7c3b3d9fdc56e97183690c05f2dcec215. * Replace VI_MODE_EDITOR_INACTIVE, take 2 * Revert EnBom_Draw
2024-01-29Match ``game.c`` - OK (#1644)Yanis42
2024-01-16Create debug macros for LogUtils functions (#1610)cadmic
2024-01-12Replace most osSyncPrintf calls with PRINTF macro (#1598)cadmic
* Replace most osSyncPrintf calls with PRINTF macro * DEBUG -> OOT_DEBUG
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-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
2022-12-30Document debug text drawing functions in z_debug.c (#1472)fig02
* name functions and clean up some stuff * clean up function call args and use enum, format * slightly change comment * review * make things more debug cam oriented * rename buffer * regs update comment * move enum
2022-12-19`R_PAUSE_MENU_MODE` -> `R_PAUSE_BG_PRERENDER_STATE` and docs (#1368)Dragorn421
* `R_PAUSE_MENU_MODE` -> `R_PAUSE_BG_PRERENDER_STATE` and document values and usage * `SREG(33)` -> `R_GRAPH_TASKSET00_FLAGS` * format * `PAUSE_BG_PRERENDER_DRAW` -> `PAUSE_BG_PRERENDER_SETUP` * `PAUSE_BG_PRERENDER_FILTER` -> `PAUSE_BG_PRERENDER_PROCESS` * DList -> display list
2022-11-26Document HREG debugging system (#1351)fig02
* progress * progress * change * named most * name prerender things * fix and format * play prefix * address most comments (still a few more things to do) * fix error * reword input test comments * some more * rework env draw flags * add hilite * merge and format * init to proper values * rename env draw flag names * 7 to 6 * more small changes
2022-11-16More documentation for `z_std_dma.c` (#1415)Tharo
* More documentation for z_std_dma * uintptr casts for rom symbols in z64animation.h and z_kanfont.c * Format * Suggested changes, more defines for static texture sizes * PI Interface -> PI * Further suggested changes * Format * Comments about item_name and map_name texture assumptions
2022-11-13TwoHeadArena and TwoHeadGfxArena docs (#1349)Tharo
* TwoHeadArena and TwoHeadGfxArena docs, ALIGNOF macro * AllocStart -> AllocHead , AllocEnd -> AllocTail * Format * Suggested changes * Fix * Further suggested changes
2022-11-13Improvements to Video Interface related functions and data (#1332)Tharo
* Improvements to VI related functions * Fix * Suggested changes * Comment enum values Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Suggested changes, plus comments in visetspecial.c * Name gViConfigModeType * Further suggested changes * Format * Fix comment on modeLPN2 Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2022-11-01Rename `vt.h` to `terminal.h` (#1339)Dragorn421
* `vt.h` -> `terminal.h` * `VT_` -> `T_` (as in Terminal) * `vt.h` -> `terminal.h` in includes too Pepega * Sort out tiny terminal.h include inconsistencies * Format * -> `TE_` * format * `TE_` -> back to `VT_` (parkour!) * explicit VT
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-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-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