diff options
| author | Dragorn421 <Dragorn421@users.noreply.github.com> | 2023-08-15 18:21:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-15 12:21:19 -0400 |
| commit | ccae1f73879e25c1a771542272e6d18442478106 (patch) | |
| tree | ff98598cc57a7dfe44a7d824d65ac5c0ee3165e3 /src/code | |
| parent | b8aa2a251e38c4ca31d2e0ab5042a8ea84fd4be5 (diff) | |
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
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/flg_set.c | 5 | ||||
| -rw-r--r-- | src/code/speed_meter.c | 7 | ||||
| -rw-r--r-- | src/code/ucode_disas.c | 29 |
3 files changed, 41 insertions, 0 deletions
diff --git a/src/code/flg_set.c b/src/code/flg_set.c index 5a4ab25fe..04167c2ec 100644 --- a/src/code/flg_set.c +++ b/src/code/flg_set.c @@ -1,5 +1,10 @@ #include "global.h" +typedef struct { + /* 0x00 */ u16* value; + /* 0x04 */ const char* name; +} FlagSetEntry; // size = 0x08 + void FlagSet_Update(PlayState* play) { static s32 entryIdx = 0; static u32 curBit = 0; diff --git a/src/code/speed_meter.c b/src/code/speed_meter.c index 5d38d65bf..dc1bc0596 100644 --- a/src/code/speed_meter.c +++ b/src/code/speed_meter.c @@ -56,6 +56,13 @@ volatile OSTime D_8016A578; // Accumulator for `gRDPTimeTotal` volatile OSTime gRDPTimeAcc; +typedef struct { + /* 0x00 */ volatile OSTime* time; + /* 0x04 */ u8 x; + /* 0x05 */ u8 y; + /* 0x06 */ u16 color; +} SpeedMeterTimeEntry; // size = 0x08 + SpeedMeterTimeEntry* sSpeedMeterTimeEntryPtr; SpeedMeterTimeEntry sSpeedMeterTimeEntryArray[] = { diff --git a/src/code/ucode_disas.c b/src/code/ucode_disas.c index bd3e8662a..10bffd767 100644 --- a/src/code/ucode_disas.c +++ b/src/code/ucode_disas.c @@ -1,5 +1,34 @@ #include "global.h" +typedef struct { + /* 0x00 */ u32 value; + /* 0x04 */ const char* name; +} F3dzexConst; // size = 0x8 + +typedef struct { + /* 0x00 */ u32 value; + /* 0x04 */ const char* setName; + /* 0x08 */ const char* unsetName; +} F3dzexFlag; // size = 0x0C + +typedef struct { + /* 0x00 */ const char* name; + /* 0x04 */ u32 value; + /* 0x08 */ u32 mask; +} F3dzexRenderMode; // size = 0x0C + +typedef struct { + /* 0x00 */ const char* name; + /* 0x04 */ u32 value; +} F3dzexSetModeMacroValue; // size = 0x8 + +typedef struct { + /* 0x00 */ const char* name; + /* 0x04 */ u32 shift; + /* 0x08 */ u32 len; + /* 0x0C */ F3dzexSetModeMacroValue values[4]; +} F3dzexSetModeMacro; // size = 0x2C + typedef void (*UcodeDisasCallback)(UCodeDisas*, u32); #define F3DZEX_CONST(name) \ |
