mirror of https://github.com/pmret/papermario.git
Decomp funcs in 190B20 and 197F40 and create DictionaryEntry struct (#444)
* Decomp small funcs in 190B20 and 197F40 * Create struct for dictionary entries
This commit is contained in:
parent
555f0ea15b
commit
1ae2c69c3f
70
src/190B20.c
70
src/190B20.c
|
|
@ -1200,28 +1200,62 @@ INCLUDE_ASM(s32, "190B20", func_80265CE8);
|
|||
|
||||
INCLUDE_ASM(s32, "190B20", func_80265D44);
|
||||
|
||||
s32 lookup_defense(DefenseTableEntry* defenseTable, Element elementKey) {
|
||||
DefenseTableEntry* row;
|
||||
s32 lookup_defense(DictionaryEntry* defenseTable, Element elementKey) {
|
||||
s32 normalDefense = 0;
|
||||
|
||||
for (row = defenseTable; row->element != ELEMENT_END; row++, defenseTable++) {
|
||||
if (row->element == ELEMENT_NORMAL) {
|
||||
normalDefense = defenseTable->defense;
|
||||
while (defenseTable->key != ELEMENT_END) {
|
||||
if (defenseTable->key == ELEMENT_NORMAL) {
|
||||
normalDefense = defenseTable->value;
|
||||
}
|
||||
|
||||
if (row->element == elementKey) {
|
||||
normalDefense = defenseTable->defense;
|
||||
if (defenseTable->key == elementKey) {
|
||||
normalDefense = defenseTable->value;
|
||||
break;
|
||||
}
|
||||
defenseTable++;
|
||||
}
|
||||
|
||||
// Fall back to normal defense if given element is not specified in table
|
||||
return normalDefense;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "190B20", lookup_status_chance); // exactly (?) the same as lookup_defense
|
||||
s32 lookup_status_chance(DictionaryEntry* statusTable, Element statusKey) {
|
||||
s32 defaultChance = 0;
|
||||
|
||||
INCLUDE_ASM(s32, "190B20", lookup_status_duration_mod); // exactly (?) the same as lookup_defense
|
||||
while (statusTable->key != STATUS_END) {
|
||||
if (statusTable->key == STATUS_DEFAULT) {
|
||||
defaultChance = statusTable->value;
|
||||
}
|
||||
|
||||
if (statusTable->key == statusKey) {
|
||||
defaultChance = statusTable->value;
|
||||
break;
|
||||
}
|
||||
statusTable++;
|
||||
}
|
||||
|
||||
// Fall back to normal chance if given element is not specified in table
|
||||
return defaultChance;
|
||||
}
|
||||
|
||||
s32 lookup_status_duration_mod(DictionaryEntry* statusTable, Element statusKey) {
|
||||
s32 defaultTurnMod = 0;
|
||||
|
||||
while (statusTable->key != ELEMENT_END) {
|
||||
if (statusTable->key == STATUS_DEFAULT_TURN_MOD) {
|
||||
defaultTurnMod = statusTable->value;
|
||||
}
|
||||
|
||||
if (statusTable->key == statusKey) {
|
||||
defaultTurnMod = statusTable->value;
|
||||
break;
|
||||
}
|
||||
statusTable++;
|
||||
}
|
||||
|
||||
// Fall back to normal duration if given element is not specified in table
|
||||
return defaultTurnMod;
|
||||
}
|
||||
|
||||
s32 inflict_status(Actor* target, s32 statusTypeKey, s32 duration) {
|
||||
BattleStatus* battleStatus = &gBattleStatus;
|
||||
|
|
@ -1474,7 +1508,23 @@ INCLUDE_ASM(s32, "190B20", func_80266B14);
|
|||
|
||||
INCLUDE_ASM(s32, "190B20", try_inflict_status);
|
||||
|
||||
INCLUDE_ASM(s32, "190B20", inflict_status_set_duration);
|
||||
s32 inflict_status_set_duration(Actor* actor, s32 statusTypeKey, s32 statusDurationKey, s32 duration) {
|
||||
s32 var0 = duration;
|
||||
s32 statusDuration = 0;
|
||||
|
||||
if (actor->statusTable == NULL || lookup_status_chance(actor->statusTable, statusTypeKey) > 0) {
|
||||
statusDuration = var0;
|
||||
}
|
||||
|
||||
if (statusDuration > 0) {
|
||||
return inflict_status(actor, statusTypeKey, statusDuration);
|
||||
} else {
|
||||
var0 = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
INCLUDE_ASM(s32, "190B20", func_80266D6C);
|
||||
|
||||
|
|
|
|||
104
src/197F40.c
104
src/197F40.c
|
|
@ -99,7 +99,13 @@ Actor* get_actor(ActorID actorID) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "197F40", LoadBattleSection);
|
||||
ApiStatus LoadBattleSection(Evt* script, s32 isInitialCall) {
|
||||
BattleArea* battleArea = &gBattleAreas[evt_get_variable(script, *script->ptrReadPos)];
|
||||
|
||||
dma_copy(battleArea->dmaStart, battleArea->dmaEnd, battleArea->dmaDest);
|
||||
return ApiStatus_DONE1;
|
||||
}
|
||||
|
||||
|
||||
ApiStatus GetBattlePhase(Evt* script, s32 isInitialCall) {
|
||||
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.battlePhase);
|
||||
|
|
@ -2090,7 +2096,16 @@ ApiStatus InitTargetIterator(Evt* script, s32 isInitialCall) {
|
|||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "197F40", SetOwnerTarget);
|
||||
ApiStatus SetOwnerTarget(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
Actor* actor = get_actor(script->owner1.enemyID);
|
||||
s16 actorID = evt_get_variable(script, *args++);
|
||||
|
||||
actor->targetPartIndex = evt_get_variable(script, *args++);
|
||||
actor->targetActorID = actorID;
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "197F40", ChooseNextTarget);
|
||||
|
||||
|
|
@ -2156,7 +2171,14 @@ ApiStatus func_8026F60C(Evt* script, s32 isInitialCall) {
|
|||
|
||||
INCLUDE_ASM(s32, "197F40", SetBattleVar);
|
||||
|
||||
INCLUDE_ASM(s32, "197F40", GetBattleVar);
|
||||
ApiStatus GetBattleVar(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 varIdx = evt_get_variable(script, *args++);
|
||||
|
||||
evt_set_variable(script, *args++, gBattleStatus.varTable[varIdx]);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
|
||||
ApiStatus ResetAllActorSounds(Evt* script, s32 isInitialCall) {
|
||||
ActorID actorID = evt_get_variable(script, *script->ptrReadPos);
|
||||
|
|
@ -2175,7 +2197,27 @@ INCLUDE_ASM(s32, "197F40", ResetActorSounds);
|
|||
|
||||
INCLUDE_ASM(s32, "197F40", SetPartSounds);
|
||||
|
||||
INCLUDE_ASM(s32, "197F40", SetActorType);
|
||||
ApiStatus SetActorType(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
ActorID* actorID = evt_get_variable(script, *args++);
|
||||
Actor* enemy;
|
||||
s32 actorType;
|
||||
|
||||
if (actorID == ACTOR_SELF) {
|
||||
actorID = script->owner1.enemyID;
|
||||
}
|
||||
|
||||
actorType = evt_get_variable(script, *args++);
|
||||
enemy = get_actor(actorID);
|
||||
|
||||
if (is_actor_hp_bar_visible(enemy)) {
|
||||
load_tattle_flags(actorType);
|
||||
}
|
||||
|
||||
enemy->actorType = actorType;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
|
||||
ApiStatus ShowShockEffect(Evt* script, s32 isInitialCall) {
|
||||
ActorID actorID = evt_get_variable(script, *script->ptrReadPos);
|
||||
|
|
@ -2188,9 +2230,33 @@ ApiStatus ShowShockEffect(Evt* script, s32 isInitialCall) {
|
|||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "197F40", GetActorAttackBoost);
|
||||
ApiStatus GetActorAttackBoost(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 enemyID = evt_get_variable(script, *args++);
|
||||
Bytecode attackBoost;
|
||||
|
||||
INCLUDE_ASM(s32, "197F40", GetActorDefenseBoost);
|
||||
if (enemyID == ACTOR_SELF) {
|
||||
enemyID = script->owner1.enemyID;
|
||||
}
|
||||
|
||||
attackBoost = *args++;
|
||||
evt_set_variable(script, attackBoost, get_actor(enemyID)->attackBoost);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus GetActorDefenseBoost(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 enemyID = evt_get_variable(script, *args++);
|
||||
Bytecode defenseBoost;
|
||||
|
||||
if (enemyID == ACTOR_SELF) {
|
||||
enemyID = script->owner1.enemyID;
|
||||
}
|
||||
|
||||
defenseBoost = *args++;
|
||||
evt_set_variable(script, defenseBoost, get_actor(enemyID)->defenseBoost);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "197F40", BoostAttack);
|
||||
|
||||
|
|
@ -2206,4 +2272,28 @@ ApiStatus WaitForBuffDone(Evt* script, s32 isInitialCall) {
|
|||
return (D_8029FBD4 == 0) * ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "197F40", CopyBuffs);
|
||||
ApiStatus CopyBuffs(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
ActorID actorID = evt_get_variable(script, *args++);
|
||||
Actor* actorFrom;
|
||||
Actor* actorTo;
|
||||
|
||||
if (actorID == ACTOR_SELF) {
|
||||
actorID = script->owner1.enemyID;
|
||||
}
|
||||
actorFrom = get_actor(actorID);
|
||||
|
||||
actorID = evt_get_variable(script, *args++);
|
||||
if (actorID == ACTOR_SELF) {
|
||||
actorID = script->owner1.enemyID;
|
||||
}
|
||||
actorTo = get_actor(actorID);
|
||||
|
||||
actorTo->isGlowing = actorFrom->isGlowing;
|
||||
actorTo->attackBoost = actorFrom->attackBoost;
|
||||
actorTo->defenseBoost = actorFrom->defenseBoost;
|
||||
actorTo->chillOutAmount = actorFrom->chillOutAmount;
|
||||
actorTo->chillOutTurns = actorFrom->chillOutTurns;
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -296,12 +296,14 @@ extern BattleArea gBattleAreas[0x30];
|
|||
|
||||
// TODO: enum for home position (0..3 are floor, 4..7 are air, etc.)
|
||||
|
||||
typedef struct {
|
||||
Element element;
|
||||
s32 defense;
|
||||
} DefenseTableEntry;
|
||||
typedef struct DictionaryEntry {
|
||||
/* 0x00 */ s32 key;
|
||||
/* 0x04 */ s32 value;
|
||||
} DictionaryEntry; // size = 0x08
|
||||
|
||||
typedef DefenseTableEntry DefenseTable[];
|
||||
typedef DictionaryEntry DefenseTable[];
|
||||
|
||||
typedef DictionaryEntry StatusTable[];
|
||||
|
||||
typedef struct ActorSounds {
|
||||
/* 0x00 */ SoundID walk[2];
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel inflict_status_set_duration
|
||||
/* 1955D0 80266CF0 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* 1955D4 80266CF4 AFB20018 */ sw $s2, 0x18($sp)
|
||||
/* 1955D8 80266CF8 0080902D */ daddu $s2, $a0, $zero
|
||||
/* 1955DC 80266CFC AFB3001C */ sw $s3, 0x1c($sp)
|
||||
/* 1955E0 80266D00 00A0982D */ daddu $s3, $a1, $zero
|
||||
/* 1955E4 80266D04 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 1955E8 80266D08 00E0882D */ daddu $s1, $a3, $zero
|
||||
/* 1955EC 80266D0C AFBF0020 */ sw $ra, 0x20($sp)
|
||||
/* 1955F0 80266D10 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 1955F4 80266D14 8E44020C */ lw $a0, 0x20c($s2)
|
||||
/* 1955F8 80266D18 10800005 */ beqz $a0, .L80266D30
|
||||
/* 1955FC 80266D1C 0000802D */ daddu $s0, $zero, $zero
|
||||
/* 195600 80266D20 0C0997A6 */ jal lookup_status_chance
|
||||
/* 195604 80266D24 00000000 */ nop
|
||||
/* 195608 80266D28 18400002 */ blez $v0, .L80266D34
|
||||
/* 19560C 80266D2C 00000000 */ nop
|
||||
.L80266D30:
|
||||
/* 195610 80266D30 0220802D */ daddu $s0, $s1, $zero
|
||||
.L80266D34:
|
||||
/* 195614 80266D34 1E000003 */ bgtz $s0, .L80266D44
|
||||
/* 195618 80266D38 0240202D */ daddu $a0, $s2, $zero
|
||||
/* 19561C 80266D3C 08099B54 */ j .L80266D50
|
||||
/* 195620 80266D40 0000102D */ daddu $v0, $zero, $zero
|
||||
.L80266D44:
|
||||
/* 195624 80266D44 0260282D */ daddu $a1, $s3, $zero
|
||||
/* 195628 80266D48 0C0997D0 */ jal inflict_status
|
||||
/* 19562C 80266D4C 0200302D */ daddu $a2, $s0, $zero
|
||||
.L80266D50:
|
||||
/* 195630 80266D50 8FBF0020 */ lw $ra, 0x20($sp)
|
||||
/* 195634 80266D54 8FB3001C */ lw $s3, 0x1c($sp)
|
||||
/* 195638 80266D58 8FB20018 */ lw $s2, 0x18($sp)
|
||||
/* 19563C 80266D5C 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 195640 80266D60 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 195644 80266D64 03E00008 */ jr $ra
|
||||
/* 195648 80266D68 27BD0028 */ addiu $sp, $sp, 0x28
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel lookup_status_chance
|
||||
/* 194778 80265E98 0080182D */ daddu $v1, $a0, $zero
|
||||
/* 19477C 80265E9C 8C620000 */ lw $v0, ($v1)
|
||||
/* 194780 80265EA0 1040000F */ beqz $v0, .L80265EE0
|
||||
/* 194784 80265EA4 0000302D */ daddu $a2, $zero, $zero
|
||||
/* 194788 80265EA8 24070002 */ addiu $a3, $zero, 2
|
||||
/* 19478C 80265EAC 24840004 */ addiu $a0, $a0, 4
|
||||
/* 194790 80265EB0 8C620000 */ lw $v0, ($v1)
|
||||
.L80265EB4:
|
||||
/* 194794 80265EB4 14470002 */ bne $v0, $a3, .L80265EC0
|
||||
/* 194798 80265EB8 00000000 */ nop
|
||||
/* 19479C 80265EBC 8C860000 */ lw $a2, ($a0)
|
||||
.L80265EC0:
|
||||
/* 1947A0 80265EC0 14450004 */ bne $v0, $a1, .L80265ED4
|
||||
/* 1947A4 80265EC4 24630008 */ addiu $v1, $v1, 8
|
||||
/* 1947A8 80265EC8 8C860000 */ lw $a2, ($a0)
|
||||
/* 1947AC 80265ECC 03E00008 */ jr $ra
|
||||
/* 1947B0 80265ED0 00C0102D */ daddu $v0, $a2, $zero
|
||||
.L80265ED4:
|
||||
/* 1947B4 80265ED4 8C620000 */ lw $v0, ($v1)
|
||||
/* 1947B8 80265ED8 1440FFF6 */ bnez $v0, .L80265EB4
|
||||
/* 1947BC 80265EDC 24840008 */ addiu $a0, $a0, 8
|
||||
.L80265EE0:
|
||||
/* 1947C0 80265EE0 00C0102D */ daddu $v0, $a2, $zero
|
||||
/* 1947C4 80265EE4 03E00008 */ jr $ra
|
||||
/* 1947C8 80265EE8 00000000 */ nop
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel lookup_status_duration_mod
|
||||
/* 1947CC 80265EEC 0080182D */ daddu $v1, $a0, $zero
|
||||
/* 1947D0 80265EF0 8C620000 */ lw $v0, ($v1)
|
||||
/* 1947D4 80265EF4 1040000F */ beqz $v0, .L80265F34
|
||||
/* 1947D8 80265EF8 0000302D */ daddu $a2, $zero, $zero
|
||||
/* 1947DC 80265EFC 2407001F */ addiu $a3, $zero, 0x1f
|
||||
/* 1947E0 80265F00 24840004 */ addiu $a0, $a0, 4
|
||||
/* 1947E4 80265F04 8C620000 */ lw $v0, ($v1)
|
||||
.L80265F08:
|
||||
/* 1947E8 80265F08 14470002 */ bne $v0, $a3, .L80265F14
|
||||
/* 1947EC 80265F0C 00000000 */ nop
|
||||
/* 1947F0 80265F10 8C860000 */ lw $a2, ($a0)
|
||||
.L80265F14:
|
||||
/* 1947F4 80265F14 14450004 */ bne $v0, $a1, .L80265F28
|
||||
/* 1947F8 80265F18 24630008 */ addiu $v1, $v1, 8
|
||||
/* 1947FC 80265F1C 8C860000 */ lw $a2, ($a0)
|
||||
/* 194800 80265F20 03E00008 */ jr $ra
|
||||
/* 194804 80265F24 00C0102D */ daddu $v0, $a2, $zero
|
||||
.L80265F28:
|
||||
/* 194808 80265F28 8C620000 */ lw $v0, ($v1)
|
||||
/* 19480C 80265F2C 1440FFF6 */ bnez $v0, .L80265F08
|
||||
/* 194810 80265F30 24840008 */ addiu $a0, $a0, 8
|
||||
.L80265F34:
|
||||
/* 194814 80265F34 00C0102D */ daddu $v0, $a2, $zero
|
||||
/* 194818 80265F38 03E00008 */ jr $ra
|
||||
/* 19481C 80265F3C 00000000 */ nop
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel CopyBuffs
|
||||
/* 19FA40 80271160 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 19FA44 80271164 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 19FA48 80271168 0080882D */ daddu $s1, $a0, $zero
|
||||
/* 19FA4C 8027116C AFBF001C */ sw $ra, 0x1c($sp)
|
||||
/* 19FA50 80271170 AFB20018 */ sw $s2, 0x18($sp)
|
||||
/* 19FA54 80271174 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 19FA58 80271178 8E30000C */ lw $s0, 0xc($s1)
|
||||
/* 19FA5C 8027117C 8E050000 */ lw $a1, ($s0)
|
||||
/* 19FA60 80271180 0C0B1EAF */ jal evt_get_variable
|
||||
/* 19FA64 80271184 26100004 */ addiu $s0, $s0, 4
|
||||
/* 19FA68 80271188 2412FF81 */ addiu $s2, $zero, -0x7f
|
||||
/* 19FA6C 8027118C 14520002 */ bne $v0, $s2, .L80271198
|
||||
/* 19FA70 80271190 00000000 */ nop
|
||||
/* 19FA74 80271194 8E220148 */ lw $v0, 0x148($s1)
|
||||
.L80271198:
|
||||
/* 19FA78 80271198 0C09A75B */ jal get_actor
|
||||
/* 19FA7C 8027119C 0040202D */ daddu $a0, $v0, $zero
|
||||
/* 19FA80 802711A0 0220202D */ daddu $a0, $s1, $zero
|
||||
/* 19FA84 802711A4 8E050000 */ lw $a1, ($s0)
|
||||
/* 19FA88 802711A8 0C0B1EAF */ jal evt_get_variable
|
||||
/* 19FA8C 802711AC 0040802D */ daddu $s0, $v0, $zero
|
||||
/* 19FA90 802711B0 14520002 */ bne $v0, $s2, .L802711BC
|
||||
/* 19FA94 802711B4 00000000 */ nop
|
||||
/* 19FA98 802711B8 8E220148 */ lw $v0, 0x148($s1)
|
||||
.L802711BC:
|
||||
/* 19FA9C 802711BC 0C09A75B */ jal get_actor
|
||||
/* 19FAA0 802711C0 0040202D */ daddu $a0, $v0, $zero
|
||||
/* 19FAA4 802711C4 92040220 */ lbu $a0, 0x220($s0)
|
||||
/* 19FAA8 802711C8 0040182D */ daddu $v1, $v0, $zero
|
||||
/* 19FAAC 802711CC A0640220 */ sb $a0, 0x220($v1)
|
||||
/* 19FAB0 802711D0 92020221 */ lbu $v0, 0x221($s0)
|
||||
/* 19FAB4 802711D4 A0620221 */ sb $v0, 0x221($v1)
|
||||
/* 19FAB8 802711D8 92020222 */ lbu $v0, 0x222($s0)
|
||||
/* 19FABC 802711DC A0620222 */ sb $v0, 0x222($v1)
|
||||
/* 19FAC0 802711E0 92020223 */ lbu $v0, 0x223($s0)
|
||||
/* 19FAC4 802711E4 A0620223 */ sb $v0, 0x223($v1)
|
||||
/* 19FAC8 802711E8 92040224 */ lbu $a0, 0x224($s0)
|
||||
/* 19FACC 802711EC A0640224 */ sb $a0, 0x224($v1)
|
||||
/* 19FAD0 802711F0 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
/* 19FAD4 802711F4 8FB20018 */ lw $s2, 0x18($sp)
|
||||
/* 19FAD8 802711F8 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 19FADC 802711FC 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 19FAE0 80271200 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19FAE4 80271204 03E00008 */ jr $ra
|
||||
/* 19FAE8 80271208 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
/* 19FAEC 8027120C 00000000 */ nop
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel GetActorAttackBoost
|
||||
/* 19E4E4 8026FC04 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 19E4E8 8026FC08 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 19E4EC 8026FC0C 0080882D */ daddu $s1, $a0, $zero
|
||||
/* 19E4F0 8026FC10 AFBF0018 */ sw $ra, 0x18($sp)
|
||||
/* 19E4F4 8026FC14 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 19E4F8 8026FC18 8E30000C */ lw $s0, 0xc($s1)
|
||||
/* 19E4FC 8026FC1C 8E050000 */ lw $a1, ($s0)
|
||||
/* 19E500 8026FC20 0C0B1EAF */ jal evt_get_variable
|
||||
/* 19E504 8026FC24 26100004 */ addiu $s0, $s0, 4
|
||||
/* 19E508 8026FC28 0040202D */ daddu $a0, $v0, $zero
|
||||
/* 19E50C 8026FC2C 2402FF81 */ addiu $v0, $zero, -0x7f
|
||||
/* 19E510 8026FC30 14820002 */ bne $a0, $v0, .L8026FC3C
|
||||
/* 19E514 8026FC34 00000000 */ nop
|
||||
/* 19E518 8026FC38 8E240148 */ lw $a0, 0x148($s1)
|
||||
.L8026FC3C:
|
||||
/* 19E51C 8026FC3C 0C09A75B */ jal get_actor
|
||||
/* 19E520 8026FC40 8E100000 */ lw $s0, ($s0)
|
||||
/* 19E524 8026FC44 0220202D */ daddu $a0, $s1, $zero
|
||||
/* 19E528 8026FC48 80460221 */ lb $a2, 0x221($v0)
|
||||
/* 19E52C 8026FC4C 0C0B2026 */ jal evt_set_variable
|
||||
/* 19E530 8026FC50 0200282D */ daddu $a1, $s0, $zero
|
||||
/* 19E534 8026FC54 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 19E538 8026FC58 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 19E53C 8026FC5C 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 19E540 8026FC60 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19E544 8026FC64 03E00008 */ jr $ra
|
||||
/* 19E548 8026FC68 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel GetActorDefenseBoost
|
||||
/* 19E54C 8026FC6C 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 19E550 8026FC70 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 19E554 8026FC74 0080882D */ daddu $s1, $a0, $zero
|
||||
/* 19E558 8026FC78 AFBF0018 */ sw $ra, 0x18($sp)
|
||||
/* 19E55C 8026FC7C AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 19E560 8026FC80 8E30000C */ lw $s0, 0xc($s1)
|
||||
/* 19E564 8026FC84 8E050000 */ lw $a1, ($s0)
|
||||
/* 19E568 8026FC88 0C0B1EAF */ jal evt_get_variable
|
||||
/* 19E56C 8026FC8C 26100004 */ addiu $s0, $s0, 4
|
||||
/* 19E570 8026FC90 0040202D */ daddu $a0, $v0, $zero
|
||||
/* 19E574 8026FC94 2402FF81 */ addiu $v0, $zero, -0x7f
|
||||
/* 19E578 8026FC98 14820002 */ bne $a0, $v0, .L8026FCA4
|
||||
/* 19E57C 8026FC9C 00000000 */ nop
|
||||
/* 19E580 8026FCA0 8E240148 */ lw $a0, 0x148($s1)
|
||||
.L8026FCA4:
|
||||
/* 19E584 8026FCA4 0C09A75B */ jal get_actor
|
||||
/* 19E588 8026FCA8 8E100000 */ lw $s0, ($s0)
|
||||
/* 19E58C 8026FCAC 0220202D */ daddu $a0, $s1, $zero
|
||||
/* 19E590 8026FCB0 80460222 */ lb $a2, 0x222($v0)
|
||||
/* 19E594 8026FCB4 0C0B2026 */ jal evt_set_variable
|
||||
/* 19E598 8026FCB8 0200282D */ daddu $a1, $s0, $zero
|
||||
/* 19E59C 8026FCBC 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 19E5A0 8026FCC0 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 19E5A4 8026FCC4 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 19E5A8 8026FCC8 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19E5AC 8026FCCC 03E00008 */ jr $ra
|
||||
/* 19E5B0 8026FCD0 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel GetBattleVar
|
||||
/* 19DF74 8026F694 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 19DF78 8026F698 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 19DF7C 8026F69C 0080882D */ daddu $s1, $a0, $zero
|
||||
/* 19DF80 8026F6A0 AFBF0018 */ sw $ra, 0x18($sp)
|
||||
/* 19DF84 8026F6A4 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 19DF88 8026F6A8 8E30000C */ lw $s0, 0xc($s1)
|
||||
/* 19DF8C 8026F6AC 8E050000 */ lw $a1, ($s0)
|
||||
/* 19DF90 8026F6B0 0C0B1EAF */ jal evt_get_variable
|
||||
/* 19DF94 8026F6B4 26100004 */ addiu $s0, $s0, 4
|
||||
/* 19DF98 8026F6B8 00021080 */ sll $v0, $v0, 2
|
||||
/* 19DF9C 8026F6BC 8E050000 */ lw $a1, ($s0)
|
||||
/* 19DFA0 8026F6C0 3C06800E */ lui $a2, %hi(gBattleStatus+0x8)
|
||||
/* 19DFA4 8026F6C4 00C23021 */ addu $a2, $a2, $v0
|
||||
/* 19DFA8 8026F6C8 8CC6C078 */ lw $a2, %lo(gBattleStatus+0x8)($a2)
|
||||
/* 19DFAC 8026F6CC 0C0B2026 */ jal evt_set_variable
|
||||
/* 19DFB0 8026F6D0 0220202D */ daddu $a0, $s1, $zero
|
||||
/* 19DFB4 8026F6D4 8FBF0018 */ lw $ra, 0x18($sp)
|
||||
/* 19DFB8 8026F6D8 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 19DFBC 8026F6DC 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 19DFC0 8026F6E0 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19DFC4 8026F6E4 03E00008 */ jr $ra
|
||||
/* 19DFC8 8026F6E8 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel LoadBattleSection
|
||||
/* 1986C4 80269DE4 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 1986C8 80269DE8 AFBF0010 */ sw $ra, 0x10($sp)
|
||||
/* 1986CC 80269DEC 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 1986D0 80269DF0 0C0B1EAF */ jal evt_get_variable
|
||||
/* 1986D4 80269DF4 8C450000 */ lw $a1, ($v0)
|
||||
/* 1986D8 80269DF8 3C038009 */ lui $v1, %hi(gBattleAreas)
|
||||
/* 1986DC 80269DFC 24635A30 */ addiu $v1, $v1, %lo(gBattleAreas)
|
||||
/* 1986E0 80269E00 00021140 */ sll $v0, $v0, 5
|
||||
/* 1986E4 80269E04 00431021 */ addu $v0, $v0, $v1
|
||||
/* 1986E8 80269E08 8C440004 */ lw $a0, 4($v0)
|
||||
/* 1986EC 80269E0C 8C450008 */ lw $a1, 8($v0)
|
||||
/* 1986F0 80269E10 0C00A5CF */ jal dma_copy
|
||||
/* 1986F4 80269E14 8C46000C */ lw $a2, 0xc($v0)
|
||||
/* 1986F8 80269E18 8FBF0010 */ lw $ra, 0x10($sp)
|
||||
/* 1986FC 80269E1C 24020001 */ addiu $v0, $zero, 1
|
||||
/* 198700 80269E20 03E00008 */ jr $ra
|
||||
/* 198704 80269E24 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel SetActorType
|
||||
/* 19E400 8026FB20 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 19E404 8026FB24 AFB20018 */ sw $s2, 0x18($sp)
|
||||
/* 19E408 8026FB28 0080902D */ daddu $s2, $a0, $zero
|
||||
/* 19E40C 8026FB2C AFBF001C */ sw $ra, 0x1c($sp)
|
||||
/* 19E410 8026FB30 AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 19E414 8026FB34 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 19E418 8026FB38 8E51000C */ lw $s1, 0xc($s2)
|
||||
/* 19E41C 8026FB3C 8E250000 */ lw $a1, ($s1)
|
||||
/* 19E420 8026FB40 0C0B1EAF */ jal evt_get_variable
|
||||
/* 19E424 8026FB44 26310004 */ addiu $s1, $s1, 4
|
||||
/* 19E428 8026FB48 0040802D */ daddu $s0, $v0, $zero
|
||||
/* 19E42C 8026FB4C 2402FF81 */ addiu $v0, $zero, -0x7f
|
||||
/* 19E430 8026FB50 16020002 */ bne $s0, $v0, .L8026FB5C
|
||||
/* 19E434 8026FB54 00000000 */ nop
|
||||
/* 19E438 8026FB58 8E500148 */ lw $s0, 0x148($s2)
|
||||
.L8026FB5C:
|
||||
/* 19E43C 8026FB5C 8E250000 */ lw $a1, ($s1)
|
||||
/* 19E440 8026FB60 0C0B1EAF */ jal evt_get_variable
|
||||
/* 19E444 8026FB64 0240202D */ daddu $a0, $s2, $zero
|
||||
/* 19E448 8026FB68 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 19E44C 8026FB6C 0C09A75B */ jal get_actor
|
||||
/* 19E450 8026FB70 0040882D */ daddu $s1, $v0, $zero
|
||||
/* 19E454 8026FB74 0040802D */ daddu $s0, $v0, $zero
|
||||
/* 19E458 8026FB78 0C094F08 */ jal is_actor_hp_bar_visible
|
||||
/* 19E45C 8026FB7C 0200202D */ daddu $a0, $s0, $zero
|
||||
/* 19E460 8026FB80 50400004 */ beql $v0, $zero, .L8026FB94
|
||||
/* 19E464 8026FB84 A2110136 */ sb $s1, 0x136($s0)
|
||||
/* 19E468 8026FB88 0C094F9E */ jal load_tattle_flags
|
||||
/* 19E46C 8026FB8C 0220202D */ daddu $a0, $s1, $zero
|
||||
/* 19E470 8026FB90 A2110136 */ sb $s1, 0x136($s0)
|
||||
.L8026FB94:
|
||||
/* 19E474 8026FB94 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
/* 19E478 8026FB98 8FB20018 */ lw $s2, 0x18($sp)
|
||||
/* 19E47C 8026FB9C 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 19E480 8026FBA0 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 19E484 8026FBA4 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19E488 8026FBA8 03E00008 */ jr $ra
|
||||
/* 19E48C 8026FBAC 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel SetOwnerTarget
|
||||
/* 19CC88 8026E3A8 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 19CC8C 8026E3AC AFB10014 */ sw $s1, 0x14($sp)
|
||||
/* 19CC90 8026E3B0 0080882D */ daddu $s1, $a0, $zero
|
||||
/* 19CC94 8026E3B4 AFBF001C */ sw $ra, 0x1c($sp)
|
||||
/* 19CC98 8026E3B8 AFB20018 */ sw $s2, 0x18($sp)
|
||||
/* 19CC9C 8026E3BC AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 19CCA0 8026E3C0 8E240148 */ lw $a0, 0x148($s1)
|
||||
/* 19CCA4 8026E3C4 0C09A75B */ jal get_actor
|
||||
/* 19CCA8 8026E3C8 8E30000C */ lw $s0, 0xc($s1)
|
||||
/* 19CCAC 8026E3CC 8E050000 */ lw $a1, ($s0)
|
||||
/* 19CCB0 8026E3D0 26100004 */ addiu $s0, $s0, 4
|
||||
/* 19CCB4 8026E3D4 0220202D */ daddu $a0, $s1, $zero
|
||||
/* 19CCB8 8026E3D8 0C0B1EAF */ jal evt_get_variable
|
||||
/* 19CCBC 8026E3DC 0040902D */ daddu $s2, $v0, $zero
|
||||
/* 19CCC0 8026E3E0 0220202D */ daddu $a0, $s1, $zero
|
||||
/* 19CCC4 8026E3E4 8E050000 */ lw $a1, ($s0)
|
||||
/* 19CCC8 8026E3E8 0C0B1EAF */ jal evt_get_variable
|
||||
/* 19CCCC 8026E3EC 0040802D */ daddu $s0, $v0, $zero
|
||||
/* 19CCD0 8026E3F0 A2420426 */ sb $v0, 0x426($s2)
|
||||
/* 19CCD4 8026E3F4 A6500428 */ sh $s0, 0x428($s2)
|
||||
/* 19CCD8 8026E3F8 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
/* 19CCDC 8026E3FC 8FB20018 */ lw $s2, 0x18($sp)
|
||||
/* 19CCE0 8026E400 8FB10014 */ lw $s1, 0x14($sp)
|
||||
/* 19CCE4 8026E404 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 19CCE8 8026E408 24020002 */ addiu $v0, $zero, 2
|
||||
/* 19CCEC 8026E40C 03E00008 */ jr $ra
|
||||
/* 19CCF0 8026E410 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
Loading…
Reference in New Issue