diff options
| author | Derek Hensley <hensley.derek58@gmail.com> | 2023-10-02 21:52:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-03 15:52:41 +1100 |
| commit | 4ca54d704eb84b6d9f4142d4445ac1e400e14fd4 (patch) | |
| tree | d127b15832f31c285269dbfe5c122670ccb51067 /include | |
| parent | 2a485ad774d10ce5225dc8e119c0879108c78740 (diff) | |
Speedmeter OK (#1393)
* Match
* data + bss
* x
* Small cleanup
* maxVal
* gUnkTimeAcc
* SET_FULLSCREEN_VIEWPORT_HIRES
* Update permuter settings
* SET_FULLSCREEN_VIEWPORT_DYNAMIC
Diffstat (limited to 'include')
| -rw-r--r-- | include/functions.h | 4 | ||||
| -rw-r--r-- | include/variables.h | 16 | ||||
| -rw-r--r-- | include/z64game.h | 2 | ||||
| -rw-r--r-- | include/z64speed_meter.h | 16 | ||||
| -rw-r--r-- | include/z64view.h | 11 |
5 files changed, 29 insertions, 20 deletions
diff --git a/include/functions.h b/include/functions.h index 849329d94..47bc7fe3d 100644 --- a/include/functions.h +++ b/include/functions.h @@ -667,10 +667,10 @@ void* ZeldaArena_Realloc(void* ptr, size_t newSize); void ZeldaArena_Free(void* ptr); void* ZeldaArena_Calloc(u32 num, size_t size); void ZeldaArena_GetSizes(size_t* outMaxFree, size_t* outFree, size_t* outAlloc); -s32 ZeldaArena_Check(); +s32 ZeldaArena_Check(void); void ZeldaArena_Init(void* start, size_t size); void ZeldaArena_Cleanup(void); -u8 ZeldaArena_IsInitialized(); +u8 ZeldaArena_IsInitialized(void); // void func_80102E40(void); // void func_80102E90(void); // void func_80102EA4(void); diff --git a/include/variables.h b/include/variables.h index 83427f55f..2d64bd2b0 100644 --- a/include/variables.h +++ b/include/variables.h @@ -14,7 +14,7 @@ extern OSPiHandle* gCartHandle; extern size_t gDmaMgrDmaBuffSize; extern vs32 gIrqMgrResetStatus; extern volatile OSTime sIrqMgrResetTime; -extern volatile OSTime sIrqMgrRetraceTime; +extern volatile OSTime gIrqMgrRetraceTime; extern s32 sIrqMgrRetraceCount; // extern UNK_TYPE1 sGfxPrintFontTLUT; @@ -366,7 +366,6 @@ extern Input* D_801D0D60; extern u32 retryCount; extern u32 cfbIdx[3]; -extern UNK_PTR D_801D1540; extern Vec3f gZeroVec3f; extern Vec3s gZeroVec3s; @@ -1903,19 +1902,6 @@ extern GfxMasterList* gGfxMasterDL; extern u64* gAudioSPDataPtr; extern u32 gAudioSPDataSize; -extern volatile OSTime D_801FBAE0; -extern volatile OSTime D_801FBAE8; -extern volatile OSTime gRDPTimeTotal; -extern volatile OSTime lastRenderFrameDuration; -extern volatile OSTime gRSPAudioTotalTime; -extern volatile OSTime sRSPGFXTotalTime; -extern volatile OSTime sRSPOtherTotalTime; -// extern UNK_TYPE1 D_801FBB18; - -// Accumulator for `gRDPTimeTotal` -extern volatile OSTime gRDPTimeAcc; -// extern UNK_TYPE1 D_801FBB28; - extern Vec3f D_801FBBF0; extern LineSegment Math3D_ColSphereTri_line; extern Vec3f Math3D_ColSphereTri_point; diff --git a/include/z64game.h b/include/z64game.h index 8b63b701f..50dd68473 100644 --- a/include/z64game.h +++ b/include/z64game.h @@ -61,7 +61,7 @@ typedef struct GameState { /* 0x0C */ GameStateFunc init; // Usually the current game state's init, though after stopping, the graph thread will look here to determine the next game state to load. /* 0x10 */ size_t size; /* 0x14 */ Input input[MAXCONTROLLERS]; - /* 0x74 */ TwoHeadArena heap; + /* 0x74 */ TwoHeadArena tha; /* 0x84 */ GameAlloc alloc; /* 0x98 */ UNK_TYPE1 pad98[0x3]; /* 0x9B */ u8 running; // If 0, switch to next game state diff --git a/include/z64speed_meter.h b/include/z64speed_meter.h index fbd815248..44b47ed1e 100644 --- a/include/z64speed_meter.h +++ b/include/z64speed_meter.h @@ -7,12 +7,24 @@ struct GameState; struct GraphicsContext; typedef struct SpeedMeter { - /* 0x00 */ char unk_00[0x20]; + /* 0x00 */ char unk_00[0x18]; + /* 0x18 */ s32 x; // Unused + /* 0x1C */ s32 y; } SpeedMeter; // size = 0x20 void SpeedMeter_Init(SpeedMeter* this); void SpeedMeter_Destroy(SpeedMeter* this); void SpeedMeter_DrawTimeEntries(SpeedMeter* this, struct GraphicsContext* gfxCtx); -void SpeedMeter_DrawAllocEntries(SpeedMeter* this, struct GraphicsContext* gfxCtx, struct GameState* gameState); +void SpeedMeter_DrawAllocEntries(SpeedMeter* this, struct GraphicsContext* gfxCtx, struct GameState* state); + +extern volatile OSTime gRSPAudioTimeTotal; +extern volatile OSTime gRSPGfxTimeTotal; +extern volatile OSTime gRDPTimeTotal; +extern volatile OSTime gGraphUpdatePeriod; +extern volatile OSTime gRSPAudioTimeAcc; +extern volatile OSTime gRSPGfxTimeAcc; +extern volatile OSTime gRSPOtherTimeAcc; +extern volatile OSTime gUnkTimeAcc; +extern volatile OSTime gRDPTimeAcc; #endif diff --git a/include/z64view.h b/include/z64view.h index f0661d947..19bb4492c 100644 --- a/include/z64view.h +++ b/include/z64view.h @@ -65,6 +65,17 @@ typedef struct View { } \ (void)0 +#define SET_FULLSCREEN_VIEWPORT_DYNAMIC(view) \ +{ \ + Viewport viewport; \ + viewport.bottomY = gScreenHeight; \ + viewport.rightX = gScreenWidth; \ + viewport.topY = 0; \ + viewport.leftX = 0; \ + View_SetViewport(view, &viewport); \ +} \ +(void)0 + void View_Init(View* view, struct GraphicsContext* gfxCtx); void View_LookAt(View* view, Vec3f* eye, Vec3f* at, Vec3f* up); void View_SetScale(View* view, f32 scale); |
