mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
Twuncs (#917)
* wip * func_80240000_D2BD30 * npc_find_standing_on_entity * wip * cleanup * warning * close * anotha one * spr_allocate_components * func_80243FC4_A2E204 * func_80240B4C_B2108C * clean
This commit is contained in:
parent
9c183ae48e
commit
bfbb7d1f98
@ -49,8 +49,6 @@
|
|||||||
#define _SHIFTR(v, s, w) \
|
#define _SHIFTR(v, s, w) \
|
||||||
((unsigned int)(((unsigned int)(v) >> (s)) & ((0x01 << (w)) - 1)))
|
((unsigned int)(((unsigned int)(v) >> (s)) & ((0x01 << (w)) - 1)))
|
||||||
|
|
||||||
#define _SHIFT _SHIFTL /* old, for compatibility only */
|
|
||||||
|
|
||||||
#define G_ON (1)
|
#define G_ON (1)
|
||||||
#define G_OFF (0)
|
#define G_OFF (0)
|
||||||
|
|
||||||
|
@ -1044,11 +1044,11 @@ typedef struct ModelGroupData {
|
|||||||
|
|
||||||
typedef struct ModelDisplayData {
|
typedef struct ModelDisplayData {
|
||||||
/* 0x0 */ Gfx* displayList;
|
/* 0x0 */ Gfx* displayList;
|
||||||
/* 0x4 */ char unk_00[0x4];
|
/* 0x4 */ char unk_04[0x4];
|
||||||
} ModelDisplayData; // size = 0x8
|
} ModelDisplayData; // size = 0x8
|
||||||
|
|
||||||
typedef struct AnimatorNode {
|
typedef struct AnimatorNode {
|
||||||
/* 0x00 */ void* displayList;
|
/* 0x00 */ Gfx* displayList;
|
||||||
/* 0x04 */ struct AnimatorNode* children[32];
|
/* 0x04 */ struct AnimatorNode* children[32];
|
||||||
/* 0x84 */ Vec3f basePos; // ?
|
/* 0x84 */ Vec3f basePos; // ?
|
||||||
/* 0x90 */ Vec3f pos;
|
/* 0x90 */ Vec3f pos;
|
||||||
|
@ -1095,7 +1095,7 @@ void btl_save_world_cameras(void);
|
|||||||
void load_battle_section(void);
|
void load_battle_section(void);
|
||||||
void btl_update(void);
|
void btl_update(void);
|
||||||
void update_item_entities(void);
|
void update_item_entities(void);
|
||||||
void func_80116674(void);
|
void iterate_models(void);
|
||||||
void restore_map_collision_data(void);
|
void restore_map_collision_data(void);
|
||||||
void load_model_textures(struct ModelNode* model, s32 romOffset, s32 size);
|
void load_model_textures(struct ModelNode* model, s32 romOffset, s32 size);
|
||||||
void calculate_model_sizes(void);
|
void calculate_model_sizes(void);
|
||||||
|
@ -344,8 +344,6 @@ void spr_load_npc_extra_anims(SpriteAnimData* header, u32* extraAnimList) {
|
|||||||
_heap_realloc(&gSpriteHeapPtr, header, (s32)writePos - (s32)header);
|
_heap_realloc(&gSpriteHeapPtr, header, (s32)writePos - (s32)header);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef NON_MATCHING
|
|
||||||
SpriteComponent** spr_allocate_components(s32 count) {
|
SpriteComponent** spr_allocate_components(s32 count) {
|
||||||
s32 listSize;
|
s32 listSize;
|
||||||
void** heap;
|
void** heap;
|
||||||
@ -363,12 +361,12 @@ SpriteComponent** spr_allocate_components(s32 count) {
|
|||||||
|
|
||||||
if (spr_allocateBtlComponentsOnWorldHeap) {
|
if (spr_allocateBtlComponentsOnWorldHeap) {
|
||||||
listStart = _heap_malloc(&heap_generalHead, totalSize);
|
listStart = _heap_malloc(&heap_generalHead, totalSize);
|
||||||
|
component = (SpriteComponent*) listPos = listStart;
|
||||||
} else {
|
} else {
|
||||||
listStart = _heap_malloc(&gSpriteHeapPtr, totalSize);
|
listStart = _heap_malloc(&gSpriteHeapPtr, totalSize);
|
||||||
|
component = (SpriteComponent*) listPos = listStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
component = listPos = listStart;
|
|
||||||
|
|
||||||
component = (SpriteComponent*)((s32)(component) + (listSize / 4) * 4);
|
component = (SpriteComponent*)((s32)(component) + (listSize / 4) * 4);
|
||||||
|
|
||||||
// fill list values
|
// fill list values
|
||||||
@ -380,6 +378,3 @@ SpriteComponent** spr_allocate_components(s32 count) {
|
|||||||
|
|
||||||
return listStart;
|
return listStart;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
INCLUDE_ASM(s32, "101b90_len_8f0", spr_allocate_components);
|
|
||||||
#endif
|
|
||||||
|
@ -1427,7 +1427,7 @@ const f32 padding3 = 0.0f;
|
|||||||
|
|
||||||
// needs a lot of work -- args should be (void* data, s32 x, s32 y)
|
// needs a lot of work -- args should be (void* data, s32 x, s32 y)
|
||||||
#ifdef NON_MATCHING
|
#ifdef NON_MATCHING
|
||||||
void func_802A3C98(s32 x, s32 y) {
|
void func_802A3C98(void* data, s32 x, s32 y) {
|
||||||
s32 palette;
|
s32 palette;
|
||||||
s32 num;
|
s32 num;
|
||||||
s32 id;
|
s32 id;
|
||||||
|
@ -911,9 +911,9 @@ void appendGfx_animator_node(ModelAnimator* animator, AnimatorNode* node, Matrix
|
|||||||
}
|
}
|
||||||
totalVtxCount += vtxCount;
|
totalVtxCount += vtxCount;
|
||||||
} else {
|
} else {
|
||||||
Gfx* temp = gfxPos++;
|
gfxPos++;
|
||||||
temp->words.w0 = w0;
|
gfxPos->words.w0 = w0;
|
||||||
temp->words.w1 = w1;
|
gfxPos->words.w1 = w1;
|
||||||
}
|
}
|
||||||
} while (TRUE);
|
} while (TRUE);
|
||||||
gSPEndDisplayList(gfxPos++);
|
gSPEndDisplayList(gfxPos++);
|
||||||
|
108
src/C50A0.c
108
src/C50A0.c
@ -7,6 +7,7 @@
|
|||||||
#include "item_entity.h"
|
#include "item_entity.h"
|
||||||
#include "message_ids.h"
|
#include "message_ids.h"
|
||||||
#include "nu/nusys.h"
|
#include "nu/nusys.h"
|
||||||
|
#include "ld_addrs.h"
|
||||||
|
|
||||||
#define MAX_ITEM_ENTITIES 256
|
#define MAX_ITEM_ENTITIES 256
|
||||||
|
|
||||||
@ -765,7 +766,114 @@ void init_item_entity_list(void) {
|
|||||||
extern s32* gItemEntityScripts[];
|
extern s32* gItemEntityScripts[];
|
||||||
|
|
||||||
void item_entity_load(ItemEntity* item);
|
void item_entity_load(ItemEntity* item);
|
||||||
|
|
||||||
|
// WIP
|
||||||
|
#ifdef NON_MATCHING
|
||||||
|
void item_entity_load(ItemEntity* item) {
|
||||||
|
s32* pos;
|
||||||
|
HudCacheEntry* entry;
|
||||||
|
s32 cond;
|
||||||
|
s32 raster;
|
||||||
|
s32 palette;
|
||||||
|
s32 capacity;
|
||||||
|
s32 i;
|
||||||
|
|
||||||
|
pos = gItemEntityScripts[item->itemID];
|
||||||
|
item->readPos = pos;
|
||||||
|
item->savedReadPos = pos;
|
||||||
|
|
||||||
|
while (TRUE) {
|
||||||
|
switch (*pos++) {
|
||||||
|
case ITEM_SCRIPT_OP_Restart:
|
||||||
|
case ITEM_SCRIPT_OP_Loop:
|
||||||
|
break;
|
||||||
|
case ITEM_SCRIPT_OP_RandomRestart:
|
||||||
|
pos += 2;
|
||||||
|
break;
|
||||||
|
case ITEM_SCRIPT_OP_SetImage:
|
||||||
|
pos++;
|
||||||
|
raster = *pos++;
|
||||||
|
palette = *pos++;
|
||||||
|
if (item->flags & ITEM_ENTITY_FLAG_40000) {
|
||||||
|
capacity = 0x200;
|
||||||
|
} else {
|
||||||
|
capacity = 0x120;
|
||||||
|
}
|
||||||
|
|
||||||
|
entry = gHudElementCacheTableRaster;
|
||||||
|
i = 0;
|
||||||
|
while (TRUE) {
|
||||||
|
if (entry->id == -1) {
|
||||||
|
entry->id = raster;
|
||||||
|
entry->data = &gHudElementCacheBuffer[*gHudElementCacheSize];
|
||||||
|
|
||||||
|
ASSERT(*gHudElementCacheSize + capacity < 0x11000);
|
||||||
|
do {
|
||||||
|
nuPiReadRom((s32)icon_present_ROM_START + raster, entry->data, capacity);
|
||||||
|
} while (0); // TODO required to match
|
||||||
|
*gHudElementCacheSize += capacity;
|
||||||
|
if (!gGameStatusPtr->isBattle) {
|
||||||
|
*pos = i;
|
||||||
|
} else {
|
||||||
|
*pos = (u16)(*pos) | (i << 16);
|
||||||
|
}
|
||||||
|
pos++;
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
cond = entry->id == raster;
|
||||||
|
if (cond) { // TODO required to match
|
||||||
|
if (!gGameStatusPtr->isBattle) {
|
||||||
|
*pos = i;
|
||||||
|
} else {
|
||||||
|
*pos = (u16)(*pos) | (i << 16);
|
||||||
|
}
|
||||||
|
pos++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
entry++;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
ASSERT(i < MAX_ITEM_ENTITIES);
|
||||||
|
|
||||||
|
entry = gHudElementCacheTablePalette;
|
||||||
|
i = 0;
|
||||||
|
while (TRUE) {
|
||||||
|
if (entry->id == -1) {
|
||||||
|
entry->id = palette;
|
||||||
|
entry->data = &gHudElementCacheBuffer[*gHudElementCacheSize];
|
||||||
|
ASSERT(*gHudElementCacheSize + 0x20 < 0x11000);
|
||||||
|
nuPiReadRom((s32)icon_present_ROM_START + palette, entry->data, 0x20);
|
||||||
|
*gHudElementCacheSize += 0x20;
|
||||||
|
if (!gGameStatusPtr->isBattle) {
|
||||||
|
*pos = i;
|
||||||
|
} else {
|
||||||
|
*pos = (u16)(*pos) | (i << 16);
|
||||||
|
}
|
||||||
|
pos++;
|
||||||
|
break;
|
||||||
|
} else if (entry->id == palette) {
|
||||||
|
if (!gGameStatusPtr->isBattle) {
|
||||||
|
*pos = i;
|
||||||
|
} else {
|
||||||
|
*pos = (u16)(*pos) | (i << 16);
|
||||||
|
}
|
||||||
|
pos++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
entry++;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ITEM_SCRIPT_OP_End:
|
||||||
|
item_entity_update(item);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
INCLUDE_ASM(s32, "C50A0", item_entity_load);
|
INCLUDE_ASM(s32, "C50A0", item_entity_load);
|
||||||
|
#endif
|
||||||
|
|
||||||
s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 facingAngleSign, s32 pickupFlagIndex) {
|
s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 facingAngleSign, s32 pickupFlagIndex) {
|
||||||
s32 i;
|
s32 i;
|
||||||
|
@ -4171,19 +4171,20 @@ void mdl_create_model(ModelBlueprint* bp, s32 arg1) {
|
|||||||
(*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].modelIndex = modelIdx;
|
(*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].modelIndex = modelIdx;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The global here is getting optimized out because nothing is happening to it. Very weird
|
// Mysterious no-op
|
||||||
#ifdef NON_EQUIVALENT
|
void iterate_models(void) {
|
||||||
void func_80116674(void) {
|
Model* nonNull;
|
||||||
|
Model* ret;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(*gCurrentModels); i++) {
|
for (i = 0; i < ARRAY_COUNT(*gCurrentModels); i++) {
|
||||||
Model* m = (*gCurrentModels)[i];
|
ret = (*gCurrentModels)[i];
|
||||||
do {} while (0);
|
if (ret != NULL) {
|
||||||
|
nonNull = ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
ret = nonNull;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80116674);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void func_80116698(void) {
|
void func_80116698(void) {
|
||||||
Matrix4f sp20;
|
Matrix4f sp20;
|
||||||
@ -4953,7 +4954,7 @@ void load_model_transforms(ModelNode* model, ModelNode* parent, Matrix4f mdlTxMt
|
|||||||
s32 get_model_list_index_from_tree_index(s32 treeIndex) {
|
s32 get_model_list_index_from_tree_index(s32 treeIndex) {
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
if (treeIndex < 0x100) {
|
if (treeIndex < MAX_MODELS) {
|
||||||
u8 modelIndex = (*mdl_currentModelTreeNodeInfo)[treeIndex].modelIndex;
|
u8 modelIndex = (*mdl_currentModelTreeNodeInfo)[treeIndex].modelIndex;
|
||||||
|
|
||||||
if (modelIndex != (u8)-1) {
|
if (modelIndex != (u8)-1) {
|
||||||
@ -4961,7 +4962,7 @@ s32 get_model_list_index_from_tree_index(s32 treeIndex) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 0x100; i++) {
|
for (i = 0; i < MAX_MODELS; i++) {
|
||||||
Model* model = get_model_from_list_index(i);
|
Model* model = get_model_from_list_index(i);
|
||||||
|
|
||||||
if (model != NULL && model->modelID == treeIndex) {
|
if (model != NULL && model->modelID == treeIndex) {
|
||||||
@ -5186,10 +5187,10 @@ void clone_model(u16 srcModelID, u16 newModelID) {
|
|||||||
|
|
||||||
void set_model_flags(u16 treeIndex, s32 flags, s32 mode) {
|
void set_model_flags(u16 treeIndex, s32 flags, s32 mode) {
|
||||||
s32 maxGroupIndex = -1;
|
s32 maxGroupIndex = -1;
|
||||||
s32 i;
|
|
||||||
s32 minGroupIndex;
|
s32 minGroupIndex;
|
||||||
s32 modelIndex = (*mdl_currentModelTreeNodeInfo)[treeIndex].modelIndex;
|
s32 modelIndex = (*mdl_currentModelTreeNodeInfo)[treeIndex].modelIndex;
|
||||||
s32 siblingIndex;
|
s32 siblingIndex;
|
||||||
|
s32 i;
|
||||||
|
|
||||||
if (modelIndex < 255) {
|
if (modelIndex < 255) {
|
||||||
minGroupIndex = maxGroupIndex = modelIndex;
|
minGroupIndex = maxGroupIndex = modelIndex;
|
||||||
@ -5645,8 +5646,174 @@ Gfx* mdl_get_copied_gfx(s32 copyIndex) {
|
|||||||
return gfxCopy;
|
return gfxCopy;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mdl_project_tex_coords(s32 modelID, Gfx* destGfx, Matrix4f destMtx, void* destVertices);
|
#ifdef WIP
|
||||||
|
void mdl_project_tex_coords(s32 modelID, Gfx* destGfx, f32 (*destMtx)[4], void* destVertices) {
|
||||||
|
s32 numVertices;
|
||||||
|
Vtx* baseVtx;
|
||||||
|
s32 gfxCount;
|
||||||
|
f32 sp2C;
|
||||||
|
f32 sp40;
|
||||||
|
Vtx* temp_a0;
|
||||||
|
f32 temp_f10;
|
||||||
|
f32 temp_f12;
|
||||||
|
f32 temp_f12_2;
|
||||||
|
f32 temp_f14;
|
||||||
|
f32 temp_f14_2;
|
||||||
|
f32 temp_f2;
|
||||||
|
f32 temp_f2_2;
|
||||||
|
f32 temp_f4_2;
|
||||||
|
f32 temp_f4_3;
|
||||||
|
f32 temp_f8;
|
||||||
|
f32 temp_f8_3;
|
||||||
|
f32 var_f0;
|
||||||
|
f32 var_f10;
|
||||||
|
f32 var_f24;
|
||||||
|
f32 var_f26;
|
||||||
|
f32 var_f2;
|
||||||
|
f32 var_f30;
|
||||||
|
f32 var_f6;
|
||||||
|
f32 var_f6_2;
|
||||||
|
|
||||||
|
f32 v0ob0;
|
||||||
|
f32 v0ob2;
|
||||||
|
f32 v0tc0;
|
||||||
|
f32 v0tc1;
|
||||||
|
|
||||||
|
f32 v1ob0;
|
||||||
|
f32 v1ob2;
|
||||||
|
f32 v2ob0;
|
||||||
|
f32 v1tc0;
|
||||||
|
f32 v1tc1;
|
||||||
|
f32 v2ob2;
|
||||||
|
f32 v2tc0;
|
||||||
|
f32 v2tc1;
|
||||||
|
|
||||||
|
f32 ob0;
|
||||||
|
f32 ob1;
|
||||||
|
f32 ob2;
|
||||||
|
|
||||||
|
f32 tc0;
|
||||||
|
f32 tc1;
|
||||||
|
|
||||||
|
s32 cn0;
|
||||||
|
s32 cn1;
|
||||||
|
s32 cn2;
|
||||||
|
s32 cmd;
|
||||||
|
s32 i;
|
||||||
|
|
||||||
|
s32 listIndex;
|
||||||
|
Model* model;
|
||||||
|
Gfx* dlist;
|
||||||
|
|
||||||
|
listIndex = get_model_list_index_from_tree_index(modelID & 0xFFFF);
|
||||||
|
model = get_model_from_list_index(listIndex);
|
||||||
|
dlist = model->modelNode->displayData->displayList;
|
||||||
|
|
||||||
|
while (TRUE) {
|
||||||
|
cmd = dlist->words.w0 >> 0x18;
|
||||||
|
//temp_a0 = var_v0->words.w1;
|
||||||
|
if (cmd == G_ENDDL) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cmd == G_VTX) {
|
||||||
|
baseVtx = dlist->words.w1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
dlist++;
|
||||||
|
}
|
||||||
|
|
||||||
|
v0ob0 = baseVtx[0].v.ob[0];
|
||||||
|
v0ob2 = baseVtx[0].v.ob[2];
|
||||||
|
v0tc0 = baseVtx[0].v.tc[0];
|
||||||
|
v0tc1 = baseVtx[0].v.tc[1];
|
||||||
|
|
||||||
|
v1ob0 = baseVtx[1].v.ob[0];
|
||||||
|
v1ob2 = baseVtx[1].v.ob[2];
|
||||||
|
v1tc0 = baseVtx[1].v.tc[0];
|
||||||
|
v1tc1 = baseVtx[1].v.tc[1];
|
||||||
|
|
||||||
|
v2ob0 = baseVtx[2].v.ob[0];
|
||||||
|
v2ob2 = baseVtx[2].v.ob[2];
|
||||||
|
v2tc0 = baseVtx[2].v.tc[0];
|
||||||
|
v2tc1 = baseVtx[2].v.tc[1];
|
||||||
|
|
||||||
|
cn0 = baseVtx[0].v.cn[0];
|
||||||
|
cn1 = baseVtx[0].v.cn[1];
|
||||||
|
cn2 = baseVtx[0].v.cn[2];
|
||||||
|
|
||||||
|
if (v0ob0 != v1ob0) {
|
||||||
|
temp_f14_2 = v0ob0 - v1ob0;
|
||||||
|
temp_f8_3 = v0tc0 - v1tc0;
|
||||||
|
temp_f2_2 = (v0ob0 - v2ob0) / temp_f14_2;
|
||||||
|
temp_f12_2 = v0ob2 - v1ob2;
|
||||||
|
temp_f10 = (temp_f2_2 * temp_f12_2) - (v0ob2 - v2ob2);
|
||||||
|
sp40 = ((temp_f2_2 * temp_f8_3) - (v0tc0 - v2tc0)) / temp_f10;
|
||||||
|
temp_f4_3 = v0tc1 - v1tc1;
|
||||||
|
var_f30 = (temp_f8_3 - (temp_f12_2 * sp40)) / temp_f14_2;
|
||||||
|
var_f26 = ((temp_f2_2 * temp_f4_3) - (v0tc1 - v2tc1)) / temp_f10;
|
||||||
|
var_f2 = var_f26 * v0ob2;
|
||||||
|
var_f24 = (temp_f4_3 - (temp_f12_2 * var_f26)) / temp_f14_2;
|
||||||
|
var_f6 = (v0tc0 - (var_f30 * v0ob0)) - (sp40 * v0ob2);
|
||||||
|
var_f0 = v0tc1 - (var_f24 * v0ob0);
|
||||||
|
} else {
|
||||||
|
temp_f14 = (v0ob2 - v1ob2);
|
||||||
|
temp_f8 = v0tc0 - v1tc0;
|
||||||
|
temp_f2 = (v0ob2 - v2ob2) / temp_f14;
|
||||||
|
temp_f12 = v0ob0 - v1ob0;
|
||||||
|
temp_f10 = (temp_f2 * temp_f12) - (v0ob0 - v2ob0);
|
||||||
|
var_f30 = ((temp_f2 * temp_f8) - (v0tc0 - v2tc0)) / temp_f10;
|
||||||
|
temp_f4_2 = v0tc1 - v1tc1;
|
||||||
|
sp40 = (temp_f8 - (temp_f12 * var_f30)) / temp_f14;
|
||||||
|
var_f24 = ((temp_f2 * temp_f4_2) - (v0tc1 - v2tc1)) / temp_f10;
|
||||||
|
var_f26 = (temp_f4_2 - (temp_f12 * var_f24)) / temp_f14;
|
||||||
|
var_f2 = var_f26 * v0ob2;
|
||||||
|
var_f6 = (v0tc0 - (var_f30 * v0ob0)) - (sp40 * v0ob2);
|
||||||
|
var_f0 = v0tc1 - (var_f24 * v0ob0);
|
||||||
|
}
|
||||||
|
sp2C = var_f6;
|
||||||
|
|
||||||
|
mdl_get_vertex_count(destGfx, &numVertices, &baseVtx, &gfxCount, destVertices);
|
||||||
|
|
||||||
|
for (i = 0; i < numVertices; i++) {
|
||||||
|
ob0 = baseVtx->v.ob[0];
|
||||||
|
ob1 = baseVtx->v.ob[1];
|
||||||
|
ob2 = baseVtx->v.ob[2];
|
||||||
|
|
||||||
|
if (destMtx != NULL) {
|
||||||
|
var_f10 = (destMtx[0][0] * ob0) + (destMtx[1][0] * ob1) + (destMtx[2][0] * ob2) + destMtx[3][0];
|
||||||
|
var_f6_2 = (destMtx[0][2] * ob0) + (destMtx[1][2] * ob1) + (destMtx[2][2] * ob2) + destMtx[3][2];
|
||||||
|
} else {
|
||||||
|
var_f10 = ob0;
|
||||||
|
var_f6_2 = ob2;
|
||||||
|
}
|
||||||
|
|
||||||
|
tc0 = (var_f30 * var_f10) + (sp40 * var_f6_2) + sp2C;
|
||||||
|
tc1 = (var_f24 * var_f10) + (var_f26 * var_f6_2) + (var_f0 - var_f2);
|
||||||
|
|
||||||
|
if (tc0 < 0.0f) {
|
||||||
|
tc0 -= 0.5;
|
||||||
|
} else if (tc0 > 0.0f) {
|
||||||
|
tc0 += 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tc1 < 0.0f) {
|
||||||
|
tc1 -= 0.5;
|
||||||
|
} else if (tc1 > 0.0f) {
|
||||||
|
tc1 += 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
baseVtx->v.tc[0] = tc0;
|
||||||
|
baseVtx->v.tc[1] = tc1;
|
||||||
|
baseVtx->v.cn[0] = cn0;
|
||||||
|
baseVtx->v.cn[1] = cn1;
|
||||||
|
baseVtx->v.cn[2] = cn2;
|
||||||
|
baseVtx++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
INCLUDE_ASM(s32, "a5dd0_len_114e0", mdl_project_tex_coords);
|
INCLUDE_ASM(s32, "a5dd0_len_114e0", mdl_project_tex_coords);
|
||||||
|
#endif
|
||||||
|
|
||||||
s32 func_8011C80C(u16 arg0, s32 arg3, f32* arg4, f32* arg5) {
|
s32 func_8011C80C(u16 arg0, s32 arg3, f32* arg4, f32* arg5) {
|
||||||
Camera* camera = &gCameras[gCurrentCameraID];
|
Camera* camera = &gCameras[gCurrentCameraID];
|
||||||
|
@ -610,8 +610,22 @@ void update_scripts(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// this function is evil.
|
// this function is evil
|
||||||
|
#ifdef NON_MATCHING
|
||||||
|
void func_802C3EE4(void) {
|
||||||
|
s32 i;
|
||||||
|
|
||||||
|
for (i = 0; i < gScriptListCount; i++) {
|
||||||
|
do {
|
||||||
|
if ((*gCurrentScriptListPtr)[gScriptIndexList[i]] == gScriptIdList[i]) {
|
||||||
|
(*gCurrentScriptListPtr)[gScriptIndexList[i]] = gScriptIdList[i];
|
||||||
|
}
|
||||||
|
} while (0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
INCLUDE_ASM(s32, "evt/script_list", func_802C3EE4);
|
INCLUDE_ASM(s32, "evt/script_list", func_802C3EE4);
|
||||||
|
#endif
|
||||||
|
|
||||||
void kill_script(Evt* instanceToKill) {
|
void kill_script(Evt* instanceToKill) {
|
||||||
Evt* childScript;
|
Evt* childScript;
|
||||||
|
@ -1512,9 +1512,9 @@ void render_hud_element(HudElement* hudElement) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (hudElement->flags & HUD_ELEMENT_FLAG_TRANSPARENT) {
|
if (hudElement->flags & HUD_ELEMENT_FLAG_TRANSPARENT) {
|
||||||
fold_update(transform->unk_00, 7, 255, 255, 255, hudElement->opacity, 0);
|
fold_update(transform->foldIdx, 7, 255, 255, 255, hudElement->opacity, 0);
|
||||||
} else {
|
} else {
|
||||||
fold_update(transform->unk_00, 0, 0, 0, 0, 0, 0);
|
fold_update(transform->foldIdx, 0, 0, 0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1523,7 +1523,7 @@ void render_hud_element(HudElement* hudElement) {
|
|||||||
sp2A0.xOffset = -width / 2;
|
sp2A0.xOffset = -width / 2;
|
||||||
sp2A0.yOffset = height / 2;
|
sp2A0.yOffset = height / 2;
|
||||||
sp2A0.width = width;
|
sp2A0.width = width;
|
||||||
sp2A0.unk_10 = 255;
|
sp2A0.opacity = 255;
|
||||||
sp2A0.height = height;
|
sp2A0.height = height;
|
||||||
sp2A0.palette = palette;
|
sp2A0.palette = palette;
|
||||||
|
|
||||||
@ -1534,7 +1534,7 @@ void render_hud_element(HudElement* hudElement) {
|
|||||||
fold_appendGfx_component(0, &sp2A0, 0x40, sp60);
|
fold_appendGfx_component(0, &sp2A0, 0x40, sp60);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fold_appendGfx_component(transform->unk_00, &sp2A0, 0x40, sp60);
|
fold_appendGfx_component(transform->foldIdx, &sp2A0, 0x40, sp60);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
@ -1544,6 +1544,11 @@ void render_hud_element(HudElement* hudElement) {
|
|||||||
memcpy(&transform->unk_30[D_80159180].vtx[2], &D_8014F0C8[2], sizeof(Vtx));
|
memcpy(&transform->unk_30[D_80159180].vtx[2], &D_8014F0C8[2], sizeof(Vtx));
|
||||||
memcpy(&transform->unk_30[D_80159180].vtx[3], &D_8014F0C8[3], sizeof(Vtx));
|
memcpy(&transform->unk_30[D_80159180].vtx[3], &D_8014F0C8[3], sizeof(Vtx));
|
||||||
|
|
||||||
|
// D_8014F0C8[0] = transform->unk_30[D_80159180].vtx[0];
|
||||||
|
// D_8014F0C8[1] = transform->unk_30[D_80159180].vtx[1];
|
||||||
|
// D_8014F0C8[2] = transform->unk_30[D_80159180].vtx[2];
|
||||||
|
// D_8014F0C8[3] = transform->unk_30[D_80159180].vtx[3];
|
||||||
|
|
||||||
vtx[0].v.ob[0] = -width / 2;
|
vtx[0].v.ob[0] = -width / 2;
|
||||||
vtx[0].v.ob[1] = -height / 2;
|
vtx[0].v.ob[1] = -height / 2;
|
||||||
vtx[0].v.ob[2] = 0;
|
vtx[0].v.ob[2] = 0;
|
||||||
@ -1586,7 +1591,7 @@ void render_hud_element(HudElement* hudElement) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPLoadTextureBlock(gMasterGfxPos++, hudElement->imageAddr, G_IM_FMT_IA, G_IM_SIZ_8b , width, height, 0,
|
gDPLoadTextureBlock(gMasterGfxPos++, hudElement->imageAddr, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0,
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||||
|
|
||||||
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
|
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
|
||||||
|
29
src/npc.c
29
src/npc.c
@ -1920,16 +1920,14 @@ Npc* npc_find_closest_simple(f32 x, f32 y, f32 z, f32 radius) {
|
|||||||
return closestNpc;
|
return closestNpc;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Needs work
|
s32 npc_find_standing_on_entity(s32 entityIndex) {
|
||||||
#ifdef NON_EQUIVALENT
|
s32 idx = entityIndex | 0x4000;
|
||||||
s32 npc_find_standing_on_entity(s32 arg0) {
|
s32 y = get_entity_by_index(idx)->position.y - 10.0f;
|
||||||
Npc* npc;
|
Npc* npc;
|
||||||
s32 y;
|
|
||||||
s32 i;
|
s32 i;
|
||||||
s32 var_v1;
|
s32 var_v1;
|
||||||
|
|
||||||
var_v1 = arg0 | 0x4000;
|
npc->pos = npc->pos; // TODO required to match
|
||||||
y = get_entity_by_index(var_v1)->position.y - 10.0f;
|
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(*gCurrentNpcListPtr); i++) {
|
for (i = 0; i < ARRAY_COUNT(*gCurrentNpcListPtr); i++) {
|
||||||
npc = (*gCurrentNpcListPtr)[i];
|
npc = (*gCurrentNpcListPtr)[i];
|
||||||
@ -1940,34 +1938,35 @@ s32 npc_find_standing_on_entity(s32 arg0) {
|
|||||||
if (npc->flags == 0) {
|
if (npc->flags == 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (npc->flags & (0x80000000 | 0x4)) {
|
if (npc->flags & (NPC_FLAG_80000000 | NPC_FLAG_4)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (npc->flags & NPC_FLAG_PARTICLE) {
|
||||||
|
var_v1 = i; // TODO required to match (dummy if statement to load NPC_FLAG_PARTICLE into s5)
|
||||||
|
}
|
||||||
if (npc->pos.y < y) {
|
if (npc->pos.y < y) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (npc->flags & (0x8000 | 0x8)) {
|
if (npc->flags & (NPC_FLAG_8000 | NPC_FLAG_ENABLE_HIT_SCRIPT)) {
|
||||||
var_v1 = npc_get_collider_below(npc);
|
var_v1 = npc_get_collider_below(npc);
|
||||||
if (var_v1 != 0) {
|
if (var_v1 != 0) {
|
||||||
if ((arg0 | 0x4000) == var_v1) {
|
if (idx == var_v1) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var_v1 = npc->currentFloor;
|
var_v1 = npc->currentFloor;
|
||||||
if (npc->currentFloor & 0x4000) {
|
if (npc->currentFloor & 0x4000) { // TODO required to match (can't use var_v1)
|
||||||
if ((arg0 | 0x4000) == var_v1) {
|
if (idx == var_v1) {
|
||||||
|
npc->pos = npc->pos; // TODO required to match
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
INCLUDE_ASM(s32, "npc", npc_find_standing_on_entity);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
s32 npc_get_collider_below(Npc* npc) {
|
s32 npc_get_collider_below(Npc* npc) {
|
||||||
f32 x;
|
f32 x;
|
||||||
|
@ -97,7 +97,7 @@ void state_step_battle(void) {
|
|||||||
update_npcs();
|
update_npcs();
|
||||||
update_item_entities();
|
update_item_entities();
|
||||||
update_effects();
|
update_effects();
|
||||||
func_80116674();
|
iterate_models();
|
||||||
update_cameras();
|
update_cameras();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ void state_step_world(void) {
|
|||||||
update_player();
|
update_player();
|
||||||
update_item_entities();
|
update_item_entities();
|
||||||
update_effects();
|
update_effects();
|
||||||
func_80116674();
|
iterate_models();
|
||||||
update_cameras();
|
update_cameras();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1060,23 +1060,32 @@ void func_80243ED0_A2E110(s32 arg0, s32 idx) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// close-ish
|
#ifdef SHIFT
|
||||||
#ifdef NON_MATCHING
|
#define TAPE_OFFSET title_tape_ROM_START - title_bg_1_ROM_START
|
||||||
|
#else
|
||||||
|
#define TAPE_OFFSET 0x2A440
|
||||||
|
#endif
|
||||||
|
|
||||||
ApiStatus func_80243FC4_A2E204(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80243FC4_A2E204(Evt* script, s32 isInitialCall) {
|
||||||
s32 dmaEnd;
|
u8* dmaEnd;
|
||||||
s32 dmaStart;
|
u8* dmaStart;
|
||||||
s32 someLength;
|
s32 tapeOffset;
|
||||||
void* textureAddress;
|
u8* it;
|
||||||
|
|
||||||
D_8024AA20_A34C60->unk_00 = create_worker_frontUI(NULL, func_80243CC0_A2DF00);
|
D_8024AA20_A34C60->unk_00 = create_worker_frontUI(NULL, func_80243CC0_A2DF00);
|
||||||
textureAddress = mdl_get_next_texture_address(0x1D420);
|
D_8024AA20_A34C60->unk_04 = it = mdl_get_next_texture_address(0x1D420);
|
||||||
D_8024AA20_A34C60->unk_08 = textureAddress + 0xA710;
|
it += 0xA710;
|
||||||
D_8024AA20_A34C60->unk_0C = (u8*)D_8024AA20_A34C60->unk_08 + 0x200;
|
D_8024AA20_A34C60->unk_08 = (u16*) it;
|
||||||
D_8024AA20_A34C60->unk_10 = (u8*)D_8024AA20_A34C60->unk_0C + 0xA710;
|
it += 0x200;
|
||||||
D_8024AA20_A34C60->unk_18 = (u8*)D_8024AA20_A34C60->unk_10 + 0x200;
|
D_8024AA20_A34C60->unk_0C = it;
|
||||||
D_8024AA20_A34C60->unk_1C = (u8*)D_8024AA20_A34C60->unk_18 + 0x4000;
|
it += 0xA710;
|
||||||
D_8024AA20_A34C60->unk_20 = (u8*)D_8024AA20_A34C60->unk_1C + 0x4000;
|
D_8024AA20_A34C60->unk_10 = (u16*) it;
|
||||||
D_8024AA20_A34C60->unk_04 = textureAddress;
|
it += 0x200;
|
||||||
|
D_8024AA20_A34C60->unk_18 = it;
|
||||||
|
it += 0x4000;
|
||||||
|
D_8024AA20_A34C60->unk_1C = it;
|
||||||
|
it += 0x4000;
|
||||||
|
D_8024AA20_A34C60->unk_20 = (u16*) it;
|
||||||
D_8024AA20_A34C60->unk_46 = 240;
|
D_8024AA20_A34C60->unk_46 = 240;
|
||||||
D_8024AA20_A34C60->unk_48 = 111;
|
D_8024AA20_A34C60->unk_48 = 111;
|
||||||
D_8024AA20_A34C60->unk_3C = 0;
|
D_8024AA20_A34C60->unk_3C = 0;
|
||||||
@ -1085,30 +1094,23 @@ ApiStatus func_80243FC4_A2E204(Evt* script, s32 isInitialCall) {
|
|||||||
D_8024AA20_A34C60->unk_42 = 0;
|
D_8024AA20_A34C60->unk_42 = 0;
|
||||||
D_8024AA20_A34C60->unk_44 = 0;
|
D_8024AA20_A34C60->unk_44 = 0;
|
||||||
D_8024AA20_A34C60->unk_4A = 54;
|
D_8024AA20_A34C60->unk_4A = 54;
|
||||||
|
|
||||||
func_80243ED0_A2E110(0, 0);
|
func_80243ED0_A2E110(0, 0);
|
||||||
func_80243ED0_A2E110(1, 1);
|
func_80243ED0_A2E110(1, 1);
|
||||||
|
|
||||||
someLength = 0x2A440;
|
tapeOffset = TAPE_OFFSET;
|
||||||
|
dmaStart = title_bg_1_ROM_START + tapeOffset;
|
||||||
|
dmaEnd = title_bg_1_ROM_START + tapeOffset + 0x4000;
|
||||||
|
|
||||||
dmaStart = title_bg_1_ROM_START;
|
// load the tape and bowser silhouette images
|
||||||
dmaEnd = dmaStart + someLength;
|
dma_copy(dmaStart, dmaEnd + 0x4200, D_8024AA20_A34C60->unk_18);
|
||||||
|
|
||||||
dmaEnd += 0x4000;
|
|
||||||
dmaEnd += someLength;
|
|
||||||
dmaEnd += 0x4200;
|
|
||||||
|
|
||||||
dma_copy(dmaStart, dmaEnd, D_8024AA20_A34C60->unk_18);
|
|
||||||
D_8024AA20_A34C60->unk_58 = 0;
|
D_8024AA20_A34C60->unk_58 = 0;
|
||||||
D_8024AA20_A34C60->unk_5A = 255;
|
D_8024AA20_A34C60->unk_5A = 255;
|
||||||
D_8024AA20_A34C60->unk_5C = 0;
|
D_8024AA20_A34C60->unk_5C = 0;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_05/A2AAC0", func_80243FC4_A2E204);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
NOP_FIX // TODO remove when D_8024AAB4_A34CF4 is migrated
|
NOP_FIX // TODO remove when D_8024AAB4_A34CF4 is migrated
|
||||||
|
|
||||||
ApiStatus func_802440D0_A2E310(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802440D0_A2E310(Evt* script, s32 isInitialCall) {
|
||||||
switch (D_8024AAB0_A34CF0) {
|
switch (D_8024AAB0_A34CF0) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -98,24 +98,24 @@ EvtScript N(EVS_Kolorado_LetterReward) = {
|
|||||||
EVT_END
|
EVT_END
|
||||||
};
|
};
|
||||||
|
|
||||||
// float regalloc
|
|
||||||
API_CALLABLE(func_80240B4C_B2108C);
|
|
||||||
#ifdef NON_EQUIVALENT
|
|
||||||
API_CALLABLE(func_80240B4C_B2108C) {
|
API_CALLABLE(func_80240B4C_B2108C) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
s32 temp_s1 = evt_get_variable(script, *args++);
|
||||||
Npc* npc;
|
Npc* npc;
|
||||||
f32 temp_f20;
|
f32 temp_f20;
|
||||||
f32 var_f22;
|
f32 var_f22;
|
||||||
f32 x, y, z;
|
f32 x, y, z;
|
||||||
s32 temp_s1;
|
|
||||||
s32 outX, outY, outZ;
|
s32 outX, outY, outZ;
|
||||||
|
|
||||||
temp_s1 = evt_get_variable(script, *args++);
|
x = 0.0f;
|
||||||
x = y = z = 0.0f;
|
y = 0.0f;
|
||||||
|
z = 0.0f;
|
||||||
|
|
||||||
outX = *args++;
|
outX = *args++;
|
||||||
outY = *args++;
|
outY = *args++;
|
||||||
outZ = *args++;
|
outZ = *args++;
|
||||||
npc = get_npc_safe(0);
|
npc = get_npc_safe(0);
|
||||||
|
|
||||||
switch (temp_s1) {
|
switch (temp_s1) {
|
||||||
case 0:
|
case 0:
|
||||||
var_f22 = 130.0f;
|
var_f22 = 130.0f;
|
||||||
@ -141,9 +141,6 @@ API_CALLABLE(func_80240B4C_B2108C) {
|
|||||||
evt_set_float_variable(script, outZ, z);
|
evt_set_float_variable(script, outZ, z);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_80240B4C_B2108C);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ApiStatus func_80240CF8_B21238(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80240CF8_B21238(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
@ -679,7 +679,7 @@ API_CALLABLE(N(RunMinigame)) {
|
|||||||
model->flags &= -(MODEL_FLAG_FLAG_1 | MODEL_FLAG_ENABLED);
|
model->flags &= -(MODEL_FLAG_FLAG_1 | MODEL_FLAG_ENABLED);
|
||||||
if (!(model->flags & MODEL_FLAG_HAS_TRANSFORM_APPLIED)) {
|
if (!(model->flags & MODEL_FLAG_HAS_TRANSFORM_APPLIED)) {
|
||||||
guTranslateF(model->transformMatrix, npc->pos.x, npc->pos.y, npc->pos.z);
|
guTranslateF(model->transformMatrix, npc->pos.x, npc->pos.y, npc->pos.z);
|
||||||
model->flags |= (MODEL_FLAG_USES_TRANSFORM_MATRIX | MODEL_FLAG_HAS_TRANSFORM_APPLIED);
|
model->flags |= MODEL_FLAG_USES_TRANSFORM_MATRIX | MODEL_FLAG_HAS_TRANSFORM_APPLIED;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
guTranslateF(mtx, npc->pos.x, npc->pos.y, npc->pos.z);
|
guTranslateF(mtx, npc->pos.x, npc->pos.y, npc->pos.z);
|
||||||
@ -694,7 +694,7 @@ API_CALLABLE(N(RunMinigame)) {
|
|||||||
model = get_model_from_list_index(get_model_list_index_from_tree_index(data->box[i].peachPanelModelID));
|
model = get_model_from_list_index(get_model_list_index_from_tree_index(data->box[i].peachPanelModelID));
|
||||||
if (!(model->flags & MODEL_FLAG_HAS_TRANSFORM_APPLIED)) {
|
if (!(model->flags & MODEL_FLAG_HAS_TRANSFORM_APPLIED)) {
|
||||||
guTranslateF(model->transformMatrix, npc->pos.x, npc->pos.y, npc->pos.z);
|
guTranslateF(model->transformMatrix, npc->pos.x, npc->pos.y, npc->pos.z);
|
||||||
model->flags |= (MODEL_FLAG_USES_TRANSFORM_MATRIX | MODEL_FLAG_HAS_TRANSFORM_APPLIED);
|
model->flags |= MODEL_FLAG_USES_TRANSFORM_MATRIX | MODEL_FLAG_HAS_TRANSFORM_APPLIED;
|
||||||
} else {
|
} else {
|
||||||
guTranslateF(mtx, npc->pos.x, npc->pos.y, npc->pos.z);
|
guTranslateF(mtx, npc->pos.x, npc->pos.y, npc->pos.z);
|
||||||
guMtxCatF(mtx, model->transformMatrix, model->transformMatrix);
|
guMtxCatF(mtx, model->transformMatrix, model->transformMatrix);
|
||||||
@ -725,7 +725,7 @@ API_CALLABLE(N(RunMinigame)) {
|
|||||||
centerY = update_lerp(EASING_QUADRATIC_OUT, npc->moveToPos.y, npc->moveToPos.y + 30.0, npc->duration, 30);
|
centerY = update_lerp(EASING_QUADRATIC_OUT, npc->moveToPos.y, npc->moveToPos.y + 30.0, npc->duration, 30);
|
||||||
if (!(model->flags & MODEL_FLAG_HAS_TRANSFORM_APPLIED)) {
|
if (!(model->flags & MODEL_FLAG_HAS_TRANSFORM_APPLIED)) {
|
||||||
guTranslateF(model->transformMatrix, npc->pos.x, centerY, npc->pos.z);
|
guTranslateF(model->transformMatrix, npc->pos.x, centerY, npc->pos.z);
|
||||||
model->flags |= (MODEL_FLAG_USES_TRANSFORM_MATRIX | MODEL_FLAG_HAS_TRANSFORM_APPLIED);
|
model->flags |= MODEL_FLAG_USES_TRANSFORM_MATRIX | MODEL_FLAG_HAS_TRANSFORM_APPLIED;
|
||||||
} else {
|
} else {
|
||||||
guTranslateF(mtx, npc->pos.x, centerY, npc->pos.z);
|
guTranslateF(mtx, npc->pos.x, centerY, npc->pos.z);
|
||||||
guMtxCatF(mtx, model->transformMatrix, model->transformMatrix);
|
guMtxCatF(mtx, model->transformMatrix, model->transformMatrix);
|
||||||
|
@ -1,9 +1,111 @@
|
|||||||
#include "sam_07.h"
|
#include "sam_07.h"
|
||||||
|
#include "model.h"
|
||||||
|
|
||||||
static char* N(exit_str_0) = "sam_04";
|
static char* N(exit_str_0) = "sam_04";
|
||||||
static char* N(exit_str_1) = "sam_08";
|
static char* N(exit_str_1) = "sam_08";
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_sam/sam_07/D2BD30", func_80240000_D2BD30);
|
extern s32 D_802424C0_D2E1F0[55]; // TODO remove hard-coded size when data is migrated
|
||||||
|
|
||||||
|
typedef struct UnkSam07 {
|
||||||
|
/* 0x00 */ s32 unk_00;
|
||||||
|
/* 0x04 */ Vec3f unk_04;
|
||||||
|
/* 0x10 */ Vec3f unk_10;
|
||||||
|
/* 0x1C */ Vec3f rot;
|
||||||
|
/* 0x28 */ Vec3f rotVel;
|
||||||
|
/* 0x34 */ f32 unk_34;
|
||||||
|
/* 0x38 */ f32 unk_38;
|
||||||
|
/* 0x3C */ f32 unk_3C;
|
||||||
|
/* 0x40 */ Matrix4f transformMatrix;
|
||||||
|
} UnkSam07; // size = 0x80
|
||||||
|
|
||||||
|
NOP_FIX
|
||||||
|
ApiStatus func_80240000_D2BD30(Evt* script, s32 isInitialCall) {
|
||||||
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
Matrix4f sp18, sp58, sp98, spD8;
|
||||||
|
UnkSam07* it;
|
||||||
|
Model* model;
|
||||||
|
u32 i;
|
||||||
|
s32 j, k;
|
||||||
|
|
||||||
|
if (isInitialCall) {
|
||||||
|
|
||||||
|
script->functionTempPtr[0] = heap_malloc(sizeof(*it) * ARRAY_COUNT(D_802424C0_D2E1F0));
|
||||||
|
script->functionTemp[1] = 0;
|
||||||
|
|
||||||
|
it = script->functionTempPtr[0];
|
||||||
|
for (i = 0; i < ARRAY_COUNT(D_802424C0_D2E1F0); i++, it++) {
|
||||||
|
model = get_model_from_list_index(get_model_list_index_from_tree_index(D_802424C0_D2E1F0[i]));
|
||||||
|
it->unk_00 = 0;
|
||||||
|
it->unk_04.x = model->center.x;
|
||||||
|
it->unk_04.y = model->center.y;
|
||||||
|
it->unk_04.z = model->center.z;
|
||||||
|
it->rot.x = 0.0f;
|
||||||
|
|
||||||
|
it->rot.y = 0.0f;
|
||||||
|
it->rot.z = 0.0f;
|
||||||
|
it->unk_10.x = it->unk_04.x;
|
||||||
|
it->unk_10.y = it->unk_04.y;
|
||||||
|
it->unk_10.z = it->unk_04.z;
|
||||||
|
it->rotVel.x = rand_int(20) - 10;
|
||||||
|
it->rotVel.y = rand_int(20) - 10;
|
||||||
|
it->rotVel.z = rand_int(20) - 10;
|
||||||
|
it->unk_34 = rand_int(5) + 5.0f;
|
||||||
|
it->unk_38 = rand_int(3) + 1.0f;
|
||||||
|
it->unk_3C = rand_int(360);
|
||||||
|
|
||||||
|
for (j = 0; j < 4; j++) {
|
||||||
|
for (k = 0; k < 4; k++) {
|
||||||
|
it->transformMatrix[j][k] = model->transformMatrix[j][k];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
it = script->functionTempPtr[0];
|
||||||
|
for (i = 0; i < ARRAY_COUNT(D_802424C0_D2E1F0); i++, it++) {
|
||||||
|
model = get_model_from_list_index(get_model_list_index_from_tree_index(D_802424C0_D2E1F0[i]));
|
||||||
|
if (it->unk_00 == 0) {
|
||||||
|
add_vec2D_polar(&it->unk_04.x, &it->unk_04.z, it->unk_38, it->unk_3C);
|
||||||
|
it->unk_34 -= 1.0f;
|
||||||
|
it->unk_04.y += it->unk_34;
|
||||||
|
if (it->unk_34 < 0.0f) {
|
||||||
|
if (it->unk_04.y < playerStatus->position.y - 150.0f) {
|
||||||
|
script->functionTemp[1]++;
|
||||||
|
it->unk_00 = 101;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (j = 0; j < 4; j++) {
|
||||||
|
for (k = 0; k < 4; k++) {
|
||||||
|
model->transformMatrix[j][k] = it->transformMatrix[j][k];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
model->flags |= MODEL_FLAG_USES_TRANSFORM_MATRIX | MODEL_FLAG_HAS_TRANSFORM_APPLIED;
|
||||||
|
guTranslateF(sp18, it->unk_04.x - it->unk_10.x, it->unk_04.y - it->unk_10.y, it->unk_04.z - it->unk_10.z);
|
||||||
|
it->rot.x += it->rotVel.x;
|
||||||
|
it->rot.y += it->rotVel.y;
|
||||||
|
it->rot.z += it->rotVel.z;
|
||||||
|
it->rot.x = clamp_angle(it->rot.x);
|
||||||
|
it->rot.y = clamp_angle(it->rot.y);
|
||||||
|
it->rot.z = clamp_angle(it->rot.z);
|
||||||
|
guRotateF(sp58, it->rot.x, 1.0f, 0.0f, 0.0f);
|
||||||
|
guRotateF(sp98, it->rot.y, 0.0f, 1.0f, 0.0f);
|
||||||
|
guRotateF(spD8, it->rot.z, 0.0f, 0.0f, 1.0f);
|
||||||
|
guMtxCatF(spD8, sp58, sp58);
|
||||||
|
guMtxCatF(sp58, sp98, sp98);
|
||||||
|
guMtxCatF(sp98, sp18, sp18);
|
||||||
|
guMtxCatF(sp18, model->transformMatrix, model->transformMatrix);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((u32) script->functionTemp[1] >= ARRAY_COUNT(D_802424C0_D2E1F0)) {
|
||||||
|
heap_free(script->functionTempPtr[0]);
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
||||||
|
return ApiStatus_BLOCK;
|
||||||
|
}
|
||||||
|
NOP_UNFIX
|
||||||
|
|
||||||
#include "world/common/todo/SetEntityPositionF.inc.c"
|
#include "world/common/todo/SetEntityPositionF.inc.c"
|
||||||
|
|
||||||
|
@ -1,54 +0,0 @@
|
|||||||
.set noat # allow manual use of $at
|
|
||||||
.set noreorder # don't insert nops after branches
|
|
||||||
|
|
||||||
glabel spr_allocate_components
|
|
||||||
/* 1023C8 802DF2D8 27BDFFE0 */ addiu $sp, $sp, -0x20
|
|
||||||
/* 1023CC 802DF2DC AFB00010 */ sw $s0, 0x10($sp)
|
|
||||||
/* 1023D0 802DF2E0 0080802D */ daddu $s0, $a0, $zero
|
|
||||||
/* 1023D4 802DF2E4 26020001 */ addiu $v0, $s0, 1
|
|
||||||
/* 1023D8 802DF2E8 AFB10014 */ sw $s1, 0x14($sp)
|
|
||||||
/* 1023DC 802DF2EC 00028880 */ sll $s1, $v0, 2
|
|
||||||
/* 1023E0 802DF2F0 00101080 */ sll $v0, $s0, 2
|
|
||||||
/* 1023E4 802DF2F4 00501021 */ addu $v0, $v0, $s0
|
|
||||||
/* 1023E8 802DF2F8 00021100 */ sll $v0, $v0, 4
|
|
||||||
/* 1023EC 802DF2FC 3C03802E */ lui $v1, %hi(spr_allocateBtlComponentsOnWorldHeap)
|
|
||||||
/* 1023F0 802DF300 8C63F524 */ lw $v1, %lo(spr_allocateBtlComponentsOnWorldHeap)($v1)
|
|
||||||
/* 1023F4 802DF304 00512821 */ addu $a1, $v0, $s1
|
|
||||||
/* 1023F8 802DF308 3C048035 */ lui $a0, %hi(gSpriteHeapPtr)
|
|
||||||
/* 1023FC 802DF30C 2484F800 */ addiu $a0, $a0, %lo(gSpriteHeapPtr)
|
|
||||||
/* 102400 802DF310 10600003 */ beqz $v1, .L802DF320
|
|
||||||
/* 102404 802DF314 AFBF0018 */ sw $ra, 0x18($sp)
|
|
||||||
/* 102408 802DF318 3C048030 */ lui $a0, %hi(heap_generalHead)
|
|
||||||
/* 10240C 802DF31C 2484B800 */ addiu $a0, $a0, %lo(heap_generalHead)
|
|
||||||
.L802DF320:
|
|
||||||
/* 102410 802DF320 0C00A41B */ jal _heap_malloc
|
|
||||||
/* 102414 802DF324 00000000 */ nop
|
|
||||||
/* 102418 802DF328 0040302D */ daddu $a2, $v0, $zero
|
|
||||||
/* 10241C 802DF32C 00C0282D */ daddu $a1, $a2, $zero
|
|
||||||
/* 102420 802DF330 0220102D */ daddu $v0, $s1, $zero
|
|
||||||
/* 102424 802DF334 04410002 */ bgez $v0, .L802DF340
|
|
||||||
/* 102428 802DF338 00C0202D */ daddu $a0, $a2, $zero
|
|
||||||
/* 10242C 802DF33C 24420003 */ addiu $v0, $v0, 3
|
|
||||||
.L802DF340:
|
|
||||||
/* 102430 802DF340 00021083 */ sra $v0, $v0, 2
|
|
||||||
/* 102434 802DF344 00021080 */ sll $v0, $v0, 2
|
|
||||||
/* 102438 802DF348 00822021 */ addu $a0, $a0, $v0
|
|
||||||
/* 10243C 802DF34C 1A000007 */ blez $s0, .L802DF36C
|
|
||||||
/* 102440 802DF350 0000182D */ daddu $v1, $zero, $zero
|
|
||||||
.L802DF354:
|
|
||||||
/* 102444 802DF354 ACA40000 */ sw $a0, ($a1)
|
|
||||||
/* 102448 802DF358 24A50004 */ addiu $a1, $a1, 4
|
|
||||||
/* 10244C 802DF35C 24630001 */ addiu $v1, $v1, 1
|
|
||||||
/* 102450 802DF360 0070102A */ slt $v0, $v1, $s0
|
|
||||||
/* 102454 802DF364 1440FFFB */ bnez $v0, .L802DF354
|
|
||||||
/* 102458 802DF368 24840050 */ addiu $a0, $a0, 0x50
|
|
||||||
.L802DF36C:
|
|
||||||
/* 10245C 802DF36C 2402FFFF */ addiu $v0, $zero, -1
|
|
||||||
/* 102460 802DF370 ACA20000 */ sw $v0, ($a1)
|
|
||||||
/* 102464 802DF374 8FBF0018 */ lw $ra, 0x18($sp)
|
|
||||||
/* 102468 802DF378 8FB10014 */ lw $s1, 0x14($sp)
|
|
||||||
/* 10246C 802DF37C 8FB00010 */ lw $s0, 0x10($sp)
|
|
||||||
/* 102470 802DF380 00C0102D */ daddu $v0, $a2, $zero
|
|
||||||
/* 102474 802DF384 03E00008 */ jr $ra
|
|
||||||
/* 102478 802DF388 27BD0020 */ addiu $sp, $sp, 0x20
|
|
||||||
/* 10247C 802DF38C 00000000 */ nop
|
|
@ -1,14 +0,0 @@
|
|||||||
.set noat # allow manual use of $at
|
|
||||||
.set noreorder # don't insert nops after branches
|
|
||||||
|
|
||||||
glabel func_80116674
|
|
||||||
/* ACD74 80116674 0000202D */ daddu $a0, $zero, $zero
|
|
||||||
/* ACD78 80116678 3C038015 */ lui $v1, %hi(gCurrentModels)
|
|
||||||
/* ACD7C 8011667C 8C6312CC */ lw $v1, %lo(gCurrentModels)($v1)
|
|
||||||
.L80116680:
|
|
||||||
/* ACD80 80116680 24840001 */ addiu $a0, $a0, 1
|
|
||||||
/* ACD84 80116684 28820100 */ slti $v0, $a0, 0x100
|
|
||||||
/* ACD88 80116688 1440FFFD */ bnez $v0, .L80116680
|
|
||||||
/* ACD8C 8011668C 24630004 */ addiu $v1, $v1, 4
|
|
||||||
/* ACD90 80116690 03E00008 */ jr $ra
|
|
||||||
/* ACD94 80116694 00000000 */ nop
|
|
@ -1,82 +0,0 @@
|
|||||||
.set noat # allow manual use of $at
|
|
||||||
.set noreorder # don't insert nops after branches
|
|
||||||
|
|
||||||
glabel npc_find_standing_on_entity
|
|
||||||
/* 185D4 8003D1D4 27BDFFD0 */ addiu $sp, $sp, -0x30
|
|
||||||
/* 185D8 8003D1D8 AFB20018 */ sw $s2, 0x18($sp)
|
|
||||||
/* 185DC 8003D1DC 34924000 */ ori $s2, $a0, 0x4000
|
|
||||||
/* 185E0 8003D1E0 0240202D */ daddu $a0, $s2, $zero
|
|
||||||
/* 185E4 8003D1E4 AFBF0028 */ sw $ra, 0x28($sp)
|
|
||||||
/* 185E8 8003D1E8 AFB50024 */ sw $s5, 0x24($sp)
|
|
||||||
/* 185EC 8003D1EC AFB40020 */ sw $s4, 0x20($sp)
|
|
||||||
/* 185F0 8003D1F0 AFB3001C */ sw $s3, 0x1c($sp)
|
|
||||||
/* 185F4 8003D1F4 AFB10014 */ sw $s1, 0x14($sp)
|
|
||||||
/* 185F8 8003D1F8 0C04417A */ jal get_entity_by_index
|
|
||||||
/* 185FC 8003D1FC AFB00010 */ sw $s0, 0x10($sp)
|
|
||||||
/* 18600 8003D200 0000882D */ daddu $s1, $zero, $zero
|
|
||||||
/* 18604 8003D204 C440004C */ lwc1 $f0, 0x4c($v0)
|
|
||||||
/* 18608 8003D208 3C014120 */ lui $at, 0x4120
|
|
||||||
/* 1860C 8003D20C 44811000 */ mtc1 $at, $f2
|
|
||||||
/* 18610 8003D210 3C148000 */ lui $s4, 0x8000
|
|
||||||
/* 18614 8003D214 46020001 */ sub.s $f0, $f0, $f2
|
|
||||||
/* 18618 8003D218 36940004 */ ori $s4, $s4, 4
|
|
||||||
/* 1861C 8003D21C 3C150400 */ lui $s5, 0x400
|
|
||||||
/* 18620 8003D220 4600010D */ trunc.w.s $f4, $f0
|
|
||||||
/* 18624 8003D224 44132000 */ mfc1 $s3, $f4
|
|
||||||
.L8003D228:
|
|
||||||
/* 18628 8003D228 3C03800A */ lui $v1, %hi(gCurrentNpcListPtr)
|
|
||||||
/* 1862C 8003D22C 8C630B90 */ lw $v1, %lo(gCurrentNpcListPtr)($v1)
|
|
||||||
/* 18630 8003D230 00111080 */ sll $v0, $s1, 2
|
|
||||||
/* 18634 8003D234 00431021 */ addu $v0, $v0, $v1
|
|
||||||
/* 18638 8003D238 8C500000 */ lw $s0, ($v0)
|
|
||||||
/* 1863C 8003D23C 52000022 */ beql $s0, $zero, .L8003D2C8
|
|
||||||
/* 18640 8003D240 26310001 */ addiu $s1, $s1, 1
|
|
||||||
/* 18644 8003D244 8E030000 */ lw $v1, ($s0)
|
|
||||||
/* 18648 8003D248 5060001F */ beql $v1, $zero, .L8003D2C8
|
|
||||||
/* 1864C 8003D24C 26310001 */ addiu $s1, $s1, 1
|
|
||||||
/* 18650 8003D250 00741024 */ and $v0, $v1, $s4
|
|
||||||
/* 18654 8003D254 5440001C */ bnel $v0, $zero, .L8003D2C8
|
|
||||||
/* 18658 8003D258 26310001 */ addiu $s1, $s1, 1
|
|
||||||
/* 1865C 8003D25C C602003C */ lwc1 $f2, 0x3c($s0)
|
|
||||||
/* 18660 8003D260 44930000 */ mtc1 $s3, $f0
|
|
||||||
/* 18664 8003D264 00000000 */ nop
|
|
||||||
/* 18668 8003D268 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* 1866C 8003D26C 4600103C */ c.lt.s $f2, $f0
|
|
||||||
/* 18670 8003D270 00000000 */ nop
|
|
||||||
/* 18674 8003D274 45030014 */ bc1tl .L8003D2C8
|
|
||||||
/* 18678 8003D278 26310001 */ addiu $s1, $s1, 1
|
|
||||||
/* 1867C 8003D27C 30628008 */ andi $v0, $v1, 0x8008
|
|
||||||
/* 18680 8003D280 10400008 */ beqz $v0, .L8003D2A4
|
|
||||||
/* 18684 8003D284 00000000 */ nop
|
|
||||||
/* 18688 8003D288 0C00F4BE */ jal npc_get_collider_below
|
|
||||||
/* 1868C 8003D28C 0200202D */ daddu $a0, $s0, $zero
|
|
||||||
/* 18690 8003D290 0040182D */ daddu $v1, $v0, $zero
|
|
||||||
/* 18694 8003D294 5060000C */ beql $v1, $zero, .L8003D2C8
|
|
||||||
/* 18698 8003D298 26310001 */ addiu $s1, $s1, 1
|
|
||||||
/* 1869C 8003D29C 0800F4AE */ j .L8003D2B8
|
|
||||||
/* 186A0 8003D2A0 00000000 */ nop
|
|
||||||
.L8003D2A4:
|
|
||||||
/* 186A4 8003D2A4 96020084 */ lhu $v0, 0x84($s0)
|
|
||||||
/* 186A8 8003D2A8 86030084 */ lh $v1, 0x84($s0)
|
|
||||||
/* 186AC 8003D2AC 30424000 */ andi $v0, $v0, 0x4000
|
|
||||||
/* 186B0 8003D2B0 50400005 */ beql $v0, $zero, .L8003D2C8
|
|
||||||
/* 186B4 8003D2B4 26310001 */ addiu $s1, $s1, 1
|
|
||||||
.L8003D2B8:
|
|
||||||
/* 186B8 8003D2B8 56430003 */ bnel $s2, $v1, .L8003D2C8
|
|
||||||
/* 186BC 8003D2BC 26310001 */ addiu $s1, $s1, 1
|
|
||||||
/* 186C0 8003D2C0 0800F4B5 */ j .L8003D2D4
|
|
||||||
/* 186C4 8003D2C4 0220102D */ daddu $v0, $s1, $zero
|
|
||||||
.L8003D2C8:
|
|
||||||
/* 186C8 8003D2C8 2A220040 */ slti $v0, $s1, 0x40
|
|
||||||
/* 186CC 8003D2CC 1440FFD6 */ bnez $v0, .L8003D228
|
|
||||||
/* 186D0 8003D2D0 2402FFFF */ addiu $v0, $zero, -1
|
|
||||||
.L8003D2D4:
|
|
||||||
/* 186D4 8003D2D4 8FBF0028 */ lw $ra, 0x28($sp)
|
|
||||||
/* 186D8 8003D2D8 8FB50024 */ lw $s5, 0x24($sp)
|
|
||||||
/* 186DC 8003D2DC 8FB40020 */ lw $s4, 0x20($sp)
|
|
||||||
/* 186E0 8003D2E0 8FB3001C */ lw $s3, 0x1c($sp)
|
|
||||||
/* 186E4 8003D2E4 8FB20018 */ lw $s2, 0x18($sp)
|
|
||||||
/* 186E8 8003D2E8 8FB10014 */ lw $s1, 0x14($sp)
|
|
||||||
/* 186EC 8003D2EC 8FB00010 */ lw $s0, 0x10($sp)
|
|
||||||
/* 186F0 8003D2F0 03E00008 */ jr $ra
|
|
||||||
/* 186F4 8003D2F4 27BD0030 */ addiu $sp, $sp, 0x30
|
|
@ -1,71 +0,0 @@
|
|||||||
.set noat # allow manual use of $at
|
|
||||||
.set noreorder # don't insert nops after branches
|
|
||||||
|
|
||||||
glabel func_80243FC4_A2E204
|
|
||||||
/* A2E204 80243FC4 27BDFFE8 */ addiu $sp, $sp, -0x18
|
|
||||||
/* A2E208 80243FC8 0000202D */ daddu $a0, $zero, $zero
|
|
||||||
/* A2E20C 80243FCC 3C058024 */ lui $a1, %hi(func_80243CC0_A2DF00)
|
|
||||||
/* A2E210 80243FD0 24A53CC0 */ addiu $a1, $a1, %lo(func_80243CC0_A2DF00)
|
|
||||||
/* A2E214 80243FD4 AFBF0014 */ sw $ra, 0x14($sp)
|
|
||||||
/* A2E218 80243FD8 0C048C8F */ jal create_worker_frontUI
|
|
||||||
/* A2E21C 80243FDC AFB00010 */ sw $s0, 0x10($sp)
|
|
||||||
/* A2E220 80243FE0 3C040001 */ lui $a0, 1
|
|
||||||
/* A2E224 80243FE4 3C108025 */ lui $s0, %hi(D_8024AA20_A34C60)
|
|
||||||
/* A2E228 80243FE8 2610AA20 */ addiu $s0, $s0, %lo(D_8024AA20_A34C60)
|
|
||||||
/* A2E22C 80243FEC 8E030000 */ lw $v1, ($s0)
|
|
||||||
/* A2E230 80243FF0 3484D420 */ ori $a0, $a0, 0xd420
|
|
||||||
/* A2E234 80243FF4 0C0475F9 */ jal mdl_get_next_texture_address
|
|
||||||
/* A2E238 80243FF8 AC620000 */ sw $v0, ($v1)
|
|
||||||
/* A2E23C 80243FFC 3407A710 */ ori $a3, $zero, 0xa710
|
|
||||||
/* A2E240 80244000 00471821 */ addu $v1, $v0, $a3
|
|
||||||
/* A2E244 80244004 0000202D */ daddu $a0, $zero, $zero
|
|
||||||
/* A2E248 80244008 8E060000 */ lw $a2, ($s0)
|
|
||||||
/* A2E24C 8024400C 0080282D */ daddu $a1, $a0, $zero
|
|
||||||
/* A2E250 80244010 ACC30008 */ sw $v1, 8($a2)
|
|
||||||
/* A2E254 80244014 24630200 */ addiu $v1, $v1, 0x200
|
|
||||||
/* A2E258 80244018 ACC3000C */ sw $v1, 0xc($a2)
|
|
||||||
/* A2E25C 8024401C 00671821 */ addu $v1, $v1, $a3
|
|
||||||
/* A2E260 80244020 ACC30010 */ sw $v1, 0x10($a2)
|
|
||||||
/* A2E264 80244024 24630200 */ addiu $v1, $v1, 0x200
|
|
||||||
/* A2E268 80244028 ACC30018 */ sw $v1, 0x18($a2)
|
|
||||||
/* A2E26C 8024402C 24634000 */ addiu $v1, $v1, 0x4000
|
|
||||||
/* A2E270 80244030 ACC3001C */ sw $v1, 0x1c($a2)
|
|
||||||
/* A2E274 80244034 24634000 */ addiu $v1, $v1, 0x4000
|
|
||||||
/* A2E278 80244038 ACC20004 */ sw $v0, 4($a2)
|
|
||||||
/* A2E27C 8024403C 240200F0 */ addiu $v0, $zero, 0xf0
|
|
||||||
/* A2E280 80244040 A4C20046 */ sh $v0, 0x46($a2)
|
|
||||||
/* A2E284 80244044 2402006F */ addiu $v0, $zero, 0x6f
|
|
||||||
/* A2E288 80244048 A4C20048 */ sh $v0, 0x48($a2)
|
|
||||||
/* A2E28C 8024404C 24020036 */ addiu $v0, $zero, 0x36
|
|
||||||
/* A2E290 80244050 ACC30020 */ sw $v1, 0x20($a2)
|
|
||||||
/* A2E294 80244054 A4C0003C */ sh $zero, 0x3c($a2)
|
|
||||||
/* A2E298 80244058 A4C0003E */ sh $zero, 0x3e($a2)
|
|
||||||
/* A2E29C 8024405C A4C00040 */ sh $zero, 0x40($a2)
|
|
||||||
/* A2E2A0 80244060 A4C00042 */ sh $zero, 0x42($a2)
|
|
||||||
/* A2E2A4 80244064 A4C00044 */ sh $zero, 0x44($a2)
|
|
||||||
/* A2E2A8 80244068 0C090FB4 */ jal func_80243ED0_A2E110
|
|
||||||
/* A2E2AC 8024406C A4C2004A */ sh $v0, 0x4a($a2)
|
|
||||||
/* A2E2B0 80244070 24040001 */ addiu $a0, $zero, 1
|
|
||||||
/* A2E2B4 80244074 0C090FB4 */ jal func_80243ED0_A2E110
|
|
||||||
/* A2E2B8 80244078 0080282D */ daddu $a1, $a0, $zero
|
|
||||||
/* A2E2BC 8024407C 3C030002 */ lui $v1, 2
|
|
||||||
/* A2E2C0 80244080 3463A440 */ ori $v1, $v1, 0xa440
|
|
||||||
/* A2E2C4 80244084 3C050022 */ lui $a1, %hi(title_bg_1_ROM_START)
|
|
||||||
/* A2E2C8 80244088 24A591B0 */ addiu $a1, $a1, %lo(title_bg_1_ROM_START)
|
|
||||||
/* A2E2CC 8024408C 00A32021 */ addu $a0, $a1, $v1
|
|
||||||
/* A2E2D0 80244090 24A54000 */ addiu $a1, $a1, 0x4000
|
|
||||||
/* A2E2D4 80244094 8E020000 */ lw $v0, ($s0)
|
|
||||||
/* A2E2D8 80244098 00A32821 */ addu $a1, $a1, $v1
|
|
||||||
/* A2E2DC 8024409C 8C460018 */ lw $a2, 0x18($v0)
|
|
||||||
/* A2E2E0 802440A0 0C00A5CF */ jal dma_copy
|
|
||||||
/* A2E2E4 802440A4 24A54200 */ addiu $a1, $a1, 0x4200
|
|
||||||
/* A2E2E8 802440A8 8E040000 */ lw $a0, ($s0)
|
|
||||||
/* A2E2EC 802440AC 240300FF */ addiu $v1, $zero, 0xff
|
|
||||||
/* A2E2F0 802440B0 A4800058 */ sh $zero, 0x58($a0)
|
|
||||||
/* A2E2F4 802440B4 A483005A */ sh $v1, 0x5a($a0)
|
|
||||||
/* A2E2F8 802440B8 A480005C */ sh $zero, 0x5c($a0)
|
|
||||||
/* A2E2FC 802440BC 8FBF0014 */ lw $ra, 0x14($sp)
|
|
||||||
/* A2E300 802440C0 8FB00010 */ lw $s0, 0x10($sp)
|
|
||||||
/* A2E304 802440C4 24020002 */ addiu $v0, $zero, 2
|
|
||||||
/* A2E308 802440C8 03E00008 */ jr $ra
|
|
||||||
/* A2E30C 802440CC 27BD0018 */ addiu $sp, $sp, 0x18
|
|
@ -1,118 +0,0 @@
|
|||||||
.set noat # allow manual use of $at
|
|
||||||
.set noreorder # don't insert nops after branches
|
|
||||||
|
|
||||||
glabel func_80240B4C_B2108C
|
|
||||||
/* B2108C 80240B4C 27BDFFB0 */ addiu $sp, $sp, -0x50
|
|
||||||
/* B21090 80240B50 AFB20018 */ sw $s2, 0x18($sp)
|
|
||||||
/* B21094 80240B54 0080902D */ daddu $s2, $a0, $zero
|
|
||||||
/* B21098 80240B58 AFBF0028 */ sw $ra, 0x28($sp)
|
|
||||||
/* B2109C 80240B5C AFB50024 */ sw $s5, 0x24($sp)
|
|
||||||
/* B210A0 80240B60 AFB40020 */ sw $s4, 0x20($sp)
|
|
||||||
/* B210A4 80240B64 AFB3001C */ sw $s3, 0x1c($sp)
|
|
||||||
/* B210A8 80240B68 AFB10014 */ sw $s1, 0x14($sp)
|
|
||||||
/* B210AC 80240B6C AFB00010 */ sw $s0, 0x10($sp)
|
|
||||||
/* B210B0 80240B70 F7BA0048 */ sdc1 $f26, 0x48($sp)
|
|
||||||
/* B210B4 80240B74 F7B80040 */ sdc1 $f24, 0x40($sp)
|
|
||||||
/* B210B8 80240B78 F7B60038 */ sdc1 $f22, 0x38($sp)
|
|
||||||
/* B210BC 80240B7C F7B40030 */ sdc1 $f20, 0x30($sp)
|
|
||||||
/* B210C0 80240B80 8E50000C */ lw $s0, 0xc($s2)
|
|
||||||
/* B210C4 80240B84 4480A000 */ mtc1 $zero, $f20
|
|
||||||
/* B210C8 80240B88 8E050000 */ lw $a1, ($s0)
|
|
||||||
/* B210CC 80240B8C 26100004 */ addiu $s0, $s0, 4
|
|
||||||
/* B210D0 80240B90 4600A686 */ mov.s $f26, $f20
|
|
||||||
/* B210D4 80240B94 0C0B1EAF */ jal evt_get_variable
|
|
||||||
/* B210D8 80240B98 4600A606 */ mov.s $f24, $f20
|
|
||||||
/* B210DC 80240B9C 8E130000 */ lw $s3, ($s0)
|
|
||||||
/* B210E0 80240BA0 26100004 */ addiu $s0, $s0, 4
|
|
||||||
/* B210E4 80240BA4 0000202D */ daddu $a0, $zero, $zero
|
|
||||||
/* B210E8 80240BA8 8E140000 */ lw $s4, ($s0)
|
|
||||||
/* B210EC 80240BAC 8E150004 */ lw $s5, 4($s0)
|
|
||||||
/* B210F0 80240BB0 0C00EAD2 */ jal get_npc_safe
|
|
||||||
/* B210F4 80240BB4 0040882D */ daddu $s1, $v0, $zero
|
|
||||||
/* B210F8 80240BB8 0040802D */ daddu $s0, $v0, $zero
|
|
||||||
/* B210FC 80240BBC 24020001 */ addiu $v0, $zero, 1
|
|
||||||
/* B21100 80240BC0 1222000F */ beq $s1, $v0, .L80240C00
|
|
||||||
/* B21104 80240BC4 2A220002 */ slti $v0, $s1, 2
|
|
||||||
/* B21108 80240BC8 10400005 */ beqz $v0, .L80240BE0
|
|
||||||
/* B2110C 80240BCC 24020002 */ addiu $v0, $zero, 2
|
|
||||||
/* B21110 80240BD0 12200007 */ beqz $s1, .L80240BF0
|
|
||||||
/* B21114 80240BD4 00000000 */ nop
|
|
||||||
/* B21118 80240BD8 08090308 */ j .L80240C20
|
|
||||||
/* B2111C 80240BDC 00000000 */ nop
|
|
||||||
.L80240BE0:
|
|
||||||
/* B21120 80240BE0 1222000B */ beq $s1, $v0, .L80240C10
|
|
||||||
/* B21124 80240BE4 00000000 */ nop
|
|
||||||
/* B21128 80240BE8 08090308 */ j .L80240C20
|
|
||||||
/* B2112C 80240BEC 00000000 */ nop
|
|
||||||
.L80240BF0:
|
|
||||||
/* B21130 80240BF0 3C014302 */ lui $at, 0x4302
|
|
||||||
/* B21134 80240BF4 4481B000 */ mtc1 $at, $f22
|
|
||||||
/* B21138 80240BF8 0809030B */ j .L80240C2C
|
|
||||||
/* B2113C 80240BFC 2A220004 */ slti $v0, $s1, 4
|
|
||||||
.L80240C00:
|
|
||||||
/* B21140 80240C00 3C014320 */ lui $at, 0x4320
|
|
||||||
/* B21144 80240C04 4481B000 */ mtc1 $at, $f22
|
|
||||||
/* B21148 80240C08 0809030B */ j .L80240C2C
|
|
||||||
/* B2114C 80240C0C 2A220004 */ slti $v0, $s1, 4
|
|
||||||
.L80240C10:
|
|
||||||
/* B21150 80240C10 3C0142C8 */ lui $at, 0x42c8
|
|
||||||
/* B21154 80240C14 4481B000 */ mtc1 $at, $f22
|
|
||||||
/* B21158 80240C18 0809030B */ j .L80240C2C
|
|
||||||
/* B2115C 80240C1C 2A220004 */ slti $v0, $s1, 4
|
|
||||||
.L80240C20:
|
|
||||||
/* B21160 80240C20 3C0142A0 */ lui $at, 0x42a0
|
|
||||||
/* B21164 80240C24 4481B000 */ mtc1 $at, $f22
|
|
||||||
/* B21168 80240C28 2A220004 */ slti $v0, $s1, 4
|
|
||||||
.L80240C2C:
|
|
||||||
/* B2116C 80240C2C 10400019 */ beqz $v0, .L80240C94
|
|
||||||
/* B21170 80240C30 0240202D */ daddu $a0, $s2, $zero
|
|
||||||
/* B21174 80240C34 C614000C */ lwc1 $f20, 0xc($s0)
|
|
||||||
/* B21178 80240C38 4600A507 */ neg.s $f20, $f20
|
|
||||||
/* B2117C 80240C3C 0C00A8BB */ jal sin_deg
|
|
||||||
/* B21180 80240C40 4600A306 */ mov.s $f12, $f20
|
|
||||||
/* B21184 80240C44 46160002 */ mul.s $f0, $f0, $f22
|
|
||||||
/* B21188 80240C48 00000000 */ nop
|
|
||||||
/* B2118C 80240C4C C6020038 */ lwc1 $f2, 0x38($s0)
|
|
||||||
/* B21190 80240C50 3C0141F0 */ lui $at, 0x41f0
|
|
||||||
/* B21194 80240C54 44812000 */ mtc1 $at, $f4
|
|
||||||
/* B21198 80240C58 00000000 */ nop
|
|
||||||
/* B2119C 80240C5C 46041080 */ add.s $f2, $f2, $f4
|
|
||||||
/* B211A0 80240C60 46001680 */ add.s $f26, $f2, $f0
|
|
||||||
/* B211A4 80240C64 0C00A8D4 */ jal cos_deg
|
|
||||||
/* B211A8 80240C68 4600A306 */ mov.s $f12, $f20
|
|
||||||
/* B211AC 80240C6C 46160002 */ mul.s $f0, $f0, $f22
|
|
||||||
/* B211B0 80240C70 00000000 */ nop
|
|
||||||
/* B211B4 80240C74 C604003C */ lwc1 $f4, 0x3c($s0)
|
|
||||||
/* B211B8 80240C78 3C014248 */ lui $at, 0x4248
|
|
||||||
/* B211BC 80240C7C 44811000 */ mtc1 $at, $f2
|
|
||||||
/* B211C0 80240C80 00000000 */ nop
|
|
||||||
/* B211C4 80240C84 46022500 */ add.s $f20, $f4, $f2
|
|
||||||
/* B211C8 80240C88 C6020040 */ lwc1 $f2, 0x40($s0)
|
|
||||||
/* B211CC 80240C8C 46001600 */ add.s $f24, $f2, $f0
|
|
||||||
/* B211D0 80240C90 0240202D */ daddu $a0, $s2, $zero
|
|
||||||
.L80240C94:
|
|
||||||
/* B211D4 80240C94 4406D000 */ mfc1 $a2, $f26
|
|
||||||
/* B211D8 80240C98 0C0B2190 */ jal evt_set_float_variable
|
|
||||||
/* B211DC 80240C9C 0260282D */ daddu $a1, $s3, $zero
|
|
||||||
/* B211E0 80240CA0 0240202D */ daddu $a0, $s2, $zero
|
|
||||||
/* B211E4 80240CA4 4406A000 */ mfc1 $a2, $f20
|
|
||||||
/* B211E8 80240CA8 0C0B2190 */ jal evt_set_float_variable
|
|
||||||
/* B211EC 80240CAC 0280282D */ daddu $a1, $s4, $zero
|
|
||||||
/* B211F0 80240CB0 0240202D */ daddu $a0, $s2, $zero
|
|
||||||
/* B211F4 80240CB4 4406C000 */ mfc1 $a2, $f24
|
|
||||||
/* B211F8 80240CB8 0C0B2190 */ jal evt_set_float_variable
|
|
||||||
/* B211FC 80240CBC 02A0282D */ daddu $a1, $s5, $zero
|
|
||||||
/* B21200 80240CC0 8FBF0028 */ lw $ra, 0x28($sp)
|
|
||||||
/* B21204 80240CC4 8FB50024 */ lw $s5, 0x24($sp)
|
|
||||||
/* B21208 80240CC8 8FB40020 */ lw $s4, 0x20($sp)
|
|
||||||
/* B2120C 80240CCC 8FB3001C */ lw $s3, 0x1c($sp)
|
|
||||||
/* B21210 80240CD0 8FB20018 */ lw $s2, 0x18($sp)
|
|
||||||
/* B21214 80240CD4 8FB10014 */ lw $s1, 0x14($sp)
|
|
||||||
/* B21218 80240CD8 8FB00010 */ lw $s0, 0x10($sp)
|
|
||||||
/* B2121C 80240CDC D7BA0048 */ ldc1 $f26, 0x48($sp)
|
|
||||||
/* B21220 80240CE0 D7B80040 */ ldc1 $f24, 0x40($sp)
|
|
||||||
/* B21224 80240CE4 D7B60038 */ ldc1 $f22, 0x38($sp)
|
|
||||||
/* B21228 80240CE8 D7B40030 */ ldc1 $f20, 0x30($sp)
|
|
||||||
/* B2122C 80240CEC 24020002 */ addiu $v0, $zero, 2
|
|
||||||
/* B21230 80240CF0 03E00008 */ jr $ra
|
|
||||||
/* B21234 80240CF4 27BD0050 */ addiu $sp, $sp, 0x50
|
|
@ -1,288 +0,0 @@
|
|||||||
.set noat # allow manual use of $at
|
|
||||||
.set noreorder # don't insert nops after branches
|
|
||||||
|
|
||||||
glabel func_80240000_D2BD30
|
|
||||||
/* D2BD30 80240000 27BDFEB0 */ addiu $sp, $sp, -0x150
|
|
||||||
/* D2BD34 80240004 AFB70134 */ sw $s7, 0x134($sp)
|
|
||||||
/* D2BD38 80240008 AFBE0138 */ sw $fp, 0x138($sp)
|
|
||||||
/* D2BD3C 8024000C 3C1E8011 */ lui $fp, %hi(gPlayerStatus)
|
|
||||||
/* D2BD40 80240010 27DEEFC8 */ addiu $fp, $fp, %lo(gPlayerStatus)
|
|
||||||
/* D2BD44 80240014 AFBF013C */ sw $ra, 0x13c($sp)
|
|
||||||
/* D2BD48 80240018 AFB60130 */ sw $s6, 0x130($sp)
|
|
||||||
/* D2BD4C 8024001C AFB5012C */ sw $s5, 0x12c($sp)
|
|
||||||
/* D2BD50 80240020 AFB40128 */ sw $s4, 0x128($sp)
|
|
||||||
/* D2BD54 80240024 AFB30124 */ sw $s3, 0x124($sp)
|
|
||||||
/* D2BD58 80240028 AFB20120 */ sw $s2, 0x120($sp)
|
|
||||||
/* D2BD5C 8024002C AFB1011C */ sw $s1, 0x11c($sp)
|
|
||||||
/* D2BD60 80240030 AFB00118 */ sw $s0, 0x118($sp)
|
|
||||||
/* D2BD64 80240034 F7B60148 */ sdc1 $f22, 0x148($sp)
|
|
||||||
/* D2BD68 80240038 F7B40140 */ sdc1 $f20, 0x140($sp)
|
|
||||||
/* D2BD6C 8024003C 10A00061 */ beqz $a1, .L802401C4
|
|
||||||
/* D2BD70 80240040 0080B82D */ daddu $s7, $a0, $zero
|
|
||||||
/* D2BD74 80240044 0C00AB39 */ jal heap_malloc
|
|
||||||
/* D2BD78 80240048 24041B80 */ addiu $a0, $zero, 0x1b80
|
|
||||||
/* D2BD7C 8024004C 0000982D */ daddu $s3, $zero, $zero
|
|
||||||
/* D2BD80 80240050 AEE20070 */ sw $v0, 0x70($s7)
|
|
||||||
/* D2BD84 80240054 0040882D */ daddu $s1, $v0, $zero
|
|
||||||
/* D2BD88 80240058 3C148024 */ lui $s4, %hi(D_802424C0_D2E1F0)
|
|
||||||
/* D2BD8C 8024005C 269424C0 */ addiu $s4, $s4, %lo(D_802424C0_D2E1F0)
|
|
||||||
/* D2BD90 80240060 2630003C */ addiu $s0, $s1, 0x3c
|
|
||||||
/* D2BD94 80240064 AEE00074 */ sw $zero, 0x74($s7)
|
|
||||||
.L80240068:
|
|
||||||
/* D2BD98 80240068 0C046C04 */ jal get_model_list_index_from_tree_index
|
|
||||||
/* D2BD9C 8024006C 8E840000 */ lw $a0, ($s4)
|
|
||||||
/* D2BDA0 80240070 0C046B4C */ jal get_model_from_list_index
|
|
||||||
/* D2BDA4 80240074 0040202D */ daddu $a0, $v0, $zero
|
|
||||||
/* D2BDA8 80240078 0040902D */ daddu $s2, $v0, $zero
|
|
||||||
/* D2BDAC 8024007C AE200000 */ sw $zero, ($s1)
|
|
||||||
/* D2BDB0 80240080 C6400098 */ lwc1 $f0, 0x98($s2)
|
|
||||||
/* D2BDB4 80240084 E600FFC8 */ swc1 $f0, -0x38($s0)
|
|
||||||
/* D2BDB8 80240088 C640009C */ lwc1 $f0, 0x9c($s2)
|
|
||||||
/* D2BDBC 8024008C E600FFCC */ swc1 $f0, -0x34($s0)
|
|
||||||
/* D2BDC0 80240090 C64000A0 */ lwc1 $f0, 0xa0($s2)
|
|
||||||
/* D2BDC4 80240094 C602FFCC */ lwc1 $f2, -0x34($s0)
|
|
||||||
/* D2BDC8 80240098 E600FFD0 */ swc1 $f0, -0x30($s0)
|
|
||||||
/* D2BDCC 8024009C C600FFC8 */ lwc1 $f0, -0x38($s0)
|
|
||||||
/* D2BDD0 802400A0 C604FFD0 */ lwc1 $f4, -0x30($s0)
|
|
||||||
/* D2BDD4 802400A4 24040014 */ addiu $a0, $zero, 0x14
|
|
||||||
/* D2BDD8 802400A8 AE00FFE0 */ sw $zero, -0x20($s0)
|
|
||||||
/* D2BDDC 802400AC AE00FFE4 */ sw $zero, -0x1c($s0)
|
|
||||||
/* D2BDE0 802400B0 AE00FFE8 */ sw $zero, -0x18($s0)
|
|
||||||
/* D2BDE4 802400B4 E602FFD8 */ swc1 $f2, -0x28($s0)
|
|
||||||
/* D2BDE8 802400B8 E600FFD4 */ swc1 $f0, -0x2c($s0)
|
|
||||||
/* D2BDEC 802400BC 0C00A67F */ jal rand_int
|
|
||||||
/* D2BDF0 802400C0 E604FFDC */ swc1 $f4, -0x24($s0)
|
|
||||||
/* D2BDF4 802400C4 24040014 */ addiu $a0, $zero, 0x14
|
|
||||||
/* D2BDF8 802400C8 2442FFF6 */ addiu $v0, $v0, -0xa
|
|
||||||
/* D2BDFC 802400CC 44820000 */ mtc1 $v0, $f0
|
|
||||||
/* D2BE00 802400D0 00000000 */ nop
|
|
||||||
/* D2BE04 802400D4 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* D2BE08 802400D8 0C00A67F */ jal rand_int
|
|
||||||
/* D2BE0C 802400DC E600FFEC */ swc1 $f0, -0x14($s0)
|
|
||||||
/* D2BE10 802400E0 24040014 */ addiu $a0, $zero, 0x14
|
|
||||||
/* D2BE14 802400E4 2442FFF6 */ addiu $v0, $v0, -0xa
|
|
||||||
/* D2BE18 802400E8 44820000 */ mtc1 $v0, $f0
|
|
||||||
/* D2BE1C 802400EC 00000000 */ nop
|
|
||||||
/* D2BE20 802400F0 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* D2BE24 802400F4 0C00A67F */ jal rand_int
|
|
||||||
/* D2BE28 802400F8 E600FFF0 */ swc1 $f0, -0x10($s0)
|
|
||||||
/* D2BE2C 802400FC 24040005 */ addiu $a0, $zero, 5
|
|
||||||
/* D2BE30 80240100 2442FFF6 */ addiu $v0, $v0, -0xa
|
|
||||||
/* D2BE34 80240104 44820000 */ mtc1 $v0, $f0
|
|
||||||
/* D2BE38 80240108 00000000 */ nop
|
|
||||||
/* D2BE3C 8024010C 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* D2BE40 80240110 0C00A67F */ jal rand_int
|
|
||||||
/* D2BE44 80240114 E600FFF4 */ swc1 $f0, -0xc($s0)
|
|
||||||
/* D2BE48 80240118 3C0140A0 */ lui $at, 0x40a0
|
|
||||||
/* D2BE4C 8024011C 44811000 */ mtc1 $at, $f2
|
|
||||||
/* D2BE50 80240120 44820000 */ mtc1 $v0, $f0
|
|
||||||
/* D2BE54 80240124 00000000 */ nop
|
|
||||||
/* D2BE58 80240128 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* D2BE5C 8024012C 46020000 */ add.s $f0, $f0, $f2
|
|
||||||
/* D2BE60 80240130 24040003 */ addiu $a0, $zero, 3
|
|
||||||
/* D2BE64 80240134 0C00A67F */ jal rand_int
|
|
||||||
/* D2BE68 80240138 E600FFF8 */ swc1 $f0, -8($s0)
|
|
||||||
/* D2BE6C 8024013C 3C013F80 */ lui $at, 0x3f80
|
|
||||||
/* D2BE70 80240140 44811000 */ mtc1 $at, $f2
|
|
||||||
/* D2BE74 80240144 44820000 */ mtc1 $v0, $f0
|
|
||||||
/* D2BE78 80240148 00000000 */ nop
|
|
||||||
/* D2BE7C 8024014C 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* D2BE80 80240150 46020000 */ add.s $f0, $f0, $f2
|
|
||||||
/* D2BE84 80240154 24040168 */ addiu $a0, $zero, 0x168
|
|
||||||
/* D2BE88 80240158 0C00A67F */ jal rand_int
|
|
||||||
/* D2BE8C 8024015C E600FFFC */ swc1 $f0, -4($s0)
|
|
||||||
/* D2BE90 80240160 0000302D */ daddu $a2, $zero, $zero
|
|
||||||
/* D2BE94 80240164 44820000 */ mtc1 $v0, $f0
|
|
||||||
/* D2BE98 80240168 00000000 */ nop
|
|
||||||
/* D2BE9C 8024016C 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* D2BEA0 80240170 E6000000 */ swc1 $f0, ($s0)
|
|
||||||
/* D2BEA4 80240174 0000282D */ daddu $a1, $zero, $zero
|
|
||||||
.L80240178:
|
|
||||||
/* D2BEA8 80240178 00062100 */ sll $a0, $a2, 4
|
|
||||||
.L8024017C:
|
|
||||||
/* D2BEAC 8024017C 02241821 */ addu $v1, $s1, $a0
|
|
||||||
/* D2BEB0 80240180 02441021 */ addu $v0, $s2, $a0
|
|
||||||
/* D2BEB4 80240184 24840004 */ addiu $a0, $a0, 4
|
|
||||||
/* D2BEB8 80240188 24A50001 */ addiu $a1, $a1, 1
|
|
||||||
/* D2BEBC 8024018C C4400058 */ lwc1 $f0, 0x58($v0)
|
|
||||||
/* D2BEC0 80240190 28A20004 */ slti $v0, $a1, 4
|
|
||||||
/* D2BEC4 80240194 1440FFF9 */ bnez $v0, .L8024017C
|
|
||||||
/* D2BEC8 80240198 E4600040 */ swc1 $f0, 0x40($v1)
|
|
||||||
/* D2BECC 8024019C 24C60001 */ addiu $a2, $a2, 1
|
|
||||||
/* D2BED0 802401A0 28C20004 */ slti $v0, $a2, 4
|
|
||||||
/* D2BED4 802401A4 1440FFF4 */ bnez $v0, .L80240178
|
|
||||||
/* D2BED8 802401A8 0000282D */ daddu $a1, $zero, $zero
|
|
||||||
/* D2BEDC 802401AC 26940004 */ addiu $s4, $s4, 4
|
|
||||||
/* D2BEE0 802401B0 26730001 */ addiu $s3, $s3, 1
|
|
||||||
/* D2BEE4 802401B4 26100080 */ addiu $s0, $s0, 0x80
|
|
||||||
/* D2BEE8 802401B8 2E620037 */ sltiu $v0, $s3, 0x37
|
|
||||||
/* D2BEEC 802401BC 1440FFAA */ bnez $v0, .L80240068
|
|
||||||
/* D2BEF0 802401C0 26310080 */ addiu $s1, $s1, 0x80
|
|
||||||
.L802401C4:
|
|
||||||
/* D2BEF4 802401C4 0000982D */ daddu $s3, $zero, $zero
|
|
||||||
/* D2BEF8 802401C8 27B50058 */ addiu $s5, $sp, 0x58
|
|
||||||
/* D2BEFC 802401CC 27B40098 */ addiu $s4, $sp, 0x98
|
|
||||||
/* D2BF00 802401D0 27B600D8 */ addiu $s6, $sp, 0xd8
|
|
||||||
/* D2BF04 802401D4 8EF10070 */ lw $s1, 0x70($s7)
|
|
||||||
/* D2BF08 802401D8 3C013F80 */ lui $at, 0x3f80
|
|
||||||
/* D2BF0C 802401DC 4481B000 */ mtc1 $at, $f22
|
|
||||||
/* D2BF10 802401E0 4480A000 */ mtc1 $zero, $f20
|
|
||||||
/* D2BF14 802401E4 26300024 */ addiu $s0, $s1, 0x24
|
|
||||||
/* D2BF18 802401E8 00131080 */ sll $v0, $s3, 2
|
|
||||||
.L802401EC:
|
|
||||||
/* D2BF1C 802401EC 3C048024 */ lui $a0, %hi(D_802424C0_D2E1F0)
|
|
||||||
/* D2BF20 802401F0 00822021 */ addu $a0, $a0, $v0
|
|
||||||
/* D2BF24 802401F4 0C046C04 */ jal get_model_list_index_from_tree_index
|
|
||||||
/* D2BF28 802401F8 8C8424C0 */ lw $a0, %lo(D_802424C0_D2E1F0)($a0)
|
|
||||||
/* D2BF2C 802401FC 0C046B4C */ jal get_model_from_list_index
|
|
||||||
/* D2BF30 80240200 0040202D */ daddu $a0, $v0, $zero
|
|
||||||
/* D2BF34 80240204 8E230000 */ lw $v1, ($s1)
|
|
||||||
/* D2BF38 80240208 1460001C */ bnez $v1, .L8024027C
|
|
||||||
/* D2BF3C 8024020C 0040902D */ daddu $s2, $v0, $zero
|
|
||||||
/* D2BF40 80240210 26240004 */ addiu $a0, $s1, 4
|
|
||||||
/* D2BF44 80240214 8E060014 */ lw $a2, 0x14($s0)
|
|
||||||
/* D2BF48 80240218 8E070018 */ lw $a3, 0x18($s0)
|
|
||||||
/* D2BF4C 8024021C 0C00A7E7 */ jal add_vec2D_polar
|
|
||||||
/* D2BF50 80240220 2625000C */ addiu $a1, $s1, 0xc
|
|
||||||
/* D2BF54 80240224 C6000010 */ lwc1 $f0, 0x10($s0)
|
|
||||||
/* D2BF58 80240228 46160001 */ sub.s $f0, $f0, $f22
|
|
||||||
/* D2BF5C 8024022C C602FFE4 */ lwc1 $f2, -0x1c($s0)
|
|
||||||
/* D2BF60 80240230 46001100 */ add.s $f4, $f2, $f0
|
|
||||||
/* D2BF64 80240234 4614003C */ c.lt.s $f0, $f20
|
|
||||||
/* D2BF68 80240238 E6000010 */ swc1 $f0, 0x10($s0)
|
|
||||||
/* D2BF6C 8024023C 4500000F */ bc1f .L8024027C
|
|
||||||
/* D2BF70 80240240 E604FFE4 */ swc1 $f4, -0x1c($s0)
|
|
||||||
/* D2BF74 80240244 C7C0002C */ lwc1 $f0, 0x2c($fp)
|
|
||||||
/* D2BF78 80240248 3C014316 */ lui $at, 0x4316
|
|
||||||
/* D2BF7C 8024024C 44811000 */ mtc1 $at, $f2
|
|
||||||
/* D2BF80 80240250 00000000 */ nop
|
|
||||||
/* D2BF84 80240254 46020001 */ sub.s $f0, $f0, $f2
|
|
||||||
/* D2BF88 80240258 4600203C */ c.lt.s $f4, $f0
|
|
||||||
/* D2BF8C 8024025C 00000000 */ nop
|
|
||||||
/* D2BF90 80240260 45000007 */ bc1f .L80240280
|
|
||||||
/* D2BF94 80240264 0000302D */ daddu $a2, $zero, $zero
|
|
||||||
/* D2BF98 80240268 8EE20074 */ lw $v0, 0x74($s7)
|
|
||||||
/* D2BF9C 8024026C 24420001 */ addiu $v0, $v0, 1
|
|
||||||
/* D2BFA0 80240270 AEE20074 */ sw $v0, 0x74($s7)
|
|
||||||
/* D2BFA4 80240274 24020065 */ addiu $v0, $zero, 0x65
|
|
||||||
/* D2BFA8 80240278 AE220000 */ sw $v0, ($s1)
|
|
||||||
.L8024027C:
|
|
||||||
/* D2BFAC 8024027C 0000302D */ daddu $a2, $zero, $zero
|
|
||||||
.L80240280:
|
|
||||||
/* D2BFB0 80240280 0000282D */ daddu $a1, $zero, $zero
|
|
||||||
.L80240284:
|
|
||||||
/* D2BFB4 80240284 00062100 */ sll $a0, $a2, 4
|
|
||||||
.L80240288:
|
|
||||||
/* D2BFB8 80240288 02441821 */ addu $v1, $s2, $a0
|
|
||||||
/* D2BFBC 8024028C 02241021 */ addu $v0, $s1, $a0
|
|
||||||
/* D2BFC0 80240290 24840004 */ addiu $a0, $a0, 4
|
|
||||||
/* D2BFC4 80240294 24A50001 */ addiu $a1, $a1, 1
|
|
||||||
/* D2BFC8 80240298 C4400040 */ lwc1 $f0, 0x40($v0)
|
|
||||||
/* D2BFCC 8024029C 28A20004 */ slti $v0, $a1, 4
|
|
||||||
/* D2BFD0 802402A0 1440FFF9 */ bnez $v0, .L80240288
|
|
||||||
/* D2BFD4 802402A4 E4600058 */ swc1 $f0, 0x58($v1)
|
|
||||||
/* D2BFD8 802402A8 24C60001 */ addiu $a2, $a2, 1
|
|
||||||
/* D2BFDC 802402AC 28C20004 */ slti $v0, $a2, 4
|
|
||||||
/* D2BFE0 802402B0 1440FFF4 */ bnez $v0, .L80240284
|
|
||||||
/* D2BFE4 802402B4 0000282D */ daddu $a1, $zero, $zero
|
|
||||||
/* D2BFE8 802402B8 96420000 */ lhu $v0, ($s2)
|
|
||||||
/* D2BFEC 802402BC 34421400 */ ori $v0, $v0, 0x1400
|
|
||||||
/* D2BFF0 802402C0 A6420000 */ sh $v0, ($s2)
|
|
||||||
/* D2BFF4 802402C4 C602FFE0 */ lwc1 $f2, -0x20($s0)
|
|
||||||
/* D2BFF8 802402C8 C600FFEC */ lwc1 $f0, -0x14($s0)
|
|
||||||
/* D2BFFC 802402CC 46001081 */ sub.s $f2, $f2, $f0
|
|
||||||
/* D2C000 802402D0 C600FFF0 */ lwc1 $f0, -0x10($s0)
|
|
||||||
/* D2C004 802402D4 44051000 */ mfc1 $a1, $f2
|
|
||||||
/* D2C008 802402D8 C602FFE4 */ lwc1 $f2, -0x1c($s0)
|
|
||||||
/* D2C00C 802402DC 46001081 */ sub.s $f2, $f2, $f0
|
|
||||||
/* D2C010 802402E0 C600FFF4 */ lwc1 $f0, -0xc($s0)
|
|
||||||
/* D2C014 802402E4 44061000 */ mfc1 $a2, $f2
|
|
||||||
/* D2C018 802402E8 C602FFE8 */ lwc1 $f2, -0x18($s0)
|
|
||||||
/* D2C01C 802402EC 46001081 */ sub.s $f2, $f2, $f0
|
|
||||||
/* D2C020 802402F0 44071000 */ mfc1 $a3, $f2
|
|
||||||
/* D2C024 802402F4 0C019E40 */ jal guTranslateF
|
|
||||||
/* D2C028 802402F8 27A40018 */ addiu $a0, $sp, 0x18
|
|
||||||
/* D2C02C 802402FC C602FFF8 */ lwc1 $f2, -8($s0)
|
|
||||||
/* D2C030 80240300 C6000004 */ lwc1 $f0, 4($s0)
|
|
||||||
/* D2C034 80240304 C604FFFC */ lwc1 $f4, -4($s0)
|
|
||||||
/* D2C038 80240308 46001080 */ add.s $f2, $f2, $f0
|
|
||||||
/* D2C03C 8024030C C6000008 */ lwc1 $f0, 8($s0)
|
|
||||||
/* D2C040 80240310 46002100 */ add.s $f4, $f4, $f0
|
|
||||||
/* D2C044 80240314 C6000000 */ lwc1 $f0, ($s0)
|
|
||||||
/* D2C048 80240318 E602FFF8 */ swc1 $f2, -8($s0)
|
|
||||||
/* D2C04C 8024031C C602000C */ lwc1 $f2, 0xc($s0)
|
|
||||||
/* D2C050 80240320 C60CFFF8 */ lwc1 $f12, -8($s0)
|
|
||||||
/* D2C054 80240324 46020000 */ add.s $f0, $f0, $f2
|
|
||||||
/* D2C058 80240328 E604FFFC */ swc1 $f4, -4($s0)
|
|
||||||
/* D2C05C 8024032C 0C00A6C9 */ jal clamp_angle
|
|
||||||
/* D2C060 80240330 E6000000 */ swc1 $f0, ($s0)
|
|
||||||
/* D2C064 80240334 C60CFFFC */ lwc1 $f12, -4($s0)
|
|
||||||
/* D2C068 80240338 26730001 */ addiu $s3, $s3, 1
|
|
||||||
/* D2C06C 8024033C 0C00A6C9 */ jal clamp_angle
|
|
||||||
/* D2C070 80240340 E600FFF8 */ swc1 $f0, -8($s0)
|
|
||||||
/* D2C074 80240344 C60C0000 */ lwc1 $f12, ($s0)
|
|
||||||
/* D2C078 80240348 26310080 */ addiu $s1, $s1, 0x80
|
|
||||||
/* D2C07C 8024034C 0C00A6C9 */ jal clamp_angle
|
|
||||||
/* D2C080 80240350 E600FFFC */ swc1 $f0, -4($s0)
|
|
||||||
/* D2C084 80240354 E6000000 */ swc1 $f0, ($s0)
|
|
||||||
/* D2C088 80240358 E7B40010 */ swc1 $f20, 0x10($sp)
|
|
||||||
/* D2C08C 8024035C 8E05FFF8 */ lw $a1, -8($s0)
|
|
||||||
/* D2C090 80240360 4406B000 */ mfc1 $a2, $f22
|
|
||||||
/* D2C094 80240364 4407A000 */ mfc1 $a3, $f20
|
|
||||||
/* D2C098 80240368 0C019EC8 */ jal guRotateF
|
|
||||||
/* D2C09C 8024036C 02A0202D */ daddu $a0, $s5, $zero
|
|
||||||
/* D2C0A0 80240370 E7B40010 */ swc1 $f20, 0x10($sp)
|
|
||||||
/* D2C0A4 80240374 8E05FFFC */ lw $a1, -4($s0)
|
|
||||||
/* D2C0A8 80240378 4406A000 */ mfc1 $a2, $f20
|
|
||||||
/* D2C0AC 8024037C 4407B000 */ mfc1 $a3, $f22
|
|
||||||
/* D2C0B0 80240380 0C019EC8 */ jal guRotateF
|
|
||||||
/* D2C0B4 80240384 0280202D */ daddu $a0, $s4, $zero
|
|
||||||
/* D2C0B8 80240388 02C0202D */ daddu $a0, $s6, $zero
|
|
||||||
/* D2C0BC 8024038C E7B60010 */ swc1 $f22, 0x10($sp)
|
|
||||||
/* D2C0C0 80240390 8E050000 */ lw $a1, ($s0)
|
|
||||||
/* D2C0C4 80240394 4406A000 */ mfc1 $a2, $f20
|
|
||||||
/* D2C0C8 80240398 4407A000 */ mfc1 $a3, $f20
|
|
||||||
/* D2C0CC 8024039C 0C019EC8 */ jal guRotateF
|
|
||||||
/* D2C0D0 802403A0 26100080 */ addiu $s0, $s0, 0x80
|
|
||||||
/* D2C0D4 802403A4 02C0202D */ daddu $a0, $s6, $zero
|
|
||||||
/* D2C0D8 802403A8 02A0282D */ daddu $a1, $s5, $zero
|
|
||||||
/* D2C0DC 802403AC 0C019D80 */ jal guMtxCatF
|
|
||||||
/* D2C0E0 802403B0 02A0302D */ daddu $a2, $s5, $zero
|
|
||||||
/* D2C0E4 802403B4 02A0202D */ daddu $a0, $s5, $zero
|
|
||||||
/* D2C0E8 802403B8 0280282D */ daddu $a1, $s4, $zero
|
|
||||||
/* D2C0EC 802403BC 0C019D80 */ jal guMtxCatF
|
|
||||||
/* D2C0F0 802403C0 0280302D */ daddu $a2, $s4, $zero
|
|
||||||
/* D2C0F4 802403C4 0280202D */ daddu $a0, $s4, $zero
|
|
||||||
/* D2C0F8 802403C8 27A50018 */ addiu $a1, $sp, 0x18
|
|
||||||
/* D2C0FC 802403CC 0C019D80 */ jal guMtxCatF
|
|
||||||
/* D2C100 802403D0 00A0302D */ daddu $a2, $a1, $zero
|
|
||||||
/* D2C104 802403D4 27A40018 */ addiu $a0, $sp, 0x18
|
|
||||||
/* D2C108 802403D8 26450058 */ addiu $a1, $s2, 0x58
|
|
||||||
/* D2C10C 802403DC 0C019D80 */ jal guMtxCatF
|
|
||||||
/* D2C110 802403E0 00A0302D */ daddu $a2, $a1, $zero
|
|
||||||
/* D2C114 802403E4 2E620037 */ sltiu $v0, $s3, 0x37
|
|
||||||
/* D2C118 802403E8 1440FF80 */ bnez $v0, .L802401EC
|
|
||||||
/* D2C11C 802403EC 00131080 */ sll $v0, $s3, 2
|
|
||||||
/* D2C120 802403F0 8EE20074 */ lw $v0, 0x74($s7)
|
|
||||||
/* D2C124 802403F4 2C420037 */ sltiu $v0, $v0, 0x37
|
|
||||||
/* D2C128 802403F8 14400005 */ bnez $v0, .L80240410
|
|
||||||
/* D2C12C 802403FC 0000102D */ daddu $v0, $zero, $zero
|
|
||||||
/* D2C130 80240400 8EE40070 */ lw $a0, 0x70($s7)
|
|
||||||
/* D2C134 80240404 0C00AB4B */ jal heap_free
|
|
||||||
/* D2C138 80240408 00000000 */ nop
|
|
||||||
/* D2C13C 8024040C 24020002 */ addiu $v0, $zero, 2
|
|
||||||
.L80240410:
|
|
||||||
/* D2C140 80240410 8FBF013C */ lw $ra, 0x13c($sp)
|
|
||||||
/* D2C144 80240414 8FBE0138 */ lw $fp, 0x138($sp)
|
|
||||||
/* D2C148 80240418 8FB70134 */ lw $s7, 0x134($sp)
|
|
||||||
/* D2C14C 8024041C 8FB60130 */ lw $s6, 0x130($sp)
|
|
||||||
/* D2C150 80240420 8FB5012C */ lw $s5, 0x12c($sp)
|
|
||||||
/* D2C154 80240424 8FB40128 */ lw $s4, 0x128($sp)
|
|
||||||
/* D2C158 80240428 8FB30124 */ lw $s3, 0x124($sp)
|
|
||||||
/* D2C15C 8024042C 8FB20120 */ lw $s2, 0x120($sp)
|
|
||||||
/* D2C160 80240430 8FB1011C */ lw $s1, 0x11c($sp)
|
|
||||||
/* D2C164 80240434 8FB00118 */ lw $s0, 0x118($sp)
|
|
||||||
/* D2C168 80240438 D7B60148 */ ldc1 $f22, 0x148($sp)
|
|
||||||
/* D2C16C 8024043C D7B40140 */ ldc1 $f20, 0x140($sp)
|
|
||||||
/* D2C170 80240440 03E00008 */ jr $ra
|
|
||||||
/* D2C174 80240444 27BD0150 */ addiu $sp, $sp, 0x150
|
|
@ -4013,7 +4013,7 @@ clear_model_data = 0x80115D44; // type:func rom:0xAC444
|
|||||||
init_model_data = 0x80115FE8; // type:func rom:0xAC6E8
|
init_model_data = 0x80115FE8; // type:func rom:0xAC6E8
|
||||||
calculate_model_sizes = 0x8011612C; // type:func rom:0xAC82C
|
calculate_model_sizes = 0x8011612C; // type:func rom:0xAC82C
|
||||||
mdl_create_model = 0x8011620C; // type:func rom:0xAC90C
|
mdl_create_model = 0x8011620C; // type:func rom:0xAC90C
|
||||||
func_80116674 = 0x80116674; // type:func rom:0xACD74
|
iterate_models = 0x80116674; // type:func rom:0xACD74
|
||||||
func_80116698 = 0x80116698; // type:func rom:0xACD98
|
func_80116698 = 0x80116698; // type:func rom:0xACD98
|
||||||
render_models = 0x80116B90; // type:func rom:0xAD290
|
render_models = 0x80116B90; // type:func rom:0xAD290
|
||||||
appendGfx_model_group = 0x80117C94; // type:func rom:0xAE394
|
appendGfx_model_group = 0x80117C94; // type:func rom:0xAE394
|
||||||
|
Loading…
Reference in New Issue
Block a user