[ntsc-1.2] Match game.c, z_play.c, z_room.c (#2117)

* Match z_room.c

* Match game.c and z_play.c

* Add undefined syms

* Rewrite condition based on other file matches
This commit is contained in:
cadmic
2024-09-03 22:46:41 -07:00
committed by GitHub
parent 87914c6cc6
commit e7cf2fceac
8 changed files with 174 additions and 25 deletions
+7 -3
View File
@@ -214,7 +214,6 @@ extern struct GraphicsContext* __gfxCtx;
#define ZELDA_ARENA_FREE(size, file, line) ZeldaArena_FreeDebug(size, file, line)
#define LOG_UTILS_CHECK_NULL_POINTER(exp, ptr, file, line) LogUtils_CheckNullPointer(exp, ptr, file, line)
#define LOG_UTILS_CHECK_VALID_POINTER(exp, ptr, file, line) LogUtils_CheckValidPointer(exp, ptr, file, line)
#define HUNGUP_AND_CRASH(file, line) Fault_AddHungupAndCrash(file, line)
#define GAME_ALLOC_MALLOC(alloc, size, file, line) GameAlloc_MallocDebug(alloc, size, file, line)
#else
@@ -247,10 +246,15 @@ extern struct GraphicsContext* __gfxCtx;
#define ZELDA_ARENA_FREE(size, file, line) ZeldaArena_Free(size)
#define LOG_UTILS_CHECK_NULL_POINTER(exp, ptr, file, line) (void)0
#define LOG_UTILS_CHECK_VALID_POINTER(exp, ptr, file, line) (void)0
#define HUNGUP_AND_CRASH(file, line) LogUtils_HungupThread(file, line)
#define GAME_ALLOC_MALLOC(alloc, size, file, line) GameAlloc_Malloc(alloc, size)
#endif /* OOT_DEBUG */
#endif
#if PLATFORM_N64 || OOT_DEBUG
#define HUNGUP_AND_CRASH(file, line) Fault_AddHungupAndCrash(file, line)
#else
#define HUNGUP_AND_CRASH(file, line) LogUtils_HungupThread(file, line)
#endif
#if OOT_NTSC
#define LANGUAGE_ARRAY(jpn, eng, ger, fra) { jpn, eng }
+23 -9
View File
@@ -2,12 +2,16 @@
#define N64DD_H
#include "ultra64.h"
#include "z64dma.h"
#include "z64pause.h"
#include "z64scene.h"
struct GameState;
union Gfx;
struct PlayState;
struct PauseMapMarksData;
struct RegEditor;
struct RoomContext;
struct SaveContext;
struct Scene;
// TODO Use the specific pointer types instead of void*
typedef struct n64ddStruct_800FF4B0_pointers {
@@ -20,21 +24,27 @@ typedef struct n64ddStruct_800FF4B0_pointers {
} n64ddStruct_800FF4B0_pointers; // size = 0xB0
struct n64ddStruct_80121AF0;
struct PlayState;
typedef struct n64ddStruct_80121AF0 {
void (*unk_00)(n64ddStruct_800FF4B0_pointers*, struct n64ddStruct_80121AF0*);
void (*unk_04)(void);
char unk_08[0x2C];
void (*unk_34)(PauseMapMarksData**);
void (*unk_38)(PauseMapMarksData**);
void (*unk_08)(struct PlayState* play, struct RoomContext* roomCtx, s32 roomNum);
void (*unk_0C)(struct PlayState* play);
void (*unk_10)(struct PlayState* play);
void (*unk_14)(struct PlayState* play);
char unk_18[0x1C];
void (*unk_34)(struct PauseMapMarksData**);
void (*unk_38)(struct PauseMapMarksData**);
void (*unk_3C)(void);
void (*unk_40)(void);
s32 (*unk_44)(struct PlayState*);
char unk_48[0x24];
struct SceneTableEntry* (*unk_48)(s32 sceneId, struct SceneTableEntry* sceneTable);
char unk_4C[0x08];
s32 (*unk_54)(struct PlayState*);
char unk_58[0x14];
void (*unk_6C)(struct PlayState*, SceneDrawConfigFunc*);
s32 (*unk_70)(DmaRequest* req, void* ram, uintptr_t vrom, size_t size, u32 unk, OSMesgQueue* queue, OSMesg msg);
char unk_74[4];
s32 (*unk_70)(struct DmaRequest* req, void* ram, uintptr_t vrom, size_t size, u32 unk, OSMesgQueue* queue, OSMesg msg);
void (*unk_74)(struct GameState*);
s32 (*unk_78)(struct PlayState*, void*, void*);
} n64ddStruct_80121AF0; // size = ?
@@ -46,6 +56,10 @@ n64ddStruct_800FF4B0_pointers* func_800ADBD0(void);
void func_800ADC00(void);
void func_800ADC08(s32 arg0, s32 arg1, s32 arg2);
void func_801C8510_unknown(void* dest, s32 offset, s32 size);
void func_801C86F0_unknown(void);
void func_801C7760_unknown(union Gfx** gfx);
extern n64ddStruct_800FF4B0_pointers D_800FF4B0;
extern n64ddStruct_80121AF0* B_80121AF0;