mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-03-19 12:08:34 +01:00
sub_818D65C
This commit is contained in:
parent
6ef3f9dd50
commit
ee47fe9377
@ -5,64 +5,6 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
thumb_func_start sub_818D65C
|
|
||||||
sub_818D65C: @ 818D65C
|
|
||||||
push {r4-r7,lr}
|
|
||||||
mov r7, r9
|
|
||||||
mov r6, r8
|
|
||||||
push {r6,r7}
|
|
||||||
sub sp, 0x4
|
|
||||||
mov r9, r1
|
|
||||||
adds r7, r2, 0
|
|
||||||
adds r4, r3, 0
|
|
||||||
ldr r1, [sp, 0x20]
|
|
||||||
ldr r2, [sp, 0x24]
|
|
||||||
ldr r3, [sp, 0x28]
|
|
||||||
lsls r0, 16
|
|
||||||
lsrs r5, r0, 16
|
|
||||||
lsls r4, 24
|
|
||||||
lsrs r4, 24
|
|
||||||
lsls r1, 24
|
|
||||||
lsrs r1, 24
|
|
||||||
mov r8, r1
|
|
||||||
lsls r2, 24
|
|
||||||
lsrs r2, 24
|
|
||||||
lsls r3, 24
|
|
||||||
lsrs r6, r3, 24
|
|
||||||
adds r0, r2, 0
|
|
||||||
movs r1, 0x7
|
|
||||||
bl GetWindowAttribute
|
|
||||||
adds r3, r0, 0
|
|
||||||
movs r0, 0
|
|
||||||
str r0, [sp]
|
|
||||||
adds r0, r5, 0
|
|
||||||
adds r1, r7, 0
|
|
||||||
adds r2, r4, 0
|
|
||||||
bl sub_818D09C
|
|
||||||
lsls r0, 16
|
|
||||||
cmp r0, 0
|
|
||||||
bne _0818D6B8
|
|
||||||
str r6, [sp]
|
|
||||||
adds r0, r5, 0
|
|
||||||
mov r1, r9
|
|
||||||
adds r2, r7, 0
|
|
||||||
mov r3, r8
|
|
||||||
bl sub_818D180
|
|
||||||
movs r0, 0
|
|
||||||
b _0818D6BA
|
|
||||||
_0818D6B8:
|
|
||||||
ldr r0, =0x0000ffff
|
|
||||||
_0818D6BA:
|
|
||||||
add sp, 0x4
|
|
||||||
pop {r3,r4}
|
|
||||||
mov r8, r3
|
|
||||||
mov r9, r4
|
|
||||||
pop {r4-r7}
|
|
||||||
pop {r1}
|
|
||||||
bx r1
|
|
||||||
.pool
|
|
||||||
thumb_func_end sub_818D65C
|
|
||||||
|
|
||||||
thumb_func_start sub_818D6CC
|
thumb_func_start sub_818D6CC
|
||||||
sub_818D6CC: @ 818D6CC
|
sub_818D6CC: @ 818D6CC
|
||||||
push {r4-r7,lr}
|
push {r4-r7,lr}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Includes
|
// Includes
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "sprite.h"
|
#include "sprite.h"
|
||||||
|
#include "window.h"
|
||||||
#include "malloc.h"
|
#include "malloc.h"
|
||||||
#include "species.h"
|
#include "species.h"
|
||||||
#include "palette.h"
|
#include "palette.h"
|
||||||
@ -336,3 +337,13 @@ u16 sub_818D5B0(u16 spriteId)
|
|||||||
gUnknown_0203CD04[i] = gUnknown_0860B058;
|
gUnknown_0203CD04[i] = gUnknown_0860B058;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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))
|
||||||
|
{
|
||||||
|
return 0xFFFF;
|
||||||
|
}
|
||||||
|
sub_818D180(species, otId, personality, paletteSlot, isTrainer);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user