mirror of
https://github.com/pret/pokepinballrs.git
synced 2026-04-27 17:26:53 -05:00
sub_500B4
This commit is contained in:
parent
7f5c0ad5dd
commit
1b1e7b6a42
|
|
@ -5916,85 +5916,3 @@ _080500A4: .4byte gUnknown_086B11FC
|
||||||
_080500A8: .4byte 0x040000D4
|
_080500A8: .4byte 0x040000D4
|
||||||
_080500AC: .4byte 0x80000020
|
_080500AC: .4byte 0x80000020
|
||||||
_080500B0: .4byte 0x80000040
|
_080500B0: .4byte 0x80000040
|
||||||
|
|
||||||
thumb_func_start sub_500B4
|
|
||||||
sub_500B4: @ 0x080500B4
|
|
||||||
push {r4, r5, lr}
|
|
||||||
movs r1, #0
|
|
||||||
ldr r5, _0805013C @ =gCurrentPinballGame
|
|
||||||
ldr r2, [r5]
|
|
||||||
ldr r3, _08050140 @ =0x00000729
|
|
||||||
adds r0, r2, r3
|
|
||||||
ldrb r0, [r0]
|
|
||||||
lsls r0, r0, #0x18
|
|
||||||
asrs r0, r0, #0x18
|
|
||||||
cmp r0, #0
|
|
||||||
ble _080500D8
|
|
||||||
ldr r1, _08050144 @ =0x00000734
|
|
||||||
adds r0, r2, r1
|
|
||||||
ldrh r1, [r0]
|
|
||||||
movs r0, #1
|
|
||||||
subs r0, r0, r1
|
|
||||||
lsls r0, r0, #0x10
|
|
||||||
lsrs r1, r0, #0x10
|
|
||||||
_080500D8:
|
|
||||||
lsls r0, r1, #0x10
|
|
||||||
asrs r0, r0, #0xc
|
|
||||||
ldr r1, _08050148 @ =gUnknown_086B122C
|
|
||||||
adds r3, r0, r1
|
|
||||||
adds r4, r1, #0
|
|
||||||
adds r4, #0x20
|
|
||||||
adds r0, r2, #0
|
|
||||||
adds r0, #0x6a
|
|
||||||
movs r1, #0
|
|
||||||
ldrsh r0, [r0, r1]
|
|
||||||
cmp r0, #0xc2
|
|
||||||
bgt _08050100
|
|
||||||
ldr r1, _0805014C @ =0x040000D4
|
|
||||||
ldr r0, [r3, #4]
|
|
||||||
str r0, [r1]
|
|
||||||
ldr r0, [r4, #4]
|
|
||||||
str r0, [r1, #4]
|
|
||||||
ldr r0, _08050150 @ =0x80000040
|
|
||||||
str r0, [r1, #8]
|
|
||||||
ldr r0, [r1, #8]
|
|
||||||
_08050100:
|
|
||||||
ldr r0, [r5]
|
|
||||||
adds r2, r0, #0
|
|
||||||
adds r2, #0x6a
|
|
||||||
movs r1, #0
|
|
||||||
ldrsh r0, [r2, r1]
|
|
||||||
cmp r0, #0x1e
|
|
||||||
ble _0805011E
|
|
||||||
ldr r1, _0805014C @ =0x040000D4
|
|
||||||
ldr r0, [r3, #8]
|
|
||||||
str r0, [r1]
|
|
||||||
ldr r0, [r4, #8]
|
|
||||||
str r0, [r1, #4]
|
|
||||||
ldr r0, _08050150 @ =0x80000040
|
|
||||||
str r0, [r1, #8]
|
|
||||||
ldr r0, [r1, #8]
|
|
||||||
_0805011E:
|
|
||||||
movs r1, #0
|
|
||||||
ldrsh r0, [r2, r1]
|
|
||||||
cmp r0, #0x26
|
|
||||||
ble _08050136
|
|
||||||
ldr r1, _0805014C @ =0x040000D4
|
|
||||||
ldr r0, [r3, #0xc]
|
|
||||||
str r0, [r1]
|
|
||||||
ldr r0, [r4, #0xc]
|
|
||||||
str r0, [r1, #4]
|
|
||||||
ldr r0, _08050150 @ =0x80000040
|
|
||||||
str r0, [r1, #8]
|
|
||||||
ldr r0, [r1, #8]
|
|
||||||
_08050136:
|
|
||||||
pop {r4, r5}
|
|
||||||
pop {r0}
|
|
||||||
bx r0
|
|
||||||
.align 2, 0
|
|
||||||
_0805013C: .4byte gCurrentPinballGame
|
|
||||||
_08050140: .4byte 0x00000729
|
|
||||||
_08050144: .4byte 0x00000734
|
|
||||||
_08050148: .4byte gUnknown_086B122C
|
|
||||||
_0805014C: .4byte 0x040000D4
|
|
||||||
_08050150: .4byte 0x80000040
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -625,7 +625,7 @@ struct PinballGame
|
||||||
/*0x724*/ u16 unk724;
|
/*0x724*/ u16 unk724;
|
||||||
/*0x726*/ u8 filler726[0x2];
|
/*0x726*/ u8 filler726[0x2];
|
||||||
/*0x728*/ u8 unk728; // TODO: unknown type
|
/*0x728*/ u8 unk728; // TODO: unknown type
|
||||||
/*0x729*/ u8 filler729[0x1];
|
/*0x729*/ s8 unk729;
|
||||||
/*0x72A*/ s8 unk72A;
|
/*0x72A*/ s8 unk72A;
|
||||||
/*0x72B*/ u8 filler72B[0x3];
|
/*0x72B*/ u8 filler72B[0x3];
|
||||||
/*0x72E*/ s8 unk72E;
|
/*0x72E*/ s8 unk72E;
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,37 @@ extern const u8 *gUnknown_086B125C[][4];
|
||||||
extern const u8 *gUnknown_086B12D0[][4];
|
extern const u8 *gUnknown_086B12D0[][4];
|
||||||
extern const u8 *gUnknown_086B14A8[][5][3];
|
extern const u8 *gUnknown_086B14A8[][5][3];
|
||||||
extern const u8 *gUnknown_086B1340[][5][3];
|
extern const u8 *gUnknown_086B1340[][5][3];
|
||||||
|
extern const u8 *gUnknown_086B122C[][4];
|
||||||
|
|
||||||
|
|
||||||
|
void sub_500B4(void)
|
||||||
|
{
|
||||||
|
s16 index;
|
||||||
|
const u8 **src;
|
||||||
|
const u8 **dest;
|
||||||
|
|
||||||
|
index = 0;
|
||||||
|
if (gCurrentPinballGame->unk729 > 0)
|
||||||
|
index = 1 - gCurrentPinballGame->unk734;
|
||||||
|
|
||||||
|
src = gUnknown_086B122C[index];
|
||||||
|
dest = gUnknown_086B122C[2];
|
||||||
|
if (gCurrentPinballGame->unk6A < 195)
|
||||||
|
{
|
||||||
|
DmaCopy16(3, src[1], dest[1], 0x80);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gCurrentPinballGame->unk6A > 30)
|
||||||
|
{
|
||||||
|
DmaCopy16(3, src[2], dest[2], 0x80);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gCurrentPinballGame->unk6A > 38)
|
||||||
|
{
|
||||||
|
DmaCopy16(3, src[3], dest[3], 0x80);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void sub_50154(void)
|
void sub_50154(void)
|
||||||
{
|
{
|
||||||
s16 sp0[3];
|
s16 sp0[3];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user