1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-04 23:14:37 +00:00

merge and change scene thing

This commit is contained in:
fig02 2020-03-20 08:17:48 -04:00
commit aa603ca229
113 changed files with 1722 additions and 5879 deletions

7
include/alloca.h Normal file
View file

@ -0,0 +1,7 @@
#ifndef _ALLOCA_H_
#define _ALLOCA_H_
void* alloca(unsigned int);
#define alloca __builtin_alloca
#endif

View file

@ -638,6 +638,7 @@ f32 func_800437F0(f32, f32);
// ? func_8005A7A8(?);
// ? func_8005A8C4(?);
s16 func_8005A970(u32 gl790);
s16 func_8005A9F4(Camera* camera);
// ? func_8005AA90(?);
// ? func_8005AC48(?);
// ? func_8005AC60(?);
@ -759,7 +760,7 @@ void func_80062D60(GlobalContext*, Vec3f*);
s32 func_80062ECC(f32, f32, f32, Vec3f*, Vec3f*, Vec3f*, Vec3f*, Vec3f*);
void SaveContext_Init(void);
// ? func_800636C0(?);
void func_8006375C(UNK_TYPE, UNK_TYPE, UNK_TYPE);
void func_8006375C(s32 arg0, s32 arg1, float* d_80855320);
// ? func_8006376C(?);
// ? func_80063828(?);
// ? func_8006390C(?);
@ -789,6 +790,7 @@ void Audio_PlaySoundAtPosition(GlobalContext* globalCtx, Vec3f* pos2, s32 radius
// ? func_8006C3A0(?);
// ? func_8006C3D0(?);
void func_8006C438(GlobalContext* globalCtx, s16 arg1);
s32 func_8006C4A4(GlobalContext*, s32);
// ? func_8006C510(?);
// ? func_8006C5A8(?);
// ? func_8006CBAC(?);
@ -845,7 +847,7 @@ void func_800775D8();
s32 func_800775E4();
void func_800775F0(u16);
// ? func_80077600(?);
void Lib_MemSet(void* dest, size_t size, u8 val);
void Lib_MemSet(u8* dest, size_t size, u8 val);
f32 Math_Coss(s16 angle);
f32 Math_Sins(s16 angle);
s32 Math_ApproxUpdateScaledS(s16* fp, s16 target, s16 step);
@ -1377,7 +1379,7 @@ void func_800C0704(GlobalContext*, s16, f32);
void func_800C0C88(GlobalContext *globalCtx);
// ? func_800C0A44(?);
// ? func_800C0A88(?);
// ? func_800C0AF4(?);
void func_800C0AF4(GlobalContext*, s8, s16);
void func_800C0B60(GlobalContext* globalCtx);
void func_800C0BB4(GlobalContext* globalCtx);
// ? func_800C0CB8(?);
@ -1474,7 +1476,7 @@ void* Graph_Alloc(GraphicsContext* gfxCtx, size_t size);
void func_800C6AC4(Gfx** a0, GraphicsContext* gfxCtx, char* file, s32 line);
void func_800C6B54(Gfx** a0, GraphicsContext* gfxCtx, char* file, s32 line);
Gfx* func_800C6C20(Gfx* a0);
// ? func_800C6C28(?);
Gfx* func_800C6C28(Gfx* a0, Gfx* dlist); //branch dlist
// ? func_800C6C3C(?);
ListAlloc* ListAlloc_Init(ListAlloc* this);
void* ListAlloc_Alloc(ListAlloc* this, u32 size);
@ -1680,7 +1682,7 @@ u32 Fault_ConvertAddress(FaultAddrConvClient*);
void Fault_Sleep(u32);
void Fault_PadCallback(Input*);
void Fault_UpdatePadImpl();
bool Fault_WaitForInputImpl();
u32 Fault_WaitForInputImpl();
void Fault_WaitForInput();
void Fault_DrawRec(s32, s32, s32, s32, u16);
void Fault_FillScreenBlack();
@ -2134,7 +2136,7 @@ void GfxPrint_SetPosPx(GfxPrint*, s32, s32);
void GfxPrint_SetPos(GfxPrint*, s32, s32);
void GfxPrint_SetBasePosPx(GfxPrint*, s32, s32);
void GfxPrint_PrintCharImpl(GfxPrint*, u8);
void GfxPrint_PrintChar(GfxPrint*, char);
void GfxPrint_PrintChar(GfxPrint*, u8);
void GfxPrint_PrintStringWithSize(GfxPrint*, const void*, size_t, size_t);
GfxPrint* GfxPrint_Callback(GfxPrint*, const char*, size_t);
void GfxPrint_Ctor(GfxPrint*);
@ -2384,5 +2386,7 @@ void func_801109B0(GlobalContext* globalCtx);
void func_80110F68(GlobalContext* globalCtx);
void func_80112098(GlobalContext* globalCtx);
void func_80800878(TitleContext*);
void Title_Init(TitleContext*);
void Opening_Init(OpeningContext* this);
#endif

View file

@ -1,7 +1,12 @@
#ifndef _REGS_H_
#define _REGS_H_
#define BASE_REG(n, r) gGameInfo->data[n * 96 + r]
#define REG_GROUPS 29 //number of REG groups, i.e. REG, SREG, OREG, etc.
#define REG_PAGES 6
#define REG_PER_PAGE 16
#define REG_PER_GROUP REG_PAGES * REG_PER_PAGE
#define BASE_REG(n, r) gGameInfo->data[n * REG_PER_GROUP + r]
#define REG(r) BASE_REG(0, r)
#define SREG(r) BASE_REG(1, r)

View file

@ -921,6 +921,7 @@ DECLARE_ROM_SEGMENT(g_pn_55)
DECLARE_ROM_SEGMENT(g_pn_56)
DECLARE_ROM_SEGMENT(g_pn_57)
DECLARE_ROM_SEGMENT(nintendo_rogo_static)
DECLARE_ROM_SEGMENT(title_static)
DECLARE_ROM_SEGMENT(parameter_static)
DECLARE_ROM_SEGMENT(vr_cloud2_static)

View file

@ -259,8 +259,8 @@ extern s32 D_8011D3AC;
//extern ? D_8011E096;
//extern ? D_8011E098;
//extern ? D_8011E09A;
//extern ? D_8011E0B0;
//extern ? D_8011E0B4;
extern s16 D_8011E0B0;
extern Color_RGBA8 D_8011E0B4[];
//extern ? D_8011E0D4;
//extern ? D_8011F3A0;
//extern ? D_8011F3D4;
@ -692,14 +692,12 @@ extern void* D_8012D1F0;
extern u32 gScreenWidth;
extern u32 gScreenHeight;
extern u32 gSystemHeapSize;
extern s32 D_8012D280;
extern u32 D_8012D284;
extern volatile u32 D_8012D290;
//extern ? D_8012D2A0;
extern Mtx gMtxClear;
extern MtxF gMtxFClear;
//extern ? D_8012DBB0;
//extern ? D_8012DBC0;
extern u32 D_8012DBC0;
extern volatile u32 gIrqMgrResetStatus;
extern u32 D_8012DBA0;
extern u32 D_8012DBA4;
@ -1357,11 +1355,6 @@ extern f32 D_80136D44;
//extern ? D_8013AC7C;
//extern ? D_8013ACA0;
//extern ? D_8013ACB8;
//extern ? D_8013AD40;
//extern ? D_8013AD50;
//extern ? D_8013AD54;
//extern ? D_8013AD60;
//extern ? D_8013AD70;
//extern ? D_8013B830;
//extern ? D_8013B844;
//extern ? D_8013B858;
@ -2661,77 +2654,6 @@ extern char D_80141030[];
//extern ? D_8014575C;
//extern ? D_80145780;
//extern ? D_80145794;
extern char D_801457B0[];
extern char D_801457F0[];
extern char D_8014582C[];
extern char D_80145860[];
extern char D_80145894[];
extern char D_8014589C[];
extern char D_801458B0[];
extern char D_801458CC[];
extern char D_801458D0[];
extern char D_801458D8[];
extern char D_801458EC[];
extern char D_80145914[];
extern char D_80145918[];
extern char D_80145920[];
extern char D_80145934[];
extern char D_80145944[];
extern char D_80145948[];
extern char D_80145950[];
extern char D_80145964[];
extern char D_8014598C[];
extern char D_80145990[];
extern char D_80145998[];
extern char D_801459AC[];
extern char D_801459CC[];
extern char D_801459D0[];
extern char D_801459D8[];
extern char D_801459EC[];
extern char D_80145A24[];
extern char D_80145A28[];
extern char D_80145A30[];
extern char D_80145A44[];
extern char D_80145A60[];
extern char D_80145A64[];
extern char D_80145A70[];
extern char D_80145A80[];
extern char D_80145A88[];
extern char D_80145A9C[];
extern char D_80145ABC[];
extern char D_80145AC0[];
extern char D_80145AC8[];
extern char D_80145ADC[];
extern char D_80145AEC[];
//extern ? D_80145AF0;
//extern ? D_80145AF8;
//extern ? D_80145B0C;
//extern ? D_80145B1C;
//extern ? D_80145B20;
//extern ? D_80145B2C;
//extern ? D_80145B48;
//extern ? D_80145B50;
//extern ? D_80145B64;
//extern ? D_80145B80;
//extern ? D_80145B84;
//extern ? D_80145B8C;
//extern ? D_80145BA0;
//extern ? D_80145BB0;
//extern ? D_80145BB4;
//extern ? D_80145BC0;
//extern ? D_80145BD8;
//extern ? D_80145BE4;
//extern ? D_80145BF0;
//extern ? D_80145C10;
extern char D_80145C40[];
extern char D_80145C58[];
extern char D_80145C78[];
extern char D_80145CA0[];
extern char D_80145CA4[];
extern char D_80145CB0[];
extern char D_80145CD4[];
extern char D_80145CF8[];
extern char D_80145D18[];
//extern ? D_80145D40;
//extern ? D_80145D54;
//extern ? D_80145D60;
@ -3657,7 +3579,6 @@ extern u8* gAppNmiBufferPtr;
extern u8 D_80166B68;
//extern ? D_80166D28;
extern u32 gSegments[];
extern u32 D_8016A4F0;
//extern ? D_8016A500;
//extern ? D_8016A504;
//extern ? D_8016A508;

View file

@ -33,8 +33,12 @@
// Data normally accessed through REG macros (see regs.h)
typedef struct
{
/* 0x00 */ char unk_00[0x14];
/* 0x14 */ s16 data[0xAE0];
/* 0x00 */ s32 regPage; //1 is first page
/* 0x04 */ s32 regGroup; //"register" group (R, RS, RO, RP etc.)
/* 0x08 */ s32 regCur; //selected register within page
/* 0x0C */ s32 dpadLast;
/* 0x10 */ s32 repeat;
/* 0x14 */ s16 data[REG_GROUPS * REG_PER_GROUP]; //0xAE0
} GameInfo; // size = 0x15D4
typedef struct
@ -810,6 +814,11 @@ typedef struct
/* 0x04 */ u32 vromEnd;
} RomFile; // size = 0x8
typedef struct
{
/* 0x00 */ void* read_buff;
} Sram; // size = 0x4
typedef struct GameAllocEntry
{
/* 0x00 */ struct GameAllocEntry* next;
@ -842,10 +851,17 @@ typedef struct GameState
typedef struct
{
/* 0x0000 */ GameState state;
/* 0x00A4 */ char unk_A4[0x12C];
/* 0x01D0 */ UNK_TYPE unk_1D0;
/* 0x01D4 */ char unk_1D4[0xD];
/* 0x01E1 */ u8 unk_1E1;
/* 0x00A4 */ void* staticSegment;
/* 0x00A8 */ View view;
/* 0x01D0 */ Sram sram;
/* 0x01D4 */ u16 unk_1D4; // not used in mq dbg (some sort of timer that doesn't seem to affect anything)
/* 0x01D6 */ s16 coverAlpha;
/* 0x01D8 */ s16 addAlpha; // not used in mq dbg
/* 0x01DA */ u16 visibleDuration; // not used in mq dbg
/* 0x01DC */ s16 ult;
/* 0x01DE */ s16 uls;
/* 0x01E0 */ char unk_1E0;
/* 0x01E1 */ u8 exit;
/* 0x01E2 */ char unk_1E2[6];
} TitleContext; // size = 0x1E8
@ -1037,8 +1053,10 @@ typedef struct
/* 0x34 */ s32 unk_34;
/* 0x38 */ s32 unk_38;
/* 0x3C */ u16 unk_3C;
/* 0x3E */ u16 unk_3E; /* Probably Padding */
} SkelAnime; // size = 0x40
/* 0x3E */ u16 unk_3E;
/* 0x40 */ u16 unk_40;
/* 0x42 */ u16 unk_42;
} SkelAnime; // size = 0x44
typedef struct
{
@ -1362,21 +1380,7 @@ typedef struct OverlayRelocationSection {
/* 0x0C */ u32 bssSize;
/* 0x10 */ u32 nRelocations;
/* 0x14 */ u32 relocations[1];
} OverlayRelocationSection; /* size >= 0x18 */
#define VEC3_ADD( V3A0, V3A1 ) \
{ \
V3A0.x += V3A1.x; \
V3A0.y += V3A1.y; \
V3A0.z += V3A1.z; \
}
#define VEC3_SUB( V3DST, V3A0, V3A1 ) \
{ \
V3DST.x = V3A0.x - V3A1.x; \
V3DST.y = V3A0.y - V3A1.y; \
V3DST.z = V3A0.z - V3A1.z; \
}
} OverlayRelocationSection; // size >= 0x18
typedef struct
{

View file

@ -13,6 +13,11 @@ struct GlobalContext;
// From z64light.h
struct LightMapper;
typedef struct
{
f32 x, y;
} Vec2f;
typedef struct
{
f32 x, y, z;
@ -25,13 +30,8 @@ typedef struct
typedef struct
{
f32 x, y;
} Vec2f;
typedef struct
{
u32 x, y;
} Vec2i;
s32 x, y, z;
} Vec3i;
typedef struct
{
@ -329,6 +329,7 @@ typedef struct
/* 0x15A */ u16 unk_15A;
/* 0x15C */ u32 unk_15C;
/* 0x160 */ u8 unk_160;
/* 0x162 */ s16 unk_162;
} DynaPolyActor; // size = 0x164
typedef struct
@ -394,7 +395,9 @@ typedef struct
/* 0x0846 */ u8 unk_846;
/* 0x0847 */ char unk_847[0x004];
/* 0x084B */ s8 unk_84B[UNK_SIZE];
/* 0x084C */ char unk_84C[0x054];
/* 0x084C */ char unk_84C[0x003];
/* 0x084F */ s8 unk_84F;
/* 0x0850 */ char unk_850[0x050];
/* 0x08A0 */ u8 unk_8A0;
/* 0x08A1 */ u8 unk_8A1;
/* 0x08A2 */ u16 unk_8A2;

View file

@ -83,9 +83,9 @@ typedef struct
/* 0x02 */ u16 startFrame;
/* 0x04 */ u16 endFrame;
/* 0x06 */ Vec3s rot;
/* 0x0C */ Vec3f startPos;
/* 0x18 */ Vec3f endPos;
/* 0x24 */ Vec3f normal;
/* 0x0C */ Vec3i startPos;
/* 0x18 */ Vec3i endPos;
/* 0x24 */ Vec3i normal;
} CsCmdActorAction; // size = 0x30
typedef enum

View file

@ -481,7 +481,7 @@ typedef enum
/* 0x32 */ SCENE_NIGHT_SHOP,
/* 0x33 */ SCENE_FACE_SHOP,
/* 0x34 */ SCENE_LINK_HOME,
/* 0x35 */ SCENE_BACK_ALLEY,
/* 0x35 */ SCENE_IMPA,
/* 0x36 */ SCENE_MALON_STABLE,
/* 0x37 */ SCENE_LABO,
/* 0x38 */ SCENE_HYLIA_LABO,