mirror of https://github.com/pret/pokeemerald.git
Matching the unmatched and another function
This commit is contained in:
parent
44c1ea16b9
commit
301664db2f
|
@ -205,42 +205,42 @@
|
|||
// .pool
|
||||
// thumb_func_end sub_816166C
|
||||
|
||||
thumb_func_start sub_81616C0
|
||||
sub_81616C0: @ 81616C0
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
lsls r5, 24
|
||||
lsrs r5, 24
|
||||
ldr r0, =gUnknown_0203CEC8
|
||||
movs r1, 0xA
|
||||
ldrsb r1, [r0, r1]
|
||||
movs r0, 0x64
|
||||
muls r0, r1
|
||||
ldr r1, =gPlayerParty
|
||||
adds r0, r1
|
||||
ldr r1, =gStringVar1
|
||||
bl GetMonNickname
|
||||
ldr r4, =gStringVar4
|
||||
ldr r1, =gText_PkmnHPRestoredByVar2
|
||||
adds r0, r4, 0
|
||||
bl StringExpandPlaceholders
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
bl sub_81B1B5C
|
||||
movs r0, 0x2
|
||||
bl schedule_bg_copy_tilemap_to_vram
|
||||
ldr r1, =gTasks
|
||||
lsls r0, r5, 2
|
||||
adds r0, r5
|
||||
lsls r0, 3
|
||||
adds r0, r1
|
||||
ldr r1, =sub_8161724
|
||||
str r1, [r0]
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_81616C0
|
||||
// thumb_func_start sub_81616C0
|
||||
//sub_81616C0: @ 81616C0
|
||||
// push {r4,r5,lr}
|
||||
// adds r5, r0, 0
|
||||
// lsls r5, 24
|
||||
// lsrs r5, 24
|
||||
// ldr r0, =gUnknown_0203CEC8
|
||||
// movs r1, 0xA
|
||||
// ldrsb r1, [r0, r1]
|
||||
// movs r0, 0x64
|
||||
// muls r0, r1
|
||||
// ldr r1, =gPlayerParty
|
||||
// adds r0, r1
|
||||
// ldr r1, =gStringVar1
|
||||
// bl GetMonNickname
|
||||
// ldr r4, =gStringVar4
|
||||
// ldr r1, =gText_PkmnHPRestoredByVar2
|
||||
// adds r0, r4, 0
|
||||
// bl StringExpandPlaceholders
|
||||
// adds r0, r4, 0
|
||||
// movs r1, 0
|
||||
// bl sub_81B1B5C
|
||||
// movs r0, 0x2
|
||||
// bl schedule_bg_copy_tilemap_to_vram
|
||||
// ldr r1, =gTasks
|
||||
// lsls r0, r5, 2
|
||||
// adds r0, r5
|
||||
// lsls r0, 3
|
||||
// adds r0, r1
|
||||
// ldr r1, =sub_8161724
|
||||
// str r1, [r0]
|
||||
// pop {r4,r5}
|
||||
// pop {r0}
|
||||
// bx r0
|
||||
// .pool
|
||||
// thumb_func_end sub_81616C0
|
||||
|
||||
thumb_func_start sub_8161724
|
||||
sub_8161724: @ 8161724
|
||||
|
|
|
@ -4,4 +4,5 @@
|
|||
bool8 SetUpFieldMove_SoftBoiled(void);
|
||||
void sub_8161560(u8 taskid);
|
||||
|
||||
|
||||
#endif // GUARD_FLDEFF_SOFTBOILED_H
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef GUARD_PARTY_MENU_H
|
||||
#define GUARD_PARTY_MENU_H
|
||||
|
||||
#include "task.h"
|
||||
enum
|
||||
{
|
||||
AILMENT_NONE,
|
||||
|
@ -14,8 +14,8 @@ enum
|
|||
struct Struct203CEC8
|
||||
{
|
||||
u8 filler[0x9];
|
||||
u8 unk9;
|
||||
u8 unkA;
|
||||
s8 unk9;
|
||||
s8 unkA;
|
||||
u8 unkB;
|
||||
u8 filler2[0x2];
|
||||
};
|
||||
|
@ -31,8 +31,10 @@ u8 GetCursorSelectionMonId(void);
|
|||
bool8 FieldCallback_Teleport(void);
|
||||
void sub_81B7F60(void);
|
||||
|
||||
void sub_81B0FCC(u8 partyMonId, u8 a);
|
||||
void sub_81B0FCC(u8 partyIdx, u8 a);
|
||||
void sub_81B1370(u8 taskId);
|
||||
void display_pokemon_menu_message(u8 windowBorderId);
|
||||
void sub_81B1F18(u8 taskId, u8 pokemonIdx, s8 a, s16 hp, TaskFunc func);
|
||||
void sub_81B1B5C(void *a, u8 b);
|
||||
|
||||
#endif // GUARD_PARTY_MENU_H
|
||||
|
|
|
@ -348,6 +348,10 @@ extern const u8 gText_DepositedVar2Var1s[];
|
|||
extern const u8 gText_NoRoomForItems[];
|
||||
extern const u8 gText_ThreeDashes[];
|
||||
|
||||
//party menu text
|
||||
extern const u8 gText_PkmnHPRestoredByVar2[];
|
||||
|
||||
//birch dex rating text
|
||||
extern const u8 gBirchDexRatingText_LessThan10[];
|
||||
extern const u8 gBirchDexRatingText_LessThan20[];
|
||||
extern const u8 gBirchDexRatingText_LessThan30[];
|
||||
|
|
|
@ -7,13 +7,14 @@
|
|||
#include "constants/songs.h"
|
||||
#include "sound.h"
|
||||
#include "sprite.h"
|
||||
#include "string_util.h"
|
||||
#include "strings.h"
|
||||
#include "task.h"
|
||||
|
||||
void sub_816166C(u8 taskId);
|
||||
void sub_81617B8(u8 taskId);
|
||||
void sub_81616C0(u8 taskId);
|
||||
void sub_81B1F18(u8 taskId, u8 pokemonIdx, s8 a, s16 hp, TaskFunc func);
|
||||
void sub_8161724(u8 taskId);
|
||||
|
||||
bool8 SetUpFieldMove_SoftBoiled(void)
|
||||
{
|
||||
|
@ -66,52 +67,18 @@ void sub_81615A8(u8 taskId)
|
|||
sub_81B1F18(taskId, unk9, -1, GetMonData(&gPlayerParty[unk9], MON_DATA_MAX_HP)/5, sub_816166C);
|
||||
}
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_816166C(u8 taskId)
|
||||
{
|
||||
PlaySE(SE_KAIFUKU);
|
||||
sub_81B1F18(taskId, gUnknown_0203CEC8.unkA, 1, GetMonData(&gPlayerParty[gUnknown_0203CEC8.unk9], MON_DATA_MAX_HP)/5, sub_81616C0);
|
||||
}
|
||||
#else
|
||||
__attribute__((naked))
|
||||
void sub_816166C(u8 taskId)
|
||||
|
||||
void sub_81616C0(u8 taskId)
|
||||
{
|
||||
asm(".syntax unified\n\
|
||||
push {r4,r5,lr}\n\
|
||||
sub sp, 0x4\n\
|
||||
adds r4, r0, 0\n\
|
||||
lsls r4, 24\n\
|
||||
lsrs r4, 24\n\
|
||||
movs r0, 0x1\n\
|
||||
bl PlaySE\n\
|
||||
ldr r5, =gUnknown_0203CEC8\n\
|
||||
movs r1, 0x9\n\
|
||||
ldrsb r1, [r5, r1]\n\
|
||||
movs r0, 0x64\n\
|
||||
muls r0, r1\n\
|
||||
ldr r1, =gPlayerParty\n\
|
||||
adds r0, r1\n\
|
||||
movs r1, 0x3A\n\
|
||||
bl GetMonData\n\
|
||||
movs r1, 0x5\n\
|
||||
bl __udivsi3\n\
|
||||
adds r3, r0, 0\n\
|
||||
lsls r3, 16\n\
|
||||
asrs r3, 16\n\
|
||||
ldrb r1, [r5, 0xA]\n\
|
||||
ldr r0, =sub_81616C0\n\
|
||||
str r0, [sp]\n\
|
||||
adds r0, r4, 0\n\
|
||||
movs r2, 0x1\n\
|
||||
bl sub_81B1F18\n\
|
||||
add sp, 0x4\n\
|
||||
pop {r4,r5}\n\
|
||||
pop {r0}\n\
|
||||
bx r0\n\
|
||||
.pool\n\
|
||||
.syntax divided\n");
|
||||
|
||||
GetMonNickname(&gPlayerParty[gUnknown_0203CEC8.unkA], gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_PkmnHPRestoredByVar2);
|
||||
sub_81B1B5C(gStringVar4, 0);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
gTasks[taskId].func = sub_8161724;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue