Some of code_a5dd0_len_114e0.c (#240)

* match load_area_specific_entity_data

* wFog

* fix func_8011D72C type

* func_8011BAE8

* clone_model

* clean D_801512E0

* ~set_next_game_mode

* _set_game_mode

* gamemode funcs

* ~step_current_game_mode

* name funcs

* match queue_render_task

* tex panner funcs

* get_entity_type

* Entity::aabb

* GameMode::renderAux

* set_game_mode_slot

* game mode syms
This commit is contained in:
alex 2021-03-28 19:31:15 +01:00 committed by GitHub
parent 03dc313e03
commit c8da41b5e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 389 additions and 567 deletions

View File

@ -300,8 +300,8 @@ typedef struct Entity {
/* 0x06 */ u8 unk_06; /* 0x06 */ u8 unk_06;
/* 0x07 */ char unk_07[3]; /* 0x07 */ char unk_07[3];
/* 0x0A */ u8 unk_0A; /* 0x0A */ u8 unk_0A;
/* 0x0B */ u8 alpha; /* reported by rain */ /* 0x0B */ u8 alpha;
/* 0x0C */ s16 aabb[3]; /* 0x0C */ Vec3s aabb;
/* 0x12 */ char unk_12[2]; /* 0x12 */ char unk_12[2];
/* 0x14 */ s16 virtualModelIndex; /* 0x14 */ s16 virtualModelIndex;
/* 0x16 */ s16 shadowIndex; /* 0x16 */ s16 shadowIndex;
@ -310,7 +310,7 @@ typedef struct Entity {
/* 0x24 */ char unk_24[4]; /* 0x24 */ char unk_24[4];
/* 0x28 */ Bytecode* boundScript; /* 0x28 */ Bytecode* boundScript;
/* 0x2C */ char unk_2C[12]; /* 0x2C */ char unk_2C[12];
/* 0x38 */ struct StaticEntityData* static_data; /* 0x38 */ struct StaticEntityData* staticData;
/* 0x3C */ UNK_PTR unk_3C; // pointer to draw func(?) /* 0x3C */ UNK_PTR unk_3C; // pointer to draw func(?)
/* 0x40 */ void* dataBuf; /* 0x40 */ void* dataBuf;
/* 0x44 */ Mtx* vertexData; /* 0x44 */ Mtx* vertexData;
@ -339,7 +339,7 @@ typedef struct StaticEntityData {
/* 0x14 */ UNK_PTR unk_data_ptr2; /* 0x14 */ UNK_PTR unk_data_ptr2;
/* 0x18 */ s32 dmaStart; /* 0x18 */ s32 dmaStart;
/* 0x1C */ s32 dmaEnd; /* 0x1C */ s32 dmaEnd;
/* 0x20 */ s8 entityType; /* 0x20 */ u8 entityType;
/* 0x21 */ char unk_21[3]; /* 0x21 */ char unk_21[3];
} StaticEntityData; // size = 0x24 } StaticEntityData; // size = 0x24
@ -738,10 +738,10 @@ typedef struct Model {
/* 0x14 */ char unk_14[4]; /* 0x14 */ char unk_14[4];
/* 0x18 */ struct Matrix4s specialMatrix; /* 0x18 */ struct Matrix4s specialMatrix;
/* 0x58 */ Matrix4f transformMatrix; /* 0x58 */ Matrix4f transformMatrix;
/* 0x98 */ f32 center[3]; /* Created by retype action */ /* 0x98 */ f32 center[3];
/* 0xA4 */ u8 texPannerID; /* 0xA4 */ u8 texPannerID;
/* 0xA5 */ u8 specialDisplayListID; /* 0xA5 */ u8 specialDisplayListID;
/* 0xA6 */ u8 renderMode; /* Created by retype action */ /* 0xA6 */ u8 renderMode;
/* 0xA7 */ char unk_A7; /* 0xA7 */ char unk_A7;
/* 0xA8 */ u8 textureID; /* 0xA8 */ u8 textureID;
/* 0xA9 */ u8 unk_A9; /* 0xA9 */ u8 unk_A9;
@ -770,7 +770,7 @@ typedef AnimatedMesh* AnimatedMeshList[MAX_ANIMATED_MESHES];
typedef struct PrintHandle { typedef struct PrintHandle {
/* 0x000 */ char unk_00[16]; /* 0x000 */ char unk_00[16];
/* 0x010 */ s8* printbuf; /* Created by retype action */ /* 0x010 */ s8* printbuf;
/* 0x014 */ char unk_14[1344]; /* 0x014 */ char unk_14[1344];
} PrintHandle; // size = 0x554 } PrintHandle; // size = 0x554
@ -978,7 +978,7 @@ typedef struct GameStatus {
/* 0x083 */ s8 unk_83; /* 0x083 */ s8 unk_83;
/* 0x084 */ s8 unk_84; /* 0x084 */ s8 unk_84;
/* 0x085 */ char unk_85; /* 0x085 */ char unk_85;
/* 0x086 */ s16 areaID; /* Created by retype action */ /* 0x086 */ s16 areaID;
/* 0x088 */ s16 prevArea; /* 0x088 */ s16 prevArea;
/* 0x08A */ s16 changedArea; /* (1 = yes) */ /* 0x08A */ s16 changedArea; /* (1 = yes) */
/* 0x08C */ s16 mapID; /* 0x08C */ s16 mapID;
@ -1075,7 +1075,7 @@ typedef struct ItemEntityPhysicsData {
typedef struct RenderTask { typedef struct RenderTask {
/* 0x00 */ s32 renderMode; /* 0x00 */ s32 renderMode;
/* 0x04 */ s32 dist; /* value between 0 and -10k */ /* 0x04 */ s32 distance; /* value between 0 and -10k */
/* 0x08 */ struct Model* model; /* 0x08 */ struct Model* model;
/* 0x0C */ UNK_FUN_PTR(fpBuildDL); /* function for making display list for model */ /* 0x0C */ UNK_FUN_PTR(fpBuildDL); /* function for making display list for model */
} RenderTask; // size = 0x10 } RenderTask; // size = 0x10
@ -1278,7 +1278,7 @@ typedef struct PlayerPathElement {
typedef struct AnimatedModel { typedef struct AnimatedModel {
/* 0x00 */ s32 animModelID; /* 0x00 */ s32 animModelID;
/* 0x04 */ Vec3f pos; /* Created by retype action */ /* 0x04 */ Vec3f pos;
/* 0x10 */ Vec3f rot; /* 0x10 */ Vec3f rot;
/* 0x1C */ Vec3f scale; /* 0x1C */ Vec3f scale;
/* 0x28 */ struct Matrix4s* mtx; /* 0x28 */ struct Matrix4s* mtx;
@ -1478,20 +1478,20 @@ typedef struct Crash {
/* 0x000 */ char unk_00[20]; /* 0x000 */ char unk_00[20];
/* 0x014 */ s32 threadID; /* 0x014 */ s32 threadID;
/* 0x018 */ char unk_18[12]; /* 0x018 */ char unk_18[12];
/* 0x024 */ s64 AT; /* Created by retype action */ /* 0x024 */ s64 AT;
/* 0x02C */ s64 V0; /* Created by retype action */ /* 0x02C */ s64 V0;
/* 0x034 */ s64 V1; /* Created by retype action */ /* 0x034 */ s64 V1;
/* 0x03C */ s64 A0; /* Created by retype action */ /* 0x03C */ s64 A0;
/* 0x044 */ s64 A1; /* Created by retype action */ /* 0x044 */ s64 A1;
/* 0x04C */ s64 A2; /* Created by retype action */ /* 0x04C */ s64 A2;
/* 0x054 */ s64 A3; /* 0x054 */ s64 A3;
/* 0x05C */ char unk_5C[16]; /* 0x05C */ char unk_5C[16];
/* 0x06C */ s32 T2; /* 0x06C */ s32 T2;
/* 0x070 */ char unk_70[168]; /* 0x070 */ char unk_70[168];
/* 0x118 */ s32 SR; /* Created by retype action */ /* 0x118 */ s32 SR;
/* 0x11C */ s32 PC; /* 0x11C */ s32 PC;
/* 0x120 */ s32 interrupt; /* 0x120 */ s32 interrupt;
/* 0x124 */ s32 VA; /* Created by retype action */ /* 0x124 */ s32 VA;
/* 0x128 */ char unk_128[208]; /* 0x128 */ char unk_128[208];
} Crash; // size = 0x1F8 } Crash; // size = 0x1F8

View File

@ -1142,4 +1142,36 @@ typedef s8 PartnerID;
#define PartnerID_GOOMBARIA 10 #define PartnerID_GOOMBARIA 10
#define PartnerID_TWINK 11 #define PartnerID_TWINK 11
/// @see gAreas
enum {
AREA_KMR,
AREA_MAC,
AREA_TIK,
AREA_KGR,
AREA_KKJ,
AREA_HOS,
AREA_NOK,
AREA_TRD,
AREA_IWA,
AREA_DRO,
AREA_SBK,
AREA_ISK,
AREA_MIM,
AREA_OBK,
AREA_ARN,
AREA_DGB,
AREA_OMO,
AREA_JAN,
AREA_KZN,
AREA_FLO,
AREA_SAM,
AREA_PRA,
AREA_KPA,
AREA_OSR,
AREA_END,
AREA_MGM,
AREA_GV,
AREA_TST,
};
#endif #endif

View File

@ -42,6 +42,7 @@
#define MAX_SHADOWS 60 #define MAX_SHADOWS 60
#define MAX_ENTITIES 30 #define MAX_ENTITIES 30
#define MAX_DYNAMIC_ENTITIES 16 #define MAX_DYNAMIC_ENTITIES 16
#define MAX_TEX_PANNERS 16
// Alternative to libultra's M_PI: non-float version; more digits cause issues // Alternative to libultra's M_PI: non-float version; more digits cause issues
#define PI 3.141592f #define PI 3.141592f

View File

@ -18,7 +18,6 @@ extern GameStatus gGameStatus;
extern GameStatus* gGameStatusPtr; extern GameStatus* gGameStatusPtr;
extern s32 gRandSeed; extern s32 gRandSeed;
extern StaticItem gItemTable[364]; extern StaticItem gItemTable[364];
extern s16 gMainGameState; /* 0 = battle, 1 = pause, 2 = world */
extern UNK_FUN_PTR(gCurrentUpdateFunction); extern UNK_FUN_PTR(gCurrentUpdateFunction);
extern s32 gBattleState; extern s32 gBattleState;

View File

@ -25,7 +25,7 @@ void begin_state_intro(void) {
D_800A0964 = 0; D_800A0964 = 0;
// hos_05 (Star Sanctuary) // hos_05 (Star Sanctuary)
(*gameStatus)->areaID = 5; (*gameStatus)->areaID = AREA_HOS;
(*gameStatus)->mapID = 5; (*gameStatus)->mapID = 5;
(*gameStatus)->entryID = 3; (*gameStatus)->entryID = 3;
break; break;
@ -42,7 +42,7 @@ void begin_state_intro(void) {
D_800A0964 = 0; D_800A0964 = 0;
// hos_04 (Outside the Sanctuary) // hos_04 (Outside the Sanctuary)
(*gameStatus)->areaID = 5; (*gameStatus)->areaID = AREA_HOS;
(*gameStatus)->mapID = 4; (*gameStatus)->mapID = 4;
(*gameStatus)->entryID = 4; (*gameStatus)->entryID = 4;
break; break;

View File

@ -1,4 +1,38 @@
#include "common.h" #include "common.h"
#include "ld_addrs.h"
typedef struct Fog {
/* 0x00 */ s32 enabled;
/* 0x04 */ s32 r;
/* 0x08 */ s32 g;
/* 0x0C */ s32 b;
/* 0x10 */ s32 a;
/* 0x14 */ s32 startDistance;
/* 0x18 */ s32 endDistance;
} Fog; // size = 0x1C
typedef struct RenderTaskEntry {
/* 0x00 */ s32 unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ struct Model* model;
/* 0x0C */ UNK_FUN_PTR(fpBuildDL); /* function for making display list for model */
} RenderTaskEntry; // size = 0x10
typedef Model* SmallModelList[4];
extern SmallModelList* D_801512E0;
extern s32 D_8015132C;
extern Fog* wFog;
extern s32 D_801533B0; // num render task entries?
extern s32 D_801533AC;
extern s32 D_8014C188[]; // render mode -> distance map?
extern RenderTaskEntry* D_801533A0[];
extern s32 texPannerMainU[MAX_TEX_PANNERS];
extern s32 texPannerMainV[MAX_TEX_PANNERS];
extern s32 texPannerAuxU[MAX_TEX_PANNERS];
extern s32 texPannerAuxV[MAX_TEX_PANNERS];
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", update_entities); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", update_entities);
@ -69,7 +103,15 @@ ShadowList* get_shadow_list(void) {
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80110678); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80110678);
INCLUDE_ASM(u32, "code_a5dd0_len_114e0", get_entity_type, s32 arg0); u32 get_entity_type(s32 index) {
Entity* entity = get_entity_by_index(index);
if (entity == NULL) {
return -1;
} else {
return entity->staticData->entityType;
}
}
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", delete_entity); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", delete_entity);
@ -91,7 +133,25 @@ INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80110BCC);
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80110BF8); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80110BF8);
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", load_area_specific_entity_data); #ifdef NON_MATCHING
#define AREA_SPECIFIC_ENTITY_VRAM &entity_default_VRAM
#else
#define AREA_SPECIFIC_ENTITY_VRAM 0x802BAE00
#endif
void load_area_specific_entity_data(void) {
if (D_8015132C == 0) {
if (gGameStatusPtr->areaID == AREA_JAN || gGameStatusPtr->areaID == AREA_IWA) {
dma_copy(&entity_jan_iwa_ROM_START, &entity_jan_iwa_ROM_END, AREA_SPECIFIC_ENTITY_VRAM);
} else if (gGameStatusPtr->areaID == AREA_SBK || gGameStatusPtr->areaID == AREA_OMO) {
dma_copy(&entity_sbk_omo_ROM_START, &entity_sbk_omo_ROM_END, AREA_SPECIFIC_ENTITY_VRAM);
} else {
dma_copy(&entity_default_ROM_START, &entity_default_ROM_END, AREA_SPECIFIC_ENTITY_VRAM);
}
D_8015132C = 1;
}
}
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", clear_entity_data); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", clear_entity_data);
@ -168,26 +228,141 @@ void NOP_state(void) {
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80112B98); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80112B98);
typedef struct GameMode {
/* 0x00 */ u16 flags;
/* 0x04 */ void (*init)(void);
/* 0x08 */ void (*step)(struct GameMode*);
/* 0x0C */ UNK_FUN_PTR(unk_0C);
/* 0x10 */ void (*render)(void);
/* 0x14 */ void (*renderAux)(void); ///< @see func_80112FC4
} GameMode; // size = 0x18
extern GameMode gMainGameState[2]; // TODO rename
// regalloc?
#ifndef NON_MATCHING
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", set_next_game_mode); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", set_next_game_mode);
#else
GameMode* set_next_game_mode(GameMode* arg0) {
GameMode* gameMode;
s32 i;
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", _set_game_mode); for (i = 0; i < ARRAY_COUNT(gMainGameState); i++) {
gameMode = &gMainGameState[i];
if (gameMode->flags == 0) {
break;
}
}
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80112D84); ASSERT(i < ARRAY_COUNT(gMainGameState));
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80112DD4); gameMode->flags = 1 | 2;
gameMode->init = arg0->init;
gameMode->unk_08 = arg0->unk_08;
gameMode->render = arg0->render;
gameMode->unk_0C = NULL;
if (gameMode->init == NULL) gameMode->init = &NOP_state;
if (gameMode->step == NULL) gameMode->step = &NOP_state;
if (gameMode->unk_0C == NULL) gameMode->unk_0C = &NOP_state;
if (gameMode->render == NULL) gameMode->render = &NOP_state;
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80112DFC); gameMode->renderAux = &NOP_state;
gameMode->init();
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80112E24); return gameMode;
}
#endif
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80112E4C); GameMode* set_game_mode_slot(s32 i, GameMode* arg0) {
GameMode* gameModes = &gMainGameState;
GameMode* gameMode = &gameModes[i];
ASSERT(i < ARRAY_COUNT(gMainGameState));
gameMode->flags = 1 | 2;
gameMode->init = arg0->init;
gameMode->step = arg0->step;
gameMode->render = arg0->render;
gameMode->unk_0C = NULL;
if (gameMode->init == NULL) gameMode->init = &NOP_state;
if (gameMode->step == NULL) gameMode->step = &NOP_state;
if (gameMode->unk_0C == NULL) gameMode->unk_0C = &NOP_state;
if (gameMode->render == NULL) gameMode->render = &NOP_state;
gameMode->renderAux = &NOP_state;
gameMode->init();
return gameMode;
}
void func_80112D84(s32 i, void (*fn)(void)) {
GameMode* gameModes = &gMainGameState;
GameMode* gameMode = &gameModes[i];
ASSERT(i < ARRAY_COUNT(gMainGameState));
gameMode->renderAux = fn;
gameMode->flags |= 0x20;
if (fn == NULL) {
gameMode->renderAux = &NOP_state;
}
}
void func_80112DD4(s32 i) {
GameMode* gameModes = &gMainGameState;
GameMode* gameMode = &gameModes[i];
gameMode->flags |= 4;
}
void func_80112DFC(s32 i) {
GameMode* gameModes = &gMainGameState;
GameMode* gameMode = &gameModes[i];
gameMode->flags |= 8;
}
void func_80112E24(s32 i) {
GameMode* gameModes = &gMainGameState;
GameMode* gameMode = &gameModes[i];
gameMode->flags &= ~0x1C;
}
void func_80112E4C(s32 i) {
GameMode* gameModes = &gMainGameState;
GameMode* gameMode = &gameModes[i];
gameMode->flags &= ~0x0C;
gameMode->flags |= 0x10;
}
#ifndef NON_MATCHING
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", step_current_game_mode); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", step_current_game_mode);
#else
void step_current_game_mode(void) {
GameMode* gameMode;
s32 i;
for (i = 0; i < ARRAY_COUNT(gMainGameState); i++) {
gameMode = &gMainGameState[i];
if (gameMode->flags != 0 && !(gameMode->flags & 4) && !(gameMode->flags & 8)) {
gameMode->flags &= ~2;
gameMode->step(gameMode);
}
}
//return i;
}
#endif
// similar to step_current_game_mode, but calls unk_0C
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80112EEC); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80112EEC);
// similar to step_current_game_mode, but calls render
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", render_ui); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", render_ui);
// calls renderAux and render
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80112FC4); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_80112FC4);
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", appendGfx_model); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", appendGfx_model);
@ -255,39 +430,108 @@ INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011B5D0);
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011B660); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011B660);
INCLUDE_ASM(void, "code_a5dd0_len_114e0", clone_model, u16 srcModelID, u16 newModelID); void clone_model(u16 srcModelID, u16 newModelID) {
ModelList** modelList = &gCurrentModelListPtr;
Model* srcModel = get_model_from_list_index(get_model_list_index_from_tree_index(srcModelID));
Model* newModel;
s32 i;
for (i = 0; i < ARRAY_COUNT(**modelList); i++) {
Model* model = (**modelList)[i];
if (model == NULL) {
break;
}
}
(**modelList)[i] = newModel = heap_malloc(sizeof(Model));
*newModel = *srcModel;
newModel->modelID = newModelID;
}
INCLUDE_ASM(void, "code_a5dd0_len_114e0", func_8011B7C0, u16 arg0, s32 arg1, s32 arg2); INCLUDE_ASM(void, "code_a5dd0_len_114e0", func_8011B7C0, u16 arg0, s32 arg1, s32 arg2);
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011B950); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011B950);
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011BAE8); void func_8011BAE8(void) {
s32 i;
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", enable_world_fog); for (i = 0; i < ARRAY_COUNT(*gCurrentModelListPtr); i++) {
Model* model = (*gCurrentModelListPtr)[i];
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", disable_world_fog); if (model != NULL) {
model->flags &= ~0x0400;
}
}
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", set_world_fog_dist); for (i = 0; i < ARRAY_COUNT(*D_801512E0); i++) {
Model* model = (*D_801512E0)[i];
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", set_world_fog_color); if (model != NULL) {
model->flags &= ~0x0400;
}
}
}
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", is_world_fog_enabled); void enable_world_fog(void) {
wFog->enabled = TRUE;
}
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", get_world_fog_distance); void disable_world_fog(void) {
wFog->enabled = FALSE;
}
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", get_world_fog_color); void set_world_fog_dist(s32 start, s32 end) {
wFog->startDistance = start;
wFog->endDistance = end;
}
void set_world_fog_color(s32 r, s32 g, s32 b, s32 a) {
wFog->r = r;
wFog->g = g;
wFog->b = b;
wFog->a = a;
}
s32 is_world_fog_enabled(void) {
return wFog->enabled;
}
void get_world_fog_distance(s32* start, s32* end) {
Fog** fog = &wFog;
*start = (*fog)->startDistance;
*end = (*fog)->endDistance;
}
void get_world_fog_color(s32* r, s32* g, s32* b, s32* a) {
Fog** fog = &wFog;
*r = (*fog)->r;
*g = (*fog)->g;
*b = (*fog)->b;
*a = (*fog)->a;
}
void set_tex_panner(Model* model, s8 texPannerID) { void set_tex_panner(Model* model, s8 texPannerID) {
model->texPannerID = texPannerID; model->texPannerID = texPannerID;
} }
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", set_main_pan_u); void set_main_pan_u(s32 texPannerID, s32 value) {
texPannerMainU[texPannerID] = value;
}
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", set_main_pan_v); void set_main_pan_v(s32 texPannerID, s32 value) {
texPannerMainV[texPannerID] = value;
}
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", set_aux_pan_u); void set_aux_pan_u(s32 texPannerID, s32 value) {
texPannerAuxU[texPannerID] = value;
}
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", set_aux_pan_v); void set_aux_pan_v(s32 texPannerID, s32 value) {
texPannerAuxV[texPannerID] = value;
}
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011BC7C); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011BC7C);
@ -330,8 +574,8 @@ INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011C80C);
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011CFBC); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011CFBC);
void func_8011D72C(Gfx** arg0, s32 treeIndex) { void func_8011D72C(Gfx** arg0, u16 treeIndex) {
Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(treeIndex & 0xFFFF)); Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(treeIndex));
Model copied = *model; Model copied = *model;
Gfx** gfxPos = &gMasterGfxPos; Gfx** gfxPos = &gMasterGfxPos;
Gfx* oldGfxPos; Gfx* oldGfxPos;
@ -362,6 +606,23 @@ INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011D890);
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011D8D0); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011D8D0);
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", queue_render_task); RenderTaskEntry* queue_render_task(RenderTask* task) {
RenderTaskEntry* entry = D_801533A0[D_801533AC];
ASSERT(D_801533B0 < 0x100);
entry = &entry[D_801533B0++];
entry->unk_00 = 1;
if (task->renderMode == 0x2D) {
entry->unk_00 = 0x21;
}
entry->model = task->model;
entry->fpBuildDL = task->fpBuildDL;
entry->unk_04 = D_8014C188[task->renderMode] - task->distance;
return entry;
}
INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011D9B8); INCLUDE_ASM(s32, "code_a5dd0_len_114e0", func_8011D9B8);

View File

@ -1,7 +1,7 @@
#include "common.h" #include "common.h"
extern s16 D_800A08F0; extern s16 D_800A08F0;
extern s32 D_80077850[]; extern s32 gameModeMap[];
INCLUDE_ASM(s32, "code_d610_len_1330", func_80032210); INCLUDE_ASM(s32, "code_d610_len_1330", func_80032210);
@ -22,7 +22,7 @@ void func_800334E8(void) {
void set_game_mode(s16 idx) { void set_game_mode(s16 idx) {
D_800A08F0 = idx; D_800A08F0 = idx;
_set_game_mode(0, D_80077850[idx]); set_game_mode_slot(0, gameModeMap[idx]);
} }
s16 get_game_mode(void) { s16 get_game_mode(void) {

View File

@ -116,7 +116,6 @@ void clear_script_list(void) {
} }
void init_script_list(void) { void init_script_list(void) {
if (gGameStatusPtr->isBattle == 0) { if (gGameStatusPtr->isBattle == 0) {
gCurrentScriptListPtr = &gWorldScriptList; gCurrentScriptListPtr = &gWorldScriptList;
gMapVars = gWorldMapVars; gMapVars = gWorldMapVars;

View File

@ -47,7 +47,7 @@ glabel D_80077400
glabel gCurrentCameraID glabel gCurrentCameraID
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000E4, 0x000000E1, 0x000000EB, 0x000000EF, 0x000000F6, 0x0000010A, 0x0000010C, 0x00000121, 0x00000122, 0x00000123, 0x00000118, 0x0000010E, 0x00000131, 0x0000012E, 0x0000012F, 0x000000E0, 0x000000EE, 0x000000F0, 0x00000109, 0x0000010B, 0x00000107, 0x000000E8, 0x00000117, 0x00000108, 0x00000124, 0x00000125, 0x00000126, 0x0000010F, 0x0000012B, 0x0000012C, 0x000000E9, 0x00000106, 0x00000143, 0x000000ED, 0x00000129, 0x0000012A, 0x000000E7, 0x000000F8, 0x000000FF, 0x00000140, 0x00000105, 0x00000110, 0x00000119, 0x000000E3, 0x00000116, 0x00000113, 0x000000F4, 0x000000E2, 0x000000F5, 0x00000115, 0x00000101, 0x00000102, 0x0000012D, 0x00000111, 0x0000010D, 0x00000112, 0x000000F9, 0x00000130, 0x000000FB, 0x000000FA, 0x000000EC, 0x000000E5, 0x00000150, 0x000000F2, 0x00000100, 0x000000F1, 0x00000114, 0x000000F7, 0x000000F3, 0x00000145, 0x00000146, 0x00000147, 0x00000148, 0x00000149, 0x00000104, 0x000000FC, 0x00000103, 0x0000011A, 0x0000011B, 0x000000FD, 0x00000144, 0x0000011E, 0x000000FE, 0x0000011F, 0x0000011D, 0x0000011C, 0x000000E6, 0x00000120, 0x00000080, 0x00000081, 0x00000082, 0x00000084, 0x00000083, 0x00000086, 0x00000085, 0x00000088, 0x0000008B, 0x0000008A, 0x0000008C, 0x0000008E, 0x00000095, 0x0000008D, 0x00000089, 0x0000009B, 0x0000009E, 0x0000009F, 0x000000A0, 0x000000A1, 0x0000009D, 0x0000009C, 0x000000A4, 0x000000A3, 0x000000A2, 0x00000093, 0x00000094, 0x000000A5, 0x000000A6, 0x000000A7, 0x000000A8, 0x000000A9, 0x000000AA, 0x000000AB, 0x000000AC, 0x000000AD, 0x000000AE, 0x000000AF, 0x0000008F, 0x00000090, 0x00000091, 0x00000092, 0x0000009A, 0x00000098, 0x00000096, 0x00000097, 0x00000087, 0x000000B0, 0x000000B1, 0x000000B2, 0x000000B3, 0x000000B4, 0x000000B5, 0x000000B6, 0x000000B9, 0x000000B8, 0x000000B7, 0x000000BA, 0x000000BD, 0x000000BB, 0x000000BE, 0x000000BF, 0x000000BC, 0x000000C0, 0x000000C1, 0x000000C2, 0x000000C3, 0x000000C4, 0x000000C5, 0x000000C6, 0x000000C7, 0x000000C8, 0x000000C9, 0x000000CA, 0x000000CB, 0x000000CC, 0x000000CD, 0x000000CE, 0x000000CF, 0x000000D0, 0x000000D1, 0x000000D2, 0x000000D3, 0x000000D4, 0x000000D5, 0x000000D6, 0x000000D7, 0x000000D8, 0x000000D9, 0x000000DA, 0x00000000, begin_state_init, step_init_state, 0x00000000, state_drawUI_startup, 0x00000000, begin_state_logos, step_logos, 0x00000000, func_80034388, 0x00000000, begin_state_title_screen, step_title_screen, 0x00000000, func_800375A4, 0x00000000, func_80035E00, func_80035EEC, 0x00000000, func_800360FC, 0x00000000, func_80036130, func_8003617C, 0x00000000, func_800363FC, 0x00000000, func_80036430, func_8003646C, 0x00000000, func_80036640, 0x00000000, func_80035E24, func_80035EEC, 0x00000000, func_800360FC, 0x00000000, begin_state_world, step_world, 0x00000000, func_80035DA0, 0x00000000, begin_state_battle, step_battle, 0x00000000, func_80033B54, 0x00000000, func_80033B88, func_80033BC0, 0x00000000, func_80033E64, 0x00000000, begin_state_pause_menu, step_pause_menu, 0x00000000, func_80034BF4, 0x00000000, func_80034BFC, func_80034C3C, 0x00000000, func_80034FF0, 0x00000000, state_init_language_select, state_step_language_select, 0x00000000, state_drawUI_language_select, 0x00000000, func_800355D4, func_80035704, 0x00000000, func_80035D18, 0x00000000, state_init_file_select, func_800354EC, 0x00000000, state_drawUI_file_select, 0x00000000, func_80035660, func_80035B40, 0x00000000, func_80035D20, 0x00000000, begin_state_intro, step_intro, 0x00000000, func_80036DE0, 0x00000000, init_demo_data, next_demo_scene, 0x00000000, func_8003845C .word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000E4, 0x000000E1, 0x000000EB, 0x000000EF, 0x000000F6, 0x0000010A, 0x0000010C, 0x00000121, 0x00000122, 0x00000123, 0x00000118, 0x0000010E, 0x00000131, 0x0000012E, 0x0000012F, 0x000000E0, 0x000000EE, 0x000000F0, 0x00000109, 0x0000010B, 0x00000107, 0x000000E8, 0x00000117, 0x00000108, 0x00000124, 0x00000125, 0x00000126, 0x0000010F, 0x0000012B, 0x0000012C, 0x000000E9, 0x00000106, 0x00000143, 0x000000ED, 0x00000129, 0x0000012A, 0x000000E7, 0x000000F8, 0x000000FF, 0x00000140, 0x00000105, 0x00000110, 0x00000119, 0x000000E3, 0x00000116, 0x00000113, 0x000000F4, 0x000000E2, 0x000000F5, 0x00000115, 0x00000101, 0x00000102, 0x0000012D, 0x00000111, 0x0000010D, 0x00000112, 0x000000F9, 0x00000130, 0x000000FB, 0x000000FA, 0x000000EC, 0x000000E5, 0x00000150, 0x000000F2, 0x00000100, 0x000000F1, 0x00000114, 0x000000F7, 0x000000F3, 0x00000145, 0x00000146, 0x00000147, 0x00000148, 0x00000149, 0x00000104, 0x000000FC, 0x00000103, 0x0000011A, 0x0000011B, 0x000000FD, 0x00000144, 0x0000011E, 0x000000FE, 0x0000011F, 0x0000011D, 0x0000011C, 0x000000E6, 0x00000120, 0x00000080, 0x00000081, 0x00000082, 0x00000084, 0x00000083, 0x00000086, 0x00000085, 0x00000088, 0x0000008B, 0x0000008A, 0x0000008C, 0x0000008E, 0x00000095, 0x0000008D, 0x00000089, 0x0000009B, 0x0000009E, 0x0000009F, 0x000000A0, 0x000000A1, 0x0000009D, 0x0000009C, 0x000000A4, 0x000000A3, 0x000000A2, 0x00000093, 0x00000094, 0x000000A5, 0x000000A6, 0x000000A7, 0x000000A8, 0x000000A9, 0x000000AA, 0x000000AB, 0x000000AC, 0x000000AD, 0x000000AE, 0x000000AF, 0x0000008F, 0x00000090, 0x00000091, 0x00000092, 0x0000009A, 0x00000098, 0x00000096, 0x00000097, 0x00000087, 0x000000B0, 0x000000B1, 0x000000B2, 0x000000B3, 0x000000B4, 0x000000B5, 0x000000B6, 0x000000B9, 0x000000B8, 0x000000B7, 0x000000BA, 0x000000BD, 0x000000BB, 0x000000BE, 0x000000BF, 0x000000BC, 0x000000C0, 0x000000C1, 0x000000C2, 0x000000C3, 0x000000C4, 0x000000C5, 0x000000C6, 0x000000C7, 0x000000C8, 0x000000C9, 0x000000CA, 0x000000CB, 0x000000CC, 0x000000CD, 0x000000CE, 0x000000CF, 0x000000D0, 0x000000D1, 0x000000D2, 0x000000D3, 0x000000D4, 0x000000D5, 0x000000D6, 0x000000D7, 0x000000D8, 0x000000D9, 0x000000DA, 0x00000000, begin_state_init, step_init_state, 0x00000000, state_drawUI_startup, 0x00000000, begin_state_logos, step_logos, 0x00000000, func_80034388, 0x00000000, begin_state_title_screen, step_title_screen, 0x00000000, func_800375A4, 0x00000000, func_80035E00, func_80035EEC, 0x00000000, func_800360FC, 0x00000000, func_80036130, func_8003617C, 0x00000000, func_800363FC, 0x00000000, func_80036430, func_8003646C, 0x00000000, func_80036640, 0x00000000, func_80035E24, func_80035EEC, 0x00000000, func_800360FC, 0x00000000, begin_state_world, step_world, 0x00000000, func_80035DA0, 0x00000000, begin_state_battle, step_battle, 0x00000000, func_80033B54, 0x00000000, func_80033B88, func_80033BC0, 0x00000000, func_80033E64, 0x00000000, begin_state_pause_menu, step_pause_menu, 0x00000000, func_80034BF4, 0x00000000, func_80034BFC, func_80034C3C, 0x00000000, func_80034FF0, 0x00000000, state_init_language_select, state_step_language_select, 0x00000000, state_drawUI_language_select, 0x00000000, func_800355D4, func_80035704, 0x00000000, func_80035D18, 0x00000000, state_init_file_select, func_800354EC, 0x00000000, state_drawUI_file_select, 0x00000000, func_80035660, func_80035B40, 0x00000000, func_80035D20, 0x00000000, begin_state_intro, step_intro, 0x00000000, func_80036DE0, 0x00000000, init_demo_data, next_demo_scene, 0x00000000, func_8003845C
glabel D_80077850 glabel gameModeMap
.word 0x800776E8, 0x800776FC, 0x80077710, 0x80077724, 0x80077774, 0x80077738, 0x8007774C, 0x80077760, 0x80077788, 0x8007779C, 0x800777B0, 0x800777C4, 0x800777D8, 0x800777EC, 0x80077800, 0x80077814, 0x80077828, 0x8007783C, 0x00000000, 0x00000000 .word 0x800776E8, 0x800776FC, 0x80077710, 0x80077724, 0x80077774, 0x80077738, 0x8007774C, 0x80077760, 0x80077788, 0x8007779C, 0x800777B0, 0x800777C4, 0x800777D8, 0x800777EC, 0x80077800, 0x80077814, 0x80077828, 0x8007783C, 0x00000000, 0x00000000
glabel D_800778A0 glabel D_800778A0

View File

@ -1,65 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel _set_game_mode
/* A93A8 80112CA8 27BDFFE8 */ addiu $sp, $sp, -0x18
/* A93AC 80112CAC 3C038015 */ lui $v1, %hi(gMainGameState)
/* A93B0 80112CB0 24631700 */ addiu $v1, $v1, %lo(gMainGameState)
/* A93B4 80112CB4 00041040 */ sll $v0, $a0, 1
/* A93B8 80112CB8 00441021 */ addu $v0, $v0, $a0
/* A93BC 80112CBC 000210C0 */ sll $v0, $v0, 3
/* A93C0 80112CC0 AFB00010 */ sw $s0, 0x10($sp)
/* A93C4 80112CC4 00438021 */ addu $s0, $v0, $v1
/* A93C8 80112CC8 28840002 */ slti $a0, $a0, 2
/* A93CC 80112CCC 14800003 */ bnez $a0, .L80112CDC
/* A93D0 80112CD0 AFBF0014 */ sw $ra, 0x14($sp)
.L80112CD4:
/* A93D4 80112CD4 08044B35 */ j .L80112CD4
/* A93D8 80112CD8 00000000 */ nop
.L80112CDC:
/* A93DC 80112CDC 24020003 */ addiu $v0, $zero, 3
/* A93E0 80112CE0 A6020000 */ sh $v0, ($s0)
/* A93E4 80112CE4 8CA20004 */ lw $v0, 4($a1)
/* A93E8 80112CE8 AE020004 */ sw $v0, 4($s0)
/* A93EC 80112CEC 8CA20008 */ lw $v0, 8($a1)
/* A93F0 80112CF0 8E030004 */ lw $v1, 4($s0)
/* A93F4 80112CF4 AE020008 */ sw $v0, 8($s0)
/* A93F8 80112CF8 8CA20010 */ lw $v0, 0x10($a1)
/* A93FC 80112CFC AE00000C */ sw $zero, 0xc($s0)
/* A9400 80112D00 14600004 */ bnez $v1, .L80112D14
/* A9404 80112D04 AE020010 */ sw $v0, 0x10($s0)
/* A9408 80112D08 3C028011 */ lui $v0, %hi(NOP_state)
/* A940C 80112D0C 24422B90 */ addiu $v0, $v0, %lo(NOP_state)
/* A9410 80112D10 AE020004 */ sw $v0, 4($s0)
.L80112D14:
/* A9414 80112D14 8E020008 */ lw $v0, 8($s0)
/* A9418 80112D18 14400004 */ bnez $v0, .L80112D2C
/* A941C 80112D1C 00000000 */ nop
/* A9420 80112D20 3C028011 */ lui $v0, %hi(NOP_state)
/* A9424 80112D24 24422B90 */ addiu $v0, $v0, %lo(NOP_state)
/* A9428 80112D28 AE020008 */ sw $v0, 8($s0)
.L80112D2C:
/* A942C 80112D2C 8E02000C */ lw $v0, 0xc($s0)
/* A9430 80112D30 14400004 */ bnez $v0, .L80112D44
/* A9434 80112D34 00000000 */ nop
/* A9438 80112D38 3C028011 */ lui $v0, %hi(NOP_state)
/* A943C 80112D3C 24422B90 */ addiu $v0, $v0, %lo(NOP_state)
/* A9440 80112D40 AE02000C */ sw $v0, 0xc($s0)
.L80112D44:
/* A9444 80112D44 8E020010 */ lw $v0, 0x10($s0)
/* A9448 80112D48 14400004 */ bnez $v0, .L80112D5C
/* A944C 80112D4C 00000000 */ nop
/* A9450 80112D50 3C028011 */ lui $v0, %hi(NOP_state)
/* A9454 80112D54 24422B90 */ addiu $v0, $v0, %lo(NOP_state)
/* A9458 80112D58 AE020010 */ sw $v0, 0x10($s0)
.L80112D5C:
/* A945C 80112D5C 8E030004 */ lw $v1, 4($s0)
/* A9460 80112D60 3C028011 */ lui $v0, %hi(NOP_state)
/* A9464 80112D64 24422B90 */ addiu $v0, $v0, %lo(NOP_state)
/* A9468 80112D68 0060F809 */ jalr $v1
/* A946C 80112D6C AE020014 */ sw $v0, 0x14($s0)
/* A9470 80112D70 0200102D */ daddu $v0, $s0, $zero
/* A9474 80112D74 8FBF0014 */ lw $ra, 0x14($sp)
/* A9478 80112D78 8FB00010 */ lw $s0, 0x10($sp)
/* A947C 80112D7C 03E00008 */ jr $ra
/* A9480 80112D80 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -89,8 +89,8 @@ glabel appendGfx_model
/* A9860 80113160 1040000B */ beqz $v0, .L80113190 /* A9860 80113160 1040000B */ beqz $v0, .L80113190
/* A9864 80113164 00000000 */ nop /* A9864 80113164 00000000 */ nop
.L80113168: .L80113168:
/* A9868 80113168 3C028015 */ lui $v0, %hi(D_80153264) /* A9868 80113168 3C028015 */ lui $v0, %hi(wFog)
/* A986C 8011316C 8C423264 */ lw $v0, %lo(D_80153264)($v0) /* A986C 8011316C 8C423264 */ lw $v0, %lo(wFog)($v0)
/* A9870 80113170 8C420000 */ lw $v0, ($v0) /* A9870 80113170 8C420000 */ lw $v0, ($v0)
/* A9874 80113174 10400006 */ beqz $v0, .L80113190 /* A9874 80113174 10400006 */ beqz $v0, .L80113190
/* A9878 80113178 33020040 */ andi $v0, $t8, 0x40 /* A9878 80113178 33020040 */ andi $v0, $t8, 0x40
@ -1017,8 +1017,8 @@ glabel L80113E48_AA548
/* AA57C 80113E7C 3C018015 */ lui $at, %hi(D_8014AFC0) /* AA57C 80113E7C 3C018015 */ lui $at, %hi(D_8014AFC0)
/* AA580 80113E80 00220821 */ addu $at, $at, $v0 /* AA580 80113E80 00220821 */ addu $at, $at, $v0
/* AA584 80113E84 8C22AFC0 */ lw $v0, %lo(D_8014AFC0)($at) /* AA584 80113E84 8C22AFC0 */ lw $v0, %lo(D_8014AFC0)($at)
/* AA588 80113E88 3C088015 */ lui $t0, %hi(D_80153264) /* AA588 80113E88 3C088015 */ lui $t0, %hi(wFog)
/* AA58C 80113E8C 25083264 */ addiu $t0, $t0, %lo(D_80153264) /* AA58C 80113E8C 25083264 */ addiu $t0, $t0, %lo(wFog)
/* AA590 80113E90 AC820004 */ sw $v0, 4($a0) /* AA590 80113E90 AC820004 */ sw $v0, 4($a0)
/* AA594 80113E94 8D050000 */ lw $a1, ($t0) /* AA594 80113E94 8D050000 */ lw $a1, ($t0)
/* AA598 80113E98 3C02F800 */ lui $v0, 0xf800 /* AA598 80113E98 3C02F800 */ lui $v0, 0xf800
@ -1286,8 +1286,8 @@ glabel L80114234_AA934
/* AA948 80114248 AE020000 */ sw $v0, ($s0) /* AA948 80114248 AE020000 */ sw $v0, ($s0)
/* AA94C 8011424C 0040282D */ daddu $a1, $v0, $zero /* AA94C 8011424C 0040282D */ daddu $a1, $v0, $zero
/* AA950 80114250 3C02F800 */ lui $v0, 0xf800 /* AA950 80114250 3C02F800 */ lui $v0, 0xf800
/* AA954 80114254 3C038015 */ lui $v1, %hi(D_80153264) /* AA954 80114254 3C038015 */ lui $v1, %hi(wFog)
/* AA958 80114258 8C633264 */ lw $v1, %lo(D_80153264)($v1) /* AA958 80114258 8C633264 */ lw $v1, %lo(wFog)($v1)
/* AA95C 8011425C 00A0402D */ daddu $t0, $a1, $zero /* AA95C 8011425C 00A0402D */ daddu $t0, $a1, $zero
/* AA960 80114260 ACE20000 */ sw $v0, ($a3) /* AA960 80114260 ACE20000 */ sw $v0, ($a3)
/* AA964 80114264 90620007 */ lbu $v0, 7($v1) /* AA964 80114264 90620007 */ lbu $v0, 7($v1)
@ -1394,8 +1394,8 @@ glabel L801143A8_AAAA8
.L801143AC: .L801143AC:
/* AAAAC 801143AC 3C02DE00 */ lui $v0, 0xde00 /* AAAAC 801143AC 3C02DE00 */ lui $v0, 0xde00
/* AAAB0 801143B0 8E0B0000 */ lw $t3, ($s0) /* AAAB0 801143B0 8E0B0000 */ lw $t3, ($s0)
/* AAAB4 801143B4 3C0A8015 */ lui $t2, %hi(D_80153264) /* AAAB4 801143B4 3C0A8015 */ lui $t2, %hi(wFog)
/* AAAB8 801143B8 8D4A3264 */ lw $t2, %lo(D_80153264)($t2) /* AAAB8 801143B8 8D4A3264 */ lw $t2, %lo(wFog)($t2)
/* AAABC 801143BC 0160182D */ daddu $v1, $t3, $zero /* AAABC 801143BC 0160182D */ daddu $v1, $t3, $zero
/* AAAC0 801143C0 AC620000 */ sw $v0, ($v1) /* AAAC0 801143C0 AC620000 */ sw $v0, ($v1)
/* AAAC4 801143C4 00051080 */ sll $v0, $a1, 2 /* AAAC4 801143C4 00051080 */ sll $v0, $a1, 2
@ -1665,20 +1665,20 @@ glabel L80114690_AAD90
/* AAE9C 8011479C 33020100 */ andi $v0, $t8, 0x100 /* AAE9C 8011479C 33020100 */ andi $v0, $t8, 0x100
/* AAEA0 801147A0 92C200A4 */ lbu $v0, 0xa4($s6) /* AAEA0 801147A0 92C200A4 */ lbu $v0, 0xa4($s6)
/* AAEA4 801147A4 00021080 */ sll $v0, $v0, 2 /* AAEA4 801147A4 00021080 */ sll $v0, $v0, 2
/* AAEA8 801147A8 3C038015 */ lui $v1, %hi(D_80153268) /* AAEA8 801147A8 3C038015 */ lui $v1, %hi(texPannerMainU)
/* AAEAC 801147AC 00621821 */ addu $v1, $v1, $v0 /* AAEAC 801147AC 00621821 */ addu $v1, $v1, $v0
/* AAEB0 801147B0 8C633268 */ lw $v1, %lo(D_80153268)($v1) /* AAEB0 801147B0 8C633268 */ lw $v1, %lo(texPannerMainU)($v1)
/* AAEB4 801147B4 3C048015 */ lui $a0, %hi(D_801532A8) /* AAEB4 801147B4 3C048015 */ lui $a0, %hi(texPannerMainV)
/* AAEB8 801147B8 00822021 */ addu $a0, $a0, $v0 /* AAEB8 801147B8 00822021 */ addu $a0, $a0, $v0
/* AAEBC 801147BC 8C8432A8 */ lw $a0, %lo(D_801532A8)($a0) /* AAEBC 801147BC 8C8432A8 */ lw $a0, %lo(texPannerMainV)($a0)
/* AAEC0 801147C0 00033A03 */ sra $a3, $v1, 8 /* AAEC0 801147C0 00033A03 */ sra $a3, $v1, 8
/* AAEC4 801147C4 00044203 */ sra $t0, $a0, 8 /* AAEC4 801147C4 00044203 */ sra $t0, $a0, 8
/* AAEC8 801147C8 3C038015 */ lui $v1, %hi(D_801532E8) /* AAEC8 801147C8 3C038015 */ lui $v1, %hi(texPannerAuxU)
/* AAECC 801147CC 00621821 */ addu $v1, $v1, $v0 /* AAECC 801147CC 00621821 */ addu $v1, $v1, $v0
/* AAED0 801147D0 8C6332E8 */ lw $v1, %lo(D_801532E8)($v1) /* AAED0 801147D0 8C6332E8 */ lw $v1, %lo(texPannerAuxU)($v1)
/* AAED4 801147D4 3C018015 */ lui $at, %hi(D_80153328) /* AAED4 801147D4 3C018015 */ lui $at, %hi(texPannerAuxV)
/* AAED8 801147D8 00220821 */ addu $at, $at, $v0 /* AAED8 801147D8 00220821 */ addu $at, $at, $v0
/* AAEDC 801147DC 8C223328 */ lw $v0, %lo(D_80153328)($at) /* AAEDC 801147DC 8C223328 */ lw $v0, %lo(texPannerAuxV)($at)
/* AAEE0 801147E0 00025203 */ sra $t2, $v0, 8 /* AAEE0 801147E0 00025203 */ sra $t2, $v0, 8
/* AAEE4 801147E4 24020002 */ addiu $v0, $zero, 2 /* AAEE4 801147E4 24020002 */ addiu $v0, $zero, 2
/* AAEE8 801147E8 13C20006 */ beq $fp, $v0, .L80114804 /* AAEE8 801147E8 13C20006 */ beq $fp, $v0, .L80114804

View File

@ -86,8 +86,8 @@ glabel clear_model_data
/* AC584 80115E84 3C028015 */ lui $v0, %hi(D_80153248) /* AC584 80115E84 3C028015 */ lui $v0, %hi(D_80153248)
/* AC588 80115E88 24423248 */ addiu $v0, $v0, %lo(D_80153248) /* AC588 80115E88 24423248 */ addiu $v0, $v0, %lo(D_80153248)
.L80115E8C: .L80115E8C:
/* AC58C 80115E8C 3C018015 */ lui $at, %hi(D_80153264) /* AC58C 80115E8C 3C018015 */ lui $at, %hi(wFog)
/* AC590 80115E90 AC223264 */ sw $v0, %lo(D_80153264)($at) /* AC590 80115E90 AC223264 */ sw $v0, %lo(wFog)($at)
/* AC594 80115E94 3C028015 */ lui $v0, %hi(gCurrentModelListPtr) /* AC594 80115E94 3C028015 */ lui $v0, %hi(gCurrentModelListPtr)
/* AC598 80115E98 8C4212CC */ lw $v0, %lo(gCurrentModelListPtr)($v0) /* AC598 80115E98 8C4212CC */ lw $v0, %lo(gCurrentModelListPtr)($v0)
/* AC59C 80115E9C 240400FF */ addiu $a0, $zero, 0xff /* AC59C 80115E9C 240400FF */ addiu $a0, $zero, 0xff
@ -141,19 +141,19 @@ glabel clear_model_data
/* AC64C 80115F4C 1440FFF4 */ bnez $v0, .L80115F20 /* AC64C 80115F4C 1440FFF4 */ bnez $v0, .L80115F20
/* AC650 80115F50 A0600002 */ sb $zero, 2($v1) /* AC650 80115F50 A0600002 */ sb $zero, 2($v1)
/* AC654 80115F54 0000202D */ daddu $a0, $zero, $zero /* AC654 80115F54 0000202D */ daddu $a0, $zero, $zero
/* AC658 80115F58 3C088015 */ lui $t0, %hi(D_80153268) /* AC658 80115F58 3C088015 */ lui $t0, %hi(texPannerMainU)
/* AC65C 80115F5C 25083268 */ addiu $t0, $t0, %lo(D_80153268) /* AC65C 80115F5C 25083268 */ addiu $t0, $t0, %lo(texPannerMainU)
/* AC660 80115F60 3C078015 */ lui $a3, %hi(D_801532A8) /* AC660 80115F60 3C078015 */ lui $a3, %hi(texPannerMainV)
/* AC664 80115F64 24E732A8 */ addiu $a3, $a3, %lo(D_801532A8) /* AC664 80115F64 24E732A8 */ addiu $a3, $a3, %lo(texPannerMainV)
/* AC668 80115F68 3C068015 */ lui $a2, %hi(D_801532E8) /* AC668 80115F68 3C068015 */ lui $a2, %hi(texPannerAuxU)
/* AC66C 80115F6C 24C632E8 */ addiu $a2, $a2, %lo(D_801532E8) /* AC66C 80115F6C 24C632E8 */ addiu $a2, $a2, %lo(texPannerAuxU)
/* AC670 80115F70 3C028015 */ lui $v0, %hi(D_801512F0) /* AC670 80115F70 3C028015 */ lui $v0, %hi(D_801512F0)
/* AC674 80115F74 8C4212F0 */ lw $v0, %lo(D_801512F0)($v0) /* AC674 80115F74 8C4212F0 */ lw $v0, %lo(D_801512F0)($v0)
/* AC678 80115F78 3C058015 */ lui $a1, %hi(D_80153328) /* AC678 80115F78 3C058015 */ lui $a1, %hi(texPannerAuxV)
/* AC67C 80115F7C 24A53328 */ addiu $a1, $a1, %lo(D_80153328) /* AC67C 80115F7C 24A53328 */ addiu $a1, $a1, %lo(texPannerAuxV)
/* AC680 80115F80 A0400000 */ sb $zero, ($v0) /* AC680 80115F80 A0400000 */ sb $zero, ($v0)
/* AC684 80115F84 3C038015 */ lui $v1, %hi(D_80153264) /* AC684 80115F84 3C038015 */ lui $v1, %hi(wFog)
/* AC688 80115F88 8C633264 */ lw $v1, %lo(D_80153264)($v1) /* AC688 80115F88 8C633264 */ lw $v1, %lo(wFog)($v1)
/* AC68C 80115F8C 2402000A */ addiu $v0, $zero, 0xa /* AC68C 80115F8C 2402000A */ addiu $v0, $zero, 0xa
/* AC690 80115F90 AC620004 */ sw $v0, 4($v1) /* AC690 80115F90 AC620004 */ sw $v0, 4($v1)
/* AC694 80115F94 AC620008 */ sw $v0, 8($v1) /* AC694 80115F94 AC620008 */ sw $v0, 8($v1)

View File

@ -1,59 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel clone_model
/* B1DF0 8011B6F0 27BDFFD8 */ addiu $sp, $sp, -0x28
/* B1DF4 8011B6F4 AFB3001C */ sw $s3, 0x1c($sp)
/* B1DF8 8011B6F8 00A0982D */ daddu $s3, $a1, $zero
/* B1DFC 8011B6FC 3084FFFF */ andi $a0, $a0, 0xffff
/* B1E00 8011B700 AFBF0020 */ sw $ra, 0x20($sp)
/* B1E04 8011B704 AFB20018 */ sw $s2, 0x18($sp)
/* B1E08 8011B708 AFB10014 */ sw $s1, 0x14($sp)
/* B1E0C 8011B70C 0C046C04 */ jal get_model_list_index_from_tree_index
/* B1E10 8011B710 AFB00010 */ sw $s0, 0x10($sp)
/* B1E14 8011B714 0C046B4C */ jal get_model_from_list_index
/* B1E18 8011B718 0040202D */ daddu $a0, $v0, $zero
/* B1E1C 8011B71C 0040882D */ daddu $s1, $v0, $zero
/* B1E20 8011B720 0000802D */ daddu $s0, $zero, $zero
/* B1E24 8011B724 3C128015 */ lui $s2, %hi(gCurrentModelListPtr)
/* B1E28 8011B728 265212CC */ addiu $s2, $s2, %lo(gCurrentModelListPtr)
/* B1E2C 8011B72C 8E430000 */ lw $v1, ($s2)
.L8011B730:
/* B1E30 8011B730 8C620000 */ lw $v0, ($v1)
/* B1E34 8011B734 10400005 */ beqz $v0, .L8011B74C
/* B1E38 8011B738 00000000 */ nop
/* B1E3C 8011B73C 26100001 */ addiu $s0, $s0, 1
/* B1E40 8011B740 2A020100 */ slti $v0, $s0, 0x100
/* B1E44 8011B744 1440FFFA */ bnez $v0, .L8011B730
/* B1E48 8011B748 24630004 */ addiu $v1, $v1, 4
.L8011B74C:
/* B1E4C 8011B74C 0C00AB39 */ jal heap_malloc
/* B1E50 8011B750 240400B0 */ addiu $a0, $zero, 0xb0
/* B1E54 8011B754 0040302D */ daddu $a2, $v0, $zero
/* B1E58 8011B758 00C0282D */ daddu $a1, $a2, $zero
/* B1E5C 8011B75C 0220202D */ daddu $a0, $s1, $zero
/* B1E60 8011B760 248700B0 */ addiu $a3, $a0, 0xb0
/* B1E64 8011B764 8E430000 */ lw $v1, ($s2)
/* B1E68 8011B768 00101080 */ sll $v0, $s0, 2
/* B1E6C 8011B76C 00431021 */ addu $v0, $v0, $v1
/* B1E70 8011B770 AC460000 */ sw $a2, ($v0)
.L8011B774:
/* B1E74 8011B774 8C880000 */ lw $t0, ($a0)
/* B1E78 8011B778 8C890004 */ lw $t1, 4($a0)
/* B1E7C 8011B77C 8C8A0008 */ lw $t2, 8($a0)
/* B1E80 8011B780 8C8B000C */ lw $t3, 0xc($a0)
/* B1E84 8011B784 ACA80000 */ sw $t0, ($a1)
/* B1E88 8011B788 ACA90004 */ sw $t1, 4($a1)
/* B1E8C 8011B78C ACAA0008 */ sw $t2, 8($a1)
/* B1E90 8011B790 ACAB000C */ sw $t3, 0xc($a1)
/* B1E94 8011B794 24840010 */ addiu $a0, $a0, 0x10
/* B1E98 8011B798 1487FFF6 */ bne $a0, $a3, .L8011B774
/* B1E9C 8011B79C 24A50010 */ addiu $a1, $a1, 0x10
/* B1EA0 8011B7A0 A4D30002 */ sh $s3, 2($a2)
/* B1EA4 8011B7A4 8FBF0020 */ lw $ra, 0x20($sp)
/* B1EA8 8011B7A8 8FB3001C */ lw $s3, 0x1c($sp)
/* B1EAC 8011B7AC 8FB20018 */ lw $s2, 0x18($sp)
/* B1EB0 8011B7B0 8FB10014 */ lw $s1, 0x14($sp)
/* B1EB4 8011B7B4 8FB00010 */ lw $s0, 0x10($sp)
/* B1EB8 8011B7B8 03E00008 */ jr $ra
/* B1EBC 8011B7BC 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,8 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel disable_world_fog
/* B2264 8011BB64 3C028015 */ lui $v0, %hi(D_80153264)
/* B2268 8011BB68 8C423264 */ lw $v0, %lo(D_80153264)($v0)
/* B226C 8011BB6C 03E00008 */ jr $ra
/* B2270 8011BB70 AC400000 */ sw $zero, ($v0)

View File

@ -1,9 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel enable_world_fog
/* B2250 8011BB50 3C038015 */ lui $v1, %hi(D_80153264)
/* B2254 8011BB54 8C633264 */ lw $v1, %lo(D_80153264)($v1)
/* B2258 8011BB58 24020001 */ addiu $v0, $zero, 1
/* B225C 8011BB5C 03E00008 */ jr $ra
/* B2260 8011BB60 AC620000 */ sw $v0, ($v1)

View File

@ -1,27 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80112D84
/* A9484 80112D84 3C038015 */ lui $v1, %hi(gMainGameState)
/* A9488 80112D88 24631700 */ addiu $v1, $v1, %lo(gMainGameState)
/* A948C 80112D8C 00041040 */ sll $v0, $a0, 1
/* A9490 80112D90 00441021 */ addu $v0, $v0, $a0
/* A9494 80112D94 000210C0 */ sll $v0, $v0, 3
/* A9498 80112D98 28840002 */ slti $a0, $a0, 2
/* A949C 80112D9C 14800003 */ bnez $a0, .L80112DAC
/* A94A0 80112DA0 00431821 */ addu $v1, $v0, $v1
.L80112DA4:
/* A94A4 80112DA4 08044B69 */ j .L80112DA4
/* A94A8 80112DA8 00000000 */ nop
.L80112DAC:
/* A94AC 80112DAC 94620000 */ lhu $v0, ($v1)
/* A94B0 80112DB0 AC650014 */ sw $a1, 0x14($v1)
/* A94B4 80112DB4 34420020 */ ori $v0, $v0, 0x20
/* A94B8 80112DB8 14A00004 */ bnez $a1, .L80112DCC
/* A94BC 80112DBC A4620000 */ sh $v0, ($v1)
/* A94C0 80112DC0 3C028011 */ lui $v0, %hi(NOP_state)
/* A94C4 80112DC4 24422B90 */ addiu $v0, $v0, %lo(NOP_state)
/* A94C8 80112DC8 AC620014 */ sw $v0, 0x14($v1)
.L80112DCC:
/* A94CC 80112DCC 03E00008 */ jr $ra
/* A94D0 80112DD0 00000000 */ nop

View File

@ -1,14 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80112DD4
/* A94D4 80112DD4 3C028015 */ lui $v0, %hi(gMainGameState)
/* A94D8 80112DD8 24421700 */ addiu $v0, $v0, %lo(gMainGameState)
/* A94DC 80112DDC 00041840 */ sll $v1, $a0, 1
/* A94E0 80112DE0 00641821 */ addu $v1, $v1, $a0
/* A94E4 80112DE4 000318C0 */ sll $v1, $v1, 3
/* A94E8 80112DE8 00621821 */ addu $v1, $v1, $v0
/* A94EC 80112DEC 94620000 */ lhu $v0, ($v1)
/* A94F0 80112DF0 34420004 */ ori $v0, $v0, 4
/* A94F4 80112DF4 03E00008 */ jr $ra
/* A94F8 80112DF8 A4620000 */ sh $v0, ($v1)

View File

@ -1,14 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80112DFC
/* A94FC 80112DFC 3C028015 */ lui $v0, %hi(gMainGameState)
/* A9500 80112E00 24421700 */ addiu $v0, $v0, %lo(gMainGameState)
/* A9504 80112E04 00041840 */ sll $v1, $a0, 1
/* A9508 80112E08 00641821 */ addu $v1, $v1, $a0
/* A950C 80112E0C 000318C0 */ sll $v1, $v1, 3
/* A9510 80112E10 00621821 */ addu $v1, $v1, $v0
/* A9514 80112E14 94620000 */ lhu $v0, ($v1)
/* A9518 80112E18 34420008 */ ori $v0, $v0, 8
/* A951C 80112E1C 03E00008 */ jr $ra
/* A9520 80112E20 A4620000 */ sh $v0, ($v1)

View File

@ -1,14 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80112E24
/* A9524 80112E24 3C028015 */ lui $v0, %hi(gMainGameState)
/* A9528 80112E28 24421700 */ addiu $v0, $v0, %lo(gMainGameState)
/* A952C 80112E2C 00041840 */ sll $v1, $a0, 1
/* A9530 80112E30 00641821 */ addu $v1, $v1, $a0
/* A9534 80112E34 000318C0 */ sll $v1, $v1, 3
/* A9538 80112E38 00621821 */ addu $v1, $v1, $v0
/* A953C 80112E3C 94620000 */ lhu $v0, ($v1)
/* A9540 80112E40 3042FFE3 */ andi $v0, $v0, 0xffe3
/* A9544 80112E44 03E00008 */ jr $ra
/* A9548 80112E48 A4620000 */ sh $v0, ($v1)

View File

@ -1,15 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80112E4C
/* A954C 80112E4C 3C028015 */ lui $v0, %hi(gMainGameState)
/* A9550 80112E50 24421700 */ addiu $v0, $v0, %lo(gMainGameState)
/* A9554 80112E54 00041840 */ sll $v1, $a0, 1
/* A9558 80112E58 00641821 */ addu $v1, $v1, $a0
/* A955C 80112E5C 000318C0 */ sll $v1, $v1, 3
/* A9560 80112E60 00621821 */ addu $v1, $v1, $v0
/* A9564 80112E64 94620000 */ lhu $v0, ($v1)
/* A9568 80112E68 3042FFF3 */ andi $v0, $v0, 0xfff3
/* A956C 80112E6C 34420010 */ ori $v0, $v0, 0x10
/* A9570 80112E70 03E00008 */ jr $ra
/* A9574 80112E74 A4620000 */ sh $v0, ($v1)

View File

@ -1,34 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8011BAE8
/* B21E8 8011BAE8 0000202D */ daddu $a0, $zero, $zero
/* B21EC 8011BAEC 3C058015 */ lui $a1, %hi(gCurrentModelListPtr)
/* B21F0 8011BAF0 8CA512CC */ lw $a1, %lo(gCurrentModelListPtr)($a1)
.L8011BAF4:
/* B21F4 8011BAF4 8CA30000 */ lw $v1, ($a1)
/* B21F8 8011BAF8 10600004 */ beqz $v1, .L8011BB0C
/* B21FC 8011BAFC 24840001 */ addiu $a0, $a0, 1
/* B2200 8011BB00 94620000 */ lhu $v0, ($v1)
/* B2204 8011BB04 3042FBFF */ andi $v0, $v0, 0xfbff
/* B2208 8011BB08 A4620000 */ sh $v0, ($v1)
.L8011BB0C:
/* B220C 8011BB0C 28820100 */ slti $v0, $a0, 0x100
/* B2210 8011BB10 1440FFF8 */ bnez $v0, .L8011BAF4
/* B2214 8011BB14 24A50004 */ addiu $a1, $a1, 4
/* B2218 8011BB18 0000202D */ daddu $a0, $zero, $zero
/* B221C 8011BB1C 3C058015 */ lui $a1, %hi(D_801512E0)
/* B2220 8011BB20 8CA512E0 */ lw $a1, %lo(D_801512E0)($a1)
.L8011BB24:
/* B2224 8011BB24 8CA30000 */ lw $v1, ($a1)
/* B2228 8011BB28 10600004 */ beqz $v1, .L8011BB3C
/* B222C 8011BB2C 24840001 */ addiu $a0, $a0, 1
/* B2230 8011BB30 94620000 */ lhu $v0, ($v1)
/* B2234 8011BB34 3042FBFF */ andi $v0, $v0, 0xfbff
/* B2238 8011BB38 A4620000 */ sh $v0, ($v1)
.L8011BB3C:
/* B223C 8011BB3C 28820004 */ slti $v0, $a0, 4
/* B2240 8011BB40 1440FFF8 */ bnez $v0, .L8011BB24
/* B2244 8011BB44 24A50004 */ addiu $a1, $a1, 4
/* B2248 8011BB48 03E00008 */ jr $ra
/* B224C 8011BB4C 00000000 */ nop

View File

@ -1,16 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel get_entity_type
/* A6DA4 801106A4 27BDFFE8 */ addiu $sp, $sp, -0x18
/* A6DA8 801106A8 AFBF0010 */ sw $ra, 0x10($sp)
/* A6DAC 801106AC 0C04417A */ jal get_entity_by_index
/* A6DB0 801106B0 00000000 */ nop
/* A6DB4 801106B4 50400003 */ beql $v0, $zero, .L801106C4
/* A6DB8 801106B8 2402FFFF */ addiu $v0, $zero, -1
/* A6DBC 801106BC 8C420038 */ lw $v0, 0x38($v0)
/* A6DC0 801106C0 90420020 */ lbu $v0, 0x20($v0)
.L801106C4:
/* A6DC4 801106C4 8FBF0010 */ lw $ra, 0x10($sp)
/* A6DC8 801106C8 03E00008 */ jr $ra
/* A6DCC 801106CC 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,19 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel get_world_fog_color
/* B22D8 8011BBD8 3C038015 */ lui $v1, %hi(D_80153264)
/* B22DC 8011BBDC 24633264 */ addiu $v1, $v1, %lo(D_80153264)
/* B22E0 8011BBE0 8C620000 */ lw $v0, ($v1)
/* B22E4 8011BBE4 8C420004 */ lw $v0, 4($v0)
/* B22E8 8011BBE8 AC820000 */ sw $v0, ($a0)
/* B22EC 8011BBEC 8C620000 */ lw $v0, ($v1)
/* B22F0 8011BBF0 8C420008 */ lw $v0, 8($v0)
/* B22F4 8011BBF4 ACA20000 */ sw $v0, ($a1)
/* B22F8 8011BBF8 8C620000 */ lw $v0, ($v1)
/* B22FC 8011BBFC 8C42000C */ lw $v0, 0xc($v0)
/* B2300 8011BC00 ACC20000 */ sw $v0, ($a2)
/* B2304 8011BC04 8C620000 */ lw $v0, ($v1)
/* B2308 8011BC08 8C420010 */ lw $v0, 0x10($v0)
/* B230C 8011BC0C 03E00008 */ jr $ra
/* B2310 8011BC10 ACE20000 */ sw $v0, ($a3)

View File

@ -1,13 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel get_world_fog_distance
/* B22B4 8011BBB4 3C038015 */ lui $v1, %hi(D_80153264)
/* B22B8 8011BBB8 24633264 */ addiu $v1, $v1, %lo(D_80153264)
/* B22BC 8011BBBC 8C620000 */ lw $v0, ($v1)
/* B22C0 8011BBC0 8C420014 */ lw $v0, 0x14($v0)
/* B22C4 8011BBC4 AC820000 */ sw $v0, ($a0)
/* B22C8 8011BBC8 8C620000 */ lw $v0, ($v1)
/* B22CC 8011BBCC 8C420018 */ lw $v0, 0x18($v0)
/* B22D0 8011BBD0 03E00008 */ jr $ra
/* B22D4 8011BBD4 ACA20000 */ sw $v0, ($a1)

View File

@ -41,8 +41,8 @@ glabel init_model_data
/* AC778 80116078 AC2212F0 */ sw $v0, %lo(D_801512F0)($at) /* AC778 80116078 AC2212F0 */ sw $v0, %lo(D_801512F0)($at)
/* AC77C 8011607C 3C028015 */ lui $v0, %hi(D_80153228) /* AC77C 8011607C 3C028015 */ lui $v0, %hi(D_80153228)
/* AC780 80116080 24423228 */ addiu $v0, $v0, %lo(D_80153228) /* AC780 80116080 24423228 */ addiu $v0, $v0, %lo(D_80153228)
/* AC784 80116084 3C018015 */ lui $at, %hi(D_80153264) /* AC784 80116084 3C018015 */ lui $at, %hi(wFog)
/* AC788 80116088 AC223264 */ sw $v0, %lo(D_80153264)($at) /* AC788 80116088 AC223264 */ sw $v0, %lo(wFog)($at)
/* AC78C 8011608C 03E00008 */ jr $ra /* AC78C 8011608C 03E00008 */ jr $ra
/* AC790 80116090 00000000 */ nop /* AC790 80116090 00000000 */ nop
.L80116094: .L80116094:
@ -80,7 +80,7 @@ glabel init_model_data
/* AC810 80116110 AC2212F0 */ sw $v0, %lo(D_801512F0)($at) /* AC810 80116110 AC2212F0 */ sw $v0, %lo(D_801512F0)($at)
/* AC814 80116114 3C028015 */ lui $v0, %hi(D_80153248) /* AC814 80116114 3C028015 */ lui $v0, %hi(D_80153248)
/* AC818 80116118 24423248 */ addiu $v0, $v0, %lo(D_80153248) /* AC818 80116118 24423248 */ addiu $v0, $v0, %lo(D_80153248)
/* AC81C 8011611C 3C018015 */ lui $at, %hi(D_80153264) /* AC81C 8011611C 3C018015 */ lui $at, %hi(wFog)
/* AC820 80116120 AC223264 */ sw $v0, %lo(D_80153264)($at) /* AC820 80116120 AC223264 */ sw $v0, %lo(wFog)($at)
/* AC824 80116124 03E00008 */ jr $ra /* AC824 80116124 03E00008 */ jr $ra
/* AC828 80116128 00000000 */ nop /* AC828 80116128 00000000 */ nop

View File

@ -1,8 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel is_world_fog_enabled
/* B22A4 8011BBA4 3C028015 */ lui $v0, %hi(D_80153264)
/* B22A8 8011BBA8 8C423264 */ lw $v0, %lo(D_80153264)($v0)
/* B22AC 8011BBAC 03E00008 */ jr $ra
/* B22B0 8011BBB0 8C420000 */ lw $v0, ($v0)

View File

@ -1,51 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel load_area_specific_entity_data
/* A7314 80110C14 3C028015 */ lui $v0, %hi(D_8015132C)
/* A7318 80110C18 8C42132C */ lw $v0, %lo(D_8015132C)($v0)
/* A731C 80110C1C 27BDFFE8 */ addiu $sp, $sp, -0x18
/* A7320 80110C20 14400022 */ bnez $v0, .L80110CAC
/* A7324 80110C24 AFBF0010 */ sw $ra, 0x10($sp)
/* A7328 80110C28 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* A732C 80110C2C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* A7330 80110C30 84430086 */ lh $v1, 0x86($v0)
/* A7334 80110C34 24020011 */ addiu $v0, $zero, 0x11
/* A7338 80110C38 10620003 */ beq $v1, $v0, .L80110C48
/* A733C 80110C3C 24020008 */ addiu $v0, $zero, 8
/* A7340 80110C40 14620007 */ bne $v1, $v0, .L80110C60
/* A7344 80110C44 2402000A */ addiu $v0, $zero, 0xa
.L80110C48:
/* A7348 80110C48 3C0400E3 */ lui $a0, 0xe3
/* A734C 80110C4C 2484D730 */ addiu $a0, $a0, -0x28d0
/* A7350 80110C50 3C0500E3 */ lui $a1, 0xe3
/* A7354 80110C54 24A5F750 */ addiu $a1, $a1, -0x8b0
/* A7358 80110C58 08044326 */ j .L80110C98
/* A735C 80110C5C 3C06802B */ lui $a2, 0x802b
.L80110C60:
/* A7360 80110C60 10620003 */ beq $v1, $v0, .L80110C70
/* A7364 80110C64 24020010 */ addiu $v0, $zero, 0x10
/* A7368 80110C68 14620007 */ bne $v1, $v0, .L80110C88
/* A736C 80110C6C 3C06802B */ lui $a2, 0x802b
.L80110C70:
/* A7370 80110C70 3C0400E3 */ lui $a0, 0xe3
/* A7374 80110C74 2484F750 */ addiu $a0, $a0, -0x8b0
/* A7378 80110C78 3C0500E3 */ lui $a1, 0xe3
/* A737C 80110C7C 24A51530 */ addiu $a1, $a1, 0x1530
/* A7380 80110C80 08044326 */ j .L80110C98
/* A7384 80110C84 3C06802B */ lui $a2, 0x802b
.L80110C88:
/* A7388 80110C88 3C0400E3 */ lui $a0, 0xe3
/* A738C 80110C8C 2484B530 */ addiu $a0, $a0, -0x4ad0
/* A7390 80110C90 3C0500E3 */ lui $a1, 0xe3
/* A7394 80110C94 24A5D730 */ addiu $a1, $a1, -0x28d0
.L80110C98:
/* A7398 80110C98 0C00A5CF */ jal dma_copy
/* A739C 80110C9C 34C6AE00 */ ori $a2, $a2, 0xae00
/* A73A0 80110CA0 24020001 */ addiu $v0, $zero, 1
/* A73A4 80110CA4 3C018015 */ lui $at, %hi(D_8015132C)
/* A73A8 80110CA8 AC22132C */ sw $v0, %lo(D_8015132C)($at)
.L80110CAC:
/* A73AC 80110CAC 8FBF0010 */ lw $ra, 0x10($sp)
/* A73B0 80110CB0 03E00008 */ jr $ra
/* A73B4 80110CB4 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,49 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel queue_render_task
/* B4010 8011D910 3C028015 */ lui $v0, %hi(D_801533AC)
/* B4014 8011D914 8C4233AC */ lw $v0, %lo(D_801533AC)($v0)
/* B4018 8011D918 3C038015 */ lui $v1, %hi(D_801533B0)
/* B401C 8011D91C 8C6333B0 */ lw $v1, %lo(D_801533B0)($v1)
/* B4020 8011D920 00021080 */ sll $v0, $v0, 2
/* B4024 8011D924 28630100 */ slti $v1, $v1, 0x100
/* B4028 8011D928 3C058015 */ lui $a1, %hi(D_801533A0)
/* B402C 8011D92C 00A22821 */ addu $a1, $a1, $v0
/* B4030 8011D930 8CA533A0 */ lw $a1, %lo(D_801533A0)($a1)
/* B4034 8011D934 14600003 */ bnez $v1, .L8011D944
/* B4038 8011D938 0080302D */ daddu $a2, $a0, $zero
.L8011D93C:
/* B403C 8011D93C 0804764F */ j .L8011D93C
/* B4040 8011D940 00000000 */ nop
.L8011D944:
/* B4044 8011D944 3C048015 */ lui $a0, %hi(D_801533B0)
/* B4048 8011D948 248433B0 */ addiu $a0, $a0, %lo(D_801533B0)
/* B404C 8011D94C 8C820000 */ lw $v0, ($a0)
/* B4050 8011D950 00021900 */ sll $v1, $v0, 4
/* B4054 8011D954 00A32821 */ addu $a1, $a1, $v1
/* B4058 8011D958 24420001 */ addiu $v0, $v0, 1
/* B405C 8011D95C AC820000 */ sw $v0, ($a0)
/* B4060 8011D960 24020001 */ addiu $v0, $zero, 1
/* B4064 8011D964 ACA20000 */ sw $v0, ($a1)
/* B4068 8011D968 8CC30000 */ lw $v1, ($a2)
/* B406C 8011D96C 2402002D */ addiu $v0, $zero, 0x2d
/* B4070 8011D970 14620003 */ bne $v1, $v0, .L8011D980
/* B4074 8011D974 00000000 */ nop
/* B4078 8011D978 24020021 */ addiu $v0, $zero, 0x21
/* B407C 8011D97C ACA20000 */ sw $v0, ($a1)
.L8011D980:
/* B4080 8011D980 8CC20008 */ lw $v0, 8($a2)
/* B4084 8011D984 ACA20008 */ sw $v0, 8($a1)
/* B4088 8011D988 8CC2000C */ lw $v0, 0xc($a2)
/* B408C 8011D98C ACA2000C */ sw $v0, 0xc($a1)
/* B4090 8011D990 8CC20000 */ lw $v0, ($a2)
/* B4094 8011D994 8CC30004 */ lw $v1, 4($a2)
/* B4098 8011D998 00021080 */ sll $v0, $v0, 2
/* B409C 8011D99C 3C018015 */ lui $at, %hi(D_8014C188)
/* B40A0 8011D9A0 00220821 */ addu $at, $at, $v0
/* B40A4 8011D9A4 8C22C188 */ lw $v0, %lo(D_8014C188)($at)
/* B40A8 8011D9A8 00431023 */ subu $v0, $v0, $v1
/* B40AC 8011D9AC ACA20004 */ sw $v0, 4($a1)
/* B40B0 8011D9B0 03E00008 */ jr $ra
/* B40B4 8011D9B4 00A0102D */ daddu $v0, $a1, $zero

View File

@ -1,10 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel set_aux_pan_u
/* B234C 8011BC4C 00042080 */ sll $a0, $a0, 2
/* B2350 8011BC50 3C018015 */ lui $at, %hi(D_801532E8)
/* B2354 8011BC54 00240821 */ addu $at, $at, $a0
/* B2358 8011BC58 AC2532E8 */ sw $a1, %lo(D_801532E8)($at)
/* B235C 8011BC5C 03E00008 */ jr $ra
/* B2360 8011BC60 00000000 */ nop

View File

@ -1,10 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel set_aux_pan_v
/* B2364 8011BC64 00042080 */ sll $a0, $a0, 2
/* B2368 8011BC68 3C018015 */ lui $at, %hi(D_80153328)
/* B236C 8011BC6C 00240821 */ addu $at, $at, $a0
/* B2370 8011BC70 AC253328 */ sw $a1, %lo(D_80153328)($at)
/* B2374 8011BC74 03E00008 */ jr $ra
/* B2378 8011BC78 00000000 */ nop

View File

@ -1,10 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel set_main_pan_u
/* B231C 8011BC1C 00042080 */ sll $a0, $a0, 2
/* B2320 8011BC20 3C018015 */ lui $at, %hi(D_80153268)
/* B2324 8011BC24 00240821 */ addu $at, $at, $a0
/* B2328 8011BC28 AC253268 */ sw $a1, %lo(D_80153268)($at)
/* B232C 8011BC2C 03E00008 */ jr $ra
/* B2330 8011BC30 00000000 */ nop

View File

@ -1,10 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel set_main_pan_v
/* B2334 8011BC34 00042080 */ sll $a0, $a0, 2
/* B2338 8011BC38 3C018015 */ lui $at, %hi(D_801532A8)
/* B233C 8011BC3C 00240821 */ addu $at, $at, $a0
/* B2340 8011BC40 AC2532A8 */ sw $a1, %lo(D_801532A8)($at)
/* B2344 8011BC44 03E00008 */ jr $ra
/* B2348 8011BC48 00000000 */ nop

View File

@ -1,11 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel set_world_fog_color
/* B2288 8011BB88 3C028015 */ lui $v0, %hi(D_80153264)
/* B228C 8011BB8C 8C423264 */ lw $v0, %lo(D_80153264)($v0)
/* B2290 8011BB90 AC440004 */ sw $a0, 4($v0)
/* B2294 8011BB94 AC450008 */ sw $a1, 8($v0)
/* B2298 8011BB98 AC46000C */ sw $a2, 0xc($v0)
/* B229C 8011BB9C 03E00008 */ jr $ra
/* B22A0 8011BBA0 AC470010 */ sw $a3, 0x10($v0)

View File

@ -1,9 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel set_world_fog_dist
/* B2274 8011BB74 3C028015 */ lui $v0, %hi(D_80153264)
/* B2278 8011BB78 8C423264 */ lw $v0, %lo(D_80153264)($v0)
/* B227C 8011BB7C AC440014 */ sw $a0, 0x14($v0)
/* B2280 8011BB80 03E00008 */ jr $ra
/* B2284 8011BB84 AC450018 */ sw $a1, 0x18($v0)

View File

@ -8599,6 +8599,7 @@ segments:
- [0xE2B420, data] - [0xE2B420, data]
- [0xE2B440, .rodata, code_E2A6B0] - [0xE2B440, .rodata, code_E2A6B0]
- type: code - type: code
ld_name: entity_default
start: 0xE2B530 start: 0xE2B530
vram: 0x802BAE00 vram: 0x802BAE00
overlay: True overlay: True
@ -8611,6 +8612,7 @@ segments:
- [0xE2D6D0, .rodata, code_E2BE40] - [0xE2D6D0, .rodata, code_E2BE40]
- [0xE2D6F0, .rodata, code_E2C930] - [0xE2D6F0, .rodata, code_E2C930]
- type: code - type: code
ld_name: entity_jan_iwa
start: 0xE2D730 start: 0xE2D730
vram: 0x802BAE00 vram: 0x802BAE00
overlay: True overlay: True
@ -8622,6 +8624,7 @@ segments:
- [0xE2F6F0, .rodata, code_E2D730] - [0xE2F6F0, .rodata, code_E2D730]
- [0xE2F740, .rodata, code_E2E5F0] - [0xE2F740, .rodata, code_E2E5F0]
- type: code - type: code
ld_name: entity_sbk_omo
start: 0xE2F750 start: 0xE2F750
vram: 0x802BAE00 vram: 0x802BAE00
overlay: True overlay: True

View File

@ -1846,7 +1846,7 @@ func_80112B20 = 0x80112B20; // type:func rom:0xA9220
NOP_state = 0x80112B90; // type:func rom:0xA9290 NOP_state = 0x80112B90; // type:func rom:0xA9290
func_80112B98 = 0x80112B98; // type:func rom:0xA9298 func_80112B98 = 0x80112B98; // type:func rom:0xA9298
set_next_game_mode = 0x80112BBC; // type:func rom:0xA92BC set_next_game_mode = 0x80112BBC; // type:func rom:0xA92BC
_set_game_mode = 0x80112CA8; // type:func rom:0xA93A8 set_game_mode_slot = 0x80112CA8; // type:func rom:0xA93A8
func_80112D84 = 0x80112D84; // type:func rom:0xA9484 func_80112D84 = 0x80112D84; // type:func rom:0xA9484
func_80112DD4 = 0x80112DD4; // type:func rom:0xA94D4 func_80112DD4 = 0x80112DD4; // type:func rom:0xA94D4
func_80112DFC = 0x80112DFC; // type:func rom:0xA94FC func_80112DFC = 0x80112DFC; // type:func rom:0xA94FC
@ -15533,6 +15533,8 @@ D_800743E0 = 0x800743E0; // type:data
D_80074414 = 0x80074414; // type:data D_80074414 = 0x80074414; // type:data
D_80074580 = 0x80074580; // type:data D_80074580 = 0x80074580; // type:data
gCurrentCameraID = 0x80077410; // gCurrentCameraID = 0x80077410; //
gameModeBlueprints = 0x800776E8; // type:data
gameModeMap = 0x80077850; // type:data
D_800779CB = 0x800779CB; // type:data D_800779CB = 0x800779CB; // type:data
D_80077A24 = 0x80077A24; // type:data D_80077A24 = 0x80077A24; // type:data
EnemyNpcHit = 0x80077F70; // EnemyNpcHit = 0x80077F70; //
@ -16323,11 +16325,11 @@ D_80153224 = 0x80153224; // type:data
D_80153226 = 0x80153226; // type:data D_80153226 = 0x80153226; // type:data
D_80153228 = 0x80153228; // type:data D_80153228 = 0x80153228; // type:data
D_80153248 = 0x80153248; // type:data D_80153248 = 0x80153248; // type:data
D_80153264 = 0x80153264; // type:data wFog = 0x80153264; // type:data
D_80153268 = 0x80153268; // type:data texPannerMainU = 0x80153268; // type:data
D_801532A8 = 0x801532A8; // type:data texPannerMainV = 0x801532A8; // type:data
D_801532E8 = 0x801532E8; // type:data texPannerAuxU = 0x801532E8; // type:data
D_80153328 = 0x80153328; // type:data texPannerAuxV = 0x80153328; // type:data
D_80153368 = 0x80153368; // type:data D_80153368 = 0x80153368; // type:data
D_8015336C = 0x8015336C; // type:data D_8015336C = 0x8015336C; // type:data
D_8015336E = 0x8015336E; // type:data D_8015336E = 0x8015336E; // type:data

View File

@ -1021,11 +1021,11 @@ D_80153224 = 0x80153224;
D_80153226 = 0x80153226; D_80153226 = 0x80153226;
D_80153228 = 0x80153228; D_80153228 = 0x80153228;
D_80153248 = 0x80153248; D_80153248 = 0x80153248;
D_80153264 = 0x80153264; wFog = 0x80153264;
D_80153268 = 0x80153268; texPannerMainU = 0x80153268;
D_801532A8 = 0x801532A8; texPannerMainV = 0x801532A8;
D_801532E8 = 0x801532E8; texPannerAuxU = 0x801532E8;
D_80153328 = 0x80153328; texPannerAuxV = 0x80153328;
D_80153368 = 0x80153368; D_80153368 = 0x80153368;
D_8015336C = 0x8015336C; D_8015336C = 0x8015336C;
D_8015336E = 0x8015336E; D_8015336E = 0x8015336E;