mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-25 01:34:18 +00:00
[headers 12] Add kaleido_manager.h, move various protos to headers (#2174)
* [headers 12] add kaleido_manager.h, move various protos to headers * BSS * bss
This commit is contained in:
parent
5441559b30
commit
cbf9eacf42
12 changed files with 66 additions and 50 deletions
|
@ -682,9 +682,6 @@ void func_8006D684(PlayState* play, Player* player);
|
|||
void func_8006DC68(PlayState* play, Player* player);
|
||||
void func_8006DD9C(Actor* actor, Vec3f* arg1, s16 arg2);
|
||||
|
||||
void KaleidoSetup_Update(PlayState* play);
|
||||
void KaleidoSetup_Init(PlayState* play);
|
||||
void KaleidoSetup_Destroy(PlayState* play);
|
||||
s32 Kanji_OffsetFromShiftJIS(s32 character);
|
||||
void Font_LoadCharWide(Font* font, u16 character, u16 codePointIndex);
|
||||
void Font_LoadChar(Font* font, u8 character, u16 codePointIndex);
|
||||
|
@ -1052,16 +1049,6 @@ void DebugCamera_Update(DebugCam* debugCam, Camera* cam);
|
|||
void DebugCamera_Reset(Camera* cam, DebugCam* debugCam);
|
||||
void func_800BB0A0(f32 u, Vec3f* pos, f32* roll, f32* viewAngle, f32* point0, f32* point1, f32* point2, f32* point3);
|
||||
s32 func_800BB2B4(Vec3f* pos, f32* roll, f32* fov, CutsceneCameraPoint* point, s16* keyFrame, f32* curFrame);
|
||||
void KaleidoManager_LoadOvl(KaleidoMgrOverlay* ovl);
|
||||
void KaleidoManager_ClearOvl(KaleidoMgrOverlay* ovl);
|
||||
void KaleidoManager_Init(PlayState* play);
|
||||
void KaleidoManager_Destroy(void);
|
||||
void* KaleidoManager_GetRamAddr(void* vram);
|
||||
void KaleidoScopeCall_LoadPlayer(void);
|
||||
void KaleidoScopeCall_Init(PlayState* play);
|
||||
void KaleidoScopeCall_Destroy(PlayState* play);
|
||||
void KaleidoScopeCall_Update(PlayState* play);
|
||||
void KaleidoScopeCall_Draw(PlayState* play);
|
||||
|
||||
s32 func_800C0D34(PlayState* this, Actor* actor, s16* yaw);
|
||||
s32 func_800C0DB4(PlayState* this, Vec3f* pos);
|
||||
|
@ -1349,15 +1336,6 @@ void Audio_InitSound(void);
|
|||
void func_800F7170(void);
|
||||
void func_800F71BC(s32 arg0);
|
||||
|
||||
void GfxPrint_SetColor(GfxPrint* this, u32 r, u32 g, u32 b, u32 a);
|
||||
void GfxPrint_SetPosPx(GfxPrint* this, s32 x, s32 y);
|
||||
void GfxPrint_SetPos(GfxPrint* this, s32 x, s32 y);
|
||||
void GfxPrint_SetBasePosPx(GfxPrint* this, s32 x, s32 y);
|
||||
void GfxPrint_Init(GfxPrint* this);
|
||||
void GfxPrint_Destroy(GfxPrint* this);
|
||||
void GfxPrint_Open(GfxPrint* this, Gfx* dList);
|
||||
Gfx* GfxPrint_Close(GfxPrint* this);
|
||||
s32 GfxPrint_Printf(GfxPrint* this, const char* fmt, ...);
|
||||
void RcpUtils_PrintRegisterStatus(void);
|
||||
void RcpUtils_Reset(void);
|
||||
void* Overlay_AllocateAndLoad(uintptr_t vromStart, uintptr_t vromEnd, void* vramStart, void* vramEnd);
|
||||
|
@ -1514,11 +1492,7 @@ void guMtxF2L(f32 mf[4][4], Mtx* m);
|
|||
void* osViGetCurrentFramebuffer(void);
|
||||
s32 __osSpSetPc(void* pc);
|
||||
f32 absf(f32);
|
||||
void* memset(void* dest, int val, size_t len);
|
||||
void* memmove(void* dest, const void* src, size_t len);
|
||||
|
||||
void Interface_Destroy(PlayState* play);
|
||||
void Interface_Init(PlayState* play);
|
||||
void Regs_InitData(PlayState* play);
|
||||
|
||||
void Setup_Init(GameState* thisx);
|
||||
|
|
|
@ -39,4 +39,14 @@ typedef struct GfxPrint {
|
|||
#endif
|
||||
#define GFXP_FLAG_OPEN (1 << 7)
|
||||
|
||||
void GfxPrint_SetColor(GfxPrint* this, u32 r, u32 g, u32 b, u32 a);
|
||||
void GfxPrint_SetPosPx(GfxPrint* this, s32 x, s32 y);
|
||||
void GfxPrint_SetPos(GfxPrint* this, s32 x, s32 y);
|
||||
void GfxPrint_SetBasePosPx(GfxPrint* this, s32 x, s32 y);
|
||||
void GfxPrint_Init(GfxPrint* this);
|
||||
void GfxPrint_Destroy(GfxPrint* this);
|
||||
void GfxPrint_Open(GfxPrint* this, Gfx* dList);
|
||||
Gfx* GfxPrint_Close(GfxPrint* this);
|
||||
s32 GfxPrint_Printf(GfxPrint* this, const char* fmt, ...);
|
||||
|
||||
#endif
|
||||
|
|
39
include/kaleido_manager.h
Normal file
39
include/kaleido_manager.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
#ifndef KALEIDO_MANAGER_H
|
||||
#define KALEIDO_MANAGER_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "romfile.h"
|
||||
|
||||
struct PlayState;
|
||||
|
||||
typedef struct KaleidoMgrOverlay {
|
||||
/* 0x00 */ void* loadedRamAddr;
|
||||
/* 0x04 */ RomFile file;
|
||||
/* 0x0C */ void* vramStart;
|
||||
/* 0x10 */ void* vramEnd;
|
||||
/* 0x14 */ u32 offset; // loadedRamAddr - vramStart
|
||||
/* 0x18 */ const char* name;
|
||||
} KaleidoMgrOverlay; // size = 0x1C
|
||||
|
||||
typedef enum KaleidoOverlayType {
|
||||
/* 0 */ KALEIDO_OVL_KALEIDO_SCOPE,
|
||||
/* 1 */ KALEIDO_OVL_PLAYER_ACTOR,
|
||||
/* 2 */ KALEIDO_OVL_MAX
|
||||
} KaleidoOverlayType;
|
||||
|
||||
void KaleidoManager_LoadOvl(KaleidoMgrOverlay* ovl);
|
||||
void KaleidoManager_ClearOvl(KaleidoMgrOverlay* ovl);
|
||||
void KaleidoManager_Init(struct PlayState* play);
|
||||
void KaleidoManager_Destroy(void);
|
||||
void* KaleidoManager_GetRamAddr(void* vram);
|
||||
|
||||
extern KaleidoMgrOverlay gKaleidoMgrOverlayTable[KALEIDO_OVL_MAX];
|
||||
extern KaleidoMgrOverlay* gKaleidoMgrCurOvl;
|
||||
|
||||
void KaleidoScopeCall_LoadPlayer(void);
|
||||
void KaleidoScopeCall_Init(struct PlayState* play);
|
||||
void KaleidoScopeCall_Destroy(struct PlayState* play);
|
||||
void KaleidoScopeCall_Update(struct PlayState* play);
|
||||
void KaleidoScopeCall_Draw(struct PlayState* play);
|
||||
|
||||
#endif
|
|
@ -7,5 +7,7 @@ char* strchr(const char*, int);
|
|||
size_t strlen(const char*);
|
||||
|
||||
void* memcpy(void*, const void*, size_t);
|
||||
void* memmove(void* dest, const void* src, size_t len);
|
||||
void* memset(void* dest, int val, size_t len);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -94,8 +94,6 @@ extern u16 gSramSlotOffsets[];
|
|||
// 4 16-colors palettes
|
||||
extern u64 gMojiFontTLUTs[4][4]; // original name: "moji_tlut"
|
||||
extern u64 gMojiFontTex[]; // original name: "font_ff"
|
||||
extern KaleidoMgrOverlay gKaleidoMgrOverlayTable[KALEIDO_OVL_MAX];
|
||||
extern KaleidoMgrOverlay* gKaleidoMgrCurOvl;
|
||||
extern u8 gBossMarkState;
|
||||
|
||||
#if OOT_DEBUG
|
||||
|
|
|
@ -71,6 +71,7 @@
|
|||
#include "main.h"
|
||||
#include "segmented_address.h"
|
||||
#include "stackcheck.h"
|
||||
#include "kaleido_manager.h"
|
||||
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
|
@ -102,21 +103,6 @@
|
|||
#define THREAD_ID_DMAMGR 18
|
||||
#define THREAD_ID_IRQMGR 19
|
||||
|
||||
typedef struct KaleidoMgrOverlay {
|
||||
/* 0x00 */ void* loadedRamAddr;
|
||||
/* 0x04 */ RomFile file;
|
||||
/* 0x0C */ void* vramStart;
|
||||
/* 0x10 */ void* vramEnd;
|
||||
/* 0x14 */ u32 offset; // loadedRamAddr - vramStart
|
||||
/* 0x18 */ const char* name;
|
||||
} KaleidoMgrOverlay; // size = 0x1C
|
||||
|
||||
typedef enum KaleidoOverlayType {
|
||||
/* 0 */ KALEIDO_OVL_KALEIDO_SCOPE,
|
||||
/* 1 */ KALEIDO_OVL_PLAYER_ACTOR,
|
||||
/* 2 */ KALEIDO_OVL_MAX
|
||||
} KaleidoOverlayType;
|
||||
|
||||
typedef enum LensMode {
|
||||
/* 0 */ LENS_MODE_SHOW_ACTORS, // lens actors are invisible by default, and shown by using lens (for example, invisible enemies)
|
||||
/* 1 */ LENS_MODE_HIDE_ACTORS // lens actors are visible by default, and hidden by using lens (for example, fake walls)
|
||||
|
|
|
@ -275,5 +275,7 @@ void Interface_SetSubTimerToFinalSecond(struct PlayState* play);
|
|||
void Interface_SetTimer(s16 seconds);
|
||||
void Interface_Draw(struct PlayState* play);
|
||||
void Interface_Update(struct PlayState* play);
|
||||
void Interface_Destroy(struct PlayState* play);
|
||||
void Interface_Init(struct PlayState* play);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "z64view.h"
|
||||
|
||||
struct OcarinaStaff;
|
||||
struct PlayState;
|
||||
|
||||
#define PAUSE_ITEM_NONE 999
|
||||
|
||||
|
@ -229,4 +230,8 @@ typedef struct PauseMapMarkData {
|
|||
|
||||
typedef PauseMapMarkData PauseMapMarksData[3];
|
||||
|
||||
void KaleidoSetup_Update(struct PlayState* play);
|
||||
void KaleidoSetup_Init(struct PlayState* play);
|
||||
void KaleidoSetup_Destroy(struct PlayState* play);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -212,7 +212,7 @@ s16 sLightningFlashAlpha;
|
|||
s16 sSunDepthTestX;
|
||||
s16 sSunDepthTestY;
|
||||
|
||||
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:96 gc-jp-ce:96 gc-jp-mq:96 gc-us:96 gc-us-mq:96"
|
||||
#pragma increment_block_number "gc-eu:112 gc-eu-mq:112 gc-jp:96 gc-jp-ce:96 gc-jp-mq:96 gc-us:96 gc-us-mq:96"
|
||||
|
||||
LightNode* sNGameOverLightNode;
|
||||
LightInfo sNGameOverLightInfo;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "global.h"
|
||||
#include "string.h"
|
||||
|
||||
/**
|
||||
* memmove: copies `len` bytes from memory starting at `src` to memory starting at `dest`.
|
||||
|
@ -12,8 +12,8 @@
|
|||
* @return dest
|
||||
*/
|
||||
void* memmove(void* dest, const void* src, size_t len) {
|
||||
u8* d = dest;
|
||||
const u8* s = src;
|
||||
char* d = dest;
|
||||
const char* s = src;
|
||||
|
||||
if (d == s) {
|
||||
return dest;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "global.h"
|
||||
#include "string.h"
|
||||
|
||||
/**
|
||||
* memset: sets `len` bytes to `val` starting at address `dest`.
|
||||
|
@ -12,7 +12,7 @@
|
|||
* @return dest
|
||||
*/
|
||||
void* memset(void* dest, int val, size_t len) {
|
||||
u8* ptr = dest;
|
||||
char* ptr = dest;
|
||||
|
||||
while (len--) {
|
||||
*ptr++ = val;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include "cic6105.h"
|
||||
#endif
|
||||
|
||||
#pragma increment_block_number "gc-eu:140 gc-eu-mq:140 gc-jp:142 gc-jp-ce:142 gc-jp-mq:142 gc-us:142 gc-us-mq:142"
|
||||
#pragma increment_block_number "gc-eu:139 gc-eu-mq:139 gc-jp:141 gc-jp-ce:141 gc-jp-mq:141 gc-us:141 gc-us-mq:141"
|
||||
|
||||
#define FLAGS ACTOR_FLAG_4
|
||||
|
||||
|
|
Loading…
Reference in a new issue