mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
Trigger funcs (#405)
* remove old tools, fix warnings * almost match si_handle_print_debug_var * si_goto_end_loop and warnings * is_trigger_bound and create_trigger * Cleanup + matching 2 non-matchings * update_triggers (trigger.c complete) * fix warnings * PR comments, m2ctx.py fix
This commit is contained in:
parent
09459d19b4
commit
a865cbdf17
@ -275,12 +275,12 @@ typedef struct Trigger {
|
||||
/* 0x00 */ TriggerFlags flags;
|
||||
/* 0x04 */ s32 params1;
|
||||
/* 0x08 */ s32 params2;
|
||||
/* 0x0C */ UNK_FUN_PTR(functionHandler);
|
||||
/* 0x0C */ s32 (*functionHandler)(struct Trigger*);
|
||||
/* 0x10 */ EvtSource* scriptSource;
|
||||
/* 0x14 */ struct Evt* runningScript;
|
||||
/* 0x18 */ s32 priority;
|
||||
/* 0x1C */ s32 scriptVars[3];
|
||||
/* 0x28 */ char unk_28[4];
|
||||
/* 0x28 */ s32 unk_28;
|
||||
/* 0x2C */ s32 unk_2C;
|
||||
/* 0x30 */ u8 unk_30;
|
||||
/* 0x31 */ char unk_31[3];
|
||||
@ -1483,7 +1483,7 @@ typedef struct FontRasterSet {
|
||||
/* 0x02 */ char unk_02[10];
|
||||
} FontRasterSet; // size = 0x0C
|
||||
|
||||
typedef s32(*TriggerHandlerFunc)(struct Trigger*);
|
||||
typedef s32 (*TriggerHandlerFunc)(Trigger*);
|
||||
|
||||
typedef struct TriggerDefinition {
|
||||
/* 0x00 */ s32 flags;
|
||||
@ -1512,7 +1512,7 @@ typedef struct CollisionStatus {
|
||||
/* 0x16 */ s16 touchingWallTrigger; /* 0/1 */
|
||||
/* 0x18 */ s16 bombetteExploded; /* 0 = yes, FFFF = no */
|
||||
/* 0x1A */ char unk_1A[2];
|
||||
/* 0x1C */ f32 bombetteExplositionPos[3];
|
||||
/* 0x1C */ Vec3f bombetteExplosionPos;
|
||||
} CollisionStatus; // size = 0x28
|
||||
|
||||
typedef struct DecorationTable {
|
||||
|
@ -155,7 +155,7 @@ s32 npc_test_move_simple_without_slipping(s32, f32*, f32*, f32*, f32, f32, f32,
|
||||
void update_collider_transform(s16 colliderID);
|
||||
void get_collider_center(s32 colliderID, f32* x, f32* y, f32* z);
|
||||
|
||||
s32 is_trigger_bound(Trigger*, Bytecode* script);
|
||||
s32 is_trigger_bound(Trigger*, EvtSource* script);
|
||||
Trigger* create_trigger(TriggerDefinition* def);
|
||||
s32 _bound_script_trigger_handler(Trigger* trigger);
|
||||
Trigger* get_trigger_by_id(s32 triggerID);
|
||||
@ -164,6 +164,8 @@ Actor* get_actor(ActorID actorID);
|
||||
ActorPart* get_actor_part(Actor* actor, s32 partIndex);
|
||||
s32 add_coins(s32 amt);
|
||||
|
||||
s32 phys_can_player_interact(void);
|
||||
|
||||
void ai_enemy_play_sound(Npc* npc, s32 arg1, s32 arg2);
|
||||
|
||||
s32 player_test_move_without_slipping(PlayerStatus*, f32*, f32*, f32*, s32, f32, s32*);
|
||||
@ -205,7 +207,25 @@ void set_game_mode(s16 idx);
|
||||
f32 get_xz_dist_to_player(f32, f32);
|
||||
void func_800E06C0(s32);
|
||||
void close_status_menu(void);
|
||||
Evt* func_802C39F8(Evt* parentScript, Bytecode* nextLine, s32 newState);
|
||||
Evt* start_child_script(Evt* parentScript, EvtSource* source, s32 initialState);
|
||||
Evt* restart_script(Evt* script);
|
||||
void clear_virtual_entity_list(void);
|
||||
void reset_model_animators(void);
|
||||
void init_virtual_entity_list(void);
|
||||
void init_model_animators(void);
|
||||
s32 heap_free(void* ptr);
|
||||
void btl_state_update_switch_to_partner(void);
|
||||
void switch_to_partner(s32 arg0);
|
||||
|
||||
void delete_trigger(Trigger* toDelete);
|
||||
void kill_script_by_ID(s32 id);
|
||||
void set_script_priority(Evt* script, s32 priority);
|
||||
void set_script_group(Evt* script, s32 groupFlags);
|
||||
void suspend_group_others(Evt* script, s32 groupFlags);
|
||||
void resume_group_others(Evt* script, s32 groupFlags);
|
||||
s32 suspend_all_script(s32 id);
|
||||
s32 resume_all_script(s32 id);
|
||||
|
||||
Shadow* create_shadow_type(s32 type, f32 x, f32 y, f32 z);
|
||||
s32 is_point_within_region(s32 shape, f32 pointX, f32 pointY, f32 centerX, f32 centerY, f32 sizeX, f32 sizeZ);
|
||||
@ -260,6 +280,11 @@ s32 is_ability_active(s32 arg0);
|
||||
f32 update_lerp(Easing easing, f32 start, f32 end, s32 elapsed, s32 duration);
|
||||
void sin_cos_deg(f32 rad, f32* outSinTheta, f32* outCosTheta);
|
||||
|
||||
void set_main_pan_u(s32 texPannerID, s32 value);
|
||||
void set_main_pan_v(s32 texPannerID, s32 value);
|
||||
void set_aux_pan_u(s32 texPannerID, s32 value);
|
||||
void set_aux_pan_v(s32 texPannerID, s32 value);
|
||||
|
||||
void enable_world_fog(void);
|
||||
void set_world_fog_dist(s32 start, s32 end);
|
||||
void set_world_fog_color(s32 r, s32 g, s32 b, s32 a);
|
||||
|
@ -138,8 +138,8 @@ extern AnimatedModelList* gCurrentMeshAnimationListPtr;
|
||||
|
||||
// Triggers
|
||||
extern s16 gTriggerCount;
|
||||
extern TriggerList gTriggerList1;
|
||||
extern TriggerList gTriggerList2;
|
||||
extern TriggerList wTriggerList;
|
||||
extern TriggerList bTriggerList;
|
||||
extern TriggerList* gCurrentTriggerListPtr;
|
||||
|
||||
// Map transition data. Should probably be a struct
|
||||
@ -298,7 +298,7 @@ extern Temp8010F250 D_8010F250; // sfx_play_sound state struct?
|
||||
extern SaveData gCurrentSaveFile;
|
||||
|
||||
extern u32* gMapFlags;
|
||||
extern u32* gMapVars;
|
||||
extern s32* gMapVars;
|
||||
|
||||
extern f32 D_80286540;
|
||||
|
||||
|
16
src/190B20.c
16
src/190B20.c
@ -1493,10 +1493,9 @@ INCLUDE_ASM(s32, "190B20", func_80266F60);
|
||||
INCLUDE_ASM(s32, "190B20", func_80266F8C);
|
||||
|
||||
void func_80266FD8(ActorPart* part, s32 arg1) {
|
||||
DecorationTable* decorationTable;
|
||||
|
||||
if (part->idleAnimations != NULL && !(part->flags & 2)) {
|
||||
decorationTable = part->decorationTable;
|
||||
DecorationTable* decorationTable = part->decorationTable;
|
||||
|
||||
if (decorationTable->unk_764 != arg1) {
|
||||
decorationTable->unk_764 = arg1;
|
||||
decorationTable->unk_766 = 0;
|
||||
@ -1508,12 +1507,13 @@ void func_80266FD8(ActorPart* part, s32 arg1) {
|
||||
void func_80267018(Actor* actor, s32 arg1) {
|
||||
ActorPart* actorPart = &actor->partsTable[0];
|
||||
|
||||
while (actorPart != NULL) {
|
||||
if (!(actorPart->flags & 0x100001) && actorPart->decorationTable != NULL && !(actorPart->flags & 2) && actorPart->idleAnimations != NULL) {
|
||||
func_80266FD8(actorPart, arg1);
|
||||
}
|
||||
actorPart = actorPart->nextPart;
|
||||
while (actorPart != NULL) {
|
||||
if (!(actorPart->flags & 0x100001) && actorPart->decorationTable != NULL && !(actorPart->flags & 2) &&
|
||||
actorPart->idleAnimations != NULL) {
|
||||
func_80266FD8(actorPart, arg1);
|
||||
}
|
||||
actorPart = actorPart->nextPart;
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "190B20", func_8026709C);
|
||||
|
@ -29,10 +29,10 @@ extern EvtSource N(idle_80239350);
|
||||
extern EvtSource N(nextTurn_80239A3C);
|
||||
extern EvtSource N(takeTurn_802396D8);
|
||||
|
||||
void func_802380E4_6F11C4();
|
||||
void func_8023817C_6F125C();
|
||||
void func_80238BCC_6F1CAC();
|
||||
void func_80238EDC_6F1FBC();
|
||||
ApiStatus func_802380E4_6F11C4(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_8023817C_6F125C(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_80238BCC_6F1CAC(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_80238EDC_6F1FBC(Evt* script, s32 isInitialCall);
|
||||
|
||||
ApiStatus N(func_80238000_6F10E0)(Evt* script, s32 isInitialCall) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
@ -61,21 +61,18 @@ ApiStatus N(func_80238000_6F10E0)(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
ApiStatus func_802380E4_6F11C4(Evt* script, s32 isInitialCall) {
|
||||
Actor* targetActor = get_actor(get_actor(script->owner1.actorID)->targetActorID);
|
||||
|
||||
script->varTable[0] = 99;
|
||||
D_8023BB98_6ECC78 = ((D_8023BB98_6ECC78 * targetActor->staticActorData->powerBounceChance) * 0x51EB851F) >> 5 - (D_8023BB98_6ECC78 * targetActor->staticActorData->powerBounceChance >> 31);
|
||||
D_8023BB98_6ECC78 *= targetActor->staticActorData->powerBounceChance;
|
||||
D_8023BB98_6ECC78 /= 100;
|
||||
if (D_8023BB98_6ECC78 < rand_int(100)) {
|
||||
script->varTable[0] = 0;
|
||||
}
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
#else
|
||||
INCLUDE_ASM(s32, "battle/partner/goombario", func_802380E4_6F11C4);
|
||||
#endif
|
||||
|
||||
INCLUDE_ASM(s32, "battle/partner/goombario", func_8023817C_6F125C);
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "common.h"
|
||||
|
||||
extern s32* D_802382F8_714FE8[];
|
||||
extern s32 D_802382F8_714FE8;
|
||||
|
||||
ApiStatus func_80238000_714CF0(Evt* script, s32 isInitialCall) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
@ -14,22 +14,11 @@ ApiStatus func_80238000_714CF0(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
ApiStatus func_80238028_714D18(Evt* script, s32 isInitialCall) {
|
||||
Actor* actor = get_actor(script->owner1.actorID);
|
||||
s32* var0 = &D_802382F8_714FE8[0];
|
||||
s32 var4 = *D_802382F8_714FE8[1];
|
||||
//s32* var4 = (*&var0);
|
||||
s32 var1 = *var0 + 18;
|
||||
f32 var2;
|
||||
|
||||
var1 = clamp_angle(var4 + 18);
|
||||
var2 = var1 * 6.28318f;
|
||||
|
||||
actor->unk_19A = 2.0f * sin_rad(var2 / 360.0f);
|
||||
|
||||
D_802382F8_714FE8 += 18;
|
||||
D_802382F8_714FE8 = clamp_angle(D_802382F8_714FE8);
|
||||
actor->unk_19A = 2.0f * sin_rad(D_802382F8_714FE8 * TAU / 360.0f);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
#else
|
||||
INCLUDE_ASM(s32, "battle/partner/twink", func_80238028_714D18);
|
||||
#endif
|
||||
|
@ -1,94 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
void default_trigger_delegate(s32* arg0) {
|
||||
arg0[0] |= 2;
|
||||
}
|
||||
|
||||
void clear_trigger_data(void) {
|
||||
CollisionStatus* collisionStatus = &gCollisionStatus;
|
||||
s32 i;
|
||||
|
||||
if (!gGameStatusPtr->isBattle) {
|
||||
gCurrentTriggerListPtr = &gTriggerList1;
|
||||
} else {
|
||||
gCurrentTriggerListPtr = &gTriggerList2;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(*gCurrentTriggerListPtr); i++) {
|
||||
(*gCurrentTriggerListPtr)[i] = NULL;
|
||||
}
|
||||
|
||||
gTriggerCount = 0;
|
||||
collisionStatus->pushingAgainstWall = -1;
|
||||
collisionStatus->currentFloor = -1;
|
||||
collisionStatus->lastTouchedFloor = -1;
|
||||
collisionStatus->currentCeiling = -1;
|
||||
collisionStatus->unk_0A = -1;
|
||||
collisionStatus->unk_0C = -1;
|
||||
collisionStatus->unk_0E = -1;
|
||||
collisionStatus->unk_10 = -1;
|
||||
collisionStatus->currentWall = -1;
|
||||
collisionStatus->lastWallHammered = -1;
|
||||
collisionStatus->touchingWallTrigger = 0;
|
||||
collisionStatus->bombetteExploded = -1;
|
||||
collisionStatus->bombetteExplositionPos[0] = 0.0f;
|
||||
collisionStatus->bombetteExplositionPos[1] = 0.0f;
|
||||
collisionStatus->bombetteExplositionPos[2] = 0.0f;
|
||||
}
|
||||
|
||||
void init_trigger_list(void) {
|
||||
if (!gGameStatusPtr->isBattle) {
|
||||
gCurrentTriggerListPtr = &gTriggerList1;
|
||||
} else {
|
||||
gCurrentTriggerListPtr = &gTriggerList2;
|
||||
}
|
||||
|
||||
gTriggerCount = 0;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(Trigger*, "dbd70_len_700", create_trigger, TriggerDefinition* def);
|
||||
|
||||
INCLUDE_ASM(s32, "dbd70_len_700", update_triggers);
|
||||
|
||||
void delete_trigger(Trigger* toDelete) {
|
||||
s32 i;
|
||||
TriggerList** currentTriggerListPtr = &gCurrentTriggerListPtr;
|
||||
|
||||
for (i = 0; i < MAX_TRIGGERS; i++) {
|
||||
if ((**currentTriggerListPtr)[i] == toDelete) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i < MAX_TRIGGERS) {
|
||||
heap_free((**currentTriggerListPtr)[i]);
|
||||
(**currentTriggerListPtr)[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "dbd70_len_700", is_trigger_bound, Trigger* trigger, Bytecode* script);
|
||||
|
||||
Trigger* get_trigger_by_id(s32 triggerID) {
|
||||
return (*gCurrentTriggerListPtr)[triggerID];
|
||||
}
|
||||
|
||||
/// @returns TRUE if colliderID is bound to an interaction trigger (press A) and the player can use it.
|
||||
s32 should_collider_allow_interact(s32 colliderID) {
|
||||
s32 i;
|
||||
|
||||
if (phys_can_player_interact() == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_TRIGGERS; i++) {
|
||||
Trigger* trigger = (*gCurrentTriggerListPtr)[i];
|
||||
|
||||
if ((trigger != NULL) &&
|
||||
(trigger->unk_30 != 0) &&
|
||||
(trigger->params2 == colliderID) &&
|
||||
(trigger->flags.flags & 0x100)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -172,9 +172,9 @@ Evt* start_script(EvtSource* source, s32 priority, s32 initialState) {
|
||||
newScript->state = initialState | 1;
|
||||
newScript->currentOpcode = 0;
|
||||
newScript->priority = priority;
|
||||
newScript->ptrNextLine = source;
|
||||
newScript->ptrFirstLine = source;
|
||||
newScript->ptrCurrentLine = source;
|
||||
newScript->ptrNextLine = (Bytecode*)source;
|
||||
newScript->ptrFirstLine = (Bytecode*)source;
|
||||
newScript->ptrCurrentLine = (Bytecode*)source;
|
||||
newScript->userData = NULL;
|
||||
newScript->blockingParent = NULL;
|
||||
newScript->childScript = NULL;
|
||||
@ -245,9 +245,9 @@ Evt* start_script_in_group(EvtSource* source, u8 priority, u8 initialState, u8 g
|
||||
newScript->currentOpcode = 0;
|
||||
newScript->priority = priority;
|
||||
newScript->id = gStaticScriptCounter++;
|
||||
newScript->ptrNextLine = source;
|
||||
newScript->ptrFirstLine = source;
|
||||
newScript->ptrCurrentLine = source;
|
||||
newScript->ptrNextLine = (Bytecode*)source;
|
||||
newScript->ptrFirstLine = (Bytecode*)source;
|
||||
newScript->ptrCurrentLine = (Bytecode*)source;
|
||||
newScript->userData = 0;
|
||||
newScript->blockingParent = 0;
|
||||
newScript->childScript = 0;
|
||||
@ -311,7 +311,7 @@ Evt* start_child_script(Evt* parentScript, EvtSource* source, s32 initialState)
|
||||
parentScript->childScript = child;
|
||||
parentScript->state |= 0x10;
|
||||
child->state = initialState | 1;
|
||||
child->ptrCurrentLine = child->ptrFirstLine = child->ptrNextLine = source;
|
||||
child->ptrCurrentLine = child->ptrFirstLine = child->ptrNextLine = (Bytecode*)source;
|
||||
|
||||
|
||||
child->currentOpcode = 0;
|
||||
@ -630,7 +630,7 @@ s32 does_script_exist_by_ref(Evt* script) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void set_script_priority(Evt* script, s8 priority) {
|
||||
void set_script_priority(Evt* script, s32 priority) {
|
||||
script->priority = priority;
|
||||
}
|
||||
|
||||
@ -646,11 +646,11 @@ f32 get_global_timespace(void) {
|
||||
return gGlobalTimeSpace;
|
||||
}
|
||||
|
||||
void set_script_group(Evt* script, s8 groupFlags) {
|
||||
void set_script_group(Evt* script, s32 groupFlags) {
|
||||
script->groupFlags = groupFlags;
|
||||
}
|
||||
|
||||
Trigger* bind_trigger(Bytecode* script, s32 flags, s32 triggerFlagIndex, s32 triggerVar0, s32 triggerVar1,
|
||||
Trigger* bind_trigger(EvtSource* script, s32 flags, s32 triggerFlagIndex, s32 triggerVar0, s32 triggerVar1,
|
||||
s32 priority, s32 arg6) {
|
||||
Trigger* trigger;
|
||||
TriggerDefinition def;
|
||||
@ -670,7 +670,7 @@ Trigger* bind_trigger(Bytecode* script, s32 flags, s32 triggerFlagIndex, s32 tri
|
||||
return trigger;
|
||||
}
|
||||
|
||||
Trigger* bind_trigger_1(Bytecode* script, s32 flags, s32 triggerFlagIndex, s32 triggerVar0, s32 triggerVar1,
|
||||
Trigger* bind_trigger_1(EvtSource* script, s32 flags, s32 triggerFlagIndex, s32 triggerVar0, s32 triggerVar1,
|
||||
s32 priority) {
|
||||
return bind_trigger(script, flags, triggerFlagIndex, triggerVar0, triggerVar1, priority, 1);
|
||||
}
|
||||
|
188
src/evt/si.c
188
src/evt/si.c
@ -13,6 +13,9 @@ u8 D_802D9D71 = 0xFE;
|
||||
u8 D_802D9D72 = 0x00;
|
||||
u8 D_802D9D73 = 0xFF;
|
||||
|
||||
// BSS
|
||||
extern s8 evtDebugPrintBuffer[];
|
||||
|
||||
f32 fixed_var_to_float(Bytecode scriptVar) {
|
||||
if (scriptVar <= -220000000) {
|
||||
return (scriptVar + 230000000) / 1024.0f;
|
||||
@ -46,7 +49,7 @@ ApiStatus si_handle_loop(Evt* script) {
|
||||
|
||||
ASSERT(loopDepth < 8);
|
||||
|
||||
script->loopStartTable[loopDepth] = args;
|
||||
script->loopStartTable[loopDepth] = (s32)args;
|
||||
script->loopCounterTable[loopDepth] = var;
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
@ -61,7 +64,7 @@ ApiStatus si_handle_end_loop(Evt* script) {
|
||||
loopCounter = script->loopCounterTable[loopDepth];
|
||||
|
||||
if (loopCounter == 0) {
|
||||
script->ptrNextLine = script->loopStartTable[loopDepth];
|
||||
script->ptrNextLine = (Bytecode*)script->loopStartTable[loopDepth];
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
@ -74,7 +77,7 @@ ApiStatus si_handle_end_loop(Evt* script) {
|
||||
}
|
||||
|
||||
if (loopCounter != 0) {
|
||||
script->ptrNextLine = script->loopStartTable[loopDepth];
|
||||
script->ptrNextLine = (Bytecode*)script->loopStartTable[loopDepth];
|
||||
return ApiStatus_DONE2;
|
||||
} else {
|
||||
script->loopDepth--;
|
||||
@ -225,12 +228,13 @@ ApiStatus si_handle_switch(Evt* script) {
|
||||
}
|
||||
|
||||
ApiStatus si_handle_switch_const(Evt* script) {
|
||||
Bytecode* args = *script->ptrReadPos;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 a0 = *args++;
|
||||
s32 switchDepth = ++script->switchDepth;
|
||||
|
||||
ASSERT(switchDepth < 8);
|
||||
|
||||
script->switchBlockValue[switchDepth] = args;
|
||||
script->switchBlockValue[switchDepth] = a0;
|
||||
script->switchBlockState[switchDepth] = 1;
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
@ -657,12 +661,16 @@ ApiStatus si_handle_divideF(Evt* script) {
|
||||
}
|
||||
|
||||
ApiStatus si_handle_set_int_buffer_ptr(Evt* script) {
|
||||
script->buffer = get_variable(script, *script->ptrReadPos);
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
script->buffer = (s32*)get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus si_handle_set_float_buffer_ptr(Evt* script) {
|
||||
script->buffer = get_variable(script, *script->ptrReadPos);
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
script->buffer = (s32*)get_variable(script, *args++);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
@ -829,7 +837,7 @@ ApiStatus si_handle_allocate_array(Evt* script) {
|
||||
s32 size = get_variable(script, *args++);
|
||||
Bytecode var = *args++;
|
||||
|
||||
script->array = (s32)heap_malloc(size * 4);
|
||||
script->array = (s32*)heap_malloc(size * 4);
|
||||
set_variable(script, var, (s32)script->array);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
@ -903,7 +911,7 @@ ApiStatus si_handle_exec1(Evt* script) {
|
||||
Evt* newScript;
|
||||
s32 i;
|
||||
|
||||
newScript = start_script_in_group((Evt*)get_variable(script, *script->ptrReadPos), script->priority, 0,
|
||||
newScript = start_script_in_group((EvtSource*)get_variable(script, *script->ptrReadPos), script->priority, 0,
|
||||
script->groupFlags);
|
||||
|
||||
newScript->owner1 = script->owner1;
|
||||
@ -927,12 +935,12 @@ ApiStatus si_handle_exec1(Evt* script) {
|
||||
|
||||
ApiStatus si_handle_exec1_get_id(Evt* script) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Evt* var = (Evt*)get_variable(script, *args++);
|
||||
EvtSource* evtSource = (EvtSource*)get_variable(script, *args++);
|
||||
Bytecode arg2 = *args++;
|
||||
Evt* newScript;
|
||||
s32 i;
|
||||
|
||||
newScript = start_script_in_group(var, script->priority, 0, script->groupFlags);
|
||||
newScript = start_script_in_group(evtSource, script->priority, 0, script->groupFlags);
|
||||
|
||||
newScript->owner1 = script->owner1;
|
||||
newScript->owner2 = script->owner2;
|
||||
@ -954,19 +962,23 @@ ApiStatus si_handle_exec1_get_id(Evt* script) {
|
||||
}
|
||||
|
||||
ApiStatus si_handle_exec_wait(Evt* script) {
|
||||
start_child_script(script, get_variable(script, *script->ptrReadPos), 0);
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
start_child_script(script, (EvtSource*)get_variable(script, *args++), 0);
|
||||
script->currentOpcode = 0;
|
||||
return ApiStatus_FINISH;
|
||||
}
|
||||
|
||||
ApiStatus si_handle_jump(Evt* script) {
|
||||
script->ptrFirstLine = (Bytecode*)get_variable(script, *script->ptrReadPos);
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
|
||||
script->ptrFirstLine = (Bytecode*)get_variable(script, *args++);
|
||||
restart_script(script);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
s32 _bound_script_trigger_handler(Trigger* trigger) {
|
||||
Bytecode* scriptStart;
|
||||
EvtSource* scriptStart;
|
||||
Evt* script;
|
||||
|
||||
if (trigger->runningScript == NULL) {
|
||||
@ -975,7 +987,7 @@ s32 _bound_script_trigger_handler(Trigger* trigger) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
script = start_script(scriptStart, trigger->priority, 0x20);
|
||||
script = start_script((EvtSource*)scriptStart, trigger->priority, 0x20);
|
||||
trigger->runningScript = script;
|
||||
trigger->runningScriptID = script->id;
|
||||
script->varTable[0] = trigger->scriptVars[0];
|
||||
@ -995,7 +1007,7 @@ s32 _bound_script_trigger_handler(Trigger* trigger) {
|
||||
ApiStatus si_handle_bind(Evt* script) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Trigger* trigger;
|
||||
Bytecode* triggerScript = get_variable(script, *args++);
|
||||
Bytecode* triggerScript = (Bytecode*)get_variable(script, *args++);
|
||||
Bytecode eventType = *args++;
|
||||
Bytecode colliderIDVar = *args++;
|
||||
Bytecode a3 = *args++;
|
||||
@ -1010,7 +1022,7 @@ ApiStatus si_handle_bind(Evt* script) {
|
||||
def.function = _bound_script_trigger_handler;
|
||||
|
||||
trigger = create_trigger(&def);
|
||||
trigger->scriptSource = triggerScript;
|
||||
trigger->scriptSource = (EvtSource*)triggerScript;
|
||||
trigger->runningScript = NULL;
|
||||
trigger->priority = script->priority;
|
||||
trigger->scriptVars[0] = get_variable(script, script->varTable[0]);
|
||||
@ -1018,14 +1030,14 @@ ApiStatus si_handle_bind(Evt* script) {
|
||||
trigger->scriptVars[2] = get_variable(script, script->varTable[2]);
|
||||
|
||||
if (triggerOut != 0) {
|
||||
set_variable(script, triggerOut, trigger);
|
||||
set_variable(script, triggerOut, (s32)trigger);
|
||||
}
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus DeleteTrigger(Evt* script, s32 isInitialCall) {
|
||||
delete_trigger(get_variable(script, *script->ptrReadPos));
|
||||
delete_trigger((Trigger*)get_variable(script, *script->ptrReadPos));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
@ -1113,10 +1125,10 @@ void si_standard_trigger_executor(Trigger* trigger) {
|
||||
ApiStatus si_handle_bind_lock(Evt* script) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Trigger* trigger;
|
||||
Bytecode* triggerScript = get_variable(script, *args++);
|
||||
Bytecode* triggerScript = (Bytecode*)get_variable(script, *args++);
|
||||
Bytecode eventType = *args++;
|
||||
Bytecode colliderIDVar = *args++;
|
||||
s32* itemList = get_variable(script, *args++);
|
||||
s32* itemList = (s32*)get_variable(script, *args++);
|
||||
Bytecode triggerOut = *args++;
|
||||
s32 a5 = *args++;
|
||||
TriggerDefinition def;
|
||||
@ -1130,7 +1142,7 @@ ApiStatus si_handle_bind_lock(Evt* script) {
|
||||
def.inputArg3 = a5;
|
||||
|
||||
trigger = create_trigger(&def);
|
||||
trigger->scriptSource = triggerScript;
|
||||
trigger->scriptSource = (EvtSource*)triggerScript;
|
||||
trigger->runningScript = NULL;
|
||||
trigger->priority = script->priority;
|
||||
trigger->scriptVars[0] = get_variable(script, script->varTable[0]);
|
||||
@ -1161,7 +1173,108 @@ ApiStatus func_802C6E14(Evt* script) {
|
||||
}
|
||||
|
||||
ApiStatus si_handle_print_debug_var(Evt* script);
|
||||
// Almost, some ordering stuff and such
|
||||
#ifdef NON_MATCHING
|
||||
s32 si_handle_print_debug_var(Evt* script) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 var = *args++;
|
||||
s32 phi_t0;
|
||||
|
||||
if (var <= -270000000) {
|
||||
sprintf(&evtDebugPrintBuffer, "ADDR [%08X]", var);
|
||||
} else if (var <= -220000000) {
|
||||
sprintf(&evtDebugPrintBuffer, "FLOAT [%4.2f]", fixed_var_to_float(var));
|
||||
} else if (var <= -200000000) {
|
||||
var += 210000000;
|
||||
phi_t0 = var % 32;
|
||||
sprintf(&evtDebugPrintBuffer, "UF(%3d) [%d]", var, script->flagArray[var / 32] & (1 << phi_t0));
|
||||
} else if (var <= -180000000) {
|
||||
s32 arrayVal;
|
||||
|
||||
var += 190000000;
|
||||
arrayVal = script->array[var];
|
||||
|
||||
if (script->array[var] <= -270000000) {
|
||||
sprintf(&evtDebugPrintBuffer, "UW(%3d) [%08X]", var, arrayVal);
|
||||
} else if (arrayVal <= -220000000) {
|
||||
sprintf(&evtDebugPrintBuffer, "UW(%3d) [%4.2f]", var, fixed_var_to_float(arrayVal));
|
||||
} else {
|
||||
sprintf(&evtDebugPrintBuffer, "UW(%3d) [%d]", var, arrayVal);
|
||||
}
|
||||
} else if (var <= -160000000) {
|
||||
s32 globalByte;
|
||||
|
||||
var += 170000000;
|
||||
globalByte = get_global_byte(var);
|
||||
|
||||
if (globalByte <= -270000000) {
|
||||
sprintf(&evtDebugPrintBuffer, "GSW(%3d) [%08X]", var, globalByte);
|
||||
} else if (globalByte <= -220000000) {
|
||||
sprintf(&evtDebugPrintBuffer, "GSW(%3d) [%4.2f]", var, fixed_var_to_float(globalByte));
|
||||
} else {
|
||||
sprintf(&evtDebugPrintBuffer, "GSW(%3d) [%d]", var, globalByte);
|
||||
}
|
||||
} else if (var <= -140000000) {
|
||||
s32 areaByte;
|
||||
|
||||
var += 150000000;
|
||||
areaByte = get_area_byte(var);
|
||||
|
||||
if (areaByte <= -270000000) {
|
||||
sprintf(&evtDebugPrintBuffer, "LSW(%3d) [%08X]", var, areaByte);
|
||||
} else if (areaByte <= -220000000) {
|
||||
sprintf(&evtDebugPrintBuffer, "LSW(%3d) [%4.2f]", var, fixed_var_to_float(areaByte));
|
||||
} else {
|
||||
sprintf(&evtDebugPrintBuffer, "LSW(%3d) [%d]", var, areaByte);
|
||||
}
|
||||
} else if (var <= -120000000) {
|
||||
var += 130000000;
|
||||
sprintf(&evtDebugPrintBuffer, "GSWF(%3d)[%d]", var, get_global_flag(var));
|
||||
} else if (var <= -100000000) {
|
||||
var += 110000000;
|
||||
sprintf(&evtDebugPrintBuffer, "LSWF(%3d)[%d]", var, get_area_flag(var));
|
||||
} else if (var <= -80000000) {
|
||||
var += 90000000;
|
||||
phi_t0 = var % 32;
|
||||
sprintf(&evtDebugPrintBuffer, "GF(%3d) [%d]", var, gMapFlags[var / 32] & (1 << phi_t0));
|
||||
} else if (var <= -60000000) {
|
||||
var += 70000000;
|
||||
phi_t0 = var % 32;
|
||||
sprintf(&evtDebugPrintBuffer, "LF(%3d) [%d]", var, script->varFlags[var / 32] & (1 << phi_t0));
|
||||
} else if (var <= -40000000) {
|
||||
s32 mapVar;
|
||||
|
||||
var += 50000000;
|
||||
mapVar = gMapVars[var];
|
||||
|
||||
if (mapVar <= -270000000) {
|
||||
sprintf(&evtDebugPrintBuffer, "GW(%3d) [%08X]", var, mapVar);
|
||||
} else if (mapVar <= -220000000) {
|
||||
sprintf(&evtDebugPrintBuffer, "GW(%3d) [%4.2f]", var, fixed_var_to_float(mapVar));
|
||||
} else {
|
||||
sprintf(&evtDebugPrintBuffer, "GW(%3d) [%d]", var, mapVar);
|
||||
}
|
||||
} else if (var <= -20000000) {
|
||||
s32 tableVar;
|
||||
|
||||
var += 30000000;
|
||||
tableVar = script->varTable[var];
|
||||
|
||||
if (tableVar <= -270000000) {
|
||||
sprintf(&evtDebugPrintBuffer, "LW(%3d) [%08X]", var, tableVar);
|
||||
} else if (tableVar <= -220000000) {
|
||||
sprintf(&evtDebugPrintBuffer, "LW(%3d) [%4.2f]", var, fixed_var_to_float(tableVar));
|
||||
} else {
|
||||
sprintf(&evtDebugPrintBuffer, "LW(%3d) [%d]", var, tableVar);
|
||||
}
|
||||
} else {
|
||||
sprintf(&evtDebugPrintBuffer, " [%d]", var);
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
#else
|
||||
INCLUDE_ASM(ApiStatus, "evt/si", si_handle_print_debug_var, Evt* script);
|
||||
#endif
|
||||
|
||||
ApiStatus func_802C739C(Evt* script) {
|
||||
script->ptrSavedPosition = (Bytecode*)*script->ptrReadPos;
|
||||
@ -1840,6 +1953,7 @@ Bytecode* si_goto_next_case(Evt* script) {
|
||||
switch (*opcode) {
|
||||
case EVT_OP_END:
|
||||
PANIC();
|
||||
break;
|
||||
case EVT_OP_MATCH:
|
||||
switchDepth++;
|
||||
break;
|
||||
@ -1863,9 +1977,35 @@ Bytecode* si_goto_next_case(Evt* script) {
|
||||
if (switchDepth == 1) {
|
||||
return opcode;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
} while(1);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(Bytecode*, "evt/si", si_goto_end_loop, Evt* script);
|
||||
Bytecode* si_goto_end_loop(Evt* script) {
|
||||
s32 loopDepth = 0;
|
||||
Bytecode* pos = script->ptrNextLine;
|
||||
s32 opcode;
|
||||
s32 nargs;
|
||||
|
||||
do {
|
||||
opcode = *pos++;
|
||||
nargs = *pos++;
|
||||
pos += nargs;
|
||||
|
||||
switch (opcode) {
|
||||
case EVT_OP_END:
|
||||
PANIC();
|
||||
break;
|
||||
case EVT_OP_END_LOOP:
|
||||
loopDepth--;
|
||||
if (loopDepth < 0) {
|
||||
return pos;
|
||||
}
|
||||
break;
|
||||
case EVT_OP_LOOP:
|
||||
loopDepth++;
|
||||
break;
|
||||
}
|
||||
} while(1);
|
||||
}
|
||||
|
@ -39,9 +39,9 @@ extern void* D_80157F70;
|
||||
extern void* D_80158574;
|
||||
extern void* D_80158580;
|
||||
extern void* D_80158B80;
|
||||
extern void* D_80157964;
|
||||
extern void* D_80158570;
|
||||
extern void* D_80151314;
|
||||
extern s32 D_80157964;
|
||||
extern s32 D_80158570;
|
||||
extern s32 D_80151314;
|
||||
|
||||
INCLUDE_ASM(void, "hud_element", load_hud_element, HudElement* hudElement, const HudElementAnim* anim);
|
||||
|
||||
@ -190,7 +190,7 @@ void set_hud_element_anim(s32 id, const HudElementAnim* anim) {
|
||||
HudElement* hudElement = hudElements[id & ~0x800];
|
||||
|
||||
if (anim == NULL) {
|
||||
anim = hud_element_defaultAnim;
|
||||
anim = &hud_element_defaultAnim;
|
||||
}
|
||||
|
||||
hudElement->updateTimer = 1;
|
||||
@ -198,7 +198,7 @@ void set_hud_element_anim(s32 id, const HudElementAnim* anim) {
|
||||
hudElement->heightScale = 1024;
|
||||
hudElement->readPos = anim;
|
||||
hudElement->anim = anim;
|
||||
hudElement->ptrPropertyList = anim;
|
||||
hudElement->ptrPropertyList = (s32*)anim;
|
||||
hudElement->screenPosOffset.x = 0;
|
||||
hudElement->screenPosOffset.y = 0;
|
||||
hudElement->worldPosOffset.x = 0;
|
||||
@ -328,4 +328,4 @@ INCLUDE_ASM(void, "hud_element", set_hud_element_transform_rotation_pivot, s32 i
|
||||
|
||||
INCLUDE_ASM(void, "hud_element", copy_world_hud_element_ref_to_battle, s32 worldID, s32 battleID);
|
||||
|
||||
INCLUDE_ASM(void, "hud_element", set_hud_element_nonworld_cache, void* base, size_t size);
|
||||
INCLUDE_ASM(void, "hud_element", set_hud_element_nonworld_cache, void* base, s32 size);
|
||||
|
@ -232,6 +232,6 @@ void set_hud_element_transform_rotation_pivot(s32 id, s32 dx, s32 dy);
|
||||
|
||||
void copy_world_hud_element_ref_to_battle(s32 worldID, s32 battleID);
|
||||
|
||||
void set_hud_element_nonworld_cache(void* base, size_t size);
|
||||
void set_hud_element_nonworld_cache(void* base, s32 size);
|
||||
|
||||
#endif
|
||||
|
293
src/trigger.c
Normal file
293
src/trigger.c
Normal file
@ -0,0 +1,293 @@
|
||||
#include "common.h"
|
||||
|
||||
void default_trigger_delegate(Trigger* self) {
|
||||
self->flags.flags |= 2;
|
||||
}
|
||||
|
||||
void clear_trigger_data(void) {
|
||||
CollisionStatus* collisionStatus = &gCollisionStatus;
|
||||
s32 i;
|
||||
|
||||
if (!gGameStatusPtr->isBattle) {
|
||||
gCurrentTriggerListPtr = &wTriggerList;
|
||||
} else {
|
||||
gCurrentTriggerListPtr = &bTriggerList;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(*gCurrentTriggerListPtr); i++) {
|
||||
(*gCurrentTriggerListPtr)[i] = NULL;
|
||||
}
|
||||
|
||||
gTriggerCount = 0;
|
||||
collisionStatus->pushingAgainstWall = -1;
|
||||
collisionStatus->currentFloor = -1;
|
||||
collisionStatus->lastTouchedFloor = -1;
|
||||
collisionStatus->currentCeiling = -1;
|
||||
collisionStatus->unk_0A = -1;
|
||||
collisionStatus->unk_0C = -1;
|
||||
collisionStatus->unk_0E = -1;
|
||||
collisionStatus->unk_10 = -1;
|
||||
collisionStatus->currentWall = -1;
|
||||
collisionStatus->lastWallHammered = -1;
|
||||
collisionStatus->touchingWallTrigger = 0;
|
||||
collisionStatus->bombetteExploded = -1;
|
||||
collisionStatus->bombetteExplosionPos.x = 0.0f;
|
||||
collisionStatus->bombetteExplosionPos.y = 0.0f;
|
||||
collisionStatus->bombetteExplosionPos.z = 0.0f;
|
||||
}
|
||||
|
||||
void init_trigger_list(void) {
|
||||
if (!gGameStatusPtr->isBattle) {
|
||||
gCurrentTriggerListPtr = &wTriggerList;
|
||||
} else {
|
||||
gCurrentTriggerListPtr = &bTriggerList;
|
||||
}
|
||||
|
||||
gTriggerCount = 0;
|
||||
}
|
||||
|
||||
Trigger* create_trigger(TriggerDefinition* def) {
|
||||
Trigger* ret;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(*gCurrentTriggerListPtr); i++) {
|
||||
Trigger* listTrigger = (*gCurrentTriggerListPtr)[i];
|
||||
|
||||
if (listTrigger == NULL) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT(i < ARRAY_COUNT(*gCurrentTriggerListPtr));
|
||||
|
||||
(*gCurrentTriggerListPtr)[i] = ret = heap_malloc(sizeof(*ret));
|
||||
gTriggerCount++;
|
||||
|
||||
ASSERT(ret != NULL);
|
||||
|
||||
ret->flags.flags = def->flags | 1;
|
||||
ret->params1 = def->colliderIndex;
|
||||
ret->params2 = def->flagIndex;
|
||||
ret->unk_28 = def->unk_1C;
|
||||
ret->unk_2C = def->unk_14;
|
||||
ret->unk_30 = def->inputArg3;
|
||||
|
||||
ret->functionHandler = def->function;
|
||||
if (ret->functionHandler == NULL) {
|
||||
ret->functionHandler = default_trigger_delegate;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void update_triggers(void) {
|
||||
CollisionStatus* collisionStatus = &gCollisionStatus;
|
||||
Trigger* listTrigger;
|
||||
s32 i;
|
||||
|
||||
collisionStatus->touchingWallTrigger = 0;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(*gCurrentTriggerListPtr); i++) {
|
||||
listTrigger = (*gCurrentTriggerListPtr)[i];
|
||||
|
||||
if (listTrigger == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!(listTrigger->flags.flags & 1)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 0x10) {
|
||||
listTrigger->flags.flags |= 2;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 0x40) {
|
||||
if (listTrigger->params2 == collisionStatus->currentWall) {
|
||||
func_800E06C0(1);
|
||||
}
|
||||
if (listTrigger->params2 == collisionStatus->pushingAgainstWall) {
|
||||
func_800E06C0(0);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 0x80) {
|
||||
if (listTrigger->params2 != collisionStatus->currentFloor) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 0x80000) {
|
||||
if (listTrigger->params2 != collisionStatus->floorBelow) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 0x100) {
|
||||
if (listTrigger->params2 == collisionStatus->currentWall) {
|
||||
collisionStatus->touchingWallTrigger = 1;
|
||||
}
|
||||
if ((listTrigger->params2 != collisionStatus->unk_0A) || !phys_can_player_interact()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 0x400) {
|
||||
if (listTrigger->params2 != collisionStatus->currentWall) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 0x200) {
|
||||
if (listTrigger->params2 != collisionStatus->lastTouchedFloor) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 0x800) {
|
||||
if ((listTrigger->params2 != collisionStatus->currentFloor) ||
|
||||
!(gGameStatusPtr->pressedButtons & 0x8000) || (gPlayerStatus.flags & 0x2000)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 0x1000) {
|
||||
if (listTrigger->params2 != collisionStatus->lastWallHammered) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 0x40000) {
|
||||
if (listTrigger->params2 != collisionStatus->currentCeiling) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 0x2000) {
|
||||
if (listTrigger->params2 != collisionStatus->unk_0C) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 0x4000) {
|
||||
if (listTrigger->params2 != collisionStatus->unk_0E) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 0x8000) {
|
||||
if (listTrigger->params2 != collisionStatus->unk_10) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 0x100000) {
|
||||
f32* floats;
|
||||
f32 dist;
|
||||
|
||||
if (collisionStatus->bombetteExploded < 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
floats = (f32*)listTrigger->params2;
|
||||
dist = dist3D(floats[0], floats[1], floats[2],
|
||||
collisionStatus->bombetteExplosionPos.x, collisionStatus->bombetteExplosionPos.y,
|
||||
collisionStatus->bombetteExplosionPos.z);
|
||||
|
||||
if ((floats[3] * 0.5f) + 50.0f < dist) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 0x10000 && get_global_flag(listTrigger->params1) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 0x20000 && get_area_flag(listTrigger->params1) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
listTrigger->flags.flags |= 2;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(*gCurrentTriggerListPtr); i++) {
|
||||
listTrigger = (*gCurrentTriggerListPtr)[i];
|
||||
|
||||
if (listTrigger == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 1) {
|
||||
if (listTrigger->flags.flags & 2) {
|
||||
if (listTrigger->functionHandler(listTrigger) == 0) {
|
||||
listTrigger->flags.flags &= ~2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void delete_trigger(Trigger* toDelete) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(*gCurrentTriggerListPtr); i++) {
|
||||
if ((*gCurrentTriggerListPtr)[i] == toDelete) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i < ARRAY_COUNT(*gCurrentTriggerListPtr)) {
|
||||
heap_free((*gCurrentTriggerListPtr)[i]);
|
||||
(*gCurrentTriggerListPtr)[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
s32 is_trigger_bound(Trigger* trigger, EvtSource* script) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(*gCurrentTriggerListPtr); i++) {
|
||||
Trigger* listTrigger = (*gCurrentTriggerListPtr)[i];
|
||||
|
||||
if (listTrigger == NULL || listTrigger == trigger) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (listTrigger->flags.flags & 1) {
|
||||
if (listTrigger->flags.flags & 2) {
|
||||
if (listTrigger->scriptSource == script) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Trigger* get_trigger_by_id(s32 triggerID) {
|
||||
return (*gCurrentTriggerListPtr)[triggerID];
|
||||
}
|
||||
|
||||
/// @returns TRUE if colliderID is bound to an interaction trigger (press A) and the player can use it.
|
||||
s32 should_collider_allow_interact(s32 colliderID) {
|
||||
s32 i;
|
||||
|
||||
if (!phys_can_player_interact()) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(*gCurrentTriggerListPtr); i++) {
|
||||
Trigger* trigger = (*gCurrentTriggerListPtr)[i];
|
||||
|
||||
if (trigger != NULL &&
|
||||
trigger->unk_30 != 0 &&
|
||||
trigger->params2 == colliderID &&
|
||||
trigger->flags.flags & 0x100) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
extern s32 gSpinHistoryBufferPos;
|
||||
extern s32 gSpinHistoryPosY[5];
|
||||
extern s16 gSpinHistoryPosAngle[5];
|
||||
extern s32 D_8015A578;
|
||||
extern struct struct8015A578 D_8015A578;
|
||||
|
||||
typedef struct struct8015A578 {
|
||||
/* 0x00 */ u8 unk_00;
|
||||
@ -11,18 +11,17 @@ typedef struct struct8015A578 {
|
||||
/* 0x08 */ f32 unk_08;
|
||||
} struct8015A578;
|
||||
|
||||
s32 func_802B65F8_E26D08(void);
|
||||
|
||||
void func_802B6000_E26710(void) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
CollisionStatus* collisionStatus = &gCollisionStatus;
|
||||
struct8015A578* tempStruct;
|
||||
struct8015A578* tempStruct2;
|
||||
Entity* currentFloorEntity;
|
||||
f32 temp_f0;
|
||||
f32 temp_f20;
|
||||
s32 temp_v0_2;
|
||||
u8 temp_v1_2;
|
||||
u8 colliderType;
|
||||
f32 phi_f4;
|
||||
s32 sp12;
|
||||
s32 sp10;
|
||||
u32 entityType;
|
||||
|
||||
@ -77,8 +76,7 @@ void func_802B6000_E26710(void) {
|
||||
if (sp10 >= 0 && collisionStatus->currentFloor & 0x4000 ) {
|
||||
entityType = get_entity_type(collisionStatus->currentFloor);
|
||||
if(entityType == 7 || entityType == 8) {
|
||||
currentFloorEntity = get_entity_by_index(collisionStatus->currentFloor);
|
||||
currentFloorEntity->collisionFlags |= 1;
|
||||
get_entity_by_index(collisionStatus->currentFloor)->collisionFlags |= 1;
|
||||
disable_player_input();
|
||||
playerStatus->fallState = 0xB;
|
||||
break;
|
||||
@ -132,19 +130,18 @@ void func_802B6000_E26710(void) {
|
||||
}
|
||||
}
|
||||
|
||||
temp_v1_2 = get_collider_type_by_id(sp10);
|
||||
if (temp_v1_2 == 3) {
|
||||
colliderType = get_collider_type_by_id(sp10);
|
||||
if (colliderType == 3) {
|
||||
playerStatus->unk_BF = 1;
|
||||
playerStatus->flags &= ~0x00020008;
|
||||
set_action_state(ACTION_STATE_HIT_LAVA);
|
||||
playerStatus->flags |= 0x800;
|
||||
return;
|
||||
} else if (temp_v1_2 == 2) {
|
||||
} else if (colliderType == 2) {
|
||||
set_action_state(ACTION_STATE_HIT_LAVA);
|
||||
playerStatus->flags &= ~0x00020008;
|
||||
return;
|
||||
}
|
||||
|
||||
playerStatus->framesOnGround = 8;
|
||||
playerStatus->decorationList = 0;
|
||||
playerStatus->actionState = 0x10;
|
||||
@ -176,16 +173,15 @@ void func_802B6000_E26710(void) {
|
||||
}
|
||||
|
||||
if (playerStatus->gravityIntegrator[0] < 0.0f) {
|
||||
temp_v0_2 = func_802B65F8_E26D08();
|
||||
sp10 = temp_v0_2;
|
||||
if (temp_v0_2 >= 0) {
|
||||
sp10 = func_802B65F8_E26D08();
|
||||
if (sp10 >= 0) {
|
||||
collisionStatus->lastTouchedFloor = -1;
|
||||
collisionStatus->currentFloor = sp10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_802B65F8_E26D08(void) {
|
||||
s32 func_802B65F8_E26D08(void) {
|
||||
f32 sp28;
|
||||
f32 sp2C;
|
||||
f32 sp30;
|
||||
@ -199,5 +195,5 @@ void func_802B65F8_E26D08(void) {
|
||||
sp34 = gPlayerStatus.colliderHeight;
|
||||
sp30 = gPlayerStatus.position.z;
|
||||
sp2C = gPlayerStatus.position.y + (sp34 * 0.5f);
|
||||
player_raycast_below_cam_relative(&gPlayerStatus, &sp28, &sp2C, &sp30, &sp34, &sp38, &sp3C, &sp40, &sp44);
|
||||
return player_raycast_below_cam_relative(&gPlayerStatus, &sp28, &sp2C, &sp30, &sp34, &sp38, &sp3C, &sp40, &sp44);
|
||||
}
|
||||
|
@ -1,283 +0,0 @@
|
||||
import sys
|
||||
from pathlib import Path
|
||||
import re
|
||||
|
||||
RUN_ME = False
|
||||
if not RUN_ME:
|
||||
print(f"Are you sure yo uwant to run this? Edit RUN_ME in the script if so")
|
||||
exit()
|
||||
|
||||
WRITE_FILE = True
|
||||
DO_OVERWRITE = True
|
||||
DO_OVERWRITE_DECOMP = False
|
||||
|
||||
def get_file_name(name):
|
||||
out = ""
|
||||
decomp = False
|
||||
if name:
|
||||
if "matches total" in name:
|
||||
name = name.split(" - ",1)[0]
|
||||
decomp = True
|
||||
if name[3] == "_":
|
||||
name = name[7:]
|
||||
else:
|
||||
name = name.split(" - ",1)[1]
|
||||
if "(decompiled)" in name:
|
||||
decomp = True
|
||||
name = name.split(" ",1)[0]
|
||||
if name[3] == "_":
|
||||
name = name[7:]
|
||||
name = name.strip()
|
||||
out = name
|
||||
return out, decomp
|
||||
|
||||
def find_file_path(looking_for):
|
||||
global map_
|
||||
file_name, decomp = get_file_name(looking_for)
|
||||
file_path = ""
|
||||
if file_name:
|
||||
for i,line in enumerate(map_):
|
||||
if file_name in line:
|
||||
x = i
|
||||
while not map_[x].startswith(" .text"):
|
||||
x -= 1
|
||||
x -= 1
|
||||
file_path = map_[x].split(".o",1)[0].split("build/",1)[1].strip()
|
||||
break
|
||||
if not "src/world/area_" in file_path:
|
||||
file_path = ""
|
||||
return file_name, file_path, decomp
|
||||
|
||||
|
||||
|
||||
map_file = (Path(__file__).parent.parent / "ver" / "current" / "build" / "papermario.map").read_text().splitlines()
|
||||
# cut out half the map
|
||||
map_ = []
|
||||
found_header = False
|
||||
for line in map_file:
|
||||
if line.startswith(".header"):
|
||||
found_header = True
|
||||
if found_header:
|
||||
map_.append(line)
|
||||
|
||||
del map_file
|
||||
|
||||
files = sys.stdin.read().splitlines()
|
||||
|
||||
if not files or "found no matches" in files[0]:
|
||||
print(f"Could not find any matching functions")
|
||||
exit()
|
||||
|
||||
#first get the decomped code
|
||||
function_text = ""
|
||||
|
||||
function, file_path, decomp = find_file_path(files[0])
|
||||
if decomp and file_path != "":
|
||||
file_path = (Path(__file__).parent.parent / file_path).resolve()
|
||||
func_file = file_path.read_text().splitlines()
|
||||
for i,line in enumerate(func_file):
|
||||
if line:
|
||||
line = line.strip()
|
||||
split_line = line.split(" ")
|
||||
if len(split_line) > 2 and function in split_line[1] and (split_line[0] == "void" or split_line[0] == "s32" or split_line[0] == "ApiStatus"):
|
||||
out = ["/*"]
|
||||
while not func_file[i].startswith("}"):
|
||||
out.append(func_file[i])
|
||||
i += 1
|
||||
out.append("}")
|
||||
out.append("*/")
|
||||
|
||||
func_name_start = out[1].find("N(")
|
||||
func_name_end = out[1].find(")")
|
||||
out[1] = out[1][:func_name_start+2] + out[1][func_name_end:]
|
||||
|
||||
function_text = "\n".join(out)
|
||||
|
||||
if function_text == "":
|
||||
print(f"Unable to find a decompiled function to copy code from")
|
||||
exit()
|
||||
|
||||
for file in files[1:]:
|
||||
if not file:
|
||||
continue
|
||||
function, file_path, decomp = find_file_path(file)
|
||||
|
||||
if file_path == "":
|
||||
continue
|
||||
|
||||
if not function:
|
||||
print(f"Failed to find {file}")
|
||||
continue
|
||||
|
||||
if function[3] == "_" and function[6] == "_" and function.startswith(Path(file_path).parts[3]):
|
||||
function = function[len("xxx_yy_"):]
|
||||
|
||||
print(f"Func:\"{function}\" path:\"{file_path}\" Decomped: {decomp}")
|
||||
|
||||
asm_path = Path(__file__).parent.parent / "ver" / "us" / "asm" / "nonmatchings"
|
||||
fixed = list(Path(file_path).parts[1:])
|
||||
fixed[-1] = fixed[-1][:-2]
|
||||
asm_path = asm_path / "/".join(fixed) / function
|
||||
asm_path = asm_path.with_suffix(".s")
|
||||
|
||||
file_path = (Path(__file__).parent.parent / file_path).resolve()
|
||||
|
||||
# don't want to try and replace already-decompiled functions
|
||||
if decomp and not DO_OVERWRITE:
|
||||
print(f"{file_path} already has this function decompiled and not overwriting")
|
||||
continue
|
||||
|
||||
func_file = file_path.read_text().splitlines()
|
||||
new_func_file = []
|
||||
i = 0
|
||||
while i < len(func_file):
|
||||
line = func_file[i]
|
||||
if line:
|
||||
stripped_line = line.strip()
|
||||
split_line = stripped_line.split(" ")
|
||||
|
||||
if DO_OVERWRITE_DECOMP and decomp and len(split_line) > 2 and decomp and function in split_line[1]:
|
||||
if DO_OVERWRITE:
|
||||
x = i
|
||||
while not (func_file[x] == "}"):
|
||||
x += 1
|
||||
x += 1
|
||||
|
||||
old_data_name = ""
|
||||
new_data_name = ""
|
||||
|
||||
#if "ptr" in func_file[i+1]:
|
||||
# new_func_data = function_text.splitlines()[1:-1]
|
||||
# old_data_name = new_func_data[3].split("if (",1)[1].split(" == ",1)[0]
|
||||
# new_data_name = func_file[i+1].split(" = ",1)[1][1:-1]
|
||||
|
||||
func_data = function_text.replace(old_data_name, new_data_name)
|
||||
|
||||
func_data = func_data.splitlines()[1:-1]
|
||||
func_data[0] = func_data[0].replace("N()", f"N({function})")
|
||||
new_func_file.append("\n".join(func_data))
|
||||
|
||||
i = x-1
|
||||
#print("\n".join(temp))
|
||||
#print()
|
||||
else:
|
||||
new_func_file.append(line)
|
||||
|
||||
elif len(split_line) > 2 and "INCLUDE_ASM" in split_line[0] and function in split_line[2] and ((i+1 < len(func_file) and "/*" not in func_file[i+1] and not func_file[i+1].startswith("#endif")) or (i+1 == len(func_file))):
|
||||
func_data = function_text.splitlines()
|
||||
|
||||
'''
|
||||
if asm_path.is_file():
|
||||
asm_data = asm_path.read_text().splitlines()
|
||||
for asm_line in asm_data:
|
||||
if "lui" in asm_line and "ldc1" in asm_data[x+1] and asm_line.count("_") == 2:
|
||||
new_data_name = asm_line.split(" ")[-1]
|
||||
break
|
||||
else:
|
||||
print(f"Failed to find new data name")
|
||||
exit()
|
||||
|
||||
old_data_name = "N(" + func_data[8].split("N(",1)[1].split(")",1)[0] + ")"
|
||||
func_data = function_text.replace(old_data_name, "N(" + new_data_name + ")").splitlines()
|
||||
'''
|
||||
'''
|
||||
if asm_path.is_file():
|
||||
asm_data = asm_path.read_text().splitlines()
|
||||
for x,asm_line in enumerate(asm_data):
|
||||
if "lui" in asm_line and "addiu" in asm_data[x+1] and "D_" in asm_line and asm_line.count("_") == 1:
|
||||
new_data_name1 = asm_line.split("(",1)[1].split(")",1)[0]
|
||||
elif "lui" in asm_line and "sw" in asm_data[x+1] and "D_" in asm_line and asm_line.count("_") == 1:
|
||||
new_data_name2 = asm_line.split("(",1)[1].split(")",1)[0]
|
||||
break
|
||||
else:
|
||||
print(f"Failed to find new data name")
|
||||
exit()
|
||||
|
||||
old_data_name1 = func_data[5].split("N(",1)[1].split(")",1)[0]
|
||||
old_data_name2 = func_data[8].split("N(",1)[1].split(")",1)[0]
|
||||
|
||||
ft2 = function_text
|
||||
ft2 = ft2.replace("N(" + old_data_name1 + ")", old_data_name1)
|
||||
ft2 = ft2.replace("N(" + old_data_name2 + ")", old_data_name2)
|
||||
ft2 = ft2.replace(old_data_name1, "N(" + new_data_name1 + ")")
|
||||
func_data = ft2.replace(old_data_name2, "N(" + new_data_name2 + ")").splitlines()
|
||||
'''
|
||||
|
||||
new_func_file.append(stripped_line)
|
||||
func_data[1] = func_data[1].replace("N()", f"N({function})")
|
||||
new_func_file.append("\n".join(func_data))
|
||||
|
||||
#print("\n".join(func_data))
|
||||
#print()
|
||||
|
||||
elif len(split_line) > 2 and "INCLUDE_ASM" in split_line[0] and function in split_line[2] and func_file[i+1].startswith("#endif"):
|
||||
if DO_OVERWRITE:
|
||||
#a NON_MATCHING func
|
||||
x = i
|
||||
while not func_file[x].startswith("#ifdef NON_MATCHING"):
|
||||
x -= 1
|
||||
# strip away lines already added
|
||||
new_func_file = new_func_file[:x]
|
||||
new_func_file.append(stripped_line)
|
||||
func_data = function_text.splitlines()
|
||||
func_data[1] = func_data[1].replace("N()", f"N({function})")
|
||||
new_func_file.append("\n".join(func_data))
|
||||
i += 1
|
||||
else:
|
||||
new_func_file.append(line)
|
||||
|
||||
elif len(split_line) > 2 and "INCLUDE_ASM" in split_line[0] and function in split_line[2] and i+1 < len(func_file) and "/*" in func_file[i+1]:
|
||||
if DO_OVERWRITE:
|
||||
while not (func_file[i] == "}" and func_file[i+1] == "*/"):
|
||||
i += 1
|
||||
i += 1
|
||||
|
||||
func_data = function_text.splitlines()
|
||||
|
||||
'''
|
||||
if asm_path.is_file():
|
||||
#print(f"Reading asm file {asm_path}")
|
||||
asm_data = asm_path.read_text().splitlines()
|
||||
for x,asm_line in enumerate(asm_data):
|
||||
if "lui" in asm_line and "addu" in asm_data[x+1] and "D_" in asm_line and asm_line.count("_") == 2:
|
||||
new_data_name1 = asm_line.split("(",1)[1].split(")",1)[0]
|
||||
break
|
||||
else:
|
||||
print(f"Failed to find new data name")
|
||||
exit()
|
||||
|
||||
#print(func_data[5])
|
||||
|
||||
old_data_name1 = func_data[5].split("N(",1)[1].split(")",1)[0]
|
||||
|
||||
ft2 = function_text
|
||||
ft2 = ft2.replace("N(" + old_data_name1 + ")", old_data_name1)
|
||||
func_data = ft2.replace(old_data_name1, "N(" + new_data_name1 + ")").splitlines()
|
||||
'''
|
||||
|
||||
new_func_file.append(stripped_line)
|
||||
func_data[1] = func_data[1].replace("N()", f"N({function})")
|
||||
new_func_file.append("\n".join(func_data))
|
||||
|
||||
#print("\n".join(func_data))
|
||||
#print()
|
||||
else:
|
||||
print(f"{file_path} already has this function commented out")
|
||||
new_func_file.append(line)
|
||||
else:
|
||||
new_func_file.append(line)
|
||||
else:
|
||||
new_func_file.append(line)
|
||||
i += 1
|
||||
|
||||
if new_func_file[-1] != "":
|
||||
new_func_file.append("")
|
||||
|
||||
#print("===========")
|
||||
#print(f"Altering {file_path}")
|
||||
#print("\n".join(new_func_file))
|
||||
#print("===========")
|
||||
if WRITE_FILE:
|
||||
file_path.write_text("\n".join(new_func_file))
|
||||
#if "dro_02" in str(file_path):
|
||||
# exit()
|
@ -1,18 +0,0 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
def qc(words_string):
|
||||
words = words_string.split(",")
|
||||
byte_array = b""
|
||||
for word in words:
|
||||
data = word.strip()[2:]
|
||||
byte_array += bytearray.fromhex(data)
|
||||
strings = byte_array.split(b"\0")
|
||||
|
||||
idx = 0
|
||||
for string in strings:
|
||||
if len(string) > 0:
|
||||
dec = string.decode("ascii")
|
||||
print(f"static char* N(exit_str_{idx}) = \"{dec}\";")
|
||||
idx += 1
|
||||
|
||||
qc("0x6D61635F, 0x30310000, 0x00000000, 0x00000000")
|
@ -1,54 +0,0 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import argparse
|
||||
from collections import OrderedDict
|
||||
import os
|
||||
import re
|
||||
import pickle
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
root_dir = script_dir + "/../"
|
||||
src_dir = root_dir + "src/world/"
|
||||
asm_dir = root_dir + "ver/current/asm/nonmatchings/world/"
|
||||
|
||||
|
||||
def sub_func(match):
|
||||
m_str = match.group()
|
||||
m_str_split = m_str.split(", ")
|
||||
func_name = m_str_split[-1][:-2]
|
||||
|
||||
path_elems = m_str_split[-2].split("/")[1:]
|
||||
|
||||
asmd = os.path.join(asm_dir, path_elems[0], path_elems[1], path_elems[2][:-1])
|
||||
|
||||
for root, dirs, files in os.walk(asmd):
|
||||
for f_name in files:
|
||||
f_name = f_name[:-2]
|
||||
if f_name.startswith(func_name) and len(f_name) > len(func_name):
|
||||
return m_str.replace(func_name, f_name)
|
||||
return m_str
|
||||
|
||||
|
||||
for root, dirs, files in os.walk(src_dir):
|
||||
for f_name in files:
|
||||
if f_name.endswith(".c"):
|
||||
f_path = os.path.join(root, f_name)
|
||||
area_name = Path(f_path).parent.name
|
||||
with open(f_path) as f:
|
||||
f_text_orig = f.readlines()
|
||||
|
||||
f_text = []
|
||||
|
||||
if f_name == "DF6A20.c":
|
||||
dog = 5
|
||||
|
||||
for line in f_text_orig:
|
||||
new_line = re.sub(r"INCLUDE_ASM.*\);", sub_func, line)
|
||||
f_text.append(new_line)
|
||||
|
||||
if f_text != f_text_orig:
|
||||
with open(f_path, "w", newline="\n") as f:
|
||||
f.writelines(f_text)
|
||||
|
@ -27,7 +27,7 @@ def get_c_file(directory):
|
||||
def import_c_file(in_file):
|
||||
in_file = os.path.relpath(in_file, root_dir)
|
||||
cpp_command = ["gcc", "-E", "-P", "-Iinclude", "-Isrc", "-Iver/current/build/include" ,"-D_LANGUAGE_C",
|
||||
"-ffreestanding", "-DF3DEX_GBI_2", "-DSCRIPT(...)={}", in_file]
|
||||
"-ffreestanding", "-DF3DEX_GBI_2", "-D_MIPS_SZLONG=32", "-DSCRIPT(...)={}", in_file]
|
||||
try:
|
||||
return subprocess.check_output(cpp_command, cwd=root_dir, encoding="utf-8")
|
||||
except subprocess.CalledProcessError:
|
||||
|
@ -1,76 +0,0 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import argparse
|
||||
from collections import OrderedDict
|
||||
import os
|
||||
import re
|
||||
import pickle
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
root_dir = script_dir + "/../"
|
||||
src_dir = root_dir + "src/world/"
|
||||
asm_dir = root_dir + "ver/current/asm/nonmatchings/world/"
|
||||
|
||||
if len(sys.argv) <= 1 or not (sys.argv[1] == "y" or sys.argv[1] == "-y"):
|
||||
print(f"Warning! This script is destructive, pass -y if you really want to run it")
|
||||
exit()
|
||||
|
||||
for root, dirs, files in os.walk(src_dir):
|
||||
for dir_name in dirs:
|
||||
dir_path = os.path.join(root, dir_name)
|
||||
map_name = Path(dir_path).parent.name
|
||||
if map_name.startswith("area_"):
|
||||
common_funcs = []
|
||||
|
||||
for c_file in os.scandir(dir_path):
|
||||
if c_file.name.endswith(".c"):
|
||||
with open(c_file) as f:
|
||||
c_lines = f.readlines()
|
||||
for line in c_lines:
|
||||
if "world/common" in line:
|
||||
common_funcs.append(line.split("/")[-1].split(".")[0])
|
||||
|
||||
header_name = dir_name + ".h"
|
||||
guard_name = f"_{dir_name.upper()}_"
|
||||
|
||||
out_lines = []
|
||||
# out_lines.append(f"#ifndef {guard_name}")
|
||||
# out_lines.append(f"#define {guard_name}")
|
||||
# out_lines.append("")
|
||||
out_lines.append("#include \"common.h\"")
|
||||
out_lines.append("#include \"map.h\"")
|
||||
out_lines.append("")
|
||||
out_lines.append(f"#define NAMESPACE {dir_name}")
|
||||
out_lines.append("")
|
||||
|
||||
# if len(common_funcs) > 0:
|
||||
# for func_name in common_funcs:
|
||||
# out_lines.append(f"#include \"world/common/{func_name}.h\"")
|
||||
# out_lines.append("#endif")
|
||||
# out_lines.append("")
|
||||
|
||||
with open(os.path.join(dir_path, header_name), "w", newline="\n") as f:
|
||||
f.write("\n".join(out_lines))
|
||||
|
||||
# for root, dirs, files in os.walk(src_dir):
|
||||
# for f_name in files:
|
||||
# if f_name.endswith(".c"):
|
||||
# f_path = os.path.join(root, f_name)
|
||||
# area_name = Path(f_path).parent.name
|
||||
# with open(f_path) as f:
|
||||
# f_text_orig = f.readlines()
|
||||
|
||||
# f_text = []
|
||||
# f_text.append(f"#include \"{area_name}.h\"\n")
|
||||
|
||||
# for line in f_text_orig:
|
||||
# if not line.startswith("#include") or line.startswith("#include \"world"):
|
||||
# f_text.append(line)
|
||||
# #new_line = re.sub(r"INCLUDE_ASM.*\);", sub_func, line)
|
||||
|
||||
# if f_text != f_text_orig:
|
||||
# with open(f_path, "w", newline="\n") as f:
|
||||
# f.writelines(f_text)
|
||||
|
@ -1,136 +0,0 @@
|
||||
from pathlib import Path
|
||||
|
||||
RUN_ME = False
|
||||
if not RUN_ME:
|
||||
print(f"Are you sure yo uwant to run this? Edit RUN_ME in the script if so")
|
||||
exit()
|
||||
|
||||
FUNC=""" Enemy* enemy = script->owner1.enemy;
|
||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
||||
|
||||
npc->duration--;
|
||||
if (npc->duration <= 0) {
|
||||
enemy->varTable[2] = 0;
|
||||
npc->duration = 0;
|
||||
script->functionTemp[0] = 0;
|
||||
}
|
||||
}""".splitlines()
|
||||
|
||||
NEW_FUNC_NAME = f"UnkFunc45"
|
||||
NEW_INCLUDE = f"#include \"world/common/{NEW_FUNC_NAME}.inc.c\""
|
||||
|
||||
RENAMED = []
|
||||
def parse_folder(path):
|
||||
for entry in path.iterdir():
|
||||
if entry.is_dir():
|
||||
parse_folder(entry)
|
||||
continue
|
||||
|
||||
if not "area" in str(entry):
|
||||
continue
|
||||
|
||||
area_name = entry.parts[3]
|
||||
fd = entry.read_text().splitlines()
|
||||
|
||||
i = 0
|
||||
while i < len(fd):
|
||||
if (#i+2 < len(fd) and
|
||||
fd[i].startswith("INCLUDE_ASM") or
|
||||
fd[i].startswith("ApiStatus N(") or
|
||||
fd[i].startswith("void N(")):
|
||||
#and fd[i+1] == "/*"):
|
||||
if fd[i].startswith("INCLUDE_ASM"):
|
||||
base_fd = i+3
|
||||
base_name = i+2
|
||||
elif fd[i].startswith("ApiStatus N(") or fd[i].startswith("void N("):
|
||||
base_fd = i+1
|
||||
base_name = i
|
||||
|
||||
if len(fd[base_fd:]) < len(FUNC):
|
||||
i += 1
|
||||
continue
|
||||
|
||||
#print(f"Starting from {fd[base_fd]}")
|
||||
|
||||
for func, test in zip(fd[base_fd:], FUNC):
|
||||
if func != test:
|
||||
break
|
||||
else:
|
||||
print(f"Found a match in {entry}: {fd[i]}")
|
||||
#print("\n".join(fd[i:i+3+len(FUNC)+1]))
|
||||
#print("\n".join(fd))
|
||||
|
||||
include_path = Path("src/world/common/") / (NEW_FUNC_NAME + ".inc.c")
|
||||
if not include_path.is_file():
|
||||
name_start = fd[base_name].find("N(")
|
||||
name_end = fd[base_name].find("(",name_start+2)
|
||||
new_file_name = fd[base_name][:name_start] + "N(" + NEW_FUNC_NAME + ")" + fd[base_name][name_end:]
|
||||
|
||||
new_fd = ["#include \"common.h\"",
|
||||
"#include \"map.h\"",
|
||||
"",
|
||||
new_file_name,
|
||||
]
|
||||
new_fd.extend(FUNC)
|
||||
include_path.write_text("\n".join(new_fd))
|
||||
|
||||
if fd[i].startswith("INCLUDE_ASM"):
|
||||
old_func_name = fd[i].split(",")[2].strip().replace(");", "")
|
||||
else:
|
||||
old_func_name = fd[i].split("N(",1)[1].split(")",1)[0]
|
||||
|
||||
RENAMED.append({"name":old_func_name, "area":area_name})
|
||||
|
||||
fd = fd[:i] + [NEW_INCLUDE] + fd[base_fd+len(FUNC)+1:]
|
||||
|
||||
if i+1 < len(fd) and fd[i+1] != "":
|
||||
fd = fd[:i+1] + [""] + fd[i+1:]
|
||||
|
||||
if fd[-1] != "":
|
||||
fd.append("")
|
||||
|
||||
#print("\n".join(fd))
|
||||
|
||||
entry.write_text("\n".join(fd))
|
||||
|
||||
break
|
||||
|
||||
i += 1
|
||||
|
||||
parse_folder(Path("src/world"))
|
||||
|
||||
def do_renames_asm(path):
|
||||
for entry in path.iterdir():
|
||||
if entry.is_dir():
|
||||
do_renames_asm(entry)
|
||||
continue
|
||||
|
||||
fd = entry.read_text()
|
||||
for rename in RENAMED:
|
||||
if rename["name"] in fd:
|
||||
fd = fd.replace(rename["name"], f"{rename['area']}_{NEW_FUNC_NAME}")
|
||||
entry.write_text(fd)
|
||||
do_renames_asm(Path("ver/us/asm"))
|
||||
|
||||
def do_renames_src(path):
|
||||
for entry in path.iterdir():
|
||||
if entry.is_dir():
|
||||
do_renames_src(entry)
|
||||
continue
|
||||
|
||||
fd = entry.read_text().splitlines()
|
||||
i = 0
|
||||
renamed = False
|
||||
while i < len(fd):
|
||||
for rename in RENAMED:
|
||||
start = fd[i].find(rename["name"])
|
||||
if start > -1:
|
||||
renamed = True
|
||||
if fd[i][start-1] == "(":
|
||||
fd[i] = fd[i].replace(rename["name"], f"{NEW_FUNC_NAME}")
|
||||
else:
|
||||
fd[i] = fd[i].replace(rename["name"], f"N({NEW_FUNC_NAME})")
|
||||
i += 1
|
||||
if renamed:
|
||||
entry.write_text("\n".join(fd))
|
||||
do_renames_src(Path("src/world"))
|
@ -1,43 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_802380E4_6F11C4
|
||||
/* 6F11C4 802380E4 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 6F11C8 802380E8 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 6F11CC 802380EC 0080882D */ daddu $s1, $a0, $zero
|
||||
/* 6F11D0 802380F0 AFBF0018 */ sw $ra, 0x18($sp)
|
||||
/* 6F11D4 802380F4 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 6F11D8 802380F8 0C09A75B */ jal get_actor
|
||||
/* 6F11DC 802380FC 8E240148 */ lw $a0, 0x148($s1)
|
||||
/* 6F11E0 80238100 0C09A75B */ jal get_actor
|
||||
/* 6F11E4 80238104 84440428 */ lh $a0, 0x428($v0)
|
||||
/* 6F11E8 80238108 24030063 */ addiu $v1, $zero, 0x63
|
||||
/* 6F11EC 8023810C 3C108024 */ lui $s0, %hi(D_8023BB98_6ECC78)
|
||||
/* 6F11F0 80238110 2610BB98 */ addiu $s0, $s0, %lo(D_8023BB98_6ECC78)
|
||||
/* 6F11F4 80238114 AE230084 */ sw $v1, 0x84($s1)
|
||||
/* 6F11F8 80238118 8C420008 */ lw $v0, 8($v0)
|
||||
/* 6F11FC 8023811C 8E030000 */ lw $v1, ($s0)
|
||||
/* 6F1200 80238120 9042001E */ lbu $v0, 0x1e($v0)
|
||||
/* 6F1204 80238124 00620018 */ mult $v1, $v0
|
||||
/* 6F1208 80238128 00001812 */ mflo $v1
|
||||
/* 6F120C 8023812C 3C0251EB */ lui $v0, 0x51eb
|
||||
/* 6F1210 80238130 3442851F */ ori $v0, $v0, 0x851f
|
||||
/* 6F1214 80238134 00620018 */ mult $v1, $v0
|
||||
/* 6F1218 80238138 24040064 */ addiu $a0, $zero, 0x64
|
||||
/* 6F121C 8023813C 00031FC3 */ sra $v1, $v1, 0x1f
|
||||
/* 6F1220 80238140 00003010 */ mfhi $a2
|
||||
/* 6F1224 80238144 00061143 */ sra $v0, $a2, 5
|
||||
/* 6F1228 80238148 00431023 */ subu $v0, $v0, $v1
|
||||
/* 6F122C 8023814C 0C00A67F */ jal rand_int
|
||||
/* 6F1230 80238150 AE020000 */ sw $v0, ($s0)
|
||||
/* 6F1234 80238154 8E030000 */ lw $v1, ($s0)
|
||||
/* 6F1238 80238158 0062182A */ slt $v1, $v1, $v0
|
||||
/* 6F123C 8023815C 54600001 */ bnel $v1, $zero, .L80238164
|
||||
/* 6F1240 80238160 AE200084 */ sw $zero, 0x84($s1)
|
||||
.L80238164:
|
||||
/* 6F1244 80238164 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 6F1248 80238168 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 6F124C 8023816C 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 6F1250 80238170 24020002 */ addiu $v0, $zero, 2
|
||||
/* 6F1254 80238174 03E00008 */ jr $ra
|
||||
/* 6F1258 80238178 27BD0020 */ addiu $sp, $sp, 0x20
|
@ -1,46 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_80238028_714D18
|
||||
/* 714D18 80238028 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 714D1C 8023802C AFBF0018 */ sw $ra, 0x18($sp)
|
||||
/* 714D20 80238030 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 714D24 80238034 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 714D28 80238038 0C09A75B */ jal get_actor
|
||||
/* 714D2C 8023803C 8C840148 */ lw $a0, 0x148($a0)
|
||||
/* 714D30 80238040 3C108024 */ lui $s0, %hi(D_802382F8_714FE8)
|
||||
/* 714D34 80238044 261082F8 */ addiu $s0, $s0, %lo(D_802382F8_714FE8)
|
||||
/* 714D38 80238048 8E030000 */ lw $v1, ($s0)
|
||||
/* 714D3C 8023804C 0040882D */ daddu $s1, $v0, $zero
|
||||
/* 714D40 80238050 24630012 */ addiu $v1, $v1, 0x12
|
||||
/* 714D44 80238054 44836000 */ mtc1 $v1, $f12
|
||||
/* 714D48 80238058 00000000 */ nop
|
||||
/* 714D4C 8023805C 46806320 */ cvt.s.w $f12, $f12
|
||||
/* 714D50 80238060 0C00A6C9 */ jal clamp_angle
|
||||
/* 714D54 80238064 AE030000 */ sw $v1, ($s0)
|
||||
/* 714D58 80238068 4600008D */ trunc.w.s $f2, $f0
|
||||
/* 714D5C 8023806C 44021000 */ mfc1 $v0, $f2
|
||||
/* 714D60 80238070 3C0140C9 */ lui $at, 0x40c9
|
||||
/* 714D64 80238074 34210FD0 */ ori $at, $at, 0xfd0
|
||||
/* 714D68 80238078 44810000 */ mtc1 $at, $f0
|
||||
/* 714D6C 8023807C 44826000 */ mtc1 $v0, $f12
|
||||
/* 714D70 80238080 00000000 */ nop
|
||||
/* 714D74 80238084 46806320 */ cvt.s.w $f12, $f12
|
||||
/* 714D78 80238088 46006302 */ mul.s $f12, $f12, $f0
|
||||
/* 714D7C 8023808C 00000000 */ nop
|
||||
/* 714D80 80238090 3C0143B4 */ lui $at, 0x43b4
|
||||
/* 714D84 80238094 44810000 */ mtc1 $at, $f0
|
||||
/* 714D88 80238098 AE020000 */ sw $v0, ($s0)
|
||||
/* 714D8C 8023809C 0C00A85B */ jal sin_rad
|
||||
/* 714D90 802380A0 46006303 */ div.s $f12, $f12, $f0
|
||||
/* 714D94 802380A4 46000000 */ add.s $f0, $f0, $f0
|
||||
/* 714D98 802380A8 4600008D */ trunc.w.s $f2, $f0
|
||||
/* 714D9C 802380AC 44031000 */ mfc1 $v1, $f2
|
||||
/* 714DA0 802380B0 00000000 */ nop
|
||||
/* 714DA4 802380B4 A223019A */ sb $v1, 0x19a($s1)
|
||||
/* 714DA8 802380B8 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 714DAC 802380BC 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 714DB0 802380C0 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 714DB4 802380C4 24020002 */ addiu $v0, $zero, 2
|
||||
/* 714DB8 802380C8 03E00008 */ jr $ra
|
||||
/* 714DBC 802380CC 27BD0020 */ addiu $sp, $sp, 0x20
|
@ -1,72 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel create_trigger
|
||||
/* DBE6C 8014576C 3C038016 */ lui $v1, %hi(gCurrentTriggerListPtr)
|
||||
/* DBE70 80145770 8C639390 */ lw $v1, %lo(gCurrentTriggerListPtr)($v1)
|
||||
/* DBE74 80145774 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* DBE78 80145778 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* DBE7C 8014577C 0080882D */ daddu $s1, $a0, $zero
|
||||
/* DBE80 80145780 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* DBE84 80145784 0000802D */ daddu $s0, $zero, $zero
|
||||
/* DBE88 80145788 AFBF0018 */ sw $ra, 0x18($sp)
|
||||
.L8014578C:
|
||||
/* DBE8C 8014578C 8C620000 */ lw $v0, ($v1)
|
||||
/* DBE90 80145790 10400006 */ beqz $v0, .L801457AC
|
||||
/* DBE94 80145794 2A020040 */ slti $v0, $s0, 0x40
|
||||
/* DBE98 80145798 26100001 */ addiu $s0, $s0, 1
|
||||
/* DBE9C 8014579C 2A020040 */ slti $v0, $s0, 0x40
|
||||
/* DBEA0 801457A0 1440FFFA */ bnez $v0, .L8014578C
|
||||
/* DBEA4 801457A4 24630004 */ addiu $v1, $v1, 4
|
||||
/* DBEA8 801457A8 2A020040 */ slti $v0, $s0, 0x40
|
||||
.L801457AC:
|
||||
/* DBEAC 801457AC 14400003 */ bnez $v0, .L801457BC
|
||||
/* DBEB0 801457B0 00000000 */ nop
|
||||
.L801457B4:
|
||||
/* DBEB4 801457B4 080515ED */ j .L801457B4
|
||||
/* DBEB8 801457B8 00000000 */ nop
|
||||
.L801457BC:
|
||||
/* DBEBC 801457BC 0C00AB39 */ jal heap_malloc
|
||||
/* DBEC0 801457C0 24040038 */ addiu $a0, $zero, 0x38
|
||||
/* DBEC4 801457C4 00102080 */ sll $a0, $s0, 2
|
||||
/* DBEC8 801457C8 3C038016 */ lui $v1, %hi(gCurrentTriggerListPtr)
|
||||
/* DBECC 801457CC 8C639390 */ lw $v1, %lo(gCurrentTriggerListPtr)($v1)
|
||||
/* DBED0 801457D0 3C058015 */ lui $a1, %hi(gTriggerCount)
|
||||
/* DBED4 801457D4 24A51334 */ addiu $a1, $a1, %lo(gTriggerCount)
|
||||
/* DBED8 801457D8 00832021 */ addu $a0, $a0, $v1
|
||||
/* DBEDC 801457DC 94A30000 */ lhu $v1, ($a1)
|
||||
/* DBEE0 801457E0 0040302D */ daddu $a2, $v0, $zero
|
||||
/* DBEE4 801457E4 AC860000 */ sw $a2, ($a0)
|
||||
/* DBEE8 801457E8 24630001 */ addiu $v1, $v1, 1
|
||||
/* DBEEC 801457EC 14C00003 */ bnez $a2, .L801457FC
|
||||
/* DBEF0 801457F0 A4A30000 */ sh $v1, ($a1)
|
||||
.L801457F4:
|
||||
/* DBEF4 801457F4 080515FD */ j .L801457F4
|
||||
/* DBEF8 801457F8 00000000 */ nop
|
||||
.L801457FC:
|
||||
/* DBEFC 801457FC 8E220000 */ lw $v0, ($s1)
|
||||
/* DBF00 80145800 34420001 */ ori $v0, $v0, 1
|
||||
/* DBF04 80145804 ACC20000 */ sw $v0, ($a2)
|
||||
/* DBF08 80145808 86220004 */ lh $v0, 4($s1)
|
||||
/* DBF0C 8014580C ACC20004 */ sw $v0, 4($a2)
|
||||
/* DBF10 80145810 8E220008 */ lw $v0, 8($s1)
|
||||
/* DBF14 80145814 ACC20008 */ sw $v0, 8($a2)
|
||||
/* DBF18 80145818 8E22001C */ lw $v0, 0x1c($s1)
|
||||
/* DBF1C 8014581C ACC20028 */ sw $v0, 0x28($a2)
|
||||
/* DBF20 80145820 8E220014 */ lw $v0, 0x14($s1)
|
||||
/* DBF24 80145824 ACC2002C */ sw $v0, 0x2c($a2)
|
||||
/* DBF28 80145828 9222001B */ lbu $v0, 0x1b($s1)
|
||||
/* DBF2C 8014582C A0C20030 */ sb $v0, 0x30($a2)
|
||||
/* DBF30 80145830 8E22000C */ lw $v0, 0xc($s1)
|
||||
/* DBF34 80145834 14400004 */ bnez $v0, .L80145848
|
||||
/* DBF38 80145838 ACC2000C */ sw $v0, 0xc($a2)
|
||||
/* DBF3C 8014583C 3C028014 */ lui $v0, %hi(default_trigger_delegate)
|
||||
/* DBF40 80145840 24425670 */ addiu $v0, $v0, %lo(default_trigger_delegate)
|
||||
/* DBF44 80145844 ACC2000C */ sw $v0, 0xc($a2)
|
||||
.L80145848:
|
||||
/* DBF48 80145848 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* DBF4C 8014584C 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* DBF50 80145850 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* DBF54 80145854 00C0102D */ daddu $v0, $a2, $zero
|
||||
/* DBF58 80145858 03E00008 */ jr $ra
|
||||
/* DBF5C 8014585C 27BD0020 */ addiu $sp, $sp, 0x20
|
@ -1,32 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel is_trigger_bound
|
||||
/* DC36C 80145C6C 0000402D */ daddu $t0, $zero, $zero
|
||||
/* DC370 80145C70 3C078016 */ lui $a3, %hi(gCurrentTriggerListPtr)
|
||||
/* DC374 80145C74 8CE79390 */ lw $a3, %lo(gCurrentTriggerListPtr)($a3)
|
||||
.L80145C78:
|
||||
/* DC378 80145C78 8CE30000 */ lw $v1, ($a3)
|
||||
/* DC37C 80145C7C 5060000F */ beql $v1, $zero, .L80145CBC
|
||||
/* DC380 80145C80 25080001 */ addiu $t0, $t0, 1
|
||||
/* DC384 80145C84 5064000D */ beql $v1, $a0, .L80145CBC
|
||||
/* DC388 80145C88 25080001 */ addiu $t0, $t0, 1
|
||||
/* DC38C 80145C8C 8C660000 */ lw $a2, ($v1)
|
||||
/* DC390 80145C90 30C20001 */ andi $v0, $a2, 1
|
||||
/* DC394 80145C94 10400009 */ beqz $v0, .L80145CBC
|
||||
/* DC398 80145C98 25080001 */ addiu $t0, $t0, 1
|
||||
/* DC39C 80145C9C 30C20002 */ andi $v0, $a2, 2
|
||||
/* DC3A0 80145CA0 10400006 */ beqz $v0, .L80145CBC
|
||||
/* DC3A4 80145CA4 00000000 */ nop
|
||||
/* DC3A8 80145CA8 8C620010 */ lw $v0, 0x10($v1)
|
||||
/* DC3AC 80145CAC 14450004 */ bne $v0, $a1, .L80145CC0
|
||||
/* DC3B0 80145CB0 29020040 */ slti $v0, $t0, 0x40
|
||||
/* DC3B4 80145CB4 03E00008 */ jr $ra
|
||||
/* DC3B8 80145CB8 24020001 */ addiu $v0, $zero, 1
|
||||
.L80145CBC:
|
||||
/* DC3BC 80145CBC 29020040 */ slti $v0, $t0, 0x40
|
||||
.L80145CC0:
|
||||
/* DC3C0 80145CC0 1440FFED */ bnez $v0, .L80145C78
|
||||
/* DC3C4 80145CC4 24E70004 */ addiu $a3, $a3, 4
|
||||
/* DC3C8 80145CC8 03E00008 */ jr $ra
|
||||
/* DC3CC 80145CCC 0000102D */ daddu $v0, $zero, $zero
|
@ -1,255 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel update_triggers
|
||||
/* DBF60 80145860 27BDFFD0 */ addiu $sp, $sp, -0x30
|
||||
/* DBF64 80145864 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* DBF68 80145868 3C128016 */ lui $s2, %hi(gCollisionStatus)
|
||||
/* DBF6C 8014586C 2652A550 */ addiu $s2, $s2, %lo(gCollisionStatus)
|
||||
/* DBF70 80145870 AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* DBF74 80145874 0000982D */ daddu $s3, $zero, $zero
|
||||
/* DBF78 80145878 AFBF0028 */ sw $ra, 0x28($sp)
|
||||
/* DBF7C 8014587C AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* DBF80 80145880 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* DBF84 80145884 A6400016 */ sh $zero, 0x16($s2)
|
||||
.L80145888:
|
||||
/* DBF88 80145888 3C038016 */ lui $v1, %hi(gCurrentTriggerListPtr)
|
||||
/* DBF8C 8014588C 8C639390 */ lw $v1, %lo(gCurrentTriggerListPtr)($v1)
|
||||
/* DBF90 80145890 00131080 */ sll $v0, $s3, 2
|
||||
/* DBF94 80145894 00431021 */ addu $v0, $v0, $v1
|
||||
/* DBF98 80145898 8C510000 */ lw $s1, ($v0)
|
||||
/* DBF9C 8014589C 522000B1 */ beql $s1, $zero, .L80145B64
|
||||
/* DBFA0 801458A0 26730001 */ addiu $s3, $s3, 1
|
||||
/* DBFA4 801458A4 8E230000 */ lw $v1, ($s1)
|
||||
/* DBFA8 801458A8 30620001 */ andi $v0, $v1, 1
|
||||
/* DBFAC 801458AC 504000AD */ beql $v0, $zero, .L80145B64
|
||||
/* DBFB0 801458B0 26730001 */ addiu $s3, $s3, 1
|
||||
/* DBFB4 801458B4 30620010 */ andi $v0, $v1, 0x10
|
||||
/* DBFB8 801458B8 144000A8 */ bnez $v0, .L80145B5C
|
||||
/* DBFBC 801458BC 34620002 */ ori $v0, $v1, 2
|
||||
/* DBFC0 801458C0 30620040 */ andi $v0, $v1, 0x40
|
||||
/* DBFC4 801458C4 1040000D */ beqz $v0, .L801458FC
|
||||
/* DBFC8 801458C8 00000000 */ nop
|
||||
/* DBFCC 801458CC 86430012 */ lh $v1, 0x12($s2)
|
||||
/* DBFD0 801458D0 8E220008 */ lw $v0, 8($s1)
|
||||
/* DBFD4 801458D4 14430003 */ bne $v0, $v1, .L801458E4
|
||||
/* DBFD8 801458D8 00000000 */ nop
|
||||
/* DBFDC 801458DC 0C0381B0 */ jal func_800E06C0
|
||||
/* DBFE0 801458E0 24040001 */ addiu $a0, $zero, 1
|
||||
.L801458E4:
|
||||
/* DBFE4 801458E4 86430000 */ lh $v1, ($s2)
|
||||
/* DBFE8 801458E8 8E220008 */ lw $v0, 8($s1)
|
||||
/* DBFEC 801458EC 5443009D */ bnel $v0, $v1, .L80145B64
|
||||
/* DBFF0 801458F0 26730001 */ addiu $s3, $s3, 1
|
||||
/* DBFF4 801458F4 0C0381B0 */ jal func_800E06C0
|
||||
/* DBFF8 801458F8 0000202D */ daddu $a0, $zero, $zero
|
||||
.L801458FC:
|
||||
/* DBFFC 801458FC 8E240000 */ lw $a0, ($s1)
|
||||
/* DC000 80145900 30820080 */ andi $v0, $a0, 0x80
|
||||
/* DC004 80145904 10400006 */ beqz $v0, .L80145920
|
||||
/* DC008 80145908 3C020008 */ lui $v0, 8
|
||||
/* DC00C 8014590C 86430002 */ lh $v1, 2($s2)
|
||||
/* DC010 80145910 8E220008 */ lw $v0, 8($s1)
|
||||
/* DC014 80145914 54430093 */ bnel $v0, $v1, .L80145B64
|
||||
/* DC018 80145918 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC01C 8014591C 3C020008 */ lui $v0, 8
|
||||
.L80145920:
|
||||
/* DC020 80145920 00821024 */ and $v0, $a0, $v0
|
||||
/* DC024 80145924 10400006 */ beqz $v0, .L80145940
|
||||
/* DC028 80145928 30820100 */ andi $v0, $a0, 0x100
|
||||
/* DC02C 8014592C 86430006 */ lh $v1, 6($s2)
|
||||
/* DC030 80145930 8E220008 */ lw $v0, 8($s1)
|
||||
/* DC034 80145934 5443008B */ bnel $v0, $v1, .L80145B64
|
||||
/* DC038 80145938 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC03C 8014593C 30820100 */ andi $v0, $a0, 0x100
|
||||
.L80145940:
|
||||
/* DC040 80145940 1040000E */ beqz $v0, .L8014597C
|
||||
/* DC044 80145944 00000000 */ nop
|
||||
/* DC048 80145948 86430012 */ lh $v1, 0x12($s2)
|
||||
/* DC04C 8014594C 8E220008 */ lw $v0, 8($s1)
|
||||
/* DC050 80145950 14430002 */ bne $v0, $v1, .L8014595C
|
||||
/* DC054 80145954 24020001 */ addiu $v0, $zero, 1
|
||||
/* DC058 80145958 A6420016 */ sh $v0, 0x16($s2)
|
||||
.L8014595C:
|
||||
/* DC05C 8014595C 8643000A */ lh $v1, 0xa($s2)
|
||||
/* DC060 80145960 8E220008 */ lw $v0, 8($s1)
|
||||
/* DC064 80145964 5443007F */ bnel $v0, $v1, .L80145B64
|
||||
/* DC068 80145968 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC06C 8014596C 0C0394BE */ jal phys_can_player_interact
|
||||
/* DC070 80145970 00000000 */ nop
|
||||
/* DC074 80145974 5040007B */ beql $v0, $zero, .L80145B64
|
||||
/* DC078 80145978 26730001 */ addiu $s3, $s3, 1
|
||||
.L8014597C:
|
||||
/* DC07C 8014597C 8E240000 */ lw $a0, ($s1)
|
||||
/* DC080 80145980 30820400 */ andi $v0, $a0, 0x400
|
||||
/* DC084 80145984 10400006 */ beqz $v0, .L801459A0
|
||||
/* DC088 80145988 30820200 */ andi $v0, $a0, 0x200
|
||||
/* DC08C 8014598C 86430012 */ lh $v1, 0x12($s2)
|
||||
/* DC090 80145990 8E220008 */ lw $v0, 8($s1)
|
||||
/* DC094 80145994 54430073 */ bnel $v0, $v1, .L80145B64
|
||||
/* DC098 80145998 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC09C 8014599C 30820200 */ andi $v0, $a0, 0x200
|
||||
.L801459A0:
|
||||
/* DC0A0 801459A0 10400006 */ beqz $v0, .L801459BC
|
||||
/* DC0A4 801459A4 30820800 */ andi $v0, $a0, 0x800
|
||||
/* DC0A8 801459A8 86430004 */ lh $v1, 4($s2)
|
||||
/* DC0AC 801459AC 8E220008 */ lw $v0, 8($s1)
|
||||
/* DC0B0 801459B0 5443006C */ bnel $v0, $v1, .L80145B64
|
||||
/* DC0B4 801459B4 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC0B8 801459B8 30820800 */ andi $v0, $a0, 0x800
|
||||
.L801459BC:
|
||||
/* DC0BC 801459BC 10400011 */ beqz $v0, .L80145A04
|
||||
/* DC0C0 801459C0 30821000 */ andi $v0, $a0, 0x1000
|
||||
/* DC0C4 801459C4 86430002 */ lh $v1, 2($s2)
|
||||
/* DC0C8 801459C8 8E220008 */ lw $v0, 8($s1)
|
||||
/* DC0CC 801459CC 54430065 */ bnel $v0, $v1, .L80145B64
|
||||
/* DC0D0 801459D0 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC0D4 801459D4 3C028007 */ lui $v0, %hi(gGameStatusPtr)
|
||||
/* DC0D8 801459D8 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
|
||||
/* DC0DC 801459DC 8C420010 */ lw $v0, 0x10($v0)
|
||||
/* DC0E0 801459E0 30428000 */ andi $v0, $v0, 0x8000
|
||||
/* DC0E4 801459E4 5040005F */ beql $v0, $zero, .L80145B64
|
||||
/* DC0E8 801459E8 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC0EC 801459EC 3C028011 */ lui $v0, %hi(gPlayerStatus)
|
||||
/* DC0F0 801459F0 8C42EFC8 */ lw $v0, %lo(gPlayerStatus)($v0)
|
||||
/* DC0F4 801459F4 30422000 */ andi $v0, $v0, 0x2000
|
||||
/* DC0F8 801459F8 5440005A */ bnel $v0, $zero, .L80145B64
|
||||
/* DC0FC 801459FC 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC100 80145A00 30821000 */ andi $v0, $a0, 0x1000
|
||||
.L80145A04:
|
||||
/* DC104 80145A04 10400006 */ beqz $v0, .L80145A20
|
||||
/* DC108 80145A08 3C020004 */ lui $v0, 4
|
||||
/* DC10C 80145A0C 86430014 */ lh $v1, 0x14($s2)
|
||||
/* DC110 80145A10 8E220008 */ lw $v0, 8($s1)
|
||||
/* DC114 80145A14 54430053 */ bnel $v0, $v1, .L80145B64
|
||||
/* DC118 80145A18 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC11C 80145A1C 3C020004 */ lui $v0, 4
|
||||
.L80145A20:
|
||||
/* DC120 80145A20 00821024 */ and $v0, $a0, $v0
|
||||
/* DC124 80145A24 10400006 */ beqz $v0, .L80145A40
|
||||
/* DC128 80145A28 30822000 */ andi $v0, $a0, 0x2000
|
||||
/* DC12C 80145A2C 86430008 */ lh $v1, 8($s2)
|
||||
/* DC130 80145A30 8E220008 */ lw $v0, 8($s1)
|
||||
/* DC134 80145A34 5443004B */ bnel $v0, $v1, .L80145B64
|
||||
/* DC138 80145A38 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC13C 80145A3C 30822000 */ andi $v0, $a0, 0x2000
|
||||
.L80145A40:
|
||||
/* DC140 80145A40 10400006 */ beqz $v0, .L80145A5C
|
||||
/* DC144 80145A44 30824000 */ andi $v0, $a0, 0x4000
|
||||
/* DC148 80145A48 8643000C */ lh $v1, 0xc($s2)
|
||||
/* DC14C 80145A4C 8E220008 */ lw $v0, 8($s1)
|
||||
/* DC150 80145A50 54430044 */ bnel $v0, $v1, .L80145B64
|
||||
/* DC154 80145A54 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC158 80145A58 30824000 */ andi $v0, $a0, 0x4000
|
||||
.L80145A5C:
|
||||
/* DC15C 80145A5C 10400006 */ beqz $v0, .L80145A78
|
||||
/* DC160 80145A60 30828000 */ andi $v0, $a0, 0x8000
|
||||
/* DC164 80145A64 8643000E */ lh $v1, 0xe($s2)
|
||||
/* DC168 80145A68 8E220008 */ lw $v0, 8($s1)
|
||||
/* DC16C 80145A6C 5443003D */ bnel $v0, $v1, .L80145B64
|
||||
/* DC170 80145A70 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC174 80145A74 30828000 */ andi $v0, $a0, 0x8000
|
||||
.L80145A78:
|
||||
/* DC178 80145A78 10400006 */ beqz $v0, .L80145A94
|
||||
/* DC17C 80145A7C 3C020010 */ lui $v0, 0x10
|
||||
/* DC180 80145A80 86430010 */ lh $v1, 0x10($s2)
|
||||
/* DC184 80145A84 8E220008 */ lw $v0, 8($s1)
|
||||
/* DC188 80145A88 54430036 */ bnel $v0, $v1, .L80145B64
|
||||
/* DC18C 80145A8C 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC190 80145A90 3C020010 */ lui $v0, 0x10
|
||||
.L80145A94:
|
||||
/* DC194 80145A94 00821024 */ and $v0, $a0, $v0
|
||||
/* DC198 80145A98 1040001C */ beqz $v0, .L80145B0C
|
||||
/* DC19C 80145A9C 00000000 */ nop
|
||||
/* DC1A0 80145AA0 86420018 */ lh $v0, 0x18($s2)
|
||||
/* DC1A4 80145AA4 0442002F */ bltzl $v0, .L80145B64
|
||||
/* DC1A8 80145AA8 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC1AC 80145AAC C6420020 */ lwc1 $f2, 0x20($s2)
|
||||
/* DC1B0 80145AB0 8E300008 */ lw $s0, 8($s1)
|
||||
/* DC1B4 80145AB4 C6400024 */ lwc1 $f0, 0x24($s2)
|
||||
/* DC1B8 80145AB8 E7A20010 */ swc1 $f2, 0x10($sp)
|
||||
/* DC1BC 80145ABC E7A00014 */ swc1 $f0, 0x14($sp)
|
||||
/* DC1C0 80145AC0 C60C0000 */ lwc1 $f12, ($s0)
|
||||
/* DC1C4 80145AC4 C60E0004 */ lwc1 $f14, 4($s0)
|
||||
/* DC1C8 80145AC8 8E060008 */ lw $a2, 8($s0)
|
||||
/* DC1CC 80145ACC 0C00A7CB */ jal dist3D
|
||||
/* DC1D0 80145AD0 8E47001C */ lw $a3, 0x1c($s2)
|
||||
/* DC1D4 80145AD4 C604000C */ lwc1 $f4, 0xc($s0)
|
||||
/* DC1D8 80145AD8 3C013F00 */ lui $at, 0x3f00
|
||||
/* DC1DC 80145ADC 44811000 */ mtc1 $at, $f2
|
||||
/* DC1E0 80145AE0 00000000 */ nop
|
||||
/* DC1E4 80145AE4 46022102 */ mul.s $f4, $f4, $f2
|
||||
/* DC1E8 80145AE8 00000000 */ nop
|
||||
/* DC1EC 80145AEC 3C014248 */ lui $at, 0x4248
|
||||
/* DC1F0 80145AF0 44811000 */ mtc1 $at, $f2
|
||||
/* DC1F4 80145AF4 00000000 */ nop
|
||||
/* DC1F8 80145AF8 46022100 */ add.s $f4, $f4, $f2
|
||||
/* DC1FC 80145AFC 4600203C */ c.lt.s $f4, $f0
|
||||
/* DC200 80145B00 00000000 */ nop
|
||||
/* DC204 80145B04 45030017 */ bc1tl .L80145B64
|
||||
/* DC208 80145B08 26730001 */ addiu $s3, $s3, 1
|
||||
.L80145B0C:
|
||||
/* DC20C 80145B0C 8E220000 */ lw $v0, ($s1)
|
||||
/* DC210 80145B10 3C030001 */ lui $v1, 1
|
||||
/* DC214 80145B14 00431024 */ and $v0, $v0, $v1
|
||||
/* DC218 80145B18 10400005 */ beqz $v0, .L80145B30
|
||||
/* DC21C 80145B1C 00000000 */ nop
|
||||
/* DC220 80145B20 0C05152F */ jal get_global_flag
|
||||
/* DC224 80145B24 8E240004 */ lw $a0, 4($s1)
|
||||
/* DC228 80145B28 5040000E */ beql $v0, $zero, .L80145B64
|
||||
/* DC22C 80145B2C 26730001 */ addiu $s3, $s3, 1
|
||||
.L80145B30:
|
||||
/* DC230 80145B30 8E220000 */ lw $v0, ($s1)
|
||||
/* DC234 80145B34 3C030002 */ lui $v1, 2
|
||||
/* DC238 80145B38 00431024 */ and $v0, $v0, $v1
|
||||
/* DC23C 80145B3C 10400005 */ beqz $v0, .L80145B54
|
||||
/* DC240 80145B40 00000000 */ nop
|
||||
/* DC244 80145B44 0C05157C */ jal get_area_flag
|
||||
/* DC248 80145B48 8E240004 */ lw $a0, 4($s1)
|
||||
/* DC24C 80145B4C 50400005 */ beql $v0, $zero, .L80145B64
|
||||
/* DC250 80145B50 26730001 */ addiu $s3, $s3, 1
|
||||
.L80145B54:
|
||||
/* DC254 80145B54 8E220000 */ lw $v0, ($s1)
|
||||
/* DC258 80145B58 34420002 */ ori $v0, $v0, 2
|
||||
.L80145B5C:
|
||||
/* DC25C 80145B5C AE220000 */ sw $v0, ($s1)
|
||||
/* DC260 80145B60 26730001 */ addiu $s3, $s3, 1
|
||||
.L80145B64:
|
||||
/* DC264 80145B64 2A620040 */ slti $v0, $s3, 0x40
|
||||
/* DC268 80145B68 1440FF47 */ bnez $v0, .L80145888
|
||||
/* DC26C 80145B6C 2410FFFD */ addiu $s0, $zero, -3
|
||||
/* DC270 80145B70 0000982D */ daddu $s3, $zero, $zero
|
||||
.L80145B74:
|
||||
/* DC274 80145B74 3C038016 */ lui $v1, %hi(gCurrentTriggerListPtr)
|
||||
/* DC278 80145B78 8C639390 */ lw $v1, %lo(gCurrentTriggerListPtr)($v1)
|
||||
/* DC27C 80145B7C 00131080 */ sll $v0, $s3, 2
|
||||
/* DC280 80145B80 00431021 */ addu $v0, $v0, $v1
|
||||
/* DC284 80145B84 8C510000 */ lw $s1, ($v0)
|
||||
/* DC288 80145B88 52200010 */ beql $s1, $zero, .L80145BCC
|
||||
/* DC28C 80145B8C 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC290 80145B90 8E230000 */ lw $v1, ($s1)
|
||||
/* DC294 80145B94 30620001 */ andi $v0, $v1, 1
|
||||
/* DC298 80145B98 5040000C */ beql $v0, $zero, .L80145BCC
|
||||
/* DC29C 80145B9C 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC2A0 80145BA0 30620002 */ andi $v0, $v1, 2
|
||||
/* DC2A4 80145BA4 50400009 */ beql $v0, $zero, .L80145BCC
|
||||
/* DC2A8 80145BA8 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC2AC 80145BAC 8E22000C */ lw $v0, 0xc($s1)
|
||||
/* DC2B0 80145BB0 0040F809 */ jalr $v0
|
||||
/* DC2B4 80145BB4 0220202D */ daddu $a0, $s1, $zero
|
||||
/* DC2B8 80145BB8 14400004 */ bnez $v0, .L80145BCC
|
||||
/* DC2BC 80145BBC 26730001 */ addiu $s3, $s3, 1
|
||||
/* DC2C0 80145BC0 8E220000 */ lw $v0, ($s1)
|
||||
/* DC2C4 80145BC4 00501024 */ and $v0, $v0, $s0
|
||||
/* DC2C8 80145BC8 AE220000 */ sw $v0, ($s1)
|
||||
.L80145BCC:
|
||||
/* DC2CC 80145BCC 2A620040 */ slti $v0, $s3, 0x40
|
||||
/* DC2D0 80145BD0 1440FFE8 */ bnez $v0, .L80145B74
|
||||
/* DC2D4 80145BD4 00000000 */ nop
|
||||
/* DC2D8 80145BD8 8FBF0028 */ lw $ra, 0x28($sp)
|
||||
/* DC2DC 80145BDC 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* DC2E0 80145BE0 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* DC2E4 80145BE4 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* DC2E8 80145BE8 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* DC2EC 80145BEC 03E00008 */ jr $ra
|
||||
/* DC2F0 80145BF0 27BD0030 */ addiu $sp, $sp, 0x30
|
@ -1,40 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel si_goto_end_loop
|
||||
/* ED494 802C8AE4 0000282D */ daddu $a1, $zero, $zero
|
||||
/* ED498 802C8AE8 8C830008 */ lw $v1, 8($a0)
|
||||
/* ED49C 802C8AEC 24080005 */ addiu $t0, $zero, 5
|
||||
/* ED4A0 802C8AF0 24070001 */ addiu $a3, $zero, 1
|
||||
/* ED4A4 802C8AF4 24060006 */ addiu $a2, $zero, 6
|
||||
.L802C8AF8:
|
||||
/* ED4A8 802C8AF8 8C640000 */ lw $a0, ($v1)
|
||||
/* ED4AC 802C8AFC 24630004 */ addiu $v1, $v1, 4
|
||||
/* ED4B0 802C8B00 8C620000 */ lw $v0, ($v1)
|
||||
/* ED4B4 802C8B04 24630004 */ addiu $v1, $v1, 4
|
||||
/* ED4B8 802C8B08 00021080 */ sll $v0, $v0, 2
|
||||
/* ED4BC 802C8B0C 10880012 */ beq $a0, $t0, .L802C8B58
|
||||
/* ED4C0 802C8B10 00621821 */ addu $v1, $v1, $v0
|
||||
/* ED4C4 802C8B14 28820006 */ slti $v0, $a0, 6
|
||||
/* ED4C8 802C8B18 10400005 */ beqz $v0, .L802C8B30
|
||||
/* ED4CC 802C8B1C 00000000 */ nop
|
||||
/* ED4D0 802C8B20 10870007 */ beq $a0, $a3, .L802C8B40
|
||||
/* ED4D4 802C8B24 00000000 */ nop
|
||||
/* ED4D8 802C8B28 080B22BE */ j .L802C8AF8
|
||||
/* ED4DC 802C8B2C 00000000 */ nop
|
||||
.L802C8B30:
|
||||
/* ED4E0 802C8B30 50860005 */ beql $a0, $a2, .L802C8B48
|
||||
/* ED4E4 802C8B34 24A5FFFF */ addiu $a1, $a1, -1
|
||||
/* ED4E8 802C8B38 080B22BE */ j .L802C8AF8
|
||||
/* ED4EC 802C8B3C 00000000 */ nop
|
||||
.L802C8B40:
|
||||
/* ED4F0 802C8B40 080B22D0 */ j .L802C8B40
|
||||
/* ED4F4 802C8B44 00000000 */ nop
|
||||
.L802C8B48:
|
||||
/* ED4F8 802C8B48 04A1FFEB */ bgez $a1, .L802C8AF8
|
||||
/* ED4FC 802C8B4C 0060102D */ daddu $v0, $v1, $zero
|
||||
/* ED500 802C8B50 03E00008 */ jr $ra
|
||||
/* ED504 802C8B54 00000000 */ nop
|
||||
.L802C8B58:
|
||||
/* ED508 802C8B58 080B22BE */ j .L802C8AF8
|
||||
/* ED50C 802C8B5C 24A50001 */ addiu $a1, $a1, 1
|
@ -88,8 +88,8 @@ glabel si_handle_print_debug_var
|
||||
/* EB7F4 802C6E44 0230102A */ slt $v0, $s1, $s0
|
||||
/* EB7F8 802C6E48 14400007 */ bnez $v0, .L802C6E68
|
||||
/* EB7FC 802C6E4C 3C12F2E3 */ lui $s2, 0xf2e3
|
||||
/* EB800 802C6E50 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EB804 802C6E54 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EB800 802C6E50 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EB804 802C6E54 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EB808 802C6E58 3C05802E */ lui $a1, %hi(D_802D9D98)
|
||||
/* EB80C 802C6E5C 24A59D98 */ addiu $a1, $a1, %lo(D_802D9D98)
|
||||
/* EB810 802C6E60 080B1CDE */ j .L802C7378
|
||||
@ -101,8 +101,8 @@ glabel si_handle_print_debug_var
|
||||
/* EB824 802C6E74 3C02F414 */ lui $v0, 0xf414
|
||||
/* EB828 802C6E78 0C0B1248 */ jal fixed_var_to_float
|
||||
/* EB82C 802C6E7C 0200202D */ daddu $a0, $s0, $zero
|
||||
/* EB830 802C6E80 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EB834 802C6E84 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EB830 802C6E80 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EB834 802C6E84 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EB838 802C6E88 460000A1 */ cvt.d.s $f2, $f0
|
||||
/* EB83C 802C6E8C 44071000 */ mfc1 $a3, $f2
|
||||
/* EB840 802C6E90 44061800 */ mfc1 $a2, $f3
|
||||
@ -127,8 +127,8 @@ glabel si_handle_print_debug_var
|
||||
/* EB884 802C6ED4 0100182D */ daddu $v1, $t0, $zero
|
||||
/* EB888 802C6ED8 00031140 */ sll $v0, $v1, 5
|
||||
/* EB88C 802C6EDC 02024023 */ subu $t0, $s0, $v0
|
||||
/* EB890 802C6EE0 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EB894 802C6EE4 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EB890 802C6EE0 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EB894 802C6EE4 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EB898 802C6EE8 3C05802E */ lui $a1, %hi(D_802D9DBC)
|
||||
/* EB89C 802C6EEC 24A59DBC */ addiu $a1, $a1, %lo(D_802D9DBC)
|
||||
/* EB8A0 802C6EF0 0200302D */ daddu $a2, $s0, $zero
|
||||
@ -153,8 +153,8 @@ glabel si_handle_print_debug_var
|
||||
/* EB8E8 802C6F38 0227102A */ slt $v0, $s1, $a3
|
||||
/* EB8EC 802C6F3C 14400007 */ bnez $v0, .L802C6F5C
|
||||
/* EB8F0 802C6F40 0247102A */ slt $v0, $s2, $a3
|
||||
/* EB8F4 802C6F44 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EB8F8 802C6F48 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EB8F4 802C6F44 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EB8F8 802C6F48 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EB8FC 802C6F4C 3C05802E */ lui $a1, %hi(D_802D9DCC)
|
||||
/* EB900 802C6F50 24A59DCC */ addiu $a1, $a1, %lo(D_802D9DCC)
|
||||
/* EB904 802C6F54 080B1CDE */ j .L802C7378
|
||||
@ -166,14 +166,14 @@ glabel si_handle_print_debug_var
|
||||
/* EB918 802C6F68 00E0202D */ daddu $a0, $a3, $zero
|
||||
/* EB91C 802C6F6C 46000021 */ cvt.d.s $f0, $f0
|
||||
/* EB920 802C6F70 F7A00010 */ sdc1 $f0, 0x10($sp)
|
||||
/* EB924 802C6F74 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EB928 802C6F78 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EB924 802C6F74 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EB928 802C6F78 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EB92C 802C6F7C 3C05802E */ lui $a1, %hi(D_802D9DDC)
|
||||
/* EB930 802C6F80 080B1CCE */ j .L802C7338
|
||||
/* EB934 802C6F84 24A59DDC */ addiu $a1, $a1, %lo(D_802D9DDC)
|
||||
.L802C6F88:
|
||||
/* EB938 802C6F88 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EB93C 802C6F8C 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EB938 802C6F88 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EB93C 802C6F8C 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EB940 802C6F90 3C05802E */ lui $a1, %hi(D_802D9DF0)
|
||||
/* EB944 802C6F94 080B1CD6 */ j .L802C7358
|
||||
/* EB948 802C6F98 24A59DF0 */ addiu $a1, $a1, %lo(D_802D9DF0)
|
||||
@ -191,8 +191,8 @@ glabel si_handle_print_debug_var
|
||||
/* EB974 802C6FC4 0227102A */ slt $v0, $s1, $a3
|
||||
/* EB978 802C6FC8 14400007 */ bnez $v0, .L802C6FE8
|
||||
/* EB97C 802C6FCC 0247102A */ slt $v0, $s2, $a3
|
||||
/* EB980 802C6FD0 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EB984 802C6FD4 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EB980 802C6FD0 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EB984 802C6FD4 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EB988 802C6FD8 3C05802E */ lui $a1, %hi(D_802D9E00)
|
||||
/* EB98C 802C6FDC 24A59E00 */ addiu $a1, $a1, %lo(D_802D9E00)
|
||||
/* EB990 802C6FE0 080B1CDE */ j .L802C7378
|
||||
@ -204,14 +204,14 @@ glabel si_handle_print_debug_var
|
||||
/* EB9A4 802C6FF4 00E0202D */ daddu $a0, $a3, $zero
|
||||
/* EB9A8 802C6FF8 46000021 */ cvt.d.s $f0, $f0
|
||||
/* EB9AC 802C6FFC F7A00010 */ sdc1 $f0, 0x10($sp)
|
||||
/* EB9B0 802C7000 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EB9B4 802C7004 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EB9B0 802C7000 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EB9B4 802C7004 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EB9B8 802C7008 3C05802E */ lui $a1, %hi(D_802D9E10)
|
||||
/* EB9BC 802C700C 080B1CCE */ j .L802C7338
|
||||
/* EB9C0 802C7010 24A59E10 */ addiu $a1, $a1, %lo(D_802D9E10)
|
||||
.L802C7014:
|
||||
/* EB9C4 802C7014 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EB9C8 802C7018 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EB9C4 802C7014 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EB9C8 802C7018 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EB9CC 802C701C 3C05802E */ lui $a1, %hi(D_802D9E24)
|
||||
/* EB9D0 802C7020 080B1CD6 */ j .L802C7358
|
||||
/* EB9D4 802C7024 24A59E24 */ addiu $a1, $a1, %lo(D_802D9E24)
|
||||
@ -229,8 +229,8 @@ glabel si_handle_print_debug_var
|
||||
/* EBA00 802C7050 0227102A */ slt $v0, $s1, $a3
|
||||
/* EBA04 802C7054 14400007 */ bnez $v0, .L802C7074
|
||||
/* EBA08 802C7058 0247102A */ slt $v0, $s2, $a3
|
||||
/* EBA0C 802C705C 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EBA10 802C7060 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EBA0C 802C705C 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EBA10 802C7060 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EBA14 802C7064 3C05802E */ lui $a1, %hi(D_802D9E34)
|
||||
/* EBA18 802C7068 24A59E34 */ addiu $a1, $a1, %lo(D_802D9E34)
|
||||
/* EBA1C 802C706C 080B1CDE */ j .L802C7378
|
||||
@ -242,14 +242,14 @@ glabel si_handle_print_debug_var
|
||||
/* EBA30 802C7080 00E0202D */ daddu $a0, $a3, $zero
|
||||
/* EBA34 802C7084 46000021 */ cvt.d.s $f0, $f0
|
||||
/* EBA38 802C7088 F7A00010 */ sdc1 $f0, 0x10($sp)
|
||||
/* EBA3C 802C708C 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EBA40 802C7090 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EBA3C 802C708C 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EBA40 802C7090 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EBA44 802C7094 3C05802E */ lui $a1, %hi(D_802D9E44)
|
||||
/* EBA48 802C7098 080B1CCE */ j .L802C7338
|
||||
/* EBA4C 802C709C 24A59E44 */ addiu $a1, $a1, %lo(D_802D9E44)
|
||||
.L802C70A0:
|
||||
/* EBA50 802C70A0 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EBA54 802C70A4 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EBA50 802C70A0 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EBA54 802C70A4 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EBA58 802C70A8 3C05802E */ lui $a1, %hi(D_802D9E58)
|
||||
/* EBA5C 802C70AC 080B1CD6 */ j .L802C7358
|
||||
/* EBA60 802C70B0 24A59E58 */ addiu $a1, $a1, %lo(D_802D9E58)
|
||||
@ -263,8 +263,8 @@ glabel si_handle_print_debug_var
|
||||
/* EBA7C 802C70CC 02028021 */ addu $s0, $s0, $v0
|
||||
/* EBA80 802C70D0 0C05152F */ jal get_global_flag
|
||||
/* EBA84 802C70D4 0200202D */ daddu $a0, $s0, $zero
|
||||
/* EBA88 802C70D8 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EBA8C 802C70DC 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EBA88 802C70D8 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EBA8C 802C70DC 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EBA90 802C70E0 3C05802E */ lui $a1, %hi(D_802D9E68)
|
||||
/* EBA94 802C70E4 24A59E68 */ addiu $a1, $a1, %lo(D_802D9E68)
|
||||
/* EBA98 802C70E8 080B1C4A */ j .L802C7128
|
||||
@ -279,8 +279,8 @@ glabel si_handle_print_debug_var
|
||||
/* EBAB8 802C7108 02028021 */ addu $s0, $s0, $v0
|
||||
/* EBABC 802C710C 0C05157C */ jal get_area_flag
|
||||
/* EBAC0 802C7110 0200202D */ daddu $a0, $s0, $zero
|
||||
/* EBAC4 802C7114 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EBAC8 802C7118 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EBAC4 802C7114 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EBAC8 802C7118 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EBACC 802C711C 3C05802E */ lui $a1, %hi(D_802D9E78)
|
||||
/* EBAD0 802C7120 24A59E78 */ addiu $a1, $a1, %lo(D_802D9E78)
|
||||
/* EBAD4 802C7124 0200302D */ daddu $a2, $s0, $zero
|
||||
@ -305,8 +305,8 @@ glabel si_handle_print_debug_var
|
||||
/* EBB14 802C7164 0100182D */ daddu $v1, $t0, $zero
|
||||
/* EBB18 802C7168 00031140 */ sll $v0, $v1, 5
|
||||
/* EBB1C 802C716C 02024023 */ subu $t0, $s0, $v0
|
||||
/* EBB20 802C7170 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EBB24 802C7174 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EBB20 802C7170 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EBB24 802C7174 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EBB28 802C7178 3C05802E */ lui $a1, %hi(D_802D9E88)
|
||||
/* EBB2C 802C717C 24A59E88 */ addiu $a1, $a1, %lo(D_802D9E88)
|
||||
/* EBB30 802C7180 0200302D */ daddu $a2, $s0, $zero
|
||||
@ -333,8 +333,8 @@ glabel si_handle_print_debug_var
|
||||
/* EBB7C 802C71CC 0100182D */ daddu $v1, $t0, $zero
|
||||
/* EBB80 802C71D0 00031140 */ sll $v0, $v1, 5
|
||||
/* EBB84 802C71D4 02024023 */ subu $t0, $s0, $v0
|
||||
/* EBB88 802C71D8 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EBB8C 802C71DC 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EBB88 802C71D8 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EBB8C 802C71DC 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EBB90 802C71E0 3C05802E */ lui $a1, %hi(D_802D9E98)
|
||||
/* EBB94 802C71E4 24A59E98 */ addiu $a1, $a1, %lo(D_802D9E98)
|
||||
/* EBB98 802C71E8 0200302D */ daddu $a2, $s0, $zero
|
||||
@ -366,8 +366,8 @@ glabel si_handle_print_debug_var
|
||||
/* EBBF8 802C7248 0087202A */ slt $a0, $a0, $a3
|
||||
/* EBBFC 802C724C 14800007 */ bnez $a0, .L802C726C
|
||||
/* EBC00 802C7250 3C02F2E3 */ lui $v0, 0xf2e3
|
||||
/* EBC04 802C7254 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EBC08 802C7258 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EBC04 802C7254 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EBC08 802C7258 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EBC0C 802C725C 3C05802E */ lui $a1, %hi(D_802D9EA8)
|
||||
/* EBC10 802C7260 24A59EA8 */ addiu $a1, $a1, %lo(D_802D9EA8)
|
||||
/* EBC14 802C7264 080B1CDE */ j .L802C7378
|
||||
@ -381,14 +381,14 @@ glabel si_handle_print_debug_var
|
||||
/* EBC30 802C7280 00E0202D */ daddu $a0, $a3, $zero
|
||||
/* EBC34 802C7284 46000021 */ cvt.d.s $f0, $f0
|
||||
/* EBC38 802C7288 F7A00010 */ sdc1 $f0, 0x10($sp)
|
||||
/* EBC3C 802C728C 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EBC40 802C7290 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EBC3C 802C728C 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EBC40 802C7290 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EBC44 802C7294 3C05802E */ lui $a1, %hi(D_802D9EB8)
|
||||
/* EBC48 802C7298 080B1CCE */ j .L802C7338
|
||||
/* EBC4C 802C729C 24A59EB8 */ addiu $a1, $a1, %lo(D_802D9EB8)
|
||||
.L802C72A0:
|
||||
/* EBC50 802C72A0 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EBC54 802C72A4 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EBC50 802C72A0 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EBC54 802C72A4 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EBC58 802C72A8 3C05802E */ lui $a1, %hi(D_802D9ECC)
|
||||
/* EBC5C 802C72AC 080B1CD6 */ j .L802C7358
|
||||
/* EBC60 802C72B0 24A59ECC */ addiu $a1, $a1, %lo(D_802D9ECC)
|
||||
@ -408,8 +408,8 @@ glabel si_handle_print_debug_var
|
||||
/* EBC94 802C72E4 0047102A */ slt $v0, $v0, $a3
|
||||
/* EBC98 802C72E8 14400007 */ bnez $v0, .L802C7308
|
||||
/* EBC9C 802C72EC 3C02F2E3 */ lui $v0, 0xf2e3
|
||||
/* EBCA0 802C72F0 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EBCA4 802C72F4 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EBCA0 802C72F0 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EBCA4 802C72F4 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EBCA8 802C72F8 3C05802E */ lui $a1, %hi(D_802D9EDC)
|
||||
/* EBCAC 802C72FC 24A59EDC */ addiu $a1, $a1, %lo(D_802D9EDC)
|
||||
/* EBCB0 802C7300 080B1CDE */ j .L802C7378
|
||||
@ -423,8 +423,8 @@ glabel si_handle_print_debug_var
|
||||
/* EBCCC 802C731C 00E0202D */ daddu $a0, $a3, $zero
|
||||
/* EBCD0 802C7320 46000021 */ cvt.d.s $f0, $f0
|
||||
/* EBCD4 802C7324 F7A00010 */ sdc1 $f0, 0x10($sp)
|
||||
/* EBCD8 802C7328 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EBCDC 802C732C 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EBCD8 802C7328 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EBCDC 802C732C 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EBCE0 802C7330 3C05802E */ lui $a1, %hi(D_802D9EEC)
|
||||
/* EBCE4 802C7334 24A59EEC */ addiu $a1, $a1, %lo(D_802D9EEC)
|
||||
.L802C7338:
|
||||
@ -433,8 +433,8 @@ glabel si_handle_print_debug_var
|
||||
/* EBCF0 802C7340 080B1CE0 */ j .L802C7380
|
||||
/* EBCF4 802C7344 00000000 */ nop
|
||||
.L802C7348:
|
||||
/* EBCF8 802C7348 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EBCFC 802C734C 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EBCF8 802C7348 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EBCFC 802C734C 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EBD00 802C7350 3C05802E */ lui $a1, %hi(D_802D9F00)
|
||||
/* EBD04 802C7354 24A59F00 */ addiu $a1, $a1, %lo(D_802D9F00)
|
||||
.L802C7358:
|
||||
@ -443,8 +443,8 @@ glabel si_handle_print_debug_var
|
||||
/* EBD10 802C7360 080B1CE0 */ j .L802C7380
|
||||
/* EBD14 802C7364 00000000 */ nop
|
||||
.L802C7368:
|
||||
/* EBD18 802C7368 3C04802E */ lui $a0, %hi(D_802DACA0)
|
||||
/* EBD1C 802C736C 2484ACA0 */ addiu $a0, $a0, %lo(D_802DACA0)
|
||||
/* EBD18 802C7368 3C04802E */ lui $a0, %hi(evtDebugPrintBuffer)
|
||||
/* EBD1C 802C736C 2484ACA0 */ addiu $a0, $a0, %lo(evtDebugPrintBuffer)
|
||||
/* EBD20 802C7370 3C05802E */ lui $a1, %hi(D_802D9F10)
|
||||
/* EBD24 802C7374 24A59F10 */ addiu $a1, $a1, %lo(D_802D9F10)
|
||||
.L802C7378:
|
||||
|
@ -702,7 +702,7 @@ segments:
|
||||
- [0xd0a70, c, d0a70_len_4fe0]
|
||||
- [0xd5a50, c, hud_element]
|
||||
- [0xdba20, c, dba20_len_350]
|
||||
- [0xdbd70, c, dbd70_len_700]
|
||||
- [0xdbd70, c, trigger]
|
||||
- [0xdc470, c, dc470_len_14c0]
|
||||
- [0xdd930, c, dd930_len_1c0]
|
||||
- [0xddaf0, c, ddaf0_len_c50]
|
||||
|
@ -19037,8 +19037,8 @@ D_80158574 = 0x80158574; // type:data
|
||||
D_80158580 = 0x80158580; // type:data
|
||||
D_80158B80 = 0x80158B80; // type:data
|
||||
D_80159180 = 0x80159180; // type:data
|
||||
gTriggerList1 = 0x80159190; //
|
||||
gTriggerList2 = 0x80159290; //
|
||||
wTriggerList = 0x80159190; //
|
||||
bTriggerList = 0x80159290; //
|
||||
gCurrentTriggerListPtr = 0x80159390; //
|
||||
D_801593A0 = 0x801593A0; // type:data
|
||||
D_8015959E = 0x8015959E; // type:data
|
||||
@ -20450,7 +20450,7 @@ gCurrentScriptListPtr = 0x802DA890; //
|
||||
gScriptIndexList = 0x802DA898; //
|
||||
gScriptIdList = 0x802DAA98; //
|
||||
gScriptListCount = 0x802DAC98; //
|
||||
D_802DACA0 = 0x802DACA0; // type:data
|
||||
evtDebugPrintBuffer = 0x802DACA0; // type:data
|
||||
gLavaResetList = 0x802DADA0; // type:data
|
||||
D_802DADA4 = 0x802DADA4; // type:data
|
||||
gBattleMeshAnimationList = 0x802DADB0; // size:0x40
|
||||
|
@ -260,8 +260,8 @@ D_80158574 = 0x80158574;
|
||||
D_80158580 = 0x80158580;
|
||||
D_80158B80 = 0x80158B80;
|
||||
D_80159180 = 0x80159180;
|
||||
gTriggerList1 = 0x80159190;
|
||||
gTriggerList2 = 0x80159290;
|
||||
wTriggerList = 0x80159190;
|
||||
bTriggerList = 0x80159290;
|
||||
gCurrentTriggerListPtr = 0x80159390;
|
||||
D_801593A0 = 0x801593A0;
|
||||
D_8015959E = 0x8015959E;
|
||||
@ -1185,7 +1185,7 @@ gCurrentScriptListPtr = 0x802DA890;
|
||||
gScriptIndexList = 0x802DA898;
|
||||
gScriptIdList = 0x802DAA98;
|
||||
gScriptListCount = 0x802DAC98;
|
||||
D_802DACA0 = 0x802DACA0;
|
||||
evtDebugPrintBuffer = 0x802DACA0;
|
||||
gLavaResetList = 0x802DADA0;
|
||||
D_802DADA4 = 0x802DADA4;
|
||||
gBattleMeshAnimationList = 0x802DADB0;
|
||||
|
Loading…
Reference in New Issue
Block a user