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

Global Context And General Cleanup (#863)

* door context

* renames

* done

* fix unintended change

* all nb gone

* more nb gone

* merge fishing

* fix size commentX

* door changes suggested by dragorn

* fix accidental semicolon

* another

* change all texture pointers to void*

* error fix and format

* Update src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c

Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl>

* fix ostime

* correct mistake in SkyboxContext

* probably fix nonmatching

* Update include/z64.h

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* roman's suggestions, fix incorrect type definition in z64scene.h

* typo in struct

* make typedef use u8 array

* forgot one

* pull in master and format.sh

Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
Zelllll 2021-08-15 18:15:58 -05:00 committed by GitHub
parent 1890e751b9
commit 7551dc2b71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
105 changed files with 496 additions and 508 deletions

View file

@ -867,7 +867,7 @@ void KaleidoSetup_Update(GlobalContext* globalCtx);
void KaleidoSetup_Init(GlobalContext* globalCtx); void KaleidoSetup_Init(GlobalContext* globalCtx);
void KaleidoSetup_Destroy(GlobalContext* globalCtx); void KaleidoSetup_Destroy(GlobalContext* globalCtx);
void func_8006EE50(Font* font, s16 arg1, s16 arg2); void func_8006EE50(Font* font, s16 arg1, s16 arg2);
void Font_LoadChar(u32 offset, u8 character, u16 codePointIndex); void Font_LoadChar(Font* font, u8 character, u16 codePointIndex);
void Font_LoadMessageBoxEndIcon(Font* font, u16 icon); void Font_LoadMessageBoxEndIcon(Font* font, u16 icon);
void Font_LoadOrderedFont(Font* font); void Font_LoadOrderedFont(Font* font);
s32 func_8006F0A0(s32 arg0); s32 func_8006F0A0(s32 arg0);
@ -1197,7 +1197,7 @@ s32 Object_GetIndex(ObjectContext* objectCtx, s16 objectId);
s32 Object_IsLoaded(ObjectContext* objectCtx, s32 bankIndex); s32 Object_IsLoaded(ObjectContext* objectCtx, s32 bankIndex);
void func_800981B8(ObjectContext* objectCtx); void func_800981B8(ObjectContext* objectCtx);
s32 Scene_ExecuteCommands(GlobalContext* globalCtx, SceneCmd* sceneCmd); s32 Scene_ExecuteCommands(GlobalContext* globalCtx, SceneCmd* sceneCmd);
void func_80098CBC(GlobalContext* globalCtx, u8* nbTransitionActors); void TransitionActor_InitContext(GameState* state, TransitionActorContext* transiActorCtx);
void func_800994A0(GlobalContext* globalCtx); void func_800994A0(GlobalContext* globalCtx);
void Scene_Draw(GlobalContext* globalCtx); void Scene_Draw(GlobalContext* globalCtx);
void SkelAnime_DrawLod(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, void SkelAnime_DrawLod(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable,

View file

@ -213,7 +213,7 @@ extern s16 gLinkObjectIds[2];
extern u32 gObjectTableSize; extern u32 gObjectTableSize;
extern RomFile gObjectTable[OBJECT_ID_MAX]; extern RomFile gObjectTable[OBJECT_ID_MAX];
extern EntranceInfo gEntranceTable[1556]; extern EntranceInfo gEntranceTable[1556];
extern Scene gSceneTable[SCENE_ID_MAX]; extern SceneTableEntry gSceneTable[SCENE_ID_MAX];
//extern ? D_8012A4A0; //extern ? D_8012A4A0;
extern u16 gSramSlotOffsets[]; extern u16 gSramSlotOffsets[];
//extern ? D_8012A690; //extern ? D_8012A690;

View file

@ -327,7 +327,8 @@ typedef struct {
/* 0x13C */ void* roomVtx; /* 0x13C */ void* roomVtx;
/* 0x140 */ s16 unk_140; /* 0x140 */ s16 unk_140;
/* 0x144 */ Vec3f rot; /* 0x144 */ Vec3f rot;
} SkyboxContext; // size = 0x150 /* 0x150 */ char unk_150[0x10];
} SkyboxContext; // size = 0x160
typedef enum { typedef enum {
MESSAGE_ICON_TRIANGLE, MESSAGE_ICON_TRIANGLE,
@ -335,7 +336,7 @@ typedef enum {
MESSAGE_ICON_ARROW MESSAGE_ICON_ARROW
} MessageBoxIcon; } MessageBoxIcon;
#define FONT_CHAR_TEX_SIZE 128 // 16x16 I4 texture #define FONT_CHAR_TEX_SIZE ((16 * 16) / 2) // 16x16 I4 texture
typedef struct { typedef struct {
/* 0x0000 */ u32 msgOffset; /* 0x0000 */ u32 msgOffset;
@ -611,7 +612,7 @@ typedef struct {
/* 0xAA */ s16 unk_AA; /* 0xAA */ s16 unk_AA;
/* 0xAC */ s16 unk_AC; /* 0xAC */ s16 unk_AC;
/* 0xB0 */ f32 unk_B0; /* 0xB0 */ f32 unk_B0;
/* 0xB4 */ u8 nbLightSettings; /* 0xB4 */ u8 numLightSettings;
/* 0xB8 */ UNK_PTR lightSettingsList; /* 0xB8 */ UNK_PTR lightSettingsList;
/* 0xBC */ u8 unk_BC; /* 0xBC */ u8 unk_BC;
/* 0xBD */ u8 unk_BD; /* 0xBD */ u8 unk_BD;
@ -757,7 +758,8 @@ typedef struct {
/* 0x38 */ DmaRequest dmaRequest; /* 0x38 */ DmaRequest dmaRequest;
/* 0x58 */ OSMesgQueue loadQueue; /* 0x58 */ OSMesgQueue loadQueue;
/* 0x70 */ OSMesg loadMsg; /* 0x70 */ OSMesg loadMsg;
} RoomContext; // size = 0x74 /* 0x74 */ s16 unk_74[2];
} RoomContext; // size = 0x78
typedef struct { typedef struct {
/* 0x000 */ s16 colATCount; /* 0x000 */ s16 colATCount;
@ -941,6 +943,11 @@ typedef struct {
/* 0x03 */ u8 byte3; /* 0x03 */ u8 byte3;
} ElfMessage; // size = 0x4 } ElfMessage; // size = 0x4
typedef struct {
/* 0x00 */ u8 numActors;
/* 0x04 */ TransitionActorEntry* list;
} TransitionActorContext;
// Global Context (dbg ram start: 80212020) // Global Context (dbg ram start: 80212020)
typedef struct GlobalContext { typedef struct GlobalContext {
/* 0x00000 */ GameState state; /* 0x00000 */ GameState state;
@ -963,7 +970,6 @@ typedef struct GlobalContext {
/* 0x01DB4 */ SoundSource soundSources[16]; /* 0x01DB4 */ SoundSource soundSources[16];
/* 0x01F74 */ SramContext sramCtx; /* 0x01F74 */ SramContext sramCtx;
/* 0x01F78 */ SkyboxContext skyboxCtx; /* 0x01F78 */ SkyboxContext skyboxCtx;
/* 0x020C8 */ char unk_20C8[0x10];
/* 0x020D8 */ MessageContext msgCtx; // "message" /* 0x020D8 */ MessageContext msgCtx; // "message"
/* 0x104F0 */ InterfaceContext interfaceCtx; // "parameter" /* 0x104F0 */ InterfaceContext interfaceCtx; // "parameter"
/* 0x10760 */ PauseContext pauseCtx; /* 0x10760 */ PauseContext pauseCtx;
@ -972,9 +978,7 @@ typedef struct GlobalContext {
/* 0x10B20 */ AnimationContext animationCtx; /* 0x10B20 */ AnimationContext animationCtx;
/* 0x117A4 */ ObjectContext objectCtx; /* 0x117A4 */ ObjectContext objectCtx;
/* 0x11CBC */ RoomContext roomCtx; /* 0x11CBC */ RoomContext roomCtx;
/* 0x11D30 */ s16 unk_11D30[2]; /* 0x11D34 */ TransitionActorContext transiActorCtx;
/* 0x11D34 */ u8 nbTransitionActors;
/* 0x11D38 */ TransitionActorEntry* transitionActorList;
/* 0x11D3C */ void (*playerInit)(Player* player, struct GlobalContext* globalCtx, FlexSkeletonHeader* skelHeader); /* 0x11D3C */ void (*playerInit)(Player* player, struct GlobalContext* globalCtx, FlexSkeletonHeader* skelHeader);
/* 0x11D40 */ void (*playerUpdate)(Player* player, struct GlobalContext* globalCtx, Input* input); /* 0x11D40 */ void (*playerUpdate)(Player* player, struct GlobalContext* globalCtx, Input* input);
/* 0x11D44 */ s32 (*isPlayerDroppingFish)(struct GlobalContext* globalCtx); /* 0x11D44 */ s32 (*isPlayerDroppingFish)(struct GlobalContext* globalCtx);
@ -991,8 +995,8 @@ typedef struct GlobalContext {
/* 0x11DE8 */ u8 linkAgeOnLoad; /* 0x11DE8 */ u8 linkAgeOnLoad;
/* 0x11DE9 */ u8 unk_11DE9; /* 0x11DE9 */ u8 unk_11DE9;
/* 0x11DEA */ u8 curSpawn; /* 0x11DEA */ u8 curSpawn;
/* 0x11DEB */ u8 nbSetupActors; /* 0x11DEB */ u8 numSetupActors;
/* 0x11DEC */ u8 nbRooms; /* 0x11DEC */ u8 numRooms;
/* 0x11DF0 */ RomFile* roomList; /* 0x11DF0 */ RomFile* roomList;
/* 0x11DF4 */ ActorEntry* linkActorEntry; /* 0x11DF4 */ ActorEntry* linkActorEntry;
/* 0x11DF8 */ ActorEntry* setupActorList; /* 0x11DF8 */ ActorEntry* setupActorList;
@ -1022,7 +1026,7 @@ typedef struct GlobalContext {
/* 0x1241C */ TransitionFade transitionFade; /* 0x1241C */ TransitionFade transitionFade;
/* 0x12428 */ char unk_12428[0x3]; /* 0x12428 */ char unk_12428[0x3];
/* 0x1242B */ u8 unk_1242B; /* 0x1242B */ u8 unk_1242B;
/* 0x1242C */ Scene* loadedScene; /* 0x1242C */ SceneTableEntry* loadedScene;
/* 0x12430 */ char unk_12430[0xE8]; /* 0x12430 */ char unk_12430[0xE8];
} GlobalContext; // size = 0x12518 } GlobalContext; // size = 0x12518
@ -1041,7 +1045,6 @@ typedef struct {
/* 0x001E0 */ SramContext sramCtx; /* 0x001E0 */ SramContext sramCtx;
/* 0x001E4 */ char unk_1E4[0x4]; /* 0x001E4 */ char unk_1E4[0x4];
/* 0x001E8 */ SkyboxContext skyboxCtx; /* 0x001E8 */ SkyboxContext skyboxCtx;
/* 0x00338 */ char unk_338[0x10];
/* 0x00348 */ MessageContext msgCtx; /* 0x00348 */ MessageContext msgCtx;
/* 0x0E760 */ char kanfont[0xE188]; /* 0x0E760 */ char kanfont[0xE188];
/* 0x1C8E8 */ EnvironmentContext envCtx; /* 0x1C8E8 */ EnvironmentContext envCtx;

View file

@ -53,7 +53,7 @@ typedef struct {
/* 0x14 */ ActorInit* initInfo; /* 0x14 */ ActorInit* initInfo;
/* 0x18 */ char* name; /* 0x18 */ char* name;
/* 0x1C */ u16 allocType; /* 0x1C */ u16 allocType;
/* 0x1E */ s8 nbLoaded; // original name: "clients" /* 0x1E */ s8 numLoaded; // original name: "clients"
} ActorOverlay; // size = 0x20 } ActorOverlay; // size = 0x20
typedef struct { typedef struct {

View file

@ -81,13 +81,13 @@ typedef struct {
typedef struct { typedef struct {
/* 0x00 */ Vec3s minBounds; // minimum coordinates of poly bounding box /* 0x00 */ Vec3s minBounds; // minimum coordinates of poly bounding box
/* 0x06 */ Vec3s maxBounds; // maximum coordinates of poly bounding box /* 0x06 */ Vec3s maxBounds; // maximum coordinates of poly bounding box
/* 0x0C */ u16 nbVertices; /* 0x0C */ u16 numVertices;
/* 0x10 */ Vec3s* vtxList; /* 0x10 */ Vec3s* vtxList;
/* 0x14 */ u16 nbPolygons; /* 0x14 */ u16 numPolygons;
/* 0x18 */ CollisionPoly* polyList; /* 0x18 */ CollisionPoly* polyList;
/* 0x1C */ SurfaceType* surfaceTypeList; /* 0x1C */ SurfaceType* surfaceTypeList;
/* 0x20 */ CamData* cameraDataList; /* 0x20 */ CamData* cameraDataList;
/* 0x24 */ u16 nbWaterBoxes; /* 0x24 */ u16 numWaterBoxes;
/* 0x28 */ WaterBox* waterBoxes; /* 0x28 */ WaterBox* waterBoxes;
} CollisionHeader; // original name: BGDataInfo } CollisionHeader; // original name: BGDataInfo

View file

@ -15,7 +15,7 @@ typedef struct {
/* 0x11 */ u8 config; /* 0x11 */ u8 config;
/* 0x12 */ u8 unk_12; /* 0x12 */ u8 unk_12;
/* 0x13 */ u8 unk_13; /* 0x13 */ u8 unk_13;
} Scene; // size = 0x14 } SceneTableEntry; // size = 0x14
typedef struct { typedef struct {
/* 0x00 */ u8 code; /* 0x00 */ u8 code;
@ -258,17 +258,16 @@ typedef struct {
u32 dListEnd; u32 dListEnd;
} MeshHeader2; } MeshHeader2;
typedef struct { typedef struct {
u8 ambientClrR, ambientClrG, ambientClrB; /* 0x00 */ u8 ambientColor[3];
u8 diffuseClrA_R, diffuseClrA_G, diffuseClrA_B; /* 0x03 */ s8 diffuseDir1[3];
u8 diffuseDirA_X, diffuseDirA_Y, diffuseDirA_Z; /* 0x06 */ u8 diffuseColor1[3];
u8 diffuseClrB_R, diffuseClrB_G, diffuseClrB_B; /* 0x09 */ s8 diffuseDir2[3];
u8 diffuseDirB_X, diffuseDirB_Y, diffuseDirB_Z; /* 0x0C */ u8 diffuseColor2[3];
u8 fogClrR, fogClrG, fogClrB; /* 0x0F */ u8 fogColor[3];
u16 unk; /* 0x12 */ u16 fogNear;
u16 drawDistance; /* 0x14 */ u16 fogFar;
} LightSettings; } LightSettings; // size = 0x16
typedef struct { typedef struct {
/* 0x00 */ u8 count; // number of points in the path /* 0x00 */ u8 count; // number of points in the path
@ -493,8 +492,8 @@ typedef enum {
#define SCENE_CMD_PATH_LIST(pathList) \ #define SCENE_CMD_PATH_LIST(pathList) \
{ SCENE_CMD_ID_PATH_LIST, 0, CMD_PTR(pathList) } { SCENE_CMD_ID_PATH_LIST, 0, CMD_PTR(pathList) }
#define SCENE_CMD_TRANSITION_ACTOR_LIST(numTransitionActors, transitionActorList) \ #define SCENE_CMD_TRANSITION_ACTOR_LIST(numActors, list) \
{ SCENE_CMD_ID_TRANSI_ACTOR_LIST, numTransitionActors, CMD_PTR(transitionActorList) } { SCENE_CMD_ID_TRANSI_ACTOR_LIST, numActors, CMD_PTR(list) }
#define SCENE_CMD_ENV_LIGHT_SETTINGS(numLightSettings, lightSettingsList) \ #define SCENE_CMD_ENV_LIGHT_SETTINGS(numLightSettings, lightSettingsList) \
{ SCENE_CMD_ID_ENV_LIGHT_SETTINGS, numLightSettings, CMD_PTR(lightSettingsList) } { SCENE_CMD_ID_ENV_LIGHT_SETTINGS, numLightSettings, CMD_PTR(lightSettingsList) }

View file

@ -82,8 +82,8 @@ void func_800E1618(s32 arg0) {
gAudioContext.unk_288C = gAudioContext.unk_2874; gAudioContext.unk_288C = gAudioContext.unk_2874;
gAudioContext.sampleDmaReqs = gAudioContext.sampleDmaReqs =
Audio_Alloc(&gAudioContext.notesAndBuffersPool, Audio_Alloc(&gAudioContext.notesAndBuffersPool, 4 * gAudioContext.maxSimultaneousNotes * sizeof(SampleDmaReq) *
4 * gAudioContext.maxSimultaneousNotes * sizeof(SampleDmaReq) * gAudioContext.audioBufferParameters.presetUnk4); gAudioContext.audioBufferParameters.presetUnk4);
t2 = 3 * gAudioContext.maxSimultaneousNotes * gAudioContext.audioBufferParameters.presetUnk4; t2 = 3 * gAudioContext.maxSimultaneousNotes * gAudioContext.audioBufferParameters.presetUnk4;
for (i = 0; i < t2; i++) { for (i = 0; i < t2; i++) {
temp_s0 = &gAudioContext.sampleDmaReqs[gAudioContext.sampleDmaReqCnt]; temp_s0 = &gAudioContext.sampleDmaReqs[gAudioContext.sampleDmaReqCnt];

View file

@ -377,8 +377,8 @@ void GameState_Realloc(GameState* gameState, size_t size) {
} }
void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* gfxCtx) { void GameState_Init(GameState* gameState, GameStateFunc init, GraphicsContext* gfxCtx) {
u64 startTime; OSTime startTime;
u64 endTime; OSTime endTime;
// game constructor start // game constructor start
osSyncPrintf("game コンストラクタ開始\n"); osSyncPrintf("game コンストラクタ開始\n");

View file

@ -680,7 +680,7 @@ void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx
void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s32 x, s32 y, void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s32 x, s32 y,
s32 width, s32 height, s32 delay) { s32 width, s32 height, s32 delay) {
Scene* loadedScene = globalCtx->loadedScene; SceneTableEntry* loadedScene = globalCtx->loadedScene;
u32 size = loadedScene->titleFile.vromEnd - loadedScene->titleFile.vromStart; u32 size = loadedScene->titleFile.vromEnd - loadedScene->titleFile.vromStart;
if ((size != 0) && (size <= 0x3000)) { if ((size != 0) && (size <= 0x3000)) {
@ -1757,7 +1757,7 @@ void func_8002F994(Actor* actor, s32 arg1) {
// Tests if something hit Jabu Jabu surface, displaying hit splash and playing sfx if true // Tests if something hit Jabu Jabu surface, displaying hit splash and playing sfx if true
s32 func_8002F9EC(GlobalContext* globalCtx, Actor* actor, CollisionPoly* poly, s32 bgId, Vec3f* pos) { s32 func_8002F9EC(GlobalContext* globalCtx, Actor* actor, CollisionPoly* poly, s32 bgId, Vec3f* pos) {
if (func_80041D4C(&globalCtx->colCtx, poly, bgId) == 8) { if (func_80041D4C(&globalCtx->colCtx, poly, bgId) == 8) {
globalCtx->unk_11D30[0] = 1; globalCtx->roomCtx.unk_74[0] = 1;
CollisionCheck_BlueBlood(globalCtx, NULL, pos); CollisionCheck_BlueBlood(globalCtx, NULL, pos);
Audio_PlayActorSound2(actor, NA_SE_IT_WALL_HIT_BUYO); Audio_PlayActorSound2(actor, NA_SE_IT_WALL_HIT_BUYO);
return true; return true;
@ -1993,7 +1993,7 @@ void func_800304DC(GlobalContext* globalCtx, ActorContext* actorCtx, ActorEntry*
overlayEntry = &gActorOverlayTable[0]; overlayEntry = &gActorOverlayTable[0];
for (i = 0; i < ARRAY_COUNT(gActorOverlayTable); i++) { for (i = 0; i < ARRAY_COUNT(gActorOverlayTable); i++) {
overlayEntry->loadedRamAddr = NULL; overlayEntry->loadedRamAddr = NULL;
overlayEntry->nbLoaded = 0; overlayEntry->numLoaded = 0;
overlayEntry++; overlayEntry++;
} }
@ -2037,12 +2037,12 @@ void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) {
sp74 = NULL; sp74 = NULL;
unkFlag = 0; unkFlag = 0;
if (globalCtx->nbSetupActors != 0) { if (globalCtx->numSetupActors != 0) {
actorEntry = &globalCtx->setupActorList[0]; actorEntry = &globalCtx->setupActorList[0];
for (i = 0; i < globalCtx->nbSetupActors; i++) { for (i = 0; i < globalCtx->numSetupActors; i++) {
Actor_SpawnEntry(&globalCtx->actorCtx, actorEntry++, globalCtx); Actor_SpawnEntry(&globalCtx->actorCtx, actorEntry++, globalCtx);
} }
globalCtx->nbSetupActors = 0; globalCtx->numSetupActors = 0;
} }
if (actorCtx->unk_02 != 0) { if (actorCtx->unk_02 != 0) {
@ -2275,7 +2275,7 @@ void func_80030FA8(GraphicsContext* gfxCtx) {
CLOSE_DISPS(gfxCtx, "../z_actor.c", 6183); CLOSE_DISPS(gfxCtx, "../z_actor.c", 6183);
} }
void func_8003115C(GlobalContext* globalCtx, s32 nbInvisibleActors, Actor** invisibleActors) { void func_8003115C(GlobalContext* globalCtx, s32 numInvisibleActors, Actor** invisibleActors) {
Actor** invisibleActor; Actor** invisibleActor;
GraphicsContext* gfxCtx; GraphicsContext* gfxCtx;
s32 i; s32 i;
@ -2313,17 +2313,17 @@ void func_8003115C(GlobalContext* globalCtx, s32 nbInvisibleActors, Actor** invi
func_80030FA8(gfxCtx); func_80030FA8(gfxCtx);
// Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY START" // Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY START"
gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないc表示 START", nbInvisibleActors); gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないc表示 START", numInvisibleActors);
invisibleActor = &invisibleActors[0]; invisibleActor = &invisibleActors[0];
for (i = 0; i < nbInvisibleActors; i++) { for (i = 0; i < numInvisibleActors; i++) {
// Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY" // Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY"
gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないc表示", i); gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないc表示", i);
Actor_Draw(globalCtx, *(invisibleActor++)); Actor_Draw(globalCtx, *(invisibleActor++));
} }
// Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY END" // Translates to: "MAGIC LENS INVISIBLE ACTOR DISPLAY END"
gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないc表示 END", nbInvisibleActors); gDPNoOpString(POLY_OPA_DISP++, "魔法のメガネ 見えないc表示 END", numInvisibleActors);
if (globalCtx->roomCtx.curRoom.showInvisActors != 0) { if (globalCtx->roomCtx.curRoom.showInvisActors != 0) {
// Translates to: "BLUE SPECTACLES (EXTERIOR)" // Translates to: "BLUE SPECTACLES (EXTERIOR)"
@ -2615,7 +2615,7 @@ Actor* Actor_RemoveFromCategory(GlobalContext* globalCtx, ActorContext* actorCtx
void Actor_FreeOverlay(ActorOverlay* actorOverlay) { void Actor_FreeOverlay(ActorOverlay* actorOverlay) {
osSyncPrintf(VT_FGCOL(CYAN)); osSyncPrintf(VT_FGCOL(CYAN));
if (actorOverlay->nbLoaded == 0) { if (actorOverlay->numLoaded == 0) {
if (HREG(20) != 0) { if (HREG(20) != 0) {
// Translates to: "ACTOR CLIENT IS NOW 0" // Translates to: "ACTOR CLIENT IS NOW 0"
osSyncPrintf("アクタークライアントが0になりました\n"); osSyncPrintf("アクタークライアントが0になりました\n");
@ -2644,7 +2644,7 @@ void Actor_FreeOverlay(ActorOverlay* actorOverlay) {
} }
} else if (HREG(20) != 0) { } else if (HREG(20) != 0) {
// Translates to: "%d OF ACTOR CLIENT REMAINS" // Translates to: "%d OF ACTOR CLIENT REMAINS"
osSyncPrintf("アクタークライアントはあと %d 残っています\n", actorOverlay->nbLoaded); osSyncPrintf("アクタークライアントはあと %d 残っています\n", actorOverlay->numLoaded);
} }
osSyncPrintf(VT_RST); osSyncPrintf(VT_RST);
@ -2727,7 +2727,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, GlobalContext* globalCtx, s16 actorId
(u32)overlayEntry->vramStart - (u32)overlayEntry->loadedRamAddr, name); (u32)overlayEntry->vramStart - (u32)overlayEntry->loadedRamAddr, name);
osSyncPrintf(VT_RST); osSyncPrintf(VT_RST);
overlayEntry->nbLoaded = 0; overlayEntry->numLoaded = 0;
} }
actorInit = (void*)(u32)((overlayEntry->initInfo != NULL) actorInit = (void*)(u32)((overlayEntry->initInfo != NULL)
@ -2757,13 +2757,13 @@ Actor* Actor_Spawn(ActorContext* actorCtx, GlobalContext* globalCtx, s16 actorId
return NULL; return NULL;
} }
ASSERT(overlayEntry->nbLoaded < 255, "actor_dlftbl->clients < 255", "../z_actor.c", 7031); ASSERT(overlayEntry->numLoaded < 255, "actor_dlftbl->clients < 255", "../z_actor.c", 7031);
overlayEntry->nbLoaded++; overlayEntry->numLoaded++;
if (HREG(20) != 0) { if (HREG(20) != 0) {
// Translates to: "ACTOR CLIENT No. %d" // Translates to: "ACTOR CLIENT No. %d"
osSyncPrintf("アクタークライアントは %d 個目です\n", overlayEntry->nbLoaded); osSyncPrintf("アクタークライアントは %d 個目です\n", overlayEntry->numLoaded);
} }
Lib_MemSet((u8*)actor, actorInit->instanceSize, 0); Lib_MemSet((u8*)actor, actorInit->instanceSize, 0);
@ -2819,13 +2819,13 @@ Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, GlobalContext*
void Actor_SpawnTransitionActors(GlobalContext* globalCtx, ActorContext* actorCtx) { void Actor_SpawnTransitionActors(GlobalContext* globalCtx, ActorContext* actorCtx) {
TransitionActorEntry* transitionActor; TransitionActorEntry* transitionActor;
u8 nbTransitionActors; u8 numActors;
s32 i; s32 i;
transitionActor = globalCtx->transitionActorList; transitionActor = globalCtx->transiActorCtx.list;
nbTransitionActors = globalCtx->nbTransitionActors; numActors = globalCtx->transiActorCtx.numActors;
for (i = 0; i < nbTransitionActors; i++) { for (i = 0; i < numActors; i++) {
if (transitionActor->id >= 0) { if (transitionActor->id >= 0) {
if (((transitionActor->sides[0].room >= 0) && if (((transitionActor->sides[0].room >= 0) &&
((transitionActor->sides[0].room == globalCtx->roomCtx.curRoom.num) || ((transitionActor->sides[0].room == globalCtx->roomCtx.curRoom.num) ||
@ -2838,7 +2838,7 @@ void Actor_SpawnTransitionActors(GlobalContext* globalCtx, ActorContext* actorCt
(i << 0xA) + transitionActor->params); (i << 0xA) + transitionActor->params);
transitionActor->id = -transitionActor->id; transitionActor->id = -transitionActor->id;
nbTransitionActors = globalCtx->nbTransitionActors; numActors = globalCtx->transiActorCtx.numActors;
} }
} }
transitionActor++; transitionActor++;
@ -2897,8 +2897,8 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, GlobalContext* globalC
} }
} else { } else {
ASSERT(overlayEntry->loadedRamAddr != NULL, "actor_dlftbl->allocp != NULL", "../z_actor.c", 7251); ASSERT(overlayEntry->loadedRamAddr != NULL, "actor_dlftbl->allocp != NULL", "../z_actor.c", 7251);
ASSERT(overlayEntry->nbLoaded > 0, "actor_dlftbl->clients > 0", "../z_actor.c", 7252); ASSERT(overlayEntry->numLoaded > 0, "actor_dlftbl->clients > 0", "../z_actor.c", 7252);
overlayEntry->nbLoaded--; overlayEntry->numLoaded--;
Actor_FreeOverlay(overlayEntry); Actor_FreeOverlay(overlayEntry);
} }

View file

@ -519,7 +519,7 @@ void ActorOverlayTable_FaultPrint(void* arg0, void* arg1) {
overlaySize = (u32)overlayEntry->vramEnd - (u32)overlayEntry->vramStart; overlaySize = (u32)overlayEntry->vramEnd - (u32)overlayEntry->vramStart;
if (overlayEntry->loadedRamAddr != NULL) { if (overlayEntry->loadedRamAddr != NULL) {
FaultDrawer_Printf("%3d %08x-%08x %3d %s\n", i, overlayEntry->loadedRamAddr, FaultDrawer_Printf("%3d %08x-%08x %3d %s\n", i, overlayEntry->loadedRamAddr,
(u32)overlayEntry->loadedRamAddr + overlaySize, overlayEntry->nbLoaded, (u32)overlayEntry->loadedRamAddr + overlaySize, overlayEntry->numLoaded,
overlayEntry->name != NULL ? overlayEntry->name : ""); overlayEntry->name != NULL ? overlayEntry->name : "");
} }
} }

View file

@ -1377,7 +1377,7 @@ u32 BgCheck_InitializeStaticLookup(CollisionContext* colCtx, GlobalContext* glob
spA4->ceiling.head = SS_NULL; spA4->ceiling.head = SS_NULL;
} }
polyMax = colHeader->nbPolygons; polyMax = colHeader->numPolygons;
vtxList = colHeader->vtxList; vtxList = colHeader->vtxList;
polyList = colHeader->polyList; polyList = colHeader->polyList;
sp98 = colCtx->subdivAmount.x * colCtx->subdivAmount.y; sp98 = colCtx->subdivAmount.x * colCtx->subdivAmount.y;
@ -1581,7 +1581,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, GlobalContext* globalCtx, Collis
BgCheck_SetSubdivisionDimension(colCtx->minBounds.z, colCtx->subdivAmount.z, &colCtx->maxBounds.z, BgCheck_SetSubdivisionDimension(colCtx->minBounds.z, colCtx->subdivAmount.z, &colCtx->maxBounds.z,
&colCtx->subdivLength.z, &colCtx->subdivLengthInv.z); &colCtx->subdivLength.z, &colCtx->subdivLengthInv.z);
memSize = colCtx->subdivAmount.x * sizeof(StaticLookup) * colCtx->subdivAmount.y * colCtx->subdivAmount.z + memSize = colCtx->subdivAmount.x * sizeof(StaticLookup) * colCtx->subdivAmount.y * colCtx->subdivAmount.z +
colCtx->colHeader->nbPolygons * sizeof(u8) + colCtx->dyna.polyNodesMax * sizeof(SSNode) + colCtx->colHeader->numPolygons * sizeof(u8) + colCtx->dyna.polyNodesMax * sizeof(SSNode) +
colCtx->dyna.polyListMax * sizeof(CollisionPoly) + colCtx->dyna.vtxListMax * sizeof(Vec3s) + colCtx->dyna.polyListMax * sizeof(CollisionPoly) + colCtx->dyna.vtxListMax * sizeof(Vec3s) +
sizeof(CollisionContext); sizeof(CollisionContext);
if (customNodeListMax > 0) { if (customNodeListMax > 0) {
@ -1596,7 +1596,7 @@ void BgCheck_Allocate(CollisionContext* colCtx, GlobalContext* globalCtx, Collis
} }
SSNodeList_Initialize(&colCtx->polyNodes); SSNodeList_Initialize(&colCtx->polyNodes);
SSNodeList_Alloc(globalCtx, &colCtx->polyNodes, tblMax, colCtx->colHeader->nbPolygons); SSNodeList_Alloc(globalCtx, &colCtx->polyNodes, tblMax, colCtx->colHeader->numPolygons);
lookupTblMemSize = BgCheck_InitializeStaticLookup(colCtx, globalCtx, colCtx->lookupTbl); lookupTblMemSize = BgCheck_InitializeStaticLookup(colCtx, globalCtx, colCtx->lookupTbl);
osSyncPrintf(VT_FGCOL(GREEN)); osSyncPrintf(VT_FGCOL(GREEN));
@ -2151,7 +2151,7 @@ s32 BgCheck_CheckLineImpl(CollisionContext* colCtx, u16 xpFlags1, u16 xpFlags2,
} }
} }
BgCheck_ResetPolyCheckTbl(&colCtx->polyNodes, colCtx->colHeader->nbPolygons); BgCheck_ResetPolyCheckTbl(&colCtx->polyNodes, colCtx->colHeader->numPolygons);
BgCheck_GetStaticLookupIndicesFromPos(colCtx, posA, (Vec3i*)&subdivMin); BgCheck_GetStaticLookupIndicesFromPos(colCtx, posA, (Vec3i*)&subdivMin);
BgCheck_GetStaticLookupIndicesFromPos(colCtx, &posBTemp, (Vec3i*)&subdivMax); BgCheck_GetStaticLookupIndicesFromPos(colCtx, &posBTemp, (Vec3i*)&subdivMax);
*posResult = *posB; *posResult = *posB;
@ -2766,29 +2766,29 @@ void DynaPoly_ExpandSRT(GlobalContext* globalCtx, DynaCollisionContext* dyna, s3
return; return;
} }
if (!(dyna->polyListMax >= *polyStartIndex + pbgdata->nbPolygons)) { if (!(dyna->polyListMax >= *polyStartIndex + pbgdata->numPolygons)) {
osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf(VT_FGCOL(RED));
// do not use if %d[*polyStartIndex + pbgdata->nbPolygons] exceeds %d[dyna->polyListMax] // do not use if %d[*polyStartIndex + pbgdata->numPolygons] exceeds %d[dyna->polyListMax]
osSyncPrintf("DynaPolyInfo_expandSRT():polygon over %dが%dを越えるとダメ\n", osSyncPrintf("DynaPolyInfo_expandSRT():polygon over %dが%dを越えるとダメ\n",
*polyStartIndex + pbgdata->nbPolygons, dyna->polyListMax); *polyStartIndex + pbgdata->numPolygons, dyna->polyListMax);
} }
if (!(dyna->vtxListMax >= *vtxStartIndex + pbgdata->nbVertices)) { if (!(dyna->vtxListMax >= *vtxStartIndex + pbgdata->numVertices)) {
osSyncPrintf(VT_FGCOL(RED)); osSyncPrintf(VT_FGCOL(RED));
// do not use if %d[*vtxStartIndex + pbgdata->nbVertices] exceeds %d[dyna->vtxListMax] // do not use if %d[*vtxStartIndex + pbgdata->numVertices] exceeds %d[dyna->vtxListMax]
osSyncPrintf("DynaPolyInfo_expandSRT():vertex over %dが%dを越えるとダメ\n", osSyncPrintf("DynaPolyInfo_expandSRT():vertex over %dが%dを越えるとダメ\n",
*vtxStartIndex + pbgdata->nbVertices, dyna->vtxListMax); *vtxStartIndex + pbgdata->numVertices, dyna->vtxListMax);
} }
ASSERT(dyna->polyListMax >= *polyStartIndex + pbgdata->nbPolygons, ASSERT(dyna->polyListMax >= *polyStartIndex + pbgdata->numPolygons,
"pdyna_poly_info->poly_num >= *pstart_poly_index + pbgdata->poly_num", "../z_bgcheck.c", 6687); "pdyna_poly_info->poly_num >= *pstart_poly_index + pbgdata->poly_num", "../z_bgcheck.c", 6687);
ASSERT(dyna->vtxListMax >= *vtxStartIndex + pbgdata->nbVertices, ASSERT(dyna->vtxListMax >= *vtxStartIndex + pbgdata->numVertices,
"pdyna_poly_info->vert_num >= *pstart_vert_index + pbgdata->vtx_num", "../z_bgcheck.c", 6688); "pdyna_poly_info->vert_num >= *pstart_vert_index + pbgdata->vtx_num", "../z_bgcheck.c", 6688);
if (!(dyna->bitFlag & DYNAPOLY_INVALIDATE_LOOKUP) && if (!(dyna->bitFlag & DYNAPOLY_INVALIDATE_LOOKUP) &&
(BgActor_IsTransformUnchanged(&dyna->bgActors[bgId]) == true)) { (BgActor_IsTransformUnchanged(&dyna->bgActors[bgId]) == true)) {
s32 pi; s32 pi;
for (pi = *polyStartIndex; pi < *polyStartIndex + pbgdata->nbPolygons; pi++) { for (pi = *polyStartIndex; pi < *polyStartIndex + pbgdata->numPolygons; pi++) {
CollisionPoly* poly = &dyna->polyList[pi]; CollisionPoly* poly = &dyna->polyList[pi];
s16 normalY = poly->normal.y; s16 normalY = poly->normal.y;
@ -2807,8 +2807,8 @@ void DynaPoly_ExpandSRT(GlobalContext* globalCtx, DynaCollisionContext* dyna, s3
} }
} }
*polyStartIndex += pbgdata->nbPolygons; *polyStartIndex += pbgdata->numPolygons;
*vtxStartIndex += pbgdata->nbVertices; *vtxStartIndex += pbgdata->numVertices;
} else { } else {
SkinMatrix_SetScaleRotateYRPTranslate( SkinMatrix_SetScaleRotateYRPTranslate(
&mtx, dyna->bgActors[bgId].curTransform.scale.x, dyna->bgActors[bgId].curTransform.scale.y, &mtx, dyna->bgActors[bgId].curTransform.scale.x, dyna->bgActors[bgId].curTransform.scale.y,
@ -2817,9 +2817,9 @@ void DynaPoly_ExpandSRT(GlobalContext* globalCtx, DynaCollisionContext* dyna, s3
dyna->bgActors[bgId].curTransform.pos.x, dyna->bgActors[bgId].curTransform.pos.y, dyna->bgActors[bgId].curTransform.pos.x, dyna->bgActors[bgId].curTransform.pos.y,
dyna->bgActors[bgId].curTransform.pos.z); dyna->bgActors[bgId].curTransform.pos.z);
numVtxInverse = 1.0f / pbgdata->nbVertices; numVtxInverse = 1.0f / pbgdata->numVertices;
newCenterPoint.x = newCenterPoint.y = newCenterPoint.z = 0.0f; newCenterPoint.x = newCenterPoint.y = newCenterPoint.z = 0.0f;
for (i = 0; i < pbgdata->nbVertices; i++) { for (i = 0; i < pbgdata->numVertices; i++) {
Vec3f vtx; Vec3f vtx;
Vec3f vtxT; // Vtx after mtx transform Vec3f vtxT; // Vtx after mtx transform
Math_Vec3s_ToVec3f(&vtx, &pbgdata->vtxList[i]); Math_Vec3s_ToVec3f(&vtx, &pbgdata->vtxList[i]);
@ -2846,7 +2846,7 @@ void DynaPoly_ExpandSRT(GlobalContext* globalCtx, DynaCollisionContext* dyna, s3
sphere->center.z = newCenterPoint.z; sphere->center.z = newCenterPoint.z;
newRadiusSq = -100.0f; newRadiusSq = -100.0f;
for (i = 0; i < pbgdata->nbVertices; i++) { for (i = 0; i < pbgdata->numVertices; i++) {
f32 radiusSq; f32 radiusSq;
newVtx.x = dyna->vtxList[*vtxStartIndex + i].x; newVtx.x = dyna->vtxList[*vtxStartIndex + i].x;
newVtx.y = dyna->vtxList[*vtxStartIndex + i].y; newVtx.y = dyna->vtxList[*vtxStartIndex + i].y;
@ -2859,7 +2859,7 @@ void DynaPoly_ExpandSRT(GlobalContext* globalCtx, DynaCollisionContext* dyna, s3
sphere->radius = sqrtf(newRadiusSq) * 1.1f; sphere->radius = sqrtf(newRadiusSq) * 1.1f;
for (i = 0; i < pbgdata->nbPolygons; i++) { for (i = 0; i < pbgdata->numPolygons; i++) {
CollisionPoly* newPoly = &dyna->polyList[*polyStartIndex + i]; CollisionPoly* newPoly = &dyna->polyList[*polyStartIndex + i];
f32 newNormMagnitude; f32 newNormMagnitude;
*newPoly = pbgdata->polyList[i]; *newPoly = pbgdata->polyList[i];
@ -2905,8 +2905,8 @@ void DynaPoly_ExpandSRT(GlobalContext* globalCtx, DynaCollisionContext* dyna, s3
} }
} }
*polyStartIndex += pbgdata->nbPolygons; *polyStartIndex += pbgdata->numPolygons;
*vtxStartIndex += pbgdata->nbVertices; *vtxStartIndex += pbgdata->numVertices;
} }
} }
@ -4187,11 +4187,11 @@ s32 WaterBox_GetSurfaceImpl(GlobalContext* globalCtx, CollisionContext* colCtx,
u32 room; u32 room;
WaterBox* curWaterBox; WaterBox* curWaterBox;
if (colHeader->nbWaterBoxes == 0 || colHeader->waterBoxes == PHYSICAL_TO_VIRTUAL(gSegments[0])) { if (colHeader->numWaterBoxes == 0 || colHeader->waterBoxes == PHYSICAL_TO_VIRTUAL(gSegments[0])) {
return false; return false;
} }
for (curWaterBox = colHeader->waterBoxes; curWaterBox < colHeader->waterBoxes + colHeader->nbWaterBoxes; for (curWaterBox = colHeader->waterBoxes; curWaterBox < colHeader->waterBoxes + colHeader->numWaterBoxes;
curWaterBox++) { curWaterBox++) {
room = (curWaterBox->properties >> 13) & 0x3F; room = (curWaterBox->properties >> 13) & 0x3F;
if (room == (u32)globalCtx->roomCtx.curRoom.num || room == 0x3F) { if (room == (u32)globalCtx->roomCtx.curRoom.num || room == 0x3F) {
@ -4223,12 +4223,12 @@ s32 WaterBox_GetSurface2(GlobalContext* globalCtx, CollisionContext* colCtx, Vec
WaterBox* waterBox; WaterBox* waterBox;
WaterBox* waterBoxList = colHeader->waterBoxes; // unused, needed for matching WaterBox* waterBoxList = colHeader->waterBoxes; // unused, needed for matching
if (colHeader->nbWaterBoxes == 0 || colHeader->waterBoxes == PHYSICAL_TO_VIRTUAL(gSegments[0])) { if (colHeader->numWaterBoxes == 0 || colHeader->waterBoxes == PHYSICAL_TO_VIRTUAL(gSegments[0])) {
*outWaterBox = NULL; *outWaterBox = NULL;
return -1; return -1;
} }
for (i = 0; i < colHeader->nbWaterBoxes; i++) { for (i = 0; i < colHeader->numWaterBoxes; i++) {
waterBox = &colHeader->waterBoxes[i]; waterBox = &colHeader->waterBoxes[i];
room = WATERBOX_ROOM(waterBox->properties); room = WATERBOX_ROOM(waterBox->properties);
@ -4297,11 +4297,11 @@ s32 func_800425B0(GlobalContext* globalCtx, CollisionContext* colCtx, f32 x, f32
u32 room; u32 room;
WaterBox* curWaterBox; WaterBox* curWaterBox;
if (colHeader->nbWaterBoxes == 0 || colHeader->waterBoxes == PHYSICAL_TO_VIRTUAL(gSegments[0])) { if (colHeader->numWaterBoxes == 0 || colHeader->waterBoxes == PHYSICAL_TO_VIRTUAL(gSegments[0])) {
return false; return false;
} }
for (curWaterBox = colHeader->waterBoxes; curWaterBox < colHeader->waterBoxes + colHeader->nbWaterBoxes; for (curWaterBox = colHeader->waterBoxes; curWaterBox < colHeader->waterBoxes + colHeader->numWaterBoxes;
curWaterBox++) { curWaterBox++) {
room = (curWaterBox->properties >> 0xD) & 0x3F; room = (curWaterBox->properties >> 0xD) & 0x3F;
if ((room == (u32)globalCtx->roomCtx.curRoom.num) || (room == 0x3F)) { if ((room == (u32)globalCtx->roomCtx.curRoom.num) || (room == 0x3F)) {

View file

@ -219,8 +219,8 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase*
} }
break; break;
case 8: case 8:
if (globalCtx->unk_11D30[0] < 0x80) { if (globalCtx->roomCtx.unk_74[0] < 0x80) {
globalCtx->unk_11D30[0] += 4; globalCtx->roomCtx.unk_74[0] += 4;
} }
break; break;
case 9: case 9:
@ -230,13 +230,13 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase*
Flags_SetEnv(globalCtx, 1); Flags_SetEnv(globalCtx, 1);
break; break;
case 11: case 11:
if (globalCtx->unk_11D30[0] < 0x672) { if (globalCtx->roomCtx.unk_74[0] < 0x672) {
globalCtx->unk_11D30[0] += 0x14; globalCtx->roomCtx.unk_74[0] += 0x14;
} }
if (csCtx->frames == 0x30F) { if (csCtx->frames == 0x30F) {
func_80078884(NA_SE_EV_DEKU_DEATH); func_80078884(NA_SE_EV_DEKU_DEATH);
} else if (csCtx->frames == 0x2CD) { } else if (csCtx->frames == 0x2CD) {
globalCtx->unk_11D30[0] = 0; globalCtx->roomCtx.unk_74[0] = 0;
} }
break; break;
case 12: case 12:
@ -247,11 +247,11 @@ void func_80064824(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdBase*
} }
break; break;
case 13: case 13:
if (globalCtx->unk_11D30[1] == 0) { if (globalCtx->roomCtx.unk_74[1] == 0) {
func_80078884(NA_SE_EV_TRIFORCE_FLASH); func_80078884(NA_SE_EV_TRIFORCE_FLASH);
} }
if (globalCtx->unk_11D30[1] < 0xFF) { if (globalCtx->roomCtx.unk_74[1] < 0xFF) {
globalCtx->unk_11D30[1] += 5; globalCtx->roomCtx.unk_74[1] += 5;
} }
break; break;
case 14: case 14:

View file

@ -8,13 +8,13 @@ extern const char D_07000000[]; // start of file
extern const char D_070380D4[]; // charset message (id 0xFFFC) extern const char D_070380D4[]; // charset message (id 0xFFFC)
extern const char D_0703811C[]; // end marker of last message extern const char D_0703811C[]; // end marker of last message
// stubbed in PAL
void func_8006EE50(Font* font, s16 arg1, s16 arg2) { void func_8006EE50(Font* font, s16 arg1, s16 arg2) {
} }
void Font_LoadChar(u32 offset, u8 character, u16 codePointIndex) { void Font_LoadChar(Font* font, u8 character, u16 codePointIndex) {
DmaMgr_SendRequest1(((u32)offset + codePointIndex) + 8, DmaMgr_SendRequest1(&font->unk_8[codePointIndex], &_nes_font_staticSegmentRomStart[character * FONT_CHAR_TEX_SIZE],
&_nes_font_staticSegmentRomStart[character * FONT_CHAR_TEX_SIZE], FONT_CHAR_TEX_SIZE, FONT_CHAR_TEX_SIZE, "../z_kanfont.c", 93);
"../z_kanfont.c", 93);
} }
void Font_LoadMessageBoxEndIcon(Font* font, u16 icon) { void Font_LoadMessageBoxEndIcon(Font* font, u16 icon) {

View file

@ -276,14 +276,14 @@ s32 func_80078E84(GlobalContext* globalCtx) {
return 0; return 0;
} }
u64* sHeartTextures[] = { static void* sHeartTextures[] = {
gHeartFullTex, gHeartQuarterTex, gHeartQuarterTex, gHeartQuarterTex, gHeartFullTex, gHeartQuarterTex, gHeartQuarterTex, gHeartQuarterTex,
gHeartQuarterTex, gHeartQuarterTex, gHeartHalfTex, gHeartHalfTex, gHeartQuarterTex, gHeartQuarterTex, gHeartHalfTex, gHeartHalfTex,
gHeartHalfTex, gHeartHalfTex, gHeartHalfTex, gHeartThreeQuarterTex, gHeartHalfTex, gHeartHalfTex, gHeartHalfTex, gHeartThreeQuarterTex,
gHeartThreeQuarterTex, gHeartThreeQuarterTex, gHeartThreeQuarterTex, gHeartThreeQuarterTex, gHeartThreeQuarterTex, gHeartThreeQuarterTex, gHeartThreeQuarterTex, gHeartThreeQuarterTex,
}; };
u64* sHeartDDTextures[] = { static void* sHeartDDTextures[] = {
gDefenseHeartFullTex, gDefenseHeartQuarterTex, gDefenseHeartQuarterTex, gDefenseHeartFullTex, gDefenseHeartQuarterTex, gDefenseHeartQuarterTex,
gDefenseHeartQuarterTex, gDefenseHeartQuarterTex, gDefenseHeartQuarterTex, gDefenseHeartQuarterTex, gDefenseHeartQuarterTex, gDefenseHeartQuarterTex,
gDefenseHeartHalfTex, gDefenseHeartHalfTex, gDefenseHeartHalfTex, gDefenseHeartHalfTex, gDefenseHeartHalfTex, gDefenseHeartHalfTex,
@ -294,7 +294,7 @@ u64* sHeartDDTextures[] = {
void HealthMeter_Draw(GlobalContext* globalCtx) { void HealthMeter_Draw(GlobalContext* globalCtx) {
s32 pad[5]; s32 pad[5];
UNK_PTR heartBgImg; void* heartBgImg;
u32 curColorSet; u32 curColorSet;
f32 offsetX; f32 offsetX;
f32 offsetY; f32 offsetY;

View file

@ -1447,10 +1447,10 @@ void Gameplay_InitScene(GlobalContext* globalCtx, s32 spawn) {
globalCtx->setupExitList = NULL; globalCtx->setupExitList = NULL;
globalCtx->cUpElfMsgs = NULL; globalCtx->cUpElfMsgs = NULL;
globalCtx->setupPathList = NULL; globalCtx->setupPathList = NULL;
globalCtx->nbSetupActors = 0; globalCtx->numSetupActors = 0;
Object_InitBank(globalCtx, &globalCtx->objectCtx); Object_InitBank(globalCtx, &globalCtx->objectCtx);
LightContext_Init(globalCtx, &globalCtx->lightCtx); LightContext_Init(globalCtx, &globalCtx->lightCtx);
func_80098CBC(globalCtx, &globalCtx->nbTransitionActors); TransitionActor_InitContext(&globalCtx->state, &globalCtx->transiActorCtx);
func_80096FD4(globalCtx, &globalCtx->roomCtx.curRoom); func_80096FD4(globalCtx, &globalCtx->roomCtx.curRoom);
YREG(15) = 0; YREG(15) = 0;
gSaveContext.worldMapArea = 0; gSaveContext.worldMapArea = 0;
@ -1459,7 +1459,7 @@ void Gameplay_InitScene(GlobalContext* globalCtx, s32 spawn) {
} }
void Gameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s32 spawn) { void Gameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s32 spawn) {
Scene* scene = &gSceneTable[sceneNum]; SceneTableEntry* scene = &gSceneTable[sceneNum];
scene->unk_13 = 0; scene->unk_13 = 0;
globalCtx->loadedScene = scene; globalCtx->loadedScene = scene;
@ -1787,7 +1787,7 @@ s32 func_800C0D34(GlobalContext* globalCtx, Actor* actor, s16* yaw) {
return 0; return 0;
} }
transitionActor = &globalCtx->transitionActorList[(u16)actor->params >> 10]; transitionActor = &globalCtx->transiActorCtx.list[(u16)actor->params >> 10];
frontRoom = transitionActor->sides[0].room; frontRoom = transitionActor->sides[0].room;
if (frontRoom == transitionActor->sides[1].room) { if (frontRoom == transitionActor->sides[1].room) {

View file

@ -498,7 +498,7 @@ u32 func_80096FE8(GlobalContext* globalCtx, RoomContext* roomCtx) {
u32 roomSize; u32 roomSize;
s32 i; s32 i;
for (i = 0; i < globalCtx->nbRooms; i++) { for (i = 0; i < globalCtx->numRooms; i++) {
roomSize = roomList[i].vromEnd - roomList[i].vromStart; roomSize = roomList[i].vromEnd - roomList[i].vromStart;
osSyncPrintf("ROOM%d size=%d\n", i, roomSize); osSyncPrintf("ROOM%d size=%d\n", i, roomSize);
if (maxRoomSize < roomSize) { if (maxRoomSize < roomSize) {
@ -506,14 +506,14 @@ u32 func_80096FE8(GlobalContext* globalCtx, RoomContext* roomCtx) {
} }
} }
if (globalCtx->nbTransitionActors != 0) { if (globalCtx->transiActorCtx.numActors != 0) {
s32 j; s32 j;
RomFile* roomList = globalCtx->roomList; RomFile* roomList = globalCtx->roomList;
TransitionActorEntry* transitionActor = &globalCtx->transitionActorList[0]; TransitionActorEntry* transitionActor = &globalCtx->transiActorCtx.list[0];
LOG_NUM("game_play->room_rom_address.num", globalCtx->nbRooms, "../z_room.c", 912); LOG_NUM("game_play->room_rom_address.num", globalCtx->numRooms, "../z_room.c", 912);
for (j = 0; j < globalCtx->nbTransitionActors; j++) { for (j = 0; j < globalCtx->transiActorCtx.numActors; j++) {
s8 frontRoom = transitionActor->sides[0].room; s8 frontRoom = transitionActor->sides[0].room;
s8 backRoom = transitionActor->sides[1].room; s8 backRoom = transitionActor->sides[1].room;
u32 frontRoomSize = (frontRoom < 0) ? 0 : roomList[frontRoom].vromEnd - roomList[frontRoom].vromStart; u32 frontRoomSize = (frontRoom < 0) ? 0 : roomList[frontRoom].vromEnd - roomList[frontRoom].vromStart;
@ -563,7 +563,7 @@ s32 func_8009728C(GlobalContext* globalCtx, RoomContext* roomCtx, s32 roomNum) {
roomCtx->curRoom.segment = NULL; roomCtx->curRoom.segment = NULL;
roomCtx->status = 1; roomCtx->status = 1;
ASSERT(roomNum < globalCtx->nbRooms, "read_room_ID < game_play->room_rom_address.num", "../z_room.c", 1009); ASSERT(roomNum < globalCtx->numRooms, "read_room_ID < game_play->room_rom_address.num", "../z_room.c", 1009);
size = globalCtx->roomList[roomNum].vromEnd - globalCtx->roomList[roomNum].vromStart; size = globalCtx->roomList[roomNum].vromEnd - globalCtx->roomList[roomNum].vromStart;
roomCtx->unk_34 = (void*)ALIGN16((s32)roomCtx->bufPtrs[roomCtx->unk_30] - ((size + 8) * roomCtx->unk_30 + 7)); roomCtx->unk_34 = (void*)ALIGN16((s32)roomCtx->bufPtrs[roomCtx->unk_30] - ((size + 8) * roomCtx->unk_30 + 7));

View file

@ -198,7 +198,7 @@ void func_80098508(GlobalContext* globalCtx, SceneCmd* cmd) {
// Scene Command 0x01: Actor List // Scene Command 0x01: Actor List
void func_800985DC(GlobalContext* globalCtx, SceneCmd* cmd) { void func_800985DC(GlobalContext* globalCtx, SceneCmd* cmd) {
globalCtx->nbSetupActors = cmd->actorList.num; globalCtx->numSetupActors = cmd->actorList.num;
globalCtx->setupActorList = SEGMENTED_TO_VIRTUAL(cmd->actorList.segment); globalCtx->setupActorList = SEGMENTED_TO_VIRTUAL(cmd->actorList.segment);
} }
@ -222,7 +222,7 @@ void func_80098674(GlobalContext* globalCtx, SceneCmd* cmd) {
// Scene Command 0x04: Room List // Scene Command 0x04: Room List
void func_800987A4(GlobalContext* globalCtx, SceneCmd* cmd) { void func_800987A4(GlobalContext* globalCtx, SceneCmd* cmd) {
globalCtx->nbRooms = cmd->roomList.num; globalCtx->numRooms = cmd->roomList.num;
globalCtx->roomList = SEGMENTED_TO_VIRTUAL(cmd->roomList.segment); globalCtx->roomList = SEGMENTED_TO_VIRTUAL(cmd->roomList.segment);
} }
@ -327,17 +327,17 @@ void func_80098C24(GlobalContext* globalCtx, SceneCmd* cmd) {
// Scene Command 0x0E: Transition Actor List // Scene Command 0x0E: Transition Actor List
void func_80098C68(GlobalContext* globalCtx, SceneCmd* cmd) { void func_80098C68(GlobalContext* globalCtx, SceneCmd* cmd) {
globalCtx->nbTransitionActors = cmd->transiActorList.num; globalCtx->transiActorCtx.numActors = cmd->transiActorList.num;
globalCtx->transitionActorList = SEGMENTED_TO_VIRTUAL(cmd->transiActorList.segment); globalCtx->transiActorCtx.list = SEGMENTED_TO_VIRTUAL(cmd->transiActorList.segment);
} }
void func_80098CBC(GlobalContext* globalCtx, u8* nbTransitionActors) { void TransitionActor_InitContext(GameState* state, TransitionActorContext* transiActorCtx) {
*nbTransitionActors = 0; transiActorCtx->numActors = 0;
} }
// Scene Command 0x0F: Light Setting List // Scene Command 0x0F: Light Setting List
void func_80098CC8(GlobalContext* globalCtx, SceneCmd* cmd) { void func_80098CC8(GlobalContext* globalCtx, SceneCmd* cmd) {
globalCtx->envCtx.nbLightSettings = cmd->lightSettingList.num; globalCtx->envCtx.numLightSettings = cmd->lightSettingList.num;
globalCtx->envCtx.lightSettingsList = SEGMENTED_TO_VIRTUAL(cmd->lightSettingList.segment); globalCtx->envCtx.lightSettingsList = SEGMENTED_TO_VIRTUAL(cmd->lightSettingList.segment);
} }

View file

@ -796,7 +796,7 @@ EntranceInfo gEntranceTable[] = {
#define UNTITLED_SCENE(name, unk_10, config, unk_12) \ #define UNTITLED_SCENE(name, unk_10, config, unk_12) \
{ (u32) _##name##SegmentRomStart, (u32)_##name##SegmentRomEnd, 0, 0, unk_10, config, unk_12, 0 } { (u32) _##name##SegmentRomStart, (u32)_##name##SegmentRomEnd, 0, 0, unk_10, config, unk_12, 0 }
Scene gSceneTable[] = { SceneTableEntry gSceneTable[] = {
TITLED_SCENE(ydan_scene, g_pn_06, 1, 19, 2), TITLED_SCENE(ydan_scene, g_pn_06, 1, 19, 2),
TITLED_SCENE(ddan_scene, g_pn_08, 1, 20, 3), TITLED_SCENE(ddan_scene, g_pn_08, 1, 20, 3),
TITLED_SCENE(bdan_scene, g_pn_07, 1, 21, 4), TITLED_SCENE(bdan_scene, g_pn_07, 1, 21, 4),
@ -1023,11 +1023,11 @@ void func_80099878(GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x0B, displayListHead); gSPSegment(POLY_OPA_DISP++, 0x0B, displayListHead);
gDPPipeSync(displayListHead++); gDPPipeSync(displayListHead++);
gDPSetEnvColor(displayListHead++, 255, 255, 255, globalCtx->unk_11D30[0]); gDPSetEnvColor(displayListHead++, 255, 255, 255, globalCtx->roomCtx.unk_74[0]);
gSPEndDisplayList(displayListHead++); gSPEndDisplayList(displayListHead++);
gSPSegment(POLY_OPA_DISP++, 0x0C, displayListHead); gSPSegment(POLY_OPA_DISP++, 0x0C, displayListHead);
gDPPipeSync(displayListHead++); gDPPipeSync(displayListHead++);
gDPSetEnvColor(displayListHead++, 255, 255, 255, globalCtx->unk_11D30[1]); gDPSetEnvColor(displayListHead++, 255, 255, 255, globalCtx->roomCtx.unk_74[1]);
gSPEndDisplayList(displayListHead); gSPEndDisplayList(displayListHead);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4956); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 4956);
@ -1040,7 +1040,7 @@ void func_80099BD8(GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5069); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5069);
temp = globalCtx->unk_11D30[0] / 255.0f; temp = globalCtx->roomCtx.unk_74[0] / 255.0f;
gSPSegment(POLY_XLU_DISP++, 0x08, displayListHead); gSPSegment(POLY_XLU_DISP++, 0x08, displayListHead);
gSPSegment(POLY_OPA_DISP++, 0x08, displayListHead); gSPSegment(POLY_OPA_DISP++, 0x08, displayListHead);
@ -1057,7 +1057,7 @@ void func_80099BD8(GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x0A, displayListHead); gSPSegment(POLY_OPA_DISP++, 0x0A, displayListHead);
gSPSegment(POLY_XLU_DISP++, 0x0A, displayListHead); gSPSegment(POLY_XLU_DISP++, 0x0A, displayListHead);
gDPPipeSync(displayListHead++); gDPPipeSync(displayListHead++);
gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[0]); gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->roomCtx.unk_74[0]);
gSPEndDisplayList(displayListHead++); gSPEndDisplayList(displayListHead++);
gSPSegment(POLY_OPA_DISP++, 0x0B, displayListHead); gSPSegment(POLY_OPA_DISP++, 0x0B, displayListHead);
@ -1065,7 +1065,7 @@ void func_80099BD8(GlobalContext* globalCtx) {
gDPSetPrimColor(displayListHead++, 0, 0, 89 + (u8)(166.0f * temp), 89 + (u8)(166.0f * temp), gDPSetPrimColor(displayListHead++, 0, 0, 89 + (u8)(166.0f * temp), 89 + (u8)(166.0f * temp),
89 + (u8)(166.0f * temp), 255); 89 + (u8)(166.0f * temp), 255);
gDPPipeSync(displayListHead++); gDPPipeSync(displayListHead++);
gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[0]); gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->roomCtx.unk_74[0]);
gSPEndDisplayList(displayListHead++); gSPEndDisplayList(displayListHead++);
gSPSegment(POLY_OPA_DISP++, 0x0C, displayListHead); gSPSegment(POLY_OPA_DISP++, 0x0C, displayListHead);
@ -1073,13 +1073,13 @@ void func_80099BD8(GlobalContext* globalCtx) {
gDPSetPrimColor(displayListHead++, 0, 0, 255 + (u8)(179.0f * temp), 255 + (u8)(179.0f * temp), gDPSetPrimColor(displayListHead++, 0, 0, 255 + (u8)(179.0f * temp), 255 + (u8)(179.0f * temp),
255 + (u8)(179.0f * temp), 255); 255 + (u8)(179.0f * temp), 255);
gDPPipeSync(displayListHead++); gDPPipeSync(displayListHead++);
gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[0]); gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->roomCtx.unk_74[0]);
gSPEndDisplayList(displayListHead++); gSPEndDisplayList(displayListHead++);
gSPSegment(POLY_OPA_DISP++, 0x0D, displayListHead); gSPSegment(POLY_OPA_DISP++, 0x0D, displayListHead);
gSPSegment(POLY_XLU_DISP++, 0x0D, displayListHead); gSPSegment(POLY_XLU_DISP++, 0x0D, displayListHead);
gDPPipeSync(displayListHead++); gDPPipeSync(displayListHead++);
gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->unk_11D30[1]); gDPSetEnvColor(displayListHead++, 0, 0, 0, globalCtx->roomCtx.unk_74[1]);
gSPEndDisplayList(displayListHead); gSPEndDisplayList(displayListHead);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5145); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 5145);
@ -1272,8 +1272,8 @@ void func_8009B0FC(GlobalContext* globalCtx) {
if (1) {} // Necessary to match if (1) {} // Necessary to match
spB0 = (globalCtx->unk_11D30[1] >> 8) & 0xFF; spB0 = (globalCtx->roomCtx.unk_74[1] >> 8) & 0xFF;
spAC = globalCtx->unk_11D30[1] & 0xFF; spAC = globalCtx->roomCtx.unk_74[1] & 0xFF;
gameplayFrames = globalCtx->gameplayFrames; gameplayFrames = globalCtx->gameplayFrames;
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A330[gSaveContext.nightFlag])); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_8012A330[gSaveContext.nightFlag]));
@ -1345,7 +1345,7 @@ void func_8009B86C(GlobalContext* globalCtx) {
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32)); Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, gameplayFrames * 1, 0, 32, 32, 1, 0, 0, 32, 32));
gDPPipeSync(POLY_OPA_DISP++); gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, globalCtx->unk_11D30[0]); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, globalCtx->roomCtx.unk_74[0]);
gDPPipeSync(POLY_XLU_DISP++); gDPPipeSync(POLY_XLU_DISP++);
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 145); gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 145);
@ -1654,7 +1654,7 @@ void func_8009CF84(GlobalContext* globalCtx) {
Gfx_TwoTexScrollPrimColor(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128, Gfx_TwoTexScrollPrimColor(globalCtx->state.gfxCtx, 0, 127 - gameplayFrames % 128,
(gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128, (gameplayFrames * 1) % 128, 32, 32, 1, gameplayFrames % 128,
(gameplayFrames * 1) % 128, 32, 32, 255, 255, 255, (gameplayFrames * 1) % 128, 32, 32, 255, 255, 255,
globalCtx->unk_11D30[0] + 127)); globalCtx->roomCtx.unk_74[0] + 127));
gDPPipeSync(POLY_OPA_DISP++); gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
@ -1829,16 +1829,16 @@ void func_8009DA30(GlobalContext* globalCtx) {
gSPEndDisplayList(displayListHead); gSPEndDisplayList(displayListHead);
} else { } else {
if (gSaveContext.dayTime > 0xC555) { if (gSaveContext.dayTime > 0xC555) {
if (globalCtx->unk_11D30[0] != 255) { if (globalCtx->roomCtx.unk_74[0] != 255) {
Math_StepToS(&globalCtx->unk_11D30[0], 255, 5); Math_StepToS(&globalCtx->roomCtx.unk_74[0], 255, 5);
} }
} else if (gSaveContext.dayTime >= 0x4000) { } else if (gSaveContext.dayTime >= 0x4000) {
if (globalCtx->unk_11D30[0] != 0) { if (globalCtx->roomCtx.unk_74[0] != 0) {
Math_StepToS(&globalCtx->unk_11D30[0], 0, 10); Math_StepToS(&globalCtx->roomCtx.unk_74[0], 0, 10);
} }
} }
gDPSetPrimColor(displayListHead++, 0, 0, 255, 255, 255, globalCtx->unk_11D30[0]); gDPSetPrimColor(displayListHead++, 0, 0, 255, 255, 255, globalCtx->roomCtx.unk_74[0]);
gSPDisplayList(displayListHead++, &D_03012B20); gSPDisplayList(displayListHead++, &D_03012B20);
gSPEndDisplayList(displayListHead); gSPEndDisplayList(displayListHead);
} }
@ -1922,9 +1922,9 @@ void func_8009E0B8(GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128); gDPSetEnvColor(POLY_XLU_DISP++, 128, 128, 128, 128);
if (gSaveContext.sceneSetupIndex == 4) { if (gSaveContext.sceneSetupIndex == 4) {
spA3 = 255 - (u8)globalCtx->unk_11D30[0]; spA3 = 255 - (u8)globalCtx->roomCtx.unk_74[0];
} else if (gSaveContext.sceneSetupIndex == 6) { } else if (gSaveContext.sceneSetupIndex == 6) {
spA0 = globalCtx->unk_11D30[0] + 500; spA0 = globalCtx->roomCtx.unk_74[0] + 500;
} else if (((gSaveContext.sceneSetupIndex < 4) || LINK_IS_ADULT) && (gSaveContext.eventChkInf[0] & 0x80)) { } else if (((gSaveContext.sceneSetupIndex < 4) || LINK_IS_ADULT) && (gSaveContext.eventChkInf[0] & 0x80)) {
spA0 = 2150; spA0 = 2150;
} }
@ -1941,8 +1941,8 @@ void func_8009E0B8(GlobalContext* globalCtx) {
gSPEndDisplayList(displayListHead); gSPEndDisplayList(displayListHead);
gSPSegment(POLY_OPA_DISP++, 0x0C, gSPSegment(POLY_OPA_DISP++, 0x0C,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (s16)(-globalCtx->unk_11D30[0] * 0.02f), 32, 16, 1, 0, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (s16)(-globalCtx->roomCtx.unk_74[0] * 0.02f), 32, 16, 1,
(s16)(-globalCtx->unk_11D30[0] * 0.02f), 32, 16)); 0, (s16)(-globalCtx->roomCtx.unk_74[0] * 0.02f), 32, 16));
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7044); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7044);
} }
@ -1954,16 +1954,16 @@ void func_8009E54C(GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7058); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7058);
if ((gSaveContext.sceneSetupIndex > 3) || (LINK_IS_ADULT && !(gSaveContext.eventChkInf[6] & 0x200))) { if ((gSaveContext.sceneSetupIndex > 3) || (LINK_IS_ADULT && !(gSaveContext.eventChkInf[6] & 0x200))) {
globalCtx->unk_11D30[0] = 87; globalCtx->roomCtx.unk_74[0] = 87;
} }
gameplayFrames = globalCtx->gameplayFrames; gameplayFrames = globalCtx->gameplayFrames;
gSPSegment(POLY_OPA_DISP++, 0x08, gSPSegment(POLY_OPA_DISP++, 0x08,
Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames, gameplayFrames, 32, 32, 1, 0, 0, 32, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, gameplayFrames, gameplayFrames, 32, 32, 1, 0, 0, 32,
32, 0, 0, 0, globalCtx->unk_11D30[0] + 168)); 32, 0, 0, 0, globalCtx->roomCtx.unk_74[0] + 168));
gSPSegment(POLY_OPA_DISP++, 0x09, gSPSegment(POLY_OPA_DISP++, 0x09,
Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, -gameplayFrames, -gameplayFrames, 32, 32, 1, 0, 0, Gfx_TwoTexScrollEnvColor(globalCtx->state.gfxCtx, 0, -gameplayFrames, -gameplayFrames, 32, 32, 1, 0, 0,
16, 64, 0, 0, 0, globalCtx->unk_11D30[0] + 168)); 16, 64, 0, 0, 0, globalCtx->roomCtx.unk_74[0] + 168));
gDPPipeSync(POLY_OPA_DISP++); gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 128); gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 128);
@ -2079,12 +2079,12 @@ void func_8009EE44(GlobalContext* globalCtx) {
gDPPipeSync(POLY_OPA_DISP++); gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
if ((globalCtx->unk_11D30[0] == 0) && (INV_CONTENT(ITEM_COJIRO) == ITEM_COJIRO)) { if ((globalCtx->roomCtx.unk_74[0] == 0) && (INV_CONTENT(ITEM_COJIRO) == ITEM_COJIRO)) {
if (globalCtx->unk_11D30[1] == 50) { if (globalCtx->roomCtx.unk_74[1] == 50) {
func_8002F7DC(&PLAYER->actor, NA_SE_EV_CHICKEN_CRY_M); func_8002F7DC(&PLAYER->actor, NA_SE_EV_CHICKEN_CRY_M);
globalCtx->unk_11D30[0] = 1; globalCtx->roomCtx.unk_74[0] = 1;
} }
globalCtx->unk_11D30[1]++; globalCtx->roomCtx.unk_74[1]++;
} }
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7309); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_scene_table.c", 7309);
@ -2180,16 +2180,16 @@ void func_8009F5D4(GlobalContext* globalCtx) {
gSPEndDisplayList(displayListHead); gSPEndDisplayList(displayListHead);
} else { } else {
if (gSaveContext.dayTime > 0xC000) { if (gSaveContext.dayTime > 0xC000) {
if (globalCtx->unk_11D30[0] != 255) { if (globalCtx->roomCtx.unk_74[0] != 255) {
Math_StepToS(&globalCtx->unk_11D30[0], 255, 5); Math_StepToS(&globalCtx->roomCtx.unk_74[0], 255, 5);
} }
} else if (gSaveContext.dayTime >= 0x4000) { } else if (gSaveContext.dayTime >= 0x4000) {
if (globalCtx->unk_11D30[0] != 0) { if (globalCtx->roomCtx.unk_74[0] != 0) {
Math_StepToS(&globalCtx->unk_11D30[0], 0, 10); Math_StepToS(&globalCtx->roomCtx.unk_74[0], 0, 10);
} }
} }
gDPSetPrimColor(displayListHead++, 0, 0, 255, 255, 255, globalCtx->unk_11D30[0]); gDPSetPrimColor(displayListHead++, 0, 0, 255, 255, 255, globalCtx->roomCtx.unk_74[0]);
gSPDisplayList(displayListHead++, &D_0300AA48); gSPDisplayList(displayListHead++, &D_0300AA48);
gSPEndDisplayList(displayListHead); gSPEndDisplayList(displayListHead);
} }
@ -2339,27 +2339,27 @@ void func_8009FE58(GlobalContext* globalCtx) {
1.f + (0.39999998f * temp * Math_CosS(D_8012A3A0)), 1.f + (1 * temp * Math_CosS(D_8012A39C))); 1.f + (0.39999998f * temp * Math_CosS(D_8012A3A0)), 1.f + (1 * temp * Math_CosS(D_8012A39C)));
func_800AA7AC(&globalCtx->view, 0.95f); func_800AA7AC(&globalCtx->view, 0.95f);
switch (globalCtx->unk_11D30[0]) { switch (globalCtx->roomCtx.unk_74[0]) {
case 0: case 0:
break; break;
case 1: case 1:
if (globalCtx->unk_11D30[1] < 1200) { if (globalCtx->roomCtx.unk_74[1] < 1200) {
globalCtx->unk_11D30[1] += 200; globalCtx->roomCtx.unk_74[1] += 200;
} else { } else {
globalCtx->unk_11D30[0]++; globalCtx->roomCtx.unk_74[0]++;
} }
break; break;
case 2: case 2:
if (globalCtx->unk_11D30[1] > 0) { if (globalCtx->roomCtx.unk_74[1] > 0) {
globalCtx->unk_11D30[1] -= 30; globalCtx->roomCtx.unk_74[1] -= 30;
} else { } else {
globalCtx->unk_11D30[1] = 0; globalCtx->roomCtx.unk_74[1] = 0;
globalCtx->unk_11D30[0] = 0; globalCtx->roomCtx.unk_74[0] = 0;
} }
break; break;
} }
D_8012A398 += 0.15f + (globalCtx->unk_11D30[1] * 0.001f); D_8012A398 += 0.15f + (globalCtx->roomCtx.unk_74[1] * 0.001f);
} }
if (globalCtx->roomCtx.curRoom.num == 2) { if (globalCtx->roomCtx.curRoom.num == 2) {

View file

@ -3,7 +3,7 @@
OSTime osGetTime(void) { OSTime osGetTime(void) {
u32 count; u32 count;
u32 base; u32 base;
u64 t; OSTime t;
register u32 prevInt = __osDisableInt(); register u32 prevInt = __osDisableInt();
count = osGetCount(); count = osGetCount();

View file

@ -121,7 +121,7 @@ void BgDodoago_Init(Actor* thisx, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params & 0x3F))) { if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params & 0x3F))) {
BgDodoago_SetupAction(this, func_8087227C); BgDodoago_SetupAction(this, func_8087227C);
this->dyna.actor.shape.rot.x = 0x1333; this->dyna.actor.shape.rot.x = 0x1333;
globalCtx->unk_11D30[0] = globalCtx->unk_11D30[1] = 0xFF; globalCtx->roomCtx.unk_74[0] = globalCtx->roomCtx.unk_74[1] = 0xFF;
return; return;
} }
@ -152,14 +152,14 @@ void func_80871CF4(BgDodoago* this, GlobalContext* globalCtx) {
(Math_Vec3f_Yaw(&this->dyna.actor.world.pos, &explosive->world.pos) >= this->dyna.actor.shape.rot.y) ? 1 (Math_Vec3f_Yaw(&this->dyna.actor.world.pos, &explosive->world.pos) >= this->dyna.actor.shape.rot.y) ? 1
: 0; : 0;
if (((globalCtx->unk_11D30[0] == 0xFF) && (this->unk_164 == 1)) || if (((globalCtx->roomCtx.unk_74[0] == 0xFF) && (this->unk_164 == 1)) ||
((globalCtx->unk_11D30[1] == 0xFF) && (this->unk_164 == 0))) { ((globalCtx->roomCtx.unk_74[1] == 0xFF) && (this->unk_164 == 0))) {
Flags_SetSwitch(globalCtx, (this->dyna.actor.params & 0x3F)); Flags_SetSwitch(globalCtx, (this->dyna.actor.params & 0x3F));
this->unk_164 = 0; this->unk_164 = 0;
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
BgDodoago_SetupAction(this, func_80871FB8); BgDodoago_SetupAction(this, func_80871FB8);
OnePointCutscene_Init(globalCtx, 3380, 160, &this->dyna.actor, MAIN_CAM); OnePointCutscene_Init(globalCtx, 3380, 160, &this->dyna.actor, MAIN_CAM);
} else if (globalCtx->unk_11D30[this->unk_164] == 0) { } else if (globalCtx->roomCtx.unk_74[this->unk_164] == 0) {
OnePointCutscene_Init(globalCtx, 3065, 40, &this->dyna.actor, MAIN_CAM); OnePointCutscene_Init(globalCtx, 3065, 40, &this->dyna.actor, MAIN_CAM);
BgDodoago_SetupAction(this, func_80872288); BgDodoago_SetupAction(this, func_80872288);
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
@ -204,14 +204,14 @@ void func_80871FB8(BgDodoago* this, GlobalContext* globalCtx) {
}; };
s32 i; s32 i;
if (globalCtx->unk_11D30[0] < 0xFF) { if (globalCtx->roomCtx.unk_74[0] < 0xFF) {
globalCtx->unk_11D30[0] += 5; globalCtx->roomCtx.unk_74[0] += 5;
} }
if (globalCtx->unk_11D30[1] < 0xFF) { if (globalCtx->roomCtx.unk_74[1] < 0xFF) {
globalCtx->unk_11D30[1] += 5; globalCtx->roomCtx.unk_74[1] += 5;
} }
if (globalCtx->unk_11D30[0] != 0xFF || globalCtx->unk_11D30[1] != 0xFF) { if (globalCtx->roomCtx.unk_74[0] != 0xFF || globalCtx->roomCtx.unk_74[1] != 0xFF) {
D_80872824--; D_80872824--;
return; return;
} }
@ -253,9 +253,9 @@ void func_8087227C(BgDodoago* this, GlobalContext* globalCtx) {
} }
void func_80872288(BgDodoago* this, GlobalContext* globalCtx) { void func_80872288(BgDodoago* this, GlobalContext* globalCtx) {
globalCtx->unk_11D30[this->unk_164] += 5; globalCtx->roomCtx.unk_74[this->unk_164] += 5;
if (globalCtx->unk_11D30[this->unk_164] == 0xFF) { if (globalCtx->roomCtx.unk_74[this->unk_164] == 0xFF) {
BgDodoago_SetupAction(this, func_80871CF4); BgDodoago_SetupAction(this, func_80871CF4);
} }
} }

View file

@ -195,7 +195,7 @@ void BgHidanFirewall_Update(Actor* thisx, GlobalContext* globalCtx) {
} }
} }
static u64* sFireballTexs[] = { static void* sFireballTexs[] = {
gFireTempleFireball0Tex, gFireTempleFireball1Tex, gFireTempleFireball2Tex, gFireTempleFireball3Tex, gFireTempleFireball0Tex, gFireTempleFireball1Tex, gFireTempleFireball2Tex, gFireTempleFireball3Tex,
gFireTempleFireball4Tex, gFireTempleFireball5Tex, gFireTempleFireball6Tex, gFireTempleFireball7Tex, gFireTempleFireball4Tex, gFireTempleFireball5Tex, gFireTempleFireball6Tex, gFireTempleFireball7Tex,
}; };

View file

@ -344,7 +344,7 @@ void BgHidanRock_Update(Actor* thisx, GlobalContext* globalCtx) {
} }
} }
static u64* sVerticalFlamesTexs[] = { static void* sVerticalFlamesTexs[] = {
gFireTempleBigVerticalFlame0Tex, gFireTempleBigVerticalFlame1Tex, gFireTempleBigVerticalFlame2Tex, gFireTempleBigVerticalFlame0Tex, gFireTempleBigVerticalFlame1Tex, gFireTempleBigVerticalFlame2Tex,
gFireTempleBigVerticalFlame3Tex, gFireTempleBigVerticalFlame4Tex, gFireTempleBigVerticalFlame5Tex, gFireTempleBigVerticalFlame3Tex, gFireTempleBigVerticalFlame4Tex, gFireTempleBigVerticalFlame5Tex,
gFireTempleBigVerticalFlame6Tex, gFireTempleBigVerticalFlame7Tex, gFireTempleBigVerticalFlame6Tex, gFireTempleBigVerticalFlame7Tex,

View file

@ -116,7 +116,7 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneForward, 1500, ICHAIN_STOP), ICHAIN_F32(uncullZoneForward, 1500, ICHAIN_STOP),
}; };
static u64* sFireballsTexs[] = { static void* sFireballsTexs[] = {
gFireTempleFireball0Tex, gFireTempleFireball1Tex, gFireTempleFireball2Tex, gFireTempleFireball3Tex, gFireTempleFireball0Tex, gFireTempleFireball1Tex, gFireTempleFireball2Tex, gFireTempleFireball3Tex,
gFireTempleFireball4Tex, gFireTempleFireball5Tex, gFireTempleFireball6Tex, gFireTempleFireball7Tex, gFireTempleFireball4Tex, gFireTempleFireball5Tex, gFireTempleFireball6Tex, gFireTempleFireball7Tex,
}; };

View file

@ -77,7 +77,7 @@ static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP), ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
}; };
static u64* sFireballsTexs[] = { static void* sFireballsTexs[] = {
gFireTempleFireball0Tex, gFireTempleFireball1Tex, gFireTempleFireball2Tex, gFireTempleFireball3Tex, gFireTempleFireball0Tex, gFireTempleFireball1Tex, gFireTempleFireball2Tex, gFireTempleFireball3Tex,
gFireTempleFireball4Tex, gFireTempleFireball5Tex, gFireTempleFireball6Tex, gFireTempleFireball7Tex, gFireTempleFireball4Tex, gFireTempleFireball5Tex, gFireTempleFireball6Tex, gFireTempleFireball7Tex,
}; };

View file

@ -288,12 +288,12 @@ void BgJyaMegami_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx); this->actionFunc(this, globalCtx);
} }
static u64* sRightSideCrumbles[] = { static void* sRightSideCrumbles[] = {
gMeagmiRightCrumble1Tex, gMeagmiRightCrumble2Tex, gMeagmiRightCrumble3Tex, gMeagmiRightCrumble1Tex, gMeagmiRightCrumble2Tex, gMeagmiRightCrumble3Tex,
gMeagmiRightCrumble4Tex, gMeagmiRightCrumble5Tex, gMeagmiRightCrumble4Tex, gMeagmiRightCrumble5Tex,
}; };
static u64* sLeftSideCrumbles[] = { static void* sLeftSideCrumbles[] = {
gMeagmiLeftCrumble1Tex, gMeagmiLeftCrumble2Tex, gMeagmiLeftCrumble3Tex, gMeagmiLeftCrumble1Tex, gMeagmiLeftCrumble2Tex, gMeagmiLeftCrumble3Tex,
gMeagmiLeftCrumble4Tex, gMeagmiLeftCrumble5Tex, gMeagmiLeftCrumble4Tex, gMeagmiLeftCrumble5Tex,
}; };

View file

@ -237,7 +237,7 @@ void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, GlobalContext* globalCtx) {
} }
if (Math_StepToF(&this->actor.world.pos.y, this->targetY, 5.0f)) { if (Math_StepToF(&this->actor.world.pos.y, this->targetY, 5.0f)) {
globalCtx->unk_11D30[0] = 0; globalCtx->roomCtx.unk_74[0] = 0;
this->actionFunc = BgMizuWater_WaitForAction; this->actionFunc = BgMizuWater_WaitForAction;
func_80106CCC(globalCtx); func_80106CCC(globalCtx);
} }
@ -252,7 +252,7 @@ void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, GlobalContext* globalCtx) {
this->targetY = this->baseY; this->targetY = this->baseY;
} }
if (Math_StepToF(&this->actor.world.pos.y, this->targetY, 1.0f)) { if (Math_StepToF(&this->actor.world.pos.y, this->targetY, 1.0f)) {
globalCtx->unk_11D30[0] = 0; globalCtx->roomCtx.unk_74[0] = 0;
this->actionFunc = BgMizuWater_WaitForAction; this->actionFunc = BgMizuWater_WaitForAction;
} }
waterBoxes[6].ySurface = this->actor.world.pos.y; waterBoxes[6].ySurface = this->actor.world.pos.y;
@ -264,7 +264,7 @@ void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, GlobalContext* globalCtx) {
this->targetY = this->baseY; this->targetY = this->baseY;
} }
if (Math_StepToF(&this->actor.world.pos.y, this->targetY, 1.0f)) { if (Math_StepToF(&this->actor.world.pos.y, this->targetY, 1.0f)) {
globalCtx->unk_11D30[0] = 0; globalCtx->roomCtx.unk_74[0] = 0;
this->actionFunc = BgMizuWater_WaitForAction; this->actionFunc = BgMizuWater_WaitForAction;
} }
waterBoxes[8].ySurface = this->actor.world.pos.y; waterBoxes[8].ySurface = this->actor.world.pos.y;
@ -276,7 +276,7 @@ void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, GlobalContext* globalCtx) {
this->targetY = this->baseY; this->targetY = this->baseY;
} }
if (Math_StepToF(&this->actor.world.pos.y, this->targetY, 1.0f)) { if (Math_StepToF(&this->actor.world.pos.y, this->targetY, 1.0f)) {
globalCtx->unk_11D30[0] = 0; globalCtx->roomCtx.unk_74[0] = 0;
this->actionFunc = BgMizuWater_WaitForAction; this->actionFunc = BgMizuWater_WaitForAction;
} }
waterBoxes[16].ySurface = this->actor.world.pos.y; waterBoxes[16].ySurface = this->actor.world.pos.y;
@ -320,7 +320,7 @@ void BgMizuWater_Update(Actor* thisx, GlobalContext* globalCtx) {
unk1 = 255 - (s32)((posY - WATER_TEMPLE_WATER_F2_Y) / (WATER_TEMPLE_WATER_F3_Y - WATER_TEMPLE_WATER_F2_Y) * unk1 = 255 - (s32)((posY - WATER_TEMPLE_WATER_F2_Y) / (WATER_TEMPLE_WATER_F3_Y - WATER_TEMPLE_WATER_F2_Y) *
(255 - 160)); (255 - 160));
} }
globalCtx->unk_11D30[1] = ((u8)unk0 << 8) | (unk1 & 0xFF); globalCtx->roomCtx.unk_74[1] = ((u8)unk0 << 8) | (unk1 & 0xFF);
} }
this->actionFunc(this, globalCtx); this->actionFunc(this, globalCtx);

View file

@ -32,7 +32,7 @@ extern Gfx D_060013F0[];
extern Gfx D_060126F0[]; extern Gfx D_060126F0[];
extern Gfx D_06012D30[]; extern Gfx D_06012D30[];
static u64* D_808AD850[] = { static void* D_808AD850[] = {
0x060096B0, 0x0600A2B0, 0x0600AEB0, 0x0600BAB0, 0x0600C6B0, 0x0600D2B0, 0x060096B0, 0x0600A2B0, 0x0600AEB0, 0x0600BAB0, 0x0600C6B0, 0x0600D2B0,
0x0600DEB0, 0x0600EAB0, 0x0600F6B0, 0x060102B0, 0x06010EB0, 0x06011AB0, 0x0600DEB0, 0x0600EAB0, 0x0600F6B0, 0x060102B0, 0x06010EB0, 0x06011AB0,
}; };

View file

@ -116,7 +116,7 @@ void func_808BA018(BgTokiHikari* this, GlobalContext* globalCtx) {
} }
void func_808BA204(BgTokiHikari* this, GlobalContext* globalCtx) { void func_808BA204(BgTokiHikari* this, GlobalContext* globalCtx) {
if (globalCtx->unk_11D30[1] != 0) { if (globalCtx->roomCtx.unk_74[1] != 0) {
this->actionFunc = func_808BA22C; this->actionFunc = func_808BA22C;
} }
} }

View file

@ -80,7 +80,7 @@ void BgTokiSwd_Init(Actor* thisx, GlobalContext* globalCtx) {
} }
if (gSaveContext.sceneSetupIndex == 5) { if (gSaveContext.sceneSetupIndex == 5) {
globalCtx->unk_11D30[0] = 0xFF; globalCtx->roomCtx.unk_74[0] = 0xFF;
} }
Collider_InitCylinder(globalCtx, &this->collider); Collider_InitCylinder(globalCtx, &this->collider);
@ -122,10 +122,10 @@ void func_808BAF40(BgTokiSwd* this, GlobalContext* globalCtx) {
} }
} }
if (gSaveContext.sceneSetupIndex == 5) { if (gSaveContext.sceneSetupIndex == 5) {
if (globalCtx->unk_11D30[0] > 0) { if (globalCtx->roomCtx.unk_74[0] > 0) {
globalCtx->unk_11D30[0]--; globalCtx->roomCtx.unk_74[0]--;
} else { } else {
globalCtx->unk_11D30[0] = 0; globalCtx->roomCtx.unk_74[0] = 0;
} }
} }
} }
@ -149,8 +149,8 @@ void func_808BB0AC(BgTokiSwd* this, GlobalContext* globalCtx) {
} }
void func_808BB128(BgTokiSwd* this, GlobalContext* globalCtx) { void func_808BB128(BgTokiSwd* this, GlobalContext* globalCtx) {
if (Flags_GetEnv(globalCtx, 1) && (globalCtx->unk_11D30[0] < 0xFF)) { if (Flags_GetEnv(globalCtx, 1) && (globalCtx->roomCtx.unk_74[0] < 0xFF)) {
globalCtx->unk_11D30[0] += 5; globalCtx->roomCtx.unk_74[0] += 5;
} }
} }

View file

@ -238,7 +238,7 @@ void BgTreemouth_Draw(Actor* thisx, GlobalContext* globalCtx) {
} }
if (gSaveContext.sceneSetupIndex == 6) { if (gSaveContext.sceneSetupIndex == 6) {
alpha = (globalCtx->unk_11D30[0] + 0x1F4); alpha = (globalCtx->roomCtx.unk_74[0] + 0x1F4);
} }
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, alpha * 0.1f); gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, alpha * 0.1f);

View file

@ -1510,7 +1510,7 @@ void BossFd_UpdateEffects(BossFd* this, GlobalContext* globalCtx) {
} }
void BossFd_DrawEffects(BossFdEffect* effect, GlobalContext* globalCtx) { void BossFd_DrawEffects(BossFdEffect* effect, GlobalContext* globalCtx) {
static u64* dustTex[] = { static void* dustTex[] = {
gDust1Tex, gDust1Tex, gDust2Tex, gDust3Tex, gDust4Tex, gDust5Tex, gDust6Tex, gDust7Tex, gDust8Tex, gDust1Tex, gDust1Tex, gDust2Tex, gDust3Tex, gDust4Tex, gDust5Tex, gDust6Tex, gDust7Tex, gDust8Tex,
}; };
u8 flag = false; u8 flag = false;
@ -1804,7 +1804,11 @@ void BossFd_PostHeadDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V
} }
} }
static u64* sEyeTextures[] = { gVolvagiaEyeOpenTex, gVolvagiaEyeHalfTex, gVolvagiaEyeClosedTex }; static void* sEyeTextures[] = {
gVolvagiaEyeOpenTex,
gVolvagiaEyeHalfTex,
gVolvagiaEyeClosedTex,
};
static Gfx* sBodyDLists[] = { static Gfx* sBodyDLists[] = {
gVolvagiaBodySeg1DL, gVolvagiaBodySeg2DL, gVolvagiaBodySeg3DL, gVolvagiaBodySeg4DL, gVolvagiaBodySeg5DL, gVolvagiaBodySeg1DL, gVolvagiaBodySeg2DL, gVolvagiaBodySeg3DL, gVolvagiaBodySeg4DL, gVolvagiaBodySeg5DL,

View file

@ -1188,7 +1188,7 @@ void BossFd2_DrawMane(BossFd2* this, GlobalContext* globalCtx) {
} }
void BossFd2_Draw(Actor* thisx, GlobalContext* globalCtx) { void BossFd2_Draw(Actor* thisx, GlobalContext* globalCtx) {
static u64* eyeTextures[] = { gHoleVolvagiaEyeOpenTex, gHoleVolvagiaEyeHalfTex, gHoleVolvagiaEyeClosedTex }; static void* eyeTextures[] = { gHoleVolvagiaEyeOpenTex, gHoleVolvagiaEyeHalfTex, gHoleVolvagiaEyeClosedTex };
s32 pad; s32 pad;
BossFd2* this = THIS; BossFd2* this = THIS;

View file

@ -182,22 +182,22 @@ static u8 sDecayMaskTotal[16 * 16] = {
// clang-format on // clang-format on
// These are Phantom Ganon's body textures, but I don't know which is which. // These are Phantom Ganon's body textures, but I don't know which is which.
static u64* sLimbTex_rgba16_8x8[] = { static void* sLimbTex_rgba16_8x8[] = {
gPhantomGanonLimbTex_00A800, gPhantomGanonLimbTex_00AE80, gPhantomGanonLimbTex_00AF00, gPhantomGanonLimbTex_00A800, gPhantomGanonLimbTex_00AE80, gPhantomGanonLimbTex_00AF00,
gPhantomGanonLimbTex_00C180, gPhantomGanonLimbTex_00C400, gPhantomGanonLimbTex_00C180, gPhantomGanonLimbTex_00C400,
}; };
static u64* sLimbTex_rgba16_16x8[] = { static void* sLimbTex_rgba16_16x8[] = {
gPhantomGanonLimbTex_00B980, gPhantomGanonLimbTex_00C480, gPhantomGanonLimbTex_00BC80, gPhantomGanonLimbTex_00B980, gPhantomGanonLimbTex_00C480, gPhantomGanonLimbTex_00BC80,
gPhantomGanonLimbTex_00BD80, gPhantomGanonLimbTex_00C080, gPhantomGanonLimbTex_00BD80, gPhantomGanonLimbTex_00C080,
}; };
static u64* sLimbTex_rgba16_16x16[] = { static void* sLimbTex_rgba16_16x16[] = {
gPhantomGanonLimbTex_00C200, gPhantomGanonLimbTex_00A000, gPhantomGanonLimbTex_00A200, gPhantomGanonLimbTex_00C200, gPhantomGanonLimbTex_00A000, gPhantomGanonLimbTex_00A200,
gPhantomGanonLimbTex_00A400, gPhantomGanonLimbTex_00A600, gPhantomGanonLimbTex_00A880, gPhantomGanonLimbTex_00A400, gPhantomGanonLimbTex_00A600, gPhantomGanonLimbTex_00A880,
gPhantomGanonLimbTex_00B780, gPhantomGanonLimbTex_00BA80, gPhantomGanonLimbTex_00BE80, gPhantomGanonLimbTex_00B780, gPhantomGanonLimbTex_00BA80, gPhantomGanonLimbTex_00BE80,
}; };
static u64* sLimbTex_rgba16_16x32[] = { gPhantomGanonLimbTex_00AA80, gPhantomGanonLimbTex_00AF80 }; static void* sLimbTex_rgba16_16x32[] = { gPhantomGanonLimbTex_00AA80, gPhantomGanonLimbTex_00AF80 };
static u64* sMouthTex_ci8_16x16[] = { gPhantomGanonMouthTex, gPhantomGanonSmileTex }; static void* sMouthTex_ci8_16x16[] = { gPhantomGanonMouthTex, gPhantomGanonSmileTex };
static InitChainEntry sInitChain[] = { static InitChainEntry sInitChain[] = {
ICHAIN_U8(targetMode, 5, ICHAIN_CONTINUE), ICHAIN_U8(targetMode, 5, ICHAIN_CONTINUE),

View file

@ -334,7 +334,7 @@ void BossMo_Init(Actor* thisx, GlobalContext* globalCtx2) {
Flags_SetSwitch(globalCtx, 0x14); Flags_SetSwitch(globalCtx, 0x14);
sMorphaCore = this; sMorphaCore = this;
MO_WATER_LEVEL(globalCtx) = this->waterLevel = MO_WATER_LEVEL(globalCtx); MO_WATER_LEVEL(globalCtx) = this->waterLevel = MO_WATER_LEVEL(globalCtx);
globalCtx->unk_11D30[0] = 0xA0; globalCtx->roomCtx.unk_74[0] = 0xA0;
globalCtx->specialEffects = sEffects; globalCtx->specialEffects = sEffects;
for (i = 0; i < ARRAY_COUNT(sEffects); i++) { for (i = 0; i < ARRAY_COUNT(sEffects); i++) {
sEffects[i].type = MO_FX_NONE; sEffects[i].type = MO_FX_NONE;
@ -354,7 +354,7 @@ void BossMo_Init(Actor* thisx, GlobalContext* globalCtx2) {
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, 0.0f, -280.0f, 0.0f, 0, Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, 0.0f, -280.0f, 0.0f, 0,
0, 0, -1); 0, 0, -1);
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART, -200.0f, -280.0f, 0.0f, 0, 0, 0, 0); Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_B_HEART, -200.0f, -280.0f, 0.0f, 0, 0, 0, 0);
globalCtx->unk_11D30[0] = 0xFF; globalCtx->roomCtx.unk_74[0] = 0xFF;
MO_WATER_LEVEL(globalCtx) = -500; MO_WATER_LEVEL(globalCtx) = -500;
return; return;
} }
@ -1698,9 +1698,9 @@ void BossMo_DeathCs(BossMo* this, GlobalContext* globalCtx) {
} }
} }
if (sMorphaCore->waterLevel < -200.0f) { if (sMorphaCore->waterLevel < -200.0f) {
globalCtx->unk_11D30[0]++; globalCtx->roomCtx.unk_74[0]++;
if (globalCtx->unk_11D30[0] >= 0xFF) { if (globalCtx->roomCtx.unk_74[0] >= 0xFF) {
globalCtx->unk_11D30[0] = 0xFF; globalCtx->roomCtx.unk_74[0] = 0xFF;
} }
} }
if (sMorphaCore->waterLevel < -250.0f) { if (sMorphaCore->waterLevel < -250.0f) {

View file

@ -19,8 +19,8 @@ static s32 sUnused = 0;
#include "z_demo_du_cutscene_data.c" EARLY #include "z_demo_du_cutscene_data.c" EARLY
static u64* sEyeTextures[] = { gDaruniaEyeOpenTex, gDaruniaEyeOpeningTex, gDaruniaEyeShutTex, gDaruniaEyeClosingTex }; static void* sEyeTextures[] = { gDaruniaEyeOpenTex, gDaruniaEyeOpeningTex, gDaruniaEyeShutTex, gDaruniaEyeClosingTex };
static u64* sMouthTextures[] = { gDaruniaMouthSeriousTex, gDaruniaMouthGrinningTex, gDaruniaMouthOpenTex, static void* sMouthTextures[] = { gDaruniaMouthSeriousTex, gDaruniaMouthGrinningTex, gDaruniaMouthOpenTex,
gDaruniaMouthHappyTex }; gDaruniaMouthHappyTex };
/** /**
@ -798,10 +798,10 @@ void DemoDu_Draw_02(Actor* thisx, GlobalContext* globalCtx2) {
GlobalContext* globalCtx = globalCtx2; GlobalContext* globalCtx = globalCtx2;
DemoDu* this = THIS; DemoDu* this = THIS;
s16 eyeTexIndex = this->eyeTexIndex; s16 eyeTexIndex = this->eyeTexIndex;
u64* eyeTexture = sEyeTextures[eyeTexIndex]; void* eyeTexture = sEyeTextures[eyeTexIndex];
s32 pad; s32 pad;
s16 mouthTexIndex = this->mouthTexIndex; s16 mouthTexIndex = this->mouthTexIndex;
u64* mouthTexture = sMouthTextures[mouthTexIndex]; void* mouthTexture = sMouthTextures[mouthTexIndex];
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_du_inKenjyanomaDemo02.c", 275); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_du_inKenjyanomaDemo02.c", 275);
@ -993,10 +993,10 @@ void DemoDu_Draw_01(Actor* thisx, GlobalContext* globalCtx2) {
GlobalContext* globalCtx = globalCtx2; GlobalContext* globalCtx = globalCtx2;
DemoDu* this = THIS; DemoDu* this = THIS;
s16 eyeTexIndex = this->eyeTexIndex; s16 eyeTexIndex = this->eyeTexIndex;
u64* eyeTexture = sEyeTextures[eyeTexIndex]; void* eyeTexture = sEyeTextures[eyeTexIndex];
s32 pad; s32 pad;
s16 mouthTexIndex = this->mouthTexIndex; s16 mouthTexIndex = this->mouthTexIndex;
u64* mouthTexture = sMouthTextures[mouthTexIndex]; void* mouthTexture = sMouthTextures[mouthTexIndex];
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_du.c", 615); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_du.c", 615);

View file

@ -52,7 +52,7 @@ void func_80987330(DemoIm* this, GlobalContext* globalCtx);
void func_8098764C(DemoIm* this, GlobalContext* globalCtx); void func_8098764C(DemoIm* this, GlobalContext* globalCtx);
void func_80987658(DemoIm* this, GlobalContext* globalCtx); void func_80987658(DemoIm* this, GlobalContext* globalCtx);
static UNK_PTR D_80987830[] = { static void* D_80987830[] = {
0x06007210, 0x06007210,
0x06007D50, 0x06007D50,
0x06008150, 0x06008150,
@ -530,7 +530,7 @@ void func_80985C94(DemoIm* this, GlobalContext* globalCtx) {
void func_80985CE8(DemoIm* this, GlobalContext* globalCtx) { void func_80985CE8(DemoIm* this, GlobalContext* globalCtx) {
s32 pad[2]; s32 pad[2];
s16 unk_25C = this->unk_25C; s16 unk_25C = this->unk_25C;
UNK_PTR sp68 = D_80987830[unk_25C]; void* sp68 = D_80987830[unk_25C];
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_im_inKenjyanomaDemo02.c", 281); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_im_inKenjyanomaDemo02.c", 281);
@ -1190,7 +1190,7 @@ void func_8098764C(DemoIm* this, GlobalContext* globalCtx) {
void func_80987658(DemoIm* this, GlobalContext* globalCtx) { void func_80987658(DemoIm* this, GlobalContext* globalCtx) {
s32 pad[2]; s32 pad[2];
s16 unk_25C = this->unk_25C; s16 unk_25C = this->unk_25C;
UNK_PTR sp68 = D_80987830[unk_25C]; void* sp68 = D_80987830[unk_25C];
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_im.c", 904); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_im.c", 904);

View file

@ -245,7 +245,7 @@ void DemoKankyo_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0,
0x0000); 0x0000);
} else { } else {
globalCtx->unk_11D30[1] = 0xFF; globalCtx->roomCtx.unk_74[1] = 0xFF;
Actor_Kill(&this->actor); Actor_Kill(&this->actor);
} }
break; break;

View file

@ -61,11 +61,11 @@ typedef enum {
/* 4 */ SARIA_MOUTH_FROWNING /* 4 */ SARIA_MOUTH_FROWNING
} SariaMouthState; } SariaMouthState;
static u64* sEyeTextures[] = { static void* sEyeTextures[] = {
gSariaEyeOpenTex, gSariaEyeHalfTex, gSariaEyeClosedTex, gSariaEyeSuprisedTex, gSariaEyeSadTex, gSariaEyeOpenTex, gSariaEyeHalfTex, gSariaEyeClosedTex, gSariaEyeSuprisedTex, gSariaEyeSadTex,
}; };
static u64* sMouthTextures[] = { static void* sMouthTextures[] = {
gSariaMouthClosed2Tex, gSariaMouthSuprisedTex, gSariaMouthClosedTex, gSariaMouthClosed2Tex, gSariaMouthSuprisedTex, gSariaMouthClosedTex,
gSariaMouthSmilingOpenTex, gSariaMouthFrowningTex, gSariaMouthSmilingOpenTex, gSariaMouthFrowningTex,
}; };
@ -457,10 +457,10 @@ void func_8098F16C(DemoSa* this, GlobalContext* globalCtx) {
void DemoSa_DrawXlu(DemoSa* this, GlobalContext* globalCtx) { void DemoSa_DrawXlu(DemoSa* this, GlobalContext* globalCtx) {
s32 pad[2]; s32 pad[2];
s16 eyeIndex = this->eyeIndex; s16 eyeIndex = this->eyeIndex;
UNK_PTR sp78 = sEyeTextures[eyeIndex]; void* sp78 = sEyeTextures[eyeIndex];
s16 mouthIndex = this->mouthIndex; s16 mouthIndex = this->mouthIndex;
s32 pad2; s32 pad2;
UNK_PTR sp6C = sMouthTextures[mouthIndex]; void* sp6C = sMouthTextures[mouthIndex];
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_sa_inKenjyanomaDemo02.c", 296); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_sa_inKenjyanomaDemo02.c", 296);
@ -795,10 +795,10 @@ void DemoSa_DrawNothing(DemoSa* this, GlobalContext* globalCtx) {
void DemoSa_DrawOpa(DemoSa* this, GlobalContext* globalCtx) { void DemoSa_DrawOpa(DemoSa* this, GlobalContext* globalCtx) {
s32 pad[2]; s32 pad[2];
s16 eyeIndex = this->eyeIndex; s16 eyeIndex = this->eyeIndex;
UNK_PTR eyeTex = sEyeTextures[eyeIndex]; void* eyeTex = sEyeTextures[eyeIndex];
s32 pad2; s32 pad2;
s16 mouthIndex = this->mouthIndex; s16 mouthIndex = this->mouthIndex;
UNK_PTR mouthTex = sMouthTextures[mouthIndex]; void* mouthTex = sMouthTextures[mouthIndex];
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_sa.c", 602); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_sa.c", 602);

View file

@ -496,7 +496,7 @@ void DoorKiller_Update(Actor* thisx, GlobalContext* globalCtx) {
void DoorKiller_SetTexture(Actor* thisx, GlobalContext* globalCtx) { void DoorKiller_SetTexture(Actor* thisx, GlobalContext* globalCtx) {
DoorKiller* this = THIS; DoorKiller* this = THIS;
u64* doorTexture = this->texture; void* doorTexture = this->texture;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_door_killer.c", 883); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_door_killer.c", 883);
gSPSegment(POLY_OPA_DISP++, 0x08, doorTexture); gSPSegment(POLY_OPA_DISP++, 0x08, doorTexture);

View file

@ -11,7 +11,7 @@
typedef struct { typedef struct {
/* 0x00 */ s16 objectId; /* 0x00 */ s16 objectId;
/* 0x04 */ u64* texture; /* 0x04 */ void* texture;
} DoorKillerTextureEntry; // size 0x8 } DoorKillerTextureEntry; // size 0x8
struct DoorKiller; struct DoorKiller;
@ -25,7 +25,7 @@ typedef struct DoorKiller {
/* 0x0191 */ u8 playerIsOpening; // Must be at same offset as playerIsOpening in EnDoor /* 0x0191 */ u8 playerIsOpening; // Must be at same offset as playerIsOpening in EnDoor
/* 0x0192 */ Vec3s jointTable[9]; /* 0x0192 */ Vec3s jointTable[9];
/* 0x01C8 */ ColliderCylinder colliderCylinder; /* 0x01C8 */ ColliderCylinder colliderCylinder;
/* 0x0214 */ u64* texture; /* 0x0214 */ void* texture;
/* 0x0218 */ u16 hasHitPlayerOrGround; /* 0x0218 */ u16 hasHitPlayerOrGround;
/* 0x021A */ u16 timer; /* 0x021A */ u16 timer;
/* 0x021C */ u8 doorObjBankIndex; /* 0x021C */ u8 doorObjBankIndex;

View file

@ -158,7 +158,7 @@ static Gfx* sJabuDoorDLists[] = {
}; };
// boss door textures? // boss door textures?
static UNK_PTR D_809982D4[] = { static void* D_809982D4[] = {
0x060065C0, 0x060035C0, 0x060055C0, 0x060045C0, 0x06000000, 0x060025C0, 0x060015C0, 0x060065C0, 0x060035C0, 0x060055C0, 0x060045C0, 0x06000000, 0x060025C0, 0x060015C0,
}; };
@ -168,7 +168,7 @@ void DoorShutter_SetupAction(DoorShutter* this, DoorShutterActionFunc actionFunc
} }
s32 DoorShutter_SetupDoor(DoorShutter* this, GlobalContext* globalCtx) { s32 DoorShutter_SetupDoor(DoorShutter* this, GlobalContext* globalCtx) {
TransitionActorEntry* transitionEntry = &globalCtx->transitionActorList[(u16)this->dyna.actor.params >> 0xA]; TransitionActorEntry* transitionEntry = &globalCtx->transiActorCtx.list[(u16)this->dyna.actor.params >> 0xA];
s8 frontRoom = transitionEntry->sides[0].room; s8 frontRoom = transitionEntry->sides[0].room;
s32 doorType = this->doorType; s32 doorType = this->doorType;
ShutterObjectInfo* temp_t0 = &sObjectInfo[this->unk_16B]; ShutterObjectInfo* temp_t0 = &sObjectInfo[this->unk_16B];
@ -275,7 +275,7 @@ void DoorShutter_Destroy(Actor* thisx, GlobalContext* globalCtx) {
if (this->dyna.actor.room >= 0) { if (this->dyna.actor.room >= 0) {
s32 transitionActorId = (u16)this->dyna.actor.params >> 0xA; s32 transitionActorId = (u16)this->dyna.actor.params >> 0xA;
globalCtx->transitionActorList[transitionActorId].id *= -1; globalCtx->transiActorCtx.list[transitionActorId].id *= -1;
} }
} }
@ -534,7 +534,7 @@ void func_80997220(DoorShutter* this, GlobalContext* globalCtx) {
func_8002DBD0(&this->dyna.actor, &vec, &player->actor.world.pos); func_8002DBD0(&this->dyna.actor, &vec, &player->actor.world.pos);
this->dyna.actor.room = this->dyna.actor.room =
globalCtx->transitionActorList[(u16)this->dyna.actor.params >> 0xA].sides[(vec.z < 0.0f) ? 0 : 1].room; globalCtx->transiActorCtx.list[(u16)this->dyna.actor.params >> 0xA].sides[(vec.z < 0.0f) ? 0 : 1].room;
if (room != this->dyna.actor.room) { if (room != this->dyna.actor.room) {
Room tempRoom = globalCtx->roomCtx.curRoom; Room tempRoom = globalCtx->roomCtx.curRoom;
@ -721,7 +721,7 @@ void DoorShutter_Draw(Actor* thisx, GlobalContext* globalCtx) {
} else { } else {
if (sp70->b != NULL) { if (sp70->b != NULL) {
TransitionActorEntry* transitionEntry = TransitionActorEntry* transitionEntry =
&globalCtx->transitionActorList[(u16)this->dyna.actor.params >> 0xA]; &globalCtx->transiActorCtx.list[(u16)this->dyna.actor.params >> 0xA];
if (globalCtx->roomCtx.prevRoom.num >= 0 || if (globalCtx->roomCtx.prevRoom.num >= 0 ||
transitionEntry->sides[0].room == transitionEntry->sides[1].room) { transitionEntry->sides[0].room == transitionEntry->sides[1].room) {

View file

@ -313,13 +313,12 @@ void EnAni_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
} }
} }
static u64* sEyeTextures[] = { void EnAni_Draw(Actor* thisx, GlobalContext* globalCtx) {
static void* eyeTextures[] = {
gRoofManEyeOpenTex, gRoofManEyeOpenTex,
gRoofManEyeHalfTex, gRoofManEyeHalfTex,
gRoofManEyeClosedTex, gRoofManEyeClosedTex,
}; };
void EnAni_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnAni* this = THIS; EnAni* this = THIS;
s32 pad; s32 pad;
@ -327,7 +326,7 @@ void EnAni_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800943C8(globalCtx->state.gfxCtx); func_800943C8(globalCtx->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIndex])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnAni_OverrideLimbDraw, EnAni_PostLimbDraw, this); EnAni_OverrideLimbDraw, EnAni_PostLimbDraw, this);

View file

@ -215,9 +215,10 @@ void EnAnubiceFire_Update(Actor* thisx, GlobalContext* globalCtx) {
} }
} }
static u64* D_809B3270[] = { gDust4Tex, gDust5Tex, gDust6Tex, gDust7Tex, gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex };
void EnAnubiceFire_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnAnubiceFire_Draw(Actor* thisx, GlobalContext* globalCtx) {
static void* D_809B3270[] = {
gDust4Tex, gDust5Tex, gDust6Tex, gDust7Tex, gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex,
};
EnAnubiceFire* this = THIS; EnAnubiceFire* this = THIS;
s32 pad[2]; s32 pad[2];
s32 i; s32 i;

View file

@ -523,9 +523,8 @@ s32 EnBomBowlMan_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx**
return false; return false;
} }
static u64* eyeTextures[3] = { gChuGirlEyeOpenTex, gChuGirlEyeHalfTex, gChuGirlEyeClosedTex };
void EnBomBowlMan_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnBomBowlMan_Draw(Actor* thisx, GlobalContext* globalCtx) {
static void* eyeTextures[] = { gChuGirlEyeOpenTex, gChuGirlEyeHalfTex, gChuGirlEyeClosedTex };
EnBomBowlMan* this = THIS; EnBomBowlMan* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_bom_bowl_man.c", 907); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_bom_bowl_man.c", 907);

View file

@ -198,7 +198,7 @@ void EnBx_Update(Actor* thisx, GlobalContext* globalCtx) {
} }
void EnBx_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnBx_Draw(Actor* thisx, GlobalContext* globalCtx) {
static UNK_PTR D_809D2560[] = { 0x060024F0, 0x060027F0, 0x060029F0 }; static void* D_809D2560[] = { 0x060024F0, 0x060027F0, 0x060029F0 };
EnBx* this = THIS; EnBx* this = THIS;
s32 pad; s32 pad;
Mtx* mtx = Graph_Alloc(globalCtx->state.gfxCtx, 4 * sizeof(Mtx)); Mtx* mtx = Graph_Alloc(globalCtx->state.gfxCtx, 4 * sizeof(Mtx));

View file

@ -448,7 +448,7 @@ void EnCs_Update(Actor* thisx, GlobalContext* globalCtx) {
} }
void EnCs_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnCs_Draw(Actor* thisx, GlobalContext* globalCtx) {
static u64* eyeTextures[] = { static void* eyeTextures[] = {
gGraveyardKidEyesOpenTex, gGraveyardKidEyesOpenTex,
gGraveyardKidEyesHalfTex, gGraveyardKidEyesHalfTex,
gGraveyardKidEyesClosedTex, gGraveyardKidEyesClosedTex,

View file

@ -70,7 +70,7 @@ static ColliderCylinderInit sCylinderInit = {
{ 10, 10, 0, { 0, 0, 0 } }, { 10, 10, 0, { 0, 0, 0 } },
}; };
static u64* sEyeTextures[] = { static void* sEyeTextures[] = {
gZoraEyeOpenTex, gZoraEyeOpenTex,
gZoraEyeHalfTex, gZoraEyeHalfTex,
gZoraEyeClosedTex, gZoraEyeClosedTex,

View file

@ -136,7 +136,7 @@ void EnDoor_Destroy(Actor* thisx, GlobalContext* globalCtx) {
TransitionActorEntry* transitionEntry; TransitionActorEntry* transitionEntry;
EnDoor* this = THIS; EnDoor* this = THIS;
transitionEntry = &globalCtx->transitionActorList[(u16)this->actor.params >> 0xA]; transitionEntry = &globalCtx->transiActorCtx.list[(u16)this->actor.params >> 0xA];
if (transitionEntry->id < 0) { if (transitionEntry->id < 0) {
transitionEntry->id = -transitionEntry->id; transitionEntry->id = -transitionEntry->id;
} }
@ -307,7 +307,7 @@ s32 EnDoor_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
if (limbIndex == 4) { if (limbIndex == 4) {
temp_a2 = D_809FCEE4[this->dListIndex]; temp_a2 = D_809FCEE4[this->dListIndex];
transitionEntry = &globalCtx->transitionActorList[(u16)this->actor.params >> 0xA]; transitionEntry = &globalCtx->transiActorCtx.list[(u16)this->actor.params >> 0xA];
rot->z += this->actor.world.rot.y; rot->z += this->actor.world.rot.y;
if ((globalCtx->roomCtx.prevRoom.num >= 0) || if ((globalCtx->roomCtx.prevRoom.num >= 0) ||
(transitionEntry->sides[0].room == transitionEntry->sides[1].room)) { (transitionEntry->sides[0].room == transitionEntry->sides[1].room)) {

View file

@ -587,19 +587,29 @@ void EnDu_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
} }
void EnDu_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnDu_Draw(Actor* thisx, GlobalContext* globalCtx) {
static u64* sEyeTextures[] = { gDaruniaEyeOpenTex, gDaruniaEyeOpeningTex, gDaruniaEyeShutTex, static void* eyeTextures[] = {
gDaruniaEyeClosingTex }; gDaruniaEyeOpenTex,
static u64* sMouthTextures[] = { gDaruniaMouthSeriousTex, gDaruniaMouthGrinningTex, gDaruniaMouthOpenTex, gDaruniaEyeOpeningTex,
gDaruniaMouthHappyTex }; gDaruniaEyeShutTex,
static u64* sNoseTextures[] = { gDaruniaNoseSeriousTex, gDaruniaNoseHappyTex }; gDaruniaEyeClosingTex,
};
static void* mouthTextures[] = {
gDaruniaMouthSeriousTex,
gDaruniaMouthGrinningTex,
gDaruniaMouthOpenTex,
gDaruniaMouthHappyTex,
};
static void* noseTextures[] = {
gDaruniaNoseSeriousTex,
gDaruniaNoseHappyTex,
};
EnDu* this = THIS; EnDu* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_du.c", 1470); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_du.c", 1470);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeTexIndex])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeTexIndex]));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[this->mouthTexIndex])); gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(mouthTextures[this->mouthTexIndex]));
gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(sNoseTextures[this->noseTexIndex])); gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(noseTextures[this->noseTexIndex]));
func_80034BA0(globalCtx, &this->skelAnime, EnDu_OverrideLimbDraw, EnDu_PostLimbDraw, &this->actor, 255); func_80034BA0(globalCtx, &this->skelAnime, EnDu_OverrideLimbDraw, EnDu_PostLimbDraw, &this->actor, 255);

View file

@ -377,11 +377,10 @@ void EnExRuppy_Update(Actor* thisx, GlobalContext* globalCtx) {
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1C); Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, 20.0f, 50.0f, 0x1C);
} }
UNK_PTR D_80A0B3B8[] = { void EnExRuppy_Draw(Actor* thisx, GlobalContext* globalCtx) {
static void* rupeeTextures[] = {
gRupeeGreenTex, gRupeeBlueTex, gRupeeRedTex, gRupeePinkTex, gRupeeOrangeTex, gRupeeGreenTex, gRupeeBlueTex, gRupeeRedTex, gRupeePinkTex, gRupeeOrangeTex,
}; };
void EnExRuppy_Draw(Actor* thisx, GlobalContext* globalCtx) {
s32 pad; s32 pad;
EnExRuppy* this = THIS; EnExRuppy* this = THIS;
@ -392,7 +391,7 @@ void EnExRuppy_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_8002EBCC(thisx, globalCtx, 0); func_8002EBCC(thisx, globalCtx, 0);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ex_ruppy.c", 780), gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ex_ruppy.c", 780),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_80A0B3B8[this->colorIdx])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(rupeeTextures[this->colorIdx]));
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL); gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ex_ruppy.c", 784); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ex_ruppy.c", 784);

View file

@ -867,7 +867,7 @@ void EnFd_UpdateDots(EnFd* this) {
} }
void EnFd_DrawFlames(EnFd* this, GlobalContext* globalCtx) { void EnFd_DrawFlames(EnFd* this, GlobalContext* globalCtx) {
static UNK_PTR D_80A0E0F8[] = { static void* dustTextures[] = {
gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex, gDust4Tex, gDust3Tex, gDust2Tex, gDust1Tex, gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex, gDust4Tex, gDust3Tex, gDust2Tex, gDust1Tex,
}; };
s32 firstDone; s32 firstDone;
@ -895,7 +895,7 @@ void EnFd_DrawFlames(EnFd* this, GlobalContext* globalCtx) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fd.c", 2006), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fd.c", 2006),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
idx = eff->timer * (8.0f / eff->initialTimer); idx = eff->timer * (8.0f / eff->initialTimer);
gSPSegment(POLY_XLU_DISP++, 0x8, SEGMENTED_TO_VIRTUAL(D_80A0E0F8[idx])); gSPSegment(POLY_XLU_DISP++, 0x8, SEGMENTED_TO_VIRTUAL(dustTextures[idx]));
gSPDisplayList(POLY_XLU_DISP++, gFlareDancerSquareParticleDL); gSPDisplayList(POLY_XLU_DISP++, gFlareDancerSquareParticleDL);
} }
} }

View file

@ -693,7 +693,7 @@ void EnFhgFire_Update(Actor* thisx, GlobalContext* globalCtx) {
this->updateFunc(this, globalCtx); this->updateFunc(this, globalCtx);
} }
static u64* sDustTextures[] = { static void* sDustTextures[] = {
gDust1Tex, gDust2Tex, gDust3Tex, gDust4Tex, gDust5Tex, gDust6Tex, gDust7Tex, gDust8Tex, gDust1Tex, gDust2Tex, gDust3Tex, gDust4Tex, gDust5Tex, gDust6Tex, gDust7Tex, gDust8Tex,
}; };

View file

@ -1058,7 +1058,7 @@ void EnFr_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
} }
void EnFr_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnFr_Draw(Actor* thisx, GlobalContext* globalCtx) {
static u64* eyeTextures[] = { 0x060059A0, 0x06005BA0 }; static void* eyeTextures[] = { 0x060059A0, 0x06005BA0 };
s16 lightRadius; s16 lightRadius;
EnFr* this = THIS; EnFr* this = THIS;
s16 frogIndex = this->actor.params - 1; s16 frogIndex = this->actor.params - 1;

View file

@ -444,7 +444,7 @@ void EnFw_UpdateDust(EnFw* this) {
} }
void EnFw_DrawDust(EnFw* this, GlobalContext* globalCtx) { void EnFw_DrawDust(EnFw* this, GlobalContext* globalCtx) {
static UNK_PTR D_80A1FC18[] = { static void* dustTextures[] = {
gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex, gDust4Tex, gDust3Tex, gDust2Tex, gDust1Tex, gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex, gDust4Tex, gDust3Tex, gDust2Tex, gDust1Tex,
}; };
EnFwEffect* eff = this->effects; EnFwEffect* eff = this->effects;
@ -477,7 +477,7 @@ void EnFw_DrawDust(EnFw* this, GlobalContext* globalCtx) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fw.c", 1229), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_fw.c", 1229),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
idx = eff->timer * (8.0f / eff->initialTimer); idx = eff->timer * (8.0f / eff->initialTimer);
gSPSegment(POLY_XLU_DISP++, 0x8, SEGMENTED_TO_VIRTUAL(D_80A1FC18[idx])); gSPSegment(POLY_XLU_DISP++, 0x8, SEGMENTED_TO_VIRTUAL(dustTextures[idx]));
gSPDisplayList(POLY_XLU_DISP++, &gFlareDancerSquareParticleDL); gSPDisplayList(POLY_XLU_DISP++, &gFlareDancerSquareParticleDL);
} }
} }

View file

@ -467,8 +467,9 @@ void EnGSwitch_DrawPot(Actor* thisx, GlobalContext* globalCtx) {
} }
} }
static UNK_PTR sRupeeTex[] = { gRupeeGreenTex, gRupeeBlueTex, gRupeeRedTex, static void* sRupeeTextures[] = {
gRupeePinkTex, gRupeeOrangeTex, gRupeeSilverTex }; gRupeeGreenTex, gRupeeBlueTex, gRupeeRedTex, gRupeePinkTex, gRupeeOrangeTex, gRupeeSilverTex,
};
void EnGSwitch_DrawRupee(Actor* thisx, GlobalContext* globalCtx) { void EnGSwitch_DrawRupee(Actor* thisx, GlobalContext* globalCtx) {
s32 pad; s32 pad;
@ -481,7 +482,7 @@ void EnGSwitch_DrawRupee(Actor* thisx, GlobalContext* globalCtx) {
func_8002EBCC(&this->actor, globalCtx, 0); func_8002EBCC(&this->actor, globalCtx, 0);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_g_switch.c", 957), gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_g_switch.c", 957),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRupeeTex[this->colorIdx])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRupeeTextures[this->colorIdx]));
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL); gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_g_switch.c", 961); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_g_switch.c", 961);
} }
@ -565,7 +566,7 @@ void EnGSwitch_DrawEffects(EnGSwitch* this, GlobalContext* globalCtx) {
Matrix_RotateZ(effect->rot.z, MTXMODE_APPLY); Matrix_RotateZ(effect->rot.z, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_g_switch.c", 1088), gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_g_switch.c", 1088),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRupeeTex[effect->colorIdx])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sRupeeTextures[effect->colorIdx]));
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL); gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
} }
} }

View file

@ -11,7 +11,7 @@ typedef void (*EnGbActionFunc)(struct EnGb*, GlobalContext*);
typedef struct { typedef struct {
/* 0x00 */ Color_RGBA8 prim; /* 0x00 */ Color_RGBA8 prim;
/* 0x04 */ Color_RGBA8 env; /* 0x04 */ Color_RGBA8 env;
/* 0x08 */ u64* texture; /* 0x08 */ void* texture;
/* 0x0C */ s16 timerMultiplier; /* 0x0C */ s16 timerMultiplier;
} EnGbCagedSoulInfo; // size = 0x10 } EnGbCagedSoulInfo; // size = 0x10

View file

@ -81,7 +81,7 @@ static Gfx* sHairstyleDLists[] = {
static Vec3f D_80A327A8 = { 600.0f, 700.0f, 0.0f }; static Vec3f D_80A327A8 = { 600.0f, 700.0f, 0.0f };
static u64* sEyeTextures[] = { static void* sEyeTextures[] = {
gGerudoWhiteEyeOpenTex, gGerudoWhiteEyeOpenTex,
gGerudoWhiteEyeHalfTex, gGerudoWhiteEyeHalfTex,
gGerudoWhiteEyeClosedTex, gGerudoWhiteEyeClosedTex,

View file

@ -642,20 +642,15 @@ void EnGe2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
} }
} }
static u64* sEyeTextures[] = {
gGerudoPurpleEyeOpenTex,
gGerudoPurpleEyeHalfTex,
gGerudoPurpleEyeClosedTex,
};
void EnGe2_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnGe2_Draw(Actor* thisx, GlobalContext* globalCtx) {
static void* eyeTextures[] = { gGerudoPurpleEyeOpenTex, gGerudoPurpleEyeHalfTex, gGerudoPurpleEyeClosedTex };
s32 pad; s32 pad;
EnGe2* this = THIS; EnGe2* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ge2.c", 1274); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ge2.c", 1274);
func_800943C8(globalCtx->state.gfxCtx); func_800943C8(globalCtx->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIndex])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
func_8002EBCC(&this->actor, globalCtx, 0); func_8002EBCC(&this->actor, globalCtx, 0);
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnGe2_OverrideLimbDraw, EnGe2_PostLimbDraw, this); EnGe2_OverrideLimbDraw, EnGe2_PostLimbDraw, this);

View file

@ -276,20 +276,19 @@ void EnGe3_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
} }
} }
static u64* sEyeTextures[] = { void EnGe3_Draw(Actor* thisx, GlobalContext* globalCtx2) {
static void* eyeTextures[] = {
0x06005FE8, // Half-open 0x06005FE8, // Half-open
0x060065A8, // Quarter-open 0x060065A8, // Quarter-open
0x06006D28, // Closed 0x06006D28, // Closed
}; };
void EnGe3_Draw(Actor* thisx, GlobalContext* globalCtx2) {
EnGe3* this = THIS; EnGe3* this = THIS;
GlobalContext* globalCtx = globalCtx2; GlobalContext* globalCtx = globalCtx2;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ge3.c", 614); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ge3.c", 614);
func_800943C8(globalCtx->state.gfxCtx); func_800943C8(globalCtx->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIndex])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
func_8002EBCC(&this->actor, globalCtx, 0); func_8002EBCC(&this->actor, globalCtx, 0);
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnGe3_OverrideLimbDraw, EnGe3_PostLimbDraw, this); EnGe3_OverrideLimbDraw, EnGe3_PostLimbDraw, this);

View file

@ -1543,7 +1543,7 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
{ 3000.0f, 0.0f, 1600.0f }, { 3000.0f, 0.0f, 1600.0f },
{ 3000.0f, 6000.0f, 1600.0f }, { 3000.0f, 6000.0f, 1600.0f },
}; };
static u64* eyeDLists[4] = { gGerudoRedEyeOpenTex, gGerudoRedEyeHalfTex, gGerudoRedEyeShutTex, static void* eyeTextures[] = { gGerudoRedEyeOpenTex, gGerudoRedEyeHalfTex, gGerudoRedEyeShutTex,
gGerudoRedEyeHalfTex }; gGerudoRedEyeHalfTex };
s32 pad; s32 pad;
EnGeldB* this = THIS; EnGeldB* this = THIS;
@ -1575,7 +1575,7 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
if ((this->action != GELDB_WAIT) || !this->invisible) { if ((this->action != GELDB_WAIT) || !this->invisible) {
func_80093D18(globalCtx->state.gfxCtx); func_80093D18(globalCtx->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeDLists[this->blinkState])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->blinkState]));
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnGeldB_OverrideLimbDraw, EnGeldB_PostLimbDraw, this); this->skelAnime.dListCount, EnGeldB_OverrideLimbDraw, EnGeldB_PostLimbDraw, this);
if (this->action == GELDB_BLOCK) { if (this->action == GELDB_BLOCK) {

View file

@ -318,7 +318,7 @@ void func_80A3E090(EnGm* this) {
} }
void EnGm_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnGm_Draw(Actor* thisx, GlobalContext* globalCtx) {
static UNK_PTR eyeTextures[] = { gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex }; static void* eyeTextures[] = { gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex };
EnGm* this = THIS; EnGm* this = THIS;
s32 pad; s32 pad;

View file

@ -1200,7 +1200,7 @@ void EnGo_UpdateDust(EnGo* this) {
} }
void EnGo_DrawDust(EnGo* this, GlobalContext* globalCtx) { void EnGo_DrawDust(EnGo* this, GlobalContext* globalCtx) {
static u64* dustTex[] = { gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex, gDust4Tex, gDust3Tex, gDust2Tex, gDust1Tex }; static void* dustTex[] = { gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex, gDust4Tex, gDust3Tex, gDust2Tex, gDust1Tex };
EnGoEffect* dustEffect = this->dustEffects; EnGoEffect* dustEffect = this->dustEffects;
s16 alpha; s16 alpha;
s16 firstDone; s16 firstDone;

View file

@ -66,7 +66,7 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, GlobalContext* globalCtx);
void EnGo2_GoronLinkStopRolling(EnGo2* this, GlobalContext* globalCtx); void EnGo2_GoronLinkStopRolling(EnGo2* this, GlobalContext* globalCtx);
void EnGo2_GoronFireGenericAction(EnGo2* this, GlobalContext* globalCtx); void EnGo2_GoronFireGenericAction(EnGo2* this, GlobalContext* globalCtx);
static u64* sDustTex[] = { gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex, gDust4Tex, gDust3Tex, gDust2Tex, gDust1Tex }; static void* sDustTex[] = { gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex, gDust4Tex, gDust3Tex, gDust2Tex, gDust1Tex };
static Vec3f sPos = { 0.0f, 0.0f, 0.0f }; static Vec3f sPos = { 0.0f, 0.0f, 0.0f };
static Vec3f sVelocity = { 0.0f, 0.0f, 0.0f }; static Vec3f sVelocity = { 0.0f, 0.0f, 0.0f };
@ -2021,8 +2021,8 @@ void EnGo2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
void EnGo2_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnGo2_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnGo2* this = THIS; EnGo2* this = THIS;
u64* eyeTextures[] = { gGoronCsEyeClosed2Tex, gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex }; void* eyeTextures[] = { gGoronCsEyeClosed2Tex, gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex };
u64* mouthTextures[] = { gGoronCsMouthNeutralTex, gGoronCsMouthSmileTex }; void* mouthTextures[] = { gGoronCsMouthNeutralTex, gGoronCsMouthSmileTex };
EnGo2_UpdateDust(this); EnGo2_UpdateDust(this);
Matrix_Push(); Matrix_Push();

View file

@ -50,12 +50,6 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(targetArrowOffset, 500, ICHAIN_STOP), ICHAIN_F32(targetArrowOffset, 500, ICHAIN_STOP),
}; };
static UNK_PTR D_80A50BA4[] = {
0x060005FC,
0x060006FC,
0x060007FC,
};
extern FlexSkeletonHeader D_060000F0; extern FlexSkeletonHeader D_060000F0;
extern AnimationHeader D_060042AC; extern AnimationHeader D_060042AC;
extern Gfx D_060059B0[]; extern Gfx D_060059B0[];
@ -224,6 +218,11 @@ s32 EnGuest_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
} }
void EnGuest_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnGuest_Draw(Actor* thisx, GlobalContext* globalCtx) {
static void* D_80A50BA4[] = {
0x060005FC,
0x060006FC,
0x060007FC,
};
EnGuest* this = THIS; EnGuest* this = THIS;
s32 pad; s32 pad;

View file

@ -118,7 +118,7 @@ void EnHoll_Init(Actor* thisx, GlobalContext* globalCtx) {
void EnHoll_Destroy(Actor* thisx, GlobalContext* globalCtx) { void EnHoll_Destroy(Actor* thisx, GlobalContext* globalCtx) {
s32 transitionActorIdx = (u16)thisx->params >> 0xA; s32 transitionActorIdx = (u16)thisx->params >> 0xA;
TransitionActorEntry* transitionEntry = &globalCtx->transitionActorList[transitionActorIdx]; TransitionActorEntry* transitionEntry = &globalCtx->transiActorCtx.list[transitionActorIdx];
transitionEntry->id = -transitionEntry->id; transitionEntry->id = -transitionEntry->id;
} }
@ -149,12 +149,12 @@ void func_80A58DD4(EnHoll* this, GlobalContext* globalCtx) {
transitionActorIdx = (u16)this->actor.params >> 0xA; transitionActorIdx = (u16)this->actor.params >> 0xA;
if (absZ > sHorizTriggerDists[phi_t0][1]) { if (absZ > sHorizTriggerDists[phi_t0][1]) {
if (globalCtx->roomCtx.prevRoom.num >= 0 && globalCtx->roomCtx.status == 0) { if (globalCtx->roomCtx.prevRoom.num >= 0 && globalCtx->roomCtx.status == 0) {
this->actor.room = globalCtx->transitionActorList[transitionActorIdx].sides[this->side].room; this->actor.room = globalCtx->transiActorCtx.list[transitionActorIdx].sides[this->side].room;
EnHoll_SwapRooms(globalCtx); EnHoll_SwapRooms(globalCtx);
func_80097534(globalCtx, &globalCtx->roomCtx); func_80097534(globalCtx, &globalCtx->roomCtx);
} }
} else { } else {
this->actor.room = globalCtx->transitionActorList[transitionActorIdx].sides[this->side ^ 1].room; this->actor.room = globalCtx->transiActorCtx.list[transitionActorIdx].sides[this->side ^ 1].room;
if (globalCtx->roomCtx.prevRoom.num < 0) { if (globalCtx->roomCtx.prevRoom.num < 0) {
func_8009728C(globalCtx, &globalCtx->roomCtx, this->actor.room); func_8009728C(globalCtx, &globalCtx->roomCtx, this->actor.room);
} else { } else {
@ -186,7 +186,7 @@ void func_80A59014(EnHoll* this, GlobalContext* globalCtx) {
(absZ = fabsf(vec.z), 100.0f > absZ && absZ > 50.0f))) { (absZ = fabsf(vec.z), 100.0f > absZ && absZ > 50.0f))) {
s32 transitionActorIdx = (u16)this->actor.params >> 0xA; s32 transitionActorIdx = (u16)this->actor.params >> 0xA;
s32 side = (vec.z < 0.0f) ? 0 : 1; s32 side = (vec.z < 0.0f) ? 0 : 1;
TransitionActorEntry* transitionEntry = &globalCtx->transitionActorList[transitionActorIdx]; TransitionActorEntry* transitionEntry = &globalCtx->transiActorCtx.list[transitionActorIdx];
s32 room = transitionEntry->sides[side].room; s32 room = transitionEntry->sides[side].room;
this->actor.room = room; this->actor.room = room;
@ -216,7 +216,7 @@ void func_80A591C0(EnHoll* this, GlobalContext* globalCtx) {
globalCtx->unk_11E18 = (s16)(605.0f - absY) * 0.5f; globalCtx->unk_11E18 = (s16)(605.0f - absY) * 0.5f;
} }
if (absY < 95.0f) { if (absY < 95.0f) {
this->actor.room = globalCtx->transitionActorList[transitionActorIdx].sides[1].room; this->actor.room = globalCtx->transiActorCtx.list[transitionActorIdx].sides[1].room;
Math_SmoothStepToF(&player->actor.world.pos.x, this->actor.world.pos.x, 1.0f, 50.0f, 10.0f); Math_SmoothStepToF(&player->actor.world.pos.x, this->actor.world.pos.x, 1.0f, 50.0f, 10.0f);
Math_SmoothStepToF(&player->actor.world.pos.z, this->actor.world.pos.z, 1.0f, 50.0f, 10.0f); Math_SmoothStepToF(&player->actor.world.pos.z, this->actor.world.pos.z, 1.0f, 50.0f, 10.0f);
if (this->actor.room != globalCtx->roomCtx.curRoom.num && if (this->actor.room != globalCtx->roomCtx.curRoom.num &&
@ -247,7 +247,7 @@ void func_80A593A4(EnHoll* this, GlobalContext* globalCtx) {
if (absY > 50.0f) { if (absY > 50.0f) {
transitionActorIdx = (u16)this->actor.params >> 0xA; transitionActorIdx = (u16)this->actor.params >> 0xA;
side = (0.0f < this->actor.yDistToPlayer) ? 0 : 1; side = (0.0f < this->actor.yDistToPlayer) ? 0 : 1;
this->actor.room = globalCtx->transitionActorList[transitionActorIdx].sides[side].room; this->actor.room = globalCtx->transiActorCtx.list[transitionActorIdx].sides[side].room;
if (this->actor.room != globalCtx->roomCtx.curRoom.num && if (this->actor.room != globalCtx->roomCtx.curRoom.num &&
func_8009728C(globalCtx, &globalCtx->roomCtx, this->actor.room) != 0) { func_8009728C(globalCtx, &globalCtx->roomCtx, this->actor.room) != 0) {
EnHoll_SetupAction(this, EnHoll_NextAction); EnHoll_SetupAction(this, EnHoll_NextAction);
@ -271,7 +271,7 @@ void func_80A59520(EnHoll* this, GlobalContext* globalCtx) {
if (absY < 200.0f && absY > 50.0f) { if (absY < 200.0f && absY > 50.0f) {
transitionActorIdx = (u16)this->actor.params >> 0xA; transitionActorIdx = (u16)this->actor.params >> 0xA;
side = (0.0f < this->actor.yDistToPlayer) ? 0 : 1; side = (0.0f < this->actor.yDistToPlayer) ? 0 : 1;
this->actor.room = globalCtx->transitionActorList[transitionActorIdx].sides[side].room; this->actor.room = globalCtx->transiActorCtx.list[transitionActorIdx].sides[side].room;
if (this->actor.room != globalCtx->roomCtx.curRoom.num && if (this->actor.room != globalCtx->roomCtx.curRoom.num &&
func_8009728C(globalCtx, &globalCtx->roomCtx, this->actor.room) != 0) { func_8009728C(globalCtx, &globalCtx->roomCtx, this->actor.room) != 0) {
EnHoll_SetupAction(this, EnHoll_NextAction); EnHoll_SetupAction(this, EnHoll_NextAction);
@ -307,7 +307,7 @@ void func_80A59618(EnHoll* this, GlobalContext* globalCtx) {
} }
if (absZ < 50.0f) { if (absZ < 50.0f) {
side = (vec.z < 0.0f) ? 0 : 1; side = (vec.z < 0.0f) ? 0 : 1;
this->actor.room = globalCtx->transitionActorList[transitionActorIdx].sides[side].room; this->actor.room = globalCtx->transiActorCtx.list[transitionActorIdx].sides[side].room;
if (this->actor.room != globalCtx->roomCtx.curRoom.num && if (this->actor.room != globalCtx->roomCtx.curRoom.num &&
func_8009728C(globalCtx, &globalCtx->roomCtx, this->actor.room) != 0) { func_8009728C(globalCtx, &globalCtx->roomCtx, this->actor.room) != 0) {
EnHoll_SetupAction(this, EnHoll_NextAction); EnHoll_SetupAction(this, EnHoll_NextAction);
@ -343,6 +343,7 @@ void EnHoll_Draw(Actor* thisx, GlobalContext* globalCtx) {
// Only draw the plane if not invisible // Only draw the plane if not invisible
if (this->planeAlpha != 0) { if (this->planeAlpha != 0) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_holl.c", 805); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_holl.c", 805);
if (this->planeAlpha == 255) { if (this->planeAlpha == 255) {
gfxP = POLY_OPA_DISP; gfxP = POLY_OPA_DISP;
setupDLIdx = 37; setupDLIdx = 37;
@ -365,6 +366,7 @@ void EnHoll_Draw(Actor* thisx, GlobalContext* globalCtx) {
} else { } else {
POLY_XLU_DISP = gfxP; POLY_XLU_DISP = gfxP;
} }
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_holl.c", 831); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_holl.c", 831);
} }
} }

View file

@ -3787,23 +3787,24 @@ void EnHorse_SkinCallback1(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* ski
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->jntSph.base); CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->jntSph.base);
} }
static s32 unk_80A667DC[] = { 0, 3, 7, 14 }; // unused
static u64* sEyeTextures[] = { static s32 D_80A667DC[] = { 0, 3, 7, 14 };
s32 EnHorse_SkinCallback2(Actor* thisx, GlobalContext* globalCtx, s32 limbIndex, PSkinAwb* arg3) {
static void* eyeTextures[] = {
gEponaEyeOpenTex, gEponaEyeOpenTex,
gEponaEyeHalfTex, gEponaEyeHalfTex,
gEponaEyeClosedTex, gEponaEyeClosedTex,
}; };
static u8 sBlinkTextures[] = { 0, 1, 2, 1 }; static u8 eyeBlinkIndexes[] = { 0, 1, 2, 1 };
s32 EnHorse_SkinCallback2(Actor* thisx, GlobalContext* globalCtx, s32 limbIndex, PSkinAwb* arg3) {
EnHorse* this = THIS; EnHorse* this = THIS;
s32 drawOriginalLimb = true; s32 drawOriginalLimb = true;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_horse.c", 8582); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_horse.c", 8582);
if (limbIndex == 13 && this->type == HORSE_EPONA) { if (limbIndex == 13 && this->type == HORSE_EPONA) {
u8 index = sBlinkTextures[this->blinkTimer]; u8 index = eyeBlinkIndexes[this->blinkTimer];
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[index])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[index]));
} else if (this->type == HORSE_HNI && this->stateFlags & ENHORSE_FLAG_18 && limbIndex == 30) { } else if (this->type == HORSE_HNI && this->stateFlags & ENHORSE_FLAG_18 && limbIndex == 30) {
func_800A5F60(globalCtx->state.gfxCtx, &this->skin, limbIndex, gHorseIngoGerudoSaddleDL, 0); func_800A5F60(globalCtx->state.gfxCtx, &this->skin, limbIndex, gHorseIngoGerudoSaddleDL, 0);
drawOriginalLimb = false; drawOriginalLimb = false;

View file

@ -548,7 +548,7 @@ static EnHorseLinkChildActionFunc sActionFuncs[] = {
func_80A698F4, func_80A69C18, func_80A699FC, func_80A6A068, func_80A6A7D0, func_80A6A5A4, func_80A698F4, func_80A69C18, func_80A699FC, func_80A6A068, func_80A6A7D0, func_80A6A5A4,
}; };
static u64* sEyeTextures[] = { gChildEponaEyeOpenTex, gChildEponaEyeHalfTex, gChildEponaEyeCloseTex }; static void* sEyeTextures[] = { gChildEponaEyeOpenTex, gChildEponaEyeHalfTex, gChildEponaEyeCloseTex };
static u8 sEyeIndexOrder[] = { 0, 1, 2, 1 }; static u8 sEyeIndexOrder[] = { 0, 1, 2, 1 };
void EnHorseLinkChild_Update(Actor* thisx, GlobalContext* globalCtx) { void EnHorseLinkChild_Update(Actor* thisx, GlobalContext* globalCtx) {

View file

@ -306,13 +306,8 @@ void EnJj_Update(Actor* thisx, GlobalContext* globalCtx) {
this->skelAnime.jointTable[10].z = this->mouthOpenAngle; this->skelAnime.jointTable[10].z = this->mouthOpenAngle;
} }
static u64* sEyeTextures[] = {
gJabuJabuEyeOpenTex,
gJabuJabuEyeHalfTex,
gJabuJabuEyeClosedTex,
};
void EnJj_Draw(Actor* thisx, GlobalContext* globalCtx2) { void EnJj_Draw(Actor* thisx, GlobalContext* globalCtx2) {
static void* eyeTextures[] = { gJabuJabuEyeOpenTex, gJabuJabuEyeHalfTex, gJabuJabuEyeClosedTex };
GlobalContext* globalCtx = globalCtx2; GlobalContext* globalCtx = globalCtx2;
EnJj* this = THIS; EnJj* this = THIS;
@ -321,7 +316,7 @@ void EnJj_Draw(Actor* thisx, GlobalContext* globalCtx2) {
func_800943C8(globalCtx->state.gfxCtx); func_800943C8(globalCtx->state.gfxCtx);
Matrix_Translate(0.0f, (cosf(this->skelAnime.curFrame * (M_PI / 41.0f)) * 10.0f) - 10.0f, 0.0f, MTXMODE_APPLY); Matrix_Translate(0.0f, (cosf(this->skelAnime.curFrame * (M_PI / 41.0f)) * 10.0f) - 10.0f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(10.0f, 10.0f, 10.0f, MTXMODE_APPLY); Matrix_Scale(10.0f, 10.0f, 10.0f, MTXMODE_APPLY);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIndex])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
NULL, NULL, this); NULL, NULL, this);

View file

@ -485,7 +485,7 @@ void EnKz_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
} }
void EnKz_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnKz_Draw(Actor* thisx, GlobalContext* globalCtx) {
static UNK_PTR sEyeSegments[] = { static void* sEyeSegments[] = {
0x06001470, 0x06001470,
0x06001870, 0x06001870,
0x06001C70, 0x06001C70,

View file

@ -61,20 +61,6 @@ static struct_D_80AA1678 D_80AA2858[] = {
{ 0x06009EE0, 1.0f, ANIMMODE_LOOP, -10.0f }, { 0x06009EE0, 1.0f, ANIMMODE_LOOP, -10.0f },
}; };
static Vec3f D_80AA28A8 = { 900.0f, 0.0f, 0.0f };
static UNK_PTR D_80AA28B4[] = {
0x06002970,
0x06003570,
0x06003770,
};
static UNK_PTR D_80AA28C0[] = {
0x06002570,
0x06002C70,
0x06003070,
};
extern Gfx D_06005420[]; extern Gfx D_06005420[];
extern FlexSkeletonHeader D_06008D90; extern FlexSkeletonHeader D_06008D90;
extern AnimationHeader D_060093BC; extern AnimationHeader D_060093BC;
@ -363,7 +349,7 @@ s32 EnMa2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
void EnMa2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { void EnMa2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
EnMa2* this = THIS; EnMa2* this = THIS;
Vec3f vec = D_80AA28A8; Vec3f vec = { 900.0f, 0.0f, 0.0f };
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ma2.c", 904); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ma2.c", 904);
@ -378,6 +364,16 @@ void EnMa2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
} }
void EnMa2_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnMa2_Draw(Actor* thisx, GlobalContext* globalCtx) {
static void* D_80AA28B4[] = {
0x06002970,
0x06003570,
0x06003770,
};
static void* D_80AA28C0[] = {
0x06002570,
0x06002C70,
0x06003070,
};
EnMa2* this = THIS; EnMa2* this = THIS;
Camera* camera; Camera* camera;
f32 someFloat; f32 someFloat;

View file

@ -65,20 +65,6 @@ static struct_D_80AA1678 D_80AA3848[] = {
{ 0x06009EE0, 1.0f, ANIMMODE_LOOP, -10.0f }, { 0x06009EE0, 1.0f, ANIMMODE_LOOP, -10.0f },
}; };
static Vec3f D_80AA3898 = { 900.0f, 0.0f, 0.0f };
static UNK_PTR D_80AA38A4[] = {
0x06002970,
0x06003570,
0x06003770,
};
static UNK_PTR D_80AA38B0[] = {
0x06002570,
0x06002C70,
0x06003070,
};
extern u32 D_06005420; extern u32 D_06005420;
extern FlexSkeletonHeader D_06008D90; extern FlexSkeletonHeader D_06008D90;
extern AnimationHeader D_060093BC; extern AnimationHeader D_060093BC;
@ -345,7 +331,7 @@ s32 EnMa3_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
void EnMa3_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { void EnMa3_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
EnMa3* this = THIS; EnMa3* this = THIS;
Vec3f vec = D_80AA3898; Vec3f vec = { 900.0f, 0.0f, 0.0f };
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ma3.c", 927); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ma3.c", 927);
@ -360,6 +346,16 @@ void EnMa3_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
} }
void EnMa3_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnMa3_Draw(Actor* thisx, GlobalContext* globalCtx) {
static void* D_80AA38A4[] = {
0x06002970,
0x06003570,
0x06003770,
};
static void* D_80AA38B0[] = {
0x06002570,
0x06002C70,
0x06003070,
};
EnMa3* this = THIS; EnMa3* this = THIS;
Camera* camera; Camera* camera;
f32 someFloat; f32 someFloat;

View file

@ -522,7 +522,7 @@ void EnMm_Update(Actor* thisx, GlobalContext* globalCtx) {
extern Gfx D_0602CA38[]; // bunny hood dlist from object_link_child. replace with proper symbol later extern Gfx D_0602CA38[]; // bunny hood dlist from object_link_child. replace with proper symbol later
void EnMm_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnMm_Draw(Actor* thisx, GlobalContext* globalCtx) {
static u64* mouthTextures[] = { gRunningManMouthOpenTex, gRunningManMouthClosedTex }; static void* mouthTextures[] = { gRunningManMouthOpenTex, gRunningManMouthClosedTex };
s32 pad; s32 pad;
EnMm* this = THIS; EnMm* this = THIS;

View file

@ -318,7 +318,7 @@ void EnMm2_Update(Actor* thisx, GlobalContext* globalCtx) {
} }
void EnMm2_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnMm2_Draw(Actor* thisx, GlobalContext* globalCtx) {
static u64* mouthTextures[] = { gRunningManMouthOpenTex, gRunningManMouthClosedTex }; static void* mouthTextures[] = { gRunningManMouthOpenTex, gRunningManMouthClosedTex };
EnMm2* this = THIS; EnMm2* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_mm2.c", 634); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_mm2.c", 634);

View file

@ -78,7 +78,7 @@ static ColliderCylinderInitType1 sCylinderInit = {
{ 25, 80, 0, { 0, 0, 0 } }, { 25, 80, 0, { 0, 0, 0 } },
}; };
static u64* sEyeTextures[] = { static void* sEyeTextures[] = {
gNabooruEyeOpenTex, gNabooruEyeOpenTex,
gNabooruEyeHalfTex, gNabooruEyeHalfTex,
gNabooruEyeClosedTex, gNabooruEyeClosedTex,
@ -543,14 +543,14 @@ void EnNb_CreateLightOrb(EnNb* this, GlobalContext* globalCtx) {
void EnNb_DrawTransparency(EnNb* this, GlobalContext* globalCtx) { void EnNb_DrawTransparency(EnNb* this, GlobalContext* globalCtx) {
s32 pad[2]; s32 pad[2];
s16 eyeSegIdx = this->eyeIdx; s16 eyeSegIdx = this->eyeIdx;
UNK_PTR addr = sEyeTextures[eyeSegIdx]; void* eyeTex = sEyeTextures[eyeSegIdx];
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_nb_inKenjyanomaDemo02.c", 263); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_nb_inKenjyanomaDemo02.c", 263);
func_80093D84(globalCtx->state.gfxCtx); func_80093D84(globalCtx->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTex));
gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(eyeTex));
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha); gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha);
gSPSegment(POLY_XLU_DISP++, 0x0C, &D_80116280[0]); gSPSegment(POLY_XLU_DISP++, 0x0C, &D_80116280[0]);
POLY_XLU_DISP = SkelAnime_DrawFlex(globalCtx, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, POLY_XLU_DISP = SkelAnime_DrawFlex(globalCtx, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,

View file

@ -247,7 +247,7 @@ s32 EnNiwGirlOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLi
static Vec3f sConstVec3f = { 0.2f, 0.2f, 0.2f }; static Vec3f sConstVec3f = { 0.2f, 0.2f, 0.2f };
void EnNiwGirl_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnNiwGirl_Draw(Actor* thisx, GlobalContext* globalCtx) {
static u64* eyeTextures[] = { gNiwGirlEyeOpenTex, gNiwGirlEyeHalfTex, gNiwGirlEyeClosedTex }; static void* eyeTextures[] = { gNiwGirlEyeOpenTex, gNiwGirlEyeHalfTex, gNiwGirlEyeClosedTex };
EnNiwGirl* this = THIS; EnNiwGirl* this = THIS;
s32 pad; s32 pad;
Vec3f sp4C = sConstVec3f; Vec3f sp4C = sConstVec3f;

View file

@ -18,7 +18,7 @@ typedef struct {
/* 0x0003 */ Color_RGB8 lightColor; /* 0x0003 */ Color_RGB8 lightColor;
/* 0x0006 */ Color_RGB8 envColor; /* 0x0006 */ Color_RGB8 envColor;
/* 0x0009 */ s8 unk_9; /* 0x0009 */ s8 unk_9;
/* 0x000C */ u64* soulTexture; /* 0x000C */ void* soulTexture;
} EnPoFieldInfo; // size = 0x10 } EnPoFieldInfo; // size = 0x10
typedef struct EnPoField { typedef struct EnPoField {

View file

@ -80,7 +80,7 @@ static Vec3f D_80AD8D3C = { 0.0f, 0.0f, 0.0f };
static Vec3f D_80AD8D48 = { 0.0f, 1200.0f, 0.0f }; static Vec3f D_80AD8D48 = { 0.0f, 1200.0f, 0.0f };
static u64* sEyesSegments[] = { static void* sEyesTextures[] = {
gDampeEyeOpenTex, gDampeEyeOpenTex,
gDampeEyeHalfTex, gDampeEyeHalfTex,
gDampeEyeClosedTex, gDampeEyeClosedTex,
@ -404,7 +404,7 @@ void EnPoRelay_Draw(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_po_relay.c", 940); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_po_relay.c", 940);
func_80093D18(globalCtx->state.gfxCtx); func_80093D18(globalCtx->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeTextureIdx])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesTextures[this->eyeTextureIdx]));
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
NULL, EnPoRelay_PostLimbDraw, &this->actor); NULL, EnPoRelay_PostLimbDraw, &this->actor);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_po_relay.c", 954); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_po_relay.c", 954);

View file

@ -28,7 +28,7 @@ void func_80AE7FD0(EnRl* this, GlobalContext* globalCtx);
void func_80AE7FDC(EnRl* this, GlobalContext* globalCtx); void func_80AE7FDC(EnRl* this, GlobalContext* globalCtx);
void func_80AE7D94(EnRl* this, GlobalContext* globalCtx); void func_80AE7D94(EnRl* this, GlobalContext* globalCtx);
static UNK_PTR D_80AE81A0[] = { 0x06003620, 0x06003960, 0x06003B60 }; static void* D_80AE81A0[] = { 0x06003620, 0x06003960, 0x06003B60 };
extern FlexSkeletonHeader D_06007B38; extern FlexSkeletonHeader D_06007B38;
extern AnimationHeader D_06000A3C; extern AnimationHeader D_06000A3C;
@ -304,15 +304,15 @@ void func_80AE7D40(EnRl* this, GlobalContext* globalCtx) {
void func_80AE7D94(EnRl* this, GlobalContext* globalCtx) { void func_80AE7D94(EnRl* this, GlobalContext* globalCtx) {
s32 pad[2]; s32 pad[2];
s16 temp = this->eyeTextureIndex; s16 temp = this->eyeTextureIndex;
s32 addr = D_80AE81A0[temp]; void* tex = D_80AE81A0[temp];
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_rl_inKenjyanomaDemo02.c", 304); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_rl_inKenjyanomaDemo02.c", 304);
func_80093D84(globalCtx->state.gfxCtx); func_80093D84(globalCtx->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(tex));
gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(tex));
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha); gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha);
gSPSegment(POLY_XLU_DISP++, 0x0C, D_80116280); gSPSegment(POLY_XLU_DISP++, 0x0C, D_80116280);
@ -353,15 +353,15 @@ void func_80AE7FD0(EnRl* this, GlobalContext* globalCtx) {
void func_80AE7FDC(EnRl* this, GlobalContext* globalCtx) { void func_80AE7FDC(EnRl* this, GlobalContext* globalCtx) {
s32 pad[2]; s32 pad[2];
s16 temp = this->eyeTextureIndex; s16 temp = this->eyeTextureIndex;
s32 addr = D_80AE81A0[temp]; void* tex = D_80AE81A0[temp];
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_rl.c", 416); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_rl.c", 416);
func_80093D18(globalCtx->state.gfxCtx); func_80093D18(globalCtx->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(tex));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(tex));
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255); gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]); gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);

View file

@ -468,15 +468,15 @@ void func_80AF31C8(EnRu2* this, GlobalContext* globalCtx) {
void func_80AF321C(EnRu2* this, GlobalContext* globalCtx) { void func_80AF321C(EnRu2* this, GlobalContext* globalCtx) {
s32 pad[2]; s32 pad[2];
s16 temp = this->unk_2A4; s16 temp = this->unk_2A4;
UNK_PTR addr = sEyeTextures[temp]; void* tex = sEyeTextures[temp];
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ru2_inKenjyanomaDemo02.c", 264); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ru2_inKenjyanomaDemo02.c", 264);
func_80093D84(globalCtx->state.gfxCtx); func_80093D84(globalCtx->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(tex));
gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(tex));
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha); gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha);
gSPSegment(POLY_XLU_DISP++, 0x0C, &D_80116280[0]); gSPSegment(POLY_XLU_DISP++, 0x0C, &D_80116280[0]);
@ -796,15 +796,15 @@ void func_80AF3F14(EnRu2* this, GlobalContext* globalCtx) {
void func_80AF3F20(EnRu2* this, GlobalContext* globalCtx) { void func_80AF3F20(EnRu2* this, GlobalContext* globalCtx) {
s32 pad[2]; s32 pad[2];
s16 temp = this->unk_2A4; s16 temp = this->unk_2A4;
UNK_PTR addr = sEyeTextures[temp]; void* tex = sEyeTextures[temp];
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ru2.c", 642); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ru2.c", 642);
func_80093D18(globalCtx->state.gfxCtx); func_80093D18(globalCtx->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(addr)); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(tex));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(addr)); gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(tex));
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255); gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]); gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);

View file

@ -762,24 +762,26 @@ void EnSa_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
} }
void EnSa_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnSa_Draw(Actor* thisx, GlobalContext* globalCtx) {
static u64* sMouthTextures[] = { gSariaMouthClosed2Tex, gSariaMouthSmilingOpenTex, gSariaMouthFrowningTex, static void* mouthTextures[] = {
gSariaMouthSuprisedTex, gSariaMouthClosedTex }; gSariaMouthClosed2Tex, gSariaMouthSmilingOpenTex, gSariaMouthFrowningTex,
static u64* sEyeTextures[] = { gSariaEyeOpenTex, gSariaEyeHalfTex, gSariaEyeClosedTex, gSariaEyeSuprisedTex, gSariaMouthSuprisedTex, gSariaMouthClosedTex,
gSariaEyeSadTex }; };
static void* eyeTextures[] = {
gSariaEyeOpenTex, gSariaEyeHalfTex, gSariaEyeClosedTex, gSariaEyeSuprisedTex, gSariaEyeSadTex,
};
EnSa* this = THIS; EnSa* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_sa.c", 1444); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_sa.c", 1444);
if (this->alpha == 255) { if (this->alpha == 255) {
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->rightEyeIndex])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->rightEyeIndex]));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->leftEyeIndex])); gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(eyeTextures[this->leftEyeIndex]));
gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(sMouthTextures[this->mouthIndex])); gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(mouthTextures[this->mouthIndex]));
func_80034BA0(globalCtx, &this->skelAnime, EnSa_OverrideLimbDraw, EnSa_PostLimbDraw, &this->actor, this->alpha); func_80034BA0(globalCtx, &this->skelAnime, EnSa_OverrideLimbDraw, EnSa_PostLimbDraw, &this->actor, this->alpha);
} else if (this->alpha != 0) { } else if (this->alpha != 0) {
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->rightEyeIndex])); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->rightEyeIndex]));
gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->leftEyeIndex])); gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(eyeTextures[this->leftEyeIndex]));
gSPSegment(POLY_XLU_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(sMouthTextures[this->mouthIndex])); gSPSegment(POLY_XLU_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(mouthTextures[this->mouthIndex]));
func_80034CC4(globalCtx, &this->skelAnime, EnSa_OverrideLimbDraw, EnSa_PostLimbDraw, &this->actor, this->alpha); func_80034CC4(globalCtx, &this->skelAnime, EnSa_OverrideLimbDraw, EnSa_PostLimbDraw, &this->actor, this->alpha);
} }

View file

@ -215,17 +215,16 @@ s32 EnTakaraMan_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx**
} }
void EnTakaraMan_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnTakaraMan_Draw(Actor* thisx, GlobalContext* globalCtx) {
static UNK_PTR sTakaraEyeTextures[] = { static void* eyeTextures[] = {
0x06000970, 0x06000970,
0x06000D70, 0x06000D70,
}; };
EnTakaraMan* this = THIS; EnTakaraMan* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_takara_man.c", 528); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_takara_man.c", 528);
func_80093D18(globalCtx->state.gfxCtx); func_80093D18(globalCtx->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTakaraEyeTextures[this->eyeTextureIdx])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeTextureIdx]));
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnTakaraMan_OverrideLimbDraw, NULL, this); EnTakaraMan_OverrideLimbDraw, NULL, this);

View file

@ -79,7 +79,7 @@ void EnTkEff_Update(EnTk* this) {
} }
void EnTkEff_Draw(EnTk* this, GlobalContext* globalCtx) { void EnTkEff_Draw(EnTk* this, GlobalContext* globalCtx) {
static UNK_PTR dustImages[] = { static void* dustTextures[] = {
&gDust8Tex, &gDust7Tex, &gDust6Tex, &gDust5Tex, &gDust4Tex, &gDust3Tex, &gDust2Tex, &gDust1Tex, &gDust8Tex, &gDust7Tex, &gDust6Tex, &gDust5Tex, &gDust4Tex, &gDust3Tex, &gDust2Tex, &gDust1Tex,
}; };
@ -116,8 +116,8 @@ void EnTkEff_Draw(EnTk* this, GlobalContext* globalCtx) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tk_eff.c", 140), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tk_eff.c", 140),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
imageIdx = eff->timeLeft * ((f32)ARRAY_COUNT(dustImages) / eff->timeTotal); imageIdx = eff->timeLeft * ((f32)ARRAY_COUNT(dustTextures) / eff->timeTotal);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(dustImages[imageIdx])); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(dustTextures[imageIdx]));
gSPDisplayList(POLY_XLU_DISP++, gDampeEff2DL); gSPDisplayList(POLY_XLU_DISP++, gDampeEff2DL);
} }
@ -717,7 +717,7 @@ void EnTk_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
} }
void EnTk_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnTk_Draw(Actor* thisx, GlobalContext* globalCtx) {
static u64* sEyesSegments[] = { static void* sEyesSegments[] = {
gDampeEyeOpenTex, gDampeEyeOpenTex,
gDampeEyeHalfTex, gDampeEyeHalfTex,
gDampeEyeClosedTex, gDampeEyeClosedTex,

View file

@ -75,7 +75,7 @@ static Color_RGBA8 D_80B243C0[4] = {
{ 0, 0, 255, 255 }, { 0, 0, 255, 255 },
}; };
static u64* sEyeTextures[] = { static void* sEyeTextures[] = {
0x060086D8, // Open 0x060086D8, // Open
0x060094D8, // Half 0x060094D8, // Half
0x060098D8, // Closed 0x060098D8, // Closed

View file

@ -48,7 +48,7 @@ static ColliderCylinderInitType1 sCylinderInit = {
{ 25, 80, 0, { 0, 0, 0 } }, { 25, 80, 0, { 0, 0, 0 } },
}; };
static u64* sEyeTextures[] = { static void* sEyeTextures[] = {
gSheikEyeOpenTex, gSheikEyeOpenTex,
gSheikEyeHalfClosedTex, gSheikEyeHalfClosedTex,
gSheikEyeShutTex, gSheikEyeShutTex,
@ -1067,7 +1067,7 @@ void EnXc_DrawPullingOutHarp(Actor* thisx, GlobalContext* globalCtx) {
EnXc* this = THIS; EnXc* this = THIS;
s32 pad; s32 pad;
s16 eyePattern = this->eyeIdx; s16 eyePattern = this->eyeIdx;
u64* eyeTexture = sEyeTextures[eyePattern]; void* eyeTexture = sEyeTextures[eyePattern];
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
s32 pad2; s32 pad2;
@ -1089,7 +1089,7 @@ void EnXc_DrawHarp(Actor* thisx, GlobalContext* globalCtx) {
EnXc* this = THIS; EnXc* this = THIS;
s32 pad; s32 pad;
s16 eyePattern = this->eyeIdx; s16 eyePattern = this->eyeIdx;
u64* eyeTexture = sEyeTextures[eyePattern]; void* eyeTexture = sEyeTextures[eyePattern];
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
s32 pad2; s32 pad2;
@ -1699,7 +1699,7 @@ void EnXc_DrawTriforce(Actor* thisx, GlobalContext* globalCtx) {
EnXc* this = THIS; EnXc* this = THIS;
s32 pad; s32 pad;
s16 eyeIdx = this->eyeIdx; s16 eyeIdx = this->eyeIdx;
u64* eyeTexture = sEyeTextures[eyeIdx]; void* eyeTexture = sEyeTextures[eyeIdx];
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
s32 pad2; s32 pad2;
@ -2375,7 +2375,7 @@ void EnXc_DrawDefault(Actor* thisx, GlobalContext* globalCtx) {
s32 pad; s32 pad;
EnXc* this = THIS; EnXc* this = THIS;
s16 eyeIdx = this->eyeIdx; s16 eyeIdx = this->eyeIdx;
u64* eyeSegment = sEyeTextures[eyeIdx]; void* eyeSegment = sEyeTextures[eyeIdx];
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
GraphicsContext* localGfxCtx = globalCtx->state.gfxCtx; GraphicsContext* localGfxCtx = globalCtx->state.gfxCtx;
GraphicsContext* gfxCtx = localGfxCtx; GraphicsContext* gfxCtx = localGfxCtx;

View file

@ -59,8 +59,12 @@ static ColliderCylinderInit sCylinderInit = {
{ 20, 46, 0, { 0, 0, 0 } }, { 20, 46, 0, { 0, 0, 0 } },
}; };
static void* D_80B4E61C[] = { gChildZelda1EyeOpenLookingUpRightTex, gChildZelda1EyeHalf2Tex, gChildZelda1EyeClosedTex, static void* D_80B4E61C[] = {
gChildZelda1EyeHalf2Tex }; gChildZelda1EyeOpenLookingUpRightTex,
gChildZelda1EyeHalf2Tex,
gChildZelda1EyeClosedTex,
gChildZelda1EyeHalf2Tex,
};
static void* D_80B4E62C[] = { gChildZelda1MouthNeutralTex }; static void* D_80B4E62C[] = { gChildZelda1MouthNeutralTex };
void func_80B4AB40(void) { void func_80B4AB40(void) {

View file

@ -62,11 +62,11 @@ void func_80B523BC(EnZl2* this, GlobalContext* globalCtx);
void func_80B523C8(EnZl2* this, GlobalContext* globalCtx); void func_80B523C8(EnZl2* this, GlobalContext* globalCtx);
void func_80B525D4(EnZl2* this, GlobalContext* globalCtx); void func_80B525D4(EnZl2* this, GlobalContext* globalCtx);
static u64* sEyeTextures[] = { gZelda2EyeOpenTex, gZelda2EyeHalfTex, gZelda2EyeShutTex, static void* sEyeTextures[] = { gZelda2EyeOpenTex, gZelda2EyeHalfTex, gZelda2EyeShutTex,
gZelda2Eye03Tex, gZelda2Eye04Tex, gZelda2Eye05Tex, gZelda2Eye03Tex, gZelda2Eye04Tex, gZelda2Eye05Tex,
gZelda2Eye06Tex, gZelda2Eye07Tex, gZelda2Eye08Tex }; gZelda2Eye06Tex, gZelda2Eye07Tex, gZelda2Eye08Tex };
static u64* sMouthTextures[] = { gZelda2MouthSeriousTex, gZelda2MouthHappyTex, gZelda2MouthOpenTex }; static void* sMouthTextures[] = { gZelda2MouthSeriousTex, gZelda2MouthHappyTex, gZelda2MouthOpenTex };
static EnZl2ActionFunc sActionFuncs[] = { static EnZl2ActionFunc sActionFuncs[] = {
func_80B521A0, func_80B50BBC, func_80B50BEC, func_80B50C40, func_80B50CA8, func_80B50CFC, func_80B521A0, func_80B50BBC, func_80B50BEC, func_80B50C40, func_80B50CA8, func_80B50CFC,
@ -1632,11 +1632,11 @@ void func_80B523C8(EnZl2* this, GlobalContext* globalCtx) {
s32 pad[3]; s32 pad[3];
s16 eyeTexIndex = this->eyeTexIndex; s16 eyeTexIndex = this->eyeTexIndex;
s16 eyeTexIndex2 = this->eyeTexIndex2; s16 eyeTexIndex2 = this->eyeTexIndex2;
u64* eyeTex = sEyeTextures[eyeTexIndex]; void* eyeTex = sEyeTextures[eyeTexIndex];
u64* eyeTex2 = sEyeTextures[eyeTexIndex2]; void* eyeTex2 = sEyeTextures[eyeTexIndex2];
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
s16 mouthTexIndex = this->mouthTexIndex; s16 mouthTexIndex = this->mouthTexIndex;
u64* mouthTex = sMouthTextures[mouthTexIndex]; void* mouthTex = sMouthTextures[mouthTexIndex];
s32 pad1; s32 pad1;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_zl2.c", 1623); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_zl2.c", 1623);
@ -1658,10 +1658,10 @@ void func_80B523C8(EnZl2* this, GlobalContext* globalCtx) {
void func_80B525D4(EnZl2* this, GlobalContext* globalCtx) { void func_80B525D4(EnZl2* this, GlobalContext* globalCtx) {
s32 pad[2]; s32 pad[2];
s16 eyeTexIndex = this->eyeTexIndex; s16 eyeTexIndex = this->eyeTexIndex;
u64* eyeTex = sEyeTextures[eyeTexIndex]; void* eyeTex = sEyeTextures[eyeTexIndex];
s16 mouthTexIndex = this->mouthTexIndex; s16 mouthTexIndex = this->mouthTexIndex;
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
u64* mouthTex = sMouthTextures[mouthTexIndex]; void* mouthTex = sMouthTextures[mouthTexIndex];
s32 pad1; s32 pad1;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_zl2.c", 1663); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_zl2.c", 1663);

View file

@ -41,10 +41,10 @@ static ColliderCylinderInitType1 sCylinderInit = {
{ 25, 80, 0, { 0, 0, 0 } }, { 25, 80, 0, { 0, 0, 0 } },
}; };
static u64* sEyeTextures[] = { gZelda2EyeOpenTex, gZelda2EyeHalfTex, gZelda2EyeShutTex, gZelda2Eye03Tex, static void* sEyeTextures[] = { gZelda2EyeOpenTex, gZelda2EyeHalfTex, gZelda2EyeShutTex, gZelda2Eye03Tex,
gZelda2Eye04Tex, gZelda2Eye05Tex, gZelda2Eye06Tex, NULL }; gZelda2Eye04Tex, gZelda2Eye05Tex, gZelda2Eye06Tex, NULL };
static u64* sMouthTextures[] = { gZelda2MouthSeriousTex, gZelda2MouthHappyTex, gZelda2MouthOpenTex }; static void* sMouthTextures[] = { gZelda2MouthSeriousTex, gZelda2MouthHappyTex, gZelda2MouthOpenTex };
s32 D_80B5A468 = 0; s32 D_80B5A468 = 0;
@ -2699,10 +2699,10 @@ void func_80B59FE8(EnZl3* this, GlobalContext* globalCtx) {
void func_80B59FF4(EnZl3* this, GlobalContext* globalCtx) { void func_80B59FF4(EnZl3* this, GlobalContext* globalCtx) {
s32 pad[2]; s32 pad[2];
s16 eyeTexIndex = this->eyeTexIndex; s16 eyeTexIndex = this->eyeTexIndex;
u64* eyeTex = sEyeTextures[eyeTexIndex]; void* eyeTex = sEyeTextures[eyeTexIndex];
s16 mouthTexIndex = this->mouthTexIndex; s16 mouthTexIndex = this->mouthTexIndex;
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
u64* mouthTex = sMouthTextures[mouthTexIndex]; void* mouthTex = sMouthTextures[mouthTexIndex];
s32 pad2; s32 pad2;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_zl3.c", 2165); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_zl3.c", 2165);
@ -2724,10 +2724,10 @@ void func_80B59FF4(EnZl3* this, GlobalContext* globalCtx) {
void func_80B5A1D0(EnZl3* this, GlobalContext* globalCtx) { void func_80B5A1D0(EnZl3* this, GlobalContext* globalCtx) {
s32 pad[2]; s32 pad[2];
s16 eyeTexIndex = this->eyeTexIndex; s16 eyeTexIndex = this->eyeTexIndex;
u64* eyeTex = sEyeTextures[eyeTexIndex]; void* eyeTex = sEyeTextures[eyeTexIndex];
s16 mouthTexIndex = this->mouthTexIndex; s16 mouthTexIndex = this->mouthTexIndex;
SkelAnime* skelAnime = &this->skelAnime; SkelAnime* skelAnime = &this->skelAnime;
u64* mouthTex = sMouthTextures[mouthTexIndex]; void* mouthTex = sMouthTextures[mouthTexIndex];
s32 pad2; s32 pad2;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_zl3.c", 2205); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_zl3.c", 2205);

View file

@ -1283,9 +1283,9 @@ void EnZl4_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
void EnZl4_Draw(Actor* thisx, GlobalContext* globalCtx) { void EnZl4_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnZl4* this = THIS; EnZl4* this = THIS;
u64* mouthTex[] = { gChildZeldaMouthNeutralTex, gChildZeldaMouthHappyTex, gChildZeldaMouthWorriedTex, void* mouthTex[] = { gChildZeldaMouthNeutralTex, gChildZeldaMouthHappyTex, gChildZeldaMouthWorriedTex,
gChildZeldaMouthSurprisedTex }; gChildZeldaMouthSurprisedTex };
u64* eyeTex[] = { void* eyeTex[] = {
gChildZeldaEyeOpenTex, gChildZeldaEyeBlinkTex, gChildZeldaEyeShutTex, gChildZeldaEyeWideTex, gChildZeldaEyeOpenTex, gChildZeldaEyeBlinkTex, gChildZeldaEyeShutTex, gChildZeldaEyeWideTex,
gChildZeldaEyeSquintTex, gChildZeldaEyeOutTex, gChildZeldaEyeInTex, gChildZeldaEyeSquintTex, gChildZeldaEyeOutTex, gChildZeldaEyeInTex,
}; };

View file

@ -887,10 +887,10 @@ void Fishing_Init(Actor* thisx, GlobalContext* globalCtx2) {
D_80B7E07D = (HIGH_SCORE(HS_FISHING) & 0xFF0000) >> 0x10; D_80B7E07D = (HIGH_SCORE(HS_FISHING) & 0xFF0000) >> 0x10;
if ((D_80B7E07D & 7) == 7) { if ((D_80B7E07D & 7) == 7) {
globalCtx->unk_11D30[0] = 90; globalCtx->roomCtx.unk_74[0] = 90;
D_80B7E076 = 1; D_80B7E076 = 1;
} else { } else {
globalCtx->unk_11D30[0] = 40; globalCtx->roomCtx.unk_74[0] = 40;
D_80B7E076 = 0; D_80B7E076 = 0;
} }

View file

@ -83,7 +83,7 @@ static ColliderJntSphInit sColliderJntSphInit = {
static CollisionCheckInfoInit sColChkInfoInit = { 0, 12, 60, MASS_IMMOVABLE }; static CollisionCheckInfoInit sColChkInfoInit = { 0, 12, 60, MASS_IMMOVABLE };
static UNK_PTR faceTextures[] = { D_06000C20, D_06000420, D_06001420 }; static void* sFaceTextures[] = { D_06000C20, D_06000420, D_06001420 };
static Vec3f D_80B97F68 = { -1707.0f, 843.0f, -180.0f }; static Vec3f D_80B97F68 = { -1707.0f, 843.0f, -180.0f };
static Vec3f D_80B97F74 = { 0.0f, 0.0f, 0.0f }; static Vec3f D_80B97F74 = { 0.0f, 0.0f, 0.0f };
@ -428,7 +428,7 @@ void ObjLightswitch_DrawOpa(ObjLightswitch* this, GlobalContext* globalCtx) {
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 841), gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 841),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(faceTextures[this->faceTextureIndex])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sFaceTextures[this->faceTextureIndex]));
gSPDisplayList(POLY_OPA_DISP++, D_06000260); gSPDisplayList(POLY_OPA_DISP++, D_06000260);
rot.x = this->actor.shape.rot.x; rot.x = this->actor.shape.rot.x;
@ -468,7 +468,7 @@ void ObjLightswitch_DrawXlu(ObjLightswitch* this, GlobalContext* globalCtx) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 912), gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 912),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(faceTextures[this->faceTextureIndex])); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sFaceTextures[this->faceTextureIndex]));
gSPDisplayList(POLY_XLU_DISP++, D_06000260); gSPDisplayList(POLY_XLU_DISP++, D_06000260);
sp60.x = this->actor.shape.rot.x; sp60.x = this->actor.shape.rot.x;

View file

@ -723,22 +723,11 @@ void ObjSwitch_DrawFloorRusty(ObjSwitch* this, GlobalContext* globalCtx) {
Gfx_DrawDListOpa(globalCtx, gRustyFloorSwitchDL); Gfx_DrawDListOpa(globalCtx, gRustyFloorSwitchDL);
} }
static u64* sEyeTextures[][4] = {
{
gEyeSwitchGoldOpenTex,
gEyeSwitchGoldOpeningTex,
gEyeSwitchGoldClosingTex,
gEyeSwitchGoldClosedTex,
},
{
gEyeSwitchSilverOpenTex,
gEyeSwitchSilverHalfTex,
gEyeSwitchSilverClosedTex,
gEyeSwitchSilverClosedTex,
},
};
void ObjSwitch_DrawEye(ObjSwitch* this, GlobalContext* globalCtx) { void ObjSwitch_DrawEye(ObjSwitch* this, GlobalContext* globalCtx) {
static void* eyeTextures[][4] = {
{ gEyeSwitchGoldOpenTex, gEyeSwitchGoldOpeningTex, gEyeSwitchGoldClosingTex, gEyeSwitchGoldClosedTex },
{ gEyeSwitchSilverOpenTex, gEyeSwitchSilverHalfTex, gEyeSwitchSilverClosedTex, gEyeSwitchSilverClosedTex },
};
static Gfx* eyeDlists[] = { gEyeSwitch1DL, gEyeSwitch2DL }; static Gfx* eyeDlists[] = { gEyeSwitch1DL, gEyeSwitch2DL };
s32 pad; s32 pad;
s32 subType = (this->dyna.actor.params >> 4 & 7); s32 subType = (this->dyna.actor.params >> 4 & 7);
@ -748,7 +737,7 @@ void ObjSwitch_DrawEye(ObjSwitch* this, GlobalContext* globalCtx) {
func_80093D18(globalCtx->state.gfxCtx); func_80093D18(globalCtx->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_switch.c", 1462), gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_switch.c", 1462),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[subType][this->eyeTexIndex])); gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[subType][this->eyeTexIndex]));
gSPDisplayList(POLY_OPA_DISP++, eyeDlists[subType]); gSPDisplayList(POLY_OPA_DISP++, eyeDlists[subType]);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_obj_switch.c", 1471); CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_obj_switch.c", 1471);

View file

@ -52,7 +52,7 @@ typedef struct ObjSwitch {
/* 0x016C */ s16 cooldownTimer; /* 0x016C */ s16 cooldownTimer;
/* 0x016E */ u8 cooldownOn; /* 0x016E */ u8 cooldownOn;
/* 0x0170 */ s16 eyeTexIndex; /* 0x0170 */ s16 eyeTexIndex;
/* 0x0174 */ UNK_PTR crystalSubtype1texture; /* 0x0174 */ void* crystalSubtype1texture;
/* 0x0178 */ u8 x1TexScroll; /* 0x0178 */ u8 x1TexScroll;
/* 0x0179 */ u8 y1TexScroll; /* 0x0179 */ u8 y1TexScroll;
/* 0x017A */ u8 x2TexScroll; /* 0x017A */ u8 x2TexScroll;

View file

@ -4152,7 +4152,7 @@ s32 func_80839800(Player* this, GlobalContext* globalCtx) {
} }
if (doorShutter->dyna.actor.category == ACTORCAT_DOOR) { if (doorShutter->dyna.actor.category == ACTORCAT_DOOR) {
this->unk_46A = globalCtx->transitionActorList[(u16)doorShutter->dyna.actor.params >> 10] this->unk_46A = globalCtx->transiActorCtx.list[(u16)doorShutter->dyna.actor.params >> 10]
.sides[(doorDirection > 0) ? 0 : 1] .sides[(doorDirection > 0) ? 0 : 1]
.effects; .effects;
@ -4224,7 +4224,7 @@ s32 func_80839800(Player* this, GlobalContext* globalCtx) {
} }
} else { } else {
Camera_ChangeDoorCam(Gameplay_GetCamera(globalCtx, 0), doorActor, Camera_ChangeDoorCam(Gameplay_GetCamera(globalCtx, 0), doorActor,
globalCtx->transitionActorList[(u16)doorActor->params >> 10] globalCtx->transiActorCtx.list[(u16)doorActor->params >> 10]
.sides[(doorDirection > 0) ? 0 : 1] .sides[(doorDirection > 0) ? 0 : 1]
.effects, .effects,
0, 38.0f * D_808535EC, 26.0f * D_808535EC, 10.0f * D_808535EC); 0, 38.0f * D_808535EC, 26.0f * D_808535EC, 10.0f * D_808535EC);
@ -4233,7 +4233,7 @@ s32 func_80839800(Player* this, GlobalContext* globalCtx) {
} }
if ((this->doorType != PLAYER_DOORTYPE_FAKE) && (doorActor->category == ACTORCAT_DOOR)) { if ((this->doorType != PLAYER_DOORTYPE_FAKE) && (doorActor->category == ACTORCAT_DOOR)) {
frontRoom = globalCtx->transitionActorList[(u16)doorActor->params >> 10] frontRoom = globalCtx->transiActorCtx.list[(u16)doorActor->params >> 10]
.sides[(doorDirection > 0) ? 0 : 1] .sides[(doorDirection > 0) ? 0 : 1]
.room; .room;
@ -9035,7 +9035,7 @@ static Vec3f D_80854778 = { 0.0f, 50.0f, 0.0f };
void Player_Init(Actor* thisx, GlobalContext* globalCtx2) { void Player_Init(Actor* thisx, GlobalContext* globalCtx2) {
Player* this = THIS; Player* this = THIS;
GlobalContext* globalCtx = globalCtx2; GlobalContext* globalCtx = globalCtx2;
Scene* scene = globalCtx->loadedScene; SceneTableEntry* scene = globalCtx->loadedScene;
u32 titleFileSize; u32 titleFileSize;
s32 initMode; s32 initMode;
s32 sp50; s32 sp50;

View file

@ -35,14 +35,13 @@ u32 EffectSsBomb_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void*
return 1; return 1;
} }
static UNK_PTR sTextures[] = { void EffectSsBomb_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
static void* explosionTextures[] = {
gEffBombExplosion1Tex, gEffBombExplosion1Tex,
gEffBombExplosion2Tex, gEffBombExplosion2Tex,
gEffBombExplosion3Tex, gEffBombExplosion3Tex,
gEffBombExplosion4Tex, gEffBombExplosion4Tex,
}; };
void EffectSsBomb_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
MtxF mfTrans; MtxF mfTrans;
MtxF mfScale; MtxF mfScale;
@ -70,7 +69,7 @@ void EffectSsBomb_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
if (mtx != NULL) { if (mtx != NULL) {
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx])); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(explosionTextures[this->rTexIdx]));
gDPPipeSync(POLY_XLU_DISP++); gDPPipeSync(POLY_XLU_DISP++);
func_80094C50(gfxCtx); func_80094C50(gfxCtx);
color = this->life * 12.75f; color = this->life * 12.75f;

View file

@ -60,7 +60,7 @@ u32 EffectSsBomb2_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void
// unused in the original game. looks like EffectSsBomb but with color // unused in the original game. looks like EffectSsBomb but with color
void EffectSsBomb2_DrawFade(GlobalContext* globalCtx, u32 index, EffectSs* this) { void EffectSsBomb2_DrawFade(GlobalContext* globalCtx, u32 index, EffectSs* this) {
static UNK_PTR textures[] = { static void* textures[] = {
gEffBombExplosion1Tex, gEffBombExplosion2Tex, gEffBombExplosion3Tex, gEffBombExplosion4Tex, gEffBombExplosion1Tex, gEffBombExplosion2Tex, gEffBombExplosion3Tex, gEffBombExplosion4Tex,
gEffBombExplosion5Tex, gEffBombExplosion6Tex, gEffBombExplosion7Tex, gEffBombExplosion8Tex, gEffBombExplosion5Tex, gEffBombExplosion6Tex, gEffBombExplosion7Tex, gEffBombExplosion8Tex,
}; };
@ -100,7 +100,7 @@ void EffectSsBomb2_DrawFade(GlobalContext* globalCtx, u32 index, EffectSs* this)
} }
void EffectSsBomb2_DrawLayered(GlobalContext* globalCtx, u32 index, EffectSs* this) { void EffectSsBomb2_DrawLayered(GlobalContext* globalCtx, u32 index, EffectSs* this) {
static UNK_PTR textures[] = { static void* textures[] = {
gEffBombExplosion1Tex, gEffBombExplosion2Tex, gEffBombExplosion3Tex, gEffBombExplosion4Tex, gEffBombExplosion1Tex, gEffBombExplosion2Tex, gEffBombExplosion3Tex, gEffBombExplosion4Tex,
gEffBombExplosion5Tex, gEffBombExplosion6Tex, gEffBombExplosion7Tex, gEffBombExplosion8Tex, gEffBombExplosion5Tex, gEffBombExplosion6Tex, gEffBombExplosion7Tex, gEffBombExplosion8Tex,
}; };

View file

@ -56,7 +56,7 @@ u32 EffectSsDeadDb_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, voi
return 1; return 1;
} }
static UNK_PTR sTextures[] = { static void* sTextures[] = {
gEffEnemyDeathFlame1Tex, gEffEnemyDeathFlame2Tex, gEffEnemyDeathFlame3Tex, gEffEnemyDeathFlame4Tex, gEffEnemyDeathFlame1Tex, gEffEnemyDeathFlame2Tex, gEffEnemyDeathFlame3Tex, gEffEnemyDeathFlame4Tex,
gEffEnemyDeathFlame5Tex, gEffEnemyDeathFlame6Tex, gEffEnemyDeathFlame7Tex, gEffEnemyDeathFlame8Tex, gEffEnemyDeathFlame5Tex, gEffEnemyDeathFlame6Tex, gEffEnemyDeathFlame7Tex, gEffEnemyDeathFlame8Tex,
gEffEnemyDeathFlame9Tex, gEffEnemyDeathFlame10Tex, gEffEnemyDeathFlame9Tex, gEffEnemyDeathFlame10Tex,

View file

@ -76,11 +76,10 @@ u32 EffectSsDust_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void*
return 1; return 1;
} }
static UNK_PTR sTextures[] = { void EffectSsDust_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
static void* dustTextures[] = {
gDust1Tex, gDust2Tex, gDust3Tex, gDust4Tex, gDust5Tex, gDust6Tex, gDust7Tex, gDust8Tex, gDust1Tex, gDust2Tex, gDust3Tex, gDust4Tex, gDust5Tex, gDust6Tex, gDust7Tex, gDust8Tex,
}; };
void EffectSsDust_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
MtxF mfTrans; MtxF mfTrans;
MtxF mfScale; MtxF mfScale;
@ -104,7 +103,7 @@ void EffectSsDust_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
if (mtx != NULL) { if (mtx != NULL) {
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPPipeSync(POLY_XLU_DISP++); gDPPipeSync(POLY_XLU_DISP++);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx])); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(dustTextures[this->rTexIdx]));
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0); POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0);
gDPPipeSync(POLY_XLU_DISP++); gDPPipeSync(POLY_XLU_DISP++);

View file

@ -43,13 +43,13 @@ u32 EffectSsGFire_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void
} }
void EffectSsGFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) { void EffectSsGFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
UNK_PTR textures[] = { void* fireFootprintTextures[] = {
gEffFireFootprint1Tex, gEffFireFootprint2Tex, gEffFireFootprint3Tex, gEffFireFootprint4Tex, gEffFireFootprint1Tex, gEffFireFootprint2Tex, gEffFireFootprint3Tex, gEffFireFootprint4Tex,
gEffFireFootprint5Tex, gEffFireFootprint6Tex, gEffFireFootprint7Tex, gEffFireFootprint8Tex, gEffFireFootprint5Tex, gEffFireFootprint6Tex, gEffFireFootprint7Tex, gEffFireFootprint8Tex,
}; };
s16 texIdx = (this->rgTexIdx / 100) % 7; s16 texIdx = (this->rgTexIdx / 100) % 7;
EffectSs_DrawGEffect(globalCtx, this, textures[texIdx]); EffectSs_DrawGEffect(globalCtx, this, fireFootprintTextures[texIdx]);
} }
void EffectSsGFire_Update(GlobalContext* globalCtx, u32 index, EffectSs* this) { void EffectSsGFire_Update(GlobalContext* globalCtx, u32 index, EffectSs* this) {

View file

@ -75,7 +75,7 @@ void EffectSsGRipple_DrawRipple(GlobalContext* globalCtx, EffectSs* this, UNK_PT
radius = this->rRadius * 0.0025f; radius = this->rRadius * 0.0025f;
if ((this->rWaterBoxNum != -1) && (this->rWaterBoxNum < globalCtx->colCtx.colHeader->nbWaterBoxes)) { if ((this->rWaterBoxNum != -1) && (this->rWaterBoxNum < globalCtx->colCtx.colHeader->numWaterBoxes)) {
yPos = (this->rWaterBoxNum + globalCtx->colCtx.colHeader->waterBoxes)->ySurface; yPos = (this->rWaterBoxNum + globalCtx->colCtx.colHeader->waterBoxes)->ySurface;
} else { } else {
yPos = this->pos.y; yPos = this->pos.y;

View file

@ -65,14 +65,13 @@ u32 EffectSsGSpk_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void*
return 1; return 1;
} }
static UNK_PTR sTextures[] = { void EffectSsGSpk_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
static void* sparkTextures[] = {
gEffSpark1Tex, gEffSpark1Tex,
gEffSpark2Tex, gEffSpark2Tex,
gEffSpark3Tex, gEffSpark3Tex,
gEffSpark4Tex, gEffSpark4Tex,
}; };
void EffectSsGSpk_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
MtxF mfTrans; MtxF mfTrans;
MtxF mfScale; MtxF mfScale;
@ -94,7 +93,7 @@ void EffectSsGSpk_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
if (mtx != NULL) { if (mtx != NULL) {
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx])); gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sparkTextures[this->rTexIdx]));
func_80094BC4(gfxCtx); func_80094BC4(gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, 255); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, 255);
gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA); gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA);

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