sub_818D6CC
This commit is contained in:
parent
ee47fe9377
commit
b2b6774efc
2 changed files with 18 additions and 89 deletions
|
@ -5,92 +5,6 @@
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start sub_818D6CC
|
|
||||||
sub_818D6CC: @ 818D6CC
|
|
||||||
push {r4-r7,lr}
|
|
||||||
mov r7, r10
|
|
||||||
mov r6, r9
|
|
||||||
mov r5, r8
|
|
||||||
push {r5-r7}
|
|
||||||
sub sp, 0x24
|
|
||||||
str r1, [sp, 0x18]
|
|
||||||
str r2, [sp, 0x1C]
|
|
||||||
ldr r1, [sp, 0x44]
|
|
||||||
ldr r2, [sp, 0x48]
|
|
||||||
ldr r4, [sp, 0x4C]
|
|
||||||
ldr r5, [sp, 0x50]
|
|
||||||
ldr r6, [sp, 0x54]
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r0, 16
|
|
||||||
mov r9, r0
|
|
||||||
lsls r3, 24
|
|
||||||
lsrs r7, r3, 24
|
|
||||||
lsls r1, 16
|
|
||||||
lsrs r1, 16
|
|
||||||
mov r10, r1
|
|
||||||
lsls r2, 16
|
|
||||||
lsrs r2, 16
|
|
||||||
mov r8, r2
|
|
||||||
lsls r4, 24
|
|
||||||
lsrs r4, 24
|
|
||||||
str r4, [sp, 0x20]
|
|
||||||
lsls r5, 24
|
|
||||||
lsrs r5, 24
|
|
||||||
lsls r6, 24
|
|
||||||
lsrs r6, 24
|
|
||||||
movs r0, 0x80
|
|
||||||
lsls r0, 6
|
|
||||||
bl Alloc
|
|
||||||
adds r4, r0, 0
|
|
||||||
cmp r4, 0
|
|
||||||
beq _0818D762
|
|
||||||
str r6, [sp]
|
|
||||||
mov r0, r9
|
|
||||||
ldr r1, [sp, 0x1C]
|
|
||||||
adds r2, r7, 0
|
|
||||||
adds r3, r4, 0
|
|
||||||
bl sub_818D09C
|
|
||||||
lsls r0, 16
|
|
||||||
cmp r0, 0
|
|
||||||
bne _0818D762
|
|
||||||
movs r0, 0x40
|
|
||||||
str r0, [sp]
|
|
||||||
str r0, [sp, 0x4]
|
|
||||||
mov r1, r10
|
|
||||||
str r1, [sp, 0x8]
|
|
||||||
mov r1, r8
|
|
||||||
str r1, [sp, 0xC]
|
|
||||||
str r0, [sp, 0x10]
|
|
||||||
str r0, [sp, 0x14]
|
|
||||||
adds r0, r5, 0
|
|
||||||
adds r1, r4, 0
|
|
||||||
movs r2, 0
|
|
||||||
movs r3, 0
|
|
||||||
bl BlitBitmapRectToWindow
|
|
||||||
str r6, [sp]
|
|
||||||
mov r0, r9
|
|
||||||
ldr r1, [sp, 0x18]
|
|
||||||
ldr r2, [sp, 0x1C]
|
|
||||||
ldr r3, [sp, 0x20]
|
|
||||||
bl sub_818D180
|
|
||||||
adds r0, r4, 0
|
|
||||||
bl Free
|
|
||||||
movs r0, 0
|
|
||||||
b _0818D764
|
|
||||||
_0818D762:
|
|
||||||
ldr r0, =0x0000ffff
|
|
||||||
_0818D764:
|
|
||||||
add sp, 0x24
|
|
||||||
pop {r3-r5}
|
|
||||||
mov r8, r3
|
|
||||||
mov r9, r4
|
|
||||||
mov r10, r5
|
|
||||||
pop {r4-r7}
|
|
||||||
pop {r1}
|
|
||||||
bx r1
|
|
||||||
.pool
|
|
||||||
thumb_func_end sub_818D6CC
|
|
||||||
|
|
||||||
thumb_func_start sub_818D778
|
thumb_func_start sub_818D778
|
||||||
sub_818D778: @ 818D778
|
sub_818D778: @ 818D778
|
||||||
push {r4-r7,lr}
|
push {r4-r7,lr}
|
||||||
|
|
|
@ -60,7 +60,7 @@ bool16 dp13_810BB8C(void)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool16 load_pokemon_image_TODO(u16 species, u32 personality, bool8 isFrontPic, void *dest, bool8 isTrainer, bool8 ignoreDeoxys)
|
bool16 load_pokemon_image_TODO(u16 species, u32 personality, bool8 isFrontPic, u8 *dest, bool8 isTrainer, bool8 ignoreDeoxys)
|
||||||
{
|
{
|
||||||
if (!isTrainer)
|
if (!isTrainer)
|
||||||
{
|
{
|
||||||
|
@ -101,7 +101,7 @@ bool16 load_pokemon_image_TODO(u16 species, u32 personality, bool8 isFrontPic, v
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool16 sub_818D09C(u16 species, u32 personality, bool8 isFrontPic, void *dest, bool8 isTrainer)
|
bool16 sub_818D09C(u16 species, u32 personality, bool8 isFrontPic, u8 *dest, bool8 isTrainer)
|
||||||
{
|
{
|
||||||
return load_pokemon_image_TODO(species, personality, isFrontPic, dest, isTrainer, FALSE);
|
return load_pokemon_image_TODO(species, personality, isFrontPic, dest, isTrainer, FALSE);
|
||||||
}
|
}
|
||||||
|
@ -340,10 +340,25 @@ u16 sub_818D5B0(u16 spriteId)
|
||||||
|
|
||||||
u16 sub_818D65C(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 paletteSlot, u8 windowId, bool8 isTrainer)
|
u16 sub_818D65C(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u8 paletteSlot, u8 windowId, bool8 isTrainer)
|
||||||
{
|
{
|
||||||
if (sub_818D09C(species, personality, isFrontPic, (void *)GetWindowAttribute(windowId, WINDOW_TILE_DATA), FALSE))
|
if (sub_818D09C(species, personality, isFrontPic, (u8 *)GetWindowAttribute(windowId, WINDOW_TILE_DATA), FALSE))
|
||||||
{
|
{
|
||||||
return 0xFFFF;
|
return 0xFFFF;
|
||||||
}
|
}
|
||||||
sub_818D180(species, otId, personality, paletteSlot, isTrainer);
|
sub_818D180(species, otId, personality, paletteSlot, isTrainer);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u16 sub_818D6CC(u16 species, u32 otId, u32 personality, bool8 isFrontPic, u16 destX, u16 destY, u8 paletteSlot, u8 windowId, bool8 isTrainer)
|
||||||
|
{
|
||||||
|
u8 *framePics;
|
||||||
|
|
||||||
|
framePics = Alloc(4 * 0x800);
|
||||||
|
if (framePics && !sub_818D09C(species, personality, isFrontPic, framePics, isTrainer))
|
||||||
|
{
|
||||||
|
BlitBitmapRectToWindow(windowId, framePics, 0, 0, 0x40, 0x40, destX, destY, 0x40, 0x40);
|
||||||
|
sub_818D180(species, otId, personality, paletteSlot, isTrainer);
|
||||||
|
Free(framePics);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return 0xFFFF;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue