mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 20:42:41 +01:00
format + deleted matched
This commit is contained in:
parent
733b591d5f
commit
e465321115
@ -1,8 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_8014720C
|
||||
/* DD90C 8014720C 24020001 */ addiu $v0, $zero, 1
|
||||
/* DD910 80147210 3C018015 */ lui $at, 0x8015
|
||||
/* DD914 80147214 03E00008 */ jr $ra
|
||||
/* DD918 80147218 A022F12F */ sb $v0, -0xed1($at)
|
@ -1,9 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_8014721C
|
||||
/* DD91C 8014721C 3C018015 */ lui $at, 0x8015
|
||||
/* DD920 80147220 03E00008 */ jr $ra
|
||||
/* DD924 80147224 A020F12F */ sb $zero, -0xed1($at)
|
||||
/* DD928 80147228 00000000 */ nop
|
||||
/* DD92C 8014722C 00000000 */ nop
|
@ -1,14 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_801473F0
|
||||
/* DDAF0 801473F0 3C038016 */ lui $v1, 0x8016
|
||||
/* DDAF4 801473F4 24639D50 */ addiu $v1, $v1, -0x62b0
|
||||
/* DDAF8 801473F8 2402003F */ addiu $v0, $zero, 0x3f
|
||||
.L801473FC:
|
||||
/* DDAFC 801473FC A0600000 */ sb $zero, ($v1)
|
||||
/* DDB00 80147400 2442FFFF */ addiu $v0, $v0, -1
|
||||
/* DDB04 80147404 0441FFFD */ bgez $v0, .L801473FC
|
||||
/* DDB08 80147408 24630020 */ addiu $v1, $v1, 0x20
|
||||
/* DDB0C 8014740C 03E00008 */ jr $ra
|
||||
/* DDB10 80147410 00000000 */ nop
|
@ -1,8 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_8014AFA0
|
||||
/* E16A0 8014AFA0 03E00008 */ jr $ra
|
||||
/* E16A4 8014AFA4 00000000 */ nop
|
||||
/* E16A8 8014AFA8 00000000 */ nop
|
||||
/* E16AC 8014AFAC 00000000 */ nop
|
@ -12,12 +12,12 @@ extern struct_80159D50 D_80159D50[0x40];
|
||||
|
||||
//INCLUDE_ASM("code_ddaf0_len_c50", func_801473F0);
|
||||
void func_801473F0(void) {
|
||||
struct_80159D50 *phi_v1 = &D_80159D50;
|
||||
struct_80159D50* phi_v1 = &D_80159D50;
|
||||
s32 i;
|
||||
|
||||
for(i = 0; i < 0x40; i++) {
|
||||
phi_v1->unk_00 = 0;
|
||||
phi_v1++;
|
||||
for (i = 0; i < 0x40; i++) {
|
||||
phi_v1->unk_00 = 0;
|
||||
phi_v1++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,10 +15,10 @@ void sort_scripts(void) {
|
||||
s32 i;
|
||||
s32 j;
|
||||
s32 numValidScripts = 0;
|
||||
s32 *scriptIndexList = gScriptIndexList;
|
||||
s32 *scriptIdList = gScriptIdList;
|
||||
s32* scriptIndexList = gScriptIndexList;
|
||||
s32* scriptIdList = gScriptIdList;
|
||||
|
||||
for(i = 0; i < MAX_SCRIPTS; i++) {
|
||||
for (i = 0; i < MAX_SCRIPTS; i++) {
|
||||
curScript = (*gCurrentScriptListPtr)[i];
|
||||
if (curScript != NULL) {
|
||||
if (curScript->state != 0) {
|
||||
@ -31,11 +31,11 @@ void sort_scripts(void) {
|
||||
|
||||
gScriptListCount = numValidScripts;
|
||||
j = numValidScripts;
|
||||
for(i = 0; i < (j - 1); i++) {
|
||||
for (i = 0; i < (j - 1); i++) {
|
||||
currentScriptListPtr = &gCurrentScriptListPtr;
|
||||
scriptIdList = gScriptIdList;
|
||||
scriptIndexList = gScriptIndexList;
|
||||
for(j = i + 1; j < numValidScripts; j++) {
|
||||
for (j = i + 1; j < numValidScripts; j++) {
|
||||
temp_a1 = scriptIndexList[i];
|
||||
temp_a0 = scriptIndexList[j];
|
||||
if ((**currentScriptListPtr)[temp_a1]->priority > (**currentScriptListPtr)[temp_a0]->priority) {
|
||||
@ -54,22 +54,22 @@ INCLUDE_ASM(s32, "code_e79b0_len_1920", sort_scripts);
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
// Very close. Reordering/branch likely issues
|
||||
void find_script_labels(ScriptInstance *script) {
|
||||
Bytecode *curLine;
|
||||
void find_script_labels(ScriptInstance* script) {
|
||||
Bytecode* curLine;
|
||||
s32 type;
|
||||
s32 label;
|
||||
s32 numArgs;
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
for(i = 0; i < ARRAY_COUNT(script->labelIndices); i++){
|
||||
for (i = 0; i < ARRAY_COUNT(script->labelIndices); i++) {
|
||||
script->labelIndices[i] = -1;
|
||||
script->labelPositions[i] = 0;
|
||||
}
|
||||
|
||||
j = 0;
|
||||
curLine = script->ptrNextLine;
|
||||
for(j = 0; j < ARRAY_COUNT(script->labelIndices); j++) {
|
||||
for (j = 0; j < ARRAY_COUNT(script->labelIndices); j++) {
|
||||
type = *curLine++;
|
||||
numArgs = *curLine++;
|
||||
label = *curLine;
|
||||
@ -103,7 +103,7 @@ void clear_script_list(void) {
|
||||
gMapFlags = gBattleMapFlags;
|
||||
}
|
||||
|
||||
for(i = 0; i < MAX_SCRIPTS; i++) {
|
||||
for (i = 0; i < MAX_SCRIPTS; i++) {
|
||||
(*gCurrentScriptListPtr)[i] = NULL;
|
||||
}
|
||||
|
||||
@ -111,11 +111,11 @@ void clear_script_list(void) {
|
||||
gScriptListCount = 0;
|
||||
D_802D9CA4 = 0;
|
||||
|
||||
for(i = 0; i < MAX_MAPVARS; i++) {
|
||||
for (i = 0; i < MAX_MAPVARS; i++) {
|
||||
gMapVars[i] = 0;
|
||||
}
|
||||
|
||||
for(i = 0; i < MAX_MAPFLAGS; i++) {
|
||||
for (i = 0; i < MAX_MAPFLAGS; i++) {
|
||||
gMapFlags[i] = 0;
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ void init_script_list(void) {
|
||||
|
||||
void func_802C3390(ScriptInstance* script) {
|
||||
s32 arg;
|
||||
switch(D_8009A5D8) {
|
||||
switch (D_8009A5D8) {
|
||||
default:
|
||||
case 0:
|
||||
case 4:
|
||||
@ -162,13 +162,13 @@ void func_802C3390(ScriptInstance* script) {
|
||||
}
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
ScriptInstance* start_script(Bytecode *initialLine, u8 priority, s32 initialState) {
|
||||
ScriptInstance *newScript;
|
||||
ScriptInstance* start_script(Bytecode* initialLine, u8 priority, s32 initialState) {
|
||||
ScriptInstance* newScript;
|
||||
s32 curScriptIndex;
|
||||
s32 scriptListCount;
|
||||
s32 i;
|
||||
|
||||
for(i = 0; i < MAX_SCRIPTS; i++) {
|
||||
for (i = 0; i < MAX_SCRIPTS; i++) {
|
||||
if ((*gCurrentScriptListPtr)[i] == NULL) {
|
||||
break;
|
||||
}
|
||||
@ -202,11 +202,11 @@ ScriptInstance* start_script(Bytecode *initialLine, u8 priority, s32 initialStat
|
||||
|
||||
scriptListCount = 0;
|
||||
|
||||
for(i = 0; i < 16; i++) {
|
||||
for (i = 0; i < 16; i++) {
|
||||
newScript->varTable[i] = 0;
|
||||
}
|
||||
|
||||
for(i = 0; i < 3; i++){
|
||||
for (i = 0; i < 3; i++) {
|
||||
newScript->varFlags[i] = 0;
|
||||
}
|
||||
|
||||
@ -227,18 +227,18 @@ ScriptInstance* start_script(Bytecode *initialLine, u8 priority, s32 initialStat
|
||||
return newScript;
|
||||
}
|
||||
#else
|
||||
INCLUDE_ASM(ScriptInstance*, "code_e79b0_len_1920", start_script, Bytecode *initialLine, u8 priority, s32 initialState);
|
||||
INCLUDE_ASM(ScriptInstance*, "code_e79b0_len_1920", start_script, Bytecode* initialLine, u8 priority, s32 initialState);
|
||||
#endif
|
||||
|
||||
#ifdef NON_MATCHING
|
||||
ScriptInstance* start_script_in_group(Bytecode* initialLine, s8 priority, s32 initialState, s8 groupFlags) {
|
||||
ScriptInstance *newScript;
|
||||
ScriptInstance* newScript;
|
||||
s32 scriptListCount;
|
||||
s32 i;
|
||||
s32 curScriptIndex;
|
||||
s32* tempCounter = &gStaticScriptCounter;
|
||||
|
||||
for(i = 0; i < MAX_SCRIPTS; i++) {
|
||||
for (i = 0; i < MAX_SCRIPTS; i++) {
|
||||
if ((*gCurrentScriptListPtr)[i] == NULL) {
|
||||
break;
|
||||
}
|
||||
@ -272,11 +272,11 @@ ScriptInstance* start_script_in_group(Bytecode* initialLine, s8 priority, s32 in
|
||||
|
||||
scriptListCount = 0;
|
||||
|
||||
for(i = 0; i < 16; i++) {
|
||||
for (i = 0; i < 16; i++) {
|
||||
newScript->varTable[i] = 0;
|
||||
}
|
||||
|
||||
for(i = 0; i < 3; i++){
|
||||
for (i = 0; i < 3; i++) {
|
||||
newScript->varFlags[i] = 0;
|
||||
}
|
||||
|
||||
@ -289,15 +289,16 @@ ScriptInstance* start_script_in_group(Bytecode* initialLine, s8 priority, s32 in
|
||||
}
|
||||
|
||||
func_802C3390(newScript);
|
||||
if (*tempCounter == 0) {
|
||||
*tempCounter = 1;
|
||||
}
|
||||
if (*tempCounter == 0) {
|
||||
*tempCounter = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return newScript;
|
||||
return newScript;
|
||||
}
|
||||
#else
|
||||
INCLUDE_ASM(ScriptInstance*, "code_e79b0_len_1920", start_script_in_group, Bytecode* initialLine, s8 priority, s32 initialState, s8 groupFlags);
|
||||
INCLUDE_ASM(ScriptInstance*, "code_e79b0_len_1920", start_script_in_group, Bytecode* initialLine, s8 priority,
|
||||
s32 initialState, s8 groupFlags);
|
||||
#endif
|
||||
|
||||
INCLUDE_ASM(s32, "code_e79b0_len_1920", start_child_script);
|
||||
@ -311,7 +312,7 @@ ScriptInstance* func_802C39F8(ScriptInstance* parentScript, Bytecode* nextLine,
|
||||
s32 i;
|
||||
s32 scriptListCount;
|
||||
|
||||
for(i = 0; i < MAX_SCRIPTS; i++) {
|
||||
for (i = 0; i < MAX_SCRIPTS; i++) {
|
||||
if ((*gCurrentScriptListPtr)[i] == NULL) {
|
||||
break;
|
||||
}
|
||||
@ -346,11 +347,11 @@ ScriptInstance* func_802C39F8(ScriptInstance* parentScript, Bytecode* nextLine,
|
||||
|
||||
scriptListCount = 0;
|
||||
|
||||
for(i = 0; i < ARRAY_COUNT(child->varTable); i++) {
|
||||
for (i = 0; i < ARRAY_COUNT(child->varTable); i++) {
|
||||
child->varTable[i] = parentScript->varTable[i];
|
||||
}
|
||||
|
||||
for(i = 0; i < ARRAY_COUNT(child->varFlags); i++){
|
||||
for (i = 0; i < ARRAY_COUNT(child->varFlags); i++) {
|
||||
child->varFlags[i] = parentScript->varFlags[i];
|
||||
}
|
||||
|
||||
@ -369,11 +370,12 @@ ScriptInstance* func_802C39F8(ScriptInstance* parentScript, Bytecode* nextLine,
|
||||
return child;
|
||||
}
|
||||
#else
|
||||
INCLUDE_ASM(ScriptInstance*, "code_e79b0_len_1920", func_802C39F8, ScriptInstance* parentScript, Bytecode* nextLine, s32 newState);
|
||||
INCLUDE_ASM(ScriptInstance*, "code_e79b0_len_1920", func_802C39F8, ScriptInstance* parentScript, Bytecode* nextLine,
|
||||
s32 newState);
|
||||
#endif
|
||||
|
||||
ScriptInstance* func_802C3C10(ScriptInstance *script, Bytecode* line, s32 arg2) {
|
||||
ScriptInstance *curScript;
|
||||
ScriptInstance* func_802C3C10(ScriptInstance* script, Bytecode* line, s32 arg2) {
|
||||
ScriptInstance* curScript;
|
||||
s32 i;
|
||||
|
||||
script->ptrNextLine = line;
|
||||
@ -393,7 +395,7 @@ ScriptInstance* func_802C3C10(ScriptInstance *script, Bytecode* line, s32 arg2)
|
||||
kill_script(script->childScript);
|
||||
}
|
||||
|
||||
for(i = 0; i < MAX_SCRIPTS; i++) {
|
||||
for (i = 0; i < MAX_SCRIPTS; i++) {
|
||||
curScript = (*gCurrentScriptListPtr)[i];
|
||||
if ((curScript != 0) && (curScript->parentScript == script)) {
|
||||
kill_script(curScript);
|
||||
@ -447,7 +449,7 @@ void kill_script(ScriptInstance* instanceToKill) {
|
||||
s32 j;
|
||||
s32 i;
|
||||
|
||||
for(i = 0; i < MAX_SCRIPTS; i++) {
|
||||
for (i = 0; i < MAX_SCRIPTS; i++) {
|
||||
if ((*gCurrentScriptListPtr)[i] == instanceToKill) {
|
||||
break;
|
||||
}
|
||||
@ -462,7 +464,7 @@ void kill_script(ScriptInstance* instanceToKill) {
|
||||
kill_script(childScript);
|
||||
}
|
||||
|
||||
for(j = 0; j < MAX_SCRIPTS; j++) {
|
||||
for (j = 0; j < MAX_SCRIPTS; j++) {
|
||||
ScriptInstance* tempScriptInstance = (*gCurrentScriptListPtr)[j];
|
||||
if (tempScriptInstance != NULL) {
|
||||
if (tempScriptInstance->parentScript == instanceToKill) {
|
||||
@ -476,11 +478,11 @@ void kill_script(ScriptInstance* instanceToKill) {
|
||||
blockingParent->childScript = NULL;
|
||||
blockingParent->state &= ~0x10;
|
||||
|
||||
for(j = 0; j < ARRAY_COUNT(blockingParent->varTable); j++) {
|
||||
for (j = 0; j < ARRAY_COUNT(blockingParent->varTable); j++) {
|
||||
blockingParent->varTable[j] = instanceToKill->varTable[j];
|
||||
}
|
||||
|
||||
for(j = 0; j < ARRAY_COUNT(blockingParent->varFlags); j++) {
|
||||
for (j = 0; j < ARRAY_COUNT(blockingParent->varFlags); j++) {
|
||||
blockingParent->varFlags[j] = instanceToKill->varFlags[j];
|
||||
}
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ ApiStatus func_802D4BDC(ScriptInstance* script, s32 initialCall) {
|
||||
if (t1v == 255) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
|
||||
t1v += 10;
|
||||
*t1 = t1v;
|
||||
if (t1v > 255) {
|
||||
@ -236,7 +236,7 @@ ApiStatus func_802D4C4C(ScriptInstance* script, s32 initialCall) {
|
||||
}
|
||||
t1v -= 10;
|
||||
*t1 = t1v;
|
||||
if(t1v < 0) {
|
||||
if (t1v < 0) {
|
||||
*t1 = 0;
|
||||
}
|
||||
func_80137DA4(10, *t1);
|
||||
@ -274,10 +274,10 @@ ApiStatus func_802D4D88(ScriptInstance* script, s32 initialCall) {
|
||||
#ifdef NON_MATCHING
|
||||
// most likely functionally equivalent, lots of issues though.
|
||||
void setup_path_data(s32 numVecs, f32* arg1, struct Vec3f* arg2, struct Vec3f* arg3) {
|
||||
struct Vec3f *temp_s4;
|
||||
f32 *temp_s7;
|
||||
struct Vec3f* temp_s4;
|
||||
f32* temp_s7;
|
||||
s32 i;
|
||||
f32 *temp;
|
||||
f32* temp;
|
||||
f32 new_var;
|
||||
f32 new_var2;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user