mirror of
https://github.com/pret/pokepinballrs.git
synced 2026-03-21 17:24:13 -05:00
sub_507D4
This commit is contained in:
parent
e8b235968a
commit
f8687bea7e
|
|
@ -6842,61 +6842,3 @@ _080507C0:
|
|||
bx r0
|
||||
.align 2, 0
|
||||
_080507D0: .4byte gUnknown_086B0FAC
|
||||
|
||||
thumb_func_start sub_507D4
|
||||
sub_507D4: @ 0x080507D4
|
||||
push {r4, r5, lr}
|
||||
movs r1, #0
|
||||
ldr r0, _08050834 @ =gCurrentPinballGame
|
||||
ldr r4, [r0]
|
||||
movs r2, #0xc2
|
||||
lsls r2, r2, #2
|
||||
adds r0, r4, r2
|
||||
ldrh r0, [r0]
|
||||
cmp r0, #0x63
|
||||
bls _080507F8
|
||||
ldr r1, _08050838 @ =0x0000070C
|
||||
adds r0, r4, r1
|
||||
ldrh r0, [r0]
|
||||
movs r1, #0x14
|
||||
bl __umodsi3
|
||||
lsls r0, r0, #0x10
|
||||
lsrs r1, r0, #0x12
|
||||
_080507F8:
|
||||
lsls r0, r1, #3
|
||||
ldr r2, _0805083C @ =gUnknown_086B0E6C
|
||||
adds r3, r0, r2
|
||||
adds r5, r2, #0
|
||||
adds r5, #0x28
|
||||
adds r0, r4, #0
|
||||
adds r0, #0x6a
|
||||
movs r1, #0
|
||||
ldrsh r0, [r0, r1]
|
||||
cmp r0, #0xaf
|
||||
bgt _0805081E
|
||||
ldr r1, _08050840 @ =0x040000D4
|
||||
ldr r0, [r3]
|
||||
str r0, [r1]
|
||||
ldr r0, [r2, #0x28]
|
||||
str r0, [r1, #4]
|
||||
ldr r0, _08050844 @ =0x80000020
|
||||
str r0, [r1, #8]
|
||||
ldr r0, [r1, #8]
|
||||
_0805081E:
|
||||
ldr r1, _08050840 @ =0x040000D4
|
||||
ldr r0, [r3, #4]
|
||||
str r0, [r1]
|
||||
ldr r0, [r5, #4]
|
||||
str r0, [r1, #4]
|
||||
ldr r0, _08050844 @ =0x80000020
|
||||
str r0, [r1, #8]
|
||||
ldr r0, [r1, #8]
|
||||
pop {r4, r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08050834: .4byte gCurrentPinballGame
|
||||
_08050838: .4byte 0x0000070C
|
||||
_0805083C: .4byte gUnknown_086B0E6C
|
||||
_08050840: .4byte 0x040000D4
|
||||
_08050844: .4byte 0x80000020
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -604,7 +604,8 @@ struct PinballGame
|
|||
/*0x6E4*/ struct Vector16 unk6E4;
|
||||
/*0x6E8*/ u8 filler6E8[0x6];
|
||||
/*0x6EE*/ u16 unk6EE;
|
||||
/*0x6F0*/ u8 filler6F0[0x1E];
|
||||
/*0x6F0*/ u8 filler6F0[0x1C];
|
||||
/*0x70C*/ u16 unk70C;
|
||||
/*0x70E*/ s8 unk70E;
|
||||
/*0x70F*/ s8 unk70F;
|
||||
/*0x710*/ s8 hLight; // 'H' light indicator in Ruby/Sapphire field
|
||||
|
|
|
|||
|
|
@ -1,6 +1,33 @@
|
|||
#include "global.h"
|
||||
#include "main.h"
|
||||
|
||||
struct Unk_086B0E6C
|
||||
{
|
||||
const u8 *unk0[5][2];
|
||||
u8 *unk28[2];
|
||||
};
|
||||
extern const struct Unk_086B0E6C gUnknown_086B0E6C;
|
||||
|
||||
void sub_507D4(void)
|
||||
{
|
||||
s16 index;
|
||||
const u8 *const *src;
|
||||
u8 *const *dest;
|
||||
|
||||
index = 0;
|
||||
if (gCurrentPinballGame->unk308 >= 100)
|
||||
index = (gCurrentPinballGame->unk70C % 20) / 4;
|
||||
|
||||
src = gUnknown_086B0E6C.unk0[index];
|
||||
dest = gUnknown_086B0E6C.unk28;
|
||||
if (gCurrentPinballGame->unk6A < 176)
|
||||
{
|
||||
DmaCopy16(3, src[0], dest[0], 0x40);
|
||||
}
|
||||
|
||||
DmaCopy16(3, src[1], dest[1], 0x40);
|
||||
}
|
||||
|
||||
void RubyBoardProcess_0A_50848(void)
|
||||
{
|
||||
s16 i;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user