1
0
mirror of https://github.com/zeldaret/oot.git synced 2024-09-21 04:24:43 +00:00
Commit Graph

465 Commits

Author SHA1 Message Date
Tharo
dcf61174e9
Filename & line number args cleanup (#1891)
* 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-27 02:37:33 -05:00
cadmic
be4f3142e0
Match retail z_sram.c (#1722) 2024-02-07 10:41:12 -05:00
cadmic
178e95ae50
Give debug_malloc.c the same treatment as system_malloc.c and z_malloc.c (#1700) 2024-02-03 10:59:25 -05:00
cadmic
d9a1148d13
Match retail __osMalloc.c (#1684)
* Match retail __osMalloc.c

* Add TODO about N64 ArenaNode debug info

* FLAG prefix -> FLAG suffix
2024-02-02 17:37:32 -05:00
cadmic
8db76a27da
Match retail system_malloc.c and z_malloc.c (#1683)
* Match system_malloc.c and z_malloc.c

* Rename CHECK_POINTER
2024-02-02 15:01:49 -05:00
cadmic
8c909c5d98
Match retail logutils.c and z_locale.c (#1699)
* Match retail logutils.c and z_locale.c

* Update src/boot/logutils.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

---------

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
2024-02-02 13:45:02 -05:00
fig02
23de92d2f9
Match z_debug for retail (#1694)
* match z_debug for retail

* prototype

* directive
2024-02-02 12:44:31 -05:00
fig02
8d0076b010
Match retail Title and Sample gamestates (#1692)
* match title and sample

* change to directive

* no bad return
2024-02-01 19:52:52 -05:00
cadmic
99fd784bc2
Match sys_matrix.c (#1682) 2024-02-01 09:13:24 -05:00
Tharo
5e8e01f110
z_view.c gc-eu-mq OK (#1681)
* z_view.c retail

* Replace PERSPECTIVE_EDITOR_ACTIVE, adjust PRINTF selection condition

* Macro-ify View_ErrorCheckEyePosition
2024-01-31 20:09:16 -05:00
Derek Hensley
06379c3109
Gamealloc, Graph, and Graphalloc retail OK (#1675)
* Gamealloc OK

* Graph + Graphalloc OK

* PR review

* gfxalloc

* new lines

* Remove imposter
2024-01-31 19:07:12 -05:00
engineer124
a0d31dba68
Document Audio Thread Commands (#1399)
* 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-31 18:25:23 -05:00
cadmic
5c926fea0f
Remove Main_LogSystemHeap from functions.h (#1676) 2024-01-30 23:40:15 -05:00
cadmic
17da5e7bf9
z_collision_check.c OK (#1642)
* Match z_collision_check.c

* Disable function declarations

* Remove /* OOT_DEBUG */

* Remove newlines around ifdef

* Newlines

* Tweak z_actor.c #if to avoid merge conflicts
2024-01-30 19:43:10 -05:00
Derek Hensley
77c9c97ff9
Overlay_Relocate and Overlay_Load retail OK (#1662)
* Overlay_Relocate OK

* Overlay_Load

* format

* PR + better match for Overlay_Load
2024-01-30 19:30:27 -05:00
cadmic
9816f62129
Define OOT_DEBUG=0 in retail builds (#1658)
* Define OOT_DEBUG=0 in retail builds

* Fix ifndef

* Replace VI_MODE_EDITOR_INACTIVE

* Revert "Replace VI_MODE_EDITOR_INACTIVE"

This reverts commit f7c4cae7c3.

* Replace VI_MODE_EDITOR_INACTIVE, take 2

* Revert EnBom_Draw
2024-01-30 13:54:38 -05:00
cadmic
5ba625b171
Match yaz0.c (#1660) 2024-01-29 18:14:30 -05:00
Yanis42
9f169a67cd
Match `game.c` - OK (#1644) 2024-01-29 15:27:29 -05:00
cadmic
64d384b4c1
is_debug.c and boot_main.c OK (#1641)
* Match is_debug.c and boot_main.c

* Disable function declarations

* Remove /* OOT_DEBUG */

* Remove newlines around ifdef
2024-01-29 12:10:28 -05:00
Dragorn421
5e406f754e
Small Math_Vec3f_Yaw doc (#1433)
* Small `Math_Vec3f_Yaw` doc

* remove actor from arg names

---------

Co-authored-by: fig02 <fig02srl@gmail.com>
2024-01-18 17:56:54 -05:00
Dragorn421
1a8772e540
Cleanup z_collision_check 1 (#1427)
* Cleanup `z_collision_check.c` and structs

* Revert `other*` names to master, split to other pr

* WIP/experimental: `ColliderCylinderElement`

* Revert "WIP/experimental: `ColliderCylinderElement`"

This reverts commit cfc8c32ace.

* ac/atHitInfo -> HitElem

* rename some collider elements to "elem" (instead of item, info, hurtbox...)

* cut down on more "hitbox" usage

* name all `ColliderElement*` temps properly

* rearrange colcheck structs

* add collider shape name descriptions

* reword collider shape descriptions

* jntsph first again

---------

Co-authored-by: fig02 <fig02srl@gmail.com>
2024-01-11 10:30:47 -05:00
cadmic
cd917b0cb8
Create debug macros for common functions (#1597)
* 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-09 07:59:03 -05:00
engineer124
e146d7bc26
Introduce Face Reaction Enum (#1586)
* face reactions

* cleanup

* cleanup fake match

* PR Review

* while I'm here

* mask reaction

* small fix

* Small cleanup

* oops
2024-01-08 17:17:22 -05:00
Tharo
5ce4670fd1
Documentation for audio_thread_manager.c (#1562)
* 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-30 16:22:30 -05:00
engineer124
aef0335681
Struct Returns (#1574)
* change args

* PR Review

* format
2023-11-19 11:17:31 -05:00
engineer124
3d1ee33d7b
Document Actor "OfferTalk" (#1567)
* 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-19 11:11:59 -05:00
engineer124
81a3c3da32
More Camera Flags (#1453)
* 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-19 02:17:32 +01:00
fig02
4908b8b37c
Player Docs: public facing csAction things (#1561)
* name public csAction functions

* format

* adjust function comment

* format
2023-10-28 07:46:24 -04:00
Tharo
3475651701
libc cleanup (#1568)
* libc cleanup

* Suggested changes, small alloca tweak

* Remove printf include
2023-10-27 16:06:44 +02:00
Tharo
a20163c6ab
Use long over int for s32/u32 types (#1546)
* long s32

* Suggested changes
2023-10-17 21:16:31 +02:00
cadmic
b3486b57ef
Rename Math3D_CylOutsideCyl and Math3D_CylOutsideCylDist (#1557)
* 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-07 19:42:28 -04:00
fig02
2cb4ff4fd3
Player Docs: csMode -> csAction (#1547)
* csmode -> cs action

* format
2023-09-26 12:48:41 -04:00
fig02
da3f4718f0
Player docs: Control Stick Input and Movement (#1539)
* 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-19 21:37:03 -04:00
Dragorn421
57ce0cf8d9
Doc/Cleanup pass on object handling (#1227)
* `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-19 14:10:12 -04:00
Tharo
9b207c356a
Document Framebuffer Filters, VisCvg and VisZbuf (#1534)
* 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-16 17:16:58 -04:00
Tharo
7235af2249
Apply noreturn attribute where applicable (#1532) 2023-09-09 10:24:52 -04:00
Dragorn421
d314cfe923
Document pause states (excluding gameover) (#1483)
* 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-09-06 11:14:15 -04:00
Dragorn421
d6207b17c2
Doc/cleanup pass on effects 1 (#1421)
* 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-15 20:28:12 -04:00
Dragorn421
ccae1f7387
Split z64.h: move various things, state, sram, gfx, jpeg, prerender, 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-15 12:21:19 -04:00
engineer124
b8aa2a251e
Document z_lib Sfx Functions (#1470)
* document lib sfx

* rename functions
2023-08-15 01:44:20 -04:00
Tharo
12f67e108a
Further documentation for overlay relocation (#1498)
* Further documentation for overlay relocation

* Suggested changes

* Format

* REL_ -> RELOC_
2023-02-27 09:14:02 +01:00
engineer124
1149530c92
DbCamera to DebugCamera (#1482)
* better dbCam prefix

* missed some

* PR Suggestions

* alignment

* more debug

* cleanup
2023-01-12 16:06:31 -05:00
fig02
e37b993483
Name movement related functions in z_actor (#1476)
* rename functions

* dragorns name suggestions

* Revert "dragorns name suggestions"

This reverts commit dd4626ce5e.

* lets try that again

* reword comment

* comments

* projectile speed

* arg name

* more comments

* minVelY comment

* merge master and format
2022-12-30 13:55:14 -05:00
fig02
04641a6b69
Document debug text drawing functions in z_debug.c (#1472)
* 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-30 02:23:09 +01:00
Derek Hensley
bd317dbb9d
Fbdemo Docs: TransitionTile (#1471)
* TransitionTile'

* Final clean up

* PR

* Header comment

* vtx_tn

* Name background DL

* row <-> col

* Rename update functions

* Update header

* Enum

* Done -> Ready + cleanups

* Update include/z64transition.h

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

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-12-28 22:29:59 +01:00
fig02
7927e7b330
z_demo documentation (#1327)
* commit old stuff

* progress

* progress

* progress

* progress

* more progress, renaming cues next

* small changes

* enum values added for all actions

* hardcoded values removed when possible

* commands renamed

* first pass of action -> cue

* fix some matches

* some more cleanup

* scriptPtr

* forgot one

* remove cue rot union

* more changes

* some more stuff

* more stuff

* fix matching issues

* some more things

* progress, starting to rename destinations

* small changes

* name some destinations

* more names

* need to switch branch

* progress

* first pass of destination names

* usages fixed

* use destination enum

* fix csdis

* format

* command descriptions

* revert accidental zap changes

* forgot some things

* use a single macro for CutsceneCameraPoint (idk why i didnt think of this sooner)

* typo

* review1

* clarify ruby/sapphire comment

* remove endframe for commands that dont use it

* some more review

* most review, but not all

* scriptPtr -> script, and another small change

* ocarina action

* remove +1 from light settings command, change comment

* actionIndex -> cueIdTemp (i guess)

* _SetCueX -> _SetXFromCue

* format

* tweak fade out seq arg names

* use spline terminology

* more dragorn and engineer review

* misc start/end frame note

* cleanup StartPosRotFromCue vs PosRotFromCue

* cleanup spline terminology

* sPrevCamId -> sReturnToCamId

* comment on debug cs data address

* Cutscene_Init -> Cutscene_InitContext

* single point types are not a list

* remove todo comment

* some more review

* rumble struct names

* some review

* more review

* missed one

* reword pointer comment

* even more review

* match transition terminology with z_play

* change condition and format

* frame count

* command specific structs with alignment

* anon review

* remove unneeded arg from time macro

* yeet `CsCmdGeneric`

* remove unused from single point types

* typo

* compromise attempt -- name endFrame everywhere

* fixes

* fix again

* copied the wrong note

* cutscene data note

* review, format

* compat defines

* idk whats going on man

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
2022-12-24 13:55:17 -05:00
Derek Hensley
4a9873775c
TransitionFade docs and clean up other transitions (#1459)
* TransitionFade docs

* PR suggestions

* Fix

* Fill

* Other transitions + enums

* Prefix transition assests with trans

* Fix end_title

* format

* OutNames

* nitpicks PR

* cleaner
2022-12-24 03:46:56 +01:00
fig02
1c6878b070
Name Message_StartOcarina and related things (#1473)
* name functions and msg ctx var

* start ocarina

* clarifying comments

* typo
2022-12-20 23:03:41 +01:00
engineer124
be22b836f6
Name Actor_PlaySfx and Player_PlaySfx (#1469)
* name two main actor sfx functions

* adjust comments

* fix double s in player

* fix commas
2022-12-18 23:18:21 -05:00
engineer124
934d488420
z_play: Camera Docs and Cleanup (#1460)
* begin docs

* More suggestions

* more docs

* timer to duration

* partial PR review

* init data with player

* consistent comments

* withPlayer to usingPlayer
2022-12-17 16:07:31 -05:00