mirror of
https://github.com/zeldaret/mm.git
synced 2024-11-26 22:30:58 +00:00
Introduce a bunch of small new headers (#1649)
* regs.h * gfxalloc.h * z64inventory.h * gfx.h * graph.h * z64olib.h * z64elf_message.h * fix missing include * Include z64inventory.h on z64save.h * fix bss * Move PosRot to z64math.h * So dumb * Update src/overlays/actors/ovl_En_Kusa/z_en_kusa.c Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * review * Remove graph.h * bss --------- Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
This commit is contained in:
parent
43cac34566
commit
cd087d8511
@ -174,9 +174,6 @@ void func_800BDAA0(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overr
|
||||
void Actor_ChangeAnimationByInfo(SkelAnime* skelAnime, AnimationInfo* animInfo, s32 animIndex);
|
||||
void Actor_Noop(Actor* actor, PlayState* play);
|
||||
|
||||
void Gfx_DrawDListOpa(PlayState* play, Gfx* dList);
|
||||
void Gfx_DrawDListXlu(PlayState* play, Gfx* dList);
|
||||
|
||||
Actor* Actor_FindNearby(PlayState* play, Actor* inActor, s16 actorId, u8 actorCategory, f32 distance);
|
||||
s32 func_800BE184(PlayState* play, Actor* actor, f32 xzDist, s16 arg3, s16 arg4, s16 arg5);
|
||||
u8 Actor_ApplyDamage(Actor* actor);
|
||||
@ -224,27 +221,6 @@ s32 Actor_TrackPlayer(PlayState* play, Actor* actor, Vec3s* headRot, Vec3s* tors
|
||||
|
||||
void GetItem_Draw(PlayState* play, s16 drawId);
|
||||
|
||||
u16 QuestHint_GetTatlTextId(PlayState* play);
|
||||
|
||||
f32 OLib_Vec3fDist(Vec3f* a, Vec3f* b);
|
||||
f32 OLib_Vec3fDistOutDiff(Vec3f* a, Vec3f* b, Vec3f* dest);
|
||||
f32 OLib_Vec3fDistXZ(Vec3f* a, Vec3f* b);
|
||||
f32 OLib_ClampMinDist(f32 val, f32 min);
|
||||
f32 OLib_ClampMaxDist(f32 val, f32 max);
|
||||
Vec3f OLib_Vec3fDistNormalize(Vec3f* a, Vec3f* b);
|
||||
Vec3f OLib_VecSphToVec3f(VecSph* sph);
|
||||
Vec3f OLib_VecGeoToVec3f(VecGeo* geo);
|
||||
VecSph OLib_Vec3fToVecSph(Vec3f* vec);
|
||||
VecGeo OLib_Vec3fToVecGeo(Vec3f* vec);
|
||||
VecSph OLib_Vec3fDiffToVecSph(Vec3f* a, Vec3f* b);
|
||||
VecGeo OLib_Vec3fDiffToVecGeo(Vec3f* a, Vec3f* b);
|
||||
Vec3f OLib_AddVecGeoToVec3f(Vec3f* a, VecGeo* geo);
|
||||
Vec3f OLib_Vec3fDiffRad(Vec3f* a, Vec3f* b);
|
||||
Vec3f OLib_Vec3fDiffDegF(Vec3f* a, Vec3f* b);
|
||||
Vec3s OLib_Vec3fDiffBinAng(Vec3f* a, Vec3f* b);
|
||||
void OLib_Vec3fDiff(PosRot* a, Vec3f* b, Vec3f* dest, s16 mode);
|
||||
void OLib_Vec3fAdd(PosRot* a, Vec3f* b, Vec3f* dest, s16 mode);
|
||||
|
||||
void Room_Noop(PlayState* play, Room* room, Input* input, s32 arg3);
|
||||
void Room_Init(PlayState* play, RoomContext* roomCtx);
|
||||
size_t Room_AllocateAndLoad(PlayState* play, RoomContext* roomCtx);
|
||||
@ -253,32 +229,6 @@ s32 Room_HandleLoadCallbacks(PlayState* play, RoomContext* roomCtx);
|
||||
void Room_Draw(PlayState* play, Room* room, u32 flags);
|
||||
|
||||
void func_8012EBF8(PlayState* play, RoomContext* roomCtx);
|
||||
s32 Inventory_GetBtnBItem(PlayState* play);
|
||||
void Inventory_ChangeEquipment(s16 value);
|
||||
u8 Inventory_DeleteEquipment(PlayState* play, s16 equipment);
|
||||
void Inventory_ChangeUpgrade(s16 upgrade, u32 value);
|
||||
s32 Inventory_IsMapVisible(s16 sceneId);
|
||||
void Inventory_SetWorldMapCloudVisibility(s16 tingleIndex);
|
||||
void Inventory_SaveDekuPlaygroundHighScore(s16 timerId);
|
||||
void Inventory_IncrementSkullTokenCount(s16 sceneIndex);
|
||||
s16 Inventory_GetSkullTokenCount(s16 sceneIndex);
|
||||
void Inventory_SaveLotteryCodeGuess(PlayState* play);
|
||||
|
||||
void Graph_FaultClient(void);
|
||||
void Graph_InitTHGA(TwoHeadGfxArena* arena, Gfx* buffer, s32 size);
|
||||
void Graph_SetNextGfxPool(GraphicsContext* gfxCtx);
|
||||
GameStateOverlay* Graph_GetNextGameState(GameState* gameState);
|
||||
uintptr_t Graph_FaultAddrConv(uintptr_t address, void* param);
|
||||
void Graph_Init(GraphicsContext* gfxCtx);
|
||||
void Graph_Destroy(GraphicsContext* gfxCtx);
|
||||
void Graph_TaskSet00(GraphicsContext* gfxCtx, GameState* gameState);
|
||||
void Graph_UpdateGame(GameState* gameState);
|
||||
void Graph_ExecuteAndDraw(GraphicsContext* gfxCtx, GameState* gameState);
|
||||
void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState);
|
||||
void Graph_ThreadEntry(void* arg);
|
||||
Gfx* Gfx_Open(Gfx* gfx);
|
||||
Gfx* Gfx_Close(Gfx* gfx, Gfx* dst);
|
||||
void* Gfx_Alloc(Gfx** gfxP, size_t size);
|
||||
|
||||
void func_80183070(void);
|
||||
|
||||
@ -311,6 +261,4 @@ void Audio_ResetForAudioHeapStep2(void);
|
||||
void Audio_ResetForAudioHeapStep1(s32 specId);
|
||||
void Audio_PreNMI(void);
|
||||
|
||||
void Regs_InitData(PlayState* play);
|
||||
|
||||
#endif
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "unk.h"
|
||||
|
||||
struct GameState;
|
||||
struct PlayState;
|
||||
|
||||
#define TMEM_SIZE 0x1000
|
||||
|
||||
@ -88,7 +89,7 @@ typedef enum SetupDL {
|
||||
/* 0x49 */ SETUPDL_MAX
|
||||
} SetupDL;
|
||||
|
||||
typedef struct {
|
||||
typedef struct GfxMasterList {
|
||||
/* 0x000 */ Gfx taskStart[9];
|
||||
/* 0x048 */ Gfx clearZBuffer[8]; // original name: clear_zb_dl
|
||||
/* 0x088 */ Gfx clearFrameBuffer[5]; // original name: clear_fb_dl
|
||||
@ -155,6 +156,9 @@ typedef struct GraphicsContext {
|
||||
/* 0x2EC */ GfxMasterList* masterList;
|
||||
} GraphicsContext; // size = 0x2F0
|
||||
|
||||
// graph.c
|
||||
void Graph_ThreadEntry(void* arg);
|
||||
|
||||
Gfx* Gfx_SetFog(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f);
|
||||
Gfx* Gfx_SetFogWithSync(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f);
|
||||
Gfx* Gfx_SetFog2(Gfx* gfx, s32 r, s32 g, s32 b, s32 a, s32 n, s32 f);
|
||||
@ -236,6 +240,12 @@ void func_8012CF0C(GraphicsContext* gfxCtx, s32 clearFb, s32 clearZb, u8 r, u8 g
|
||||
void func_8012D374(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b);
|
||||
void func_8012D40C(f32* param_1, f32* param_2, s16* param_3);
|
||||
|
||||
void Gfx_DrawDListOpa(struct PlayState* play, Gfx* dList);
|
||||
void Gfx_DrawDListXlu(struct PlayState* play, Gfx* dList);
|
||||
|
||||
// graph.c
|
||||
extern struct GfxMasterList* gGfxMasterDL;
|
||||
|
||||
extern Gfx gSetupDLs[SETUPDL_MAX][6];
|
||||
extern Gfx gEmptyDL[];
|
||||
|
||||
|
10
include/gfxalloc.h
Normal file
10
include/gfxalloc.h
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef GFXALLOC_H
|
||||
#define GFXALLOC_H
|
||||
|
||||
#include "ultra64.h"
|
||||
|
||||
Gfx* Gfx_Open(Gfx* gfx);
|
||||
Gfx* Gfx_Close(Gfx* gfx, Gfx* dst);
|
||||
void* Gfx_Alloc(Gfx** gfxP, size_t size);
|
||||
|
||||
#endif
|
@ -7,6 +7,7 @@
|
||||
#include "ultra64.h"
|
||||
#include "unk.h"
|
||||
|
||||
struct PlayState;
|
||||
|
||||
#define REG_GROUPS 29 // number of REG groups, i.e. REG, SREG, OREG, etc.
|
||||
#define REG_PAGES 6
|
||||
@ -182,4 +183,6 @@ extern RegEditor* gRegEditor;
|
||||
// Name inferred from OoT. Set to true to manually set play->csCtx.script
|
||||
#define R_USE_DEBUG_CUTSCENE dREG(95)
|
||||
|
||||
void Regs_InitData(struct PlayState* play);
|
||||
|
||||
#endif
|
||||
|
@ -8,22 +8,6 @@
|
||||
|
||||
// data
|
||||
|
||||
extern u32 gBitFlags[32];
|
||||
extern u16 gEquipMasks[];
|
||||
extern u16 gEquipNegMasks[];
|
||||
extern u32 gUpgradeMasks[8];
|
||||
extern u32 gUpgradeNegMasks[];
|
||||
extern u8 gEquipShifts[];
|
||||
extern u8 gUpgradeShifts[8];
|
||||
extern u16 gUpgradeCapacities[][4];
|
||||
extern u32 gGsFlagsMask[];
|
||||
extern u32 gGsFlagsShift[];
|
||||
extern TexturePtr gItemIcons[];
|
||||
extern u8 gItemSlots[];
|
||||
extern s16 gItemPrices[];
|
||||
extern u16 gSceneIdsPerRegion[11][27];
|
||||
extern u8 gPlayerFormItemRestrictions[PLAYER_FORM_MAX][114];
|
||||
|
||||
extern s16 gLowPassFilterData[];
|
||||
extern s16 gHighPassFilterData[];
|
||||
extern s16 gBandStopFilterData[];
|
||||
@ -61,8 +45,6 @@ extern u8 gSampleBankTable[];
|
||||
|
||||
// bss
|
||||
|
||||
extern GfxMasterList* gGfxMasterDL;
|
||||
|
||||
extern u64* gAudioSPDataPtr;
|
||||
extern u32 gAudioSPDataSize;
|
||||
|
||||
|
@ -25,11 +25,6 @@ typedef void (*ActorFunc)(struct Actor* this, struct PlayState* play);
|
||||
typedef u16 (*NpcGetTextIdFunc)(struct PlayState*, struct Actor*);
|
||||
typedef s16 (*NpcUpdateTalkStateFunc)(struct PlayState*, struct Actor*);
|
||||
|
||||
typedef struct PosRot {
|
||||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ Vec3s rot;
|
||||
} PosRot; // size = 0x14
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 unk_0; // frame?
|
||||
/* 0x2 */ Vec3s unk_2; // scale
|
||||
|
@ -4,6 +4,13 @@
|
||||
#include "ultra64.h"
|
||||
#include "unk.h"
|
||||
|
||||
#include "color.h"
|
||||
|
||||
#include "z64math.h"
|
||||
|
||||
struct Actor;
|
||||
struct Camera;
|
||||
struct PlayState;
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
@ -789,7 +796,7 @@ typedef struct CutsceneCamera {
|
||||
/* 0x70 */ CsCmdCamPoint* atCmd;
|
||||
/* 0x74 */ CsCmdCamPoint* eyeCmd;
|
||||
/* 0x78 */ CsCmdCamMisc* miscCmd;
|
||||
/* 0x7C */ Camera* camera;
|
||||
/* 0x7C */ struct Camera* camera;
|
||||
} CutsceneCamera; // size = 0x80
|
||||
|
||||
typedef enum {
|
||||
@ -811,24 +818,24 @@ void Cutscene_UpdateScripted(struct PlayState* play, CutsceneContext* csCtx);
|
||||
void Cutscene_HandleEntranceTriggers(struct PlayState* play);
|
||||
void func_800EDDB0(struct PlayState* play);
|
||||
void Cutscene_StartScripted(struct PlayState* play, u8 scriptIndex);
|
||||
void Cutscene_ActorTranslate(Actor* actor, struct PlayState* play, s32 cueChannel);
|
||||
void Cutscene_ActorTranslateAndYaw(Actor* actor, struct PlayState* play, s32 cueChannel);
|
||||
void Cutscene_ActorTranslateAndYawSmooth(Actor* actor, struct PlayState* play, s32 cueChannel);
|
||||
void Cutscene_ActorTranslateXZAndYawSmooth(Actor* actor, struct PlayState* play, s32 cueChannel);
|
||||
void Cutscene_ActorTranslate(struct Actor* actor, struct PlayState* play, s32 cueChannel);
|
||||
void Cutscene_ActorTranslateAndYaw(struct Actor* actor, struct PlayState* play, s32 cueChannel);
|
||||
void Cutscene_ActorTranslateAndYawSmooth(struct Actor* actor, struct PlayState* play, s32 cueChannel);
|
||||
void Cutscene_ActorTranslateXZAndYawSmooth(struct Actor* actor, struct PlayState* play, s32 cueChannel);
|
||||
s32 Cutscene_GetSceneLayer(struct PlayState* play);
|
||||
s32 Cutscene_GetCueChannel(struct PlayState* play, u16 cueType);
|
||||
s32 Cutscene_IsCueInChannel(struct PlayState* play, u16 cueType);
|
||||
u8 Cutscene_IsPlaying(struct PlayState* play);
|
||||
|
||||
void CutsceneManager_Init(struct PlayState* play, CutsceneEntry* cutsceneList, s16 numEntries);
|
||||
void CutsceneManager_StoreCamera(Camera* camera);
|
||||
void CutsceneManager_StoreCamera(struct Camera* camera);
|
||||
void CutsceneManager_ClearWaiting(void);
|
||||
s16 CutsceneManager_Update(void);
|
||||
void CutsceneManager_Queue(s16 csId);
|
||||
s16 CutsceneManager_IsNext(s16 csId);
|
||||
s16 CutsceneManager_StartWithPlayerCs(s16 csId, Actor* actor);
|
||||
s16 CutsceneManager_StartWithPlayerCsAndSetFlag(s16 csId, Actor* actor);
|
||||
s16 CutsceneManager_Start(s16 csId, Actor* actor);
|
||||
s16 CutsceneManager_StartWithPlayerCs(s16 csId, struct Actor* actor);
|
||||
s16 CutsceneManager_StartWithPlayerCsAndSetFlag(s16 csId, struct Actor* actor);
|
||||
s16 CutsceneManager_Start(s16 csId, struct Actor* actor);
|
||||
s16 CutsceneManager_Stop(s16 csId);
|
||||
s16 CutsceneManager_GetCurrentCsId(void);
|
||||
CutsceneEntry* CutsceneManager_GetCutsceneEntry(s16 csId);
|
||||
@ -838,10 +845,10 @@ s16 CutsceneManager_GetCutsceneScriptIndex(s16 csId);
|
||||
s16 CutsceneManager_GetCutsceneCustomValue(s16 csId);
|
||||
s16 CutsceneManager_GetCurrentSubCamId(s16 csId);
|
||||
s16 CutsceneManager_FindEntranceCsId(void);
|
||||
s32 func_800F22C4(s16 csId, Actor* actor);
|
||||
s32 func_800F22C4(s16 csId, struct Actor* actor);
|
||||
void CutsceneManager_SetReturnCamera(s16 camId);
|
||||
|
||||
s32 CutsceneCamera_Init(Camera* camera, CutsceneCamera* csCamera);
|
||||
s32 CutsceneCamera_Init(struct Camera* camera, CutsceneCamera* csCamera);
|
||||
s32 CutsceneCamera_UpdateSplines(u8* script, CutsceneCamera* csCamera);
|
||||
void CutsceneCamera_SetState(s16 state);
|
||||
void CutsceneCamera_Reset(void);
|
||||
|
10
include/z64elf_message.h
Normal file
10
include/z64elf_message.h
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef Z64ELF_MESSAGE_H
|
||||
#define Z64ELF_MESSAGE_H
|
||||
|
||||
#include "PR/ultratypes.h"
|
||||
|
||||
struct PlayState;
|
||||
|
||||
u16 QuestHint_GetTatlTextId(struct PlayState* play);
|
||||
|
||||
#endif
|
35
include/z64inventory.h
Normal file
35
include/z64inventory.h
Normal file
@ -0,0 +1,35 @@
|
||||
#ifndef Z64INVENTORY_H
|
||||
#define Z64INVENTORY_H
|
||||
|
||||
#include "PR/ultratypes.h"
|
||||
|
||||
struct PlayState;
|
||||
|
||||
s32 Inventory_GetBtnBItem(struct PlayState* play);
|
||||
void Inventory_ChangeEquipment(s16 value);
|
||||
u8 Inventory_DeleteEquipment(struct PlayState* play, s16 equipment);
|
||||
void Inventory_ChangeUpgrade(s16 upgrade, u32 value);
|
||||
s32 Inventory_IsMapVisible(s16 sceneId);
|
||||
void Inventory_SetWorldMapCloudVisibility(s16 tingleIndex);
|
||||
void Inventory_SaveDekuPlaygroundHighScore(s16 timerId);
|
||||
void Inventory_IncrementSkullTokenCount(s16 sceneIndex);
|
||||
s16 Inventory_GetSkullTokenCount(s16 sceneIndex);
|
||||
void Inventory_SaveLotteryCodeGuess(struct PlayState* play);
|
||||
|
||||
extern u32 gBitFlags[32];
|
||||
extern u16 gEquipMasks[];
|
||||
extern u16 gEquipNegMasks[];
|
||||
extern u32 gUpgradeMasks[8];
|
||||
extern u32 gUpgradeNegMasks[];
|
||||
extern u8 gEquipShifts[];
|
||||
extern u8 gUpgradeShifts[8];
|
||||
extern u16 gUpgradeCapacities[][4];
|
||||
extern u32 gGsFlagsMask[];
|
||||
extern u32 gGsFlagsShift[];
|
||||
extern TexturePtr gItemIcons[];
|
||||
extern u8 gItemSlots[];
|
||||
extern s16 gItemPrices[];
|
||||
extern u16 gSceneIdsPerRegion[11][27];
|
||||
extern u8 gPlayerFormItemRestrictions[][114];
|
||||
|
||||
#endif
|
@ -62,6 +62,11 @@ typedef struct {
|
||||
/* 0xC */ f32 radius;
|
||||
} Spheref; // size = 0x10
|
||||
|
||||
typedef struct PosRot {
|
||||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ Vec3s rot;
|
||||
} PosRot; // size = 0x14
|
||||
|
||||
/*
|
||||
The plane paramaters are of form `ax + by + cz + d = 0`
|
||||
where `(a,b,c)` is the plane's normal vector and d is the originDist
|
||||
@ -114,19 +119,6 @@ typedef VecSphGeo VecSph;
|
||||
// Pitch is 0 along the xz-plane (horizon)
|
||||
typedef VecSphGeo VecGeo;
|
||||
|
||||
// To be used with OLib_Vec3fAdd()
|
||||
typedef enum {
|
||||
/* 0 */ OLIB_ADD_COPY, // Copy `b` to dest
|
||||
/* 1 */ OLIB_ADD_OFFSET, // Add `a` and `b` to dest, and also add the yaw of `a` to the dest
|
||||
/* 2 */ OLIB_ADD // Add `a` and `b` to dest
|
||||
} OlibVec3fAdd;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ OLIB_DIFF_COPY, // Copy `b` to dest
|
||||
/* 1 */ OLIB_DIFF_OFFSET, // Sub `a` and `b` to dest, and also subs the yaw of `a` to the dest
|
||||
/* 2 */ OLIB_DIFF // Sub `a` and `b` to dest
|
||||
} OlibVec3fDiff;
|
||||
|
||||
typedef float MtxF_t[4][4];
|
||||
typedef union {
|
||||
MtxF_t mf;
|
||||
|
40
include/z64olib.h
Normal file
40
include/z64olib.h
Normal file
@ -0,0 +1,40 @@
|
||||
#ifndef Z64OLIB_H
|
||||
#define Z64OLIB_H
|
||||
|
||||
#include "ultra64.h"
|
||||
|
||||
#include "z64math.h"
|
||||
|
||||
// To be used with OLib_Vec3fAdd()
|
||||
typedef enum {
|
||||
/* 0 */ OLIB_ADD_COPY, // Copy `b` to dest
|
||||
/* 1 */ OLIB_ADD_OFFSET, // Add `a` and `b` to dest, and also add the yaw of `a` to the dest
|
||||
/* 2 */ OLIB_ADD // Add `a` and `b` to dest
|
||||
} OlibVec3fAdd;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ OLIB_DIFF_COPY, // Copy `b` to dest
|
||||
/* 1 */ OLIB_DIFF_OFFSET, // Sub `a` and `b` to dest, and also subs the yaw of `a` to the dest
|
||||
/* 2 */ OLIB_DIFF // Sub `a` and `b` to dest
|
||||
} OlibVec3fDiff;
|
||||
|
||||
f32 OLib_Vec3fDist(Vec3f* a, Vec3f* b);
|
||||
f32 OLib_Vec3fDistOutDiff(Vec3f* a, Vec3f* b, Vec3f* dest);
|
||||
f32 OLib_Vec3fDistXZ(Vec3f* a, Vec3f* b);
|
||||
f32 OLib_ClampMinDist(f32 val, f32 min);
|
||||
f32 OLib_ClampMaxDist(f32 val, f32 max);
|
||||
Vec3f OLib_Vec3fDistNormalize(Vec3f* a, Vec3f* b);
|
||||
Vec3f OLib_VecSphToVec3f(VecSph* sph);
|
||||
Vec3f OLib_VecGeoToVec3f(VecGeo* geo);
|
||||
VecSph OLib_Vec3fToVecSph(Vec3f* vec);
|
||||
VecGeo OLib_Vec3fToVecGeo(Vec3f* vec);
|
||||
VecSph OLib_Vec3fDiffToVecSph(Vec3f* a, Vec3f* b);
|
||||
VecGeo OLib_Vec3fDiffToVecGeo(Vec3f* a, Vec3f* b);
|
||||
Vec3f OLib_AddVecGeoToVec3f(Vec3f* a, VecGeo* geo);
|
||||
Vec3f OLib_Vec3fDiffRad(Vec3f* a, Vec3f* b);
|
||||
Vec3f OLib_Vec3fDiffDegF(Vec3f* a, Vec3f* b);
|
||||
Vec3s OLib_Vec3fDiffBinAng(Vec3f* a, Vec3f* b);
|
||||
void OLib_Vec3fDiff(PosRot* a, Vec3f* b, Vec3f* dest, s16 mode);
|
||||
void OLib_Vec3fAdd(PosRot* a, Vec3f* b, Vec3f* dest, s16 mode);
|
||||
|
||||
#endif
|
@ -3,8 +3,11 @@
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "PR/os.h"
|
||||
|
||||
#include "z64inventory.h"
|
||||
#include "z64item.h"
|
||||
#include "z64math.h"
|
||||
|
||||
#include "unk.h"
|
||||
|
||||
struct GameState;
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include "PR/ultratypes.h"
|
||||
#include "z64actor.h"
|
||||
|
||||
struct PlayState;
|
||||
|
||||
typedef s32 (*PictoValidationFunc)(struct PlayState*, Actor*);
|
||||
|
||||
typedef struct {
|
||||
@ -42,11 +44,11 @@ typedef enum {
|
||||
#define PICTO_VALID_TOPLEFT_X ((SCREEN_WIDTH - PICTO_VALID_WIDTH) / 2)
|
||||
#define PICTO_VALID_TOPLEFT_Y ((SCREEN_HEIGHT - PICTO_VALID_HEIGHT) / 2)
|
||||
|
||||
s32 Snap_RecordPictographedActors(PlayState* play);
|
||||
s32 Snap_RecordPictographedActors(struct PlayState* play);
|
||||
void Snap_SetFlag(s32 flag);
|
||||
void Snap_UnsetFlag(s32 flag);
|
||||
u32 Snap_CheckFlag(s32 flag);
|
||||
s16 Snap_AbsS(s16 val);
|
||||
s32 Snap_ValidatePictograph(PlayState* play, Actor* actor, s32 flag, Vec3f* pos, Vec3s* rot, f32 distanceMin, f32 distanceMax, s16 angleRange);
|
||||
s32 Snap_ValidatePictograph(struct PlayState* play, Actor* actor, s32 flag, Vec3f* pos, Vec3s* rot, f32 distanceMin, f32 distanceMax, s16 angleRange);
|
||||
|
||||
#endif
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "color.h"
|
||||
#include "macros.h"
|
||||
#include "gfx.h"
|
||||
#include "gfxalloc.h"
|
||||
#include "slowly.h"
|
||||
#include "stack.h"
|
||||
#include "stackcheck.h"
|
||||
|
@ -1,6 +1,9 @@
|
||||
#include "global.h"
|
||||
|
||||
#include "string.h"
|
||||
|
||||
#include "z64olib.h"
|
||||
|
||||
CutsceneCamera* sCurCsCamera;
|
||||
|
||||
typedef s16 (*CsCamInterpolateCallback)(Vec3f*, f32*, s16*, CsCmdCamPoint*, CsCmdCamMisc*, CutsceneCameraInterp*);
|
||||
|
@ -11,6 +11,8 @@
|
||||
*/
|
||||
|
||||
#include "flg_set.h"
|
||||
|
||||
#include "gfxalloc.h"
|
||||
#include "global.h"
|
||||
|
||||
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
|
||||
|
@ -1,14 +1,21 @@
|
||||
#include "z64game.h"
|
||||
|
||||
#include "global.h"
|
||||
#include "audiomgr.h"
|
||||
#include "debug.h"
|
||||
#include "gfx.h"
|
||||
#include "gfxalloc.h"
|
||||
#include "idle.h"
|
||||
#include "regs.h"
|
||||
#include "sys_cfb.h"
|
||||
#include "libc64/malloc.h"
|
||||
|
||||
#include "z64debug_text.h"
|
||||
#include "z64pause_menu.h"
|
||||
#include "z64rumble.h"
|
||||
#include "z64speed_meter.h"
|
||||
#include "z64vimode.h"
|
||||
#include "z64vis.h"
|
||||
#include "debug.h"
|
||||
|
||||
s32 gFramerateDivisor = 1;
|
||||
f32 gFramerateDivisorF = 1.0f;
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "gfxalloc.h"
|
||||
|
||||
#include "alignment.h"
|
||||
|
||||
Gfx* Gfx_Open(Gfx* gfx) {
|
||||
return &gfx[1];
|
||||
|
@ -1,14 +1,17 @@
|
||||
#include "z64.h"
|
||||
#include "regs.h"
|
||||
#include "fault.h"
|
||||
#include "ultra64.h"
|
||||
|
||||
#include "scheduler.h"
|
||||
|
||||
// Variables are put before most headers as a hacky way to bypass bss reordering
|
||||
FaultAddrConvClient sGraphFaultAddrConvClient;
|
||||
FaultClient sGraphFaultClient;
|
||||
GfxMasterList* gGfxMasterDL;
|
||||
struct FaultAddrConvClient sGraphFaultAddrConvClient;
|
||||
struct FaultClient sGraphFaultClient;
|
||||
struct GfxMasterList* gGfxMasterDL;
|
||||
CfbInfo sGraphCfbInfos[3];
|
||||
OSTime sGraphPrevUpdateEndTime;
|
||||
|
||||
#include "regs.h"
|
||||
#include "fault.h"
|
||||
|
||||
#include "macros.h"
|
||||
#include "buffers.h"
|
||||
#include "idle.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "prevent_bss_reordering2.h" // bumps the bss index by 65
|
||||
// clang-format off
|
||||
// Partial structs taken from "prevent_bss_reordering.h", bumps the bss index by 56
|
||||
// Partial structs taken from "prevent_bss_reordering.h", bumps the bss index by 59
|
||||
struct Dummy200 { int x; };
|
||||
struct Dummy201 { int x; };
|
||||
struct Dummy202 { int x; };
|
||||
@ -29,12 +29,15 @@ struct Dummy224 { int x; };
|
||||
struct Dummy225 { int x; };
|
||||
struct Dummy226 { int x; };
|
||||
struct Dummy227 { int x; };
|
||||
struct Dummy228 { int x; };
|
||||
typedef int Dummy229;
|
||||
|
||||
// clang-format on
|
||||
|
||||
// Headers are currently valued at 63 mod 256 (./tools/calc_bss.sh <headers>)
|
||||
// Headers are currently valued at 60 mod 256 (./tools/calc_bss.sh <headers>)
|
||||
#include "z64math.h"
|
||||
|
||||
#include "libc/stdbool.h"
|
||||
#include "stdbool.h"
|
||||
#include "PR/gu.h"
|
||||
// The bss index at this point should be 184
|
||||
|
||||
|
@ -43,12 +43,17 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "z64camera.h"
|
||||
|
||||
#include "global.h"
|
||||
#include "string.h"
|
||||
|
||||
#include "z64malloc.h"
|
||||
#include "z64olib.h"
|
||||
#include "z64quake.h"
|
||||
#include "z64shrink_window.h"
|
||||
#include "z64view.h"
|
||||
|
||||
#include "overlays/actors/ovl_En_Horse/z_en_horse.h"
|
||||
|
||||
void func_800DDFE0(Camera* camera);
|
||||
|
@ -1,5 +1,10 @@
|
||||
#include "z64debug_text.h"
|
||||
#include "global.h"
|
||||
|
||||
#include "color.h"
|
||||
#include "gfx.h"
|
||||
#include "gfxalloc.h"
|
||||
#include "gfxprint.h"
|
||||
#include "macros.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 colorIndex;
|
||||
|
@ -7,7 +7,12 @@
|
||||
* which hint to give based on a script.
|
||||
* That system has been replaced with a single function that hardcodes the checks.
|
||||
*/
|
||||
|
||||
#include "z64elf_message.h"
|
||||
|
||||
#include "global.h"
|
||||
#include "z64save.h"
|
||||
#include "z64scene.h"
|
||||
|
||||
/**
|
||||
* Gets the relevant text ID for Tatl hints in first cycle.
|
||||
|
@ -4,10 +4,14 @@
|
||||
* Manages all cutscenes except for manual
|
||||
*/
|
||||
|
||||
#include "global.h"
|
||||
#include "z64shrink_window.h"
|
||||
#include "z64cutscene.h"
|
||||
|
||||
#include "string.h"
|
||||
|
||||
#include "global.h"
|
||||
#include "z64olib.h"
|
||||
#include "z64shrink_window.h"
|
||||
|
||||
CutsceneEntry sGlobalCutsceneList[] = {
|
||||
// CS_ID_GLOBAL_78
|
||||
{ -100, -1, CS_CAM_ID_NONE, CS_SCRIPT_ID_NONE, CS_ID_NONE, CS_END_SFX_NONE_ALT, 255, CS_HUD_VISIBILITY_ALL_ALT, 255,
|
||||
|
@ -1,4 +1,14 @@
|
||||
#include "z64inventory.h"
|
||||
|
||||
#include "global.h"
|
||||
#include "regs.h"
|
||||
|
||||
#include "z64item.h"
|
||||
#include "z64interface.h"
|
||||
#include "z64player.h"
|
||||
#include "z64save.h"
|
||||
#include "z64scene.h"
|
||||
|
||||
#include "interface/parameter_static/parameter_static.h"
|
||||
#include "archives/icon_item_static/icon_item_static_yar.h"
|
||||
#include "archives/icon_item_24_static/icon_item_24_static_yar.h"
|
||||
|
@ -61,6 +61,7 @@ Gfx* sSkyboxStarsDList;
|
||||
|
||||
#include "z64environment.h"
|
||||
|
||||
#include "gfxalloc.h"
|
||||
#include "global.h"
|
||||
#include "string.h"
|
||||
#include "sys_cfb.h"
|
||||
|
@ -2,10 +2,12 @@
|
||||
#include "z64message.h"
|
||||
#include "global.h"
|
||||
|
||||
#include "gfxalloc.h"
|
||||
#include "message_data_static.h"
|
||||
#include "padmgr.h"
|
||||
#include "sys_cmpdma.h"
|
||||
#include "segment_symbols.h"
|
||||
|
||||
#include "z64actor.h"
|
||||
#include "z64horse.h"
|
||||
#include "z64shrink_window.h"
|
||||
|
@ -1,4 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "z64olib.h"
|
||||
|
||||
#include "macros.h"
|
||||
#include "z64camera.h"
|
||||
|
||||
/**
|
||||
* Calculates the distances between `a` and `b`
|
||||
|
@ -16,6 +16,7 @@ u8 sMotionBlurStatus;
|
||||
#include "z64play.h"
|
||||
|
||||
#include "buffers.h"
|
||||
#include "gfxalloc.h"
|
||||
#include "idle.h"
|
||||
#include "regs.h"
|
||||
#include "sys_cfb.h"
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "string.h"
|
||||
|
||||
#include "global.h"
|
||||
#include "z64olib.h"
|
||||
#include "z64view.h"
|
||||
|
||||
typedef struct {
|
||||
|
@ -1,6 +1,12 @@
|
||||
#include "gfx.h"
|
||||
|
||||
#include "global.h"
|
||||
#include "gfxalloc.h"
|
||||
#include "regs.h"
|
||||
#include "sys_cfb.h"
|
||||
|
||||
#include "z64pause_menu.h"
|
||||
|
||||
Gfx gSetupDLs[SETUPDL_MAX][6] = {
|
||||
{
|
||||
/* SETUPDL_0 */
|
||||
|
@ -1,5 +1,8 @@
|
||||
#include "global.h"
|
||||
#include "z64snap.h"
|
||||
|
||||
#include "global.h"
|
||||
#include "z64olib.h"
|
||||
|
||||
#include "overlays/actors/ovl_En_Kakasi/z_en_kakasi.h"
|
||||
|
||||
#define PICTO_SEEN_IN_SCENE 1
|
||||
|
@ -10,8 +10,10 @@
|
||||
* VisFbuf_Draw() for how to do this.
|
||||
*/
|
||||
|
||||
#include "global.h"
|
||||
#include "z64visfbuf.h"
|
||||
|
||||
#include "gfxalloc.h"
|
||||
#include "global.h"
|
||||
#include "sys_cfb.h"
|
||||
#include "sys_ucode.h"
|
||||
|
||||
|
@ -7,7 +7,10 @@
|
||||
* color palette that converts each color into the desaturated equivalent. More precise details can be found in inline
|
||||
* comments.
|
||||
*/
|
||||
|
||||
#include "z64vis.h"
|
||||
|
||||
#include "gfxalloc.h"
|
||||
#include "global.h"
|
||||
#include "libc64/malloc.h"
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
* Description: Woodfall scene objects (temple, water, walls, etc)
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_dm_char01.h"
|
||||
#include "objects/object_mtoride/object_mtoride.h"
|
||||
#include "overlays/actors/ovl_Obj_Etcetera/z_obj_etcetera.h"
|
||||
|
@ -5,6 +5,9 @@
|
||||
*/
|
||||
|
||||
#include "z_en_egol.h"
|
||||
|
||||
#include "z64olib.h"
|
||||
|
||||
#include "objects/object_eg/object_eg.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "overlays/actors/ovl_En_Arrow/z_en_arrow.h"
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#include "z_en_elf.h"
|
||||
|
||||
#include "z64elf_message.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20 | ACTOR_FLAG_2000000)
|
||||
|
||||
#define THIS ((EnElf*)thisx)
|
||||
|
@ -5,6 +5,9 @@
|
||||
*/
|
||||
|
||||
#include "z_en_jso2.h"
|
||||
|
||||
#include "z64olib.h"
|
||||
|
||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.h"
|
||||
#include "overlays/actors/ovl_En_Col_Man/z_en_col_man.h"
|
||||
|
@ -6,6 +6,9 @@
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_en_kakasi.h"
|
||||
|
||||
#include "z64olib.h"
|
||||
|
||||
#include "objects/object_ka/object_ka.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_10 | ACTOR_FLAG_2000000)
|
||||
|
@ -4,7 +4,6 @@
|
||||
* Description: Grass / Bush
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_en_kusa.h"
|
||||
#include "objects/object_kusa/object_kusa.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
@ -5,6 +5,9 @@
|
||||
*/
|
||||
|
||||
#include "z_en_mag.h"
|
||||
|
||||
#include "gfxalloc.h"
|
||||
|
||||
#include "objects/object_mag/object_mag.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_10 | ACTOR_FLAG_20)
|
||||
|
@ -5,6 +5,9 @@
|
||||
*/
|
||||
|
||||
#include "z_kaleido_scope.h"
|
||||
|
||||
#include "gfxalloc.h"
|
||||
|
||||
#include "interface/parameter_static/parameter_static.h"
|
||||
|
||||
s16 sCurSection = 0;
|
||||
|
@ -18,7 +18,7 @@ def mapPathToSource(origName: Path) -> Path:
|
||||
# Try to map built path to the source path
|
||||
parts = origName.parts
|
||||
if parts[0] == "build":
|
||||
parts = parts[1:]
|
||||
parts = parts[2:]
|
||||
|
||||
path = Path(*parts)
|
||||
# Assume every file in the asm folder has .s extension, while everything else has .c extension
|
||||
|
Loading…
Reference in New Issue
Block a user