mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
through sub_80DAFA0
This commit is contained in:
parent
7fdebe0d15
commit
508a8e5182
152
asm/contest.s
152
asm/contest.s
@ -5,158 +5,6 @@
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_80DAEA4
|
||||
sub_80DAEA4: @ 80DAEA4
|
||||
push {r4,r5,lr}
|
||||
movs r5, 0
|
||||
_080DAEA8:
|
||||
ldr r0, =gUnknown_02039F26
|
||||
adds r0, r5, r0
|
||||
ldrb r0, [r0]
|
||||
movs r1, 0
|
||||
bl FillWindowPixelBuffer
|
||||
lsls r4, r5, 24
|
||||
lsrs r4, 24
|
||||
adds r0, r4, 0
|
||||
bl sub_80DAF04
|
||||
adds r0, r4, 0
|
||||
bl sub_80DAF88
|
||||
adds r5, 0x1
|
||||
cmp r5, 0x3
|
||||
ble _080DAEA8
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80DAEA4
|
||||
|
||||
thumb_func_start sub_80DAED4
|
||||
sub_80DAED4: @ 80DAED4
|
||||
push {r4,r5,lr}
|
||||
adds r5, r0, 0
|
||||
lsls r4, r1, 24
|
||||
lsrs r4, 24
|
||||
ldr r0, =gDisplayedStringBattle
|
||||
ldr r1, =gText_ColorTransparent
|
||||
bl StringCopy
|
||||
adds r1, r0, 0
|
||||
subs r0, r1, 0x1
|
||||
strb r4, [r0]
|
||||
adds r0, r1, 0
|
||||
adds r1, r5, 0
|
||||
bl StringCopy
|
||||
adds r1, r0, 0
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_80DAED4
|
||||
|
||||
thumb_func_start sub_80DAF04
|
||||
sub_80DAF04: @ 80DAF04
|
||||
push {lr}
|
||||
adds r1, r0, 0
|
||||
lsls r1, 24
|
||||
lsrs r0, r1, 24
|
||||
movs r2, 0xA0
|
||||
lsls r2, 20
|
||||
adds r1, r2
|
||||
lsrs r1, 24
|
||||
bl sub_80DAF1C
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80DAF04
|
||||
|
||||
thumb_func_start sub_80DAF1C
|
||||
sub_80DAF1C: @ 80DAF1C
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x24
|
||||
adds r4, r1, 0
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
adds r5, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
ldr r1, =gText_Slash
|
||||
add r0, sp, 0x4
|
||||
bl StringCopy
|
||||
lsls r1, r5, 6
|
||||
ldr r0, =gContestMons + 13
|
||||
adds r1, r0
|
||||
add r0, sp, 0x4
|
||||
bl StringAppend
|
||||
add r0, sp, 0x4
|
||||
adds r1, r4, 0
|
||||
bl sub_80DAED4
|
||||
ldr r4, =gDisplayedStringBattle
|
||||
movs r0, 0x7
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x60
|
||||
bl GetStringRightAlignXOffset
|
||||
adds r2, r0, 0
|
||||
cmp r2, 0x37
|
||||
ble _080DAF5C
|
||||
movs r2, 0x37
|
||||
_080DAF5C:
|
||||
ldr r0, =gUnknown_02039F26
|
||||
adds r0, r5, r0
|
||||
ldrb r0, [r0]
|
||||
movs r1, 0x7
|
||||
str r1, [sp]
|
||||
adds r1, r4, 0
|
||||
movs r3, 0x1
|
||||
bl sub_80DEBD0
|
||||
add sp, 0x24
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80DAF1C
|
||||
|
||||
thumb_func_start sub_80DAF88
|
||||
sub_80DAF88: @ 80DAF88
|
||||
push {lr}
|
||||
adds r1, r0, 0
|
||||
lsls r1, 24
|
||||
lsrs r0, r1, 24
|
||||
movs r2, 0xA0
|
||||
lsls r2, 20
|
||||
adds r1, r2
|
||||
lsrs r1, 24
|
||||
bl sub_80DAFA0
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_80DAF88
|
||||
|
||||
thumb_func_start sub_80DAFA0
|
||||
sub_80DAFA0: @ 80DAFA0
|
||||
push {r4,lr}
|
||||
sub sp, 0x4
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
lsls r0, r4, 6
|
||||
ldr r2, =gContestMons + 2
|
||||
adds r0, r2
|
||||
bl sub_80DAED4
|
||||
ldr r0, =gUnknown_02039F26
|
||||
adds r4, r0
|
||||
ldrb r0, [r4]
|
||||
ldr r1, =gDisplayedStringBattle
|
||||
movs r2, 0x7
|
||||
str r2, [sp]
|
||||
movs r2, 0x5
|
||||
movs r3, 0x1
|
||||
bl sub_80DEBD0
|
||||
add sp, 0x4
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80DAFA0
|
||||
|
||||
thumb_func_start sub_80DAFE0
|
||||
sub_80DAFE0: @ 80DAFE0
|
||||
push {r4,r5,lr}
|
||||
|
@ -445,5 +445,7 @@ extern const u8 gText_FiveMarks[];
|
||||
extern const u8 gText_TotalRecordWLD[];
|
||||
extern const u8 gText_PlayersBattleResults[];
|
||||
extern const u8 gText_WinLoseDraw[];
|
||||
extern const u8 gText_ColorTransparent[];
|
||||
extern const u8 gText_Slash[];
|
||||
|
||||
#endif //GUARD_STRINGS_H
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "contest_effect.h"
|
||||
#include "contest_link_80FC4F4.h"
|
||||
#include "script_pokemon_util_80F87D8.h"
|
||||
#include "international_string_util.h"
|
||||
|
||||
#define DESTROY_POINTER(ptr) \
|
||||
free(ptr); \
|
||||
@ -95,7 +96,10 @@ void sub_80DA7EC(u8);
|
||||
void sub_80DA830(u8);
|
||||
void sub_80DA874(void);
|
||||
bool8 sub_80DA8A4(void);
|
||||
void sub_80DE424(u8);
|
||||
void sub_80DAF04(u8);
|
||||
void sub_80DAF1C(u8 a0, u8 a1);
|
||||
void sub_80DAF88(u8);
|
||||
void sub_80DAFA0(u8, u8);
|
||||
u8 sub_80DB0C4(void);
|
||||
u8 sub_80DB120(void);
|
||||
void sub_80DB2BC(void);
|
||||
@ -120,9 +124,10 @@ void sub_80DDBE8(void);
|
||||
bool8 sub_80DE1E8(u8);
|
||||
void sub_80DE224(void);
|
||||
void sub_80DE350(void);
|
||||
void sub_80DE424(u8);
|
||||
void sub_80DE69C(u8);
|
||||
void sub_80DEA20(void);
|
||||
void sub_80DEBD0(u32, u8 *, u8, u8, u8);
|
||||
void sub_80DEBD0(u32, u8 *, s32, u8, u8);
|
||||
void sub_80DEC30(const u8 *, u8);
|
||||
void sub_80DECB8(u8, u16, u8, u8, u8, u8, u8, u8);
|
||||
bool32 sub_80DED4C(void);
|
||||
@ -2385,3 +2390,54 @@ u8 sub_80DAE0C(struct Pokemon *pkmn)
|
||||
retVal = 0;
|
||||
return retVal;
|
||||
}
|
||||
|
||||
void sub_80DAEA4(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
FillWindowPixelBuffer(gUnknown_02039F26[i], 0);
|
||||
sub_80DAF04(i);
|
||||
sub_80DAF88(i);
|
||||
}
|
||||
}
|
||||
|
||||
u8 * sub_80DAED4(const u8 * src, u8 color)
|
||||
{
|
||||
u8 * ptr = StringCopy(gDisplayedStringBattle, gText_ColorTransparent);
|
||||
ptr[-1] = color;
|
||||
ptr = StringCopy(ptr, src);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void sub_80DAF04(u8 a0)
|
||||
{
|
||||
sub_80DAF1C(a0, a0 + 10);
|
||||
}
|
||||
|
||||
void sub_80DAF1C(u8 a0, u8 a1)
|
||||
{
|
||||
u8 buffer[32];
|
||||
s32 offset;
|
||||
|
||||
StringCopy(buffer, gText_Slash);
|
||||
StringAppend(buffer, gContestMons[a0].trainerName);
|
||||
sub_80DAED4(buffer, a1);
|
||||
offset = GetStringRightAlignXOffset(7, gDisplayedStringBattle, 0x60);
|
||||
if (offset > 55)
|
||||
offset = 55;
|
||||
sub_80DEBD0(gUnknown_02039F26[a0], gDisplayedStringBattle, offset, 1, 7);
|
||||
}
|
||||
|
||||
void sub_80DAF88(u8 a0)
|
||||
{
|
||||
sub_80DAFA0(a0, a0 + 10);
|
||||
}
|
||||
|
||||
void sub_80DAFA0(u8 a0, u8 a1)
|
||||
{
|
||||
sub_80DAED4(gContestMons[a0].nickname, a1);
|
||||
sub_80DEBD0(gUnknown_02039F26[a0], gDisplayedStringBattle, 5, 1, 7);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user