1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-06-07 09:01:49 +00:00

Reduce dependencies on global.h (10) (#2490)

* reduce z64.h size

* fix z_cheap_proc.inc.c

* ,bss

* remove temp delcaration
This commit is contained in:
mzxrules 2025-02-26 17:18:30 -05:00 committed by GitHub
parent 2b30c61a26
commit cf1a39c26f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
116 changed files with 663 additions and 308 deletions

88
include/db_camera.h Normal file
View file

@ -0,0 +1,88 @@
#ifndef DB_CAMERA_H
#define DB_CAMERA_H
#include "ultra64.h"
#include "z64cutscene.h"
#include "z64math.h"
struct Camera;
typedef struct DebugCamSub {
/* 0x0000 */ s16 mode;
/* 0x0002 */ s16 nFrames;
/* 0x0004 */ s16 nPoints;
/* 0x0006 */ s16 unkIdx;
/* 0x0008 */ s16 unk_08;
/* 0x000A */ s16 unk_0A;
/* 0x000C */ s32 unk_0C; // bool: indicates position vs lookAt?
/* 0x0010 */ char unk_10[0x14];
/* 0x0024 */ CutsceneCameraPoint position[129];
/* 0x0834 */ CutsceneCameraPoint lookAt[129];
/* 0x1044 */ s16 demoCtrlMenu;
/* 0x1046 */ s16 demoCtrlActionIdx; // e (?), s (save), l (load), c (clear)
/* 0x1048 */ s16 demoCtrlToggleSwitch;
/* 0x104A */ Vec3s unk_104A;
} DebugCamSub; // size = 0x1050
typedef struct DebugCam {
/* 0x00 */ s32 unk_00;
/* 0x04 */ Vec3f at;
/* 0x10 */ Vec3f eye;
/* 0x1C */ Vec3f unk_1C;
/* 0x28 */ char unk_28[0xC];
/* 0x34 */ s32 unk_34;
/* 0x38 */ s32 unk_38;
/* 0x3C */ s32 unk_3C; // bool
/* 0x40 */ s32 unk_40;
/* 0x44 */ s32 unk_44;
/* 0x48 */ f32 fov;
/* 0x4C */ s16 roll;
/* 0x4E */ char unk_4E[0x2];
/* 0x50 */ f32 rollDegrees;
/* 0x54 */ Vec3f unk_54;
/* 0x60 */ Vec3f unk_60;
/* 0x6C */ Vec3f unk_6C;
/* 0x78 */ s16 unk_78;
/* 0x7A */ s16 unk_7A;
/* 0x7C */ DebugCamSub sub;
} DebugCam; // size = 0x10CC
typedef struct DebugCamCut {
/* 0x00 */ char letter;
/* 0x01 */ u8 unk_01;
/* 0x02 */ s16 mode;
/* 0x04 */ CutsceneCameraPoint* position;
/* 0x08 */ CutsceneCameraPoint* lookAt;
/* 0x0C */ s16 nFrames;
/* 0x0E */ s16 nPoints;
} DebugCamCut; // size = 0x10
typedef struct DebugCamAnim {
/* 0x00 */ f32 curFrame;
/* 0x04 */ f32 unk_04; // frame count?
/* 0x08 */ s16 keyframe;
/* 0x0A */ s16 unk_0A;
/* 0x0C */ s16 unk_0C;
/* 0x10 */ Vec3f positionPos; // confusing name
/* 0x1C */ Vec3f lookAtPos;
/* 0x28 */ f32 roll;
/* 0x2C */ f32 fov;
} DebugCamAnim; // size = 0x30
typedef enum DebugCamTextColor {
/* 0 */ DEBUG_CAM_TEXT_YELLOW,
/* 1 */ DEBUG_CAM_TEXT_PEACH,
/* 2 */ DEBUG_CAM_TEXT_BROWN,
/* 3 */ DEBUG_CAM_TEXT_ORANGE,
/* 4 */ DEBUG_CAM_TEXT_GOLD,
/* 5 */ DEBUG_CAM_TEXT_WHITE,
/* 6 */ DEBUG_CAM_TEXT_BLUE,
/* 7 */ DEBUG_CAM_TEXT_GREEN
} DebugCamTextColor;
void DebugCamera_Init(DebugCam* debugCam, struct Camera* cameraPtr);
void DebugCamera_Enable(DebugCam* debugCam, struct Camera* cam);
void DebugCamera_Update(DebugCam* debugCam, struct Camera* cam);
void DebugCamera_Reset(struct Camera* cam, DebugCam* debugCam);
#endif

View file

@ -14,8 +14,6 @@ void Yaz0_Decompress(uintptr_t romStart, u8* dst, size_t size);
#else
void gzip_decompress(uintptr_t romStart, u8* dst, size_t size);
#endif
void Locale_Init(void);
void Locale_ResetRegion(void);
#if DEBUG_FEATURES
void isPrintfInit(void);
#endif
@ -77,11 +75,6 @@ s32 TransitionFade_IsDone(void* thisx);
void TransitionFade_SetColor(void* thisx, u32 color);
void TransitionFade_SetType(void* thisx, s32 type);
void DebugCamera_Init(DebugCam* debugCam, Camera* cameraPtr);
void DebugCamera_Enable(DebugCam* debugCam, Camera* cam);
void DebugCamera_Update(DebugCam* debugCam, Camera* cam);
void DebugCamera_Reset(Camera* cam, DebugCam* debugCam);
void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg);
void PreRender_Init(PreRender* this);
void PreRender_SetValues(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf);
@ -98,19 +91,10 @@ void PreRender_CopyImageRegion(PreRender* this, Gfx** gfxP);
void PreRender_ApplyFilters(PreRender* this);
void Graph_ThreadEntry(void*);
ListAlloc* ListAlloc_Init(ListAlloc* this);
void* ListAlloc_Alloc(ListAlloc* this, u32 size);
void ListAlloc_Free(ListAlloc* this, void* data);
void ListAlloc_FreeAll(ListAlloc* this);
void SysCfb_Init(s32 n64dd);
void* SysCfb_GetFbPtr(s32 idx);
void* SysCfb_GetFbEnd(void);
NORETURN void func_800D31A0(void);
void func_800D31F0(void);
void func_800D3210(void);
void RcpUtils_PrintRegisterStatus(void);
void RcpUtils_Reset(void);

View file

@ -46,4 +46,6 @@ void IrqMgr_RemoveClient(IrqMgr* irqMgr, IrqMgrClient* client);
extern vu32 gIrqMgrResetStatus;
extern volatile OSTime gIrqMgrRetraceTime;
extern IrqMgr gIrqMgr;
#endif

View file

@ -1,6 +1,8 @@
#ifndef LINE_NUMBERS_H
#define LINE_NUMBERS_H
#include "versions.h"
// The macros in this file serve to reduce clutter from version differences that are only due to line numbers being different.
// The "LN" macros defined here are not meant to be used directly. See the wrapper macros below.

16
include/listalloc.h Normal file
View file

@ -0,0 +1,16 @@
#ifndef LISTALLOC_H
#define LISTALLOC_H
#include "ultra64/ultratypes.h"
typedef struct ListAlloc {
/* 0x00 */ struct ListAlloc* prev;
/* 0x04 */ struct ListAlloc* next;
} ListAlloc; // size = 0x8
ListAlloc* ListAlloc_Init(ListAlloc* this);
void* ListAlloc_Alloc(ListAlloc* this, u32 size);
void ListAlloc_Free(ListAlloc* this, void* data);
void ListAlloc_FreeAll(ListAlloc* this);
#endif

View file

@ -67,6 +67,8 @@ typedef struct MapData {
#define MAP_48x85_TEX_HEIGHT 85
#define MAP_48x85_TEX_SIZE ((MAP_48x85_TEX_WIDTH * MAP_48x85_TEX_HEIGHT) / 2) // 48x85 CI4 texture
extern MapData gMapDataTable;
void Map_SavePlayerInitialInfo(struct PlayState* play);
void Map_SetFloorPalettesData(struct PlayState* play, s16 floor);
void Map_InitData(struct PlayState* play, s16 room);

View file

@ -2,11 +2,7 @@
#define PRERENDER_H
#include "ultra64/ultratypes.h"
typedef struct ListAlloc {
/* 0x00 */ struct ListAlloc* prev;
/* 0x04 */ struct ListAlloc* next;
} ListAlloc; // size = 0x8
#include "listalloc.h"
typedef struct PreRender {
/* 0x00 */ s32 width;

View file

@ -1,7 +1,7 @@
#ifndef SPEEDMETER_H
#define SPEEDMETER_H
#include "ultra64/ultratypes.h"
#include "ultra64.h"
struct GraphicsContext;
struct GameState;
@ -12,6 +12,20 @@ typedef struct SpeedMeter {
/* 0x1C */ s32 y;
} SpeedMeter; // size = 0x20
extern volatile OSTime gAudioThreadUpdateTimeTotalPerGfxTask;
extern volatile OSTime gGfxTaskSentToNextReadyMinusAudioThreadUpdateTime;
extern volatile OSTime gRSPAudioTimeTotal;
extern volatile OSTime gRSPGfxTimeTotal;
extern volatile OSTime gRDPTimeTotal;
extern volatile OSTime gGraphUpdatePeriod;
extern volatile OSTime gAudioThreadUpdateTimeStart;
extern volatile OSTime gAudioThreadUpdateTimeAcc;
extern volatile OSTime gRSPAudioTimeAcc;
extern volatile OSTime gRSPGfxTimeAcc;
extern volatile OSTime gRSPOtherTimeAcc;
extern volatile OSTime D_8016A578;
extern volatile OSTime gRDPTimeAcc;
void SpeedMeter_Init(SpeedMeter* this);
void SpeedMeter_Destroy(SpeedMeter* this);
void SpeedMeter_DrawTimeEntries(SpeedMeter* this, struct GraphicsContext* gfxCtx);

View file

@ -0,0 +1,13 @@
#ifndef SYS_DEBUG_CONTROLLER_H
#define SYS_DEBUG_CONTROLLER_H
#include "ultra64/ultratypes.h"
#if DEBUG_FEATURES
extern u32 gIsCtrlr2Valid;
void func_800D31F0(void);
void func_800D3210(void);
#endif
#endif

8
include/sys_freeze.h Normal file
View file

@ -0,0 +1,8 @@
#ifndef SYS_FREEZE_H
#define SYS_FREEZE_H
#include "attributes.h"
NORETURN void func_800D31A0(void);
#endif

View file

@ -1,6 +1,7 @@
#ifndef ULTRA64_PI_H
#define ULTRA64_PI_H
#include "stddef.h"
#include "message.h"
typedef struct __OSBlockInfo {

View file

@ -5,6 +5,8 @@
#include "libc64/os_malloc.h"
#include "segment_symbols.h"
struct MapData;
extern void* osRomBase;
extern s32 osTvType;
extern u32 osRomType;
@ -32,7 +34,6 @@ extern u32 gViConfigFeatures;
extern f32 gViConfigXScale;
extern f32 gViConfigYScale;
extern OSPiHandle* gCartHandle;
extern s32 gCurrentRegion;
extern u32 __osPiAccessQueueEnabled;
extern OSViMode osViModePalLan1;
extern s32 osViClock;
@ -65,19 +66,14 @@ extern OSTime __osCurrentTime;
extern u32 __osBaseCounter;
extern u32 __osViIntrCount;
extern u32 __osTimerCounter;
extern MapData gMapDataTable;
extern s16 gSpoilingItems[3];
extern s16 gSpoilingItemReverts[3];
extern u16 gSramSlotOffsets[];
// 4 16-colors palettes
extern u64 gMojiFontTLUTs[4][4]; // original name: "moji_tlut"
extern u64 gMojiFontTex[]; // original name: "font_ff"
extern u8 gBossMarkState;
#if DEBUG_FEATURES
extern u32 gIsCtrlr2Valid;
#endif
extern s16* gWaveSamples[9];
extern f32 gBendPitchOneOctaveFrequencies[256];
extern f32 gBendPitchTwoSemitonesFrequencies[256];
@ -142,28 +138,11 @@ extern u8 gSequenceFontTable[];
extern u8 gSequenceTable[];
extern AudioTable gSampleBankTable;
extern MapData* gMapData;
extern struct MapData* gMapData;
extern f32 gBossMarkScale;
extern u32 D_8016139C;
extern PauseMapMarksData* gLoadedPauseMarkDataTable;
extern Scheduler gScheduler;
extern PadMgr gPadMgr;
extern IrqMgr gIrqMgr;
extern volatile OSTime gAudioThreadUpdateTimeTotalPerGfxTask;
extern volatile OSTime gGfxTaskSentToNextReadyMinusAudioThreadUpdateTime;
extern volatile OSTime gRSPAudioTimeTotal;
extern volatile OSTime gRSPGfxTimeTotal;
extern volatile OSTime gRDPTimeTotal;
extern volatile OSTime gGraphUpdatePeriod;
extern volatile OSTime gAudioThreadUpdateTimeStart;
extern volatile OSTime gAudioThreadUpdateTimeAcc;
extern volatile OSTime gRSPAudioTimeAcc;
extern volatile OSTime gRSPGfxTimeAcc;
extern volatile OSTime gRSPOtherTimeAcc;
extern volatile OSTime D_8016A578;
extern volatile OSTime gRDPTimeAcc;
extern SfxBankEntry D_8016BAD0[9];
extern SfxBankEntry D_8016BC80[12];
extern SfxBankEntry D_8016BEC0[22];

View file

@ -4,8 +4,6 @@
#include "ultra64.h"
#include "ultra64/gs2dex.h"
#include "attributes.h"
#include "audiomgr.h"
#include "controller.h"
#include "versions.h"
#include "z64player.h"
#include "z64audio.h"
@ -14,49 +12,14 @@
#include "z64effect.h"
#include "z64animation.h"
#include "z64animation_legacy.h"
#include "letterbox.h"
#include "z64math.h"
#include "z64map_mark.h"
#include "one_point_cutscene.h"
#include "z64play.h"
#include "z64skin.h"
#include "z64skin_matrix.h"
#include "z64vis.h"
#include "zelda_arena.h"
#include "alignment.h"
#include "audiothread_cmd.h"
#include "sfx.h"
#include "color.h"
#include "libu64/gfxprint.h"
#include "z_lib.h"
#include "regs.h"
#include "irqmgr.h"
#include "padmgr.h"
#include "sched.h"
#include "rumble.h"
#include "map.h"
#include "mempak.h"
#include "tha.h"
#include "thga.h"
#include "speed_meter.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "gfxalloc.h"
#include "prerender.h"
#include "rand.h"
#include "sys_math.h"
#include "sys_math3d.h"
#include "libc64/math64.h"
#include "sys_matrix.h"
#include "main.h"
#include "segmented_address.h"
#include "stackcheck.h"
#include "kaleido_manager.h"
#include "libc64/aprintf.h"
#include "libc64/malloc.h"
#include "libc64/sleep.h"
#include "libc64/sprintf.h"
#include "libu64/debug.h"
#include "sys_matrix.h" // in room assets, gIdentityMtx
// TODO: include all files listed above into the right place, and then delete this file.

View file

@ -291,40 +291,6 @@ typedef struct BodyBreak {
#define BODYBREAK_STATUS_READY -1
#define BODYBREAK_STATUS_FINISHED 0
// Only A_OBJ_SIGNPOST_OBLONG and A_OBJ_SIGNPOST_ARROW are used in room files.
typedef enum AObjType {
/* 0x00 */ A_OBJ_BLOCK_SMALL,
/* 0x01 */ A_OBJ_BLOCK_LARGE,
/* 0x02 */ A_OBJ_BLOCK_HUGE,
/* 0x03 */ A_OBJ_BLOCK_SMALL_ROT,
/* 0x04 */ A_OBJ_BLOCK_LARGE_ROT,
/* 0x05 */ A_OBJ_CUBE_SMALL,
/* 0x06 */ A_OBJ_UNKNOWN_6,
/* 0x07 */ A_OBJ_GRASS_CLUMP,
/* 0x08 */ A_OBJ_TREE_STUMP,
/* 0x09 */ A_OBJ_SIGNPOST_OBLONG,
/* 0x0A */ A_OBJ_SIGNPOST_ARROW,
/* 0x0B */ A_OBJ_BOULDER_FRAGMENT,
/* 0x0C */ A_OBJ_MAX
} AObjType;
struct EnAObj;
typedef void (*EnAObjActionFunc)(struct EnAObj*, struct PlayState*);
typedef struct EnAObj {
/* 0x000 */ DynaPolyActor dyna;
/* 0x164 */ EnAObjActionFunc actionFunc;
/* 0x168 */ s32 rotateWaitTimer;
/* 0x16C */ s16 textId;
/* 0x16E */ s16 rotateState;
/* 0x170 */ s16 rotateForTimer;
/* 0x172 */ s16 rotSpeedY;
/* 0x174 */ s16 rotSpeedX;
/* 0x178 */ f32 focusYoffset;
/* 0x17C */ ColliderCylinder collider;
} EnAObj; // size = 0x1C8
typedef enum DoorLockType {
DOORLOCK_NORMAL,
DOORLOCK_BOSS,

View file

@ -1621,83 +1621,6 @@ typedef struct Camera {
/* 0x16A */ s16 unk_16A;
} Camera; // size = 0x16C
/**
* Debug Camera
*/
typedef struct DebugCamSub {
/* 0x0000 */ s16 mode;
/* 0x0002 */ s16 nFrames;
/* 0x0004 */ s16 nPoints;
/* 0x0006 */ s16 unkIdx;
/* 0x0008 */ s16 unk_08;
/* 0x000A */ s16 unk_0A;
/* 0x000C */ s32 unk_0C; // bool: indicates position vs lookAt?
/* 0x0010 */ char unk_10[0x14];
/* 0x0024 */ CutsceneCameraPoint position[129];
/* 0x0834 */ CutsceneCameraPoint lookAt[129];
/* 0x1044 */ s16 demoCtrlMenu;
/* 0x1046 */ s16 demoCtrlActionIdx; // e (?), s (save), l (load), c (clear)
/* 0x1048 */ s16 demoCtrlToggleSwitch;
/* 0x104A */ Vec3s unk_104A;
} DebugCamSub; // size = 0x1050
typedef struct DebugCam {
/* 0x00 */ s32 unk_00;
/* 0x04 */ Vec3f at;
/* 0x10 */ Vec3f eye;
/* 0x1C */ Vec3f unk_1C;
/* 0x28 */ char unk_28[0xC];
/* 0x34 */ s32 unk_34;
/* 0x38 */ s32 unk_38;
/* 0x3C */ s32 unk_3C; // bool
/* 0x40 */ s32 unk_40;
/* 0x44 */ s32 unk_44;
/* 0x48 */ f32 fov;
/* 0x4C */ s16 roll;
/* 0x4E */ char unk_4E[0x2];
/* 0x50 */ f32 rollDegrees;
/* 0x54 */ Vec3f unk_54;
/* 0x60 */ Vec3f unk_60;
/* 0x6C */ Vec3f unk_6C;
/* 0x78 */ s16 unk_78;
/* 0x7A */ s16 unk_7A;
/* 0x7C */ DebugCamSub sub;
} DebugCam; // size = 0x10CC
typedef struct DebugCamCut {
/* 0x00 */ char letter;
/* 0x01 */ u8 unk_01;
/* 0x02 */ s16 mode;
/* 0x04 */ CutsceneCameraPoint* position;
/* 0x08 */ CutsceneCameraPoint* lookAt;
/* 0x0C */ s16 nFrames;
/* 0x0E */ s16 nPoints;
} DebugCamCut; // size = 0x10
typedef struct DebugCamAnim {
/* 0x00 */ f32 curFrame;
/* 0x04 */ f32 unk_04; // frame count?
/* 0x08 */ s16 keyframe;
/* 0x0A */ s16 unk_0A;
/* 0x0C */ s16 unk_0C;
/* 0x10 */ Vec3f positionPos; // confusing name
/* 0x1C */ Vec3f lookAtPos;
/* 0x28 */ f32 roll;
/* 0x2C */ f32 fov;
} DebugCamAnim; // size = 0x30
typedef enum DebugCamTextColor {
/* 0 */ DEBUG_CAM_TEXT_YELLOW,
/* 1 */ DEBUG_CAM_TEXT_PEACH,
/* 2 */ DEBUG_CAM_TEXT_BROWN,
/* 3 */ DEBUG_CAM_TEXT_ORANGE,
/* 4 */ DEBUG_CAM_TEXT_GOLD,
/* 5 */ DEBUG_CAM_TEXT_WHITE,
/* 6 */ DEBUG_CAM_TEXT_BLUE,
/* 7 */ DEBUG_CAM_TEXT_GREEN
} DebugCamTextColor;
extern s32 gDebugCamEnabled;
void Camera_Init(Camera* camera, struct View* view, struct CollisionContext* colCtx, struct PlayState* play);

View file

@ -20,6 +20,8 @@ typedef enum SramHeaderField {
/* 0x03 */ SRAM_HEADER_MAGIC // must be the value in `sSramDefaultHeader` for save to be considered valid
} SramHeaderField;
extern u16 gSramSlotOffsets[];
void Sram_InitNewSave(void);
void Sram_InitDebugSave(void);
void Sram_OpenSave(SramContext* sramCtx);
@ -31,6 +33,6 @@ void Sram_CopySave(struct FileSelectState* fileSelect, SramContext* sramCtx);
void Sram_WriteSramHeader(SramContext* sramCtx);
void Sram_InitSram(struct GameState* gameState, SramContext* sramCtx);
void Sram_Alloc(struct GameState* gameState, SramContext* sramCtx);
void Sram_Init(struct GameState* play, SramContext* sramCtx);
void Sram_Init(struct GameState* gameState, SramContext* sramCtx);
#endif

View file

@ -28,7 +28,6 @@ typedef struct Vis {
} Vis; // size = 0x10
/* Cvg: Coverage */
#define FB_FILTER_TO_CVG_TYPE(filter) (filter)
@ -50,7 +49,6 @@ void VisCvg_Destroy(VisCvg* this);
void VisCvg_Draw(VisCvg* this, Gfx** gfxP);
/* Mono: Desaturation */
// Only one type
@ -66,7 +64,6 @@ void VisMono_Destroy(VisMono* this);
void VisMono_Draw(VisMono* this, Gfx** gfxP);
/* ZBuf: Z-Buffer */
#define FB_FILTER_TO_ZBUF_TYPE(filter) ((filter) - FB_FILTER_ZBUF_IA)

41
include/z_en_a_obj.h Normal file
View file

@ -0,0 +1,41 @@
#ifndef Z_EN_A_OBJ_H
#define Z_EN_A_OBJ_H
#include "ultra64.h"
#include "z64actor.h"
// Only A_OBJ_SIGNPOST_OBLONG and A_OBJ_SIGNPOST_ARROW are used in room files.
typedef enum AObjType {
/* 0x00 */ A_OBJ_BLOCK_SMALL,
/* 0x01 */ A_OBJ_BLOCK_LARGE,
/* 0x02 */ A_OBJ_BLOCK_HUGE,
/* 0x03 */ A_OBJ_BLOCK_SMALL_ROT,
/* 0x04 */ A_OBJ_BLOCK_LARGE_ROT,
/* 0x05 */ A_OBJ_CUBE_SMALL,
/* 0x06 */ A_OBJ_UNKNOWN_6,
/* 0x07 */ A_OBJ_GRASS_CLUMP,
/* 0x08 */ A_OBJ_TREE_STUMP,
/* 0x09 */ A_OBJ_SIGNPOST_OBLONG,
/* 0x0A */ A_OBJ_SIGNPOST_ARROW,
/* 0x0B */ A_OBJ_BOULDER_FRAGMENT,
/* 0x0C */ A_OBJ_MAX
} AObjType;
struct EnAObj;
typedef void (*EnAObjActionFunc)(struct EnAObj*, struct PlayState*);
typedef struct EnAObj {
/* 0x000 */ DynaPolyActor dyna;
/* 0x164 */ EnAObjActionFunc actionFunc;
/* 0x168 */ s32 rotateWaitTimer;
/* 0x16C */ s16 textId;
/* 0x16E */ s16 rotateState;
/* 0x170 */ s16 rotateForTimer;
/* 0x172 */ s16 rotSpeedY;
/* 0x174 */ s16 rotSpeedX;
/* 0x178 */ f32 focusYoffset;
/* 0x17C */ ColliderCylinder collider;
} EnAObj; // size = 0x1C8
#endif

View file

@ -3,7 +3,6 @@
#include "ultra64.h"
#include "romfile.h"
#include "unk.h"
typedef struct GameStateOverlay {
/* 0x00 */ void* loadedRamAddr;
@ -15,7 +14,7 @@ typedef struct GameStateOverlay {
/* 0x1C */ void* destroy; // deconstructs the context, and sets the next context to load
/* 0x20 */ void* unk_20;
/* 0x24 */ void* unk_24;
/* 0x28 */ UNK_TYPE4 unk_28;
/* 0x28 */ s32 unk_28;
/* 0x2C */ u32 instanceSize;
} GameStateOverlay; // size = 0x30

12
include/z_locale.h Normal file
View file

@ -0,0 +1,12 @@
#ifndef Z_LOCALE_H
#define Z_LOCALE_H
#include "ultra64/ultratypes.h"
#include "region.h"
extern s32 gCurrentRegion;
void Locale_Init(void);
void Locale_ResetRegion(void);
#endif

View file

@ -1,9 +1,14 @@
#include "libu64/gfxprint.h"
#include "ultra64.h"
#include "global.h"
#include "attributes.h"
#include "controller.h"
#include "padmgr.h"
#include "seqcmd.h"
#include "sequence.h"
#include "versions.h"
#include "global.h"
#define ABS_ALT(x) ((x) < 0 ? -(x) : (x))
#if !PLATFORM_N64

View file

@ -1,4 +1,6 @@
#include "ultra64.h"
#include "attributes.h"
#include "global.h"
void Audio_SequenceChannelProcessSound(SequenceChannel* channel, s32 recalculateVolume, s32 applyBend) {

View file

@ -1,4 +1,5 @@
#include "ultra64.h"
#include "attributes.h"
#include "buffers.h"
#include "versions.h"

View file

@ -15,7 +15,9 @@
*/
#include "ultra64.h"
#include "assert.h"
#include "attributes.h"
#include "audio/aseq.h"
#include "global.h"
static_assert(MML_VERSION == MML_VERSION_OOT, "This file implements the OoT version of the MML");

View file

@ -1,4 +1,5 @@
#include "global.h"
#include "libc64/sprintf.h"
#include "assert.h"
#include "fault.h"
NORETURN void __assert(const char* assertion, const char* file, int line) {

View file

@ -1,11 +1,14 @@
#include "global.h"
#include "boot.h"
#include "stack.h"
#include "stackcheck.h"
#if PLATFORM_N64
#include "cic6105.h"
#endif
#include "z_locale.h"
#include "z64thread.h"
#include "global.h"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:128"
StackEntry sBootThreadInfo;

View file

@ -1,7 +1,9 @@
#pragma increment_block_number "ntsc-1.2:0"
#include "global.h"
#include "audiomgr.h"
#include "cic6105.h"
#include "regs.h"
#include "sched.h"
#include "fault.h"
s32 func_80001714(void);

View file

@ -1,4 +1,5 @@
#include "buffers.h"
#include "main.h"
#include "segment_symbols.h"
#include "stack.h"
#include "stackcheck.h"

View file

@ -1,4 +1,5 @@
#include "global.h"
#include "attributes.h"
typedef struct ISVDbg {
/* 0x00 */ u32 magic; // "IS64"

View file

@ -1,8 +1,14 @@
#include "global.h"
#include "libu64/debug.h"
#include "alignment.h"
#include "line_numbers.h"
#include "padmgr.h"
#include "region.h"
#include "terminal.h"
#include "versions.h"
#include "line_numbers.h"
#include "z_locale.h"
#include "macros.h"
#include "global.h"
s32 gCurrentRegion = 0;

View file

@ -19,6 +19,9 @@
* to be uncompressed and the request queue and address translation is skipped.
*/
#include "libc64/sleep.h"
#include "libc64/sprintf.h"
#include "libu64/debug.h"
#include "attributes.h"
#include "fault.h"
#include "line_numbers.h"
#if PLATFORM_N64
@ -33,7 +36,7 @@
#include "global.h"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:86 pal-1.0:84 pal-1.1:84"
"ntsc-1.2:12 pal-1.0:10 pal-1.1:10"
StackEntry sDmaMgrStackInfo;
OSMesgQueue sDmaMgrMsgQueue;

View file

@ -5,8 +5,15 @@
* buffer copies and coverage drawing. Also contains software implementations of the Video Interface anti-aliasing and
* divot filters.
*/
#include "global.h"
#include "libu64/debug.h"
#include "alloca.h"
#include "color.h"
#include "gfx.h"
#include "prerender.h"
#include "regs.h"
#include "macros.h"
#include "global.h"
void PreRender_SetValuesSave(PreRender* this, u32 width, u32 height, void* fbuf, void* zbuf, void* cvg) {
this->widthSave = width;

View file

@ -8,7 +8,7 @@
*
* @see TwoHeadArena.c
*/
#include "global.h"
#include "thga.h"
void THGA_Init(TwoHeadGfxArena* thga, void* start, size_t size) {
THA_Init(&thga->tha, start, size);

View file

@ -5,7 +5,12 @@
* and sending the audio rsp tasks generated by the driver to the task scheduler.
*/
#include "global.h"
#include "audiomgr.h"
#include "regs.h"
#include "speed_meter.h"
#include "z64dma.h"
#include "macros.h"
void AudioMgr_NotifyTaskDone(AudioMgr* audioMgr) {
AudioTask* task = audioMgr->rspTask;

View file

@ -1,9 +1,11 @@
#include "fault.h"
#include "n64dd.h"
#include "regs.h"
#include "segmented_address.h"
#include "z64actor.h"
#include "z64cutscene.h"
#include "z64save.h"
#include "global.h"
n64ddStruct_800FEE70_pointers D_800FEE70 = {
func_801C7C1C,
NULL,

View file

@ -1,6 +1,7 @@
#include "libu64/gfxprint.h"
#include "attributes.h"
#include "controller.h"
#include "db_camera.h"
#include "debug_arena.h"
#include "letterbox.h"
#include "mempak.h"

View file

@ -40,8 +40,8 @@
* DPad-Up may be pressed to enable sending fault pages over osSyncPrintf as well as displaying them on-screen.
* DPad-Down disables sending fault pages over osSyncPrintf.
*/
#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-eu-mq-dbg:160 gc-jp:176 gc-jp-ce:176 gc-jp-mq:176 gc-us:176" \
"gc-us-mq:176 ique-cn:176"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-eu-mq-dbg:96 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128" \
"gc-us-mq:128 ique-cn:128"
#include "global.h"
#include "libc64/sleep.h"

View file

@ -13,7 +13,7 @@
#include "macros.h"
#include "global.h"
#pragma increment_block_number "ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192"
#pragma increment_block_number "ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
typedef struct FaultMgr {
OSThread thread;

View file

@ -1,3 +1,4 @@
#include "libc64/malloc.h"
#include "libu64/debug.h"
#include "libu64/gfxprint.h"
#include "audiomgr.h"
@ -16,10 +17,13 @@
#include "regs.h"
#include "rumble.h"
#include "speed_meter.h"
#include "sys_debug_controller.h"
#include "terminal.h"
#include "versions.h"
#include "vi_mode.h"
#include "zelda_arena.h"
#include "z64debug.h"
#include "z64dma.h"
#include "z64game.h"
#include "z64vis.h"

View file

@ -4,6 +4,7 @@
#include "buffers.h"
#include "console_logo_state.h"
#include "controller.h"
#include "gfx.h"
#include "fault.h"
#include "file_select_state.h"
@ -13,12 +14,15 @@
#include "prenmi_state.h"
#include "regs.h"
#include "setup_state.h"
#include "speed_meter.h"
#include "sys_debug_controller.h"
#include "sys_ucode.h"
#include "terminal.h"
#include "title_setup_state.h"
#include "ucode_disas.h"
#include "versions.h"
#include "z_game_dlftbls.h"
#include "z64audio.h"
#include "z64save.h"
#include "z64play.h"
@ -28,8 +32,8 @@
#define GFXPOOL_HEAD_MAGIC 0x1234
#define GFXPOOL_TAIL_MAGIC 0x5678
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.0:224" \
"ntsc-1.1:224 ntsc-1.2:224 pal-1.0:224 pal-1.1:224"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ique-cn:128" \
"ntsc-1.0:96 ntsc-1.1:96 ntsc-1.2:96 pal-1.0:96 pal-1.1:96"
/**
* The time at which the previous `Graph_Update` ended.

View file

@ -32,11 +32,15 @@
*
* @see sched.c
*/
#include "global.h"
#include "libu64/debug.h"
#include "irqmgr.h"
#include "stackcheck.h"
#include "terminal.h"
#include "versions.h"
#include "z64thread.h"
#include "macros.h"
vu32 gIrqMgrResetStatus = IRQ_RESET_STATUS_IDLE;
volatile OSTime sIrqMgrResetTime = 0;
volatile OSTime gIrqMgrRetraceTime = 0;

View file

@ -1,4 +1,5 @@
#include "global.h"
#include "libc64/malloc.h"
#include "listalloc.h"
ListAlloc* ListAlloc_Init(ListAlloc* this) {
this->prev = NULL;

View file

@ -12,11 +12,16 @@ extern struct Scheduler gScheduler;
extern struct PadMgr gPadMgr;
extern struct IrqMgr gIrqMgr;
#include "libc64/malloc.h"
#include "audiomgr.h"
#include "debug_arena.h"
#include "fault.h"
#include "padmgr.h"
#include "prenmi_buff.h"
#include "regs.h"
#include "segmented_address.h"
#include "stack.h"
#include "stackcheck.h"
#include "terminal.h"
#include "versions.h"
#if PLATFORM_N64
@ -28,8 +33,8 @@ extern struct IrqMgr gIrqMgr;
#include "global.h"
#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-jp:160 gc-jp-ce:160 gc-jp-mq:160 gc-us:160 gc-us-mq:160" \
"ique-cn:160 ntsc-1.0:140 ntsc-1.1:140 ntsc-1.2:140 pal-1.0:138 pal-1.1:138"
#pragma increment_block_number "gc-eu:32 gc-eu-mq:32 gc-jp:32 gc-jp-ce:32 gc-jp-mq:32 gc-us:32 gc-us-mq:32 ique-cn:32" \
"ntsc-1.0:13 ntsc-1.1:13 ntsc-1.2:13 pal-1.0:11 pal-1.1:11"
extern u8 _buffersSegmentEnd[];

View file

@ -7,7 +7,10 @@
* Each file is assigned an uppercase ASCII letter as an identifier, the game name for each is marked as
* 'ZELDA DEMO TOOL', encoded according to the N64 Font Code described in section 26.3 of the N64 Programming Manual.
*/
#include "global.h"
#include "mempak.h"
#include "padmgr.h"
#include "macros.h"
#define MEMPAK_MAX_FILES 11

View file

@ -42,11 +42,14 @@
#include "libu64/debug.h"
#include "fault.h"
#include "irqmgr.h"
#include "main.h"
#include "regs.h"
#include "sched.h"
#include "speed_meter.h"
#include "versions.h"
#include "z64thread.h"
#include "macros.h"
#include "global.h"
#define RSP_DONE_MSG 667

View file

@ -1,4 +1,7 @@
#include "global.h"
#include "letterbox.h"
#include "regs.h"
#include "macros.h"
typedef enum LetterboxState {
/* 0 */ LETTERBOX_STATE_IDLE,

View file

@ -1,8 +1,14 @@
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
#include "global.h"
#include "libc64/malloc.h"
#include "libu64/debug.h"
#include "gfx.h"
#include "regs.h"
#include "speed_meter.h"
#include "terminal.h"
#include "zelda_arena.h"
#include "z64game.h"
#include "z64view.h"
/**
* How much time the audio update on the audio thread (`AudioThread_Update`) took in total, between scheduling the last

View file

@ -1,4 +1,7 @@
#include "global.h"
#include "sys_debug_controller.h"
#include "stdbool.h"
#include "ultra64/ultratypes.h"
#include "padmgr.h"
u32 gIsCtrlr2Valid = false;

View file

@ -1,6 +1,10 @@
#include "global.h"
#include "libc64/sleep.h"
#include "attributes.h"
#include "sys_freeze.h"
#include "terminal.h"
#include "macros.h"
NORETURN void func_800D31A0(void) {
PRINTF(VT_FGCOL(RED) "\n**** Freeze!! ****\n" VT_RST);
for (;;) {

View file

@ -12,7 +12,8 @@
*
* @note Original filename is likely sys_vibrate.c or similar as it is ordered after sys_ucode.c
*/
#include "global.h"
#include "rumble.h"
#include "padmgr.h"
/**
* Rumble manager update, runs on Vertical Retrace on the padmgr thread.

View file

@ -33,8 +33,8 @@
#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#include "assets/objects/object_bdoor/object_bdoor.h"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.0:128 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.0:128" \
"ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
CollisionPoly* sCurCeilingPoly;
s32 sCurCeilingBgId;

View file

@ -1,4 +1,7 @@
#include "global.h"
#include "z_lib.h"
#include "z64actor.h"
#include "z64bgcheck.h"
#include "z64play.h"
/**
* @param transformFlags How other actors standing on the dynapoly actor's collision move when the dynapoly actor moves.

View file

@ -11,7 +11,7 @@
#include "z64player.h"
#include "z64skin_matrix.h"
#pragma increment_block_number "ntsc-1.0:184 ntsc-1.1:184 ntsc-1.2:184"
#pragma increment_block_number "ntsc-1.0:208 ntsc-1.1:208 ntsc-1.2:208"
u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList* nodeList);
void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* sector);

View file

@ -1,14 +1,30 @@
#include "libc64/math64.h"
#include "libc64/qrand.h"
#include "ultra64.h"
#include "attributes.h"
#include "controller.h"
#include "db_camera.h"
#include "letterbox.h"
#include "one_point_cutscene.h"
#include "quake.h"
#include "regs.h"
#include "sfx.h"
#include "sys_math3d.h"
#include "terminal.h"
#include "z_lib.h"
#include "zelda_arena.h"
#include "z64audio.h"
#include "z64cutscene_spline.h"
#include "z64debug.h"
#include "z64olib.h"
#include "z64play.h"
#include "z64player.h"
#include "z64save.h"
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ique-cn:0" \
"ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ique-cn:192 ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192"
s16 Camera_RequestSettingImpl(Camera* camera, s16 requestedSetting, s16 flags);
s32 Camera_RequestModeImpl(Camera* camera, s16 requestedMode, u8 forceModeChange);
@ -3642,7 +3658,7 @@ s32 Camera_KeepOn3(Camera* camera) {
}
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ique-cn:128 ntsc-1.0:120 ntsc-1.1:120 ntsc-1.2:120 pal-1.0:118 pal-1.1:118"
"ique-cn:128 ntsc-1.0:95 ntsc-1.1:95 ntsc-1.2:95 pal-1.0:93 pal-1.1:93"
s32 Camera_KeepOn4(Camera* camera) {
static Vec3f D_8015BD50;

View file

@ -1,4 +1,7 @@
#include "global.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "sys_matrix.h"
#include "z64play.h"
void Gfx_DrawDListOpa(PlayState* play, Gfx* dlist) {
OPEN_DISPS(play->state.gfxCtx, "../z_cheap_proc.c", 214);

View file

@ -15,7 +15,7 @@
#include "overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h"
#include "z_lib.h"
#pragma increment_block_number "ique-cn:0 ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:224 pal-1.1:224"
#pragma increment_block_number "ique-cn:0 ntsc-1.0:248 ntsc-1.1:248 ntsc-1.2:248 pal-1.0:248 pal-1.1:248"
typedef s32 (*ColChkResetFunc)(PlayState*, Collider*);
typedef void (*ColChkApplyFunc)(PlayState*, CollisionCheckContext*, Collider*);

View file

@ -1,14 +1,14 @@
#include "alignment.h"
#include "region.h"
#include "sequence.h"
#include "versions.h"
#include "z_locale.h"
#include "z64environment.h"
#include "z64save.h"
#include "z64transition.h"
#include "global.h"
#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64" \
"ntsc-1.0:176 ntsc-1.1:176 ntsc-1.2:176 pal-1.0:192 pal-1.1:192"
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
ALIGNED(16) SaveContext gSaveContext;
#if PLATFORM_IQUE

View file

@ -1,4 +1,4 @@
#pragma increment_block_number "gc-eu:0 gc-eu-mq:128 gc-jp:0 gc-jp-ce:0 gc-jp-mq:128 gc-us:0 gc-us-mq:128 ique-cn:0" \
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ique-cn:0" \
"ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0"
#include "global.h"
#include "libu64/gfxprint.h"
@ -144,8 +144,8 @@ u16 gCamAtSplinePointsAppliedFrame;
u16 gCamEyePointAppliedFrame;
u16 gCamAtPointAppliedFrame;
#pragma increment_block_number "gc-eu:0 gc-eu-mq:128 gc-jp:0 gc-jp-ce:0 gc-jp-mq:128 gc-us:0 gc-us-mq:128 ique-cn:0" \
"ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ique-cn:0" \
"ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:0 pal-1.0:128 pal-1.1:128"
// Cam ID to return to when a scripted cutscene is finished
s16 sReturnToCamId;

View file

@ -1,4 +1,15 @@
#include "libc64/math64.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "sys_math3d.h"
#include "sys_matrix.h"
#include "z_lib.h"
#include "z64effect.h"
#include "z64skin_matrix.h"
#include "macros.h"
#include "global.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
void EffectBlure_AddVertex(EffectBlure* this, Vec3f* p1, Vec3f* p2) {

View file

@ -1,5 +1,15 @@
#include "global.h"
#include "libc64/qrand.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "terminal.h"
#include "z64effect.h"
#include "z64light.h"
#include "z64play.h"
#include "z64skin_matrix.h"
#include "macros.h"
#include "global.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
static Vtx sVertices[5] = {

View file

@ -1,4 +1,14 @@
#include "libc64/qrand.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "sys_matrix.h"
#include "z64effect.h"
#include "z64play.h"
#include "z64skin_matrix.h"
#include "macros.h"
#include "global.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
// original name: "spark"

View file

@ -1,4 +1,6 @@
#include "global.h"
#include "gfx.h"
#include "z_lib.h"
#include "z64play.h"
void func_80026230(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
f32 cos;

View file

@ -1,6 +1,7 @@
#include "global.h"
#include "gfx.h"
#include "z64effect.h"
#include "z64frame_advance.h"
#include "z64play.h"
EffectContext sEffectContext;

View file

@ -1,4 +1,16 @@
#include "global.h"
#include "libc64/qrand.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "rand.h"
#include "regs.h"
#include "segmented_address.h"
#include "sfx.h"
#include "z_lib.h"
#include "z64effect.h"
#include "z64play.h"
#include "z64player.h"
#include "z64skin_matrix.h"
#include "overlays/effects/ovl_Effect_Ss_Dust/z_eff_ss_dust.h"
#include "overlays/effects/ovl_Effect_Ss_KiraKira/z_eff_ss_kirakira.h"
#include "overlays/effects/ovl_Effect_Ss_Bomb/z_eff_ss_bomb.h"

View file

@ -1,4 +1,11 @@
#include "global.h"
#include "z_en_a_obj.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "sfx.h"
#include "sys_matrix.h"
#include "z_lib.h"
#include "z64play.h"
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/object_d_hsblock/object_d_hsblock.h"

View file

@ -9,7 +9,14 @@
* @note The only coded effect has a visual effect to blend the tiles to a single point, which looks like the screen
* gets sucked into.
*/
#include "global.h"
#include "libc64/malloc.h"
#include "libc64/sleep.h"
#include "libu64/debug.h"
#include "gfx.h"
#include "z64math.h"
#include "z64transition_instances.h"
#include "macros.h"
// color framebuffer
extern u16 D_0F000000[];

View file

@ -1,3 +1,5 @@
#include "gfx.h"
#include "global.h"
typedef enum TransitionCircleDirection {

View file

@ -25,8 +25,14 @@
* - higher detail draws both.
*/
#include "global.h"
#include "gfx.h"
#include "regs.h"
#include "segmented_address.h"
#include "sys_matrix.h"
#include "zelda_arena.h"
#include "z64actor.h"
#include "z64curve.h"
#include "z64play.h"
void SkelCurve_Clear(SkelCurve* skelCurve) {
skelCurve->limbCount = 0;

View file

@ -1,5 +1,5 @@
#pragma increment_block_number "gc-eu:224 gc-eu-mq:224 gc-jp:224 gc-jp-ce:224 gc-jp-mq:224 gc-us:224 gc-us-mq:224" \
"ique-cn:224 ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:224 pal-1.1:224"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ique-cn:128 ntsc-1.0:144 ntsc-1.1:144 ntsc-1.2:144 pal-1.0:144 pal-1.1:144"
#include "libu64/debug.h"
#include "kaleido_manager.h"

View file

@ -1,5 +1,5 @@
#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ique-cn:0" \
"ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:64 pal-1.1:64"
#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64 ique-cn:64" \
"ntsc-1.0:64 ntsc-1.1:64 ntsc-1.2:64 pal-1.0:64 pal-1.1:64"
#include "libc64/qrand.h"
#include "libu64/gfxprint.h"
@ -235,8 +235,8 @@ s16 sLightningFlashAlpha;
s16 sSunDepthTestX;
s16 sSunDepthTestY;
#pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:160 pal-1.1:160"
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:160 gc-jp-ce:160 gc-jp-mq:160 gc-us:160 gc-us-mq:160" \
"ique-cn:160 ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192"
LightNode* sNGameOverLightNode;
LightInfo sNGameOverLightInfo;

View file

@ -1,5 +1,6 @@
#include "libu64/debug.h"
#include "libu64/overlay.h"
#include "map.h"
#include "regs.h"
#include "romfile.h"
#include "segment_symbols.h"

View file

@ -24,7 +24,7 @@
#include "assets/textures/parameter_static/parameter_static.h"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.0:208 ntsc-1.1:208 ntsc-1.2:208 pal-1.0:128 pal-1.1:128"
"ntsc-1.0:80 ntsc-1.1:80 ntsc-1.2:80 pal-1.0:128 pal-1.1:128"
#if !PLATFORM_IQUE
#define MSG_BUF_DECODED (msgCtx->msgBufDecoded)

View file

@ -2,6 +2,9 @@
* Unused. A very simple utility for drawing text on screen.
*/
#include "gfx.h"
#include "macros.h"
#include "global.h"
// how big to draw the characters on screen

View file

@ -1,3 +1,5 @@
#include "libc64/malloc.h"
#include "libc64/qrand.h"
#include "libu64/debug.h"
#include "buffers.h"
#include "controller.h"
@ -33,11 +35,12 @@
#include "z64play.h"
#include "z64player.h"
#include "z64save.h"
#include "z64vis.h"
#include "global.h"
#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ique-cn:192" \
"ntsc-1.0:144 ntsc-1.1:144 ntsc-1.2:144 pal-1.0:144 pal-1.1:144"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ique-cn:0" \
"ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:224 pal-1.1:224"
TransitionTile gTransitionTile;
s32 gTransitionTileState;

View file

@ -1,4 +1,8 @@
#include "global.h"
#include "kaleido_manager.h"
#include "z64actor.h"
#include "z64actor_profile.h"
#include "z64play.h"
#include "z64player.h"
#define FLAGS \
(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \

View file

@ -3,11 +3,10 @@
#include "gfx_setupdl.h"
#include "gfxalloc.h"
#include "letterbox.h"
#include "main.h"
#include "regs.h"
#include "z64play.h"
#include "global.h"
Gfx sSetupDL[SETUPDL_MAX][6] = {
{
/* SETUPDL_0 */

View file

@ -11,7 +11,9 @@
*
* @note Original filename is likely z_vibrate.c or similar as it is ordered after z_ss_sram.c and before z_view.c
*/
#include "global.h"
#include "rumble.h"
#include "padmgr.h"
#include "z64math.h"
RumbleMgr sRumbleMgr;

View file

@ -1,9 +1,16 @@
#include "global.h"
#include "regs.h"
#include "romfile.h"
#include "seqcmd.h"
#include "segment_symbols.h"
#include "segmented_address.h"
#include "terminal.h"
#include "versions.h"
#include "z_actor_dlftbls.h"
#include "z_lib.h"
#include "z64play.h"
#include "z64player.h"
#include "z64save.h"
#include "z64scene.h"
SceneCmdHandlerFunc sSceneCmdHandlers[SCENE_CMD_ID_MAX];
RomFile sNaviQuestHintFiles[];

View file

@ -1,5 +1,17 @@
#include "global.h"
#include "libu64/debug.h"
#include "gfx.h"
#include "regs.h"
#include "segmented_address.h"
#include "segment_symbols.h"
#include "sys_matrix.h"
#include "terminal.h"
#include "z_lib.h"
#include "zelda_arena.h"
#include "z64animation.h"
#include "z64animation_legacy.h"
#include "z64play.h"
#include "macros.h"
#define ANIM_INTERP 1

View file

@ -1,5 +1,9 @@
#include "global.h"
#include "gfx.h"
#include "terminal.h"
#include "z_lib.h"
#include "z64skin_matrix.h"
#include "macros.h"
// clang-format off
MtxF sMtxFClear = {

View file

@ -1,5 +1,12 @@
#include "global.h"
#include "libc64/malloc.h"
#include "libu64/debug.h"
#include "gfx.h"
#include "letterbox.h"
#include "main.h"
#include "regs.h"
#include "sys_matrix.h"
#include "terminal.h"
#include "z64view.h"
vu32 sLogOnNextViewInit = true;

View file

@ -1,9 +1,15 @@
#include "vi_mode.h"
#include "global.h"
#include "libu64/debug.h"
#include "ultra64/viint.h"
#include "controller.h"
#include "main.h"
#include "regs.h"
#include "versions.h"
#include "global.h"
#include "macros.h"
void ViMode_LogPrint(OSViMode* osViMode) {
LOG_ADDRESS("osvimodep", osViMode, "../z_vimode.c", 87);
LOG_HEX32("osvimodep->comRegs.ctrl", osViMode->comRegs.ctrl, "../z_vimode.c", 88);

View file

@ -20,7 +20,10 @@
* before the filter is applied.
*/
#include "global.h"
#include "gfx.h"
#include "z64vis.h"
#include "macros.h"
/**
* Draws only coverage: does not retain any of the original pixel RGB, primColor is used as background color.

View file

@ -8,7 +8,14 @@
* comments.
*/
#include "global.h"
#include "libc64/malloc.h"
#include "libu64/debug.h"
#include "attributes.h"
#include "gfx.h"
#include "gfxalloc.h"
#include "z64vis.h"
#include "macros.h"
// Height of the fragments the color frame buffer (CFB) is split into.
// It is the maximum amount of lines such that all rgba16 SCREEN_WIDTH-long lines fit into

View file

@ -32,7 +32,10 @@
* again ignored by the RenderMode.
*/
#include "global.h"
#include "gfx.h"
#include "z64vis.h"
#include "macros.h"
// Height of the fragments the z-buffer is split into.
// It is the maximum amount of lines such that all rgba16 SCREEN_WIDTH-long lines fit into TMEM.

View file

@ -1,4 +1,7 @@
#include "global.h"
#include "gfx.h"
#include "gfx_setupdl.h"
#include "sys_matrix.h"
#include "z64skybox.h"
Mtx* sSkyboxDrawMatrix;

View file

@ -1,9 +1,11 @@
#include "global.h"
#include "ultra64/asm.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
#include "libc/stdint.h"
#include "attributes.h"
#include "global.h"
s32 LeoCACreateLeoManager(s32 comPri, s32 intPri, OSMesg* cmdBuf, s32 cmdMsgCnt) {
OSPiHandle* driveRomHandle;

View file

@ -1,9 +1,11 @@
#include "global.h"
#include "ultra64/asm.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
#include "libc/stdint.h"
#include "attributes.h"
#include "global.h"
s32 LeoCJCreateLeoManager(s32 comPri, s32 intPri, OSMesg* cmdBuf, s32 cmdMsgCnt) {
OSPiHandle* driveRomHandle;

View file

@ -1,7 +1,9 @@
#include "global.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
#include "attributes.h"
#include "global.h"
extern vu16 LEOrw_flags;

View file

@ -1,7 +1,9 @@
#include "global.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
#include "attributes.h"
#include "global.h"
extern s32 currentCommand;

View file

@ -1,7 +1,9 @@
#include "global.h"
#include "ultra64/leo.h"
#include "ultra64/leoappli.h"
#include "ultra64/leodrive.h"
#include "attributes.h"
#include "global.h"
typedef struct {
/* 0x0 */ u8 year;

View file

@ -1,4 +1,8 @@
#include "global.h"
#include "libc64/aprintf.h"
#include "libu64/gfxprint.h"
#include "attributes.h"
#include "macros.h"
u16 sGfxPrintFontTLUT[64] = {
0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000, 0xFFFF, 0x0000,

View file

@ -1,6 +1,10 @@
#include "global.h"
#include "libu64/debug.h"
#include "attributes.h"
#include "stackcheck.h"
#include "terminal.h"
#include "macros.h"
StackEntry* sStackInfoListStart = NULL;
StackEntry* sStackInfoListEnd = NULL;

View file

@ -1,4 +1,4 @@
#include "global.h"
#include "libc64/malloc.h"
#include "libc64/os_malloc.h"
typedef void (*arg3_800FC868)(void*);

View file

@ -1,3 +1,6 @@
#include "ultra64.h"
#include "attributes.h"
#include "global.h"
s32 osSetTimer(OSTimer* timer, OSTime countdown, OSTime interval, OSMesgQueue* mq, OSMesg msg) {

View file

@ -1,7 +1,7 @@
// Does some command processing
#include "global.h"
#include "n64dd.h"
#include "versions.h"
#include "z_locale.h"
void func_801C8554(void);
void func_801C8578(void* arg0, void* arg1, OSId id, void* sp, OSPri pri);

View file

@ -1,6 +1,9 @@
// Lower-level command processing in a background thread
#include "global.h"
#include "n64dd.h"
#include "libc64/sleep.h"
#include "attributes.h"
#include "global.h"
s32 D_801D2EA0 = 0;
u8* D_801D2EA4 = NULL;

View file

@ -1,6 +1,6 @@
// User-facing error handling
#include "global.h"
#include "n64dd.h"
#include "z_locale.h"
u8 B_801E0F80[0x600];
u8 B_801E1580[0x2800];

View file

@ -1,5 +1,8 @@
#include "global.h"
#include "n64dd.h"
#include "libc64/aprintf.h"
#include "attributes.h"
#include "global.h"
// Draws text to framebuffer
typedef struct struct_801CA704 {

View file

@ -1,11 +1,15 @@
// Main interface for the 64DD from the rest of the game. Starts background
// threads and provides functions to submit commands to them.
#include "global.h"
#include "libc64/sleep.h"
#include "fault.h"
#include "irqmgr.h"
#include "line_numbers.h"
#include "n64dd.h"
#include "stack.h"
#include "stackcheck.h"
#include "sys_freeze.h"
#include "versions.h"
#include "line_numbers.h"
#include "z64audio.h"
#include "z64thread.h"
#pragma increment_block_number "ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128"

Some files were not shown because too many files have changed in this diff Show more