Animations (#727)

* decomp 5 animator functions

* animation script disasm

* cleaning up

* improvements in animation disasm

* TODO
This commit is contained in:
Unnunu 2022-06-09 16:49:57 +03:00 committed by GitHub
parent 59119c0949
commit accf5a60f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 7239 additions and 3355 deletions

View File

@ -643,7 +643,7 @@ typedef struct Entity {
SimpleSpringData* simpleSpring;
s32* unk;
} dataBuf;
/* 0x44 */ Mtx* vertexData;
/* 0x44 */ Vec3s* vertexData;
/* 0x48 */ Vec3f position;
/* 0x54 */ Vec3f scale;
/* 0x60 */ Vec3f rotation;
@ -680,7 +680,7 @@ typedef struct Shadow {
/* 0x07 */ char unk_07;
/* 0x08 */ s16 entityModelID;
/* 0x0A */ s16 vertexSegment;
/* 0x0C */ Vtx* vertexArray;
/* 0x0C */ Vec3s* vertexArray;
/* 0x10 */ Vec3f position;
/* 0x1C */ Vec3f scale;
/* 0x28 */ Vec3f rotation;
@ -1158,8 +1158,8 @@ typedef struct ModelAnimator {
/* 0x000 */ u32 flags;
/* 0x004 */ s8 renderMode;
/* 0x005 */ char unk_05[3];
/* 0x008 */ s8* animReadPos;
/* 0x00C */ s8* savedReadPos;
/* 0x008 */ s16* animReadPos;
/* 0x00C */ s16* savedReadPos;
/* 0x010 */ AnimatorNode* rootNode;
/* 0x014 */ u8 nextUniqueID;
/* 0x015 */ u8 staticNodeIDs[0x7A]; // ?
@ -1167,13 +1167,13 @@ typedef struct ModelAnimator {
/* 0x090 */ f32 nextUpdateTime;
/* 0x094 */ f32 timeScale;
/* 0x098 */ Mtx mtx;
/* 0x0D8 */ Vtx** vertexArray;
/* 0x0DC */ s8* animationBuffer;
/* 0x0D8 */ Vec3s* vertexArray;
/* 0x0DC */ s16* animationBuffer;
/* 0x0E0 */ StaticAnimatorNode* staticNodes[0x7A];
/* 0x2C8 */ StaticAnimatorNode** staticRoot;
/* 0x2CC */ s32 treeIndexPos;
/* 0x2D0 */ s32 savedTreePos;
/* 0x2D4 */ void (*fpRenderCallback)(void);
/* 0x2D4 */ void (*fpRenderCallback)(void*);
/* 0x2D8 */ s32 renderCallbackArg;
/* 0x2DC */ char unk_2DC[4];
} ModelAnimator; // size = 0x2E0

View File

@ -3258,63 +3258,26 @@ enum MoveActionTips {
MOVE_ACTION_TIP_20 = 20
};
enum AnimatorNodeFlags {
ANIMATOR_NODE_FLAGS_0 = 0x00000000,
ANIMATOR_NODE_FLAGS_1 = 0x00000001,
ANIMATOR_NODE_FLAGS_2 = 0x00000002,
ANIMATOR_NODE_FLAGS_4 = 0x00000004,
ANIMATOR_NODE_FLAGS_8 = 0x00000008,
ANIMATOR_NODE_FLAGS_10 = 0x00000010,
ANIMATOR_NODE_FLAGS_20 = 0x00000020,
ANIMATOR_NODE_FLAGS_40 = 0x00000040,
ANIMATOR_NODE_FLAGS_80 = 0x00000080,
ANIMATOR_NODE_FLAGS_100 = 0x00000100,
ANIMATOR_NODE_FLAGS_200 = 0x00000200,
ANIMATOR_NODE_FLAGS_400 = 0x00000400,
ANIMATOR_NODE_FLAGS_800 = 0x00000800,
ANIMATOR_NODE_FLAGS_1000 = 0x00001000,
ANIMATOR_NODE_FLAGS_2000 = 0x00002000,
ANIMATOR_NODE_FLAGS_4000 = 0x00004000,
ANIMATOR_NODE_FLAGS_8000 = 0x00008000,
ANIMATOR_NODE_FLAGS_10000 = 0x00010000,
ANIMATOR_NODE_FLAGS_20000 = 0x00020000,
ANIMATOR_NODE_FLAGS_40000 = 0x00040000,
ANIMATOR_NODE_FLAGS_80000 = 0x00080000,
ANIMATOR_NODE_FLAGS_100000 = 0x00100000,
ANIMATOR_NODE_FLAGS_200000 = 0x00200000,
ANIMATOR_NODE_FLAGS_400000 = 0x00400000,
ANIMATOR_NODE_FLAGS_800000 = 0x00800000,
ANIMATOR_NODE_FLAGS_1000000 = 0x01000000,
ANIMATOR_NODE_FLAGS_2000000 = 0x02000000,
ANIMATOR_NODE_FLAGS_4000000 = 0x04000000,
ANIMATOR_NODE_FLAGS_8000000 = 0x08000000,
ANIMATOR_NODE_FLAGS_10000000 = 0x10000000,
ANIMATOR_NODE_FLAGS_20000000 = 0x20000000,
ANIMATOR_NODE_FLAGS_40000000 = 0x40000000,
ANIMATOR_NODE_FLAGS_80000000 = 0x80000000,
};
enum ModelAnimatorFlags {
MODEL_ANIMATOR_FLAGS_0 = 0x00000000,
MODEL_ANIMATOR_FLAGS_1 = 0x00000001,
MODEL_ANIMATOR_FLAGS_2 = 0x00000002,
MODEL_ANIMATOR_FLAGS_4 = 0x00000004,
MODEL_ANIMATOR_FLAGS_8 = 0x00000008,
MODEL_ANIMATOR_FLAGS_10 = 0x00000010,
MODEL_ANIMATOR_FLAGS_CAM_0 = 0x00000001,
MODEL_ANIMATOR_FLAGS_CAM_1 = 0x00000002,
MODEL_ANIMATOR_FLAGS_CAM_2 = 0x00000004,
MODEL_ANIMATOR_FLAGS_CAM_3 = 0x00000008,
MODEL_ANIMATOR_FLAGS_ENABLED = 0x00000010,
MODEL_ANIMATOR_FLAGS_20 = 0x00000020,
MODEL_ANIMATOR_FLAGS_40 = 0x00000040,
MODEL_ANIMATOR_FLAGS_80 = 0x00000080,
MODEL_ANIMATOR_FLAGS_100 = 0x00000100,
MODEL_ANIMATOR_FLAGS_200 = 0x00000200,
MODEL_ANIMATOR_FLAGS_400 = 0x00000400,
MODEL_ANIMATOR_FLAGS_UPDATE_PENDING = 0x00000040,
MODEL_ANIMATOR_FLAGS_HIDDEN = 0x00000080,
MODEL_ANIMATOR_FLAGS_FLIP_Z = 0x00000100,
MODEL_ANIMATOR_FLAGS_FLIP_Y = 0x00000200,
MODEL_ANIMATOR_FLAGS_FLIP_X = 0x00000400,
MODEL_ANIMATOR_FLAGS_800 = 0x00000800,
MODEL_ANIMATOR_FLAGS_1000 = 0x00001000,
MODEL_ANIMATOR_FLAGS_HAS_MODEL = 0x00001000,
MODEL_ANIMATOR_FLAGS_2000 = 0x00002000,
MODEL_ANIMATOR_FLAGS_4000 = 0x00004000,
MODEL_ANIMATOR_FLAGS_8000 = 0x00008000,
MODEL_ANIMATOR_FLAGS_10000 = 0x00010000,
MODEL_ANIMATOR_FLAGS_20000 = 0x00020000,
MODEL_ANIMATOR_FLAGS_40000 = 0x00040000,
MODEL_ANIMATOR_FLAGS_MESH = 0x00008000,
MODEL_ANIMATOR_FLAGS_CULL_BACK = 0x00010000,
MODEL_ANIMATOR_FLAGS_NO_FLIP = 0x00020000,
MODEL_ANIMATOR_FLAGS_FREEZE_ANIMATION = 0x00040000,
MODEL_ANIMATOR_FLAGS_80000 = 0x00080000,
MODEL_ANIMATOR_FLAGS_100000 = 0x00100000,
MODEL_ANIMATOR_FLAGS_200000 = 0x00200000,

View File

@ -815,7 +815,7 @@ void show_foreground_models(void);
void hide_foreground_models(void);
void btl_set_state(s32 battleState);
void draw_entity_model_A(s32, Mtx*);
void draw_entity_model_B(s32, Mtx*, s32, s32);
void draw_entity_model_B(s32, Mtx*, s32, Vec3s*);
void draw_entity_model_C(s32, Mtx*);
void draw_entity_model_D(s32, Mtx*, s32, Vtx*);
void draw_entity_model_E(s32, Mtx*);

View File

@ -167,9 +167,9 @@ void animator_node_update_model_transform(ModelAnimator* animator, f32 (*flipMtx
void delete_model_animator_node(AnimatorNode* node);
void delete_model_animator_nodes(ModelAnimator* animator);
void delete_model_animator(ModelAnimator* animator);
void render_animated_model_with_vertices(s32 animatorID, Mtx* rootTransform, s32 vtxSegment, Vtx* vertexArray);
void render_animated_model_with_vertices(s32 animatorID, Mtx* rootTransform, s32 vtxSegment, Vec3s* vertexArray);
void appendGfx_animator(ModelAnimator* animator);
ModelAnimator* set_animator_render_callback(s32 animModelID, s32 callbackArg, s32 callbackFunc);
ModelAnimator* set_animator_render_callback(s32 animModelID, s32 callbackArg, void (*callbackFunc)(void*));
void reload_mesh_animator_tree(ModelAnimator* animator);
s32 step_mesh_animator(ModelAnimator* animator);
#endif

View File

@ -1,12 +1,16 @@
#include "model.h"
#include "animation_script.h"
s8 D_8014C250[] = {0x00, 0x01, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
AnimScript gAnimScriptDefault = {
AS_WAIT, 60,
AS_END,
};
extern s32 gAnimCount;
typedef struct DisplayListBufferHandle {
/* 0x0 */ s32 mode;
/* 0x4 */ Gfx* addr;
/* 0x0 */ s32 ttl;
/* 0x4 */ void* addr;
} DisplayListBufferHandle; // size = 0x8
typedef DisplayListBufferHandle AnimatedMeshVertexCopyList[0x60];
@ -22,25 +26,42 @@ extern s32 gAnimModelFogB;
extern s32 gAnimModelFogA;
extern s32 gAnimModelFogStart;
extern s32 gAnimModelFogEnd;
extern s32 D_80153A60;
extern s32 gAnimVtxSegment;
extern Matrix4f gAnimRotMtx;
extern Matrix4f gAnimScaleMtx;
extern Matrix4f gAnimTranslateMtx;
extern Matrix4f gAnimRotScaleMtx;
extern StaticAnimatorNode** gAnimTreeRoot;
// reg swap
#ifdef NON_EQUIVALENT
extern Gfx D_8014B7F8[];
extern Gfx D_8014B820[];
extern Gfx D_8014B848[];
extern Gfx D_8014B870[];
extern Gfx D_8014B898[];
extern Gfx D_8014B8C0[];
extern Gfx D_8014B8E8[];
extern Gfx D_8014BE78[];
extern Gfx D_8014BEA0[];
extern Gfx D_8014BEC8[];
extern Gfx D_8014BEF0[];
extern Gfx D_8014BF18[];
extern Gfx D_8014BF40[];
extern Gfx D_8014BF68[];
void appendGfx_animator_node(ModelAnimator*, AnimatorNode*, Matrix4f);
// copy Vtx array from node->fcData.vtxList, but overwrite xyz coordinates with ones from buffer
// if animator has own vertexArray, buffer is offset within it
Vtx* animator_copy_vertices_to_buffer(ModelAnimator* animator, AnimatorNode* node, Vec3s* buffer, s32 vtxCount,
s32 overhead, s32 startIdx) {
DisplayListBufferHandle* handle;
Vtx* bufferMem;
Vtx* phi_v1;
Vtx* nodeVtxList;
s32 i;
for (i = 0; i < ARRAY_COUNT(D_801533C0); i++) {
handle = &D_801533C0[i];
if (handle->mode < 0) {
if (handle->ttl < 0) {
break;
}
}
@ -52,27 +73,25 @@ Vtx* animator_copy_vertices_to_buffer(ModelAnimator* animator, AnimatorNode* nod
ASSERT(bufferMem != NULL);
handle->mode = 3;
phi_v1 = &node->fcData.vtxList[startIdx];
handle->ttl = 3;
nodeVtxList = &node->fcData.vtxList[startIdx];
if (animator->vertexArray != NULL) {
buffer = ((s32)buffer & 0xFFFFFF) + (s32)animator->vertexArray;
i = ((s32)buffer & 0xFFFFFF); // needed to match
buffer = (Vec3s*)(i + (s32)animator->vertexArray);
}
for (i = 0; i < vtxCount; i++) {
*bufferMem = *phi_v1;
*bufferMem = *nodeVtxList;
bufferMem->v.ob[0] = buffer->x;
bufferMem->v.ob[1] = buffer->y;
bufferMem->v.ob[2] = buffer->z;
bufferMem++;
buffer++;
phi_v1++;
nodeVtxList++;
}
return handle->addr;
}
#else
INCLUDE_ASM(s32, "B4580", animator_copy_vertices_to_buffer);
#endif
void animator_make_mirrorZ(Matrix4f mtx) {
guMtxIdentF(mtx);
@ -127,16 +146,16 @@ AnimatorNode* get_animator_child_with_id(AnimatorNode* node, s32 id) {
return NULL;
}
AnimatorNode* get_animator_child_for_model(AnimatorNode* node, s32 id) {
AnimatorNode* get_animator_child_for_model(AnimatorNode* node, s32 modelId) {
s32 i;
if (node->fcData.modelID == id) {
if (node->fcData.modelID == modelId) {
return node;
}
for (i = 0; i < ARRAY_COUNT(node->children); i++) {
if (node->children[i] != NULL) {
AnimatorNode* child = get_animator_child_for_model(node->children[i], id);
AnimatorNode* child = get_animator_child_for_model(node->children[i], modelId);
if (child != NULL) {
return child;
@ -165,11 +184,11 @@ void clear_animator_list(void) {
if (!gGameStatusPtr->isBattle) {
gCurrentAnimMeshListPtr = &D_801539C0;
for (i = 0; i < ARRAY_COUNT(D_801533C0); i++) {
D_801533C0[i].mode = -1;
D_801533C0[i].ttl = -1;
}
for (i = 0; i < ARRAY_COUNT(D_801536C0); i++) {
D_801536C0[i].mode = -1;
D_801536C0[i].ttl = -1;
}
} else {
gCurrentAnimMeshListPtr = &D_80153A00;
@ -209,7 +228,7 @@ void reset_animator_list(void) {
void delete_model_animator_node(AnimatorNode* node) {
s32 i;
node->flags = ANIMATOR_NODE_FLAGS_0;
node->flags = 0;
for (i = 0; i < ARRAY_COUNT(node->children); i++) {
if (node->children[i] != NULL) {
@ -251,7 +270,7 @@ void delete_model_animator(ModelAnimator* animator) {
}
}
s32 create_model_animator(s8* animPos) {
s32 create_model_animator(s16* animPos) {
ModelAnimator* animator;
s32 i, j;
@ -268,14 +287,14 @@ s32 create_model_animator(s8* animPos) {
ASSERT(animator != NULL);
animator->flags = MODEL_ANIMATOR_FLAGS_40 | MODEL_ANIMATOR_FLAGS_10 | MODEL_ANIMATOR_FLAGS_4 | MODEL_ANIMATOR_FLAGS_2 | MODEL_ANIMATOR_FLAGS_1;
animator->flags = MODEL_ANIMATOR_FLAGS_UPDATE_PENDING | MODEL_ANIMATOR_FLAGS_ENABLED | MODEL_ANIMATOR_FLAGS_CAM_2 | MODEL_ANIMATOR_FLAGS_CAM_1 | MODEL_ANIMATOR_FLAGS_CAM_0;
animator->renderMode = RENDER_MODE_ALPHATEST;
animator->nextUpdateTime = 1.0f;
animator->timeScale = 1.0f;
animator->animReadPos = animPos;
if (animPos == NULL) {
animator->animReadPos = D_8014C250;
animator->animReadPos = gAnimScriptDefault;
}
animator->savedReadPos = animPos;
@ -295,7 +314,7 @@ s32 create_model_animator(s8* animPos) {
return i;
}
s32 create_mesh_animator(s32 animPos, s8* animBuffer) {
s32 create_mesh_animator(s32 animPos, s16* animBuffer) {
ModelAnimator* animator;
s32 i, j;
@ -312,7 +331,7 @@ s32 create_mesh_animator(s32 animPos, s8* animBuffer) {
ASSERT(animator != NULL);
animator->flags = MODEL_ANIMATOR_FLAGS_40 | MODEL_ANIMATOR_FLAGS_10 | MODEL_ANIMATOR_FLAGS_4 | MODEL_ANIMATOR_FLAGS_2 | MODEL_ANIMATOR_FLAGS_1;
animator->flags = MODEL_ANIMATOR_FLAGS_UPDATE_PENDING | MODEL_ANIMATOR_FLAGS_ENABLED | MODEL_ANIMATOR_FLAGS_CAM_2 | MODEL_ANIMATOR_FLAGS_CAM_1 | MODEL_ANIMATOR_FLAGS_CAM_0;
animator->renderMode = RENDER_MODE_ALPHATEST;
animator->vertexArray = NULL;
animator->fpRenderCallback = NULL;
@ -322,8 +341,8 @@ s32 create_mesh_animator(s32 animPos, s8* animBuffer) {
animator->nextUpdateTime = 1.0f;
animator->timeScale = 1.0f;
animPos = (animPos & 0xFFFFFF) + (s32)animator->animationBuffer;
animator->animReadPos = (s8*)animPos;
animator->savedReadPos = (s8*)animPos;
animator->animReadPos = (s16*)animPos;
animator->savedReadPos = (s16*)animPos;
for (j = 0; j < ARRAY_COUNT(animator->staticNodeIDs); j++) {
animator->staticNodeIDs[j] = j + 1;
@ -345,7 +364,7 @@ AnimatorNode* add_anim_node(ModelAnimator* animator, s32 parentNodeID, AnimatorN
ret = heap_malloc(sizeof(*ret));
ASSERT(ret != NULL);
ret->flags = ANIMATOR_NODE_FLAGS_10;
ret->flags = MODEL_ANIMATOR_FLAGS_ENABLED;
ret->displayList = nodeBP->displayList;
ret->basePos.x = nodeBP->basePos.x;
ret->basePos.y = nodeBP->basePos.y;
@ -417,11 +436,11 @@ void update_model_animator(s32 animatorID) {
if (animator != NULL && animator->flags != 0) {
s32 temp = 0;
if (!(animator->flags & MODEL_ANIMATOR_FLAGS_40000)) {
animator->flags &= ~MODEL_ANIMATOR_FLAGS_40;
if (!(animator->flags & MODEL_ANIMATOR_FLAGS_FREEZE_ANIMATION)) {
animator->flags &= ~MODEL_ANIMATOR_FLAGS_UPDATE_PENDING;
animator->nextUpdateTime -= animator->timeScale;
if (animator->nextUpdateTime <= 0.0f) {
if (!(animator->flags & MODEL_ANIMATOR_FLAGS_8000)) {
if (!(animator->flags & MODEL_ANIMATOR_FLAGS_MESH)) {
do {
temp = step_model_animator(animator);
} while (temp > 0);
@ -440,20 +459,20 @@ void update_model_animator(s32 animatorID) {
animator_update_model_transforms(animator, NULL);
for (i = 0; i < ARRAY_COUNT(D_801533C0); i++) {
if (D_801533C0[i].mode >= 0) {
D_801533C0[i].mode--;
if (D_801533C0[i].mode == 0) {
D_801533C0[i].mode = -1;
if (D_801533C0[i].ttl >= 0) {
D_801533C0[i].ttl--;
if (D_801533C0[i].ttl == 0) {
D_801533C0[i].ttl = -1;
general_heap_free(D_801533C0[i].addr);
}
}
}
for (i = 0; i < ARRAY_COUNT(D_801536C0); i++) {
if (D_801536C0[i].mode >= 0) {
D_801536C0[i].mode--;
if (D_801536C0[i].mode == 0) {
D_801536C0[i].mode = -1;
if (D_801536C0[i].ttl >= 0) {
D_801536C0[i].ttl--;
if (D_801536C0[i].ttl == 0) {
D_801536C0[i].ttl = -1;
general_heap_free(D_801536C0[i].addr);
}
}
@ -474,11 +493,11 @@ void update_model_animator_with_transform(s32 animatorID, Mtx* mtx) {
if (animator != NULL && animator->flags != 0) {
s32 temp = 0;
if (!(animator->flags & MODEL_ANIMATOR_FLAGS_40000)) {
animator->flags &= ~MODEL_ANIMATOR_FLAGS_40;
if (!(animator->flags & MODEL_ANIMATOR_FLAGS_FREEZE_ANIMATION)) {
animator->flags &= ~MODEL_ANIMATOR_FLAGS_UPDATE_PENDING;
animator->nextUpdateTime -= animator->timeScale;
if (animator->nextUpdateTime <= 0.0f) {
if (!(animator->flags & MODEL_ANIMATOR_FLAGS_8000)) {
if (!(animator->flags & MODEL_ANIMATOR_FLAGS_MESH)) {
do {
temp = step_model_animator(animator);
} while (temp > 0);
@ -497,20 +516,20 @@ void update_model_animator_with_transform(s32 animatorID, Mtx* mtx) {
animator_update_model_transforms(animator, mtx);
for (i = 0; i < ARRAY_COUNT(D_801533C0); i++) {
if (D_801533C0[i].mode >= 0) {
D_801533C0[i].mode--;
if (D_801533C0[i].mode == 0) {
D_801533C0[i].mode = -1;
if (D_801533C0[i].ttl >= 0) {
D_801533C0[i].ttl--;
if (D_801533C0[i].ttl == 0) {
D_801533C0[i].ttl = -1;
general_heap_free(D_801533C0[i].addr);
}
}
}
for (i = 0; i < ARRAY_COUNT(D_801536C0); i++) {
if (D_801536C0[i].mode >= 0) {
D_801536C0[i].mode--;
if (D_801536C0[i].mode == 0) {
D_801536C0[i].mode = -1;
if (D_801536C0[i].ttl >= 0) {
D_801536C0[i].ttl--;
if (D_801536C0[i].ttl == 0) {
D_801536C0[i].ttl = -1;
general_heap_free(D_801536C0[i].addr);
}
}
@ -521,20 +540,118 @@ void update_model_animator_with_transform(s32 animatorID, Mtx* mtx) {
}
}
INCLUDE_ASM(s32, "B4580", step_model_animator);
s32 step_model_animator(ModelAnimator* animator) {
s16* args = animator->animReadPos;
AnimatorNode* node;
f32 x, y, z;
s32 flags;
s32 nodeId;
switch (*args++) {
case AS_END:
return -1;
case AS_SET_RENDER_MODE:
animator->renderMode = *args++;
animator->animReadPos = args;
return 1;
case AS_WAIT:
animator->nextUpdateTime = *args++;
animator->animReadPos = args;
break;
case AS_END_LOOP:
animator->animReadPos = animator->savedReadPos;
return 1;
case AS_LOOP:
animator->animReadPos = animator->savedReadPos = args;
return 1;
case AS_SET_FLAGS:
flags = *args++;
animator->animReadPos = args;
animator->flags |= flags & 0xFFFF;
return 1;
case AS_SET_NODE_FLAGS:
node = get_animator_child_with_id(animator->rootNode, animator->staticNodeIDs[*args++ - 1]);
flags = *args++;
node->flags |= flags;
animator->animReadPos = args;
return 1;
case AS_CLEAR_NODE_FLAGS:
node = get_animator_child_with_id(animator->rootNode, animator->staticNodeIDs[*args++ - 1]);
flags = *args++;
node->flags &= ~flags;
animator->animReadPos = args;
return 1;
case AS_OP_19:
animator->flags |= MODEL_ANIMATOR_FLAGS_NO_FLIP;
animator->animReadPos = args;
return 1;
case AS_SET_ROTATION:
nodeId = animator->staticNodeIDs[*args++ - 1];
x = (f32)*args++ * 180.0 / 32767.0;
y = (f32)*args++ * 180.0 / 32767.0;
z = (f32)*args++ * 180.0 / 32767.0;
animator->animReadPos = args;
node = get_animator_child_with_id(animator->rootNode, nodeId);
ASSERT(node != NULL);
node->rotation.x = x;
node->rotation.y = y;
node->rotation.z = z;
return 1;
case AS_ADD_ROTATION:
nodeId = animator->staticNodeIDs[*args++ - 1];
x = (f32)*args++ * 180.0 / 32767.0;
y = (f32)*args++ * 180.0 / 32767.0;
z = (f32)*args++ * 180.0 / 32767.0;
animator->animReadPos = args;
node = get_animator_child_with_id(animator->rootNode, nodeId);
ASSERT(node != NULL);
node->rotation.x += x;
node->rotation.y += y;
node->rotation.z += z;
return 1;
case AS_SET_POS:
nodeId = animator->staticNodeIDs[*args++ - 1];
x = *args++;
y = *args++;
z = *args++;
animator->animReadPos = args;
node = get_animator_child_with_id(animator->rootNode, nodeId);
ASSERT(node != NULL);
node->pos.x = x;
node->pos.y = y;
node->pos.z = z;
return 1;
case AS_SET_SCALE:
nodeId = animator->staticNodeIDs[*args++ - 1];
x = (f32)*args++ * 180.0 / 32767.0;
y = (f32)*args++ * 180.0 / 32767.0;
z = (f32)*args++ * 180.0 / 32767.0;
animator->animReadPos = args;
node = get_animator_child_with_id(animator->rootNode, nodeId);
ASSERT(node != NULL);
node->scale.x = x;
node->scale.y = y;
node->scale.z = z;
return 1;
}
return 0;
}
void animator_update_model_transforms(ModelAnimator* animator, Mtx* rootTransform) {
Matrix4f flipMtx;
if (animator->rootNode != NULL) {
switch (animator->flags & (MODEL_ANIMATOR_FLAGS_100 | MODEL_ANIMATOR_FLAGS_200 | MODEL_ANIMATOR_FLAGS_400)) {
case 0x100:
switch (animator->flags & (MODEL_ANIMATOR_FLAGS_FLIP_Z | MODEL_ANIMATOR_FLAGS_FLIP_Y | MODEL_ANIMATOR_FLAGS_FLIP_X)) {
case MODEL_ANIMATOR_FLAGS_FLIP_Z:
animator_make_mirrorZ(flipMtx);
break;
case 0x200:
case MODEL_ANIMATOR_FLAGS_FLIP_Y:
animator_make_mirrorY(flipMtx);
break;
case 0x400:
case MODEL_ANIMATOR_FLAGS_FLIP_X:
animator_make_mirrorX(flipMtx);
break;
default:
@ -556,13 +673,13 @@ void animator_node_update_model_transform(ModelAnimator* animator, f32 (*flipMtx
guMtxCatF(gAnimScaleMtx, gAnimRotMtx, gAnimRotScaleMtx);
guMtxCatF(gAnimRotScaleMtx, gAnimTranslateMtx, sp10);
if (!(animator->flags & MODEL_ANIMATOR_FLAGS_20000)) {
if (!(animator->flags & MODEL_ANIMATOR_FLAGS_NO_FLIP)) {
guMtxCatF(sp10, flipMtx, sp10);
}
copy_matrix(sp10, node->mtx);
if (node->flags & ANIMATOR_NODE_FLAGS_1000) {
if (node->flags & MODEL_ANIMATOR_FLAGS_HAS_MODEL) {
Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(node->fcData.modelID));
copy_matrix(sp10, model->transformMatrix);
@ -587,13 +704,13 @@ void render_animated_model(s32 animatorID, Mtx* rootTransform) {
animatorID &= ~0x800;
animator = (*gCurrentAnimMeshListPtr)[animatorID];
if (animator != NULL && animator->flags != 0 && !(animator->flags & MODEL_ANIMATOR_FLAGS_40) &&
animator->flags & (1 << gCurrentCamID) && !(animator->flags & MODEL_ANIMATOR_FLAGS_80))
if (animator != NULL && animator->flags != 0 && !(animator->flags & MODEL_ANIMATOR_FLAGS_UPDATE_PENDING) &&
animator->flags & (1 << gCurrentCamID) && !(animator->flags & MODEL_ANIMATOR_FLAGS_HIDDEN))
{
animator->mtx = *rootTransform;
animator->vertexArray = NULL;
rtPtr->appendGfxArg = animator;
rtPtr->appendGfx = &appendGfx_animator;
rtPtr->appendGfx = (void (*)(void*))appendGfx_animator;
rtPtr->distance = 0;
rtPtr->renderMode = animator->renderMode;
queue_render_task(rtPtr);
@ -601,7 +718,7 @@ void render_animated_model(s32 animatorID, Mtx* rootTransform) {
}
}
void render_animated_model_with_vertices(s32 animatorID, Mtx* rootTransform, s32 vtxSegment, Vtx* vertexArray) {
void render_animated_model_with_vertices(s32 animatorID, Mtx* rootTransform, s32 vtxSegment, Vec3s* vertexArray) {
RenderTask rt;
RenderTask* rtPtr = &rt;
@ -610,14 +727,14 @@ void render_animated_model_with_vertices(s32 animatorID, Mtx* rootTransform, s32
animatorID &= ~0x800;
animator = (*gCurrentAnimMeshListPtr)[animatorID];
if (animator != NULL && animator->flags != 0 && !(animator->flags & MODEL_ANIMATOR_FLAGS_40) &&
animator->flags & (1 << gCurrentCamID) && !(animator->flags & MODEL_ANIMATOR_FLAGS_80))
if (animator != NULL && animator->flags != 0 && !(animator->flags & MODEL_ANIMATOR_FLAGS_UPDATE_PENDING) &&
animator->flags & (1 << gCurrentCamID) && !(animator->flags & MODEL_ANIMATOR_FLAGS_HIDDEN))
{
animator->mtx = *rootTransform;
D_80153A60 = vtxSegment;
gAnimVtxSegment = vtxSegment;
animator->vertexArray = vertexArray;
rtPtr->appendGfxArg = animator;
rtPtr->appendGfx = &appendGfx_animator;
rtPtr->appendGfx = (void (*)(void*))appendGfx_animator;
rtPtr->distance = 0;
rtPtr->renderMode = animator->renderMode;
queue_render_task(rtPtr);
@ -625,15 +742,198 @@ void render_animated_model_with_vertices(s32 animatorID, Mtx* rootTransform, s32
}
}
INCLUDE_ASM(s32, "B4580", appendGfx_animator);
void appendGfx_animator(ModelAnimator* animator) {
Matrix4f sp10;
if (animator->vertexArray != NULL) {
gSPSegment(gMasterGfxPos++, gAnimVtxSegment, VIRTUAL_TO_PHYSICAL(animator->vertexArray));
}
gDisplayContext->matrixStack[gMatrixListPos] = animator->mtx;
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
//TODO find better match
switch (gAnimModelFogEnabled != 0) {
case FALSE:
switch (animator->renderMode) {
case RENDER_MODE_SURFACE_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014B7F8);
break;
case RENDER_MODE_DECAL_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014B820);
break;
case RENDER_MODE_INTERSECTING_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014B848);
break;
case RENDER_MODE_ALPHATEST:
gSPDisplayList(gMasterGfxPos++, D_8014B870);
break;
case RENDER_MODE_SURFACE_XLU_LAYER1:
gSPDisplayList(gMasterGfxPos++, D_8014B898);
break;
case RENDER_MODE_DECAL_XLU:
gSPDisplayList(gMasterGfxPos++, D_8014B8C0);
break;
case RENDER_MODE_INTERSECTING_XLU:
gSPDisplayList(gMasterGfxPos++, D_8014B8E8);
break;
}
break;
case TRUE:
switch (animator->renderMode) {
case RENDER_MODE_SURFACE_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014BE78);
break;
case RENDER_MODE_DECAL_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014BEA0);
break;
case RENDER_MODE_INTERSECTING_OPA:
gSPDisplayList(gMasterGfxPos++, D_8014BEC8);
break;
case RENDER_MODE_ALPHATEST:
gSPDisplayList(gMasterGfxPos++, D_8014BEF0);
break;
case RENDER_MODE_SURFACE_XLU_LAYER1:
gSPDisplayList(gMasterGfxPos++, D_8014BF18);
break;
case RENDER_MODE_DECAL_XLU:
gSPDisplayList(gMasterGfxPos++, D_8014BF40);
break;
case RENDER_MODE_INTERSECTING_XLU:
gSPDisplayList(gMasterGfxPos++, D_8014BF68);
break;
}
gDPSetFogColor(gMasterGfxPos++, gAnimModelFogR, gAnimModelFogG, gAnimModelFogB, gAnimModelFogA);
gSPFogPosition(gMasterGfxPos++, gAnimModelFogStart, gAnimModelFogEnd);
break;
}
guMtxL2F(sp10, &animator->mtx);
appendGfx_animator_node(animator, animator->rootNode, sp10);
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
}
#ifdef NON_EQUIVALENT
void appendGfx_animator_node(ModelAnimator* animator, AnimatorNode* node, Matrix4f mtx) {
s32 i, dlSize, bufferIdx;
DisplayListBufferHandle* bufferHandle;
Gfx* gfxPos;
s32 j;
u32 w0,w1;
s32 totalVtxCount;
s32 cmd;
if (node->flags & MODEL_ANIMATOR_FLAGS_HIDDEN) {
for (i = 0; i < ARRAY_COUNT(node->children); i++) {
if (node->children[i] != NULL) {
guMtxCatF(node->mtx, mtx, node->mtx);
appendGfx_animator_node(animator, node->children[i], node->mtx);
}
}
return;
}
guMtxCatF(node->mtx, mtx, node->mtx);
guMtxF2L(node->mtx, &gDisplayContext->matrixStack[gMatrixListPos]);
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPPipeSync(gMasterGfxPos++);
gSPTexture(gMasterGfxPos++, 0, 0, 0, G_TX_RENDERTILE, G_OFF);
gDPSetTextureLOD(gMasterGfxPos++, G_TL_TILE);
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
gSPClearGeometryMode(gMasterGfxPos++, G_LIGHTING);
if (animator->flags & MODEL_ANIMATOR_FLAGS_CULL_BACK) {
gSPSetGeometryMode(gMasterGfxPos++, G_CULL_BACK);
}
if (!gAnimModelFogEnabled) {
gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
} else {
gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, 0, TEXEL0, COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED);
}
gDPPipeSync(gMasterGfxPos++);
if (animator->fpRenderCallback != NULL) {
animator->fpRenderCallback(animator->renderCallbackArg);
}
gDPPipeSync(gMasterGfxPos++);
if (node->displayList != NULL) {
if (node->vertexStartOffset < 0) {
gSPDisplayList(gMasterGfxPos++, node->displayList);
} else {
dlSize = 0;
if (node->displayList[dlSize].words.w0 >> 0x18 != G_ENDDL) {
while (TRUE) {
w0 = node->displayList[dlSize++].words.w0;
cmd = w0 >> 0x18;
if (cmd == G_ENDDL) {
break;
}
}
}
for (bufferIdx = 0; bufferIdx < ARRAY_COUNT(D_801536C0); bufferIdx++) {
bufferHandle = &D_801536C0[bufferIdx];
if (bufferHandle->ttl < 0) {
break;
}
}
ASSERT(bufferIdx < ARRAY_COUNT(D_801536C0));
gfxPos = general_heap_malloc(dlSize * sizeof(Gfx));
bufferHandle->addr = gfxPos;
ASSERT(gfxPos != NULL);
bufferHandle->ttl = 3;
totalVtxCount = 0;
j = 0;
do {
w0 = ((s32*)node->displayList)[j++];
w1 = ((s32*)node->displayList)[j++];
cmd = w0 >> 0x18;
if (cmd == G_ENDDL) {
break;
}
if (cmd == G_VTX) {
s32 startIdx = _SHIFTR(w0,1,7);
s32 vtxCount = _SHIFTR(w0,12,8);
startIdx -= vtxCount;
if (node->fcData.vtxList == NULL) {
Vtx* newBuffer = &((Vtx*)w1)[node->vertexStartOffset + totalVtxCount];
gSPVertex(gfxPos++, newBuffer, vtxCount, startIdx);
} else {
// if node->fcData.vtxList != NULL, all vertex buffers in gSPVertex commands are pointers to Vec3s, not to Vtx
Vtx* newBuffer = animator_copy_vertices_to_buffer(animator, node, w1 + (node->vertexStartOffset + totalVtxCount) * 0x6, vtxCount, startIdx, totalVtxCount);
gSPVertex(gfxPos++, newBuffer, vtxCount, startIdx);
}
totalVtxCount += vtxCount;
} else {
Gfx* temp = gfxPos++;
temp->words.w0 = w0;
temp->words.w1 = w1;
}
} while (TRUE);
gSPEndDisplayList(gfxPos++);
gSPDisplayList(gMasterGfxPos++, bufferHandle->addr);
}
}
gDPPipeSync(gMasterGfxPos++);
for (i = 0; i < ARRAY_COUNT(node->children); i++) {
if (node->children[i] != NULL) {
appendGfx_animator_node(animator, node->children[i], node->mtx);
}
}
}
#else
INCLUDE_ASM(s32, "B4580", appendGfx_animator_node);
#endif
AnimatorNode* get_animator_node_for_tree_index(ModelAnimator* animator, s32 treeIndex);
INCLUDE_ASM(s32, "B4580", get_animator_node_for_tree_index);
// AnimatorNode* get_animator_node_for_tree_index(ModelAnimator* animator, s32 arg1) {
// return get_animator_child_with_id(animator->rootNode, animator->unk_14[arg1]);
// }
AnimatorNode* get_animator_node_for_tree_index(ModelAnimator* animator, s32 arg1) {
return get_animator_child_with_id(animator->rootNode, animator->staticNodeIDs[arg1 - 1]);
}
AnimatorNode* get_animator_node_with_id(ModelAnimator* animator, s32 id) {
return get_animator_child_for_model(animator->rootNode, id);
@ -652,7 +952,7 @@ ModelAnimator* get_animator_by_index(s32 animModelID) {
return (*gCurrentAnimMeshListPtr)[animModelID & ~0x800];
}
ModelAnimator* set_animator_render_callback(s32 animModelID, s32 callbackArg, s32 callbackFunc) {
ModelAnimator* set_animator_render_callback(s32 animModelID, s32 callbackArg, void (*callbackFunc)(void*)) {
ModelAnimator* ret = (*gCurrentAnimMeshListPtr)[animModelID & ~0x800];
ret->fpRenderCallback = callbackFunc;
@ -714,8 +1014,8 @@ void play_model_animation(s32 index, s32 animPos) {
if (animator->animationBuffer != NULL) {
animPos = (animPos & 0xFFFFFF) + (s32)animator->animationBuffer; // TODO: array access?
}
animator->animReadPos = (s8*)animPos;
animator->savedReadPos = (s8*)animPos;
animator->animReadPos = (s16*)animPos;
animator->savedReadPos = (s16*)animPos;
animator->treeIndexPos = 0;
animator->nextUpdateTime = 1.0f;
}
@ -729,8 +1029,8 @@ void play_model_animation_starting_from(s32 index, s32 animPos, s32 framesToSkip
animPos = (animPos & 0xFFFFFF) + (s32)animator->animationBuffer; // TODO: array access?
}
animator->animReadPos = (s8*)animPos;
animator->savedReadPos = (s8*)animPos;
animator->animReadPos = (s16*)animPos;
animator->savedReadPos = (s16*)animPos;
animator->treeIndexPos = 0;
animator->nextUpdateTime = 1.0f;
@ -758,7 +1058,7 @@ void load_model_animator_node(StaticAnimatorNode* node, ModelAnimator* animator,
if (node->modelID != 0) {
newNode->fcData.modelID = node->modelID - 1;
newNode->flags |= ANIMATOR_NODE_FLAGS_1000;
newNode->flags |= MODEL_ANIMATOR_FLAGS_HAS_MODEL;
}
i = 0;
@ -825,7 +1125,7 @@ void load_mesh_animator_tree(s32 index, StaticAnimatorNode** tree) {
}
load_mesh_animator_node(*gAnimTreeRoot, animator, 0, nodeIDs);
animator->flags |= MODEL_ANIMATOR_FLAGS_8000;
animator->flags |= MODEL_ANIMATOR_FLAGS_MESH;
}
}
@ -877,4 +1177,139 @@ void reload_mesh_animator_tree(ModelAnimator* animator) {
set_animator_tree_to_node_map(animator, nodeIDs, ARRAY_COUNT(nodeIDs));
}
INCLUDE_ASM(s32, "B4580", step_mesh_animator);
s32 step_mesh_animator(ModelAnimator* animator) {
s16* args = animator->animReadPos;
s16* oldPos = animator->animReadPos;
AnimatorNode* node;
f32 x, y, z;
s32 flags;
s32 nodeId;
switch (*args++) {
case AS_END:
return -1;
case AS_SET_RENDER_MODE:
animator->renderMode = *args++;
animator->animReadPos = args;
return 1;
case AS_WAIT:
args++;
animator->animReadPos = args;
return 1;
case AS_END_LOOP:
animator->animReadPos = animator->savedReadPos;
animator->treeIndexPos = animator->savedTreePos;
reload_mesh_animator_tree(animator);
return 1;
case AS_OP_4:
animator->animReadPos = animator->savedReadPos;
animator->treeIndexPos = animator->savedTreePos;
break;
case AS_LOOP:
animator->animReadPos = animator->savedReadPos = args;
animator->savedTreePos = animator->treeIndexPos;
return 1;
case AS_SET_FLAGS:
flags = *args++;
animator->animReadPos = args;
animator->flags |= flags & 0xFFFF;
return 1;
case AS_SET_NODE_FLAGS:
node = get_animator_child_with_id(animator->rootNode, animator->staticNodeIDs[*args++ - 1]);
flags = *args++;
node->flags |= flags;
animator->animReadPos = args;
return 1;
case AS_CLEAR_NODE_FLAGS:
node = get_animator_child_with_id(animator->rootNode, animator->staticNodeIDs[*args++ - 1]);
flags = *args++;
node->flags &= ~flags;
animator->animReadPos = args;
return 1;
case AS_OP_19:
animator->flags |= MODEL_ANIMATOR_FLAGS_NO_FLIP;
animator->animReadPos = args;
return 1;
case AS_SET_ROTATION:
nodeId = animator->staticNodeIDs[*args++ - 1];
x = (f32)*args++ * 180.0 / 32767.0;
y = (f32)*args++ * 180.0 / 32767.0;
z = (f32)*args++ * 180.0 / 32767.0;
animator->animReadPos = args;
if (nodeId != 0xFF) {
node = get_animator_child_with_id(animator->rootNode, nodeId);
if (node != NULL) {
node->rotation.x = x;
node->rotation.y = y;
node->rotation.z = z;
return 1;
} else {
animator->animReadPos = oldPos;
animator->treeIndexPos++;
break;
}
}
return 1;
case AS_ADD_ROTATION:
nodeId = animator->staticNodeIDs[*args++ - 1];
x = (f32)*args++ * 180.0 / 32767.0;
y = (f32)*args++ * 180.0 / 32767.0;
z = (f32)*args++ * 180.0 / 32767.0;
animator->animReadPos = args;
if (nodeId != 0xFF) {
node = get_animator_child_with_id(animator->rootNode, nodeId);
if (node != NULL) {
node->rotation.x += x;
node->rotation.y += y;
node->rotation.z += z;
return 1;
} else {
animator->animReadPos = oldPos;
animator->treeIndexPos++;
break;
}
}
return 1;
case AS_SET_POS:
nodeId = animator->staticNodeIDs[*args++ - 1];
x = *args++;
y = *args++;
z = *args++;
animator->animReadPos = args;
if (nodeId != 0xFF) {
node = get_animator_child_with_id(animator->rootNode, nodeId);
if (node != NULL) {
node->pos.x = x;
node->pos.y = y;
node->pos.z = z;
return 1;
} else {
animator->animReadPos = oldPos;
animator->treeIndexPos++;
break;
}
}
return 1;
case AS_SET_SCALE:
nodeId = animator->staticNodeIDs[*args++ - 1];
x = (f32)*args++ * 180.0 / 32767.0;
y = (f32)*args++ * 180.0 / 32767.0;
z = (f32)*args++ * 180.0 / 32767.0;
animator->animReadPos = args;
if (nodeId != 0xFF) {
node = get_animator_child_with_id(animator->rootNode, nodeId);
if (node != NULL) {
node->scale.x = x;
node->scale.y = y;
node->scale.z = z;
return 1;
} else {
animator->animReadPos = oldPos;
animator->treeIndexPos++;
break;
}
}
return 1;
}
return 0;
}

35
src/animation_script.h Normal file
View File

@ -0,0 +1,35 @@
#ifndef ANIMATION_SCRIPT_H
#define ANIMATION_SCRIPT_H
#include "common.h"
typedef s16 AnimScript[];
enum {
AS_END,
AS_WAIT,
AS_OP_2,
AS_END_LOOP,
AS_OP_4,
AS_SET_ROTATION,
AS_ADD_ROTATION,
AS_OP_7,
AS_SET_POS,
AS_OP_9,
AS_LOOP,
AS_OP_11,
AS_OP_12,
AS_OP_13,
AS_SET_FLAGS,
AS_SET_NODE_FLAGS,
AS_CLEAR_NODE_FLAGS,
AS_SET_SCALE,
AS_SET_RENDER_MODE,
AS_OP_19,
};
#define _AS_ROUND(x) ((int) (x < 0 ? x - 0.5 : x + 0.5))
#define AS_F(x) (_AS_ROUND((x) * 32767.0 / 180.0))
#endif

View File

@ -112,25 +112,14 @@ BSS s8 D_801539C0[0x40];
BSS s8 D_80153A00[0x40];
BSS s32 gCurrentAnimMeshListPtr;
BSS s32 gAnimModelFogEnabled;
BSS s8 gAnimModelFogR;
BSS char D_80153A49;
BSS char D_80153A4A;
BSS s8 D_80153A4B;
BSS s8 gAnimModelFogG;
BSS char D_80153A4D;
BSS char D_80153A4E;
BSS s8 D_80153A4F;
BSS s8 gAnimModelFogB;
BSS char D_80153A51;
BSS char D_80153A52;
BSS s8 D_80153A53;
BSS s8 gAnimModelFogA;
BSS char D_80153A55;
BSS char D_80153A56;
BSS s8 D_80153A57;
BSS s32 gAnimModelFogR;
BSS s32 gAnimModelFogG;
BSS s32 gAnimModelFogB;
BSS s32 gAnimModelFogA;
BSS s32 gAnimModelFogStart;
BSS s32 gAnimModelFogEnd;
BSS s8 D_80153A60[0x8];
BSS s32 gAnimVtxSegment;
BSS char D_80153A64[0x4];
BSS s8 gAnimRotMtx[0x40];
BSS s8 gAnimScaleMtx[0x40];
BSS s8 gAnimTranslateMtx[0x40];

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,7 @@
#include "common.h"
#include "map.h"
#include "animation_script.h"
#define NAMESPACE dgb_01
@ -30,7 +31,7 @@ extern EvtScript N(80244AD0);
extern EvtScript N(main);
extern EvtScript N(makeEntities);
extern StaticAnimatorNode* N(D_80252F4C_C107CC)[];
extern EvtScript N(D_802539A0_C11220);
extern AnimScript N(D_802539A0_C11220);
extern NpcGroupList N(npcGroupList_80246E50);
extern NpcGroupList N(npcGroupList_80246ED4);
extern NpcGroupList N(npcGroupList_80246E8C);

59
tools/disasm_animation.py Executable file
View File

@ -0,0 +1,59 @@
#! /usr/bin/python3
import struct
def read(f):
return struct.unpack('>h', f.read(2))[0]
def i2f(x):
return round(x * 180 / 32767 * 200) / 200
def parse(f):
print('AnimScript script = {')
indent = ' '
while True:
op = read(f)
if op == 0:
print(f'{indent}AS_END,')
break
if op == 1:
print(f'{indent}AS_WAIT, {read(f)},')
elif op == 3:
indent = indent[:-4]
print(f'{indent}AS_END_LOOP,')
elif op == 5:
print(f'{indent}AS_SET_ROTATION, {read(f)}, AS_F({i2f(read(f))}), AS_F({i2f(read(f))}), AS_F({i2f(read(f))}),')
elif op == 6:
print(f'{indent}AS_ADD_ROTATION, {read(f)}, AS_F({i2f(read(f))}), AS_F({i2f(read(f))}), AS_F({i2f(read(f))}),')
elif op == 8:
print(f'{indent}AS_SET_POS, {read(f)}, {read(f)}, {read(f)}, {read(f)},')
elif op == 10:
print(f'{indent}AS_LOOP,')
indent += ' '
elif op == 14:
print(f'{indent}AS_SET_FLAGS, {read(f)},')
elif op == 15:
print(f'{indent}AS_SET_NODE_FLAGS, {read(f)}, {read(f)},')
elif op == 16:
print(f'{indent}AS_CLEAR_NODE_FLAGS, {read(f)}, {read(f)},')
elif op == 17:
print(f'{indent}AS_SET_SCALE, {read(f)}, AS_F({i2f(read(f))}), AS_F({i2f(read(f))}), AS_F({i2f(read(f))}),')
elif op == 18:
print(f'{indent}AS_SET_RENDER_MODE, {read(f)}')
elif op == 19:
print(f'{indent}AS_OP_19,')
else:
raise Exception(str(f'Unknown opcode {op}'))
print('};')
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("file", type=str, help="File to dissassemble from")
parser.add_argument("offset", help="Offset to start dissassembling from")
args = parser.parse_args()
offset = int(args.offset, 16)
with open(args.file, "rb") as f:
f.seek(offset)
parse(f)

View File

@ -1,97 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel animator_copy_vertices_to_buffer
/* B4580 8011DE80 27BDFFD8 */ addiu $sp, $sp, -0x28
/* B4584 8011DE84 AFB40020 */ sw $s4, 0x20($sp)
/* B4588 8011DE88 0080A02D */ daddu $s4, $a0, $zero
/* B458C 8011DE8C AFB3001C */ sw $s3, 0x1c($sp)
/* B4590 8011DE90 00A0982D */ daddu $s3, $a1, $zero
/* B4594 8011DE94 AFB00010 */ sw $s0, 0x10($sp)
/* B4598 8011DE98 00C0802D */ daddu $s0, $a2, $zero
/* B459C 8011DE9C AFB20018 */ sw $s2, 0x18($sp)
/* B45A0 8011DEA0 00E0902D */ daddu $s2, $a3, $zero
/* B45A4 8011DEA4 0000282D */ daddu $a1, $zero, $zero
/* B45A8 8011DEA8 3C038015 */ lui $v1, %hi(D_801533C0)
/* B45AC 8011DEAC 246333C0 */ addiu $v1, $v1, %lo(D_801533C0)
/* B45B0 8011DEB0 AFBF0024 */ sw $ra, 0x24($sp)
/* B45B4 8011DEB4 AFB10014 */ sw $s1, 0x14($sp)
/* B45B8 8011DEB8 000510C0 */ sll $v0, $a1, 3
.L8011DEBC:
/* B45BC 8011DEBC 00438821 */ addu $s1, $v0, $v1
/* B45C0 8011DEC0 8E220000 */ lw $v0, ($s1)
/* B45C4 8011DEC4 04400006 */ bltz $v0, .L8011DEE0
/* B45C8 8011DEC8 28A20060 */ slti $v0, $a1, 0x60
/* B45CC 8011DECC 24A50001 */ addiu $a1, $a1, 1
/* B45D0 8011DED0 28A20060 */ slti $v0, $a1, 0x60
/* B45D4 8011DED4 1440FFF9 */ bnez $v0, .L8011DEBC
/* B45D8 8011DED8 000510C0 */ sll $v0, $a1, 3
/* B45DC 8011DEDC 28A20060 */ slti $v0, $a1, 0x60
.L8011DEE0:
/* B45E0 8011DEE0 14400003 */ bnez $v0, .L8011DEF0
/* B45E4 8011DEE4 00000000 */ nop
.L8011DEE8:
/* B45E8 8011DEE8 080477BA */ j .L8011DEE8
/* B45EC 8011DEEC 00000000 */ nop
.L8011DEF0:
/* B45F0 8011DEF0 8FA40038 */ lw $a0, 0x38($sp)
/* B45F4 8011DEF4 02442021 */ addu $a0, $s2, $a0
/* B45F8 8011DEF8 0C00AB0A */ jal general_heap_malloc
/* B45FC 8011DEFC 00042100 */ sll $a0, $a0, 4
/* B4600 8011DF00 0040382D */ daddu $a3, $v0, $zero
/* B4604 8011DF04 14E00003 */ bnez $a3, .L8011DF14
/* B4608 8011DF08 AE270004 */ sw $a3, 4($s1)
.L8011DF0C:
/* B460C 8011DF0C 080477C3 */ j .L8011DF0C
/* B4610 8011DF10 00000000 */ nop
.L8011DF14:
/* B4614 8011DF14 24020003 */ addiu $v0, $zero, 3
/* B4618 8011DF18 AE220000 */ sw $v0, ($s1)
/* B461C 8011DF1C 8FA2003C */ lw $v0, 0x3c($sp)
/* B4620 8011DF20 8E6300FC */ lw $v1, 0xfc($s3)
/* B4624 8011DF24 8E8400D8 */ lw $a0, 0xd8($s4)
/* B4628 8011DF28 00021100 */ sll $v0, $v0, 4
/* B462C 8011DF2C 10800005 */ beqz $a0, .L8011DF44
/* B4630 8011DF30 00621821 */ addu $v1, $v1, $v0
/* B4634 8011DF34 3C0200FF */ lui $v0, 0xff
/* B4638 8011DF38 3442FFFF */ ori $v0, $v0, 0xffff
/* B463C 8011DF3C 02022824 */ and $a1, $s0, $v0
/* B4640 8011DF40 00A48021 */ addu $s0, $a1, $a0
.L8011DF44:
/* B4644 8011DF44 1A400019 */ blez $s2, .L8011DFAC
/* B4648 8011DF48 0000282D */ daddu $a1, $zero, $zero
/* B464C 8011DF4C 26060004 */ addiu $a2, $s0, 4
/* B4650 8011DF50 24E40004 */ addiu $a0, $a3, 4
.L8011DF54:
/* B4654 8011DF54 8C680000 */ lw $t0, ($v1)
/* B4658 8011DF58 8C690004 */ lw $t1, 4($v1)
/* B465C 8011DF5C 8C6A0008 */ lw $t2, 8($v1)
/* B4660 8011DF60 8C6B000C */ lw $t3, 0xc($v1)
/* B4664 8011DF64 ACE80000 */ sw $t0, ($a3)
/* B4668 8011DF68 ACE90004 */ sw $t1, 4($a3)
/* B466C 8011DF6C ACEA0008 */ sw $t2, 8($a3)
/* B4670 8011DF70 ACEB000C */ sw $t3, 0xc($a3)
/* B4674 8011DF74 96020000 */ lhu $v0, ($s0)
/* B4678 8011DF78 26100006 */ addiu $s0, $s0, 6
/* B467C 8011DF7C 24630010 */ addiu $v1, $v1, 0x10
/* B4680 8011DF80 24A50001 */ addiu $a1, $a1, 1
/* B4684 8011DF84 A4E20000 */ sh $v0, ($a3)
/* B4688 8011DF88 94C2FFFE */ lhu $v0, -2($a2)
/* B468C 8011DF8C 24E70010 */ addiu $a3, $a3, 0x10
/* B4690 8011DF90 A482FFFE */ sh $v0, -2($a0)
/* B4694 8011DF94 94C20000 */ lhu $v0, ($a2)
/* B4698 8011DF98 24C60006 */ addiu $a2, $a2, 6
/* B469C 8011DF9C A4820000 */ sh $v0, ($a0)
/* B46A0 8011DFA0 00B2102A */ slt $v0, $a1, $s2
/* B46A4 8011DFA4 1440FFEB */ bnez $v0, .L8011DF54
/* B46A8 8011DFA8 24840010 */ addiu $a0, $a0, 0x10
.L8011DFAC:
/* B46AC 8011DFAC 8E220004 */ lw $v0, 4($s1)
/* B46B0 8011DFB0 8FBF0024 */ lw $ra, 0x24($sp)
/* B46B4 8011DFB4 8FB40020 */ lw $s4, 0x20($sp)
/* B46B8 8011DFB8 8FB3001C */ lw $s3, 0x1c($sp)
/* B46BC 8011DFBC 8FB20018 */ lw $s2, 0x18($sp)
/* B46C0 8011DFC0 8FB10014 */ lw $s1, 0x14($sp)
/* B46C4 8011DFC4 8FB00010 */ lw $s0, 0x10($sp)
/* B46C8 8011DFC8 03E00008 */ jr $ra
/* B46CC 8011DFCC 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,391 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel jtbl_8014FEE0
.word .L8011F63C_B5D3C, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F66C_B5D6C, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F69C_B5D9C, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F6CC_B5DCC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F6FC_B5DFC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F72C_B5E2C, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F9FC_B60FC, .L8011F75C_B5E5C
dlabel jtbl_8014FF78
.word .L8011F7BC_B5EBC, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F7EC_B5EEC, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F81C_B5F1C, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F84C_B5F4C, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F87C_B5F7C, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F8AC_B5FAC, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F908_B6008, .L8011F8DC_B5FDC
.section .text
glabel appendGfx_animator
/* B5BD4 8011F4D4 27BDFFA8 */ addiu $sp, $sp, -0x58
/* B5BD8 8011F4D8 AFB00050 */ sw $s0, 0x50($sp)
/* B5BDC 8011F4DC 0080802D */ daddu $s0, $a0, $zero
/* B5BE0 8011F4E0 AFBF0054 */ sw $ra, 0x54($sp)
/* B5BE4 8011F4E4 8E0200D8 */ lw $v0, 0xd8($s0)
/* B5BE8 8011F4E8 10400013 */ beqz $v0, .L8011F538
/* B5BEC 8011F4EC 3C020001 */ lui $v0, 1
/* B5BF0 8011F4F0 3C04800A */ lui $a0, %hi(gMasterGfxPos)
/* B5BF4 8011F4F4 2484A66C */ addiu $a0, $a0, %lo(gMasterGfxPos)
/* B5BF8 8011F4F8 8C830000 */ lw $v1, ($a0)
/* B5BFC 8011F4FC 3C028015 */ lui $v0, %hi(D_80153A60)
/* B5C00 8011F500 8C423A60 */ lw $v0, %lo(D_80153A60)($v0)
/* B5C04 8011F504 0060282D */ daddu $a1, $v1, $zero
/* B5C08 8011F508 24630008 */ addiu $v1, $v1, 8
/* B5C0C 8011F50C 00021080 */ sll $v0, $v0, 2
/* B5C10 8011F510 3042FFFF */ andi $v0, $v0, 0xffff
/* B5C14 8011F514 AC830000 */ sw $v1, ($a0)
/* B5C18 8011F518 3C03DB06 */ lui $v1, 0xdb06
/* B5C1C 8011F51C 00431025 */ or $v0, $v0, $v1
/* B5C20 8011F520 ACA20000 */ sw $v0, ($a1)
/* B5C24 8011F524 8E0200D8 */ lw $v0, 0xd8($s0)
/* B5C28 8011F528 3C038000 */ lui $v1, 0x8000
/* B5C2C 8011F52C 00431021 */ addu $v0, $v0, $v1
/* B5C30 8011F530 ACA20004 */ sw $v0, 4($a1)
/* B5C34 8011F534 3C020001 */ lui $v0, 1
.L8011F538:
/* B5C38 8011F538 34421630 */ ori $v0, $v0, 0x1630
/* B5C3C 8011F53C 26050098 */ addiu $a1, $s0, 0x98
/* B5C40 8011F540 260600D8 */ addiu $a2, $s0, 0xd8
/* B5C44 8011F544 3C038007 */ lui $v1, %hi(gMatrixListPos)
/* B5C48 8011F548 946341F0 */ lhu $v1, %lo(gMatrixListPos)($v1)
/* B5C4C 8011F54C 3C04800A */ lui $a0, %hi(gDisplayContext)
/* B5C50 8011F550 8C84A674 */ lw $a0, %lo(gDisplayContext)($a0)
/* B5C54 8011F554 00031980 */ sll $v1, $v1, 6
/* B5C58 8011F558 00832021 */ addu $a0, $a0, $v1
/* B5C5C 8011F55C 00822021 */ addu $a0, $a0, $v0
.L8011F560:
/* B5C60 8011F560 8CAA0000 */ lw $t2, ($a1)
/* B5C64 8011F564 8CAB0004 */ lw $t3, 4($a1)
/* B5C68 8011F568 8CAC0008 */ lw $t4, 8($a1)
/* B5C6C 8011F56C 8CAD000C */ lw $t5, 0xc($a1)
/* B5C70 8011F570 AC8A0000 */ sw $t2, ($a0)
/* B5C74 8011F574 AC8B0004 */ sw $t3, 4($a0)
/* B5C78 8011F578 AC8C0008 */ sw $t4, 8($a0)
/* B5C7C 8011F57C AC8D000C */ sw $t5, 0xc($a0)
/* B5C80 8011F580 24A50010 */ addiu $a1, $a1, 0x10
/* B5C84 8011F584 14A6FFF6 */ bne $a1, $a2, .L8011F560
/* B5C88 8011F588 24840010 */ addiu $a0, $a0, 0x10
/* B5C8C 8011F58C 3C07DA38 */ lui $a3, 0xda38
/* B5C90 8011F590 34E70002 */ ori $a3, $a3, 2
/* B5C94 8011F594 3C080001 */ lui $t0, 1
/* B5C98 8011F598 3C05800A */ lui $a1, %hi(gMasterGfxPos)
/* B5C9C 8011F59C 24A5A66C */ addiu $a1, $a1, %lo(gMasterGfxPos)
/* B5CA0 8011F5A0 35081630 */ ori $t0, $t0, 0x1630
/* B5CA4 8011F5A4 3C048007 */ lui $a0, %hi(gMatrixListPos)
/* B5CA8 8011F5A8 248441F0 */ addiu $a0, $a0, %lo(gMatrixListPos)
/* B5CAC 8011F5AC 8CA20000 */ lw $v0, ($a1)
/* B5CB0 8011F5B0 94830000 */ lhu $v1, ($a0)
/* B5CB4 8011F5B4 0040302D */ daddu $a2, $v0, $zero
/* B5CB8 8011F5B8 24420008 */ addiu $v0, $v0, 8
/* B5CBC 8011F5BC ACA20000 */ sw $v0, ($a1)
/* B5CC0 8011F5C0 24620001 */ addiu $v0, $v1, 1
/* B5CC4 8011F5C4 3063FFFF */ andi $v1, $v1, 0xffff
/* B5CC8 8011F5C8 00031980 */ sll $v1, $v1, 6
/* B5CCC 8011F5CC 00681821 */ addu $v1, $v1, $t0
/* B5CD0 8011F5D0 ACC70000 */ sw $a3, ($a2)
/* B5CD4 8011F5D4 A4820000 */ sh $v0, ($a0)
/* B5CD8 8011F5D8 3C02800A */ lui $v0, %hi(gDisplayContext)
/* B5CDC 8011F5DC 8C42A674 */ lw $v0, %lo(gDisplayContext)($v0)
/* B5CE0 8011F5E0 3C048015 */ lui $a0, %hi(gAnimModelFogEnabled)
/* B5CE4 8011F5E4 8C843A44 */ lw $a0, %lo(gAnimModelFogEnabled)($a0)
/* B5CE8 8011F5E8 00431021 */ addu $v0, $v0, $v1
/* B5CEC 8011F5EC 0004202B */ sltu $a0, $zero, $a0
/* B5CF0 8011F5F0 10800006 */ beqz $a0, .L8011F60C
/* B5CF4 8011F5F4 ACC20004 */ sw $v0, 4($a2)
/* B5CF8 8011F5F8 24020001 */ addiu $v0, $zero, 1
/* B5CFC 8011F5FC 10820063 */ beq $a0, $v0, .L8011F78C
/* B5D00 8011F600 27A40010 */ addiu $a0, $sp, 0x10
/* B5D04 8011F604 08047E80 */ j .L8011FA00
/* B5D08 8011F608 00000000 */ nop
.L8011F60C:
/* B5D0C 8011F60C 92020004 */ lbu $v0, 4($s0)
/* B5D10 8011F610 2442FFFF */ addiu $v0, $v0, -1
/* B5D14 8011F614 00021600 */ sll $v0, $v0, 0x18
/* B5D18 8011F618 00021E03 */ sra $v1, $v0, 0x18
/* B5D1C 8011F61C 2C620026 */ sltiu $v0, $v1, 0x26
/* B5D20 8011F620 104000F6 */ beqz $v0, .L8011F9FC_B60FC
/* B5D24 8011F624 00031080 */ sll $v0, $v1, 2
/* B5D28 8011F628 3C018015 */ lui $at, %hi(jtbl_8014FEE0)
/* B5D2C 8011F62C 00220821 */ addu $at, $at, $v0
/* B5D30 8011F630 8C22FEE0 */ lw $v0, %lo(jtbl_8014FEE0)($at)
/* B5D34 8011F634 00400008 */ jr $v0
/* B5D38 8011F638 00000000 */ nop
.L8011F63C_B5D3C:
/* B5D3C 8011F63C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B5D40 8011F640 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B5D44 8011F644 8C620000 */ lw $v0, ($v1)
/* B5D48 8011F648 0040202D */ daddu $a0, $v0, $zero
/* B5D4C 8011F64C 24420008 */ addiu $v0, $v0, 8
/* B5D50 8011F650 AC620000 */ sw $v0, ($v1)
/* B5D54 8011F654 3C02DE00 */ lui $v0, 0xde00
/* B5D58 8011F658 AC820000 */ sw $v0, ($a0)
/* B5D5C 8011F65C 3C028015 */ lui $v0, %hi(D_8014B7F8)
/* B5D60 8011F660 2442B7F8 */ addiu $v0, $v0, %lo(D_8014B7F8)
/* B5D64 8011F664 08047E7F */ j .L8011F9FC_B60FC
/* B5D68 8011F668 AC820004 */ sw $v0, 4($a0)
.L8011F66C_B5D6C:
/* B5D6C 8011F66C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B5D70 8011F670 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B5D74 8011F674 8C620000 */ lw $v0, ($v1)
/* B5D78 8011F678 0040202D */ daddu $a0, $v0, $zero
/* B5D7C 8011F67C 24420008 */ addiu $v0, $v0, 8
/* B5D80 8011F680 AC620000 */ sw $v0, ($v1)
/* B5D84 8011F684 3C02DE00 */ lui $v0, 0xde00
/* B5D88 8011F688 AC820000 */ sw $v0, ($a0)
/* B5D8C 8011F68C 3C028015 */ lui $v0, %hi(D_8014B820)
/* B5D90 8011F690 2442B820 */ addiu $v0, $v0, %lo(D_8014B820)
/* B5D94 8011F694 08047E7F */ j .L8011F9FC_B60FC
/* B5D98 8011F698 AC820004 */ sw $v0, 4($a0)
.L8011F69C_B5D9C:
/* B5D9C 8011F69C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B5DA0 8011F6A0 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B5DA4 8011F6A4 8C620000 */ lw $v0, ($v1)
/* B5DA8 8011F6A8 0040202D */ daddu $a0, $v0, $zero
/* B5DAC 8011F6AC 24420008 */ addiu $v0, $v0, 8
/* B5DB0 8011F6B0 AC620000 */ sw $v0, ($v1)
/* B5DB4 8011F6B4 3C02DE00 */ lui $v0, 0xde00
/* B5DB8 8011F6B8 AC820000 */ sw $v0, ($a0)
/* B5DBC 8011F6BC 3C028015 */ lui $v0, %hi(D_8014B848)
/* B5DC0 8011F6C0 2442B848 */ addiu $v0, $v0, %lo(D_8014B848)
/* B5DC4 8011F6C4 08047E7F */ j .L8011F9FC_B60FC
/* B5DC8 8011F6C8 AC820004 */ sw $v0, 4($a0)
.L8011F6CC_B5DCC:
/* B5DCC 8011F6CC 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B5DD0 8011F6D0 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B5DD4 8011F6D4 8C620000 */ lw $v0, ($v1)
/* B5DD8 8011F6D8 0040202D */ daddu $a0, $v0, $zero
/* B5DDC 8011F6DC 24420008 */ addiu $v0, $v0, 8
/* B5DE0 8011F6E0 AC620000 */ sw $v0, ($v1)
/* B5DE4 8011F6E4 3C02DE00 */ lui $v0, 0xde00
/* B5DE8 8011F6E8 AC820000 */ sw $v0, ($a0)
/* B5DEC 8011F6EC 3C028015 */ lui $v0, %hi(D_8014B870)
/* B5DF0 8011F6F0 2442B870 */ addiu $v0, $v0, %lo(D_8014B870)
/* B5DF4 8011F6F4 08047E7F */ j .L8011F9FC_B60FC
/* B5DF8 8011F6F8 AC820004 */ sw $v0, 4($a0)
.L8011F6FC_B5DFC:
/* B5DFC 8011F6FC 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B5E00 8011F700 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B5E04 8011F704 8C620000 */ lw $v0, ($v1)
/* B5E08 8011F708 0040202D */ daddu $a0, $v0, $zero
/* B5E0C 8011F70C 24420008 */ addiu $v0, $v0, 8
/* B5E10 8011F710 AC620000 */ sw $v0, ($v1)
/* B5E14 8011F714 3C02DE00 */ lui $v0, 0xde00
/* B5E18 8011F718 AC820000 */ sw $v0, ($a0)
/* B5E1C 8011F71C 3C028015 */ lui $v0, %hi(D_8014B898)
/* B5E20 8011F720 2442B898 */ addiu $v0, $v0, %lo(D_8014B898)
/* B5E24 8011F724 08047E7F */ j .L8011F9FC_B60FC
/* B5E28 8011F728 AC820004 */ sw $v0, 4($a0)
.L8011F72C_B5E2C:
/* B5E2C 8011F72C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B5E30 8011F730 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B5E34 8011F734 8C620000 */ lw $v0, ($v1)
/* B5E38 8011F738 0040202D */ daddu $a0, $v0, $zero
/* B5E3C 8011F73C 24420008 */ addiu $v0, $v0, 8
/* B5E40 8011F740 AC620000 */ sw $v0, ($v1)
/* B5E44 8011F744 3C02DE00 */ lui $v0, 0xde00
/* B5E48 8011F748 AC820000 */ sw $v0, ($a0)
/* B5E4C 8011F74C 3C028015 */ lui $v0, %hi(D_8014B8C0)
/* B5E50 8011F750 2442B8C0 */ addiu $v0, $v0, %lo(D_8014B8C0)
/* B5E54 8011F754 08047E7F */ j .L8011F9FC_B60FC
/* B5E58 8011F758 AC820004 */ sw $v0, 4($a0)
.L8011F75C_B5E5C:
/* B5E5C 8011F75C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B5E60 8011F760 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B5E64 8011F764 8C620000 */ lw $v0, ($v1)
/* B5E68 8011F768 0040202D */ daddu $a0, $v0, $zero
/* B5E6C 8011F76C 24420008 */ addiu $v0, $v0, 8
/* B5E70 8011F770 AC620000 */ sw $v0, ($v1)
/* B5E74 8011F774 3C02DE00 */ lui $v0, 0xde00
/* B5E78 8011F778 AC820000 */ sw $v0, ($a0)
/* B5E7C 8011F77C 3C028015 */ lui $v0, %hi(D_8014B8E8)
/* B5E80 8011F780 2442B8E8 */ addiu $v0, $v0, %lo(D_8014B8E8)
/* B5E84 8011F784 08047E7F */ j .L8011F9FC_B60FC
/* B5E88 8011F788 AC820004 */ sw $v0, 4($a0)
.L8011F78C:
/* B5E8C 8011F78C 92020004 */ lbu $v0, 4($s0)
/* B5E90 8011F790 2442FFFF */ addiu $v0, $v0, -1
/* B5E94 8011F794 00021600 */ sll $v0, $v0, 0x18
/* B5E98 8011F798 00021E03 */ sra $v1, $v0, 0x18
/* B5E9C 8011F79C 2C620026 */ sltiu $v0, $v1, 0x26
/* B5EA0 8011F7A0 10400059 */ beqz $v0, .L8011F908_B6008
/* B5EA4 8011F7A4 00031080 */ sll $v0, $v1, 2
/* B5EA8 8011F7A8 3C018015 */ lui $at, %hi(jtbl_8014FF78)
/* B5EAC 8011F7AC 00220821 */ addu $at, $at, $v0
/* B5EB0 8011F7B0 8C22FF78 */ lw $v0, %lo(jtbl_8014FF78)($at)
/* B5EB4 8011F7B4 00400008 */ jr $v0
/* B5EB8 8011F7B8 00000000 */ nop
.L8011F7BC_B5EBC:
/* B5EBC 8011F7BC 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B5EC0 8011F7C0 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B5EC4 8011F7C4 8C620000 */ lw $v0, ($v1)
/* B5EC8 8011F7C8 0040202D */ daddu $a0, $v0, $zero
/* B5ECC 8011F7CC 24420008 */ addiu $v0, $v0, 8
/* B5ED0 8011F7D0 AC620000 */ sw $v0, ($v1)
/* B5ED4 8011F7D4 3C02DE00 */ lui $v0, 0xde00
/* B5ED8 8011F7D8 AC820000 */ sw $v0, ($a0)
/* B5EDC 8011F7DC 3C028015 */ lui $v0, %hi(D_8014BE78)
/* B5EE0 8011F7E0 2442BE78 */ addiu $v0, $v0, %lo(D_8014BE78)
/* B5EE4 8011F7E4 08047E42 */ j .L8011F908_B6008
/* B5EE8 8011F7E8 AC820004 */ sw $v0, 4($a0)
.L8011F7EC_B5EEC:
/* B5EEC 8011F7EC 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B5EF0 8011F7F0 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B5EF4 8011F7F4 8C620000 */ lw $v0, ($v1)
/* B5EF8 8011F7F8 0040202D */ daddu $a0, $v0, $zero
/* B5EFC 8011F7FC 24420008 */ addiu $v0, $v0, 8
/* B5F00 8011F800 AC620000 */ sw $v0, ($v1)
/* B5F04 8011F804 3C02DE00 */ lui $v0, 0xde00
/* B5F08 8011F808 AC820000 */ sw $v0, ($a0)
/* B5F0C 8011F80C 3C028015 */ lui $v0, %hi(D_8014BEA0)
/* B5F10 8011F810 2442BEA0 */ addiu $v0, $v0, %lo(D_8014BEA0)
/* B5F14 8011F814 08047E42 */ j .L8011F908_B6008
/* B5F18 8011F818 AC820004 */ sw $v0, 4($a0)
.L8011F81C_B5F1C:
/* B5F1C 8011F81C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B5F20 8011F820 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B5F24 8011F824 8C620000 */ lw $v0, ($v1)
/* B5F28 8011F828 0040202D */ daddu $a0, $v0, $zero
/* B5F2C 8011F82C 24420008 */ addiu $v0, $v0, 8
/* B5F30 8011F830 AC620000 */ sw $v0, ($v1)
/* B5F34 8011F834 3C02DE00 */ lui $v0, 0xde00
/* B5F38 8011F838 AC820000 */ sw $v0, ($a0)
/* B5F3C 8011F83C 3C028015 */ lui $v0, %hi(D_8014BEC8)
/* B5F40 8011F840 2442BEC8 */ addiu $v0, $v0, %lo(D_8014BEC8)
/* B5F44 8011F844 08047E42 */ j .L8011F908_B6008
/* B5F48 8011F848 AC820004 */ sw $v0, 4($a0)
.L8011F84C_B5F4C:
/* B5F4C 8011F84C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B5F50 8011F850 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B5F54 8011F854 8C620000 */ lw $v0, ($v1)
/* B5F58 8011F858 0040202D */ daddu $a0, $v0, $zero
/* B5F5C 8011F85C 24420008 */ addiu $v0, $v0, 8
/* B5F60 8011F860 AC620000 */ sw $v0, ($v1)
/* B5F64 8011F864 3C02DE00 */ lui $v0, 0xde00
/* B5F68 8011F868 AC820000 */ sw $v0, ($a0)
/* B5F6C 8011F86C 3C028015 */ lui $v0, %hi(D_8014BEF0)
/* B5F70 8011F870 2442BEF0 */ addiu $v0, $v0, %lo(D_8014BEF0)
/* B5F74 8011F874 08047E42 */ j .L8011F908_B6008
/* B5F78 8011F878 AC820004 */ sw $v0, 4($a0)
.L8011F87C_B5F7C:
/* B5F7C 8011F87C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B5F80 8011F880 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B5F84 8011F884 8C620000 */ lw $v0, ($v1)
/* B5F88 8011F888 0040202D */ daddu $a0, $v0, $zero
/* B5F8C 8011F88C 24420008 */ addiu $v0, $v0, 8
/* B5F90 8011F890 AC620000 */ sw $v0, ($v1)
/* B5F94 8011F894 3C02DE00 */ lui $v0, 0xde00
/* B5F98 8011F898 AC820000 */ sw $v0, ($a0)
/* B5F9C 8011F89C 3C028015 */ lui $v0, %hi(D_8014BF18)
/* B5FA0 8011F8A0 2442BF18 */ addiu $v0, $v0, %lo(D_8014BF18)
/* B5FA4 8011F8A4 08047E42 */ j .L8011F908_B6008
/* B5FA8 8011F8A8 AC820004 */ sw $v0, 4($a0)
.L8011F8AC_B5FAC:
/* B5FAC 8011F8AC 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B5FB0 8011F8B0 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B5FB4 8011F8B4 8C620000 */ lw $v0, ($v1)
/* B5FB8 8011F8B8 0040202D */ daddu $a0, $v0, $zero
/* B5FBC 8011F8BC 24420008 */ addiu $v0, $v0, 8
/* B5FC0 8011F8C0 AC620000 */ sw $v0, ($v1)
/* B5FC4 8011F8C4 3C02DE00 */ lui $v0, 0xde00
/* B5FC8 8011F8C8 AC820000 */ sw $v0, ($a0)
/* B5FCC 8011F8CC 3C028015 */ lui $v0, %hi(D_8014BF40)
/* B5FD0 8011F8D0 2442BF40 */ addiu $v0, $v0, %lo(D_8014BF40)
/* B5FD4 8011F8D4 08047E42 */ j .L8011F908_B6008
/* B5FD8 8011F8D8 AC820004 */ sw $v0, 4($a0)
.L8011F8DC_B5FDC:
/* B5FDC 8011F8DC 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B5FE0 8011F8E0 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B5FE4 8011F8E4 8C620000 */ lw $v0, ($v1)
/* B5FE8 8011F8E8 0040202D */ daddu $a0, $v0, $zero
/* B5FEC 8011F8EC 24420008 */ addiu $v0, $v0, 8
/* B5FF0 8011F8F0 AC620000 */ sw $v0, ($v1)
/* B5FF4 8011F8F4 3C02DE00 */ lui $v0, 0xde00
/* B5FF8 8011F8F8 AC820000 */ sw $v0, ($a0)
/* B5FFC 8011F8FC 3C028015 */ lui $v0, %hi(D_8014BF68)
/* B6000 8011F900 2442BF68 */ addiu $v0, $v0, %lo(D_8014BF68)
/* B6004 8011F904 AC820004 */ sw $v0, 4($a0)
.L8011F908_B6008:
/* B6008 8011F908 3C070001 */ lui $a3, 1
/* B600C 8011F90C 3C028015 */ lui $v0, %hi(gAnimModelFogEnd)
/* B6010 8011F910 8C423A5C */ lw $v0, %lo(gAnimModelFogEnd)($v0)
/* B6014 8011F914 3C038015 */ lui $v1, %hi(gAnimModelFogStart)
/* B6018 8011F918 8C633A58 */ lw $v1, %lo(gAnimModelFogStart)($v1)
/* B601C 8011F91C 34E7F400 */ ori $a3, $a3, 0xf400
/* B6020 8011F920 00431023 */ subu $v0, $v0, $v1
/* B6024 8011F924 14400002 */ bnez $v0, .L8011F930
/* B6028 8011F928 00E2001A */ div $zero, $a3, $v0
/* B602C 8011F92C 0007000D */ break 7
.L8011F930:
/* B6030 8011F930 2401FFFF */ addiu $at, $zero, -1
/* B6034 8011F934 14410004 */ bne $v0, $at, .L8011F948
/* B6038 8011F938 3C018000 */ lui $at, 0x8000
/* B603C 8011F93C 14E10002 */ bne $a3, $at, .L8011F948
/* B6040 8011F940 00000000 */ nop
/* B6044 8011F944 0006000D */ break 6
.L8011F948:
/* B6048 8011F948 00003812 */ mflo $a3
/* B604C 8011F94C 240501F4 */ addiu $a1, $zero, 0x1f4
/* B6050 8011F950 00A32823 */ subu $a1, $a1, $v1
/* B6054 8011F954 00052A00 */ sll $a1, $a1, 8
/* B6058 8011F958 14400002 */ bnez $v0, .L8011F964
/* B605C 8011F95C 00A2001A */ div $zero, $a1, $v0
/* B6060 8011F960 0007000D */ break 7
.L8011F964:
/* B6064 8011F964 2401FFFF */ addiu $at, $zero, -1
/* B6068 8011F968 14410004 */ bne $v0, $at, .L8011F97C
/* B606C 8011F96C 3C018000 */ lui $at, 0x8000
/* B6070 8011F970 14A10002 */ bne $a1, $at, .L8011F97C
/* B6074 8011F974 00000000 */ nop
/* B6078 8011F978 0006000D */ break 6
.L8011F97C:
/* B607C 8011F97C 00002812 */ mflo $a1
/* B6080 8011F980 3C08800A */ lui $t0, %hi(gMasterGfxPos)
/* B6084 8011F984 2508A66C */ addiu $t0, $t0, %lo(gMasterGfxPos)
/* B6088 8011F988 8D060000 */ lw $a2, ($t0)
/* B608C 8011F98C 00C0482D */ daddu $t1, $a2, $zero
/* B6090 8011F990 24C60008 */ addiu $a2, $a2, 8
/* B6094 8011F994 3C02F800 */ lui $v0, 0xf800
/* B6098 8011F998 AD060000 */ sw $a2, ($t0)
/* B609C 8011F99C AD220000 */ sw $v0, ($t1)
/* B60A0 8011F9A0 3C028015 */ lui $v0, %hi(D_80153A4B)
/* B60A4 8011F9A4 90423A4B */ lbu $v0, %lo(D_80153A4B)($v0)
/* B60A8 8011F9A8 3C038015 */ lui $v1, %hi(D_80153A4F)
/* B60AC 8011F9AC 90633A4F */ lbu $v1, %lo(D_80153A4F)($v1)
/* B60B0 8011F9B0 3C048015 */ lui $a0, %hi(D_80153A53)
/* B60B4 8011F9B4 90843A53 */ lbu $a0, %lo(D_80153A53)($a0)
/* B60B8 8011F9B8 00021600 */ sll $v0, $v0, 0x18
/* B60BC 8011F9BC 00031C00 */ sll $v1, $v1, 0x10
/* B60C0 8011F9C0 00431025 */ or $v0, $v0, $v1
/* B60C4 8011F9C4 00042200 */ sll $a0, $a0, 8
/* B60C8 8011F9C8 3C038015 */ lui $v1, %hi(D_80153A57)
/* B60CC 8011F9CC 90633A57 */ lbu $v1, %lo(D_80153A57)($v1)
/* B60D0 8011F9D0 00441025 */ or $v0, $v0, $a0
/* B60D4 8011F9D4 00431025 */ or $v0, $v0, $v1
/* B60D8 8011F9D8 AD220004 */ sw $v0, 4($t1)
/* B60DC 8011F9DC 24C20008 */ addiu $v0, $a2, 8
/* B60E0 8011F9E0 AD020000 */ sw $v0, ($t0)
/* B60E4 8011F9E4 3C02DB08 */ lui $v0, 0xdb08
/* B60E8 8011F9E8 ACC20000 */ sw $v0, ($a2)
/* B60EC 8011F9EC 00073C00 */ sll $a3, $a3, 0x10
/* B60F0 8011F9F0 30A5FFFF */ andi $a1, $a1, 0xffff
/* B60F4 8011F9F4 00E53825 */ or $a3, $a3, $a1
/* B60F8 8011F9F8 ACC70004 */ sw $a3, 4($a2)
.L8011F9FC_B60FC:
/* B60FC 8011F9FC 27A40010 */ addiu $a0, $sp, 0x10
.L8011FA00:
/* B6100 8011FA00 0C019D60 */ jal guMtxL2F
/* B6104 8011FA04 26050098 */ addiu $a1, $s0, 0x98
/* B6108 8011FA08 0200202D */ daddu $a0, $s0, $zero
/* B610C 8011FA0C 8C850010 */ lw $a1, 0x10($a0)
/* B6110 8011FA10 0C047E95 */ jal appendGfx_animator_node
/* B6114 8011FA14 27A60010 */ addiu $a2, $sp, 0x10
/* B6118 8011FA18 3C05D838 */ lui $a1, 0xd838
/* B611C 8011FA1C 3C03800A */ lui $v1, %hi(gMasterGfxPos)
/* B6120 8011FA20 2463A66C */ addiu $v1, $v1, %lo(gMasterGfxPos)
/* B6124 8011FA24 8C620000 */ lw $v0, ($v1)
/* B6128 8011FA28 34A50002 */ ori $a1, $a1, 2
/* B612C 8011FA2C 0040202D */ daddu $a0, $v0, $zero
/* B6130 8011FA30 24420008 */ addiu $v0, $v0, 8
/* B6134 8011FA34 AC620000 */ sw $v0, ($v1)
/* B6138 8011FA38 24020040 */ addiu $v0, $zero, 0x40
/* B613C 8011FA3C AC850000 */ sw $a1, ($a0)
/* B6140 8011FA40 AC820004 */ sw $v0, 4($a0)
/* B6144 8011FA44 8FBF0054 */ lw $ra, 0x54($sp)
/* B6148 8011FA48 8FB00050 */ lw $s0, 0x50($sp)
/* B614C 8011FA4C 03E00008 */ jr $ra
/* B6150 8011FA50 27BD0058 */ addiu $sp, $sp, 0x58

View File

@ -1,13 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel get_animator_node_for_tree_index
/* B6674 8011FF74 27BDFFE8 */ addiu $sp, $sp, -0x18
/* B6678 8011FF78 00A42821 */ addu $a1, $a1, $a0
/* B667C 8011FF7C AFBF0010 */ sw $ra, 0x10($sp)
/* B6680 8011FF80 8C840010 */ lw $a0, 0x10($a0)
/* B6684 8011FF84 0C047837 */ jal get_animator_child_with_id
/* B6688 8011FF88 90A50014 */ lbu $a1, 0x14($a1)
/* B668C 8011FF8C 8FBF0010 */ lw $ra, 0x10($sp)
/* B6690 8011FF90 03E00008 */ jr $ra
/* B6694 8011FF94 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,351 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel jtbl_80150030
.word .L80120748_B6E48, .L80120768_B6E68, .L80120B7C_B727C, .L80120778_B6E78, .L80120798_B6E98, .L80120870_B6F70, .L8012093C_B703C, .L80120B7C_B727C, .L80120A20_B7120, .L80120B7C_B727C, .L801207AC_B6EAC, .L80120B7C_B727C, .L80120B7C_B727C, .L80120B7C_B727C, .L801207C4_B6EC4, .L801207E0_B6EE0, .L80120814_B6F14, .L80120AA0_B71A0, .L80120750_B6E50, .L80120854_B6F54
dlabel D_80150080
.double 180.0
dlabel D_80150088
.double 32767.0
dlabel D_80150090
.double 180.0
dlabel D_80150098
.double 32767.0
dlabel D_801500A0
.double 180.0
dlabel D_801500A8
.double 32767.0
.section .text
glabel step_mesh_animator
/* B6DF8 801206F8 27BDFFC8 */ addiu $sp, $sp, -0x38
/* B6DFC 801206FC AFB10014 */ sw $s1, 0x14($sp)
/* B6E00 80120700 0080882D */ daddu $s1, $a0, $zero
/* B6E04 80120704 AFBF001C */ sw $ra, 0x1c($sp)
/* B6E08 80120708 AFB20018 */ sw $s2, 0x18($sp)
/* B6E0C 8012070C AFB00010 */ sw $s0, 0x10($sp)
/* B6E10 80120710 F7B80030 */ sdc1 $f24, 0x30($sp)
/* B6E14 80120714 F7B60028 */ sdc1 $f22, 0x28($sp)
/* B6E18 80120718 F7B40020 */ sdc1 $f20, 0x20($sp)
/* B6E1C 8012071C 8E320008 */ lw $s2, 8($s1)
/* B6E20 80120720 86430000 */ lh $v1, ($s2)
/* B6E24 80120724 2C620014 */ sltiu $v0, $v1, 0x14
/* B6E28 80120728 10400114 */ beqz $v0, .L80120B7C_B727C
/* B6E2C 8012072C 26500002 */ addiu $s0, $s2, 2
/* B6E30 80120730 00031080 */ sll $v0, $v1, 2
/* B6E34 80120734 3C018015 */ lui $at, %hi(jtbl_80150030)
/* B6E38 80120738 00220821 */ addu $at, $at, $v0
/* B6E3C 8012073C 8C220030 */ lw $v0, %lo(jtbl_80150030)($at)
/* B6E40 80120740 00400008 */ jr $v0
/* B6E44 80120744 00000000 */ nop
.L80120748_B6E48:
/* B6E48 80120748 080482E0 */ j .L80120B80
/* B6E4C 8012074C 2402FFFF */ addiu $v0, $zero, -1
.L80120750_B6E50:
/* B6E50 80120750 92030001 */ lbu $v1, 1($s0)
/* B6E54 80120754 26100002 */ addiu $s0, $s0, 2
/* B6E58 80120758 24020001 */ addiu $v0, $zero, 1
/* B6E5C 8012075C AE300008 */ sw $s0, 8($s1)
/* B6E60 80120760 080482E0 */ j .L80120B80
/* B6E64 80120764 A2230004 */ sb $v1, 4($s1)
.L80120768_B6E68:
/* B6E68 80120768 26100002 */ addiu $s0, $s0, 2
/* B6E6C 8012076C AE300008 */ sw $s0, 8($s1)
.L80120770:
/* B6E70 80120770 080482E0 */ j .L80120B80
/* B6E74 80120774 24020001 */ addiu $v0, $zero, 1
.L80120778_B6E78:
/* B6E78 80120778 8E22000C */ lw $v0, 0xc($s1)
/* B6E7C 8012077C 8E2302D0 */ lw $v1, 0x2d0($s1)
/* B6E80 80120780 0220202D */ daddu $a0, $s1, $zero
/* B6E84 80120784 AC820008 */ sw $v0, 8($a0)
/* B6E88 80120788 0C04819E */ jal reload_mesh_animator_tree
/* B6E8C 8012078C AC8302CC */ sw $v1, 0x2cc($a0)
/* B6E90 80120790 080482E0 */ j .L80120B80
/* B6E94 80120794 24020001 */ addiu $v0, $zero, 1
.L80120798_B6E98:
/* B6E98 80120798 8E22000C */ lw $v0, 0xc($s1)
/* B6E9C 8012079C 8E2302D0 */ lw $v1, 0x2d0($s1)
/* B6EA0 801207A0 AE220008 */ sw $v0, 8($s1)
/* B6EA4 801207A4 080482DF */ j .L80120B7C_B727C
/* B6EA8 801207A8 AE2302CC */ sw $v1, 0x2cc($s1)
.L801207AC_B6EAC:
/* B6EAC 801207AC 8E2302CC */ lw $v1, 0x2cc($s1)
/* B6EB0 801207B0 24020001 */ addiu $v0, $zero, 1
/* B6EB4 801207B4 AE30000C */ sw $s0, 0xc($s1)
/* B6EB8 801207B8 AE300008 */ sw $s0, 8($s1)
/* B6EBC 801207BC 080482E0 */ j .L80120B80
/* B6EC0 801207C0 AE2302D0 */ sw $v1, 0x2d0($s1)
.L801207C4_B6EC4:
/* B6EC4 801207C4 86040000 */ lh $a0, ($s0)
/* B6EC8 801207C8 26100002 */ addiu $s0, $s0, 2
/* B6ECC 801207CC 8E230000 */ lw $v1, ($s1)
/* B6ED0 801207D0 24020001 */ addiu $v0, $zero, 1
/* B6ED4 801207D4 AE300008 */ sw $s0, 8($s1)
/* B6ED8 801207D8 08048219 */ j .L80120864
/* B6EDC 801207DC 3084FFFF */ andi $a0, $a0, 0xffff
.L801207E0_B6EE0:
/* B6EE0 801207E0 86020000 */ lh $v0, ($s0)
/* B6EE4 801207E4 8E240010 */ lw $a0, 0x10($s1)
/* B6EE8 801207E8 00511021 */ addu $v0, $v0, $s1
/* B6EEC 801207EC 90450014 */ lbu $a1, 0x14($v0)
/* B6EF0 801207F0 0C047837 */ jal get_animator_child_with_id
/* B6EF4 801207F4 26100002 */ addiu $s0, $s0, 2
/* B6EF8 801207F8 0040282D */ daddu $a1, $v0, $zero
/* B6EFC 801207FC 86040000 */ lh $a0, ($s0)
/* B6F00 80120800 26100002 */ addiu $s0, $s0, 2
/* B6F04 80120804 94A300F4 */ lhu $v1, 0xf4($a1)
/* B6F08 80120808 24020001 */ addiu $v0, $zero, 1
/* B6F0C 8012080C 08048212 */ j .L80120848
/* B6F10 80120810 00641825 */ or $v1, $v1, $a0
.L80120814_B6F14:
/* B6F14 80120814 86020000 */ lh $v0, ($s0)
/* B6F18 80120818 8E240010 */ lw $a0, 0x10($s1)
/* B6F1C 8012081C 00511021 */ addu $v0, $v0, $s1
/* B6F20 80120820 90450014 */ lbu $a1, 0x14($v0)
/* B6F24 80120824 0C047837 */ jal get_animator_child_with_id
/* B6F28 80120828 26100002 */ addiu $s0, $s0, 2
/* B6F2C 8012082C 0040282D */ daddu $a1, $v0, $zero
/* B6F30 80120830 86040000 */ lh $a0, ($s0)
/* B6F34 80120834 26100002 */ addiu $s0, $s0, 2
/* B6F38 80120838 24020001 */ addiu $v0, $zero, 1
/* B6F3C 8012083C 94A300F4 */ lhu $v1, 0xf4($a1)
/* B6F40 80120840 00042027 */ nor $a0, $zero, $a0
/* B6F44 80120844 00641824 */ and $v1, $v1, $a0
.L80120848:
/* B6F48 80120848 A4A300F4 */ sh $v1, 0xf4($a1)
/* B6F4C 8012084C 080482E0 */ j .L80120B80
/* B6F50 80120850 AE300008 */ sw $s0, 8($s1)
.L80120854_B6F54:
/* B6F54 80120854 24020001 */ addiu $v0, $zero, 1
/* B6F58 80120858 8E230000 */ lw $v1, ($s1)
/* B6F5C 8012085C 3C040002 */ lui $a0, 2
/* B6F60 80120860 AE300008 */ sw $s0, 8($s1)
.L80120864:
/* B6F64 80120864 00641825 */ or $v1, $v1, $a0
/* B6F68 80120868 080482E0 */ j .L80120B80
/* B6F6C 8012086C AE230000 */ sw $v1, ($s1)
.L80120870_B6F70:
/* B6F70 80120870 86030000 */ lh $v1, ($s0)
/* B6F74 80120874 26100002 */ addiu $s0, $s0, 2
/* B6F78 80120878 86020000 */ lh $v0, ($s0)
/* B6F7C 8012087C 3C018015 */ lui $at, %hi(D_80150080)
/* B6F80 80120880 D4260080 */ ldc1 $f6, %lo(D_80150080)($at)
/* B6F84 80120884 44822000 */ mtc1 $v0, $f4
/* B6F88 80120888 00000000 */ nop
/* B6F8C 8012088C 46802120 */ cvt.s.w $f4, $f4
/* B6F90 80120890 46002121 */ cvt.d.s $f4, $f4
/* B6F94 80120894 46262102 */ mul.d $f4, $f4, $f6
/* B6F98 80120898 00000000 */ nop
/* B6F9C 8012089C 26100002 */ addiu $s0, $s0, 2
/* B6FA0 801208A0 86020000 */ lh $v0, ($s0)
/* B6FA4 801208A4 44821000 */ mtc1 $v0, $f2
/* B6FA8 801208A8 00000000 */ nop
/* B6FAC 801208AC 468010A0 */ cvt.s.w $f2, $f2
/* B6FB0 801208B0 460010A1 */ cvt.d.s $f2, $f2
/* B6FB4 801208B4 46261082 */ mul.d $f2, $f2, $f6
/* B6FB8 801208B8 00000000 */ nop
/* B6FBC 801208BC 26100002 */ addiu $s0, $s0, 2
/* B6FC0 801208C0 00711821 */ addu $v1, $v1, $s1
/* B6FC4 801208C4 90630014 */ lbu $v1, 0x14($v1)
/* B6FC8 801208C8 86020000 */ lh $v0, ($s0)
/* B6FCC 801208CC 26100002 */ addiu $s0, $s0, 2
/* B6FD0 801208D0 44820000 */ mtc1 $v0, $f0
/* B6FD4 801208D4 00000000 */ nop
/* B6FD8 801208D8 46800020 */ cvt.s.w $f0, $f0
/* B6FDC 801208DC 46000021 */ cvt.d.s $f0, $f0
/* B6FE0 801208E0 46260002 */ mul.d $f0, $f0, $f6
/* B6FE4 801208E4 00000000 */ nop
/* B6FE8 801208E8 AE300008 */ sw $s0, 8($s1)
/* B6FEC 801208EC 3C018015 */ lui $at, %hi(D_80150088)
/* B6FF0 801208F0 D4260088 */ ldc1 $f6, %lo(D_80150088)($at)
/* B6FF4 801208F4 240200FF */ addiu $v0, $zero, 0xff
/* B6FF8 801208F8 46262103 */ div.d $f4, $f4, $f6
/* B6FFC 801208FC 46202620 */ cvt.s.d $f24, $f4
/* B7000 80120900 46261083 */ div.d $f2, $f2, $f6
/* B7004 80120904 462015A0 */ cvt.s.d $f22, $f2
/* B7008 80120908 46260003 */ div.d $f0, $f0, $f6
/* B700C 8012090C 1062FF98 */ beq $v1, $v0, .L80120770
/* B7010 80120910 46200520 */ cvt.s.d $f20, $f0
/* B7014 80120914 8E240010 */ lw $a0, 0x10($s1)
/* B7018 80120918 0C047837 */ jal get_animator_child_with_id
/* B701C 8012091C 0060282D */ daddu $a1, $v1, $zero
/* B7020 80120920 0040282D */ daddu $a1, $v0, $zero
/* B7024 80120924 10A00091 */ beqz $a1, .L80120B6C
/* B7028 80120928 24020001 */ addiu $v0, $zero, 1
/* B702C 8012092C E4B8009C */ swc1 $f24, 0x9c($a1)
/* B7030 80120930 E4B600A0 */ swc1 $f22, 0xa0($a1)
/* B7034 80120934 080482E0 */ j .L80120B80
/* B7038 80120938 E4B400A4 */ swc1 $f20, 0xa4($a1)
.L8012093C_B703C:
/* B703C 8012093C 86030000 */ lh $v1, ($s0)
/* B7040 80120940 26100002 */ addiu $s0, $s0, 2
/* B7044 80120944 86020000 */ lh $v0, ($s0)
/* B7048 80120948 3C018015 */ lui $at, %hi(D_80150090)
/* B704C 8012094C D4260090 */ ldc1 $f6, %lo(D_80150090)($at)
/* B7050 80120950 44822000 */ mtc1 $v0, $f4
/* B7054 80120954 00000000 */ nop
/* B7058 80120958 46802120 */ cvt.s.w $f4, $f4
/* B705C 8012095C 46002121 */ cvt.d.s $f4, $f4
/* B7060 80120960 46262102 */ mul.d $f4, $f4, $f6
/* B7064 80120964 00000000 */ nop
/* B7068 80120968 26100002 */ addiu $s0, $s0, 2
/* B706C 8012096C 86020000 */ lh $v0, ($s0)
/* B7070 80120970 44821000 */ mtc1 $v0, $f2
/* B7074 80120974 00000000 */ nop
/* B7078 80120978 468010A0 */ cvt.s.w $f2, $f2
/* B707C 8012097C 460010A1 */ cvt.d.s $f2, $f2
/* B7080 80120980 46261082 */ mul.d $f2, $f2, $f6
/* B7084 80120984 00000000 */ nop
/* B7088 80120988 26100002 */ addiu $s0, $s0, 2
/* B708C 8012098C 00711821 */ addu $v1, $v1, $s1
/* B7090 80120990 90630014 */ lbu $v1, 0x14($v1)
/* B7094 80120994 86020000 */ lh $v0, ($s0)
/* B7098 80120998 26100002 */ addiu $s0, $s0, 2
/* B709C 8012099C 44820000 */ mtc1 $v0, $f0
/* B70A0 801209A0 00000000 */ nop
/* B70A4 801209A4 46800020 */ cvt.s.w $f0, $f0
/* B70A8 801209A8 46000021 */ cvt.d.s $f0, $f0
/* B70AC 801209AC 46260002 */ mul.d $f0, $f0, $f6
/* B70B0 801209B0 00000000 */ nop
/* B70B4 801209B4 AE300008 */ sw $s0, 8($s1)
/* B70B8 801209B8 3C018015 */ lui $at, %hi(D_80150098)
/* B70BC 801209BC D4260098 */ ldc1 $f6, %lo(D_80150098)($at)
/* B70C0 801209C0 240200FF */ addiu $v0, $zero, 0xff
/* B70C4 801209C4 46262103 */ div.d $f4, $f4, $f6
/* B70C8 801209C8 46202620 */ cvt.s.d $f24, $f4
/* B70CC 801209CC 46261083 */ div.d $f2, $f2, $f6
/* B70D0 801209D0 462015A0 */ cvt.s.d $f22, $f2
/* B70D4 801209D4 46260003 */ div.d $f0, $f0, $f6
/* B70D8 801209D8 1062FF65 */ beq $v1, $v0, .L80120770
/* B70DC 801209DC 46200520 */ cvt.s.d $f20, $f0
/* B70E0 801209E0 8E240010 */ lw $a0, 0x10($s1)
/* B70E4 801209E4 0C047837 */ jal get_animator_child_with_id
/* B70E8 801209E8 0060282D */ daddu $a1, $v1, $zero
/* B70EC 801209EC 0040282D */ daddu $a1, $v0, $zero
/* B70F0 801209F0 10A0005E */ beqz $a1, .L80120B6C
/* B70F4 801209F4 24020001 */ addiu $v0, $zero, 1
/* B70F8 801209F8 C4A4009C */ lwc1 $f4, 0x9c($a1)
/* B70FC 801209FC 46182100 */ add.s $f4, $f4, $f24
/* B7100 80120A00 C4A200A0 */ lwc1 $f2, 0xa0($a1)
/* B7104 80120A04 46161080 */ add.s $f2, $f2, $f22
/* B7108 80120A08 C4A000A4 */ lwc1 $f0, 0xa4($a1)
/* B710C 80120A0C 46140000 */ add.s $f0, $f0, $f20
/* B7110 80120A10 E4A4009C */ swc1 $f4, 0x9c($a1)
/* B7114 80120A14 E4A200A0 */ swc1 $f2, 0xa0($a1)
/* B7118 80120A18 080482E0 */ j .L80120B80
/* B711C 80120A1C E4A000A4 */ swc1 $f0, 0xa4($a1)
.L80120A20_B7120:
/* B7120 80120A20 86020000 */ lh $v0, ($s0)
/* B7124 80120A24 26100002 */ addiu $s0, $s0, 2
/* B7128 80120A28 86040000 */ lh $a0, ($s0)
/* B712C 80120A2C 26100002 */ addiu $s0, $s0, 2
/* B7130 80120A30 86030000 */ lh $v1, ($s0)
/* B7134 80120A34 26100002 */ addiu $s0, $s0, 2
/* B7138 80120A38 86050000 */ lh $a1, ($s0)
/* B713C 80120A3C 26100002 */ addiu $s0, $s0, 2
/* B7140 80120A40 4484C000 */ mtc1 $a0, $f24
/* B7144 80120A44 00000000 */ nop
/* B7148 80120A48 4680C620 */ cvt.s.w $f24, $f24
/* B714C 80120A4C 4483B000 */ mtc1 $v1, $f22
/* B7150 80120A50 00000000 */ nop
/* B7154 80120A54 4680B5A0 */ cvt.s.w $f22, $f22
/* B7158 80120A58 00511021 */ addu $v0, $v0, $s1
/* B715C 80120A5C 4485A000 */ mtc1 $a1, $f20
/* B7160 80120A60 00000000 */ nop
/* B7164 80120A64 4680A520 */ cvt.s.w $f20, $f20
/* B7168 80120A68 90430014 */ lbu $v1, 0x14($v0)
/* B716C 80120A6C 240200FF */ addiu $v0, $zero, 0xff
/* B7170 80120A70 1062FF3F */ beq $v1, $v0, .L80120770
/* B7174 80120A74 AE300008 */ sw $s0, 8($s1)
/* B7178 80120A78 8E240010 */ lw $a0, 0x10($s1)
/* B717C 80120A7C 0C047837 */ jal get_animator_child_with_id
/* B7180 80120A80 0060282D */ daddu $a1, $v1, $zero
/* B7184 80120A84 0040282D */ daddu $a1, $v0, $zero
/* B7188 80120A88 10A00038 */ beqz $a1, .L80120B6C
/* B718C 80120A8C 24020001 */ addiu $v0, $zero, 1
/* B7190 80120A90 E4B80090 */ swc1 $f24, 0x90($a1)
/* B7194 80120A94 E4B60094 */ swc1 $f22, 0x94($a1)
/* B7198 80120A98 080482E0 */ j .L80120B80
/* B719C 80120A9C E4B40098 */ swc1 $f20, 0x98($a1)
.L80120AA0_B71A0:
/* B71A0 80120AA0 86030000 */ lh $v1, ($s0)
/* B71A4 80120AA4 26100002 */ addiu $s0, $s0, 2
/* B71A8 80120AA8 86020000 */ lh $v0, ($s0)
/* B71AC 80120AAC 3C018015 */ lui $at, %hi(D_801500A0)
/* B71B0 80120AB0 D42600A0 */ ldc1 $f6, %lo(D_801500A0)($at)
/* B71B4 80120AB4 44822000 */ mtc1 $v0, $f4
/* B71B8 80120AB8 00000000 */ nop
/* B71BC 80120ABC 46802120 */ cvt.s.w $f4, $f4
/* B71C0 80120AC0 46002121 */ cvt.d.s $f4, $f4
/* B71C4 80120AC4 46262102 */ mul.d $f4, $f4, $f6
/* B71C8 80120AC8 00000000 */ nop
/* B71CC 80120ACC 26100002 */ addiu $s0, $s0, 2
/* B71D0 80120AD0 86020000 */ lh $v0, ($s0)
/* B71D4 80120AD4 44821000 */ mtc1 $v0, $f2
/* B71D8 80120AD8 00000000 */ nop
/* B71DC 80120ADC 468010A0 */ cvt.s.w $f2, $f2
/* B71E0 80120AE0 460010A1 */ cvt.d.s $f2, $f2
/* B71E4 80120AE4 46261082 */ mul.d $f2, $f2, $f6
/* B71E8 80120AE8 00000000 */ nop
/* B71EC 80120AEC 26100002 */ addiu $s0, $s0, 2
/* B71F0 80120AF0 00711821 */ addu $v1, $v1, $s1
/* B71F4 80120AF4 90630014 */ lbu $v1, 0x14($v1)
/* B71F8 80120AF8 86020000 */ lh $v0, ($s0)
/* B71FC 80120AFC 26100002 */ addiu $s0, $s0, 2
/* B7200 80120B00 44820000 */ mtc1 $v0, $f0
/* B7204 80120B04 00000000 */ nop
/* B7208 80120B08 46800020 */ cvt.s.w $f0, $f0
/* B720C 80120B0C 46000021 */ cvt.d.s $f0, $f0
/* B7210 80120B10 46260002 */ mul.d $f0, $f0, $f6
/* B7214 80120B14 00000000 */ nop
/* B7218 80120B18 AE300008 */ sw $s0, 8($s1)
/* B721C 80120B1C 3C018015 */ lui $at, %hi(D_801500A8)
/* B7220 80120B20 D42600A8 */ ldc1 $f6, %lo(D_801500A8)($at)
/* B7224 80120B24 240200FF */ addiu $v0, $zero, 0xff
/* B7228 80120B28 46262103 */ div.d $f4, $f4, $f6
/* B722C 80120B2C 46202620 */ cvt.s.d $f24, $f4
/* B7230 80120B30 46261083 */ div.d $f2, $f2, $f6
/* B7234 80120B34 462015A0 */ cvt.s.d $f22, $f2
/* B7238 80120B38 46260003 */ div.d $f0, $f0, $f6
/* B723C 80120B3C 1062FF0C */ beq $v1, $v0, .L80120770
/* B7240 80120B40 46200520 */ cvt.s.d $f20, $f0
/* B7244 80120B44 8E240010 */ lw $a0, 0x10($s1)
/* B7248 80120B48 0C047837 */ jal get_animator_child_with_id
/* B724C 80120B4C 0060282D */ daddu $a1, $v1, $zero
/* B7250 80120B50 0040282D */ daddu $a1, $v0, $zero
/* B7254 80120B54 10A00005 */ beqz $a1, .L80120B6C
/* B7258 80120B58 24020001 */ addiu $v0, $zero, 1
/* B725C 80120B5C E4B800A8 */ swc1 $f24, 0xa8($a1)
/* B7260 80120B60 E4B600AC */ swc1 $f22, 0xac($a1)
/* B7264 80120B64 080482E0 */ j .L80120B80
/* B7268 80120B68 E4B400B0 */ swc1 $f20, 0xb0($a1)
.L80120B6C:
/* B726C 80120B6C 8E2202CC */ lw $v0, 0x2cc($s1)
/* B7270 80120B70 AE320008 */ sw $s2, 8($s1)
/* B7274 80120B74 24420001 */ addiu $v0, $v0, 1
/* B7278 80120B78 AE2202CC */ sw $v0, 0x2cc($s1)
.L80120B7C_B727C:
/* B727C 80120B7C 0000102D */ daddu $v0, $zero, $zero
.L80120B80:
/* B7280 80120B80 8FBF001C */ lw $ra, 0x1c($sp)
/* B7284 80120B84 8FB20018 */ lw $s2, 0x18($sp)
/* B7288 80120B88 8FB10014 */ lw $s1, 0x14($sp)
/* B728C 80120B8C 8FB00010 */ lw $s0, 0x10($sp)
/* B7290 80120B90 D7B80030 */ ldc1 $f24, 0x30($sp)
/* B7294 80120B94 D7B60028 */ ldc1 $f22, 0x28($sp)
/* B7298 80120B98 D7B40020 */ ldc1 $f20, 0x20($sp)
/* B729C 80120B9C 03E00008 */ jr $ra
/* B72A0 80120BA0 27BD0038 */ addiu $sp, $sp, 0x38
/* B72A4 80120BA4 00000000 */ nop
/* B72A8 80120BA8 00000000 */ nop
/* B72AC 80120BAC 00000000 */ nop

View File

@ -1,336 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel jtbl_8014FE60
.word .L8011EC3C_B533C, .L8011EC5C_B535C, .L8011F034_B5734, .L8011EC7C_B537C, .L8011F034_B5734, .L8011ED48_B5448, .L8011EE10_B5510, .L8011F034_B5734, .L8011EEF0_B55F0, .L8011F034_B5734, .L8011EC8C_B538C, .L8011F034_B5734, .L8011F034_B5734, .L8011F034_B5734, .L8011EC9C_B539C, .L8011ECB8_B53B8, .L8011ECEC_B53EC, .L8011EF6C_B566C, .L8011EC44_B5344, .L8011ED2C_B542C
dlabel D_8014FEB0
.double 180.0
dlabel D_8014FEB8
.double 32767.0
dlabel D_8014FEC0
.double 180.0
dlabel D_8014FEC8
.double 32767.0
dlabel D_8014FED0
.double 180.0
dlabel D_8014FED8
.double 32767.0
.section .text
glabel step_model_animator
/* B52F0 8011EBF0 27BDFFC8 */ addiu $sp, $sp, -0x38
/* B52F4 8011EBF4 AFB10014 */ sw $s1, 0x14($sp)
/* B52F8 8011EBF8 0080882D */ daddu $s1, $a0, $zero
/* B52FC 8011EBFC AFBF0018 */ sw $ra, 0x18($sp)
/* B5300 8011EC00 AFB00010 */ sw $s0, 0x10($sp)
/* B5304 8011EC04 F7B80030 */ sdc1 $f24, 0x30($sp)
/* B5308 8011EC08 F7B60028 */ sdc1 $f22, 0x28($sp)
/* B530C 8011EC0C F7B40020 */ sdc1 $f20, 0x20($sp)
/* B5310 8011EC10 8E300008 */ lw $s0, 8($s1)
/* B5314 8011EC14 86030000 */ lh $v1, ($s0)
/* B5318 8011EC18 2C620014 */ sltiu $v0, $v1, 0x14
/* B531C 8011EC1C 10400105 */ beqz $v0, .L8011F034_B5734
/* B5320 8011EC20 26100002 */ addiu $s0, $s0, 2
/* B5324 8011EC24 00031080 */ sll $v0, $v1, 2
/* B5328 8011EC28 3C018015 */ lui $at, %hi(jtbl_8014FE60)
/* B532C 8011EC2C 00220821 */ addu $at, $at, $v0
/* B5330 8011EC30 8C22FE60 */ lw $v0, %lo(jtbl_8014FE60)($at)
/* B5334 8011EC34 00400008 */ jr $v0
/* B5338 8011EC38 00000000 */ nop
.L8011EC3C_B533C:
/* B533C 8011EC3C 08047C0E */ j .L8011F038
/* B5340 8011EC40 2402FFFF */ addiu $v0, $zero, -1
.L8011EC44_B5344:
/* B5344 8011EC44 92030001 */ lbu $v1, 1($s0)
/* B5348 8011EC48 26100002 */ addiu $s0, $s0, 2
/* B534C 8011EC4C 24020001 */ addiu $v0, $zero, 1
/* B5350 8011EC50 AE300008 */ sw $s0, 8($s1)
/* B5354 8011EC54 08047C0E */ j .L8011F038
/* B5358 8011EC58 A2230004 */ sb $v1, 4($s1)
.L8011EC5C_B535C:
/* B535C 8011EC5C 86020000 */ lh $v0, ($s0)
/* B5360 8011EC60 26100002 */ addiu $s0, $s0, 2
/* B5364 8011EC64 AE300008 */ sw $s0, 8($s1)
/* B5368 8011EC68 44820000 */ mtc1 $v0, $f0
/* B536C 8011EC6C 00000000 */ nop
/* B5370 8011EC70 46800020 */ cvt.s.w $f0, $f0
/* B5374 8011EC74 08047C0D */ j .L8011F034_B5734
/* B5378 8011EC78 E6200090 */ swc1 $f0, 0x90($s1)
.L8011EC7C_B537C:
/* B537C 8011EC7C 8E23000C */ lw $v1, 0xc($s1)
/* B5380 8011EC80 24020001 */ addiu $v0, $zero, 1
/* B5384 8011EC84 08047C0E */ j .L8011F038
/* B5388 8011EC88 AE230008 */ sw $v1, 8($s1)
.L8011EC8C_B538C:
/* B538C 8011EC8C 24020001 */ addiu $v0, $zero, 1
/* B5390 8011EC90 AE30000C */ sw $s0, 0xc($s1)
/* B5394 8011EC94 08047C0E */ j .L8011F038
/* B5398 8011EC98 AE300008 */ sw $s0, 8($s1)
.L8011EC9C_B539C:
/* B539C 8011EC9C 86040000 */ lh $a0, ($s0)
/* B53A0 8011ECA0 26100002 */ addiu $s0, $s0, 2
/* B53A4 8011ECA4 8E230000 */ lw $v1, ($s1)
/* B53A8 8011ECA8 24020001 */ addiu $v0, $zero, 1
/* B53AC 8011ECAC AE300008 */ sw $s0, 8($s1)
/* B53B0 8011ECB0 08047B4F */ j .L8011ED3C
/* B53B4 8011ECB4 3084FFFF */ andi $a0, $a0, 0xffff
.L8011ECB8_B53B8:
/* B53B8 8011ECB8 86020000 */ lh $v0, ($s0)
/* B53BC 8011ECBC 8E240010 */ lw $a0, 0x10($s1)
/* B53C0 8011ECC0 00511021 */ addu $v0, $v0, $s1
/* B53C4 8011ECC4 90450014 */ lbu $a1, 0x14($v0)
/* B53C8 8011ECC8 0C047837 */ jal get_animator_child_with_id
/* B53CC 8011ECCC 26100002 */ addiu $s0, $s0, 2
/* B53D0 8011ECD0 0040282D */ daddu $a1, $v0, $zero
/* B53D4 8011ECD4 86040000 */ lh $a0, ($s0)
/* B53D8 8011ECD8 26100002 */ addiu $s0, $s0, 2
/* B53DC 8011ECDC 94A300F4 */ lhu $v1, 0xf4($a1)
/* B53E0 8011ECE0 24020001 */ addiu $v0, $zero, 1
/* B53E4 8011ECE4 08047B48 */ j .L8011ED20
/* B53E8 8011ECE8 00641825 */ or $v1, $v1, $a0
.L8011ECEC_B53EC:
/* B53EC 8011ECEC 86020000 */ lh $v0, ($s0)
/* B53F0 8011ECF0 8E240010 */ lw $a0, 0x10($s1)
/* B53F4 8011ECF4 00511021 */ addu $v0, $v0, $s1
/* B53F8 8011ECF8 90450014 */ lbu $a1, 0x14($v0)
/* B53FC 8011ECFC 0C047837 */ jal get_animator_child_with_id
/* B5400 8011ED00 26100002 */ addiu $s0, $s0, 2
/* B5404 8011ED04 0040282D */ daddu $a1, $v0, $zero
/* B5408 8011ED08 86040000 */ lh $a0, ($s0)
/* B540C 8011ED0C 26100002 */ addiu $s0, $s0, 2
/* B5410 8011ED10 24020001 */ addiu $v0, $zero, 1
/* B5414 8011ED14 94A300F4 */ lhu $v1, 0xf4($a1)
/* B5418 8011ED18 00042027 */ nor $a0, $zero, $a0
/* B541C 8011ED1C 00641824 */ and $v1, $v1, $a0
.L8011ED20:
/* B5420 8011ED20 A4A300F4 */ sh $v1, 0xf4($a1)
/* B5424 8011ED24 08047C0E */ j .L8011F038
/* B5428 8011ED28 AE300008 */ sw $s0, 8($s1)
.L8011ED2C_B542C:
/* B542C 8011ED2C 24020001 */ addiu $v0, $zero, 1
/* B5430 8011ED30 8E230000 */ lw $v1, ($s1)
/* B5434 8011ED34 3C040002 */ lui $a0, 2
/* B5438 8011ED38 AE300008 */ sw $s0, 8($s1)
.L8011ED3C:
/* B543C 8011ED3C 00641825 */ or $v1, $v1, $a0
/* B5440 8011ED40 08047C0E */ j .L8011F038
/* B5444 8011ED44 AE230000 */ sw $v1, ($s1)
.L8011ED48_B5448:
/* B5448 8011ED48 86030000 */ lh $v1, ($s0)
/* B544C 8011ED4C 26100002 */ addiu $s0, $s0, 2
/* B5450 8011ED50 86020000 */ lh $v0, ($s0)
/* B5454 8011ED54 3C018015 */ lui $at, %hi(D_8014FEB0)
/* B5458 8011ED58 D424FEB0 */ ldc1 $f4, %lo(D_8014FEB0)($at)
/* B545C 8011ED5C 44823000 */ mtc1 $v0, $f6
/* B5460 8011ED60 00000000 */ nop
/* B5464 8011ED64 468031A0 */ cvt.s.w $f6, $f6
/* B5468 8011ED68 460031A1 */ cvt.d.s $f6, $f6
/* B546C 8011ED6C 46243182 */ mul.d $f6, $f6, $f4
/* B5470 8011ED70 00000000 */ nop
/* B5474 8011ED74 26100002 */ addiu $s0, $s0, 2
/* B5478 8011ED78 86020000 */ lh $v0, ($s0)
/* B547C 8011ED7C 44821000 */ mtc1 $v0, $f2
/* B5480 8011ED80 00000000 */ nop
/* B5484 8011ED84 468010A0 */ cvt.s.w $f2, $f2
/* B5488 8011ED88 460010A1 */ cvt.d.s $f2, $f2
/* B548C 8011ED8C 46241082 */ mul.d $f2, $f2, $f4
/* B5490 8011ED90 00000000 */ nop
/* B5494 8011ED94 8E240010 */ lw $a0, 0x10($s1)
/* B5498 8011ED98 26100002 */ addiu $s0, $s0, 2
/* B549C 8011ED9C 00711821 */ addu $v1, $v1, $s1
/* B54A0 8011EDA0 86020000 */ lh $v0, ($s0)
/* B54A4 8011EDA4 90650014 */ lbu $a1, 0x14($v1)
/* B54A8 8011EDA8 44820000 */ mtc1 $v0, $f0
/* B54AC 8011EDAC 00000000 */ nop
/* B54B0 8011EDB0 46800020 */ cvt.s.w $f0, $f0
/* B54B4 8011EDB4 46000021 */ cvt.d.s $f0, $f0
/* B54B8 8011EDB8 46240002 */ mul.d $f0, $f0, $f4
/* B54BC 8011EDBC 00000000 */ nop
/* B54C0 8011EDC0 3C018015 */ lui $at, %hi(D_8014FEB8)
/* B54C4 8011EDC4 D424FEB8 */ ldc1 $f4, %lo(D_8014FEB8)($at)
/* B54C8 8011EDC8 26100002 */ addiu $s0, $s0, 2
/* B54CC 8011EDCC AE300008 */ sw $s0, 8($s1)
/* B54D0 8011EDD0 46243183 */ div.d $f6, $f6, $f4
/* B54D4 8011EDD4 46203620 */ cvt.s.d $f24, $f6
/* B54D8 8011EDD8 46241083 */ div.d $f2, $f2, $f4
/* B54DC 8011EDDC 462015A0 */ cvt.s.d $f22, $f2
/* B54E0 8011EDE0 46240003 */ div.d $f0, $f0, $f4
/* B54E4 8011EDE4 0C047837 */ jal get_animator_child_with_id
/* B54E8 8011EDE8 46200520 */ cvt.s.d $f20, $f0
/* B54EC 8011EDEC 0040282D */ daddu $a1, $v0, $zero
/* B54F0 8011EDF0 14A00003 */ bnez $a1, .L8011EE00
/* B54F4 8011EDF4 24020001 */ addiu $v0, $zero, 1
.L8011EDF8:
/* B54F8 8011EDF8 08047B7E */ j .L8011EDF8
/* B54FC 8011EDFC 00000000 */ nop
.L8011EE00:
/* B5500 8011EE00 E4B8009C */ swc1 $f24, 0x9c($a1)
/* B5504 8011EE04 E4B600A0 */ swc1 $f22, 0xa0($a1)
/* B5508 8011EE08 08047C0E */ j .L8011F038
/* B550C 8011EE0C E4B400A4 */ swc1 $f20, 0xa4($a1)
.L8011EE10_B5510:
/* B5510 8011EE10 86030000 */ lh $v1, ($s0)
/* B5514 8011EE14 26100002 */ addiu $s0, $s0, 2
/* B5518 8011EE18 86020000 */ lh $v0, ($s0)
/* B551C 8011EE1C 3C018015 */ lui $at, %hi(D_8014FEC0)
/* B5520 8011EE20 D424FEC0 */ ldc1 $f4, %lo(D_8014FEC0)($at)
/* B5524 8011EE24 44823000 */ mtc1 $v0, $f6
/* B5528 8011EE28 00000000 */ nop
/* B552C 8011EE2C 468031A0 */ cvt.s.w $f6, $f6
/* B5530 8011EE30 460031A1 */ cvt.d.s $f6, $f6
/* B5534 8011EE34 46243182 */ mul.d $f6, $f6, $f4
/* B5538 8011EE38 00000000 */ nop
/* B553C 8011EE3C 26100002 */ addiu $s0, $s0, 2
/* B5540 8011EE40 86020000 */ lh $v0, ($s0)
/* B5544 8011EE44 44821000 */ mtc1 $v0, $f2
/* B5548 8011EE48 00000000 */ nop
/* B554C 8011EE4C 468010A0 */ cvt.s.w $f2, $f2
/* B5550 8011EE50 460010A1 */ cvt.d.s $f2, $f2
/* B5554 8011EE54 46241082 */ mul.d $f2, $f2, $f4
/* B5558 8011EE58 00000000 */ nop
/* B555C 8011EE5C 8E240010 */ lw $a0, 0x10($s1)
/* B5560 8011EE60 26100002 */ addiu $s0, $s0, 2
/* B5564 8011EE64 00711821 */ addu $v1, $v1, $s1
/* B5568 8011EE68 86020000 */ lh $v0, ($s0)
/* B556C 8011EE6C 90650014 */ lbu $a1, 0x14($v1)
/* B5570 8011EE70 44820000 */ mtc1 $v0, $f0
/* B5574 8011EE74 00000000 */ nop
/* B5578 8011EE78 46800020 */ cvt.s.w $f0, $f0
/* B557C 8011EE7C 46000021 */ cvt.d.s $f0, $f0
/* B5580 8011EE80 46240002 */ mul.d $f0, $f0, $f4
/* B5584 8011EE84 00000000 */ nop
/* B5588 8011EE88 3C018015 */ lui $at, %hi(D_8014FEC8)
/* B558C 8011EE8C D424FEC8 */ ldc1 $f4, %lo(D_8014FEC8)($at)
/* B5590 8011EE90 26100002 */ addiu $s0, $s0, 2
/* B5594 8011EE94 AE300008 */ sw $s0, 8($s1)
/* B5598 8011EE98 46243183 */ div.d $f6, $f6, $f4
/* B559C 8011EE9C 46203620 */ cvt.s.d $f24, $f6
/* B55A0 8011EEA0 46241083 */ div.d $f2, $f2, $f4
/* B55A4 8011EEA4 462015A0 */ cvt.s.d $f22, $f2
/* B55A8 8011EEA8 46240003 */ div.d $f0, $f0, $f4
/* B55AC 8011EEAC 0C047837 */ jal get_animator_child_with_id
/* B55B0 8011EEB0 46200520 */ cvt.s.d $f20, $f0
/* B55B4 8011EEB4 0040282D */ daddu $a1, $v0, $zero
/* B55B8 8011EEB8 14A00003 */ bnez $a1, .L8011EEC8
/* B55BC 8011EEBC 24020001 */ addiu $v0, $zero, 1
.L8011EEC0:
/* B55C0 8011EEC0 08047BB0 */ j .L8011EEC0
/* B55C4 8011EEC4 00000000 */ nop
.L8011EEC8:
/* B55C8 8011EEC8 C4A4009C */ lwc1 $f4, 0x9c($a1)
/* B55CC 8011EECC 46182100 */ add.s $f4, $f4, $f24
/* B55D0 8011EED0 C4A200A0 */ lwc1 $f2, 0xa0($a1)
/* B55D4 8011EED4 46161080 */ add.s $f2, $f2, $f22
/* B55D8 8011EED8 C4A000A4 */ lwc1 $f0, 0xa4($a1)
/* B55DC 8011EEDC 46140000 */ add.s $f0, $f0, $f20
/* B55E0 8011EEE0 E4A4009C */ swc1 $f4, 0x9c($a1)
/* B55E4 8011EEE4 E4A200A0 */ swc1 $f2, 0xa0($a1)
/* B55E8 8011EEE8 08047C0E */ j .L8011F038
/* B55EC 8011EEEC E4A000A4 */ swc1 $f0, 0xa4($a1)
.L8011EEF0_B55F0:
/* B55F0 8011EEF0 86020000 */ lh $v0, ($s0)
/* B55F4 8011EEF4 26100002 */ addiu $s0, $s0, 2
/* B55F8 8011EEF8 86050000 */ lh $a1, ($s0)
/* B55FC 8011EEFC 26100002 */ addiu $s0, $s0, 2
/* B5600 8011EF00 86030000 */ lh $v1, ($s0)
/* B5604 8011EF04 26100002 */ addiu $s0, $s0, 2
/* B5608 8011EF08 86060000 */ lh $a2, ($s0)
/* B560C 8011EF0C 26100002 */ addiu $s0, $s0, 2
/* B5610 8011EF10 8E240010 */ lw $a0, 0x10($s1)
/* B5614 8011EF14 4485C000 */ mtc1 $a1, $f24
/* B5618 8011EF18 00000000 */ nop
/* B561C 8011EF1C 4680C620 */ cvt.s.w $f24, $f24
/* B5620 8011EF20 4483B000 */ mtc1 $v1, $f22
/* B5624 8011EF24 00000000 */ nop
/* B5628 8011EF28 4680B5A0 */ cvt.s.w $f22, $f22
/* B562C 8011EF2C 00511021 */ addu $v0, $v0, $s1
/* B5630 8011EF30 90450014 */ lbu $a1, 0x14($v0)
/* B5634 8011EF34 4486A000 */ mtc1 $a2, $f20
/* B5638 8011EF38 00000000 */ nop
/* B563C 8011EF3C 4680A520 */ cvt.s.w $f20, $f20
/* B5640 8011EF40 0C047837 */ jal get_animator_child_with_id
/* B5644 8011EF44 AE300008 */ sw $s0, 8($s1)
/* B5648 8011EF48 0040282D */ daddu $a1, $v0, $zero
/* B564C 8011EF4C 14A00003 */ bnez $a1, .L8011EF5C
/* B5650 8011EF50 24020001 */ addiu $v0, $zero, 1
.L8011EF54:
/* B5654 8011EF54 08047BD5 */ j .L8011EF54
/* B5658 8011EF58 00000000 */ nop
.L8011EF5C:
/* B565C 8011EF5C E4B80090 */ swc1 $f24, 0x90($a1)
/* B5660 8011EF60 E4B60094 */ swc1 $f22, 0x94($a1)
/* B5664 8011EF64 08047C0E */ j .L8011F038
/* B5668 8011EF68 E4B40098 */ swc1 $f20, 0x98($a1)
.L8011EF6C_B566C:
/* B566C 8011EF6C 86030000 */ lh $v1, ($s0)
/* B5670 8011EF70 26100002 */ addiu $s0, $s0, 2
/* B5674 8011EF74 86020000 */ lh $v0, ($s0)
/* B5678 8011EF78 3C018015 */ lui $at, %hi(D_8014FED0)
/* B567C 8011EF7C D424FED0 */ ldc1 $f4, %lo(D_8014FED0)($at)
/* B5680 8011EF80 44823000 */ mtc1 $v0, $f6
/* B5684 8011EF84 00000000 */ nop
/* B5688 8011EF88 468031A0 */ cvt.s.w $f6, $f6
/* B568C 8011EF8C 460031A1 */ cvt.d.s $f6, $f6
/* B5690 8011EF90 46243182 */ mul.d $f6, $f6, $f4
/* B5694 8011EF94 00000000 */ nop
/* B5698 8011EF98 26100002 */ addiu $s0, $s0, 2
/* B569C 8011EF9C 86020000 */ lh $v0, ($s0)
/* B56A0 8011EFA0 44821000 */ mtc1 $v0, $f2
/* B56A4 8011EFA4 00000000 */ nop
/* B56A8 8011EFA8 468010A0 */ cvt.s.w $f2, $f2
/* B56AC 8011EFAC 460010A1 */ cvt.d.s $f2, $f2
/* B56B0 8011EFB0 46241082 */ mul.d $f2, $f2, $f4
/* B56B4 8011EFB4 00000000 */ nop
/* B56B8 8011EFB8 8E240010 */ lw $a0, 0x10($s1)
/* B56BC 8011EFBC 26100002 */ addiu $s0, $s0, 2
/* B56C0 8011EFC0 00711821 */ addu $v1, $v1, $s1
/* B56C4 8011EFC4 86020000 */ lh $v0, ($s0)
/* B56C8 8011EFC8 90650014 */ lbu $a1, 0x14($v1)
/* B56CC 8011EFCC 44820000 */ mtc1 $v0, $f0
/* B56D0 8011EFD0 00000000 */ nop
/* B56D4 8011EFD4 46800020 */ cvt.s.w $f0, $f0
/* B56D8 8011EFD8 46000021 */ cvt.d.s $f0, $f0
/* B56DC 8011EFDC 46240002 */ mul.d $f0, $f0, $f4
/* B56E0 8011EFE0 00000000 */ nop
/* B56E4 8011EFE4 3C018015 */ lui $at, %hi(D_8014FED8)
/* B56E8 8011EFE8 D424FED8 */ ldc1 $f4, %lo(D_8014FED8)($at)
/* B56EC 8011EFEC 26100002 */ addiu $s0, $s0, 2
/* B56F0 8011EFF0 AE300008 */ sw $s0, 8($s1)
/* B56F4 8011EFF4 46243183 */ div.d $f6, $f6, $f4
/* B56F8 8011EFF8 46203620 */ cvt.s.d $f24, $f6
/* B56FC 8011EFFC 46241083 */ div.d $f2, $f2, $f4
/* B5700 8011F000 462015A0 */ cvt.s.d $f22, $f2
/* B5704 8011F004 46240003 */ div.d $f0, $f0, $f4
/* B5708 8011F008 0C047837 */ jal get_animator_child_with_id
/* B570C 8011F00C 46200520 */ cvt.s.d $f20, $f0
/* B5710 8011F010 0040282D */ daddu $a1, $v0, $zero
/* B5714 8011F014 14A00003 */ bnez $a1, .L8011F024
/* B5718 8011F018 24020001 */ addiu $v0, $zero, 1
.L8011F01C:
/* B571C 8011F01C 08047C07 */ j .L8011F01C
/* B5720 8011F020 00000000 */ nop
.L8011F024:
/* B5724 8011F024 E4B800A8 */ swc1 $f24, 0xa8($a1)
/* B5728 8011F028 E4B600AC */ swc1 $f22, 0xac($a1)
/* B572C 8011F02C 08047C0E */ j .L8011F038
/* B5730 8011F030 E4B400B0 */ swc1 $f20, 0xb0($a1)
.L8011F034_B5734:
/* B5734 8011F034 0000102D */ daddu $v0, $zero, $zero
.L8011F038:
/* B5738 8011F038 8FBF0018 */ lw $ra, 0x18($sp)
/* B573C 8011F03C 8FB10014 */ lw $s1, 0x14($sp)
/* B5740 8011F040 8FB00010 */ lw $s0, 0x10($sp)
/* B5744 8011F044 D7B80030 */ ldc1 $f24, 0x30($sp)
/* B5748 8011F048 D7B60028 */ ldc1 $f22, 0x28($sp)
/* B574C 8011F04C D7B40020 */ ldc1 $f20, 0x20($sp)
/* B5750 8011F050 03E00008 */ jr $ra
/* B5754 8011F054 27BD0038 */ addiu $sp, $sp, 0x38

View File

@ -4389,7 +4389,7 @@ D_8014C138 = 0x8014C138; // type:data rom:0xE2838
D_8014C160 = 0x8014C160; // type:data rom:0xE2860
D_8014C188 = 0x8014C188; // type:data rom:0xE2888
D_8014C248 = 0x8014C248; // type:data rom:0xE2948
D_8014C250 = 0x8014C250; // type:data rom:0xE2950
gAnimScriptDefault = 0x8014C250; // type:data rom:0xE2950
D_8014C260 = 0x8014C260; // type:data rom:0xE2960
D_8014C270 = 0x8014C270; // type:data rom:0xE2970
D_8014C280 = 0x8014C280; // type:data rom:0xE2980
@ -4792,7 +4792,7 @@ D_80153A56 = 0x80153A56; // type:data rom:0xEA156
D_80153A57 = 0x80153A57; // type:data rom:0xEA157
gAnimModelFogStart = 0x80153A58; // type:data rom:0xEA158
gAnimModelFogEnd = 0x80153A5C; // type:data rom:0xEA15C
D_80153A60 = 0x80153A60; // type:data rom:0xEA160
gAnimVtxSegment = 0x80153A60; // type:data rom:0xEA160
evt_handle_set_float = 0x802C57B8; // type:func rom:0xEA168
gAnimScaleMtx = 0x80153AA8; // type:data rom:0xEA1A8
evt_handle_add = 0x802C5804; // type:func rom:0xEA1B4