mirror of https://github.com/blawar/ooot.git
refactored gamestate
This commit is contained in:
parent
f7fa171f3a
commit
1f3f0fa205
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
struct DynaPolyActor;
|
||||
struct CollisionContext;
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
void DynaPolyActor_Init(DynaPolyActor* dynaActor, s32 flags);
|
||||
void func_800434A0(DynaPolyActor* dynaActor);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
struct Vec3f;
|
||||
|
||||
void Audio_PlaySoundAtPosition(GlobalContext* globalCtx, Vec3f* pos, s32 duration, u16 sfxId);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
s32 Flags_GetEnv(GlobalContext* globalCtx, s16 flag);
|
||||
void Flags_SetEnv(GlobalContext* globalCtx, s16 flag);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
void FlagSet_Update(GlobalContext* globalCtx);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
struct GameState;
|
||||
#include "globalctx.h"
|
||||
|
||||
struct GraphicsContext;
|
||||
struct OSViMode;
|
||||
|
||||
|
@ -9,15 +10,10 @@ extern f32 gViConfigYScale;
|
|||
extern OSViMode osViModeNtscLan1;
|
||||
|
||||
void* GameState_Alloc(GameState* gameState, size_t size, const char* file, s32 line);
|
||||
void GameState_Destroy(GameState* gameState);
|
||||
void GameState_Draw(GameState* gameState, GraphicsContext* gfxCtx);
|
||||
void GameState_DrawInputDisplay(u16 input, Gfx** gfx);
|
||||
void GameState_FaultPrint(void);
|
||||
GameStateFunc GameState_GetInit(GameState* gameState);
|
||||
void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* gfxCtx);
|
||||
void GameState_InitArena(GameState* gameState, size_t size);
|
||||
u32 GameState_IsRunning(GameState* gameState);
|
||||
void GameState_Realloc(GameState* gameState, size_t size);
|
||||
void GameState_ReqPadData(GameState* gameState);
|
||||
void GameState_SetFBFilter(Gfx** gfx);
|
||||
void GameState_SetFrameBuffer(GraphicsContext* gfxCtx);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
#include <memory>
|
||||
#include "globalctx.h"
|
||||
struct GraphicsContext;
|
||||
struct GameState;
|
||||
struct GameStateOverlay;
|
||||
|
||||
void* Graph_Alloc(GraphicsContext* gfxCtx, size_t size);
|
||||
void* Graph_Alloc2(GraphicsContext* gfxCtx, size_t size);
|
||||
|
@ -10,7 +10,7 @@ void Graph_CloseDisps(Gfx** dispRefs, GraphicsContext* gfxCtx, const char* file,
|
|||
void Graph_Destroy(GraphicsContext* gfxCtx);
|
||||
void Graph_DisassembleUCode(Gfx* workBuf);
|
||||
void* Graph_DlistAlloc(Gfx** gfx, u32 size);
|
||||
GameStateOverlay* Graph_GetNextGameState(GameState* gameState);
|
||||
void Graph_SetNextGameState(GameState* gameState);
|
||||
Gfx* Graph_GfxPlusOne(Gfx* gfx);
|
||||
void Graph_Init(GraphicsContext* gfxCtx);
|
||||
void Graph_InitTHGA(GraphicsContext* gfxCtx);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
extern u32 gBitFlags[32];
|
||||
extern u16 gEquipMasks[4];
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#pragma once
|
||||
#include "globalctx.h"
|
||||
|
||||
struct SpeedMeter;
|
||||
struct GraphicsContext;
|
||||
struct GameState;
|
||||
struct SpeedMeterAllocEntry;
|
||||
|
||||
extern volatile OSTime D_8016A520;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
struct GameState;
|
||||
|
||||
#include "globalctx.h"
|
||||
|
||||
struct GraphicsContext;
|
||||
struct Vec3s;
|
||||
struct Vec3f;
|
||||
|
|
|
@ -4,7 +4,6 @@ struct Arena;
|
|||
extern Arena gSystemArena;
|
||||
extern s32 gSystemArenaLogSeverity;
|
||||
|
||||
void* SystemArena_Calloc(u32 num, u32 size);
|
||||
void SystemArena_Check(void);
|
||||
void SystemArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action);
|
||||
void SystemArena_Cleanup(void);
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
#pragma once
|
||||
struct GameState;
|
||||
#include "gamestate.h"
|
||||
|
||||
namespace oot::gamestate
|
||||
{
|
||||
class TitleSetup : public Base
|
||||
{
|
||||
public:
|
||||
TitleSetup(GraphicsContext* gfxCtx);
|
||||
~TitleSetup();
|
||||
|
||||
void main() override;
|
||||
void init() override;
|
||||
Base* next() override;
|
||||
};
|
||||
} // namespace oot::gamestate
|
||||
|
||||
void TitleSetup_Destroy(GameState* gameState);
|
||||
void TitleSetup_Init(GameState* gameState);
|
||||
void TitleSetup_InitImpl(GameState* gameState);
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
#pragma once
|
||||
struct GameStateOverlay;
|
||||
|
||||
void Overlay_FreeGameState(GameStateOverlay* overlayEntry);
|
||||
void Overlay_LoadGameState(GameStateOverlay* overlayEntry);
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
struct Actor;
|
||||
struct Lights;
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
struct ActorShape;
|
||||
struct ActorContext;
|
||||
struct Collider;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
struct CollisionContext;
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
struct CollisionHeader;
|
||||
struct Vec3f;
|
||||
struct CollisionPoly;
|
||||
|
|
|
@ -7,7 +7,7 @@ struct Vec3s;
|
|||
struct Vec3f;
|
||||
struct View;
|
||||
struct CollisionContext;
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
struct Player;
|
||||
struct CutsceneCameraPoint;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
void Gfx_DrawDListOpa(GlobalContext* globalCtx, Gfx* dlist);
|
||||
void Gfx_DrawDListXlu(GlobalContext* globalCtx, Gfx* dlist);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
struct ColliderCylinder;
|
||||
struct ColliderJntSph;
|
||||
struct OcLine;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
void Message_Init(GlobalContext* globalCtx);
|
||||
void func_80110990(GlobalContext* globalCtx);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
struct GraphicsContext;
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
DebugDispObject* DebugDisplay_AddObject(f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, f32 scaleX, f32 scaleY, f32 scaleZ, u8 red, u8 green, u8 blue, u8 alpha, s16 type, GraphicsContext* gfxCtx);
|
||||
void DebugDisplay_DrawObjects(GlobalContext* globalCtx);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
#include "framerate.h"
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
struct CutsceneContext;
|
||||
|
||||
extern Counter D_8015FCC0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
void GetItem_Draw(GlobalContext* globalCtx, s16 drawId);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
struct Color_RGBA8;
|
||||
|
||||
void func_80026230(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
struct GraphicsContext;
|
||||
|
||||
void Effect_Add(GlobalContext* globalCtx, s32* pIndex, s32 type, u8 arg3, u8 arg4, void* initParams);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
struct EffectSs;
|
||||
|
||||
void EffectSs_ClearAll(GlobalContext* globalCtx);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
struct Vec3f;
|
||||
struct Color_RGBA8;
|
||||
struct Actor;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
u16 ElfMessage_GetCUpText(GlobalContext* globalCtx);
|
||||
u16 ElfMessage_GetSariaText(GlobalContext* globalCtx);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
struct Vec3f;
|
||||
struct EnItem00;
|
||||
struct Actor;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
u16 Text_GetFaceReaction(GlobalContext* globalCtx, u32 reactionSet);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
struct SkelAnimeCurve;
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
struct Actor;
|
||||
struct SkelCurveLimbList;
|
||||
struct TransformUpdateIndex;
|
||||
|
|
|
@ -1,5 +1,97 @@
|
|||
#pragma once
|
||||
struct GameState;
|
||||
#include "gamestate.h"
|
||||
#include "z64render.h"
|
||||
#include "z64environment.h"
|
||||
#include "z64message.h"
|
||||
|
||||
void FileChoose_Destroy(GameState* pthisx);
|
||||
void FileChoose_Init(GameState* pthisx);
|
||||
namespace oot::gamestate
|
||||
{
|
||||
class FileChoose : public Base
|
||||
{
|
||||
public:
|
||||
FileChoose(GraphicsContext* gfxCtx);
|
||||
~FileChoose();
|
||||
|
||||
void init() override;
|
||||
void main() override;
|
||||
Base* next() override;
|
||||
|
||||
/* 0x000A4 */ Vtx* windowVtx;
|
||||
/* 0x000B0 */ char unk_B0[0x8];
|
||||
/* 0x000B8 */ View view;
|
||||
/* 0x001E4 */ char unk_1E4[0x4];
|
||||
/* 0x001E8 */ SkyboxContext skyboxCtx;
|
||||
/* 0x00348 */ MessageContext msgCtx;
|
||||
/* 0x0E760 */ Font font;
|
||||
/* 0x1C8E8 */ EnvironmentContext envCtx;
|
||||
/* 0x1C9E4 */ char unk_1C9E4[0x4];
|
||||
/* 0x1C9E8 */ Vtx* windowContentVtx;
|
||||
/* 0x1C9EC */ Vtx* keyboardVtx;
|
||||
/* 0x1C9F0 */ Vtx* nameEntryVtx;
|
||||
/* 0x1C9F4 */ u8 n64ddFlag;
|
||||
/* 0x1C9F6 */ u16 deaths[3];
|
||||
/* 0x1C9FC */ u8 fileNames[3][8];
|
||||
/* 0x1CA14 */ u16 healthCapacities[3];
|
||||
/* 0x1CA1C */ u32 questItems[3];
|
||||
/* 0x1CA28 */ s16 n64ddFlags[3];
|
||||
/* 0x1CA2E */ s8 defense[3];
|
||||
/* 0x1CA32 */ u16 health[3];
|
||||
/* 0x1CA38 */ s16 buttonIndex;
|
||||
/* 0x1CA3A */ s16 confirmButtonIndex; // 0: yes, 1: quit
|
||||
/* 0x1CA3C */ s16 menuMode;
|
||||
/* 0x1CA3E */ s16 configMode;
|
||||
/* 0x1CA40 */ s16 prevConfigMode;
|
||||
/* 0x1CA42 */ s16 nextConfigMode;
|
||||
/* 0x1CA44 */ s16 selectMode;
|
||||
/* 0x1CA46 */ s16 selectedFileIndex;
|
||||
/* 0x1CA48 */ char unk_1CA48[0x2];
|
||||
/* 0x1CA4A */ s16 fileNamesY[3];
|
||||
/* 0x1CA50 */ s16 actionTimer;
|
||||
/* 0x1CA52 */ s16 buttonYOffsets[6];
|
||||
/* 0x1CA5E */ s16 copyDestFileIndex;
|
||||
/* 0x1CA60 */ s16 warningLabel;
|
||||
/* 0x1CA62 */ s16 warningButtonIndex;
|
||||
/* 0x1CA64 */ s16 titleLabel;
|
||||
/* 0x1CA66 */ s16 nextTitleLabel;
|
||||
/* 0x1CA68 */ s16 windowColor[3];
|
||||
/* 0x1CA6E */ s16 titleAlpha[2];
|
||||
/* 0x1CA72 */ s16 windowAlpha;
|
||||
/* 0x1CA74 */ s16 fileButtonAlpha[3];
|
||||
/* 0x1CA7A */ s16 nameBoxAlpha[3];
|
||||
/* 0x1CA80 */ s16 nameAlpha[3];
|
||||
/* 0x1CA86 */ s16 connectorAlpha[3];
|
||||
/* 0x1CA8C */ s16 fileInfoAlpha[3];
|
||||
/* 0x1CA92 */ s16 actionButtonAlpha[2];
|
||||
/* 0x1CA96 */ s16 confirmButtonAlpha[2];
|
||||
/* 0x1CA9A */ s16 optionButtonAlpha;
|
||||
/* 0x1CA9C */ s16 nameEntryBoxAlpha;
|
||||
/* 0x1CA9E */ s16 controlsAlpha;
|
||||
/* 0x1CAA0 */ s16 emptyFileTextAlpha;
|
||||
/* 0x1CAA2 */ s16 highlightColor[4];
|
||||
/* 0x1CAAA */ s16 highlightPulseDir; // 0 fade out, 1 fade in
|
||||
/* 0x1CAAC */ s16 unk_1CAAC; // initialized but never used
|
||||
/* 0x1CAAE */ s16 confirmButtonTexIndices[2];
|
||||
/* 0x1CAB2 */ s16 inputTimerX;
|
||||
/* 0x1CAB4 */ s16 inputTimerY;
|
||||
/* 0x1CAB6 */ s16 stickXDir;
|
||||
/* 0x1CAB8 */ s16 stickYDir;
|
||||
/* 0x1CABA */ s16 stickRelX;
|
||||
/* 0x1CABC */ s16 stickRelY;
|
||||
/* 0x1CABE */ s16 nameEntryBoxPosX;
|
||||
/* 0x1CAC0 */ s16 windowPosX;
|
||||
/* 0x1CAC4 */ f32 windowRot;
|
||||
/* 0x1CAC8 */ s16 kbdButton; // only for buttons, not characters
|
||||
/* 0x1CACA */ s16 charPage; // 0: hiragana, 1: katakana, 2: alphabet
|
||||
/* 0x1CACC */ s16 charBgAlpha; // square shape the letter sits in
|
||||
/* 0x1CACE */ s16 charIndex; // 0 - 64, top left to bottom right
|
||||
/* 0x1CAD0 */ s16 kbdX; // (0, 0) is top left character
|
||||
/* 0x1CAD2 */ s16 kbdY;
|
||||
/* 0x1CAD4 */ s16 newFileNameCharCount;
|
||||
/* 0x1CAD6 */ s16 unk_1CAD6[5];
|
||||
};
|
||||
}
|
||||
|
||||
namespace oot::gamestate::factory
|
||||
{
|
||||
GameState* FileChoose(GraphicsContext* gfxCtx);
|
||||
} // namespace oot::gamestate::factory
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
#pragma once
|
||||
struct GameStateOverlay;
|
||||
|
||||
extern GameStateOverlay gGameStateOverlayTable[6];
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
void GameOver_FadeInLights(GlobalContext* globalCtx);
|
||||
void GameOver_Init(GlobalContext* globalCtx);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
struct Player;
|
||||
struct Actor;
|
||||
struct Vec3f;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
#include "kaleido.h"
|
||||
#include "globalctx.h"
|
||||
|
||||
struct KaleidoMgrOverlay;
|
||||
struct GlobalContext;
|
||||
|
||||
extern u8 gBossMarkState;
|
||||
extern KaleidoMgrOverlay* gKaleidoMgrCurOvl;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
extern f32 gBossMarkScale;
|
||||
extern PauseMapMarksData* gLoadedPauseMarkDataTable;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
void KaleidoSetup_Destroy(GlobalContext* globalCtx);
|
||||
void KaleidoSetup_Init(GlobalContext* globalCtx);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
struct EnvironmentContext;
|
||||
struct View;
|
||||
struct GraphicsContext;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
void HealthMeter_Draw(GlobalContext* globalCtx);
|
||||
void HealthMeter_Init(GlobalContext* globalCtx);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
struct LightContext;
|
||||
struct LightInfo;
|
||||
struct LightNode;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
extern s32 gZeldaArenaLogSeverity;
|
||||
|
||||
void* ZeldaArena_Calloc(u32 num, u32 size);
|
||||
void ZeldaArena_Check();
|
||||
void ZeldaArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action);
|
||||
void ZeldaArena_Cleanup();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
struct MapData;
|
||||
|
||||
extern MapData* gMapData;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
void MapMark_ClearPointers(GlobalContext* globalCtx);
|
||||
void MapMark_Draw(GlobalContext* globalCtx);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
struct MessageContext;
|
||||
struct Actor;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
struct Actor;
|
||||
|
||||
s32 OnePointCutscene_Attention(GlobalContext* globalCtx, Actor* actor);
|
||||
|
|
|
@ -1,5 +1,22 @@
|
|||
#pragma once
|
||||
struct GameState;
|
||||
#include "gamestate.h"
|
||||
#include "view.h"
|
||||
#include "z64game.h"
|
||||
#include "def/z_opening.h"
|
||||
|
||||
void Opening_Destroy(GameState* pthisx);
|
||||
void Opening_Init(GameState* pthisx);
|
||||
namespace oot::gamestate
|
||||
{
|
||||
class Opening : public Base
|
||||
{
|
||||
public:
|
||||
Opening(GraphicsContext* gfxCtx);
|
||||
~Opening();
|
||||
|
||||
void init() override;
|
||||
void main() override;
|
||||
Base* next() override;
|
||||
|
||||
protected:
|
||||
View view;
|
||||
}; // size = 0x1D0
|
||||
} // namespace oot::gamestate
|
|
@ -1,7 +1,6 @@
|
|||
#pragma once
|
||||
#include "z64item.h"
|
||||
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
extern s16 gSpoilingItemReverts[3];
|
||||
extern s16 gSpoilingItems[3];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
struct Path;
|
||||
struct Vec3f;
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
struct Actor;
|
||||
|
||||
void Path_CopyLastPoint(Path* path, Vec3f* dest);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
struct Vec3f;
|
||||
struct GameState;
|
||||
struct Camera;
|
||||
struct RomFile;
|
||||
struct Player;
|
||||
|
@ -21,13 +21,10 @@ void Gameplay_ClearAllSubCameras(GlobalContext* globalCtx);
|
|||
void Gameplay_ClearCamera(GlobalContext* globalCtx, s16 camId);
|
||||
void Gameplay_CopyCamera(GlobalContext* globalCtx, s16 camId1, s16 camId2);
|
||||
s16 Gameplay_CreateSubCamera(GlobalContext* globalCtx);
|
||||
void Gameplay_Destroy(GameState* pthisx);
|
||||
s16 Gameplay_GetActiveCamId(GlobalContext* globalCtx);
|
||||
Camera* Gameplay_GetCamera(GlobalContext* globalCtx, s16 camId);
|
||||
s32 Gameplay_InCsMode(GlobalContext* globalCtx);
|
||||
void Gameplay_Init(GameState* pthisx);
|
||||
void* Gameplay_LoadFile(GlobalContext* globalCtx, RomFile* file);
|
||||
void Gameplay_Main(GameState* pthisx);
|
||||
void Gameplay_SaveSceneFlags(GlobalContext* globalCtx);
|
||||
s32 Gameplay_SetCameraRoll(GlobalContext* globalCtx, s16 camId, s16 roll);
|
||||
Gfx* Gameplay_SetFog(GlobalContext* globalCtx, Gfx* gfx);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#pragma once
|
||||
#include "z64animation.h"
|
||||
#include "globalctx.h"
|
||||
|
||||
struct Player;
|
||||
struct GlobalContext;
|
||||
struct Vec3f;
|
||||
struct Actor;
|
||||
struct Vec3s;
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
#pragma once
|
||||
struct GameState;
|
||||
|
||||
void PreNMI_Init(GameState* pthisx);
|
|
@ -1,6 +0,0 @@
|
|||
#pragma once
|
||||
struct PreNmiBuff;
|
||||
|
||||
void PreNmiBuff_Init(PreNmiBuff* pthis);
|
||||
u32 PreNmiBuff_IsResetting(PreNmiBuff* pthis);
|
||||
void PreNmiBuff_SetReset(PreNmiBuff* pthis);
|
|
@ -1,6 +1,8 @@
|
|||
#pragma once
|
||||
#include "globalctx.h"
|
||||
|
||||
struct GraphicsContext;
|
||||
struct GlobalContext;
|
||||
|
||||
|
||||
extern Gfx gEmptyDL[];
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
struct Room;
|
||||
struct Input;
|
||||
struct RoomContext;
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
#pragma once
|
||||
struct GameState;
|
||||
|
||||
void Sample_Destroy(GameState* pthisx);
|
||||
void Sample_Init(GameState* pthisx);
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
#include "globalctx.h"
|
||||
|
||||
struct ObjectContext;
|
||||
struct GlobalContext;
|
||||
struct GameState;
|
||||
struct TransitionActorContext;
|
||||
struct RomFile;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
struct EntranceInfo;
|
||||
struct SceneTableEntry;
|
||||
|
||||
|
|
|
@ -1,5 +1,62 @@
|
|||
#pragma once
|
||||
struct GameState;
|
||||
#include "gamestate.h"
|
||||
|
||||
void Select_Destroy(GameState* pthisx);
|
||||
void Select_Init(GameState* pthisx);
|
||||
namespace oot::gamestate
|
||||
{
|
||||
enum class SceneType
|
||||
{
|
||||
TITLE,
|
||||
GAME,
|
||||
};
|
||||
|
||||
struct SceneSelectEntry
|
||||
{
|
||||
const char* name;
|
||||
SceneType type;
|
||||
s32 entranceIndex;
|
||||
}; // size = 0xC
|
||||
|
||||
class Select : public Base
|
||||
{
|
||||
public:
|
||||
Select(GraphicsContext* gfxCtx);
|
||||
~Select();
|
||||
|
||||
void init() override;
|
||||
void main() override;
|
||||
Base* next() override;
|
||||
|
||||
void loadTitle(s32 entranceIndex);
|
||||
void loadGame(s32 entranceIndex);
|
||||
void updateMenu();
|
||||
void printMenu(GfxPrint* printer);
|
||||
void printLoadingMessage(GfxPrint* printer);
|
||||
void printAgeSetting(GfxPrint* printer, s32 age);
|
||||
void printCutsceneSetting(GfxPrint* printer, u16 csIndex);
|
||||
void drawMenu();
|
||||
void drawLoadingScreen();
|
||||
void draw();
|
||||
|
||||
protected:
|
||||
View view;
|
||||
s32 currentScene;
|
||||
s32 pageDownIndex; // Index of pageDownStops
|
||||
s32 pageDownStops[7];
|
||||
char unk_1FC[0x0C];
|
||||
s32 opt;
|
||||
s32 topDisplayedScene; // The scene which is currently at the top of the screen
|
||||
char unk_210[0x0C];
|
||||
s32 verticalInputAccumulator;
|
||||
s32 verticalInput;
|
||||
s32 timerUp;
|
||||
s32 timerDown;
|
||||
s32 lockUp;
|
||||
s32 lockDown;
|
||||
s32 unk_234; // unused
|
||||
}; // size = 0x240
|
||||
|
||||
namespace factory
|
||||
{
|
||||
GameState* Select(GraphicsContext* gfxCtx);
|
||||
}
|
||||
} // namespace oot::gamestate
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
struct AnimationContext;
|
||||
struct Vec3s;
|
||||
struct LinkAnimationHeader;
|
||||
|
|
|
@ -5,7 +5,7 @@ struct Vec3f;
|
|||
struct GraphicsContext;
|
||||
struct PSkinAwb;
|
||||
struct Actor;
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
void func_800A57C0(MtxF* mtx, Struct_800A57C0* arg1, Struct_800A598C* arg2, Vtx* arg3, Vec3f* arg4);
|
||||
void func_800A598C(GraphicsContext* gfxCtx, PSkinAwb* skin, s32 limbIndex, s32 arg3);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
struct PSkinAwb;
|
||||
struct SkeletonHeader;
|
||||
struct AnimationHeader;
|
||||
|
|
|
@ -1,5 +1,33 @@
|
|||
#pragma once
|
||||
struct GameState;
|
||||
#include "gamestate.h"
|
||||
#include "view.h"
|
||||
|
||||
void Title_Destroy(GameState* pthisx);
|
||||
void Title_Init(GameState* pthisx);
|
||||
namespace oot::gamestate
|
||||
{
|
||||
class Title : public Base
|
||||
{
|
||||
public:
|
||||
Title(GraphicsContext* gfxCtx);
|
||||
~Title();
|
||||
|
||||
void init() override;
|
||||
void main() override;
|
||||
Base* next() override;
|
||||
|
||||
protected:
|
||||
void calc();
|
||||
void setupView(f32 x, f32 y, f32 z);
|
||||
void draw();
|
||||
|
||||
View view;
|
||||
u16 unk_1D4; // not used in mq dbg (some sort of timer that doesn't seem to affect anything)
|
||||
s16 coverAlpha;
|
||||
s16 addAlpha; // not used in mq dbg
|
||||
u16 visibleDuration; // not used in mq dbg
|
||||
s16 ult;
|
||||
s16 uls;
|
||||
char unk_1E0[0x01];
|
||||
u8 exit;
|
||||
char unk_1E2[0x06];
|
||||
};
|
||||
} // namespace oot::gamestate
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
struct GameState;
|
||||
#include "globalctx.h"
|
||||
struct SkyboxContext;
|
||||
|
||||
void Skybox_Init(GameState* state, SkyboxContext* skyboxCtx, s16 skyboxId);
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
#pragma once
|
||||
#include "gfx.h"
|
||||
#include "padmgr.h"
|
||||
#include "z64game.h"
|
||||
|
||||
namespace oot
|
||||
{
|
||||
namespace gamestate
|
||||
{
|
||||
class Base
|
||||
{
|
||||
public:
|
||||
Base(GraphicsContext* gfxCtx);
|
||||
virtual ~Base();
|
||||
|
||||
virtual void init() = 0;
|
||||
virtual void main() = 0;
|
||||
virtual Base* next() = 0;
|
||||
virtual void loadNext();
|
||||
|
||||
void start();
|
||||
|
||||
GraphicsContext* gfxCtx;
|
||||
Input input[4];
|
||||
TwoHeadArena tha;
|
||||
GameAlloc alloc;
|
||||
u32 running;
|
||||
Counter frames;
|
||||
u32 unk_A0;
|
||||
};
|
||||
} // namespace gamestate
|
||||
|
||||
typedef gamestate::Base GameState;
|
||||
} // namespace oot
|
||||
|
||||
typedef oot::gamestate::Base GameState;
|
|
@ -0,0 +1,17 @@
|
|||
#pragma once
|
||||
|
||||
struct GraphicsContext;
|
||||
|
||||
namespace oot::gamestate
|
||||
{
|
||||
class Base;
|
||||
class Global;
|
||||
}
|
||||
|
||||
typedef oot::gamestate::Global GlobalContext;
|
||||
typedef oot::gamestate::Base GameState;
|
||||
|
||||
namespace oot::gamestate::factory
|
||||
{
|
||||
GameState* Global(GraphicsContext* gfxCtx);
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
#include "ultra64/types.h"
|
||||
#include "globalctx.h"
|
||||
|
||||
enum FloorID
|
||||
{
|
||||
|
@ -56,14 +57,14 @@ struct MapData
|
|||
/* 0x6C */ s16* skullFloorIconY; // dungeon big skull icon Y pos
|
||||
}; // size = 0x70
|
||||
|
||||
void Map_SavePlayerInitialInfo(struct GlobalContext* globalCtx);
|
||||
void Map_SetFloorPalettesData(struct GlobalContext* globalCtx, s16 floor);
|
||||
void Map_InitData(struct GlobalContext* globalCtx, s16 room);
|
||||
void Map_InitRoomData(struct GlobalContext* globalCtx, s16 room);
|
||||
void Map_Destroy(struct GlobalContext* globalCtx);
|
||||
void Map_Init(struct GlobalContext* globalCtx);
|
||||
void Minimap_Draw(struct GlobalContext* globalCtx);
|
||||
void Map_Update(struct GlobalContext* globalCtx);
|
||||
void Map_SavePlayerInitialInfo(GlobalContext* globalCtx);
|
||||
void Map_SetFloorPalettesData(GlobalContext* globalCtx, s16 floor);
|
||||
void Map_InitData(GlobalContext* globalCtx, s16 room);
|
||||
void Map_InitRoomData(GlobalContext* globalCtx, s16 room);
|
||||
void Map_Destroy(GlobalContext* globalCtx);
|
||||
void Map_Init(GlobalContext* globalCtx);
|
||||
void Minimap_Draw(GlobalContext* globalCtx);
|
||||
void Map_Update(GlobalContext* globalCtx);
|
||||
|
||||
extern MapData gMapDataTable;
|
||||
extern MapData* gMapData;
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
#pragma once
|
||||
struct GameState;
|
||||
|
||||
void TitleSetup_Init(GameState* gameState);
|
||||
void TitleSetup_Destroy(GameState* gameState);
|
|
@ -5,35 +5,35 @@
|
|||
|
||||
struct Viewport
|
||||
{
|
||||
/* 0x0000 */ s32 topY; // uly (upper left y)
|
||||
/* 0x0004 */ s32 bottomY; // lry (lower right y)
|
||||
/* 0x0008 */ s32 leftX; // ulx (upper left x)
|
||||
/* 0x000C */ s32 rightX; // lrx (lower right x)
|
||||
/* 0x0000 */ s32 topY = 0; // uly (upper left y)
|
||||
/* 0x0004 */ s32 bottomY = 0; // lry (lower right y)
|
||||
/* 0x0008 */ s32 leftX = 0; // ulx (upper left x)
|
||||
/* 0x000C */ s32 rightX = 0; // lrx (lower right x)
|
||||
}; // size = 0x10
|
||||
|
||||
struct View
|
||||
{
|
||||
/* 0x0000 */ s32 magic; // string literal "VIEW" / 0x56494557
|
||||
/* 0x0004 */ struct GraphicsContext* gfxCtx;
|
||||
/* 0x0000 */ s32 magic = 0; // string literal "VIEW" / 0x56494557
|
||||
/* 0x0004 */ GraphicsContext* gfxCtx = nullptr;
|
||||
/* 0x0008 */ Viewport viewport;
|
||||
/* 0x0018 */ f32 fovy; // vertical field of view in degrees
|
||||
/* 0x001C */ f32 zNear; // distance to near clipping plane
|
||||
/* 0x0020 */ f32 zFar; // distance to far clipping plane
|
||||
/* 0x0024 */ f32 scale; // scale for matrix elements
|
||||
/* 0x0028 */ Vec3f eye;
|
||||
/* 0x0034 */ Vec3f lookAt;
|
||||
/* 0x0040 */ Vec3f up;
|
||||
/* 0x0050 */ Vp vp;
|
||||
/* 0x0060 */ Mtx projection;
|
||||
/* 0x00A0 */ Mtx viewing;
|
||||
/* 0x00E0 */ Mtx* projectionPtr;
|
||||
/* 0x00E4 */ Mtx* viewingPtr;
|
||||
/* 0x00E8 */ Vec3f unk_E8;
|
||||
/* 0x00F4 */ Vec3f unk_F4;
|
||||
/* 0x0100 */ f32 unk_100;
|
||||
/* 0x0104 */ Vec3f unk_104;
|
||||
/* 0x0110 */ Vec3f unk_110;
|
||||
/* 0x011C */ u16 normal; // used to normalize the projection matrix
|
||||
/* 0x0120 */ s32 flags;
|
||||
/* 0x0124 */ s32 unk_124;
|
||||
/* 0x0018 */ f32 fovy = 0; // vertical field of view in degrees
|
||||
/* 0x001C */ f32 zNear = 0; // distance to near clipping plane
|
||||
/* 0x0020 */ f32 zFar = 0; // distance to far clipping plane
|
||||
/* 0x0024 */ f32 scale = 0; // scale for matrix elements
|
||||
/* 0x0028 */ Vec3f eye = {0};
|
||||
/* 0x0034 */ Vec3f lookAt = {0};
|
||||
/* 0x0040 */ Vec3f up = {0};
|
||||
/* 0x0050 */ Vp vp = {0};
|
||||
/* 0x0060 */ Mtx projection = {0};
|
||||
/* 0x00A0 */ Mtx viewing = {0};
|
||||
/* 0x00E0 */ Mtx* projectionPtr = nullptr;
|
||||
/* 0x00E4 */ Mtx* viewingPtr = nullptr;
|
||||
/* 0x00E8 */ Vec3f unk_E8 = {0};
|
||||
/* 0x00F4 */ Vec3f unk_F4 = {0};
|
||||
/* 0x0100 */ f32 unk_100 = 0;
|
||||
/* 0x0104 */ Vec3f unk_104 = {0};
|
||||
/* 0x0110 */ Vec3f unk_110 = {0};
|
||||
/* 0x011C */ u16 normal = 0; // used to normalize the projection matrix
|
||||
/* 0x0120 */ s32 flags = 0;
|
||||
/* 0x0124 */ s32 unk_124 = 0;
|
||||
}; // size = 0x128
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "z64collision_check.h"
|
||||
#include "z64dma.h"
|
||||
#include "z64math.h"
|
||||
#include "globalctx.h"
|
||||
|
||||
union Gfx;
|
||||
|
||||
|
@ -24,13 +25,13 @@ enum DynaPolyMoveFlag
|
|||
};
|
||||
|
||||
struct Actor;
|
||||
struct GlobalContext;
|
||||
|
||||
struct Lights;
|
||||
|
||||
typedef void (*ActorFunc)(struct Actor*, struct GlobalContext*);
|
||||
typedef void (*ActorShadowFunc)(struct Actor*, struct Lights*, struct GlobalContext*);
|
||||
typedef u16 (*callback1_800343CC)(struct GlobalContext*, struct Actor*);
|
||||
typedef s16 (*callback2_800343CC)(struct GlobalContext*, struct Actor*);
|
||||
typedef void (*ActorFunc)(struct Actor*, GlobalContext*);
|
||||
typedef void (*ActorShadowFunc)(struct Actor*, struct Lights*, GlobalContext*);
|
||||
typedef u16 (*callback1_800343CC)(GlobalContext*, struct Actor*);
|
||||
typedef s16 (*callback2_800343CC)(GlobalContext*, struct Actor*);
|
||||
|
||||
struct ActorEntry
|
||||
{
|
||||
|
@ -306,7 +307,7 @@ enum Item00Type
|
|||
|
||||
struct EnItem00;
|
||||
|
||||
typedef void (*EnItem00ActionFunc)(struct EnItem00*, struct GlobalContext*);
|
||||
typedef void (*EnItem00ActionFunc)(struct EnItem00*, GlobalContext*);
|
||||
|
||||
struct EnItem00
|
||||
{
|
||||
|
@ -342,7 +343,7 @@ enum AObjType
|
|||
|
||||
struct EnAObj;
|
||||
|
||||
typedef void (*EnAObjActionFunc)(struct EnAObj*, struct GlobalContext*);
|
||||
typedef void (*EnAObjActionFunc)(struct EnAObj*, GlobalContext*);
|
||||
|
||||
struct EnAObj
|
||||
{
|
||||
|
@ -503,7 +504,7 @@ struct struct_D_80AA1678
|
|||
/* 0x0C */ f32 transitionRate;
|
||||
}; // size = 0x10
|
||||
|
||||
s32 func_800343CC(struct GlobalContext* globalCtx, Actor* actor, s16* arg2, f32 interactRange, u16 (*unkFunc1)(struct GlobalContext*, Actor*), s16 (*unkFunc2)(struct GlobalContext*, Actor*));
|
||||
s32 func_800343CC(GlobalContext* globalCtx, Actor* actor, s16* arg2, f32 interactRange, u16 (*unkFunc1)(GlobalContext*, Actor*), s16 (*unkFunc2)(GlobalContext*, Actor*));
|
||||
|
||||
extern ActorOverlay gActorOverlayTable[ACTOR_ID_MAX]; // original name: "actor_dlftbls" 801162A0
|
||||
extern s32 gMaxActorId; // original name: "MaxProfile"
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
#include "ultra64.h"
|
||||
#include "z64dma.h"
|
||||
#include "z64math.h"
|
||||
#include "globalctx.h"
|
||||
|
||||
struct GlobalContext;
|
||||
struct Actor;
|
||||
struct SkelAnime;
|
||||
|
||||
|
@ -126,13 +126,13 @@ struct LegacyAnimationHeader
|
|||
/* 0x08 */ JointKey* jointKey;
|
||||
}; // size = 0xC
|
||||
|
||||
typedef s32 (*OverrideLimbDrawOpa)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void*);
|
||||
typedef s32 (*OverrideLimbDrawOpa)(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void*);
|
||||
|
||||
typedef void (*PostLimbDrawOpa)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void*);
|
||||
typedef void (*PostLimbDrawOpa)(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void*);
|
||||
|
||||
typedef s32 (*OverrideLimbDraw)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void*, Gfx** gfx);
|
||||
typedef s32 (*OverrideLimbDraw)(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void*, Gfx** gfx);
|
||||
|
||||
typedef void (*PostLimbDraw)(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void*, Gfx** gfx);
|
||||
typedef void (*PostLimbDraw)(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void*, Gfx** gfx);
|
||||
|
||||
enum AnimationType
|
||||
{
|
||||
|
@ -215,7 +215,7 @@ struct AnimationContext
|
|||
AnimationEntry entries[ANIMATION_ENTRY_MAX];
|
||||
}; // size = 0xC84
|
||||
|
||||
typedef void (*AnimationEntryCallback)(struct GlobalContext* globalCtx, AnimationEntryData* data);
|
||||
typedef void (*AnimationEntryCallback)(GlobalContext* globalCtx, AnimationEntryData* data);
|
||||
|
||||
// fcurve_skelanime structs
|
||||
struct TransformData
|
||||
|
@ -268,8 +268,8 @@ struct SkelAnimeCurve
|
|||
/* 0x001C */ LimbTransform* transforms;
|
||||
}; // size = 0x20
|
||||
|
||||
typedef s32 (*OverrideCurveLimbDraw)(struct GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, s32 limbIndex, void*);
|
||||
typedef void (*PostCurveLimbDraw)(struct GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, s32 limbIndex, void*);
|
||||
typedef s32 (*OverrideCurveLimbDraw)(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, s32 limbIndex, void*);
|
||||
typedef void (*PostCurveLimbDraw)(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, s32 limbIndex, void*);
|
||||
|
||||
typedef s32 (*AnimUpdateFunc)();
|
||||
|
||||
|
@ -350,7 +350,7 @@ struct PSkinAwb
|
|||
/* 0x04C */ SkelAnime skelAnime;
|
||||
}; // size = 0x90
|
||||
|
||||
typedef void (*SkinCallback)(struct Actor*, struct GlobalContext*, PSkinAwb*);
|
||||
typedef s32 (*SkinCallback2)(struct Actor*, struct GlobalContext*, s32, PSkinAwb*);
|
||||
typedef void (*SkinCallback)(struct Actor*, GlobalContext*, PSkinAwb*);
|
||||
typedef s32 (*SkinCallback2)(struct Actor*, GlobalContext*, s32, PSkinAwb*);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
#include "z64math.h"
|
||||
#include "globalctx.h"
|
||||
|
||||
struct GlobalContext;
|
||||
struct Actor;
|
||||
struct DynaPolyActor;
|
||||
|
||||
|
@ -183,8 +183,8 @@ struct CollisionContext
|
|||
|
||||
struct DynaRaycast
|
||||
{
|
||||
/* 0x00 */ struct GlobalContext* globalCtx;
|
||||
/* 0x04 */ struct CollisionContext* colCtx;
|
||||
/* 0x00 */ GlobalContext* globalCtx;
|
||||
/* 0x04 */ CollisionContext* colCtx;
|
||||
/* 0x08 */ u16 xpFlags;
|
||||
/* 0x0C */ CollisionPoly** resultPoly;
|
||||
/* 0x10 */ f32 yIntersect;
|
||||
|
@ -211,144 +211,3 @@ struct DynaLineTest
|
|||
/* 0x24 */ f32* distSq; // distance from posA to poly squared
|
||||
/* 0x28 */ f32 chkDist; // distance from poly
|
||||
};
|
||||
|
||||
/*
|
||||
struct DynaSSNodeList;
|
||||
|
||||
u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList*);
|
||||
void func_80038A28(CollisionPoly* poly, f32 tx, f32 ty, f32 tz, MtxF* dest);
|
||||
f32 CollisionPoly_GetPointDistanceFromPlane(CollisionPoly* poly, Vec3f* point);
|
||||
void CollisionPoly_GetVerticesByBgId(CollisionPoly* poly, s32 bgId, CollisionContext* colCtx, Vec3f* dest);
|
||||
s32 BgCheck_CheckStaticCeiling(StaticLookup* lookup, u16 xpFlags, CollisionContext* colCtx, f32* outY, Vec3f* pos,
|
||||
f32 checkHeight, CollisionPoly** outPoly);
|
||||
s32 BgCheck_CheckLineAgainstSSList(SSList* headNodeId, CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2,
|
||||
Vec3f* posA, Vec3f* posB, Vec3f* outPos, CollisionPoly** outPoly, f32* outDistSq,
|
||||
f32 chkDist, s32 bccFlags);
|
||||
void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* arg2);
|
||||
void BgCheck_Allocate(CollisionContext* colCtx, struct GlobalContext* globalCtx, CollisionHeader* colHeader);
|
||||
s32 BgCheck_PosInStaticBoundingBox(CollisionContext* colCtx, Vec3f* pos);
|
||||
f32 BgCheck_EntityRaycastFloor1(CollisionContext* colCtx, CollisionPoly** outPoly, Vec3f* pos);
|
||||
f32 BgCheck_EntityRaycastFloor2(struct GlobalContext* globalCtx, CollisionContext* colCtx, CollisionPoly** outPoly,
|
||||
Vec3f* pos);
|
||||
f32 BgCheck_EntityRaycastFloor3(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
|
||||
f32 BgCheck_EntityRaycastFloor4(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, struct Actor* actor,
|
||||
Vec3f* arg4);
|
||||
f32 BgCheck_EntityRaycastFloor5(struct GlobalContext* globalCtx, CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId,
|
||||
struct Actor* actor, Vec3f* pos);
|
||||
f32 BgCheck_EntityRaycastFloor6(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, struct Actor* actor, Vec3f* pos,
|
||||
f32 chkDist);
|
||||
f32 BgCheck_EntityRaycastFloor7(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, struct Actor* actor, Vec3f* pos);
|
||||
f32 BgCheck_AnyRaycastFloor1(CollisionContext* colCtx, CollisionPoly* outPoly, Vec3f* pos);
|
||||
f32 BgCheck_AnyRaycastFloor2(CollisionContext* colCtx, CollisionPoly* outPoly, s32* bgId, Vec3f* pos);
|
||||
f32 BgCheck_CameraRaycastFloor2(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
|
||||
f32 BgCheck_EntityRaycastFloor8(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, struct Actor* actor, Vec3f* pos);
|
||||
f32 BgCheck_EntityRaycastFloor9(CollisionContext* colCtx, CollisionPoly** outPoly, s32* bgId, Vec3f* pos);
|
||||
s32 BgCheck_CheckWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev,
|
||||
f32 radius, CollisionPoly** outPoly, s32* outBgId, struct Actor* actor, f32 checkHeight, u8 argA);
|
||||
s32 BgCheck_EntitySphVsWall1(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
|
||||
CollisionPoly** outPoly, f32 checkHeight);
|
||||
s32 BgCheck_EntitySphVsWall2(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
|
||||
CollisionPoly** outPoly, s32* outBgId, f32 checkHeight);
|
||||
s32 BgCheck_EntitySphVsWall3(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
|
||||
CollisionPoly** outPoly, s32* outBgId, struct Actor* actor, f32 checkHeight);
|
||||
s32 BgCheck_EntitySphVsWall4(CollisionContext* colCtx, Vec3f* posResult, Vec3f* posNext, Vec3f* posPrev, f32 radius,
|
||||
CollisionPoly** outPoly, s32* outBgId, struct Actor* actor, f32 checkHeight);
|
||||
s32 BgCheck_AnyCheckCeiling(CollisionContext* colCtx, f32* outY, Vec3f* pos, f32 checkHeight);
|
||||
s32 BgCheck_EntityCheckCeiling(CollisionContext* colCtx, f32* arg1, Vec3f* arg2, f32 arg3, CollisionPoly** outPoly,
|
||||
s32* outBgId, struct Actor* actor);
|
||||
s32 BgCheck_CheckLineImpl(CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2, Vec3f* posA, Vec3f* posB,
|
||||
Vec3f* posResult, CollisionPoly** outPoly, s32* bgId, struct Actor* actor, f32 chkDist,
|
||||
u32 bccFlags);
|
||||
s32 BgCheck_CameraLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
|
||||
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
|
||||
s32 BgCheck_CameraLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
|
||||
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
|
||||
s32 BgCheck_EntityLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
|
||||
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
|
||||
s32 BgCheck_EntityLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
|
||||
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId,
|
||||
struct Actor* actor);
|
||||
s32 BgCheck_EntityLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
|
||||
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId,
|
||||
struct Actor* actor, f32 chkDist);
|
||||
s32 BgCheck_ProjectileLineTest(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
|
||||
CollisionPoly** outPoly, s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace,
|
||||
s32* bgId);
|
||||
s32 BgCheck_AnyLineTest1(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly,
|
||||
s32 chkOneFace);
|
||||
s32 BgCheck_AnyLineTest2(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly,
|
||||
s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace);
|
||||
s32 BgCheck_AnyLineTest3(CollisionContext* colCtx, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** outPoly,
|
||||
s32 chkWall, s32 chkFloor, s32 chkCeil, s32 chkOneFace, s32* bgId);
|
||||
s32 BgCheck_SphVsFirstPoly(CollisionContext* colCtx, Vec3f* center, f32 radius);
|
||||
void SSNodeList_Initialize(SSNodeList*);
|
||||
void SSNodeList_Alloc(struct GlobalContext* globalCtx, SSNodeList* thiss, s32 tblMax, s32 numPolys);
|
||||
u16 SSNodeList_GetNextNodeIdx(SSNodeList* thiss);
|
||||
s32 DynaPoly_IsBgIdBgActor(s32 bgId);
|
||||
void DynaPoly_Init(struct GlobalContext* globalCtx, DynaCollisionContext* dyna);
|
||||
void DynaPoly_Alloc(struct GlobalContext* globalCtx, DynaCollisionContext* dyna);
|
||||
void func_8003EBF8(struct GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 bgId);
|
||||
void func_8003EC50(struct GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 bgId);
|
||||
void func_8003ECA8(struct GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 bgId);
|
||||
s32 DynaPoly_SetBgActor(struct GlobalContext* globalCtx, DynaCollisionContext* dyna, struct Actor* actor, CollisionHeader* colHeader);
|
||||
struct DynaPolyActor* DynaPoly_GetActor(CollisionContext* colCtx, s32 bgId);
|
||||
void DynaPoly_DeleteBgActor(struct GlobalContext* globalCtx, DynaCollisionContext* dyna, s32 bgId);
|
||||
void func_8003EE6C(struct GlobalContext* globalCtx, DynaCollisionContext* dyna);
|
||||
void func_8003F8EC(struct GlobalContext* globalCtx, DynaCollisionContext* dyna, struct Actor* actor);
|
||||
void DynaPoly_Setup(struct GlobalContext* globalCtx, DynaCollisionContext* dyna);
|
||||
void DynaPoly_UpdateBgActorTransforms(struct GlobalContext* globalCtx, DynaCollisionContext* dyna);
|
||||
f32 BgCheck_RaycastFloorDyna(DynaRaycast* dynaRaycast);
|
||||
s32 BgCheck_SphVsDynaWall(CollisionContext* colCtx, u16 xpFlags, f32* outX, f32* outZ, Vec3f* pos, f32 radius,
|
||||
CollisionPoly** outPoly, s32* outBgId, struct Actor* actor);
|
||||
s32 BgCheck_CheckDynaCeiling(CollisionContext* colCtx, u16 xpFlags, f32* outY, Vec3f* pos, f32 chkDist,
|
||||
CollisionPoly** outPoly, s32* outBgId, struct Actor* actor);
|
||||
s32 BgCheck_CheckLineAgainstDyna(CollisionContext* colCtx, u16 xpFlags, Vec3f* posA, Vec3f* posB, Vec3f* posResult,
|
||||
CollisionPoly** outPoly, f32* distSq, s32* outBgId, struct Actor* actor, f32 chkDist,
|
||||
s32 bccFlags);
|
||||
s32 BgCheck_SphVsFirstDynaPoly(CollisionContext* colCtx, u16 xpFlags, CollisionPoly** outPoly, s32* outBgId,
|
||||
Vec3f* center, f32 radius, struct Actor* actor, u16 bciFlags);
|
||||
void CollisionHeader_GetVirtual(void* colHeader, CollisionHeader** dest);
|
||||
void func_800418D0(CollisionContext* colCtx, struct GlobalContext* globalCtx);
|
||||
void BgCheck_ResetPolyCheckTbl(SSNodeList* nodeList, s32 numPolys);
|
||||
u32 SurfaceType_GetCamDataIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u16 func_80041A4C(CollisionContext* colCtx, u32 camId, s32 bgId);
|
||||
u16 SurfaceType_GetCameraSType(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u16 SurfaceType_GetNumCameras(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
Vec3s* func_80041C10(CollisionContext* colCtx, s32 camId, s32 bgId);
|
||||
Vec3s* SurfaceType_GetCamPosData(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 SurfaceType_GetSceneExitIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 func_80041D4C(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 func_80041D70(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
s32 func_80041DB8(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
s32 func_80041DE4(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
s32 func_80041E18(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
s32 func_80041E4C(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 func_80041EA4(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 func_80041EC8(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 SurfaceType_IsHorseBlocked(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 func_80041F10(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u16 SurfaceType_GetSfx(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 SurfaceType_GetSlope(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 SurfaceType_GetLightSettingIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 SurfaceType_GetEcho(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 SurfaceType_IsHookshotSurface(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
s32 SurfaceType_IsIgnoredByEntities(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
s32 SurfaceType_IsIgnoredByProjectiles(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
s32 SurfaceType_IsConveyor(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 SurfaceType_GetConveyorSpeed(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 SurfaceType_GetConveyorDirection(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 SurfaceType_IsWallDamage(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
s32 WaterBox_GetSurface1(struct GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface,
|
||||
WaterBox** outWaterBox);
|
||||
s32 WaterBox_GetSurface2(struct GlobalContext* globalCtx, CollisionContext* colCtx, Vec3f* pos, f32 surfaceChkDist,
|
||||
WaterBox** outWaterBox);
|
||||
s32 WaterBox_GetSurfaceImpl(struct GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface,
|
||||
WaterBox** outWaterBox);
|
||||
u32 WaterBox_GetCamDataIndex(CollisionContext* colCtx, WaterBox* waterBox);
|
||||
u16 WaterBox_GetCameraSType(CollisionContext* colCtx, WaterBox* waterBox);
|
||||
u32 WaterBox_GetLightSettingIndex(CollisionContext* colCtx, WaterBox* waterBox);
|
||||
s32 func_80042708(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* point, Vec3f* closestPoint);
|
||||
s32 func_800427B4(CollisionPoly* polyA, CollisionPoly* polyB, Vec3f* pointA, Vec3f* pointB, Vec3f* closestPoint);
|
||||
void BgCheck_DrawDynaCollision(struct GlobalContext*, CollisionContext*);
|
||||
void BgCheck_DrawStaticCollision(struct GlobalContext*, CollisionContext*);
|
||||
*/
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#include "z64cutscene.h"
|
||||
#include "z64math.h"
|
||||
|
||||
struct Player;
|
||||
|
||||
#define CAM_STAT_CUT 0
|
||||
#define CAM_STAT_WAIT 1
|
||||
#define CAM_STAT_UNK3 3
|
||||
|
@ -950,10 +952,10 @@ struct Camera
|
|||
/* 0x068 */ Vec3f up;
|
||||
/* 0x074 */ Vec3f eyeNext;
|
||||
/* 0x080 */ Vec3f skyboxOffset;
|
||||
/* 0x08C */ struct GlobalContext* globalCtx;
|
||||
/* 0x090 */ struct Player* player;
|
||||
/* 0x08C */ GlobalContext* globalCtx;
|
||||
/* 0x090 */ Player* player;
|
||||
/* 0x094 */ PosRot playerPosRot;
|
||||
/* 0x0A8 */ struct Actor* target;
|
||||
/* 0x0A8 */ Actor* target;
|
||||
/* 0x0AC */ PosRot targetPosRot;
|
||||
/* 0x0C0 */ f32 rUpdateRateInv;
|
||||
/* 0x0C4 */ f32 pitchUpdateRateInv;
|
||||
|
@ -1078,7 +1080,7 @@ struct DbCameraAnim
|
|||
}; // size = 0x30
|
||||
|
||||
/*
|
||||
void Camera_Init(Camera* camera, struct View* view, struct CollisionContext* colCtx, struct GlobalContext* globalCtx);
|
||||
void Camera_Init(Camera* camera, struct View* view, struct CollisionContext* colCtx, GlobalContext* globalCtx);
|
||||
void Camera_InitPlayerSettings(Camera* camera, struct Player* player);
|
||||
s16 Camera_ChangeStatus(Camera* camera, s16 status);
|
||||
Vec3s Camera_Update(Camera* camera);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
#include "z64math.h"
|
||||
#include "globalctx.h"
|
||||
|
||||
#define COLLISION_CHECK_AT_MAX 50
|
||||
#define COLLISION_CHECK_AC_MAX 60
|
||||
|
@ -436,83 +437,83 @@ struct CollisionCheckContext
|
|||
|
||||
void Collider_DrawRedPoly(struct GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC);
|
||||
void Collider_DrawPoly(struct GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC, u8 r, u8 g, u8 b);
|
||||
s32 Collider_InitJntSph(struct GlobalContext* globalCtx, ColliderJntSph* collider);
|
||||
s32 Collider_FreeJntSph(struct GlobalContext* globalCtx, ColliderJntSph* collider);
|
||||
s32 Collider_DestroyJntSph(struct GlobalContext* globalCtx, ColliderJntSph* collider);
|
||||
s32 Collider_SetJntSphToActor(struct GlobalContext* globalCtx, ColliderJntSph* dest, ColliderJntSphInitToActor* src);
|
||||
s32 Collider_SetJntSphAllocType1(struct GlobalContext* globalCtx, ColliderJntSph* dest, struct Actor* actor, ColliderJntSphInitType1* src);
|
||||
s32 Collider_SetJntSphAlloc(struct GlobalContext* globalCtx, ColliderJntSph* dest, struct Actor* actor, ColliderJntSphInit* src);
|
||||
s32 Collider_SetJntSph(struct GlobalContext* globalCtx, ColliderJntSph* dest, struct Actor* actor, ColliderJntSphInit* src, ColliderJntSphElement* elements);
|
||||
s32 Collider_ResetJntSphAT(struct GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_ResetJntSphAC(struct GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_ResetJntSphOC(struct GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_InitCylinder(struct GlobalContext* globalCtx, ColliderCylinder* collider);
|
||||
s32 Collider_DestroyCylinder(struct GlobalContext* globalCtx, ColliderCylinder* collider);
|
||||
s32 Collider_SetCylinderToActor(struct GlobalContext* globalCtx, ColliderCylinder* collider, ColliderCylinderInitToActor* src);
|
||||
s32 Collider_SetCylinderType1(struct GlobalContext* globalCtx, ColliderCylinder* collider, struct Actor* actor, ColliderCylinderInitType1* src);
|
||||
s32 Collider_SetCylinder(struct GlobalContext* globalCtx, ColliderCylinder* collider, struct Actor* actor, ColliderCylinderInit* src);
|
||||
s32 Collider_ResetCylinderAT(struct GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_ResetCylinderAC(struct GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_ResetCylinderOC(struct GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_InitTris(struct GlobalContext* globalCtx, ColliderTris* tris);
|
||||
s32 Collider_FreeTris(struct GlobalContext* globalCtx, ColliderTris* tris);
|
||||
s32 Collider_DestroyTris(struct GlobalContext* globalCtx, ColliderTris* tris);
|
||||
s32 Collider_SetTrisAllocType1(struct GlobalContext* globalCtx, ColliderTris* dest, struct Actor* actor, ColliderTrisInitType1* src);
|
||||
s32 Collider_SetTrisAlloc(struct GlobalContext* globalCtx, ColliderTris* dest, struct Actor* actor, ColliderTrisInit* src);
|
||||
s32 Collider_SetTris(struct GlobalContext* globalCtx, ColliderTris* dest, struct Actor* actor, ColliderTrisInit* src, ColliderTrisElement* elements);
|
||||
s32 Collider_ResetTrisAT(struct GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_ResetTrisAC(struct GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_ResetTrisOC(struct GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_InitQuad(struct GlobalContext* globalCtx, ColliderQuad* collider);
|
||||
s32 Collider_DestroyQuad(struct GlobalContext* globalCtx, ColliderQuad* collider);
|
||||
s32 Collider_SetQuadType1(struct GlobalContext* globalCtx, ColliderQuad* collider, struct Actor* actor, ColliderQuadInitType1* src);
|
||||
s32 Collider_SetQuad(struct GlobalContext* globalCtx, ColliderQuad* collider, struct Actor* actor, ColliderQuadInit* src);
|
||||
s32 Collider_ResetQuadAT(struct GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_ResetQuadAC(struct GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_ResetQuadOC(struct GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_InitLine(struct GlobalContext* globalCtx, OcLine* line);
|
||||
s32 Collider_DestroyLine(struct GlobalContext* globalCtx, OcLine* line);
|
||||
s32 Collider_SetLinePoints(struct GlobalContext* globalCtx, OcLine* ocLine, Vec3f* a, Vec3f* b);
|
||||
s32 Collider_SetLine(struct GlobalContext* globalCtx, OcLine* dest, OcLine* src);
|
||||
s32 Collider_ResetLineOC(struct GlobalContext* globalCtx, OcLine* line);
|
||||
void CollisionCheck_InitContext(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
void CollisionCheck_DestroyContext(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
void CollisionCheck_ClearContext(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
void CollisionCheck_EnableSAC(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
void CollisionCheck_DisableSAC(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
void Collider_Draw(struct GlobalContext* globalCtx, Collider* collider);
|
||||
void CollisionCheck_DrawCollision(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
s32 CollisionCheck_SetAT(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider);
|
||||
s32 CollisionCheck_SetAT_SAC(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider, s32 index);
|
||||
s32 CollisionCheck_SetAC(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider);
|
||||
s32 CollisionCheck_SetAC_SAC(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider, s32 index);
|
||||
s32 CollisionCheck_SetOC(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider);
|
||||
s32 CollisionCheck_SetOC_SAC(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider, s32 index);
|
||||
s32 CollisionCheck_SetOCLine(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, OcLine* collider);
|
||||
void CollisionCheck_BlueBlood(struct GlobalContext* globalCtx, Collider* collider, Vec3f* v);
|
||||
void CollisionCheck_AT(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
void CollisionCheck_OC(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
s32 Collider_InitJntSph(GlobalContext* globalCtx, ColliderJntSph* collider);
|
||||
s32 Collider_FreeJntSph(GlobalContext* globalCtx, ColliderJntSph* collider);
|
||||
s32 Collider_DestroyJntSph(GlobalContext* globalCtx, ColliderJntSph* collider);
|
||||
s32 Collider_SetJntSphToActor(GlobalContext* globalCtx, ColliderJntSph* dest, ColliderJntSphInitToActor* src);
|
||||
s32 Collider_SetJntSphAllocType1(GlobalContext* globalCtx, ColliderJntSph* dest, struct Actor* actor, ColliderJntSphInitType1* src);
|
||||
s32 Collider_SetJntSphAlloc(GlobalContext* globalCtx, ColliderJntSph* dest, struct Actor* actor, ColliderJntSphInit* src);
|
||||
s32 Collider_SetJntSph(GlobalContext* globalCtx, ColliderJntSph* dest, struct Actor* actor, ColliderJntSphInit* src, ColliderJntSphElement* elements);
|
||||
s32 Collider_ResetJntSphAT(GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_ResetJntSphAC(GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_ResetJntSphOC(GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_InitCylinder(GlobalContext* globalCtx, ColliderCylinder* collider);
|
||||
s32 Collider_DestroyCylinder(GlobalContext* globalCtx, ColliderCylinder* collider);
|
||||
s32 Collider_SetCylinderToActor(GlobalContext* globalCtx, ColliderCylinder* collider, ColliderCylinderInitToActor* src);
|
||||
s32 Collider_SetCylinderType1(GlobalContext* globalCtx, ColliderCylinder* collider, struct Actor* actor, ColliderCylinderInitType1* src);
|
||||
s32 Collider_SetCylinder(GlobalContext* globalCtx, ColliderCylinder* collider, struct Actor* actor, ColliderCylinderInit* src);
|
||||
s32 Collider_ResetCylinderAT(GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_ResetCylinderAC(GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_ResetCylinderOC(GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_InitTris(GlobalContext* globalCtx, ColliderTris* tris);
|
||||
s32 Collider_FreeTris(GlobalContext* globalCtx, ColliderTris* tris);
|
||||
s32 Collider_DestroyTris(GlobalContext* globalCtx, ColliderTris* tris);
|
||||
s32 Collider_SetTrisAllocType1(GlobalContext* globalCtx, ColliderTris* dest, struct Actor* actor, ColliderTrisInitType1* src);
|
||||
s32 Collider_SetTrisAlloc(GlobalContext* globalCtx, ColliderTris* dest, struct Actor* actor, ColliderTrisInit* src);
|
||||
s32 Collider_SetTris(GlobalContext* globalCtx, ColliderTris* dest, struct Actor* actor, ColliderTrisInit* src, ColliderTrisElement* elements);
|
||||
s32 Collider_ResetTrisAT(GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_ResetTrisAC(GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_ResetTrisOC(GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_InitQuad(GlobalContext* globalCtx, ColliderQuad* collider);
|
||||
s32 Collider_DestroyQuad(GlobalContext* globalCtx, ColliderQuad* collider);
|
||||
s32 Collider_SetQuadType1(GlobalContext* globalCtx, ColliderQuad* collider, struct Actor* actor, ColliderQuadInitType1* src);
|
||||
s32 Collider_SetQuad(GlobalContext* globalCtx, ColliderQuad* collider, struct Actor* actor, ColliderQuadInit* src);
|
||||
s32 Collider_ResetQuadAT(GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_ResetQuadAC(GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_ResetQuadOC(GlobalContext* globalCtx, Collider* collider);
|
||||
s32 Collider_InitLine(GlobalContext* globalCtx, OcLine* line);
|
||||
s32 Collider_DestroyLine(GlobalContext* globalCtx, OcLine* line);
|
||||
s32 Collider_SetLinePoints(GlobalContext* globalCtx, OcLine* ocLine, Vec3f* a, Vec3f* b);
|
||||
s32 Collider_SetLine(GlobalContext* globalCtx, OcLine* dest, OcLine* src);
|
||||
s32 Collider_ResetLineOC(GlobalContext* globalCtx, OcLine* line);
|
||||
void CollisionCheck_InitContext(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
void CollisionCheck_DestroyContext(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
void CollisionCheck_ClearContext(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
void CollisionCheck_EnableSAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
void CollisionCheck_DisableSAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
void Collider_Draw(GlobalContext* globalCtx, Collider* collider);
|
||||
void CollisionCheck_DrawCollision(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
s32 CollisionCheck_SetAT(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider);
|
||||
s32 CollisionCheck_SetAT_SAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider, s32 index);
|
||||
s32 CollisionCheck_SetAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider);
|
||||
s32 CollisionCheck_SetAC_SAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider, s32 index);
|
||||
s32 CollisionCheck_SetOC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider);
|
||||
s32 CollisionCheck_SetOC_SAC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Collider* collider, s32 index);
|
||||
s32 CollisionCheck_SetOCLine(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, OcLine* collider);
|
||||
void CollisionCheck_BlueBlood(GlobalContext* globalCtx, Collider* collider, Vec3f* v);
|
||||
void CollisionCheck_AT(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
void CollisionCheck_OC(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
void CollisionCheck_InitInfo(struct CollisionCheckInfo* info);
|
||||
void CollisionCheck_ResetDamage(struct CollisionCheckInfo* info);
|
||||
void CollisionCheck_SetInfoNoDamageTable(struct CollisionCheckInfo* info, struct CollisionCheckInfoInit* init);
|
||||
void CollisionCheck_SetInfo(struct CollisionCheckInfo* info, struct DamageTable* damageTable, struct CollisionCheckInfoInit* init);
|
||||
void CollisionCheck_SetInfo2(struct CollisionCheckInfo* info, struct DamageTable* damageTable, struct CollisionCheckInfoInit2* init);
|
||||
void CollisionCheck_SetInfoGetDamageTable(struct CollisionCheckInfo* info, s32 index, struct CollisionCheckInfoInit2* init);
|
||||
void CollisionCheck_Damage(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
s32 CollisionCheck_LineOCCheckAll(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b);
|
||||
s32 CollisionCheck_LineOCCheck(struct GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b, struct Actor** exclusions, s32 numExclusions);
|
||||
void CollisionCheck_Damage(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx);
|
||||
s32 CollisionCheck_LineOCCheckAll(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b);
|
||||
s32 CollisionCheck_LineOCCheck(GlobalContext* globalCtx, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b, struct Actor** exclusions, s32 numExclusions);
|
||||
void Collider_UpdateCylinder(struct Actor* actor, ColliderCylinder* collider);
|
||||
void Collider_SetCylinderPosition(ColliderCylinder* collider, Vec3s* pos);
|
||||
void Collider_SetQuadVertices(ColliderQuad* collider, Vec3f* a, Vec3f* b, Vec3f* c, Vec3f* d);
|
||||
void Collider_SetTrisVertices(ColliderTris* collider, s32 index, Vec3f* a, Vec3f* b, Vec3f* c);
|
||||
void Collider_SetTrisDim(struct GlobalContext* globalCtx, ColliderTris* collider, s32 index, struct ColliderTrisElementDimInit* init);
|
||||
void Collider_SetTrisDim(GlobalContext* globalCtx, ColliderTris* collider, s32 index, struct ColliderTrisElementDimInit* init);
|
||||
void Collider_UpdateSpheres(s32 limb, ColliderJntSph* collider);
|
||||
void CollisionCheck_SpawnRedBlood(struct GlobalContext* globalCtx, Vec3f* v);
|
||||
void CollisionCheck_SpawnWaterDroplets(struct GlobalContext* globalCtx, Vec3f* v);
|
||||
void CollisionCheck_SpawnShieldParticles(struct GlobalContext* globalCtx, Vec3f* v);
|
||||
void CollisionCheck_SpawnShieldParticlesMetal(struct GlobalContext* globalCtx, Vec3f* v);
|
||||
void CollisionCheck_SpawnShieldParticlesMetalSound(struct GlobalContext* globalCtx, Vec3f* v, Vec3f* actorPos);
|
||||
void CollisionCheck_SpawnShieldParticlesMetal2(struct GlobalContext* globalCtx, Vec3f* v);
|
||||
void CollisionCheck_SpawnShieldParticlesWood(struct GlobalContext* globalCtx, Vec3f* b, Vec3f* actorPos);
|
||||
void CollisionCheck_SpawnRedBlood(GlobalContext* globalCtx, Vec3f* v);
|
||||
void CollisionCheck_SpawnWaterDroplets(GlobalContext* globalCtx, Vec3f* v);
|
||||
void CollisionCheck_SpawnShieldParticles(GlobalContext* globalCtx, Vec3f* v);
|
||||
void CollisionCheck_SpawnShieldParticlesMetal(GlobalContext* globalCtx, Vec3f* v);
|
||||
void CollisionCheck_SpawnShieldParticlesMetalSound(GlobalContext* globalCtx, Vec3f* v, Vec3f* actorPos);
|
||||
void CollisionCheck_SpawnShieldParticlesMetal2(GlobalContext* globalCtx, Vec3f* v);
|
||||
void CollisionCheck_SpawnShieldParticlesWood(GlobalContext* globalCtx, Vec3f* b, Vec3f* actorPos);
|
||||
s32 CollisionCheck_CylSideVsLineSeg(f32 radius, f32 height, f32 offset, Vec3f* actorPos, Vec3f* itemPos, Vec3f* itemProjPos, Vec3f* out1, Vec3f* out2);
|
||||
u8 CollisionCheck_GetSwordDamage(s32 dmgFlags);
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "framerate.h"
|
||||
#include "ultra64.h"
|
||||
#include "z64math.h"
|
||||
#include "globalctx.h"
|
||||
|
||||
struct EntranceCutscene
|
||||
{
|
||||
|
@ -317,11 +318,11 @@ struct CutsceneContext
|
|||
/* 0x28 */ CsCmdActorAction* npcActions[10]; // "npcdemopnt"
|
||||
}; // size = 0x50
|
||||
|
||||
void func_8006450C(struct GlobalContext* globalCtx, CutsceneContext* csCtx);
|
||||
void func_80064520(struct GlobalContext* globalCtx, CutsceneContext* csCtx);
|
||||
void func_80064534(struct GlobalContext* globalCtx, CutsceneContext* csCtx);
|
||||
void func_80064558(struct GlobalContext* globalCtx, CutsceneContext* csCtx);
|
||||
void Cinema_Update(struct GlobalContext* globalCtx, CutsceneContext* csCtx);
|
||||
void Cutscene_HandleEntranceTriggers(struct GlobalContext* globalCtx);
|
||||
void Cutscene_HandleConditionalTriggers(struct GlobalContext* globalCtx);
|
||||
void Cutscene_SetSegment(struct GlobalContext* globalCtx, void* segment);
|
||||
void func_8006450C(GlobalContext* globalCtx, CutsceneContext* csCtx);
|
||||
void func_80064520(GlobalContext* globalCtx, CutsceneContext* csCtx);
|
||||
void func_80064534(GlobalContext* globalCtx, CutsceneContext* csCtx);
|
||||
void func_80064558(GlobalContext* globalCtx, CutsceneContext* csCtx);
|
||||
void Cinema_Update(GlobalContext* globalCtx, CutsceneContext* csCtx);
|
||||
void Cutscene_HandleEntranceTriggers(GlobalContext* globalCtx);
|
||||
void Cutscene_HandleConditionalTriggers(GlobalContext* globalCtx);
|
||||
void Cutscene_SetSegment(GlobalContext* globalCtx, void* segment);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "z64math.h"
|
||||
|
||||
struct GraphicsContext;
|
||||
struct GlobalContext;
|
||||
#include "globalctx.h"
|
||||
|
||||
/* Effects */
|
||||
|
||||
|
@ -170,7 +170,7 @@ struct EffectShieldParticle
|
|||
|
||||
typedef struct
|
||||
{
|
||||
/* 0x0000 */ struct GlobalContext* globalCtx;
|
||||
/* 0x0000 */ GlobalContext* globalCtx;
|
||||
struct
|
||||
{
|
||||
EffectStatus status;
|
||||
|
@ -209,9 +209,9 @@ enum EffectType
|
|||
|
||||
struct EffectSs;
|
||||
|
||||
typedef u32 (*EffectSsInitFunc)(struct GlobalContext* globalCtx, u32 index, struct EffectSs* effectSs, void* initParams);
|
||||
typedef void (*EffectSsUpdateFunc)(struct GlobalContext* globalCtx, u32 index, struct EffectSs* effectSs);
|
||||
typedef void (*EffectSsDrawFunc)(struct GlobalContext* globalCtx, u32 index, struct EffectSs* effectSs);
|
||||
typedef u32 (*EffectSsInitFunc)(GlobalContext* globalCtx, u32 index, struct EffectSs* effectSs, void* initParams);
|
||||
typedef void (*EffectSsUpdateFunc)(GlobalContext* globalCtx, u32 index, struct EffectSs* effectSs);
|
||||
typedef void (*EffectSsDrawFunc)(GlobalContext* globalCtx, u32 index, struct EffectSs* effectSs);
|
||||
|
||||
struct EffectSsInit
|
||||
{
|
||||
|
@ -296,111 +296,111 @@ void EffectSpark_Init(void* thissx, void* initParamsx);
|
|||
void EffectSpark_Destroy(void* thissx);
|
||||
s32 EffectSpark_Update(void* thissx);
|
||||
void EffectSpark_Draw(void* thissx, struct GraphicsContext* gfxCtx);
|
||||
void func_80026230(struct GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3);
|
||||
void func_80026400(struct GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3);
|
||||
void func_80026608(struct GlobalContext* globalCtx);
|
||||
void func_80026690(struct GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3);
|
||||
void func_80026860(struct GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3);
|
||||
void func_80026A6C(struct GlobalContext* globalCtx);
|
||||
struct GlobalContext* Effect_GetGlobalCtx(void);
|
||||
void func_80026230(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3);
|
||||
void func_80026400(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3);
|
||||
void func_80026608(GlobalContext* globalCtx);
|
||||
void func_80026690(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3);
|
||||
void func_80026860(GlobalContext* globalCtx, Color_RGBA8* color, s16 arg2, s16 arg3);
|
||||
void func_80026A6C(GlobalContext* globalCtx);
|
||||
GlobalContext* Effect_GetGlobalCtx(void);
|
||||
void* Effect_GetByIndex(s32 index);
|
||||
void Effect_InitContext(struct GlobalContext* globalCtx);
|
||||
void Effect_Add(struct GlobalContext* globalCtx, s32* pIndex, s32 type, u8 arg3, u8 arg4, void* initParams);
|
||||
void Effect_InitContext(GlobalContext* globalCtx);
|
||||
void Effect_Add(GlobalContext* globalCtx, s32* pIndex, s32 type, u8 arg3, u8 arg4, void* initParams);
|
||||
void Effect_DrawAll(struct GraphicsContext* gfxCtx);
|
||||
void Effect_UpdateAll(struct GlobalContext* globalCtx);
|
||||
void Effect_Delete(struct GlobalContext* globalCtx, s32 index);
|
||||
void Effect_DeleteAll(struct GlobalContext* globalCtx);
|
||||
void EffectSs_InitInfo(struct GlobalContext* globalCtx, s32 tableSize);
|
||||
void EffectSs_ClearAll(struct GlobalContext* globalCtx);
|
||||
void Effect_UpdateAll(GlobalContext* globalCtx);
|
||||
void Effect_Delete(GlobalContext* globalCtx, s32 index);
|
||||
void Effect_DeleteAll(GlobalContext* globalCtx);
|
||||
void EffectSs_InitInfo(GlobalContext* globalCtx, s32 tableSize);
|
||||
void EffectSs_ClearAll(GlobalContext* globalCtx);
|
||||
void EffectSs_Delete(EffectSs* effectSs);
|
||||
void EffectSs_Reset(EffectSs* effectSs);
|
||||
void EffectSs_Insert(struct GlobalContext* globalCtx, EffectSs* effectSs);
|
||||
void EffectSs_Spawn(struct GlobalContext* globalCtx, s32 type, s32 priority, void* initParams);
|
||||
void EffectSs_UpdateAll(struct GlobalContext* globalCtx);
|
||||
void EffectSs_DrawAll(struct GlobalContext* globalCtx);
|
||||
void EffectSs_Insert(GlobalContext* globalCtx, EffectSs* effectSs);
|
||||
void EffectSs_Spawn(GlobalContext* globalCtx, s32 type, s32 priority, void* initParams);
|
||||
void EffectSs_UpdateAll(GlobalContext* globalCtx);
|
||||
void EffectSs_DrawAll(GlobalContext* globalCtx);
|
||||
s16 func_80027DD4(s16 arg0, s16 arg1, s32 arg2);
|
||||
s16 func_80027E34(s16 arg0, s16 arg1, f32 arg2);
|
||||
u8 func_80027E84(u8 arg0, u8 arg1, f32 arg2);
|
||||
void EffectSs_DrawGEffect(struct GlobalContext* globalCtx, EffectSs* thiss, void* texture);
|
||||
void EffectSsDust_Spawn(struct GlobalContext* globalCtx, u16 drawFlags, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life, u8 updateMode);
|
||||
void func_8002829C(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||
void func_80028304(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||
void func_8002836C(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
|
||||
void func_800283D4(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
|
||||
void func_8002843C(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
|
||||
void func_800284A4(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||
void func_80028510(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||
void func_8002857C(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||
void func_800285EC(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||
void func_8002865C(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
|
||||
void func_800286CC(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
|
||||
void func_8002873C(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 life);
|
||||
void func_800287AC(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 life);
|
||||
void func_8002881C(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
||||
void func_80028858(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
||||
void func_80028990(struct GlobalContext* globalCtx, f32 randScale, Vec3f* srcPos);
|
||||
void func_80028A54(struct GlobalContext* globalCtx, f32 randScale, Vec3f* srcPos);
|
||||
void EffectSsKiraKira_SpawnSmallYellow(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||
void EffectSsKiraKira_SpawnSmall(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
||||
void EffectSsKiraKira_SpawnDispersed(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life);
|
||||
void EffectSsKiraKira_SpawnFocused(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life);
|
||||
void EffectSsBomb_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||
void EffectSsBomb2_SpawnFade(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||
void EffectSsBomb2_SpawnLayered(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
|
||||
void EffectSsBlast_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 sclaeStepDecay, s16 life);
|
||||
void EffectSsBlast_SpawnWhiteCustomScale(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 life);
|
||||
void EffectSsBlast_SpawnShockwave(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 life);
|
||||
void EffectSsBlast_SpawnWhiteShockwave(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||
void EffectSsGSpk_SpawnAccel(struct GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||
void EffectSsGSpk_SpawnNoAccel(struct GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||
void EffectSsGSpk_SpawnFuse(struct GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||
void EffectSsGSpk_SpawnRandColor(struct GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
|
||||
void EffectSsGSpk_SpawnSmall(struct GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
||||
void EffectSsDFire_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 alpha, s16 fadeDelay, s32 life);
|
||||
void EffectSsDFire_SpawnFixedScale(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 alpha, s16 fadeDelay);
|
||||
void EffectSsBubble_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, f32 yPosOffset, f32 yPosRandScale, f32 xzPosRandScale, f32 scale);
|
||||
void EffectSsGRipple_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, s16 radius, s16 radiusMax, s16 life);
|
||||
void EffectSsGSplash_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 type, s16 scale);
|
||||
void EffectSsGMagma_Spawn(struct GlobalContext* globalCtx, Vec3f* pos);
|
||||
void EffectSsGFire_Spawn(struct GlobalContext* globalCtx, Vec3f* pos);
|
||||
void EffectSsLightning_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 yaw, s16 life, s16 numBolts);
|
||||
void EffectSsDtBubble_SpawnColorProfile(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 life, s16 colorProfile, s16 randXZ);
|
||||
void EffectSsDtBubble_SpawnCustomColor(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 life, s16 randXZ);
|
||||
void EffectSsHahen_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused, s16 scale, s16 objId, s16 life, Gfx* dList);
|
||||
void EffectSsHahen_SpawnBurst(struct GlobalContext* globalCtx, Vec3f* pos, f32 burstScale, s16 unused, s16 scale, s16 randScaleRange, s16 count, s16 objId, s16 life, Gfx* dList);
|
||||
void EffectSsStick_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, s16 yaw);
|
||||
void EffectSsSibuki_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 moveDelay, s16 direction, s16 scale);
|
||||
void EffectSsSibuki_SpawnBurst(struct GlobalContext* globalCtx, Vec3f* pos);
|
||||
void EffectSsSibuki2_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale);
|
||||
void EffectSsGMagma2_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 updateRate, s16 drawMode, s16 scale);
|
||||
void EffectSsStone1_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, s32 arg2);
|
||||
void EffectSsHitMark_Spawn(struct GlobalContext* globalCtx, s32 type, s16 scale, Vec3f* pos);
|
||||
void EffectSsHitMark_SpawnFixedScale(struct GlobalContext* globalCtx, s32 type, Vec3f* pos);
|
||||
void EffectSsHitMark_SpawnCustomScale(struct GlobalContext* globalCtx, s32 type, s16 scale, Vec3f* pos);
|
||||
void EffectSsFhgFlash_SpawnLightBall(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, u8 param);
|
||||
void EffectSsFhgFlash_SpawnShock(struct GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, s16 scale, u8 param);
|
||||
void EffectSsKFire_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scaleMax, u8 type);
|
||||
void EffectSsSolderSrchBall_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused, s16* linkDetected);
|
||||
void EffectSsKakera_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* arg3, s16 gravity, s16 arg5, s16 arg6, s16 arg7, s16 arg8, s16 scale, s16 arg10, s16 arg11, s32 life, s16 colorIdx, s16 objId, Gfx* dList);
|
||||
void EffectSsIcePiece_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel, s32 life);
|
||||
void EffectSsIcePiece_SpawnBurst(struct GlobalContext* globalCtx, Vec3f* refPos, f32 scale);
|
||||
void EffectSsEnIce_SpawnFlyingVec3f(struct GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, s16 primR, s16 primG, s16 primB, s16 primA, s16 envR, s16 envG, s16 envB, f32 scale);
|
||||
void EffectSsEnIce_SpawnFlyingVec3s(struct GlobalContext* globalCtx, struct Actor* actor, Vec3s* pos, s16 primR, s16 primG, s16 primB, s16 primA, s16 envR, s16 envG, s16 envB, f32 scale);
|
||||
void EffectSsEnIce_Spawn(struct GlobalContext* arg0, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s32 life);
|
||||
void EffectSsFireTail_Spawn(struct GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, f32 scale, Vec3f* arg4, s16 arg5, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 type, s16 bodyPart, s32 life);
|
||||
void EffectSsFireTail_SpawnFlame(struct GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, f32 arg3, s16 bodyPart, f32 colorIntensity);
|
||||
void EffectSsFireTail_SpawnFlameOnPlayer(struct GlobalContext* globalCtx, f32 scale, s16 bodyPart, f32 colorIntensity);
|
||||
void EffectSsEnFire_SpawnVec3f(struct GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, s16 scale, s16 unk_12, s16 flags, s16 bodyPart);
|
||||
void EffectSsEnFire_SpawnVec3s(struct GlobalContext* globalCtx, struct Actor* actor, Vec3s* vec, s16 scale, s16 arg4, s16 flags, s16 bodyPart);
|
||||
void EffectSsExtra_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scoreIdx);
|
||||
void EffectSsFCircle_Spawn(struct GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, s16 radius, s16 height);
|
||||
void EffectSsDeadDb_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 primR, s16 primG, s16 primB, s16 primA, s16 envR, s16 envG, s16 envB, s16 unused, s32 arg14, s16 playSound);
|
||||
void EffectSsDeadDd_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 primR, s16 primG, s16 primB, s16 alpha, s16 envR, s16 envG, s16 envB, s16 alphaStep, s32 life);
|
||||
void EffectSsDeadDd_SpawnRandYellow(struct GlobalContext* globalCtx, Vec3f* pos, s16 scale, s16 scaleStep, f32 randPosScale, s32 randIter, s32 life);
|
||||
void EffectSsDeadDs_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 alpha, s32 life);
|
||||
void EffectSsDeadDs_SpawnStationary(struct GlobalContext* globalCtx, Vec3f* pos, s16 scale, s16 scaleStep, s16 alpha, s32 life);
|
||||
void EffectSsDeadSound_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, u16 sfxId, s16 lowerPriority, s16 repeatMode, s32 life);
|
||||
void EffectSsDeadSound_SpawnStationary(struct GlobalContext* globalCtx, Vec3f* pos, u16 sfxId, s16 lowerPriority, s16 repeatMode, s32 life);
|
||||
void EffectSsIceSmoke_Spawn(struct GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale);
|
||||
void EffectSs_DrawGEffect(GlobalContext* globalCtx, EffectSs* thiss, void* texture);
|
||||
void EffectSsDust_Spawn(GlobalContext* globalCtx, u16 drawFlags, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life, u8 updateMode);
|
||||
void func_8002829C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||
void func_80028304(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||
void func_8002836C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
|
||||
void func_800283D4(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
|
||||
void func_8002843C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 life);
|
||||
void func_800284A4(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||
void func_80028510(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||
void func_8002857C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||
void func_800285EC(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||
void func_8002865C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
|
||||
void func_800286CC(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
|
||||
void func_8002873C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 life);
|
||||
void func_800287AC(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 life);
|
||||
void func_8002881C(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
||||
void func_80028858(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
||||
void func_80028990(GlobalContext* globalCtx, f32 randScale, Vec3f* srcPos);
|
||||
void func_80028A54(GlobalContext* globalCtx, f32 randScale, Vec3f* srcPos);
|
||||
void EffectSsKiraKira_SpawnSmallYellow(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||
void EffectSsKiraKira_SpawnSmall(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
||||
void EffectSsKiraKira_SpawnDispersed(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life);
|
||||
void EffectSsKiraKira_SpawnFocused(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s32 life);
|
||||
void EffectSsBomb_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||
void EffectSsBomb2_SpawnFade(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||
void EffectSsBomb2_SpawnLayered(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
|
||||
void EffectSsBlast_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep, s16 sclaeStepDecay, s16 life);
|
||||
void EffectSsBlast_SpawnWhiteCustomScale(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 life);
|
||||
void EffectSsBlast_SpawnShockwave(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 life);
|
||||
void EffectSsBlast_SpawnWhiteShockwave(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||
void EffectSsGSpk_SpawnAccel(GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||
void EffectSsGSpk_SpawnNoAccel(GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 scaleStep);
|
||||
void EffectSsGSpk_SpawnFuse(GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
||||
void EffectSsGSpk_SpawnRandColor(GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep);
|
||||
void EffectSsGSpk_SpawnSmall(GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor);
|
||||
void EffectSsDFire_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 alpha, s16 fadeDelay, s32 life);
|
||||
void EffectSsDFire_SpawnFixedScale(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 alpha, s16 fadeDelay);
|
||||
void EffectSsBubble_Spawn(GlobalContext* globalCtx, Vec3f* pos, f32 yPosOffset, f32 yPosRandScale, f32 xzPosRandScale, f32 scale);
|
||||
void EffectSsGRipple_Spawn(GlobalContext* globalCtx, Vec3f* pos, s16 radius, s16 radiusMax, s16 life);
|
||||
void EffectSsGSplash_Spawn(GlobalContext* globalCtx, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 type, s16 scale);
|
||||
void EffectSsGMagma_Spawn(GlobalContext* globalCtx, Vec3f* pos);
|
||||
void EffectSsGFire_Spawn(GlobalContext* globalCtx, Vec3f* pos);
|
||||
void EffectSsLightning_Spawn(GlobalContext* globalCtx, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 yaw, s16 life, s16 numBolts);
|
||||
void EffectSsDtBubble_SpawnColorProfile(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 life, s16 colorProfile, s16 randXZ);
|
||||
void EffectSsDtBubble_SpawnCustomColor(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 scale, s16 life, s16 randXZ);
|
||||
void EffectSsHahen_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused, s16 scale, s16 objId, s16 life, Gfx* dList);
|
||||
void EffectSsHahen_SpawnBurst(GlobalContext* globalCtx, Vec3f* pos, f32 burstScale, s16 unused, s16 scale, s16 randScaleRange, s16 count, s16 objId, s16 life, Gfx* dList);
|
||||
void EffectSsStick_Spawn(GlobalContext* globalCtx, Vec3f* pos, s16 yaw);
|
||||
void EffectSsSibuki_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 moveDelay, s16 direction, s16 scale);
|
||||
void EffectSsSibuki_SpawnBurst(GlobalContext* globalCtx, Vec3f* pos);
|
||||
void EffectSsSibuki2_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale);
|
||||
void EffectSsGMagma2_Spawn(GlobalContext* globalCtx, Vec3f* pos, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 updateRate, s16 drawMode, s16 scale);
|
||||
void EffectSsStone1_Spawn(GlobalContext* globalCtx, Vec3f* pos, s32 arg2);
|
||||
void EffectSsHitMark_Spawn(GlobalContext* globalCtx, s32 type, s16 scale, Vec3f* pos);
|
||||
void EffectSsHitMark_SpawnFixedScale(GlobalContext* globalCtx, s32 type, Vec3f* pos);
|
||||
void EffectSsHitMark_SpawnCustomScale(GlobalContext* globalCtx, s32 type, s16 scale, Vec3f* pos);
|
||||
void EffectSsFhgFlash_SpawnLightBall(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, u8 param);
|
||||
void EffectSsFhgFlash_SpawnShock(GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, s16 scale, u8 param);
|
||||
void EffectSsKFire_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scaleMax, u8 type);
|
||||
void EffectSsSolderSrchBall_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 unused, s16* linkDetected);
|
||||
void EffectSsKakera_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* arg3, s16 gravity, s16 arg5, s16 arg6, s16 arg7, s16 arg8, s16 scale, s16 arg10, s16 arg11, s32 life, s16 colorIdx, s16 objId, Gfx* dList);
|
||||
void EffectSsIcePiece_Spawn(GlobalContext* globalCtx, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel, s32 life);
|
||||
void EffectSsIcePiece_SpawnBurst(GlobalContext* globalCtx, Vec3f* refPos, f32 scale);
|
||||
void EffectSsEnIce_SpawnFlyingVec3f(GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, s16 primR, s16 primG, s16 primB, s16 primA, s16 envR, s16 envG, s16 envB, f32 scale);
|
||||
void EffectSsEnIce_SpawnFlyingVec3s(GlobalContext* globalCtx, struct Actor* actor, Vec3s* pos, s16 primR, s16 primG, s16 primB, s16 primA, s16 envR, s16 envG, s16 envB, f32 scale);
|
||||
void EffectSsEnIce_Spawn(GlobalContext* arg0, Vec3f* pos, f32 scale, Vec3f* velocity, Vec3f* accel, Color_RGBA8* primColor, Color_RGBA8* envColor, s32 life);
|
||||
void EffectSsFireTail_Spawn(GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, f32 scale, Vec3f* arg4, s16 arg5, Color_RGBA8* primColor, Color_RGBA8* envColor, s16 type, s16 bodyPart, s32 life);
|
||||
void EffectSsFireTail_SpawnFlame(GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, f32 arg3, s16 bodyPart, f32 colorIntensity);
|
||||
void EffectSsFireTail_SpawnFlameOnPlayer(GlobalContext* globalCtx, f32 scale, s16 bodyPart, f32 colorIntensity);
|
||||
void EffectSsEnFire_SpawnVec3f(GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, s16 scale, s16 unk_12, s16 flags, s16 bodyPart);
|
||||
void EffectSsEnFire_SpawnVec3s(GlobalContext* globalCtx, struct Actor* actor, Vec3s* vec, s16 scale, s16 arg4, s16 flags, s16 bodyPart);
|
||||
void EffectSsExtra_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scoreIdx);
|
||||
void EffectSsFCircle_Spawn(GlobalContext* globalCtx, struct Actor* actor, Vec3f* pos, s16 radius, s16 height);
|
||||
void EffectSsDeadDb_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 primR, s16 primG, s16 primB, s16 primA, s16 envR, s16 envG, s16 envB, s16 unused, s32 arg14, s16 playSound);
|
||||
void EffectSsDeadDd_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 primR, s16 primG, s16 primB, s16 alpha, s16 envR, s16 envG, s16 envB, s16 alphaStep, s32 life);
|
||||
void EffectSsDeadDd_SpawnRandYellow(GlobalContext* globalCtx, Vec3f* pos, s16 scale, s16 scaleStep, f32 randPosScale, s32 randIter, s32 life);
|
||||
void EffectSsDeadDs_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale, s16 scaleStep, s16 alpha, s32 life);
|
||||
void EffectSsDeadDs_SpawnStationary(GlobalContext* globalCtx, Vec3f* pos, s16 scale, s16 scaleStep, s16 alpha, s32 life);
|
||||
void EffectSsDeadSound_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, u16 sfxId, s16 lowerPriority, s16 repeatMode, s32 life);
|
||||
void EffectSsDeadSound_SpawnStationary(GlobalContext* globalCtx, Vec3f* pos, u16 sfxId, s16 lowerPriority, s16 repeatMode, s32 life);
|
||||
void EffectSsIceSmoke_Spawn(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, Vec3f* accel, s16 scale);
|
||||
|
||||
extern EffectSsOverlay gEffectSsOverlayTable[EFFECT_SS_TYPE_MAX];
|
||||
|
|
|
@ -9,7 +9,6 @@ struct PauseContext;
|
|||
struct MessageContext;
|
||||
struct GameOverContext;
|
||||
struct View;
|
||||
struct GlobalContext;
|
||||
|
||||
#define FILL_SCREEN_OPA (1 << 0)
|
||||
#define FILL_SCREEN_XLU (1 << 1)
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
#include "regs.h"
|
||||
#include "ultra64/types.h"
|
||||
|
||||
struct GameState;
|
||||
|
||||
typedef void (*GameStateFunc)(struct GameState* gameState);
|
||||
|
||||
struct GameAllocEntry
|
||||
{
|
||||
/* 0x00 */ struct GameAllocEntry* next;
|
||||
|
@ -23,21 +19,6 @@ struct GameAlloc
|
|||
/* 0x10 */ GameAllocEntry* head;
|
||||
}; // size = 0x14
|
||||
|
||||
struct GameState
|
||||
{
|
||||
/* 0x00 */ GraphicsContext* gfxCtx;
|
||||
/* 0x04 */ GameStateFunc main;
|
||||
/* 0x08 */ GameStateFunc destroy; // "cleanup"
|
||||
/* 0x0C */ GameStateFunc init;
|
||||
/* 0x10 */ u32 size;
|
||||
/* 0x14 */ Input input[4];
|
||||
/* 0x74 */ TwoHeadArena tha;
|
||||
/* 0x84 */ GameAlloc alloc;
|
||||
/* 0x98 */ u32 running;
|
||||
/* 0x9C */ Counter frames;
|
||||
/* 0xA0 */ u32 unk_A0;
|
||||
}; // size = 0xA4
|
||||
|
||||
enum GameOverState
|
||||
{
|
||||
/* 00 */ GAMEOVER_INACTIVE,
|
||||
|
@ -75,20 +56,4 @@ struct GameInfo
|
|||
/* 0x14 */ s16 data[REG_GROUPS * REG_PER_GROUP]; // 0xAE0 entries
|
||||
}; // size = 0x15D4
|
||||
|
||||
struct GameStateOverlay
|
||||
{
|
||||
/* 0x00 */ Pointer loadedRamAddr;
|
||||
/* 0x04 */ Pointer vromStart; // if applicable
|
||||
/* 0x08 */ Pointer vromEnd; // if applicable
|
||||
/* 0x0C */ Pointer vramStart; // if applicable
|
||||
/* 0x10 */ Pointer vramEnd; // if applicable
|
||||
/* 0x14 */ UNK_PTR unk_14;
|
||||
/* 0x18 */ void* init; // initializes and executes the given context
|
||||
/* 0x1C */ void* destroy; // deconstructs the context, and sets the next context to load
|
||||
/* 0x20 */ UNK_PTR unk_20;
|
||||
/* 0x24 */ UNK_PTR unk_24;
|
||||
/* 0x28 */ UNK_TYPE4 unk_28;
|
||||
/* 0x2C */ u32 instanceSize;
|
||||
}; // size = 0x30
|
||||
|
||||
extern GameInfo* gGameInfo;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "z64scene.h"
|
||||
#include "z64sram.h"
|
||||
#include "z64transition.h"
|
||||
#include "gamestate.h"
|
||||
|
||||
struct FrameAdvanceContext
|
||||
{
|
||||
|
@ -45,84 +46,99 @@ typedef struct
|
|||
/* 0x24C */ s32 (*isDone)(void* transition);
|
||||
} TransitionContext; // size = 0x250
|
||||
|
||||
// Global Context (dbg ram start: 80212020)
|
||||
struct GlobalContext
|
||||
namespace oot::gamestate
|
||||
{
|
||||
/* 0x00000 */ GameState state;
|
||||
/* 0x000A4 */ s16 sceneNum;
|
||||
/* 0x000A6 */ u8 sceneConfig;
|
||||
/* 0x000A7 */ char unk_A7[0x9];
|
||||
/* 0x000B0 */ void* sceneSegment;
|
||||
/* 0x000B8 */ View view;
|
||||
/* 0x001E0 */ Camera mainCamera;
|
||||
/* 0x0034C */ Camera subCameras[NUM_CAMS - SUBCAM_FIRST];
|
||||
/* 0x00790 */ Camera* cameraPtrs[NUM_CAMS];
|
||||
/* 0x007A0 */ s16 activeCamera;
|
||||
/* 0x007A2 */ s16 nextCamera;
|
||||
/* 0x007A4 */ SequenceContext sequenceCtx;
|
||||
/* 0x007A8 */ LightContext lightCtx;
|
||||
/* 0x007B8 */ FrameAdvanceContext frameAdvCtx;
|
||||
/* 0x007C0 */ CollisionContext colCtx;
|
||||
/* 0x01C24 */ ActorContext actorCtx;
|
||||
/* 0x01D64 */ CutsceneContext csCtx; // "demo_play"
|
||||
/* 0x01DB4 */ SoundSource soundSources[16];
|
||||
/* 0x01F78 */ SkyboxContext skyboxCtx;
|
||||
/* 0x020D8 */ MessageContext msgCtx; // "message"
|
||||
/* 0x104F0 */ InterfaceContext interfaceCtx; // "parameter"
|
||||
/* 0x10760 */ PauseContext pauseCtx;
|
||||
/* 0x10A20 */ GameOverContext gameOverCtx;
|
||||
/* 0x10A24 */ EnvironmentContext envCtx;
|
||||
/* 0x10B20 */ AnimationContext animationCtx;
|
||||
/* 0x117A4 */ ObjectContext objectCtx;
|
||||
/* 0x11CBC */ RoomContext roomCtx;
|
||||
/* 0x11D34 */ TransitionActorContext transiActorCtx;
|
||||
/* 0x11D3C */ void (*playerInit)(struct Player* player, struct GlobalContext* globalCtx, FlexSkeletonHeader* skelHeader);
|
||||
/* 0x11D40 */ void (*playerUpdate)(struct Player* player, struct GlobalContext* globalCtx, Input* input);
|
||||
/* 0x11D44 */ s32 (*isPlayerDroppingFish)(struct GlobalContext* globalCtx);
|
||||
/* 0x11D48 */ s32 (*startPlayerFishing)(struct GlobalContext* globalCtx);
|
||||
/* 0x11D4C */ s32 (*grabPlayer)(struct GlobalContext* globalCtx, struct Player* player);
|
||||
/* 0x11D50 */ s32 (*startPlayerCutscene)(struct GlobalContext* globalCtx, Actor* actor, s32 mode);
|
||||
/* 0x11D54 */ void (*func_11D54)(struct Player* player, struct GlobalContext* globalCtx);
|
||||
/* 0x11D58 */ s32 (*damagePlayer)(struct GlobalContext* globalCtx, s32 damage);
|
||||
/* 0x11D5C */ void (*talkWithPlayer)(struct GlobalContext* globalCtx, Actor* actor);
|
||||
/* 0x11D60 */ MtxF viewProjectionMtxF;
|
||||
/* 0x11DA0 */ MtxF billboardMtxF;
|
||||
/* 0x11DE0 */ Mtx* billboardMtx;
|
||||
/* 0x11DE4 */ Counter gameplayFrames;
|
||||
/* 0x11DE8 */ u8 linkAgeOnLoad;
|
||||
/* 0x11DE9 */ u8 unk_11DE9;
|
||||
/* 0x11DEA */ u8 curSpawn;
|
||||
/* 0x11DEB */ u8 numSetupActors;
|
||||
/* 0x11DEC */ u8 numRooms;
|
||||
/* 0x11DF0 */ RomFile* roomList;
|
||||
/* 0x11DF4 */ ActorEntry* linkActorEntry;
|
||||
/* 0x11DF8 */ ActorEntry* setupActorList;
|
||||
/* 0x11DFC */ UNK_PTR unk_11DFC;
|
||||
/* 0x11E00 */ EntranceEntry* setupEntranceList;
|
||||
/* 0x11E04 */ s16* setupExitList;
|
||||
/* 0x11E08 */ Path* setupPathList;
|
||||
/* 0x11E0C */ ElfMessage* cUpElfMsgs;
|
||||
/* 0x11E10 */ void* specialEffects;
|
||||
/* 0x11E14 */ u8 skyboxId;
|
||||
/* 0x11E15 */ s8 sceneLoadFlag; // "fade_direction"
|
||||
/* 0x11E16 */ s16 unk_11E16;
|
||||
/* 0x11E18 */ s16 unk_11E18;
|
||||
/* 0x11E1A */ s16 nextEntranceIndex;
|
||||
/* 0x11E1C */ char unk_11E1C[0x40];
|
||||
/* 0x11E5C */ s8 shootingGalleryStatus;
|
||||
/* 0x11E5D */ s8 bombchuBowlingStatus; // "bombchu_game_flag"
|
||||
/* 0x11E5E */ u8 fadeTransition;
|
||||
/* 0x11E60 */ CollisionCheckContext colChkCtx;
|
||||
/* 0x120FC */ u16 envFlags[20];
|
||||
/* 0x12124 */ PreRender pauseBgPreRender;
|
||||
/* 0x12174 */ char unk_12174[0x53];
|
||||
/* 0x121C7 */ s8 unk_121C7;
|
||||
/* 0x121C8 */ TransitionContext transitionCtx;
|
||||
/* 0x12418 */ char unk_12418[0x3];
|
||||
/* 0x1241B */ u8 transitionMode; // "fbdemo_wipe_modem"
|
||||
/* 0x1241C */ TransitionFade transitionFade;
|
||||
/* 0x12428 */ char unk_12428[0x3];
|
||||
/* 0x1242B */ u8 unk_1242B;
|
||||
/* 0x1242C */ SceneTableEntry* loadedScene;
|
||||
/* 0x12430 */ char unk_12430[0xE8];
|
||||
}; // size = 0x12518
|
||||
struct GlobalData
|
||||
{
|
||||
/* 0x000A4 */ s16 sceneNum;
|
||||
/* 0x000A6 */ u8 sceneConfig;
|
||||
/* 0x000A7 */ char unk_A7[0x9];
|
||||
/* 0x000B0 */ void* sceneSegment;
|
||||
/* 0x000B8 */ View view;
|
||||
/* 0x001E0 */ Camera mainCamera;
|
||||
/* 0x0034C */ Camera subCameras[NUM_CAMS - SUBCAM_FIRST];
|
||||
/* 0x00790 */ Camera* cameraPtrs[NUM_CAMS];
|
||||
/* 0x007A0 */ s16 activeCamera;
|
||||
/* 0x007A2 */ s16 nextCamera;
|
||||
/* 0x007A4 */ SequenceContext sequenceCtx;
|
||||
/* 0x007A8 */ LightContext lightCtx;
|
||||
/* 0x007B8 */ FrameAdvanceContext frameAdvCtx;
|
||||
/* 0x007C0 */ CollisionContext colCtx;
|
||||
/* 0x01C24 */ ActorContext actorCtx;
|
||||
/* 0x01D64 */ CutsceneContext csCtx; // "demo_play"
|
||||
/* 0x01DB4 */ SoundSource soundSources[16];
|
||||
/* 0x01F78 */ SkyboxContext skyboxCtx;
|
||||
/* 0x020D8 */ MessageContext msgCtx; // "message"
|
||||
/* 0x104F0 */ InterfaceContext interfaceCtx; // "parameter"
|
||||
/* 0x10760 */ PauseContext pauseCtx;
|
||||
/* 0x10A20 */ GameOverContext gameOverCtx;
|
||||
/* 0x10A24 */ EnvironmentContext envCtx;
|
||||
/* 0x10B20 */ AnimationContext animationCtx;
|
||||
/* 0x117A4 */ ObjectContext objectCtx;
|
||||
/* 0x11CBC */ RoomContext roomCtx;
|
||||
/* 0x11D34 */ TransitionActorContext transiActorCtx;
|
||||
/* 0x11D3C */ void (*playerInit)(struct Player* player, GlobalContext* globalCtx, FlexSkeletonHeader* skelHeader);
|
||||
/* 0x11D40 */ void (*playerUpdate)(struct Player* player, GlobalContext* globalCtx, Input* input);
|
||||
/* 0x11D44 */ s32 (*isPlayerDroppingFish)(GlobalContext* globalCtx);
|
||||
/* 0x11D48 */ s32 (*startPlayerFishing)(GlobalContext* globalCtx);
|
||||
/* 0x11D4C */ s32 (*grabPlayer)(GlobalContext* globalCtx, Player* player);
|
||||
/* 0x11D50 */ s32 (*startPlayerCutscene)(GlobalContext* globalCtx, Actor* actor, s32 mode);
|
||||
/* 0x11D54 */ void (*func_11D54)(struct Player* player, GlobalContext* globalCtx);
|
||||
/* 0x11D58 */ s32 (*damagePlayer)(GlobalContext* globalCtx, s32 damage);
|
||||
/* 0x11D5C */ void (*talkWithPlayer)(GlobalContext* globalCtx, Actor* actor);
|
||||
/* 0x11D60 */ MtxF viewProjectionMtxF;
|
||||
/* 0x11DA0 */ MtxF billboardMtxF;
|
||||
/* 0x11DE0 */ Mtx* billboardMtx;
|
||||
/* 0x11DE8 */ u8 linkAgeOnLoad;
|
||||
/* 0x11DE9 */ u8 unk_11DE9;
|
||||
/* 0x11DEA */ u8 curSpawn;
|
||||
/* 0x11DEB */ u8 numSetupActors;
|
||||
/* 0x11DEC */ u8 numRooms;
|
||||
/* 0x11DF0 */ RomFile* roomList;
|
||||
/* 0x11DF4 */ ActorEntry* linkActorEntry;
|
||||
/* 0x11DF8 */ ActorEntry* setupActorList;
|
||||
/* 0x11DFC */ UNK_PTR unk_11DFC;
|
||||
/* 0x11E00 */ EntranceEntry* setupEntranceList;
|
||||
/* 0x11E04 */ s16* setupExitList;
|
||||
/* 0x11E08 */ Path* setupPathList;
|
||||
/* 0x11E0C */ ElfMessage* cUpElfMsgs;
|
||||
/* 0x11E10 */ void* specialEffects;
|
||||
/* 0x11E14 */ u8 skyboxId;
|
||||
/* 0x11E15 */ s8 sceneLoadFlag; // "fade_direction"
|
||||
/* 0x11E16 */ s16 unk_11E16;
|
||||
/* 0x11E18 */ s16 unk_11E18;
|
||||
/* 0x11E1A */ s16 nextEntranceIndex;
|
||||
/* 0x11E1C */ char unk_11E1C[0x40];
|
||||
/* 0x11E5C */ s8 shootingGalleryStatus;
|
||||
/* 0x11E5D */ s8 bombchuBowlingStatus; // "bombchu_game_flag"
|
||||
/* 0x11E5E */ u8 fadeTransition;
|
||||
/* 0x11E60 */ CollisionCheckContext colChkCtx;
|
||||
/* 0x120FC */ u16 envFlags[20];
|
||||
/* 0x12124 */ PreRender pauseBgPreRender;
|
||||
/* 0x12174 */ char unk_12174[0x53];
|
||||
/* 0x121C7 */ s8 unk_121C7;
|
||||
/* 0x121C8 */ TransitionContext transitionCtx;
|
||||
/* 0x12418 */ char unk_12418[0x3];
|
||||
/* 0x1241B */ u8 transitionMode; // "fbdemo_wipe_modem"
|
||||
/* 0x1241C */ TransitionFade transitionFade;
|
||||
/* 0x12428 */ char unk_12428[0x3];
|
||||
/* 0x1242B */ u8 unk_1242B;
|
||||
/* 0x1242C */ SceneTableEntry* loadedScene;
|
||||
/* 0x12430 */ char unk_12430[0xE8];
|
||||
};
|
||||
|
||||
// Global Context (dbg ram start: 80212020)
|
||||
struct Global : public Base, public GlobalData
|
||||
{
|
||||
Global(GraphicsContext* gfxCtx);
|
||||
~Global();
|
||||
|
||||
void init() override;
|
||||
void main() override;
|
||||
Base* next() override;
|
||||
|
||||
Counter gameplayFrames;
|
||||
}; // size = 0x12518
|
||||
} // namespace oot::gamestate
|
||||
|
||||
#include "globalctx.h"
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "ultra64.h"
|
||||
#include "ultra64/gbi.h"
|
||||
#include "z64math.h"
|
||||
#include "globalctx.h"
|
||||
|
||||
struct LightPoint
|
||||
{
|
||||
|
@ -74,15 +75,15 @@ void Lights_DirectionalSetInfo(LightInfo* info, s8 x, s8 y, s8 z, u8 r, u8 g, u8
|
|||
void Lights_Reset(Lights* lights, u8 ambentR, u8 ambentG, u8 ambentB);
|
||||
void Lights_Draw(Lights* lights, struct GraphicsContext* gfxCtx);
|
||||
void Lights_BindAll(Lights* lights, LightNode* listHead, Vec3f* vec);
|
||||
void LightContext_Init(struct GlobalContext* globalCtx, LightContext* lightCtx);
|
||||
void LightContext_Init(GlobalContext* globalCtx, LightContext* lightCtx);
|
||||
void LightContext_SetAmbientColor(LightContext* lightCtx, u8 r, u8 g, u8 b);
|
||||
void LightContext_SetFog(LightContext* lightCtx, u8 arg1, u8 arg2, u8 arg3, s16 numLights, s16 arg5);
|
||||
Lights* LightContext_NewLights(LightContext* lightCtx, struct GraphicsContext* gfxCtx);
|
||||
void LightContext_InitList(struct GlobalContext* globalCtx, LightContext* lightCtx);
|
||||
void LightContext_DestroyList(struct GlobalContext* globalCtx, LightContext* lightCtx);
|
||||
LightNode* LightContext_InsertLight(struct GlobalContext* globalCtx, LightContext* lightCtx, LightInfo* info);
|
||||
void LightContext_RemoveLight(struct GlobalContext* globalCtx, LightContext* lightCtx, LightNode* node);
|
||||
void LightContext_InitList(GlobalContext* globalCtx, LightContext* lightCtx);
|
||||
void LightContext_DestroyList(GlobalContext* globalCtx, LightContext* lightCtx);
|
||||
LightNode* LightContext_InsertLight(GlobalContext* globalCtx, LightContext* lightCtx, LightInfo* info);
|
||||
void LightContext_RemoveLight(GlobalContext* globalCtx, LightContext* lightCtx, LightNode* node);
|
||||
Lights* Lights_NewAndDraw(struct GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8 ambientB, u8 numLights, u8 r, u8 g, u8 b, s8 x, s8 y, s8 z);
|
||||
Lights* Lights_New(struct GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8 ambientB);
|
||||
void Lights_GlowCheck(struct GlobalContext* globalCtx);
|
||||
void Lights_DrawGlow(struct GlobalContext* globalCtx);
|
||||
void Lights_GlowCheck(GlobalContext* globalCtx);
|
||||
void Lights_DrawGlow(GlobalContext* globalCtx);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include <math.h>
|
||||
#include "framerate.h"
|
||||
#include "ultra64/types.h"
|
||||
#include "globalctx.h"
|
||||
|
||||
#define VEC_SET(V, X, Y, Z) \
|
||||
(V).x = (X); \
|
||||
|
@ -154,154 +155,5 @@ struct PosRot
|
|||
#define SQXYZ(vec) ((vec.x) * (vec.x) + (vec.y) * (vec.y) + (vec.z) * (vec.z))
|
||||
#define DOTXYZ(vec1, vec2) ((vec1.x) * (vec2.x) + (vec1.y) * (vec2.y) + (vec1.z) * (vec2.z))
|
||||
|
||||
/*
|
||||
f32 Math_FactorialF(f32 n);
|
||||
f32 Math_Factorial(s32 n);
|
||||
f32 Math_PowF(f32 base, s32 exp);
|
||||
f32 Math_SinF(f32 angle);
|
||||
f32 Math_CosF(f32 angle);
|
||||
s32 Math3D_PlaneVsLineSegClosestPoint(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA, f32 planeBB,
|
||||
f32 planeBC, f32 planeBDist, Vec3f* linePointA, Vec3f* linePointB,
|
||||
Vec3f* closestPoint);
|
||||
void Math3D_LineClosestToPoint(Linef* line, Vec3f* pos, Vec3f* closestPoint);
|
||||
s32 Math3D_PlaneVsPlaneVsLineClosestPoint(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA,
|
||||
f32 planeBB, f32 planeBC, f32 planeBDist, Vec3f* point, Vec3f* closestPoint);
|
||||
void Math3D_LineSplitRatio(Vec3f* v0, Vec3f* v1, f32 ratio, Vec3f* ret);
|
||||
f32 Math3D_Cos(Vec3f* a, Vec3f* b);
|
||||
s32 Math3D_CosOut(Vec3f* a, Vec3f* b, f32* dst);
|
||||
void Math3D_Vec3fReflect(Vec3f* vec, Vec3f* normal, Vec3f* reflVec);
|
||||
s32 Math3D_PointInSquare2D(f32 upperLeftX, f32 lowerRightX, f32 upperLeftY, f32 lowerRightY, f32 x, f32 y);
|
||||
f32 Math3D_Dist1DSq(f32 a, f32 b);
|
||||
f32 Math3D_Dist2DSq(f32 x0, f32 y0, f32 x1, f32 y1);
|
||||
f32 Math3D_Vec3fMagnitudeSq(Vec3f* vec);
|
||||
f32 Math3D_Vec3fMagnitude(Vec3f* vec);
|
||||
f32 Math3D_Vec3fDistSq(Vec3f* a, Vec3f* b);
|
||||
void Math3D_Vec3f_Cross(Vec3f* a, Vec3f* b, Vec3f* ret);
|
||||
void Math3D_SurfaceNorm(Vec3f* va, Vec3f* vb, Vec3f* vc, Vec3f* normal);
|
||||
f32 Math3D_Vec3f_DistXYZ(Vec3f* a, Vec3f* b);
|
||||
s32 Math3D_PointRelativeToCubeFaces(Vec3f* point, Vec3f* min, Vec3f* max);
|
||||
s32 Math3D_PointRelativeToCubeEdges(Vec3f* point, Vec3f* min, Vec3f* max);
|
||||
s32 Math3D_PointRelativeToCubeVertices(Vec3f* point, Vec3f* min, Vec3f* max);
|
||||
s32 Math3D_LineVsCube(Vec3f* min, Vec3f* max, Vec3f* a, Vec3f* b);
|
||||
void Math3D_RotateXZPlane(Vec3f* pointOnPlane, s16 angle, f32* a, f32* c, f32* d);
|
||||
void Math3D_DefPlane(Vec3f* va, Vec3f* vb, Vec3f* vc, f32* nx, f32* ny, f32* nz, f32* originDist);
|
||||
f32 Math3D_UDistPlaneToPos(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* p);
|
||||
f32 Math3D_DistPlaneToPos(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* p);
|
||||
s32 Math3D_TriChkPointParaYSlopedY(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 z, f32 x);
|
||||
s32 Math3D_TriChkPointParaYIntersectDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z,
|
||||
f32 x, f32* yIntersect, f32 chkDist);
|
||||
s32 Math3D_TriChkPointParaYIntersectInsideTri(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist,
|
||||
f32 z, f32 x, f32* yIntersect, f32 chkDist);
|
||||
s32 Math3D_TriChkLineSegParaYIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z,
|
||||
f32 x, f32* yIntersect, f32 y0, f32 y1);
|
||||
s32 Math3D_TriChkPointParaYDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, Plane* plane, f32 z, f32 x, f32 chkDist);
|
||||
s32 Math3D_TriChkPointParaXIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 y,
|
||||
f32 z, f32* xIntersect);
|
||||
s32 Math3D_TriChkLineSegParaXIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 y,
|
||||
f32 z, f32* xIntersect, f32 x0, f32 x1);
|
||||
s32 Math3D_TriChkPointParaXDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, Plane* plane, f32 y, f32 z, f32 chkDist);
|
||||
s32 Math3D_TriChkPointParaZIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 x,
|
||||
f32 y, f32* zIntersect);
|
||||
s32 Math3D_TriChkLineSegParaZIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 x,
|
||||
f32 y, f32* zIntersect, f32 z0, f32 z1);
|
||||
s32 Math3D_TriChkLineSegParaZDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, Plane* plane, f32 x, f32 y, f32 chkDist);
|
||||
s32 Math3D_LineSegVsPlane(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* linePointA, Vec3f* linePointB,
|
||||
Vec3f* intersect, s32 fromFront);
|
||||
void Math3D_TriNorm(TriNorm* tri, Vec3f* va, Vec3f* vb, Vec3f* vc);
|
||||
s32 Math3D_PointDistToLine2D(f32 x0, f32 y0, f32 x1, f32 y1, f32 x2, f32 y2, f32* lineLenSq);
|
||||
s32 Math3D_LineVsSph(Sphere16* sphere, Linef* line);
|
||||
s32 Math3D_TriVsSphIntersect(Sphere16* sphere, TriNorm* tri, Vec3f* intersectPoint);
|
||||
s32 Math3D_CylVsLineSeg(Cylinder16* cyl, Vec3f* linePointA, Vec3f* linePointB, Vec3f* intersectA, Vec3f* intersectB);
|
||||
s32 Math3D_CylVsTri(Cylinder16* cyl, TriNorm* tri);
|
||||
s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect);
|
||||
s32 Math3D_SphVsSph(Sphere16* sphereA, Sphere16* sphereB);
|
||||
s32 Math3D_SphVsSphOverlap(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize);
|
||||
s32 Math3D_SphVsSphOverlapCenter(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize, f32* centerDist);
|
||||
s32 Math3D_SphVsCylOverlapDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize);
|
||||
s32 Math3D_SphVsCylOverlapCenterDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize, f32* centerDist);
|
||||
s32 Math3D_CylOutsideCyl(Cylinder16* ca, Cylinder16* cb, f32* deadSpace);
|
||||
s32 Math3D_CylOutsideCylDist(Cylinder16* ca, Cylinder16* cb, f32* deadSpace, f32* xzDist);
|
||||
s32 Math3D_TriVsTriIntersect(TriNorm* ta, TriNorm* tb, Vec3f* intersect);
|
||||
s32 Math3D_XZInSphere(Sphere16* sphere, f32 x, f32 z);
|
||||
s32 Math3D_XYInSphere(Sphere16* sphere, f32 x, f32 y);
|
||||
s32 Math3D_YZInSphere(Sphere16* sphere, f32 y, f32 z);
|
||||
void Math3D_DrawSphere(struct GlobalContext* globalCtx, Sphere16* sph);
|
||||
void Math3D_DrawCylinder(struct GlobalContext* globalCtx, Cylinder16* cyl);
|
||||
s16 Math_Atan2S(f32 x, f32 y);
|
||||
f32 Math_Atan2F(f32 x, f32 y);
|
||||
void Matrix_Init(struct GameState* gameState);
|
||||
void Matrix_Push(void);
|
||||
void Matrix_Pop(void);
|
||||
void Matrix_Get(MtxF* dest);
|
||||
void Matrix_Put(MtxF* src);
|
||||
void Matrix_Mult(MtxF* mf, u8 mode);
|
||||
void Matrix_Translate(f32 x, f32 y, f32 z, u8 mode);
|
||||
void Matrix_Scale(f32 x, f32 y, f32 z, u8 mode);
|
||||
void Matrix_RotateX(f32 x, u8 mode);
|
||||
void Matrix_RotateY(f32 y, u8 mode);
|
||||
void Matrix_RotateZ(f32 z, u8 mode);
|
||||
void Matrix_RotateZYX(s16 x, s16 y, s16 z, u8 mode);
|
||||
void Matrix_TranslateRotateZYX(Vec3f* translation, Vec3s* rotation);
|
||||
void func_800D1694(f32 x, f32 y, f32 z, Vec3s* vec);
|
||||
Mtx* Matrix_MtxFToMtx(MtxF* src, Mtx* dest);
|
||||
Mtx* Matrix_ToMtx(Mtx* dest, char* file, s32 line);
|
||||
Mtx* Matrix_NewMtx(struct GraphicsContext* gfxCtx, char* file, s32 line);
|
||||
Mtx* Matrix_MtxFToNewMtx(MtxF* src, struct GraphicsContext* gfxCtx);
|
||||
void Matrix_MultVec3f(Vec3f* src, Vec3f* dest);
|
||||
void Matrix_MtxFCopy(MtxF* dest, MtxF* src);
|
||||
void Matrix_MtxToMtxF(Mtx* src, MtxF* dest);
|
||||
void Matrix_MultVec3fExt(Vec3f* src, Vec3f* dest, MtxF* mf);
|
||||
void Matrix_Transpose(MtxF* mf);
|
||||
void func_800D1FD4(MtxF* mf);
|
||||
void Matrix_MtxFToYXZRotS(MtxF* mf, Vec3s* rotDest, s32 flag);
|
||||
void Matrix_MtxFToZYXRotS(MtxF* mf, Vec3s* rotDest, s32 flag);
|
||||
void Matrix_RotateAxis(f32 f, Vec3f* vec, u8 mode);
|
||||
MtxF* Matrix_CheckFloats(MtxF* mf, char* file, s32 line);
|
||||
|
||||
|
||||
|
||||
f32 Math_CosS(s16 angle);
|
||||
f32 Math_SinS(s16 angle);
|
||||
s32 Math_ScaledStepToS(s16* pValue, s16 target, s16 step);
|
||||
s32 Math_StepToS(s16* pValue, s16 target, s16 step);
|
||||
s32 Math_StepToF(f32* pValue, f32 target, f32 step);
|
||||
s32 Math_StepUntilAngleS(s16* pValue, s16 limit, s16 step);
|
||||
s32 Math_StepUntilS(s16* pValue, s16 limit, s16 step);
|
||||
s32 Math_StepToAngleS(s16* pValue, s16 target, s16 step);
|
||||
s32 Math_StepUntilF(f32* pValue, f32 limit, f32 step);
|
||||
s32 Math_AsymStepToF(f32* pValue, f32 target, f32 incrStep, f32 decrStep);
|
||||
|
||||
|
||||
void Math_Vec3f_Copy(Vec3f* dest, Vec3f* src);
|
||||
void Math_Vec3s_ToVec3f(Vec3f* dest, Vec3s* src);
|
||||
void Math_Vec3f_Sum(Vec3f* a, Vec3f* b, Vec3f* dest);
|
||||
void Math_Vec3f_Diff(Vec3f* a, Vec3f* b, Vec3f* dest);
|
||||
void Math_Vec3s_DiffToVec3f(Vec3f* dest, Vec3s* a, Vec3s* b);
|
||||
void Math_Vec3f_Scale(Vec3f* vec, f32 scaleF);
|
||||
f32 Math_Vec3f_DistXYZ(Vec3f* a, Vec3f* b);
|
||||
f32 Math_Vec3f_DistXYZAndStoreDiff(Vec3f* a, Vec3f* b, Vec3f* dest);
|
||||
f32 Math_Vec3f_DistXZ(Vec3f* a, Vec3f* b);
|
||||
s16 Math_Vec3f_Yaw(Vec3f* a, Vec3f* b);
|
||||
s16 Math_Vec3f_Pitch(Vec3f* a, Vec3f* b);
|
||||
|
||||
f32 Math_SmoothStepToF(f32* pValue, f32 target, f32 fraction, f32 step, f32 minStep);
|
||||
void Math_ApproachF(f32* pValue, f32 target, f32 fraction, f32 step);
|
||||
void Math_ApproachZeroF(f32* pValue, f32 fraction, f32 step);
|
||||
f32 Math_SmoothStepToDegF(f32* pValue, f32 target, f32 fraction, f32 step, f32 minStep);
|
||||
s16 Math_SmoothStepToS(s16* pValue, s16 target, s16 scale, s16 step, s16 minStep);
|
||||
void Math_ApproachS(s16* pValue, s16 target, s16 scale, s16 step);
|
||||
|
||||
f32 Math_FTanF(f32 x);
|
||||
f32 Math_FFloorF(f32 x);
|
||||
f32 Math_FCeilF(f32 x);
|
||||
f32 Math_FRoundF(f32 x);
|
||||
f32 Math_FNearbyIntF(f32 x);
|
||||
f32 Math_FTruncF(f32 x);
|
||||
f32 Math_FAtanF(f32 x);
|
||||
f32 Math_FAtan2F(f32 y, f32 x);
|
||||
f32 Math_FAsinF(f32 x);
|
||||
f32 Math_FAcosF(f32 x);
|
||||
*/
|
||||
|
||||
extern Mtx gMtxClear;
|
||||
extern MtxF gMtxFClear;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#pragma once
|
||||
#include "globalctx.h"
|
||||
|
||||
void SystemArena_CheckPointer(void* ptr, u32 size, const char* name, const char* action);
|
||||
void* SystemArena_Malloc(u32 size);
|
||||
|
@ -9,7 +10,6 @@ void* SystemArena_Realloc(void* ptr, u32 newSize);
|
|||
void* SystemArena_ReallocDebug(void* ptr, u32 newSize, const char* file, s32 line);
|
||||
void SystemArena_Free(void* ptr);
|
||||
void SystemArena_FreeDebug(void* ptr, const char* file, s32 line);
|
||||
void* SystemArena_Calloc(u32 num, u32 size);
|
||||
void SystemArena_Display(void);
|
||||
void SystemArena_GetSizes(u32* outMaxFree, u32* outFree, u32* outAlloc);
|
||||
void SystemArena_Check(void);
|
||||
|
@ -42,12 +42,8 @@ void GameState_SetFrameBuffer(GraphicsContext* gfxCtx);
|
|||
void GameState_ReqPadData(GameState* gameState);
|
||||
void GameState_Update(GameState* gameState);
|
||||
void GameState_InitArena(GameState* gameState, size_t size);
|
||||
void GameState_Realloc(GameState* gameState, size_t size);
|
||||
void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* gfxCtx);
|
||||
void GameState_Destroy(GameState* gameState);
|
||||
GameStateFunc GameState_GetInit(GameState* gameState);
|
||||
u32 GameState_IsRunning(GameState* gameState);
|
||||
void* GameState_Alloc(GameState* gameState, size_t size, char* file, s32 line);
|
||||
void GameState_Realloc(GameState* gameState, size_t size);
|
||||
void func_800C55D0(GameAlloc* thiss);
|
||||
void* GameAlloc_MallocDebug(GameAlloc* thiss, u32 size, const char* file, s32 line);
|
||||
void* GameAlloc_Malloc(GameAlloc* thiss, u32 size);
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
#include "framerate.h"
|
||||
#include "ultra64.h"
|
||||
#include "z64math.h"
|
||||
#include "globalctx.h"
|
||||
#include "def/z_file_choose.h"
|
||||
|
||||
struct FileChooseContext;
|
||||
struct GameState;
|
||||
|
||||
struct ItemEquips
|
||||
{
|
||||
|
@ -257,8 +258,8 @@ namespace oot::save
|
|||
void copy(const u8 selectedFileIndex, const u8 copyDestFileIndex);
|
||||
void open(const u8 index);
|
||||
void save();
|
||||
void loadAllSaves(FileChooseContext* fileChooseCtx);
|
||||
void initialize(FileChooseContext* fileChooseCtx, const u8 slotId);
|
||||
void loadAllSaves(gamestate::FileChoose* fileChooseCtx);
|
||||
void initialize(gamestate::FileChoose* fileChooseCtx, const u8 slotId);
|
||||
void erase(const u8 slotId);
|
||||
void init();
|
||||
const s32& fileNumber() const;
|
||||
|
@ -387,7 +388,7 @@ namespace oot::save
|
|||
Slot& currentBackupSlot();
|
||||
void load(const u8 slotId);
|
||||
void load(const Slot& save);
|
||||
void setFileChooseData(FileChooseContext* fileChooseCtx, const u8 slotId = 0);
|
||||
void setFileChooseData(gamestate::FileChoose* fileChooseCtx, const u8 slotId = 0);
|
||||
};
|
||||
} // namespace oot::save
|
||||
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
|
||||
void DebugDisplay_Init(void);
|
||||
struct DebugDispObject* DebugDisplay_AddObject(f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, f32 scaleX, f32 scaleY, f32 scaleZ, u8 red, u8 green, u8 blue, u8 alpha, s16 type, struct GraphicsContext* gfxCtx);
|
||||
void DebugDisplay_DrawObjects(struct GlobalContext* globalCtx);
|
||||
void DebugDisplay_DrawObjects(GlobalContext* globalCtx);
|
||||
*/
|
||||
|
|
|
@ -1,87 +0,0 @@
|
|||
#pragma once
|
||||
#include "view.h"
|
||||
#include "z64environment.h"
|
||||
#include "z64game.h"
|
||||
#include "z64message.h"
|
||||
#include "z64render.h"
|
||||
#include "z64sram.h"
|
||||
|
||||
struct FileChooseContext
|
||||
{
|
||||
/* 0x00000 */ GameState state;
|
||||
/* 0x000A4 */ Vtx* windowVtx;
|
||||
/* 0x000B0 */ char unk_B0[0x8];
|
||||
/* 0x000B8 */ View view;
|
||||
/* 0x001E4 */ char unk_1E4[0x4];
|
||||
/* 0x001E8 */ SkyboxContext skyboxCtx;
|
||||
/* 0x00348 */ MessageContext msgCtx;
|
||||
/* 0x0E760 */ Font font;
|
||||
/* 0x1C8E8 */ EnvironmentContext envCtx;
|
||||
/* 0x1C9E4 */ char unk_1C9E4[0x4];
|
||||
/* 0x1C9E8 */ Vtx* windowContentVtx;
|
||||
/* 0x1C9EC */ Vtx* keyboardVtx;
|
||||
/* 0x1C9F0 */ Vtx* nameEntryVtx;
|
||||
/* 0x1C9F4 */ u8 n64ddFlag;
|
||||
/* 0x1C9F6 */ u16 deaths[3];
|
||||
/* 0x1C9FC */ u8 fileNames[3][8];
|
||||
/* 0x1CA14 */ u16 healthCapacities[3];
|
||||
/* 0x1CA1C */ u32 questItems[3];
|
||||
/* 0x1CA28 */ s16 n64ddFlags[3];
|
||||
/* 0x1CA2E */ s8 defense[3];
|
||||
/* 0x1CA32 */ u16 health[3];
|
||||
/* 0x1CA38 */ s16 buttonIndex;
|
||||
/* 0x1CA3A */ s16 confirmButtonIndex; // 0: yes, 1: quit
|
||||
/* 0x1CA3C */ s16 menuMode;
|
||||
/* 0x1CA3E */ s16 configMode;
|
||||
/* 0x1CA40 */ s16 prevConfigMode;
|
||||
/* 0x1CA42 */ s16 nextConfigMode;
|
||||
/* 0x1CA44 */ s16 selectMode;
|
||||
/* 0x1CA46 */ s16 selectedFileIndex;
|
||||
/* 0x1CA48 */ char unk_1CA48[0x2];
|
||||
/* 0x1CA4A */ s16 fileNamesY[3];
|
||||
/* 0x1CA50 */ s16 actionTimer;
|
||||
/* 0x1CA52 */ s16 buttonYOffsets[6];
|
||||
/* 0x1CA5E */ s16 copyDestFileIndex;
|
||||
/* 0x1CA60 */ s16 warningLabel;
|
||||
/* 0x1CA62 */ s16 warningButtonIndex;
|
||||
/* 0x1CA64 */ s16 titleLabel;
|
||||
/* 0x1CA66 */ s16 nextTitleLabel;
|
||||
/* 0x1CA68 */ s16 windowColor[3];
|
||||
/* 0x1CA6E */ s16 titleAlpha[2];
|
||||
/* 0x1CA72 */ s16 windowAlpha;
|
||||
/* 0x1CA74 */ s16 fileButtonAlpha[3];
|
||||
/* 0x1CA7A */ s16 nameBoxAlpha[3];
|
||||
/* 0x1CA80 */ s16 nameAlpha[3];
|
||||
/* 0x1CA86 */ s16 connectorAlpha[3];
|
||||
/* 0x1CA8C */ s16 fileInfoAlpha[3];
|
||||
/* 0x1CA92 */ s16 actionButtonAlpha[2];
|
||||
/* 0x1CA96 */ s16 confirmButtonAlpha[2];
|
||||
/* 0x1CA9A */ s16 optionButtonAlpha;
|
||||
/* 0x1CA9C */ s16 nameEntryBoxAlpha;
|
||||
/* 0x1CA9E */ s16 controlsAlpha;
|
||||
/* 0x1CAA0 */ s16 emptyFileTextAlpha;
|
||||
/* 0x1CAA2 */ s16 highlightColor[4];
|
||||
/* 0x1CAAA */ s16 highlightPulseDir; // 0 fade out, 1 fade in
|
||||
/* 0x1CAAC */ s16 unk_1CAAC; // initialized but never used
|
||||
/* 0x1CAAE */ s16 confirmButtonTexIndices[2];
|
||||
/* 0x1CAB2 */ s16 inputTimerX;
|
||||
/* 0x1CAB4 */ s16 inputTimerY;
|
||||
/* 0x1CAB6 */ s16 stickXDir;
|
||||
/* 0x1CAB8 */ s16 stickYDir;
|
||||
/* 0x1CABA */ s16 stickRelX;
|
||||
/* 0x1CABC */ s16 stickRelY;
|
||||
/* 0x1CABE */ s16 nameEntryBoxPosX;
|
||||
/* 0x1CAC0 */ s16 windowPosX;
|
||||
/* 0x1CAC4 */ f32 windowRot;
|
||||
/* 0x1CAC8 */ s16 kbdButton; // only for buttons, not characters
|
||||
/* 0x1CACA */ s16 charPage; // 0: hiragana, 1: katakana, 2: alphabet
|
||||
/* 0x1CACC */ s16 charBgAlpha; // square shape the letter sits in
|
||||
/* 0x1CACE */ s16 charIndex; // 0 - 64, top left to bottom right
|
||||
/* 0x1CAD0 */ s16 kbdX; // (0, 0) is top left character
|
||||
/* 0x1CAD2 */ s16 kbdY;
|
||||
/* 0x1CAD4 */ s16 newFileNameCharCount;
|
||||
/* 0x1CAD6 */ s16 unk_1CAD6[5];
|
||||
}; // size = 0x1CAE0
|
||||
|
||||
void FileChoose_Init(GameState* thissx);
|
||||
void FileChoose_Destroy(GameState* thissx);
|
|
@ -1,10 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
s16 OnePointCutscene_Init(struct GlobalContext* globalCtx, s16 csId, s16 timer, Actor* actor, s16 camIdx);
|
||||
s16 OnePointCutscene_EndCutscene(struct GlobalContext* globalCtx, s16 camIdx);
|
||||
s32 OnePointCutscene_Attention(struct GlobalContext* globalCtx, Actor* actor);
|
||||
s32 OnePointCutscene_AttentionSetSfx(struct GlobalContext* globalCtx, Actor* actor, s32 sfxId);
|
||||
s16 OnePointCutscene_Init(GlobalContext* globalCtx, s16 csId, s16 timer, Actor* actor, s16 camIdx);
|
||||
s16 OnePointCutscene_EndCutscene(GlobalContext* globalCtx, s16 camIdx);
|
||||
s32 OnePointCutscene_Attention(GlobalContext* globalCtx, Actor* actor);
|
||||
s32 OnePointCutscene_AttentionSetSfx(GlobalContext* globalCtx, Actor* actor, s32 sfxId);
|
||||
void OnePointCutscene_EnableAttention(void);
|
||||
void OnePointCutscene_DisableAttention(void);
|
||||
s32 OnePointCutscene_CheckForCategory(struct GlobalContext* globalCtx, s32 actorCategory);
|
||||
void OnePointCutscene_Noop(struct GlobalContext* globalCtx, s32 arg1);
|
||||
s32 OnePointCutscene_CheckForCategory(GlobalContext* globalCtx, s32 actorCategory);
|
||||
void OnePointCutscene_Noop(GlobalContext* globalCtx, s32 arg1);
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
#pragma once
|
||||
#include "view.h"
|
||||
#include "z64game.h"
|
||||
|
||||
struct OpeningContext
|
||||
{
|
||||
/* 0x0000 */ GameState state;
|
||||
/* 0x00A8 */ View view;
|
||||
}; // size = 0x1D0
|
||||
|
||||
void Opening_Init(GameState* thissx);
|
||||
void Opening_Destroy(GameState* thissx);
|
|
@ -2,32 +2,32 @@
|
|||
#include "ultra64/types.h"
|
||||
|
||||
void Interface_ChangeAlpha(u16 alphaType);
|
||||
void Interface_SetSceneRestrictions(struct GlobalContext* globalCtx);
|
||||
void Interface_SetSceneRestrictions(GlobalContext* globalCtx);
|
||||
void Inventory_SwapAgeEquipment(void);
|
||||
void Interface_InitHorsebackArchery(struct GlobalContext* globalCtx);
|
||||
void func_800849EC(struct GlobalContext* globalCtx);
|
||||
void Interface_LoadItemIcon1(struct GlobalContext* globalCtx, u16 button);
|
||||
void Interface_LoadItemIcon2(struct GlobalContext* globalCtx, u16 button);
|
||||
void func_80084BF4(struct GlobalContext* globalCtx, u16 flag);
|
||||
u8 Item_Give(struct GlobalContext* globalCtx, u8 item);
|
||||
void Interface_InitHorsebackArchery(GlobalContext* globalCtx);
|
||||
void func_800849EC(GlobalContext* globalCtx);
|
||||
void Interface_LoadItemIcon1(GlobalContext* globalCtx, u16 button);
|
||||
void Interface_LoadItemIcon2(GlobalContext* globalCtx, u16 button);
|
||||
void func_80084BF4(GlobalContext* globalCtx, u16 flag);
|
||||
u8 Item_Give(GlobalContext* globalCtx, u8 item);
|
||||
u8 Item_CheckObtainability(u8 item);
|
||||
void Inventory_DeleteItem(u16 item, u16 invSlot);
|
||||
s32 Inventory_ReplaceItem(struct GlobalContext* globalCtx, u16 oldItem, u16 newItem);
|
||||
s32 Inventory_ReplaceItem(GlobalContext* globalCtx, u16 oldItem, u16 newItem);
|
||||
s32 Inventory_HasEmptyBottle(void);
|
||||
s32 Inventory_HasSpecificBottle(u8 bottleItem);
|
||||
void Inventory_UpdateBottleItem(struct GlobalContext* globalCtx, u8 item, u8 cButton);
|
||||
s32 Inventory_ConsumeFairy(struct GlobalContext* globalCtx);
|
||||
void Interface_SetDoAction(struct GlobalContext* globalCtx, u16 action);
|
||||
void Interface_SetNaviCall(struct GlobalContext* globalCtx, u16 naviCallState);
|
||||
void Interface_LoadActionLabelB(struct GlobalContext* globalCtx, u16 action);
|
||||
s32 Health_ChangeBy(struct GlobalContext* globalCtx, s16 healthChange);
|
||||
void Inventory_UpdateBottleItem(GlobalContext* globalCtx, u8 item, u8 cButton);
|
||||
s32 Inventory_ConsumeFairy(GlobalContext* globalCtx);
|
||||
void Interface_SetDoAction(GlobalContext* globalCtx, u16 action);
|
||||
void Interface_SetNaviCall(GlobalContext* globalCtx, u16 naviCallState);
|
||||
void Interface_LoadActionLabelB(GlobalContext* globalCtx, u16 action);
|
||||
s32 Health_ChangeBy(GlobalContext* globalCtx, s16 healthChange);
|
||||
void Rupees_ChangeBy(s16 rupeeChange);
|
||||
void Inventory_ChangeAmmo(s16 item, s16 ammoChange);
|
||||
void Magic_Fill(struct GlobalContext* globalCtx);
|
||||
void func_800876C8(struct GlobalContext* globalCtx);
|
||||
s32 func_80087708(struct GlobalContext* globalCtx, s16 arg1, s16 arg2);
|
||||
void Magic_Fill(GlobalContext* globalCtx);
|
||||
void func_800876C8(GlobalContext* globalCtx);
|
||||
s32 func_80087708(GlobalContext* globalCtx, s16 arg1, s16 arg2);
|
||||
void func_80088AA0(s16 seconds);
|
||||
void func_80088AF0(struct GlobalContext* globalCtx);
|
||||
void func_80088AF0(GlobalContext* globalCtx);
|
||||
void func_80088B34(s16 arg0);
|
||||
void Interface_Draw(struct GlobalContext* globalCtx);
|
||||
void Interface_Update(struct GlobalContext* globalCtx);
|
||||
void Interface_Draw(GlobalContext* globalCtx);
|
||||
void Interface_Update(GlobalContext* globalCtx);
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
#pragma once
|
||||
#include "ultra64/time.h"
|
||||
#include "z64game.h"
|
||||
|
||||
struct PreNmiBuff
|
||||
{
|
||||
/* 0x00 */ u32 resetting;
|
||||
/* 0x04 */ u32 resetCount;
|
||||
/* 0x08 */ OSTime duration;
|
||||
/* 0x10 */ OSTime resetTime;
|
||||
}; // size = 0x18 (actually osAppNmiBuffer is 0x40 bytes large but the rest is unused)
|
||||
|
||||
struct PreNMIContext
|
||||
{
|
||||
/* 0x00 */ GameState state;
|
||||
/* 0xA4 */ u32 timer;
|
||||
/* 0xA8 */ UNK_TYPE4 unk_A8;
|
||||
}; // size = 0xAC
|
||||
|
||||
void Audio_PreNMIInternal(void);
|
||||
void Audio_PreNMI();
|
||||
|
||||
void PreNMI_Init(GameState* thissx);
|
|
@ -1,37 +0,0 @@
|
|||
#pragma once
|
||||
#include "view.h"
|
||||
|
||||
struct SelectContext;
|
||||
|
||||
struct SceneSelectEntry
|
||||
{
|
||||
/* 0x00 */ const char* name;
|
||||
/* 0x04 */ void (*loadFunc)(struct SelectContext*, s32);
|
||||
/* 0x08 */ s32 entranceIndex;
|
||||
}; // size = 0xC
|
||||
|
||||
struct SelectContext
|
||||
{
|
||||
/* 0x0000 */ GameState state;
|
||||
/* 0x00A8 */ View view;
|
||||
/* 0x01D0 */ s32 count;
|
||||
/* 0x01D4 */ SceneSelectEntry* scenes;
|
||||
/* 0x01D8 */ s32 currentScene;
|
||||
/* 0x01DC */ s32 pageDownIndex; // Index of pageDownStops
|
||||
/* 0x01E0 */ s32 pageDownStops[7];
|
||||
/* 0x01FC */ char unk_1FC[0x0C];
|
||||
/* 0x0208 */ s32 opt;
|
||||
/* 0x020C */ s32 topDisplayedScene; // The scene which is currently at the top of the screen
|
||||
/* 0x0210 */ char unk_210[0x0C];
|
||||
/* 0x021C */ s32 verticalInputAccumulator;
|
||||
/* 0x0220 */ s32 verticalInput;
|
||||
/* 0x0224 */ s32 timerUp;
|
||||
/* 0x0228 */ s32 timerDown;
|
||||
/* 0x022C */ s32 lockUp;
|
||||
/* 0x0230 */ s32 lockDown;
|
||||
/* 0x0234 */ s32 unk_234; // unused
|
||||
/* 0x0238 */ u8* staticSegment;
|
||||
}; // size = 0x240
|
||||
|
||||
void Select_Init(GameState* thissx);
|
||||
void Select_Destroy(GameState* thissx);
|
|
@ -1,24 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "ultra64/types.h"
|
||||
#include "view.h"
|
||||
#include "z64game.h"
|
||||
#include "z64sram.h"
|
||||
|
||||
struct TitleContext
|
||||
{
|
||||
/* 0x0000 */ GameState state;
|
||||
/* 0x00A8 */ View view;
|
||||
/* 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[0x01];
|
||||
/* 0x01E1 */ u8 exit;
|
||||
/* 0x01E2 */ char unk_1E2[0x06];
|
||||
}; // size = 0x1E8
|
||||
|
||||
void Title_Init(GameState* thissx);
|
||||
void Title_Destroy(GameState* thissx);
|
|
@ -399,7 +399,7 @@ void func_800B44E0(DbCamera* dbCamera, Camera* cam)
|
|||
{
|
||||
s32 i;
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CRIGHT))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_CRIGHT))
|
||||
{
|
||||
sDbCamAnim.keyframe = 0;
|
||||
sDbCamAnim.unk_0A = 1;
|
||||
|
@ -665,7 +665,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
sp80 = &dbCamera->eye;
|
||||
sp7C = &dbCamera->at;
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_Z))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_Z))
|
||||
{
|
||||
dbCamera->unk_00++;
|
||||
dbCamera->unk_00 %= 3;
|
||||
|
@ -777,7 +777,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
|
||||
dbCamera->unk_3C = D_80161140;
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_B | BTN_L))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_B | BTN_L))
|
||||
{
|
||||
sp104.r += temp_f2;
|
||||
|
||||
|
@ -797,7 +797,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
|
||||
dbCamera->unk_40 = 7;
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_B))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_B))
|
||||
{
|
||||
spFC = sp104;
|
||||
spFC.r = temp_f2;
|
||||
|
@ -822,7 +822,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
dbCamera->unk_40 = 0xB;
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_A | BTN_L))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_A | BTN_L))
|
||||
{
|
||||
sp104.r -= temp_f2;
|
||||
if(sp104.r < 10.0f)
|
||||
|
@ -839,7 +839,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
dbCamera->unk_40 = 8;
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_A))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_A))
|
||||
{
|
||||
spFC = sp104;
|
||||
spFC.r = -temp_f2;
|
||||
|
@ -870,7 +870,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
dbCamera->unk_40 = -1;
|
||||
}
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_DDOWN | BTN_L))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_DDOWN | BTN_L))
|
||||
{
|
||||
spFC = sp104;
|
||||
spFC.r = temp_f2;
|
||||
|
@ -896,7 +896,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
dbCamera->unk_40 = 1;
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_DUP | BTN_L))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_DUP | BTN_L))
|
||||
{
|
||||
spFC = sp104;
|
||||
spFC.r = -temp_f2;
|
||||
|
@ -921,7 +921,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
dbCamera->unk_40 = 2;
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_DUP))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_DUP))
|
||||
{
|
||||
spFC = sp104;
|
||||
spFC.r = temp_f2;
|
||||
|
@ -945,7 +945,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
dbCamera->unk_40 = 3;
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_DDOWN))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_DDOWN))
|
||||
{
|
||||
spFC = sp104;
|
||||
spFC.r = temp_f2;
|
||||
|
@ -969,7 +969,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
dbCamera->unk_40 = 4;
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, (BTN_DRIGHT | BTN_L)) || CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_DRIGHT))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, (BTN_DRIGHT | BTN_L)) || CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_DRIGHT))
|
||||
{
|
||||
spFC = sp104;
|
||||
spFC.r = temp_f2;
|
||||
|
@ -994,7 +994,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
dbCamera->unk_40 = 5;
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, (BTN_DLEFT | BTN_L)) || CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_DLEFT))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, (BTN_DLEFT | BTN_L)) || CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_DLEFT))
|
||||
{
|
||||
spFC = sp104;
|
||||
spFC.r = temp_f2;
|
||||
|
@ -1019,7 +1019,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
dbCamera->unk_40 = 6;
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_B | BTN_L))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_B | BTN_L))
|
||||
{
|
||||
sp104.r = sp104.r + temp_f2;
|
||||
if(sp104.r > 30000.0f)
|
||||
|
@ -1036,7 +1036,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
dbCamera->unk_40 = 7;
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_B))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_B))
|
||||
{
|
||||
spFC = sp104;
|
||||
spFC.r = temp_f2;
|
||||
|
@ -1061,7 +1061,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
dbCamera->unk_40 = 0xB;
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_A | BTN_L))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_A | BTN_L))
|
||||
{
|
||||
sp104.r -= temp_f2;
|
||||
if(sp104.r < 10.0f)
|
||||
|
@ -1078,7 +1078,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
dbCamera->unk_40 = 8;
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_A))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_A))
|
||||
{
|
||||
spFC = sp104;
|
||||
spFC.r = -temp_f2;
|
||||
|
@ -1109,7 +1109,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
dbCamera->unk_40 = -1;
|
||||
}
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_R))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_R))
|
||||
{
|
||||
if(dbCamera->unk_00 == 0)
|
||||
{
|
||||
|
@ -1128,13 +1128,13 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_R) && CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_R) && CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_L))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
dbCamera->sub.nPoints = dbCamera->sub.unkIdx + 1;
|
||||
func_800B4088(dbCamera, cam);
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_R))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_R))
|
||||
{
|
||||
if(dbCamera->sub.unkIdx == 0x80)
|
||||
{
|
||||
|
@ -1156,8 +1156,8 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
else
|
||||
{
|
||||
temp_f0_5 = sGlobalCtx->state.input[2].rel.stick_y;
|
||||
temp_f2_2 = sGlobalCtx->state.input[2].rel.stick_x;
|
||||
temp_f0_5 = sGlobalCtx->input[2].rel.stick_y;
|
||||
temp_f2_2 = sGlobalCtx->input[2].rel.stick_x;
|
||||
pitch = DEGF_TO_BINANG((SQ(temp_f0_5) / 600.0f) * 0.8f);
|
||||
yaw = DEGF_TO_BINANG((SQ(temp_f2_2) / 600.0f) * 0.8f);
|
||||
if(!D_80161144)
|
||||
|
@ -1181,7 +1181,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
DbCamera_CalcUpFromPitchYawRoll(&dbCamera->unk_1C, spF4.pitch, spF4.yaw, DEGF_TO_BINANG(dbCamera->rollDegrees));
|
||||
if(dbCamera->unk_00 == 1)
|
||||
{
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_CRIGHT))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_CRIGHT))
|
||||
{
|
||||
cam->inputDir = dbCamera->sub.unk_104A;
|
||||
new_var2 = OLib_Vec3fDist(&cam->at, &cam->eye);
|
||||
|
@ -1197,13 +1197,13 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
{
|
||||
OREG(0) = 8;
|
||||
func_8006376C(0xC, 5, 0, D_8012CEF4);
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_CRIGHT) && !CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_CRIGHT) && !CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_L))
|
||||
{
|
||||
func_800B44E0(dbCamera, cam);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CRIGHT) && CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_CRIGHT) && CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_L))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
osSyncPrintf("@@@\n@@@\n@@@/* *** spline point data ** start here *** */\n@@@\n");
|
||||
|
@ -1214,13 +1214,13 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
osSyncPrintf("@@@static short Mode = %d;\n@@@\n", dbCamera->sub.mode);
|
||||
osSyncPrintf("@@@\n@@@\n@@@/* *** spline point data ** finish! *** */\n@@@\n");
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CLEFT))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_CLEFT))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
dbCamera->sub.unk_08 = (dbCamera->sub.unk_08 + 1) % 3;
|
||||
}
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CUP) && CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_CUP) && CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_L))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
if(dbCamera->sub.unkIdx > 0)
|
||||
|
@ -1234,7 +1234,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CUP))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_CUP))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
if(dbCamera->sub.unkIdx > 0)
|
||||
|
@ -1261,7 +1261,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
}
|
||||
}
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L) && CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CDOWN))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_L) && CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_CDOWN))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
if(dbCamera->sub.unkIdx < (dbCamera->sub.nPoints - 1))
|
||||
|
@ -1275,7 +1275,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CDOWN))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_CDOWN))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_IT_SWORD_IMPACT, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
if(dbCamera->sub.unkIdx < (dbCamera->sub.nPoints - 1))
|
||||
|
@ -1364,7 +1364,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
break;
|
||||
case 1:
|
||||
dbCamera->unk_3C = true;
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DUP))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_DUP))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
if(dbCamera->sub.unk_0A == 0)
|
||||
|
@ -1376,7 +1376,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
dbCamera->sub.unk_0A--;
|
||||
}
|
||||
}
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DDOWN))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_DDOWN))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
if(dbCamera->sub.unk_0A == 5)
|
||||
|
@ -1388,13 +1388,13 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
dbCamera->sub.unk_0A++;
|
||||
}
|
||||
}
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DLEFT))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_DLEFT))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
switch(dbCamera->sub.unk_0A)
|
||||
{
|
||||
case 1:
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_L))
|
||||
{
|
||||
dbCamera->sub.lookAt[dbCamera->sub.unkIdx].nextPointFrame -= 5;
|
||||
}
|
||||
|
@ -1435,7 +1435,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
dbCamera->sub.unk_0C = false;
|
||||
break;
|
||||
case 2:
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_L))
|
||||
{
|
||||
dbCamera->sub.lookAt[dbCamera->sub.unkIdx].cameraRoll -= 5;
|
||||
dbCamera->roll = dbCamera->sub.lookAt[dbCamera->sub.unkIdx].cameraRoll;
|
||||
|
@ -1450,7 +1450,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
}
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_DLEFT))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_DLEFT))
|
||||
{
|
||||
if((D_8012D10C++ % 5) == 0)
|
||||
{
|
||||
|
@ -1460,7 +1460,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
switch(dbCamera->sub.unk_0A)
|
||||
{
|
||||
case 0:
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_L))
|
||||
{
|
||||
dbCamera->sub.lookAt[dbCamera->sub.unkIdx].viewAngle -= 1.0f;
|
||||
dbCamera->fov = dbCamera->sub.lookAt[dbCamera->sub.unkIdx].viewAngle;
|
||||
|
@ -1472,7 +1472,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
break;
|
||||
case 5:
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_L))
|
||||
{
|
||||
dbCamera->sub.nFrames -= 10;
|
||||
}
|
||||
|
@ -1502,14 +1502,14 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
}
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DRIGHT))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_DRIGHT))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_ATTENTION_ON, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
|
||||
switch(dbCamera->sub.unk_0A)
|
||||
{
|
||||
case 1:
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_L))
|
||||
{
|
||||
dbCamera->sub.lookAt[dbCamera->sub.unkIdx].nextPointFrame += 5;
|
||||
}
|
||||
|
@ -1549,7 +1549,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
dbCamera->sub.unk_0C = true;
|
||||
break;
|
||||
case 2:
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_L))
|
||||
{
|
||||
dbCamera->sub.lookAt[dbCamera->sub.unkIdx].cameraRoll += 5;
|
||||
dbCamera->roll = dbCamera->sub.lookAt[dbCamera->sub.unkIdx].cameraRoll;
|
||||
|
@ -1563,7 +1563,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_DRIGHT))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_DRIGHT))
|
||||
{
|
||||
if((D_8012D10C++ % 5) == 0)
|
||||
{
|
||||
|
@ -1573,7 +1573,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
switch(dbCamera->sub.unk_0A)
|
||||
{
|
||||
case 0:
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_L))
|
||||
{
|
||||
dbCamera->sub.lookAt[dbCamera->sub.unkIdx].viewAngle += 1.0f;
|
||||
dbCamera->fov = dbCamera->sub.lookAt[dbCamera->sub.unkIdx].viewAngle;
|
||||
|
@ -1585,7 +1585,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
break;
|
||||
case 5:
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_L))
|
||||
{
|
||||
dbCamera->sub.nFrames += 10;
|
||||
}
|
||||
|
@ -1702,7 +1702,7 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam)
|
|||
dbCamera->roll = 0;
|
||||
dbCamera->fov = 60.0f;
|
||||
dbCamera->rollDegrees = dbCamera->roll * 1.40625f;
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CLEFT))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_CLEFT))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
dbCamera->unk_78 = (dbCamera->unk_78 + 1) % 3;
|
||||
|
@ -2174,7 +2174,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
{
|
||||
if((1 << sCurFileIdx) & sMempakFiles)
|
||||
{
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DLEFT) || CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DRIGHT))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_DLEFT) || CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_DRIGHT))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
dbCamera->sub.demoCtrlToggleSwitch ^= 1;
|
||||
|
@ -2189,7 +2189,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
func_8006376C(0x11, 8, dbCamera->sub.demoCtrlToggleSwitch ? 4 : 7, D_8012CF94);
|
||||
func_8006376C(0x15, 8, dbCamera->sub.demoCtrlToggleSwitch ? 7 : 4, D_8012CF98);
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_A))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_A))
|
||||
{
|
||||
if(dbCamera->sub.demoCtrlToggleSwitch == 0)
|
||||
{
|
||||
|
@ -2220,7 +2220,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
func_8006376C(0xD, 9, dbCamera->sub.demoCtrlToggleSwitch ? 1 : 6, "PRESS B BUTTON");
|
||||
}
|
||||
}
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_B))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_B))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
dbCamera->sub.demoCtrlMenu = 0;
|
||||
|
@ -2265,7 +2265,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
func_8006376C(0x17, 7, 5, D_8012CFA4);
|
||||
func_8006376C(0xD, 9, (dbCamera->sub.demoCtrlToggleSwitch != 0) ? 1 : 6, "PRESS B BUTTON");
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_A) || CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_B))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_A) || CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_B))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
if(dbCamera->sub.demoCtrlMenu == DEMO_CTRL_MENU(ACTION_LOAD, MENU_SUCCESS))
|
||||
|
@ -2291,7 +2291,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
func_8006376C(0x17, 7, 5, D_8012CFA4);
|
||||
func_8006376C(0xD, 9, (dbCamera->sub.demoCtrlToggleSwitch != 0) ? 1 : 6, "PRESS B BUTTON");
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_A) || CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_B))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_A) || CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_B))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
dbCamera->sub.demoCtrlMenu -= 9;
|
||||
|
@ -2332,7 +2332,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
sp74[i * 2 + 0] = '-';
|
||||
sp74[i * 2 + 1] = '\0';
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DRIGHT))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_DRIGHT))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
if(sCurFileIdx >= 4)
|
||||
|
@ -2355,7 +2355,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
dbCamera->sub.demoCtrlActionIdx = ACTION_SAVE;
|
||||
}
|
||||
}
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DLEFT))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_DLEFT))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
if(sCurFileIdx <= 0)
|
||||
|
@ -2405,24 +2405,24 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
func_8006376C(0xD, 0x1A, 5, D_8012CF60[0]);
|
||||
func_8006376C(0x14, 0x1A, 5, D_8012CF70);
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DUP))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_DUP))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx - 1) % 4u;
|
||||
}
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DDOWN))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_DDOWN))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx + 1) % 4u;
|
||||
}
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_A))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_A))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
dbCamera->sub.demoCtrlToggleSwitch = 0;
|
||||
dbCamera->sub.demoCtrlMenu = DEMO_CTRL_MENU(dbCamera->sub.demoCtrlActionIdx, MENU_INFO);
|
||||
}
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_B))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_B))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
dbCamera->sub.demoCtrlActionIdx = ACTION_E;
|
||||
|
@ -2434,7 +2434,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
{
|
||||
func_8006376C(0xC, 0x1A, 4, D_8012CF60[0]);
|
||||
func_8006376C(0x13, 0x1A, 4, D_8012CF80);
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_B) || CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DUP) || CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DDOWN))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_B) || CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_DUP) || CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_DDOWN))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CANCEL, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
dbCamera->sub.demoCtrlActionIdx = ACTION_E;
|
||||
|
@ -2448,14 +2448,14 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
|
||||
default:
|
||||
{
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DUP))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_DUP))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
dbCamera->sub.demoCtrlMenu = DEMO_CTRL_MENU(ACTION_E, MENU_INFO);
|
||||
dbCamera->sub.demoCtrlActionIdx = (dbCamera->sub.demoCtrlActionIdx - 1) % 4u;
|
||||
sCurFileIdx = 0;
|
||||
}
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DDOWN))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_DDOWN))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
dbCamera->sub.demoCtrlMenu = DEMO_CTRL_MENU(ACTION_E, MENU_INFO);
|
||||
|
@ -2470,7 +2470,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
func_8006376C(4, 7, 5, D_8012CF4C);
|
||||
func_8006376C(D_8016110C * 2 + 6, 7, 7, ">");
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CUP))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_CUP))
|
||||
{
|
||||
if(D_8016110C > 0)
|
||||
{
|
||||
|
@ -2481,7 +2481,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
sDbCamAnim.keyframe = 0;
|
||||
sDbCamAnim.unk_04 = 0;
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CDOWN))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_CDOWN))
|
||||
{
|
||||
if(D_8016110C < 14)
|
||||
{
|
||||
|
@ -2492,7 +2492,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
sDbCamAnim.keyframe = 0;
|
||||
sDbCamAnim.unk_04 = 0;
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CLEFT))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_CLEFT))
|
||||
{
|
||||
sDbCamAnim.unk_0A = 0;
|
||||
Interface_ChangeAlpha(2);
|
||||
|
@ -2512,7 +2512,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
return 2;
|
||||
}
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[1].press.button, BTN_CRIGHT))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[1].press.button, BTN_CRIGHT))
|
||||
{
|
||||
D_8015FCC8 = 0;
|
||||
gSaveContext.cutsceneIndex = 0xFFFD;
|
||||
|
@ -2526,7 +2526,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
}
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_L))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_L))
|
||||
{
|
||||
if(sp74[sCurFileIdx] == '?')
|
||||
{
|
||||
|
@ -2539,7 +2539,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
D_801612EA = sDbCameraCuts[idx1].letter;
|
||||
}
|
||||
}
|
||||
else if(!CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L))
|
||||
else if(!CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_L))
|
||||
{
|
||||
if(sLastFileIdx != -1)
|
||||
{
|
||||
|
@ -2587,7 +2587,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
sLastFileIdx = -1;
|
||||
}
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_A))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_A))
|
||||
{
|
||||
if(sp74[sCurFileIdx] == '?')
|
||||
{
|
||||
|
@ -2600,7 +2600,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
}
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_B))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_B))
|
||||
{
|
||||
if(sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-')
|
||||
{
|
||||
|
@ -2610,7 +2610,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
}
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_R))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_R))
|
||||
{
|
||||
if(sp74[sCurFileIdx] != '?' && sp74[sCurFileIdx] != '-')
|
||||
{
|
||||
|
@ -2637,7 +2637,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
}
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DRIGHT))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_DRIGHT))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
if(sCurFileIdx == 0x1E)
|
||||
|
@ -2649,13 +2649,13 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
sCurFileIdx++;
|
||||
}
|
||||
}
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_DLEFT))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_DLEFT))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
sCurFileIdx = (sCurFileIdx == 0) ? 0x1E : sCurFileIdx - 1;
|
||||
}
|
||||
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L) && CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CRIGHT))
|
||||
if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_L) && CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_CRIGHT))
|
||||
{
|
||||
for(i = 0; i < ARRAY_COUNT(sDbCameraCuts) - 1; i++)
|
||||
{
|
||||
|
@ -2663,7 +2663,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
DbCamera_PrintAllCuts(cam);
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].cur.button, BTN_L) && CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CLEFT))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].cur.button, BTN_L) && CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_CLEFT))
|
||||
{
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gAudioDefaultPos, 4, &D_801333E0, &D_801333E0, &gReverbAdd2);
|
||||
for(i = 0; i < ARRAY_COUNT(sDbCameraCuts) - 1; i++)
|
||||
|
@ -2675,7 +2675,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->state.input[2].press.button, BTN_CRIGHT))
|
||||
else if(CHECK_BTN_ALL(sGlobalCtx->input[2].press.button, BTN_CRIGHT))
|
||||
{
|
||||
sDbCamAnim.curFrame = 0.0f;
|
||||
sDbCamAnim.keyframe = 0;
|
||||
|
|
|
@ -36,8 +36,8 @@ void FlagSet_Update(GlobalContext* globalCtx)
|
|||
{&gSaveContext.eventInf[0], "event_inf[0]"}, {&gSaveContext.eventInf[1], "event_inf[1]"}, {&gSaveContext.eventInf[2], "event_inf[2]"}, {&gSaveContext.eventInf[3], "event_inf[3]"},
|
||||
};
|
||||
|
||||
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
|
||||
Input* input = &globalCtx->state.input[0];
|
||||
GraphicsContext* gfxCtx = globalCtx->gfxCtx;
|
||||
Input* input = &globalCtx->input[0];
|
||||
Gfx* gfx;
|
||||
Gfx* polyOpa;
|
||||
|
||||
|
|
|
@ -102,10 +102,6 @@ Timer::Timer(float n) : m_counter(n), m_counterInt(n * COUNTER_SCALER), m_min(-0
|
|||
|
||||
Timer::Timer(float n, s64 min, s64 max) : m_counter(n), m_counterInt(n * COUNTER_SCALER), m_min(min), m_max(max)
|
||||
{
|
||||
if(n == 0xFFFF)
|
||||
{
|
||||
bool error = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Timer::setRange(s64 min, s64 max)
|
||||
|
@ -130,6 +126,11 @@ Timer Timer::invalid()
|
|||
|
||||
void Timer::update()
|
||||
{
|
||||
if(m_min == m_max)
|
||||
{
|
||||
bool error = true;
|
||||
}
|
||||
|
||||
while(m_counterInt > m_max * COUNTER_SCALER)
|
||||
{
|
||||
m_counterInt = (m_min * COUNTER_SCALER) + (m_counterInt - (m_max * COUNTER_SCALER + 1));
|
||||
|
@ -267,7 +268,7 @@ Timer& Timer::operator/=(float f)
|
|||
Timer& Timer::operator&=(u64 n)
|
||||
{
|
||||
//*this = m_counterInt & (n * COUNTER_SCALER);
|
||||
*this = whole() & n;
|
||||
*this = (whole() & n);// + frac();
|
||||
update();
|
||||
return *this;
|
||||
}
|
||||
|
|
|
@ -310,7 +310,7 @@ void GameState_Update(GameState* gameState)
|
|||
|
||||
GameState_SetFrameBuffer(gfxCtx);
|
||||
|
||||
gameState->main(gameState);
|
||||
gameState->main();
|
||||
|
||||
func_800C4344(gameState);
|
||||
|
||||
|
@ -470,108 +470,6 @@ void GameState_Realloc(GameState* gameState, size_t size)
|
|||
}
|
||||
}
|
||||
|
||||
void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* gfxCtx)
|
||||
{
|
||||
OSTime startTime;
|
||||
OSTime endTime;
|
||||
|
||||
osSyncPrintf("game constructor start\n"); // "game constructor start"
|
||||
gameState->gfxCtx = gfxCtx;
|
||||
gameState->frames = 0;
|
||||
gameState->main = NULL;
|
||||
gameState->destroy = NULL;
|
||||
gameState->running = 1;
|
||||
startTime = osGetTime();
|
||||
gameState->size = 0;
|
||||
gameState->init = NULL;
|
||||
endTime = osGetTime();
|
||||
|
||||
// "game_set_next_game_null processing time %d us"
|
||||
osSyncPrintf("game_set_next_game_null processing time %d us\n", OS_CYCLES_TO_USEC(endTime - startTime));
|
||||
startTime = endTime;
|
||||
GameAlloc_Init(&gameState->alloc);
|
||||
|
||||
endTime = osGetTime();
|
||||
// "gamealloc_init processing time %d us"
|
||||
osSyncPrintf("gamealloc_init processing time %d us\n", OS_CYCLES_TO_USEC(endTime - startTime));
|
||||
|
||||
// Generate grayscale versions of all icons
|
||||
KaleidoScope_SetupGrayIcons();
|
||||
|
||||
startTime = endTime;
|
||||
GameState_InitArena(gameState, 0x100000 * sizeof(uintptr_t) / 4); // TODO FIX HACK
|
||||
framerate_set_profile(PROFILE_GAMEPLAY);
|
||||
init(gameState);
|
||||
|
||||
endTime = osGetTime();
|
||||
// "init processing time %d us"
|
||||
osSyncPrintf("init processing time %d us\n", OS_CYCLES_TO_USEC(endTime - startTime));
|
||||
|
||||
startTime = endTime;
|
||||
LogUtils_CheckNullPointer("this->cleanup", gameState->destroy, "../game.c", 1088);
|
||||
func_800ACE70(&D_801664F0);
|
||||
func_800AD920(&D_80166500);
|
||||
VisMono_Init(&sMonoColors);
|
||||
if(SREG(48) == 0)
|
||||
{
|
||||
ViMode_Init(&sViMode);
|
||||
}
|
||||
SpeedMeter_Init(&D_801664D0);
|
||||
Rumble_Reset();
|
||||
// osSendMesg(&gameState->gfxCtx->queue, NULL, OS_MESG_BLOCK);
|
||||
|
||||
endTime = osGetTime();
|
||||
// "Other initialization processing time %d us"
|
||||
osSyncPrintf("Other initialization processing time %d us\n", OS_CYCLES_TO_USEC(endTime - startTime));
|
||||
|
||||
Fault_AddClient(&sGameFaultClient, GameState_FaultPrint, NULL, NULL);
|
||||
|
||||
osSyncPrintf("game constructor end\n"); // "game constructor end"
|
||||
}
|
||||
|
||||
void GameState_Destroy(GameState* gameState)
|
||||
{
|
||||
osSyncPrintf("game destructor start\n"); // "game destructor start"
|
||||
Audio_StopAllBanks();
|
||||
Audio_UpdateAll();
|
||||
// osRecvMesg(&gameState->gfxCtx->queue, NULL, OS_MESG_BLOCK);
|
||||
LogUtils_CheckNullPointer("this->cleanup", gameState->destroy, "../game.c", 1139);
|
||||
if(gameState->destroy != NULL)
|
||||
{
|
||||
gameState->destroy(gameState);
|
||||
}
|
||||
Rumble_Destroy();
|
||||
SpeedMeter_Destroy(&D_801664D0);
|
||||
func_800ACE90(&D_801664F0);
|
||||
func_800AD950(&D_80166500);
|
||||
VisMono_Destroy(&sMonoColors);
|
||||
if(SREG(48) == 0)
|
||||
{
|
||||
ViMode_Destroy(&sViMode);
|
||||
}
|
||||
THA_Dt(&gameState->tha);
|
||||
GameAlloc_Cleanup(&gameState->alloc);
|
||||
SystemArena_Display();
|
||||
Fault_RemoveClient(&sGameFaultClient);
|
||||
|
||||
osSyncPrintf("game destructor end\n"); // "game destructor end"
|
||||
}
|
||||
|
||||
GameStateFunc GameState_GetInit(GameState* gameState)
|
||||
{
|
||||
return gameState->init;
|
||||
}
|
||||
|
||||
size_t GameState_GetSize(GameState* gameState)
|
||||
{
|
||||
return gameState->size;
|
||||
}
|
||||
|
||||
u32 GameState_IsRunning(GameState* gameState)
|
||||
{
|
||||
return gameState->running;
|
||||
}
|
||||
|
||||
void* GameState_Alloc(GameState* gameState, size_t size, const char* file, s32 line)
|
||||
{
|
||||
void* ret;
|
||||
|
@ -614,3 +512,76 @@ s32 GameState_GetArenaSize(GameState* gameState)
|
|||
{
|
||||
return THA_GetSize(&gameState->tha);
|
||||
}
|
||||
|
||||
namespace oot::gamestate
|
||||
{
|
||||
Base::Base(GraphicsContext* gfxCtx) : gfxCtx(gfxCtx)
|
||||
{
|
||||
}
|
||||
|
||||
void Base::start()
|
||||
{
|
||||
osSyncPrintf("game constructor start\n"); // "game constructor start"
|
||||
|
||||
frames = 0;
|
||||
running = 1;
|
||||
|
||||
GameAlloc_Init(&alloc);
|
||||
|
||||
// Generate grayscale versions of all icons
|
||||
KaleidoScope_SetupGrayIcons();
|
||||
|
||||
GameState_InitArena(this, 0x100000 * sizeof(uintptr_t) / 4); // TODO FIX HACK
|
||||
framerate_set_profile(PROFILE_GAMEPLAY);
|
||||
|
||||
init();
|
||||
|
||||
func_800ACE70(&D_801664F0);
|
||||
func_800AD920(&D_80166500);
|
||||
VisMono_Init(&sMonoColors);
|
||||
|
||||
if(SREG(48) == 0)
|
||||
{
|
||||
ViMode_Init(&sViMode);
|
||||
}
|
||||
|
||||
SpeedMeter_Init(&D_801664D0);
|
||||
Rumble_Reset();
|
||||
// osSendMesg(&gameState->gfxCtx->queue, NULL, OS_MESG_BLOCK);
|
||||
|
||||
Fault_AddClient(&sGameFaultClient, GameState_FaultPrint, NULL, NULL);
|
||||
|
||||
osSyncPrintf("game constructor end\n"); // "game constructor end"
|
||||
}
|
||||
|
||||
Base::~Base()
|
||||
{
|
||||
osSyncPrintf("game destructor start\n"); // "game destructor start"
|
||||
Audio_StopAllBanks();
|
||||
Audio_UpdateAll();
|
||||
// osRecvMesg(&gameState->gfxCtx->queue, NULL, OS_MESG_BLOCK);
|
||||
|
||||
Rumble_Destroy();
|
||||
SpeedMeter_Destroy(&D_801664D0);
|
||||
func_800ACE90(&D_801664F0);
|
||||
func_800AD950(&D_80166500);
|
||||
VisMono_Destroy(&sMonoColors);
|
||||
|
||||
if(SREG(48) == 0)
|
||||
{
|
||||
ViMode_Destroy(&sViMode);
|
||||
}
|
||||
|
||||
THA_Dt(&tha);
|
||||
GameAlloc_Cleanup(&alloc);
|
||||
SystemArena_Display();
|
||||
Fault_RemoveClient(&sGameFaultClient);
|
||||
|
||||
osSyncPrintf("game destructor end\n"); // "game destructor end"
|
||||
}
|
||||
|
||||
void Base::loadNext()
|
||||
{
|
||||
Graph_SetNextGameState(next());
|
||||
}
|
||||
} // namespace oot::gamestate
|
||||
|
|
|
@ -9,17 +9,11 @@
|
|||
#include "padmgr.h"
|
||||
#include "speedmeter.h"
|
||||
#include "state.h"
|
||||
#include "title_setup.h"
|
||||
#include "ultra64/sched.h"
|
||||
#include "ultra64/time.h"
|
||||
#include "vt.h"
|
||||
#include "z64game.h"
|
||||
#include "z64save.h"
|
||||
#include "z_file_choose.h"
|
||||
#include "z_opening.h"
|
||||
#include "z_prenmi_buff.h"
|
||||
#include "z_select.h"
|
||||
#include "z_title.h"
|
||||
#include "def/TwoHeadArena.h"
|
||||
#include "def/audio.h"
|
||||
#include "def/createmesgqueue.h"
|
||||
|
@ -35,13 +29,12 @@
|
|||
#include "def/sys_cfb.h"
|
||||
#include "def/sys_ucode.h"
|
||||
#include "def/system_malloc.h"
|
||||
#include "def/z_DLF.h"
|
||||
#include "def/z_game_dlftbls.h"
|
||||
#include "def/title_setup.h"
|
||||
#include "def/z_file_choose.h"
|
||||
#include "def/z_opening.h"
|
||||
#include "def/z_play.h" // FORCE
|
||||
#include "def/z_prenmi_buff.h"
|
||||
|
||||
extern GameStateOverlay gGameStateOverlayTable[6];
|
||||
extern PreNmiBuff* gAppNmiBufferPtr;
|
||||
#include "def/z_select.h"
|
||||
#include "def/z_title.h"
|
||||
|
||||
#define GFXPOOL_HEAD_MAGIC 0x1234
|
||||
#define GFXPOOL_TAIL_MAGIC 0x5678
|
||||
|
@ -52,6 +45,9 @@ FaultClient sGraphFaultClient;
|
|||
CfbInfo sGraphCfbInfos[3];
|
||||
FaultClient sGraphUcodeFaultClient;
|
||||
|
||||
static std::unique_ptr<oot::gamestate::Base> gCurrentGameState = nullptr;
|
||||
static std::unique_ptr<oot::gamestate::Base> gNextGameState = nullptr;
|
||||
|
||||
bool isRunning();
|
||||
|
||||
void Graph_DisassembleUCode(Gfx* workBuf)
|
||||
|
@ -82,6 +78,12 @@ void Graph_InitTHGA(GraphicsContext* gfxCtx)
|
|||
gfxCtx->unk_014 = 0;
|
||||
}
|
||||
|
||||
void Graph_SetNextGameState(GameState* gameState)
|
||||
{
|
||||
gNextGameState = std::unique_ptr<GameState>(gameState);
|
||||
}
|
||||
|
||||
/*
|
||||
GameStateOverlay* Graph_GetNextGameState(GameState* gameState)
|
||||
{
|
||||
void* gameStateInitFunc = GameState_GetInit(gameState);
|
||||
|
@ -114,7 +116,7 @@ GameStateOverlay* Graph_GetNextGameState(GameState* gameState)
|
|||
LOG_ADDRESS("game_init_func", gameStateInitFunc, "../graph.c", 696);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
*/
|
||||
void Graph_Init(GraphicsContext* gfxCtx)
|
||||
{
|
||||
memset(gfxCtx, 0, sizeof(GraphicsContext));
|
||||
|
@ -249,9 +251,9 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState)
|
|||
// All dpad buttons pressed on controller 1? (Same as the back button on an xinput controller)
|
||||
if(CHECK_BTN_ALL(gameState->input[0].cur.button, BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT))
|
||||
{ // Open debug map select
|
||||
gameState->init = Select_Init;
|
||||
gameState->size = sizeof(SelectContext);
|
||||
gameState->running = false;
|
||||
Graph_SetNextGameState(new oot::gamestate::Select(gameState->gfxCtx));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -373,59 +375,24 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState)
|
|||
}
|
||||
sGraphUpdateTime = time;
|
||||
}
|
||||
|
||||
if(oot::config().game().enablDebugLevelSelect())
|
||||
{
|
||||
if(gIsCtrlr2Valid && CHECK_BTN_ALL(gameState->input[0].press.button, BTN_Z) && CHECK_BTN_ALL(gameState->input[0].cur.button, BTN_L | BTN_R))
|
||||
{
|
||||
gSaveContext.gameMode = 0;
|
||||
SET_NEXT_GAMESTATE(gameState, Select_Init, SelectContext);
|
||||
gameState->running = false;
|
||||
}
|
||||
}
|
||||
|
||||
if(gIsCtrlr2Valid && PreNmiBuff_IsResetting(gAppNmiBufferPtr) && !gameState->unk_A0)
|
||||
{
|
||||
// "To reset mode"
|
||||
osSyncPrintf(VT_COL(YELLOW, BLACK) "Enters reset mode via PRE-NMI \n" VT_RST);
|
||||
SET_NEXT_GAMESTATE(gameState, PreNMI_Init, PreNMIContext);
|
||||
gameState->running = false;
|
||||
}
|
||||
}
|
||||
|
||||
static u64 frameCount = 0;
|
||||
|
||||
void Graph_ThreadEntry(void* arg0)
|
||||
{
|
||||
GraphicsContext gfxCtx;
|
||||
GameState* gameState;
|
||||
u32 size;
|
||||
GameStateOverlay* nextOvl;
|
||||
GameStateOverlay* ovl;
|
||||
char faultMsg[0x50];
|
||||
|
||||
nextOvl = &gGameStateOverlayTable[0];
|
||||
GraphicsContext gfxCtx;
|
||||
|
||||
osSyncPrintf("Start graphic thread execution\n"); // "Start graphic thread execution"
|
||||
Graph_Init(&gfxCtx);
|
||||
|
||||
while(nextOvl && isRunning())
|
||||
gCurrentGameState = std::make_unique<oot::gamestate::TitleSetup>(&gfxCtx);
|
||||
|
||||
while(gCurrentGameState && isRunning())
|
||||
{
|
||||
ovl = nextOvl;
|
||||
Overlay_LoadGameState(ovl);
|
||||
gCurrentGameState->start();
|
||||
|
||||
size = ovl->instanceSize;
|
||||
osSyncPrintf("Class size = %d bytes\n", size); // "Class size = %d bytes"
|
||||
|
||||
gameState = (GameState*)SystemArena_MallocDebug(size * 2, "../graph.c", 1196);
|
||||
memset(gameState, 0, size * 2);
|
||||
|
||||
if(!gameState)
|
||||
{
|
||||
osSyncPrintf("Failure to secure\n"); // "Failure to secure"
|
||||
}
|
||||
GameState_Init(gameState, (GameStateFunc)ovl->init, &gfxCtx);
|
||||
|
||||
while(GameState_IsRunning(gameState) && isRunning())
|
||||
while(gCurrentGameState->running && isRunning())
|
||||
{
|
||||
// Has the TAS playback completed?
|
||||
/*if (oot::hid::tas::isTasPlaying() && oot::hid::tas::hasTasEnded())
|
||||
|
@ -434,7 +401,7 @@ void Graph_ThreadEntry(void* arg0)
|
|||
if(!oot::config().game().graphicsEnabled())
|
||||
{
|
||||
gfx_start_frame();
|
||||
Graph_Update(&gfxCtx, gameState);
|
||||
Graph_Update(&gfxCtx, gCurrentGameState.get());
|
||||
gfx_end_frame();
|
||||
}
|
||||
else
|
||||
|
@ -443,7 +410,7 @@ void Graph_ThreadEntry(void* arg0)
|
|||
{
|
||||
if(gfx_start_frame())
|
||||
{
|
||||
Graph_Update(&gfxCtx, gameState);
|
||||
Graph_Update(&gfxCtx, gCurrentGameState.get());
|
||||
gfx_end_frame();
|
||||
}
|
||||
}
|
||||
|
@ -451,11 +418,17 @@ void Graph_ThreadEntry(void* arg0)
|
|||
}
|
||||
}
|
||||
|
||||
nextOvl = Graph_GetNextGameState(gameState);
|
||||
GameState_Destroy(gameState);
|
||||
SystemArena_FreeDebug(gameState, "../graph.c", 1227);
|
||||
Overlay_FreeGameState(ovl);
|
||||
if(gNextGameState)
|
||||
{
|
||||
gCurrentGameState = std::move(gNextGameState);
|
||||
gNextGameState = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
gCurrentGameState = std::unique_ptr<oot::gamestate::Base>(gCurrentGameState->next());
|
||||
}
|
||||
}
|
||||
|
||||
Graph_Destroy(&gfxCtx);
|
||||
osSyncPrintf("End of graphic thread execution\n"); // "End of graphic thread execution"
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "view.h"
|
||||
#include "vt.h"
|
||||
#include "z64game.h"
|
||||
#include "gamestate.h"
|
||||
#include "def/TwoHeadArena.h"
|
||||
#include "def/graph.h" // FORCE
|
||||
#include "def/irqmgr.h"
|
||||
|
|
|
@ -2406,10 +2406,10 @@ s32 Math3D_YZInSphere(Sphere16* sphere, f32 y, f32 z)
|
|||
return false;
|
||||
}
|
||||
|
||||
void Math3D_DrawSphere(struct GlobalContext* globalCtx, Sphere16* sph)
|
||||
void Math3D_DrawSphere(GlobalContext* globalCtx, Sphere16* sph)
|
||||
{
|
||||
}
|
||||
|
||||
void Math3D_DrawCylinder(struct GlobalContext* globalCtx, Cylinder16* cyl)
|
||||
void Math3D_DrawCylinder(GlobalContext* globalCtx, Cylinder16* cyl)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -55,22 +55,6 @@ void SystemArena_FreeDebug(void* ptr, const char* file, s32 line)
|
|||
free(ptr);
|
||||
}
|
||||
|
||||
void* SystemArena_Calloc(u32 num, u32 size)
|
||||
{
|
||||
void* ret;
|
||||
u32 n = num * size;
|
||||
|
||||
ret = malloc(n);
|
||||
|
||||
if(ret != NULL)
|
||||
{
|
||||
memset(ret, 0, n);
|
||||
}
|
||||
|
||||
SystemArena_CheckPointer(ret, n, "calloc", "Secure");
|
||||
return ret;
|
||||
}
|
||||
|
||||
void SystemArena_Display(void)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -2,23 +2,34 @@
|
|||
#include "global.h"
|
||||
#include <z64save.h>
|
||||
#include "z64game.h"
|
||||
#include "z_title.h"
|
||||
#include "def/graph.h"
|
||||
#include "def/title_setup.h"
|
||||
#include "def/z_title.h"
|
||||
|
||||
void TitleSetup_InitImpl(GameState* gameState)
|
||||
namespace oot::gamestate
|
||||
{
|
||||
osSyncPrintf("Zelda common data initalization\n"); // "Zelda common data initalization"
|
||||
gSaveContext.init();
|
||||
gameState->running = false;
|
||||
SET_NEXT_GAMESTATE(gameState, Title_Init, TitleContext);
|
||||
}
|
||||
TitleSetup::TitleSetup(GraphicsContext* gfxCtx) : Base(gfxCtx)
|
||||
{
|
||||
}
|
||||
|
||||
void TitleSetup_Destroy(GameState* gameState)
|
||||
{
|
||||
}
|
||||
TitleSetup::~TitleSetup()
|
||||
{
|
||||
}
|
||||
|
||||
void TitleSetup_Init(GameState* gameState)
|
||||
{
|
||||
gameState->destroy = TitleSetup_Destroy;
|
||||
TitleSetup_InitImpl(gameState);
|
||||
}
|
||||
Base* TitleSetup::next()
|
||||
{
|
||||
return new TitleSetup(gfxCtx);
|
||||
}
|
||||
|
||||
void TitleSetup::init()
|
||||
{
|
||||
osSyncPrintf("Zelda common data initalization\n"); // "Zelda common data initalization"
|
||||
gSaveContext.init();
|
||||
running = false;
|
||||
Graph_SetNextGameState(new Title(gfxCtx));
|
||||
}
|
||||
|
||||
void TitleSetup::main()
|
||||
{
|
||||
}
|
||||
} // namespace oot::gamestate
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
#define INTERNAL_SRC_CODE_Z_DLF_C
|
||||
#include "global.h"
|
||||
#include <z64game.h>
|
||||
#include "vt.h"
|
||||
#include "def/z_DLF.h"
|
||||
|
||||
void Overlay_LoadGameState(GameStateOverlay* overlayEntry)
|
||||
{
|
||||
}
|
||||
|
||||
void Overlay_FreeGameState(GameStateOverlay* overlayEntry)
|
||||
{
|
||||
}
|
|
@ -85,7 +85,7 @@ void ActorShadow_Draw(Actor* actor, Lights* lights, GlobalContext* globalCtx, Gf
|
|||
|
||||
if(temp1 >= -50.0f && temp1 < 500.0f)
|
||||
{
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1553);
|
||||
OPEN_DISPS(globalCtx->gfxCtx, "../z_actor.c", 1553);
|
||||
|
||||
POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C);
|
||||
|
||||
|
@ -114,10 +114,10 @@ void ActorShadow_Draw(Actor* actor, Lights* lights, GlobalContext* globalCtx, Gf
|
|||
temp2 = (1.0f - (temp1 * (1.0f / 350))) * actor->shape.shadowScale;
|
||||
Matrix_Scale(actor->scale.x * temp2, 1.0f, actor->scale.z * temp2, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 1588), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->gfxCtx, "../z_actor.c", 1588), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, dlist);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1594);
|
||||
CLOSE_DISPS(globalCtx->gfxCtx, "../z_actor.c", 1594);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ void ActorShadow_DrawFoot(GlobalContext* globalCtx, Light* light, MtxF* arg2, s3
|
|||
f32 sp58;
|
||||
s32 pad2[2];
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1661);
|
||||
OPEN_DISPS(globalCtx->gfxCtx, "../z_actor.c", 1661);
|
||||
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, (u32)(((arg3 * 0.00005f) > 1.0f ? 1.0f : (arg3 * 0.00005f)) * arg4) & 0xFF);
|
||||
|
||||
|
@ -156,10 +156,10 @@ void ActorShadow_DrawFoot(GlobalContext* globalCtx, Light* light, MtxF* arg2, s3
|
|||
Matrix_RotateY(sp58, MTXMODE_APPLY);
|
||||
Matrix_Scale(arg5, 1.0f, arg5 * arg6, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 1687), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->gfxCtx, "../z_actor.c", 1687), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gFootShadowDL);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1693);
|
||||
CLOSE_DISPS(globalCtx->gfxCtx, "../z_actor.c", 1693);
|
||||
}
|
||||
|
||||
void ActorShadow_DrawFeet(Actor* actor, Lights* lights, GlobalContext* globalCtx)
|
||||
|
@ -198,7 +198,7 @@ void ActorShadow_DrawFeet(Actor* actor, Lights* lights, GlobalContext* globalCtx
|
|||
Vec3f* feetPosPtr = actor->shape.feetPos;
|
||||
f32* floorHeightPtr = floorHeight;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1741);
|
||||
OPEN_DISPS(globalCtx->gfxCtx, "../z_actor.c", 1741);
|
||||
|
||||
POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C);
|
||||
|
||||
|
@ -275,7 +275,7 @@ void ActorShadow_DrawFeet(Actor* actor, Lights* lights, GlobalContext* globalCtx
|
|||
}
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 1831);
|
||||
CLOSE_DISPS(globalCtx->gfxCtx, "../z_actor.c", 1831);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -378,7 +378,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx)
|
|||
{
|
||||
Actor* actor = targetCtx->targetedActor;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2029);
|
||||
OPEN_DISPS(globalCtx->gfxCtx, "../z_actor.c", 2029);
|
||||
|
||||
if(targetCtx->unk_48 != 0)
|
||||
{
|
||||
|
@ -473,7 +473,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx)
|
|||
Matrix_RotateZ(M_PI / 2, MTXMODE_APPLY);
|
||||
Matrix_Push();
|
||||
Matrix_Translate(entry->unk_0C, entry->unk_0C, 0.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(OVERLAY_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 2116), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(OVERLAY_DISP++, Matrix_NewMtx(globalCtx->gfxCtx, "../z_actor.c", 2116), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(OVERLAY_DISP++, gZTargetLockOnTriangleDL);
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
@ -500,11 +500,11 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx)
|
|||
Matrix_Scale((iREG(27) + 35) / 1000.0f, (iREG(28) + 60) / 1000.0f, (iREG(29) + 50) / 1000.0f, MTXMODE_APPLY);
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, naviColor->inner.r, naviColor->inner.g, naviColor->inner.b, 255);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 2153), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->gfxCtx, "../z_actor.c", 2153), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gZTargetArrowDL);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2158);
|
||||
CLOSE_DISPS(globalCtx->gfxCtx, "../z_actor.c", 2158);
|
||||
}
|
||||
|
||||
void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, GlobalContext* globalCtx)
|
||||
|
@ -885,7 +885,7 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx)
|
|||
spB8 = (titleCtx->y * 4) - (spC8 * 2);
|
||||
sp38 = spCC * 2;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2824);
|
||||
OPEN_DISPS(globalCtx->gfxCtx, "../z_actor.c", 2824);
|
||||
|
||||
spB0 = spCC * spC8 * gSaveContext.language;
|
||||
spC8 = (spCC * spC8 > 0x1000) ? 0x1000 / spCC : spC8;
|
||||
|
@ -908,7 +908,7 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx)
|
|||
gSPTextureRectangle(OVERLAY_DISP++, spC0, spB4, ((sp38 * 2) + spC0) - 4, spB4 + (spC8 * 4) - 1, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 2880);
|
||||
CLOSE_DISPS(globalCtx->gfxCtx, "../z_actor.c", 2880);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1633,20 +1633,20 @@ void func_8002EBCC(Actor* actor, GlobalContext* globalCtx, s32 flag)
|
|||
osSyncPrintf("z_actor.c 3637 game_play->view.eye=[%f(%f) %f %f]\n", globalCtx->view.eye.x, globalCtx->view.eye.y, globalCtx->view.eye.z);
|
||||
}
|
||||
|
||||
hilite = func_8002EABC(&actor->world.pos, &globalCtx->view.eye, &lightDir, globalCtx->state.gfxCtx);
|
||||
hilite = func_8002EABC(&actor->world.pos, &globalCtx->view.eye, &lightDir, globalCtx->gfxCtx);
|
||||
|
||||
if(flag != 0)
|
||||
{
|
||||
displayList = (Gfx*)Graph_Alloc(globalCtx->state.gfxCtx, 2 * sizeof(Gfx));
|
||||
displayList = (Gfx*)Graph_Alloc(globalCtx->gfxCtx, 2 * sizeof(Gfx));
|
||||
displayListHead = displayList;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 4384);
|
||||
OPEN_DISPS(globalCtx->gfxCtx, "../z_actor.c", 4384);
|
||||
|
||||
gDPSetHilite1Tile(displayListHead++, 1, hilite, 0x10, 0x10);
|
||||
gSPEndDisplayList(displayListHead);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x07, displayList);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 4394);
|
||||
CLOSE_DISPS(globalCtx->gfxCtx, "../z_actor.c", 4394);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1661,20 +1661,20 @@ void func_8002ED80(Actor* actor, GlobalContext* globalCtx, s32 flag)
|
|||
lightDir.y = globalCtx->envCtx.dirLight1.params.dir.y;
|
||||
lightDir.z = globalCtx->envCtx.dirLight1.params.dir.z;
|
||||
|
||||
hilite = func_8002EB44(&actor->world.pos, &globalCtx->view.eye, &lightDir, globalCtx->state.gfxCtx);
|
||||
hilite = func_8002EB44(&actor->world.pos, &globalCtx->view.eye, &lightDir, globalCtx->gfxCtx);
|
||||
|
||||
if(flag != 0)
|
||||
{
|
||||
displayList = (Gfx*)Graph_Alloc(globalCtx->state.gfxCtx, 2 * sizeof(Gfx));
|
||||
displayList = (Gfx*)Graph_Alloc(globalCtx->gfxCtx, 2 * sizeof(Gfx));
|
||||
displayListHead = displayList;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 4429);
|
||||
OPEN_DISPS(globalCtx->gfxCtx, "../z_actor.c", 4429);
|
||||
|
||||
gDPSetHilite1Tile(displayListHead++, 1, hilite, 0x10, 0x10);
|
||||
gSPEndDisplayList(displayListHead);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x07, displayList);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 4439);
|
||||
CLOSE_DISPS(globalCtx->gfxCtx, "../z_actor.c", 4439);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2151,7 +2151,7 @@ void Actor_DrawFaroresWindPointer(GlobalContext* globalCtx)
|
|||
s32 lightRadius = -1;
|
||||
s32 params;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 5308);
|
||||
OPEN_DISPS(globalCtx->gfxCtx, "../z_actor.c", 5308);
|
||||
|
||||
params = gSaveContext.respawn[RESPAWN_MODE_TOP].data;
|
||||
|
||||
|
@ -2283,20 +2283,20 @@ void Actor_DrawFaroresWindPointer(GlobalContext* globalCtx)
|
|||
gDPSetEnvColor(POLY_XLU_DISP++, 100, 200, 0, 255);
|
||||
|
||||
Matrix_RotateZ(((globalCtx->gameplayFrames.whole() * 1500) & 0xFFFF) * M_PI / 32768.0f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 5458), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->gfxCtx, "../z_actor.c", 5458), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffFlash1DL);
|
||||
|
||||
Matrix_Pop();
|
||||
Matrix_RotateZ(~((globalCtx->gameplayFrames.whole() * 1200) & 0xFFFF) * M_PI / 32768.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 5463), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->gfxCtx, "../z_actor.c", 5463), G_MTX_MODELVIEW | G_MTX_LOAD | G_MTX_NOPUSH);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffFlash1DL);
|
||||
}
|
||||
|
||||
Lights_PointNoGlowSetInfo(
|
||||
&D_8015BC00, ((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.x), ((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.y) + yOffset, ((void)0, gSaveContext.respawn[RESPAWN_MODE_TOP].pos.z), 255, 255, 255, lightRadius);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 5474);
|
||||
CLOSE_DISPS(globalCtx->gfxCtx, "../z_actor.c", 5474);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2569,12 +2569,12 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor)
|
|||
FaultClient faultClient;
|
||||
Lights* lights;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 6035);
|
||||
OPEN_DISPS(globalCtx->gfxCtx, "../z_actor.c", 6035);
|
||||
|
||||
lights = LightContext_NewLights(&globalCtx->lightCtx, globalCtx->state.gfxCtx);
|
||||
lights = LightContext_NewLights(&globalCtx->lightCtx, globalCtx->gfxCtx);
|
||||
|
||||
Lights_BindAll(lights, globalCtx->lightCtx.listHead, (actor->flags & ACTOR_FLAG_22) ? NULL : &actor->world.pos);
|
||||
Lights_Draw(lights, globalCtx->state.gfxCtx);
|
||||
Lights_Draw(lights, globalCtx->gfxCtx);
|
||||
|
||||
if(actor->flags & ACTOR_FLAG_12)
|
||||
{
|
||||
|
@ -2639,7 +2639,7 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor)
|
|||
actor->shape.shadowDraw(actor, lights, globalCtx);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 6119);
|
||||
CLOSE_DISPS(globalCtx->gfxCtx, "../z_actor.c", 6119);
|
||||
|
||||
Fault_RemoveClient(&faultClient);
|
||||
}
|
||||
|
@ -2687,7 +2687,7 @@ void func_8003115C(GlobalContext* globalCtx, s32 numInvisibleActors, Actor** inv
|
|||
GraphicsContext* gfxCtx;
|
||||
s32 i;
|
||||
|
||||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
gfxCtx = globalCtx->gfxCtx;
|
||||
|
||||
OPEN_DISPS(gfxCtx, "../z_actor.c", 6197);
|
||||
|
||||
|
@ -2794,7 +2794,7 @@ void Draw_Actors(GlobalContext* globalCtx, ActorContext* actorCtx)
|
|||
|
||||
invisibleActorCounter = 0;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 6336);
|
||||
OPEN_DISPS(globalCtx->gfxCtx, "../z_actor.c", 6336);
|
||||
|
||||
actorListEntry = &actorCtx->actorLists[0];
|
||||
|
||||
|
@ -2866,7 +2866,7 @@ void Draw_Actors(GlobalContext* globalCtx, ActorContext* actorCtx)
|
|||
|
||||
if((HREG(64) != 1) || (HREG(73) != 0))
|
||||
{
|
||||
Effect_DrawAll(globalCtx->state.gfxCtx);
|
||||
Effect_DrawAll(globalCtx->gfxCtx);
|
||||
}
|
||||
|
||||
if((HREG(64) != 1) || (HREG(74) != 0))
|
||||
|
@ -2903,7 +2903,7 @@ void Draw_Actors(GlobalContext* globalCtx, ActorContext* actorCtx)
|
|||
CollisionCheck_DrawCollision(globalCtx, &globalCtx->colChkCtx);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 6563);
|
||||
CLOSE_DISPS(globalCtx->gfxCtx, "../z_actor.c", 6563);
|
||||
}
|
||||
|
||||
void func_80031A28(GlobalContext* globalCtx, ActorContext* actorCtx)
|
||||
|
@ -4054,7 +4054,7 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, GlobalContext* globalCtx)
|
|||
Vec3f sp50;
|
||||
CollisionPoly* sp4C;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8120);
|
||||
OPEN_DISPS(globalCtx->gfxCtx, "../z_actor.c", 8120);
|
||||
|
||||
POLY_OPA_DISP = Gfx_CallSetupDL(POLY_OPA_DISP, 0x2C);
|
||||
|
||||
|
@ -4078,10 +4078,10 @@ void func_80033C30(Vec3f* arg0, Vec3f* arg1, u8 alpha, GlobalContext* globalCtx)
|
|||
|
||||
Matrix_Scale(arg1->x, 1.0f, arg1->z, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8149), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->gfxCtx, "../z_actor.c", 8149), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gCircleShadowDL);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8155);
|
||||
CLOSE_DISPS(globalCtx->gfxCtx, "../z_actor.c", 8155);
|
||||
}
|
||||
|
||||
void func_80033DB8(GlobalContext* globalCtx, s16 arg1, s16 arg2)
|
||||
|
@ -4160,7 +4160,7 @@ void Actor_DrawDoorLock(GlobalContext* globalCtx, s32 frame, s32 type)
|
|||
entry = &sDoorLocksInfo[type];
|
||||
chainRotZ = entry->chainsRotZInit;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8265);
|
||||
OPEN_DISPS(globalCtx->gfxCtx, "../z_actor.c", 8265);
|
||||
|
||||
Matrix_Translate(0.0f, entry->yShift, 500.0f, MTXMODE_APPLY);
|
||||
Matrix_Get(&baseMtxF);
|
||||
|
@ -4179,7 +4179,7 @@ void Actor_DrawDoorLock(GlobalContext* globalCtx, s32 frame, s32 type)
|
|||
Matrix_Scale(entry->chainsScale, entry->chainsScale, entry->chainsScale, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8299), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->gfxCtx, "../z_actor.c", 8299), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, entry->chainDL);
|
||||
|
||||
if(i % 2)
|
||||
|
@ -4197,10 +4197,10 @@ void Actor_DrawDoorLock(GlobalContext* globalCtx, s32 frame, s32 type)
|
|||
Matrix_Put(&baseMtxF);
|
||||
Matrix_Scale(frame * 0.1f, frame * 0.1f, frame * 0.1f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_actor.c", 8314), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->gfxCtx, "../z_actor.c", 8314), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(POLY_OPA_DISP++, entry->lockDL);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8319);
|
||||
CLOSE_DISPS(globalCtx->gfxCtx, "../z_actor.c", 8319);
|
||||
}
|
||||
|
||||
void func_8003424C(GlobalContext* globalCtx, Vec3f* arg1)
|
||||
|
@ -4227,7 +4227,7 @@ Hilite* func_800342EC(Vec3f* object, GlobalContext* globalCtx)
|
|||
lightDir.y = globalCtx->envCtx.dirLight1.params.dir.y;
|
||||
lightDir.z = globalCtx->envCtx.dirLight1.params.dir.z;
|
||||
|
||||
return func_8002EABC(object, &globalCtx->view.eye, &lightDir, globalCtx->state.gfxCtx);
|
||||
return func_8002EABC(object, &globalCtx->view.eye, &lightDir, globalCtx->gfxCtx);
|
||||
}
|
||||
|
||||
Hilite* func_8003435C(Vec3f* object, GlobalContext* globalCtx)
|
||||
|
@ -4238,7 +4238,7 @@ Hilite* func_8003435C(Vec3f* object, GlobalContext* globalCtx)
|
|||
lightDir.y = globalCtx->envCtx.dirLight1.params.dir.y;
|
||||
lightDir.z = globalCtx->envCtx.dirLight1.params.dir.z;
|
||||
|
||||
return func_8002EB44(object, &globalCtx->view.eye, &lightDir, globalCtx->state.gfxCtx);
|
||||
return func_8002EB44(object, &globalCtx->view.eye, &lightDir, globalCtx->gfxCtx);
|
||||
}
|
||||
|
||||
s32 func_800343CC(GlobalContext* globalCtx, Actor* actor, s16* arg2, f32 interactRange, callback1_800343CC unkFunc1, callback2_800343CC unkFunc2)
|
||||
|
@ -4455,33 +4455,33 @@ Gfx* func_80034B54(GraphicsContext* gfxCtx)
|
|||
|
||||
void func_80034BA0(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s16 alpha)
|
||||
{
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8831);
|
||||
OPEN_DISPS(globalCtx->gfxCtx, "../z_actor.c", 8831);
|
||||
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
func_80093D18(globalCtx->gfxCtx);
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, alpha);
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0C, func_80034B28(globalCtx->state.gfxCtx));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0C, func_80034B28(globalCtx->gfxCtx));
|
||||
|
||||
POLY_OPA_DISP = SkelAnime_DrawFlex(globalCtx, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, overrideLimbDraw, postLimbDraw, actor, POLY_OPA_DISP);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8860);
|
||||
CLOSE_DISPS(globalCtx->gfxCtx, "../z_actor.c", 8860);
|
||||
}
|
||||
|
||||
void func_80034CC4(GlobalContext* globalCtx, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s16 alpha)
|
||||
{
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8876);
|
||||
OPEN_DISPS(globalCtx->gfxCtx, "../z_actor.c", 8876);
|
||||
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
func_80093D84(globalCtx->gfxCtx);
|
||||
|
||||
gDPPipeSync(POLY_XLU_DISP++);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, alpha);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0C, func_80034B54(globalCtx->state.gfxCtx));
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0C, func_80034B54(globalCtx->gfxCtx));
|
||||
|
||||
POLY_XLU_DISP = SkelAnime_DrawFlex(globalCtx, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, overrideLimbDraw, postLimbDraw, actor, POLY_XLU_DISP);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_actor.c", 8904);
|
||||
CLOSE_DISPS(globalCtx->gfxCtx, "../z_actor.c", 8904);
|
||||
}
|
||||
|
||||
s16 func_80034DD4(Actor* actor, GlobalContext* globalCtx, s16 arg2, f32 arg3)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue