mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Merge pull request #237 from KDSKardabox/master
Decompile mon markings, rotating_gate & field_camera
This commit is contained in:
commit
d10844f1fe
1153
asm/field_camera.s
1153
asm/field_camera.s
File diff suppressed because it is too large
Load Diff
@ -1071,7 +1071,7 @@ sub_808B164: @ 808B164
|
||||
adds r0, r6, 0
|
||||
adds r1, r5, 0
|
||||
adds r2, r4, 0
|
||||
bl sub_80FBFD4
|
||||
bl CheckForRotatingGatePuzzleCollisionWithoutAnimation
|
||||
cmp r0, 0
|
||||
beq _0808B1A2
|
||||
movs r0, 0x8
|
||||
|
@ -1,946 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_811F90C
|
||||
sub_811F90C: @ 811F90C
|
||||
ldr r1, =gUnknown_0203A124
|
||||
str r0, [r1]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_811F90C
|
||||
|
||||
thumb_func_start sub_811F918
|
||||
sub_811F918: @ 811F918
|
||||
push {lr}
|
||||
sub sp, 0x4
|
||||
ldr r0, =gSaveBlock2Ptr
|
||||
ldr r0, [r0]
|
||||
ldrb r0, [r0, 0x14]
|
||||
lsrs r0, 3
|
||||
bl GetWindowFrameTilesPal
|
||||
ldr r3, =gUnknown_0203A124
|
||||
ldr r2, [r3]
|
||||
ldr r1, [r0]
|
||||
str r1, [r2, 0x2C]
|
||||
ldr r0, [r0, 0x4]
|
||||
str r0, [r2, 0x30]
|
||||
ldr r0, =0x000010b4
|
||||
adds r2, r0
|
||||
movs r1, 0
|
||||
strb r1, [r2]
|
||||
mov r0, sp
|
||||
strh r1, [r0]
|
||||
ldr r1, [r3]
|
||||
adds r1, 0x34
|
||||
ldr r2, =0x01000800
|
||||
bl CpuSet
|
||||
add sp, 0x4
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_811F918
|
||||
|
||||
thumb_func_start sub_811F960
|
||||
sub_811F960: @ 811F960
|
||||
push {r4-r7,lr}
|
||||
ldr r0, =gUnknown_0203A124
|
||||
ldr r1, [r0]
|
||||
ldr r2, =0x000010b4
|
||||
adds r0, r1, r2
|
||||
ldrb r2, [r0]
|
||||
lsls r0, r2, 8
|
||||
adds r0, 0x34
|
||||
adds r5, r1, r0
|
||||
cmp r2, 0xD
|
||||
beq _0811FA30
|
||||
cmp r2, 0xD
|
||||
bgt _0811F988
|
||||
cmp r2, 0
|
||||
beq _0811F98E
|
||||
b _0811F9D8
|
||||
.pool
|
||||
_0811F988:
|
||||
cmp r2, 0xE
|
||||
beq _0811FA7C
|
||||
b _0811F9D8
|
||||
_0811F98E:
|
||||
ldr r0, [r1, 0x2C]
|
||||
adds r1, r5, 0
|
||||
movs r2, 0x8
|
||||
bl CpuFastSet
|
||||
movs r4, 0
|
||||
adds r7, r5, 0
|
||||
adds r7, 0xE0
|
||||
_0811F99E:
|
||||
ldr r6, =gUnknown_0203A124
|
||||
ldr r0, [r6]
|
||||
ldr r0, [r0, 0x2C]
|
||||
adds r0, 0x20
|
||||
adds r4, 0x1
|
||||
lsls r1, r4, 5
|
||||
adds r1, r5, r1
|
||||
movs r2, 0x8
|
||||
bl CpuFastSet
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
cmp r4, 0x5
|
||||
bls _0811F99E
|
||||
ldr r0, [r6]
|
||||
ldr r0, [r0, 0x2C]
|
||||
adds r0, 0x40
|
||||
adds r1, r7, 0
|
||||
movs r2, 0x8
|
||||
bl CpuFastSet
|
||||
ldr r1, [r6]
|
||||
ldr r0, =0x000010b4
|
||||
adds r1, r0
|
||||
b _0811FA1E
|
||||
.pool
|
||||
_0811F9D8:
|
||||
ldr r0, =gUnknown_0203A124
|
||||
ldr r0, [r0]
|
||||
ldr r0, [r0, 0x2C]
|
||||
adds r0, 0x60
|
||||
adds r1, r5, 0
|
||||
movs r2, 0x8
|
||||
bl CpuFastSet
|
||||
movs r4, 0
|
||||
adds r7, r5, 0
|
||||
adds r7, 0xE0
|
||||
_0811F9EE:
|
||||
ldr r6, =gUnknown_0203A124
|
||||
ldr r0, [r6]
|
||||
ldr r0, [r0, 0x2C]
|
||||
adds r0, 0x80
|
||||
adds r4, 0x1
|
||||
lsls r1, r4, 5
|
||||
adds r1, r5, r1
|
||||
movs r2, 0x8
|
||||
bl CpuFastSet
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
cmp r4, 0x5
|
||||
bls _0811F9EE
|
||||
ldr r0, [r6]
|
||||
ldr r0, [r0, 0x2C]
|
||||
adds r0, 0xA0
|
||||
adds r1, r7, 0
|
||||
movs r2, 0x8
|
||||
bl CpuFastSet
|
||||
ldr r1, [r6]
|
||||
ldr r2, =0x000010b4
|
||||
adds r1, r2
|
||||
_0811FA1E:
|
||||
ldrb r0, [r1]
|
||||
adds r0, 0x1
|
||||
strb r0, [r1]
|
||||
b _0811FA88
|
||||
.pool
|
||||
_0811FA30:
|
||||
ldr r0, [r1, 0x2C]
|
||||
adds r0, 0xC0
|
||||
adds r1, r5, 0
|
||||
movs r2, 0x8
|
||||
bl CpuFastSet
|
||||
movs r4, 0
|
||||
adds r7, r5, 0
|
||||
adds r7, 0xE0
|
||||
_0811FA42:
|
||||
ldr r6, =gUnknown_0203A124
|
||||
ldr r0, [r6]
|
||||
ldr r0, [r0, 0x2C]
|
||||
adds r0, 0xE0
|
||||
adds r4, 0x1
|
||||
lsls r1, r4, 5
|
||||
adds r1, r5, r1
|
||||
movs r2, 0x8
|
||||
bl CpuFastSet
|
||||
lsls r4, 16
|
||||
lsrs r4, 16
|
||||
cmp r4, 0x5
|
||||
bls _0811FA42
|
||||
ldr r0, [r6]
|
||||
ldr r0, [r0, 0x2C]
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
adds r0, r1
|
||||
adds r1, r7, 0
|
||||
movs r2, 0x8
|
||||
bl CpuFastSet
|
||||
ldr r1, [r6]
|
||||
ldr r2, =0x000010b4
|
||||
adds r1, r2
|
||||
ldrb r0, [r1]
|
||||
adds r0, 0x1
|
||||
strb r0, [r1]
|
||||
_0811FA7C:
|
||||
movs r0, 0
|
||||
b _0811FA8A
|
||||
.pool
|
||||
_0811FA88:
|
||||
movs r0, 0x1
|
||||
_0811FA8A:
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_811F960
|
||||
|
||||
thumb_func_start sub_811FA90
|
||||
sub_811FA90: @ 811FA90
|
||||
push {lr}
|
||||
bl sub_811F918
|
||||
_0811FA96:
|
||||
bl sub_811F960
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _0811FA96
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_811FA90
|
||||
|
||||
thumb_func_start sub_811FAA4
|
||||
sub_811FAA4: @ 811FAA4
|
||||
push {r4-r7,lr}
|
||||
lsls r1, 16
|
||||
lsrs r5, r1, 16
|
||||
lsls r2, 16
|
||||
lsrs r6, r2, 16
|
||||
ldr r2, =gUnknown_0203A124
|
||||
ldr r3, [r2]
|
||||
movs r1, 0
|
||||
strb r1, [r3, 0x5]
|
||||
ldr r1, [r2]
|
||||
strb r0, [r1, 0x4]
|
||||
movs r3, 0
|
||||
adds r7, r2, 0
|
||||
adds r4, r7, 0
|
||||
movs r2, 0x1
|
||||
_0811FAC2:
|
||||
ldr r0, [r4]
|
||||
adds r1, r0, 0x6
|
||||
adds r1, r3
|
||||
ldrb r0, [r0, 0x4]
|
||||
asrs r0, r3
|
||||
ands r0, r2
|
||||
strb r0, [r1]
|
||||
adds r0, r3, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r3, r0, 16
|
||||
cmp r3, 0x3
|
||||
bls _0811FAC2
|
||||
lsls r0, r5, 16
|
||||
asrs r0, 16
|
||||
lsls r1, r6, 16
|
||||
asrs r1, 16
|
||||
ldr r3, [r7]
|
||||
ldrh r2, [r3]
|
||||
ldrh r3, [r3, 0x2]
|
||||
bl sub_811FC80
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_811FAA4
|
||||
|
||||
thumb_func_start sub_811FAF8
|
||||
sub_811FAF8: @ 811FAF8
|
||||
push {r4-r7,lr}
|
||||
movs r5, 0
|
||||
ldr r4, =gUnknown_0203A124
|
||||
_0811FAFE:
|
||||
ldr r0, [r4]
|
||||
ldrh r0, [r0]
|
||||
adds r0, r5, r0
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
bl FreeSpriteTilesByTag
|
||||
ldr r0, [r4]
|
||||
ldrh r0, [r0, 0x2]
|
||||
adds r0, r5, r0
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
bl FreeSpritePaletteByTag
|
||||
adds r0, r5, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r5, r0, 16
|
||||
cmp r5, 0x1
|
||||
bls _0811FAFE
|
||||
movs r5, 0
|
||||
ldr r6, =gUnknown_0203A124
|
||||
_0811FB28:
|
||||
ldr r0, [r6]
|
||||
lsls r4, r5, 2
|
||||
adds r0, 0xC
|
||||
adds r0, r4
|
||||
ldr r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _0811FB9A
|
||||
bl DestroySprite
|
||||
ldr r0, [r6]
|
||||
adds r0, 0xC
|
||||
adds r0, r4
|
||||
movs r1, 0
|
||||
str r1, [r0]
|
||||
adds r0, r5, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r5, r0, 16
|
||||
cmp r5, 0x1
|
||||
bls _0811FB28
|
||||
movs r5, 0
|
||||
ldr r6, =gUnknown_0203A124
|
||||
_0811FB52:
|
||||
ldr r0, [r6]
|
||||
lsls r4, r5, 2
|
||||
adds r0, 0x14
|
||||
adds r0, r4
|
||||
ldr r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _0811FB9A
|
||||
bl DestroySprite
|
||||
ldr r0, [r6]
|
||||
adds r0, 0x14
|
||||
adds r0, r4
|
||||
movs r7, 0
|
||||
str r7, [r0]
|
||||
adds r0, r5, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r5, r0, 16
|
||||
cmp r5, 0x3
|
||||
bls _0811FB52
|
||||
ldr r4, =gUnknown_0203A124
|
||||
ldr r0, [r4]
|
||||
ldr r0, [r0, 0x24]
|
||||
cmp r0, 0
|
||||
beq _0811FB8A
|
||||
bl DestroySprite
|
||||
ldr r0, [r4]
|
||||
str r7, [r0, 0x24]
|
||||
_0811FB8A:
|
||||
ldr r0, [r4]
|
||||
ldr r0, [r0, 0x28]
|
||||
cmp r0, 0
|
||||
beq _0811FB9A
|
||||
bl DestroySprite
|
||||
ldr r0, [r4]
|
||||
str r7, [r0, 0x28]
|
||||
_0811FB9A:
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_811FAF8
|
||||
|
||||
thumb_func_start sub_811FBA4
|
||||
sub_811FBA4: @ 811FBA4
|
||||
push {r4,r5,lr}
|
||||
ldr r0, =gMain
|
||||
ldrh r1, [r0, 0x2E]
|
||||
movs r0, 0x40
|
||||
ands r0, r1
|
||||
lsls r0, 16
|
||||
lsrs r5, r0, 16
|
||||
cmp r5, 0
|
||||
beq _0811FBDC
|
||||
movs r0, 0x5
|
||||
bl PlaySE
|
||||
ldr r2, =gUnknown_0203A124
|
||||
ldr r1, [r2]
|
||||
ldrb r0, [r1, 0x5]
|
||||
subs r0, 0x1
|
||||
strb r0, [r1, 0x5]
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bge _0811FC64
|
||||
ldr r1, [r2]
|
||||
movs r0, 0x5
|
||||
strb r0, [r1, 0x5]
|
||||
b _0811FC64
|
||||
.pool
|
||||
_0811FBDC:
|
||||
movs r0, 0x80
|
||||
ands r0, r1
|
||||
lsls r0, 16
|
||||
lsrs r4, r0, 16
|
||||
cmp r4, 0
|
||||
beq _0811FC0C
|
||||
movs r0, 0x5
|
||||
bl PlaySE
|
||||
ldr r2, =gUnknown_0203A124
|
||||
ldr r1, [r2]
|
||||
ldrb r0, [r1, 0x5]
|
||||
adds r0, 0x1
|
||||
strb r0, [r1, 0x5]
|
||||
lsls r0, 24
|
||||
asrs r0, 24
|
||||
cmp r0, 0x5
|
||||
ble _0811FC64
|
||||
ldr r0, [r2]
|
||||
strb r5, [r0, 0x5]
|
||||
b _0811FC64
|
||||
.pool
|
||||
_0811FC0C:
|
||||
movs r0, 0x1
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0811FC68
|
||||
movs r0, 0x5
|
||||
bl PlaySE
|
||||
ldr r2, =gUnknown_0203A124
|
||||
ldr r0, [r2]
|
||||
movs r1, 0x5
|
||||
ldrsb r1, [r0, r1]
|
||||
cmp r1, 0x4
|
||||
beq _0811FC40
|
||||
cmp r1, 0x5
|
||||
beq _0811FC76
|
||||
adds r0, 0x6
|
||||
adds r1, r0, r1
|
||||
movs r2, 0
|
||||
ldrb r0, [r1]
|
||||
cmp r0, 0
|
||||
bne _0811FC62
|
||||
movs r2, 0x1
|
||||
b _0811FC62
|
||||
.pool
|
||||
_0811FC40:
|
||||
strb r4, [r0, 0x4]
|
||||
movs r3, 0
|
||||
adds r4, r2, 0
|
||||
_0811FC46:
|
||||
ldr r2, [r4]
|
||||
adds r0, r2, 0x6
|
||||
adds r0, r3
|
||||
ldrb r0, [r0]
|
||||
lsls r0, r3
|
||||
ldrb r1, [r2, 0x4]
|
||||
orrs r0, r1
|
||||
strb r0, [r2, 0x4]
|
||||
adds r0, r3, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r3, r0, 16
|
||||
cmp r3, 0x3
|
||||
bls _0811FC46
|
||||
b _0811FC76
|
||||
_0811FC62:
|
||||
strb r2, [r1]
|
||||
_0811FC64:
|
||||
movs r0, 0x1
|
||||
b _0811FC78
|
||||
_0811FC68:
|
||||
movs r0, 0x2
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _0811FC64
|
||||
movs r0, 0x5
|
||||
bl PlaySE
|
||||
_0811FC76:
|
||||
movs r0, 0
|
||||
_0811FC78:
|
||||
pop {r4,r5}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_811FBA4
|
||||
|
||||
thumb_func_start sub_811FC80
|
||||
sub_811FC80: @ 811FC80
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
sub sp, 0x50
|
||||
mov r8, r0
|
||||
mov r9, r1
|
||||
adds r5, r2, 0
|
||||
adds r6, r3, 0
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
mov r8, r0
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
mov r9, r1
|
||||
lsls r5, 16
|
||||
lsrs r5, 16
|
||||
lsls r6, 16
|
||||
lsrs r6, 16
|
||||
ldr r4, =gUnknown_0203A124
|
||||
ldr r0, [r4]
|
||||
adds r0, 0x34
|
||||
str r0, [sp, 0x18]
|
||||
add r1, sp, 0x1C
|
||||
movs r7, 0
|
||||
movs r0, 0x80
|
||||
lsls r0, 5
|
||||
strh r0, [r1]
|
||||
mov r0, sp
|
||||
adds r0, 0x1E
|
||||
strh r5, [r0]
|
||||
add r1, sp, 0x20
|
||||
ldr r0, =gPokenavConditionMarker_Gfx
|
||||
str r0, [sp, 0x20]
|
||||
movs r0, 0xC8
|
||||
lsls r0, 2
|
||||
strh r0, [r1, 0x4]
|
||||
adds r0, r5, 0x1
|
||||
strh r0, [r1, 0x6]
|
||||
add r0, sp, 0x28
|
||||
movs r1, 0
|
||||
movs r2, 0x8
|
||||
bl memset
|
||||
add r2, sp, 0x18
|
||||
mov r10, r2
|
||||
mov r0, sp
|
||||
mov r1, r10
|
||||
movs r2, 0x18
|
||||
bl memcpy
|
||||
ldr r0, [r4]
|
||||
ldr r0, [r0, 0x30]
|
||||
str r0, [sp, 0x30]
|
||||
add r0, sp, 0x34
|
||||
strh r6, [r0]
|
||||
add r1, sp, 0x38
|
||||
ldr r0, =gPokenavConditionMarker_Pal
|
||||
str r0, [sp, 0x38]
|
||||
adds r0, r6, 0x1
|
||||
strh r0, [r1, 0x4]
|
||||
add r0, sp, 0x40
|
||||
movs r1, 0
|
||||
movs r2, 0x8
|
||||
bl memset
|
||||
add r4, sp, 0x30
|
||||
mov r0, r10
|
||||
adds r1, r4, 0
|
||||
movs r2, 0x18
|
||||
bl memcpy
|
||||
strh r5, [r4]
|
||||
strh r6, [r4, 0x2]
|
||||
ldr r0, =gUnknown_0859EE7C
|
||||
str r0, [r4, 0x4]
|
||||
ldr r0, =gUnknown_0859EF14
|
||||
str r0, [r4, 0x8]
|
||||
str r7, [r4, 0xC]
|
||||
ldr r0, =gDummySpriteAffineAnimTable
|
||||
str r0, [r4, 0x10]
|
||||
ldr r0, =TaskDummy7
|
||||
str r0, [r4, 0x14]
|
||||
mov r0, sp
|
||||
bl LoadSpriteSheets
|
||||
mov r0, r10
|
||||
bl LoadSpritePalettes
|
||||
movs r5, 0
|
||||
mov r3, r8
|
||||
lsls r3, 16
|
||||
mov r8, r3
|
||||
movs r0, 0x80
|
||||
lsls r0, 14
|
||||
add r0, r8
|
||||
mov r10, r0
|
||||
mov r1, r8
|
||||
str r1, [sp, 0x48]
|
||||
mov r2, r9
|
||||
lsls r2, 16
|
||||
mov r9, r2
|
||||
movs r7, 0x80
|
||||
lsls r7, 14
|
||||
add r7, r9
|
||||
mov r3, r9
|
||||
str r3, [sp, 0x4C]
|
||||
_0811FD58:
|
||||
adds r0, r4, 0
|
||||
mov r2, r10
|
||||
asrs r1, r2, 16
|
||||
asrs r2, r7, 16
|
||||
movs r3, 0x1
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r3, r0, 24
|
||||
cmp r3, 0x40
|
||||
bne _0811FD70
|
||||
b _0811FEFC
|
||||
_0811FD70:
|
||||
ldr r6, =gUnknown_0203A124
|
||||
ldr r2, [r6]
|
||||
lsls r0, r5, 2
|
||||
adds r2, 0xC
|
||||
adds r2, r0
|
||||
lsls r0, r3, 4
|
||||
adds r0, r3
|
||||
lsls r0, 2
|
||||
ldr r1, =gSprites
|
||||
adds r0, r1
|
||||
str r0, [r2]
|
||||
lsls r1, r5, 24
|
||||
lsrs r1, 24
|
||||
bl StartSpriteAnim
|
||||
adds r0, r5, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r5, r0, 16
|
||||
cmp r5, 0x1
|
||||
bls _0811FD58
|
||||
ldr r0, [r6]
|
||||
ldr r1, [r0, 0x10]
|
||||
ldr r3, [sp, 0x4C]
|
||||
asrs r0, r3, 16
|
||||
adds r0, 0x60
|
||||
strh r0, [r1, 0x22]
|
||||
ldrh r0, [r4]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4]
|
||||
ldrh r0, [r4, 0x2]
|
||||
adds r0, 0x1
|
||||
strh r0, [r4, 0x2]
|
||||
ldr r0, =gUnknown_0859EEDC
|
||||
str r0, [r4, 0x8]
|
||||
ldr r0, =sub_811FF40
|
||||
str r0, [r4, 0x14]
|
||||
ldr r0, =gUnknown_0859EE84
|
||||
str r0, [r4, 0x4]
|
||||
movs r5, 0
|
||||
ldr r0, [sp, 0x48]
|
||||
movs r1, 0x80
|
||||
lsls r1, 14
|
||||
adds r0, r1
|
||||
mov r9, r0
|
||||
_0811FDC8:
|
||||
lsls r2, r5, 4
|
||||
adds r2, 0x10
|
||||
ldr r3, [sp, 0x4C]
|
||||
asrs r3, 16
|
||||
mov r8, r3
|
||||
add r2, r8
|
||||
lsls r2, 16
|
||||
asrs r2, 16
|
||||
adds r0, r4, 0
|
||||
mov r3, r9
|
||||
asrs r1, r3, 16
|
||||
movs r3, 0
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r3, r0, 24
|
||||
cmp r3, 0x40
|
||||
bne _0811FDEE
|
||||
b _0811FF0C
|
||||
_0811FDEE:
|
||||
ldr r6, =gUnknown_0203A124
|
||||
ldr r1, [r6]
|
||||
lsls r0, r5, 2
|
||||
adds r1, 0x14
|
||||
adds r1, r0
|
||||
lsls r0, r3, 4
|
||||
adds r0, r3
|
||||
lsls r0, 2
|
||||
ldr r7, =gSprites
|
||||
adds r0, r7
|
||||
str r0, [r1]
|
||||
strh r5, [r0, 0x2E]
|
||||
adds r0, r5, 0x1
|
||||
lsls r0, 16
|
||||
lsrs r5, r0, 16
|
||||
cmp r5, 0x3
|
||||
bls _0811FDC8
|
||||
ldr r0, =SpriteCallbackDummy
|
||||
str r0, [r4, 0x14]
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r3, r0, 24
|
||||
cmp r3, 0x40
|
||||
beq _0811FEA8
|
||||
ldr r0, [r6]
|
||||
lsls r1, r3, 4
|
||||
adds r1, r3
|
||||
lsls r1, 2
|
||||
adds r1, r7
|
||||
str r1, [r0, 0x28]
|
||||
ldrb r3, [r1, 0x1]
|
||||
movs r2, 0x3F
|
||||
adds r0, r2, 0
|
||||
ands r0, r3
|
||||
strb r0, [r1, 0x1]
|
||||
ldr r0, [r6]
|
||||
ldr r1, [r0, 0x28]
|
||||
ldrb r0, [r1, 0x3]
|
||||
ands r2, r0
|
||||
movs r0, 0x80
|
||||
orrs r2, r0
|
||||
strb r2, [r1, 0x3]
|
||||
ldr r0, [r6]
|
||||
ldr r0, [r0, 0x28]
|
||||
movs r1, 0x9
|
||||
bl StartSpriteAnim
|
||||
ldr r1, [r6]
|
||||
ldr r2, [r1, 0x28]
|
||||
ldr r3, [sp, 0x48]
|
||||
asrs r0, r3, 16
|
||||
adds r0, 0x20
|
||||
strh r0, [r2, 0x20]
|
||||
ldr r2, [r1, 0x28]
|
||||
mov r0, r8
|
||||
adds r0, 0x50
|
||||
strh r0, [r2, 0x22]
|
||||
ldr r0, [r1, 0x28]
|
||||
movs r1, 0x1
|
||||
movs r2, 0x2
|
||||
movs r3, 0
|
||||
bl CalcCenterToCornerVec
|
||||
b _0811FEAE
|
||||
.pool
|
||||
_0811FEA8:
|
||||
ldr r1, [r6]
|
||||
movs r0, 0
|
||||
str r0, [r1, 0x28]
|
||||
_0811FEAE:
|
||||
ldr r0, =sub_811FF7C
|
||||
str r0, [r4, 0x14]
|
||||
ldr r0, [sp, 0x48]
|
||||
movs r2, 0xC0
|
||||
lsls r2, 12
|
||||
adds r1, r0, r2
|
||||
asrs r1, 16
|
||||
adds r0, r4, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r3, r0, 24
|
||||
cmp r3, 0x40
|
||||
beq _0811FF20
|
||||
ldr r0, =gUnknown_0203A124
|
||||
ldr r2, [r0]
|
||||
lsls r1, r3, 4
|
||||
adds r1, r3
|
||||
lsls r1, 2
|
||||
ldr r0, =gSprites
|
||||
adds r1, r0
|
||||
str r1, [r2, 0x24]
|
||||
ldr r3, [sp, 0x4C]
|
||||
asrs r0, r3, 16
|
||||
adds r0, 0x10
|
||||
strh r0, [r1, 0x2E]
|
||||
ldr r0, [r2, 0x24]
|
||||
movs r1, 0x8
|
||||
bl StartSpriteAnim
|
||||
b _0811FF28
|
||||
.pool
|
||||
_0811FEFC:
|
||||
ldr r0, =gUnknown_0203A124
|
||||
ldr r0, [r0]
|
||||
lsls r1, r5, 2
|
||||
adds r0, 0xC
|
||||
b _0811FF14
|
||||
.pool
|
||||
_0811FF0C:
|
||||
ldr r0, =gUnknown_0203A124
|
||||
ldr r0, [r0]
|
||||
lsls r1, r5, 2
|
||||
adds r0, 0x14
|
||||
_0811FF14:
|
||||
adds r0, r1
|
||||
movs r1, 0
|
||||
str r1, [r0]
|
||||
b _0811FF28
|
||||
.pool
|
||||
_0811FF20:
|
||||
ldr r0, =gUnknown_0203A124
|
||||
ldr r1, [r0]
|
||||
movs r0, 0
|
||||
str r0, [r1, 0x24]
|
||||
_0811FF28:
|
||||
add sp, 0x50
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_811FC80
|
||||
|
||||
thumb_func_start TaskDummy7
|
||||
TaskDummy7: @ 811FF3C
|
||||
bx lr
|
||||
thumb_func_end TaskDummy7
|
||||
|
||||
thumb_func_start sub_811FF40
|
||||
sub_811FF40: @ 811FF40
|
||||
push {lr}
|
||||
adds r2, r0, 0
|
||||
ldr r0, =gUnknown_0203A124
|
||||
ldr r0, [r0]
|
||||
movs r3, 0x2E
|
||||
ldrsh r1, [r2, r3]
|
||||
adds r0, 0x6
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
cmp r0, 0
|
||||
beq _0811FF6C
|
||||
lsls r1, 1
|
||||
adds r1, 0x1
|
||||
lsls r1, 24
|
||||
lsrs r1, 24
|
||||
adds r0, r2, 0
|
||||
bl StartSpriteAnim
|
||||
b _0811FF76
|
||||
.pool
|
||||
_0811FF6C:
|
||||
lsls r1, 25
|
||||
lsrs r1, 24
|
||||
adds r0, r2, 0
|
||||
bl StartSpriteAnim
|
||||
_0811FF76:
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_811FF40
|
||||
|
||||
thumb_func_start sub_811FF7C
|
||||
sub_811FF7C: @ 811FF7C
|
||||
ldr r1, =gUnknown_0203A124
|
||||
ldr r1, [r1]
|
||||
ldrb r1, [r1, 0x5]
|
||||
lsls r1, 24
|
||||
asrs r1, 24
|
||||
lsls r1, 4
|
||||
ldrh r2, [r0, 0x2E]
|
||||
adds r1, r2
|
||||
strh r1, [r0, 0x22]
|
||||
bx lr
|
||||
.pool
|
||||
thumb_func_end sub_811FF7C
|
||||
|
||||
thumb_func_start sub_811FF94
|
||||
sub_811FF94: @ 811FF94
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
cmp r2, 0
|
||||
bne _0811FFA4
|
||||
ldr r2, =gUnknown_0859E65C
|
||||
_0811FFA4:
|
||||
movs r3, 0x10
|
||||
bl sub_811FFD4
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_811FF94
|
||||
|
||||
thumb_func_start sub_811FFB4
|
||||
sub_811FFB4: @ 811FFB4
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
cmp r2, 0
|
||||
bne _0811FFC4
|
||||
ldr r2, =gUnknown_0859E65C
|
||||
_0811FFC4:
|
||||
movs r3, 0x1
|
||||
bl sub_811FFD4
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_811FFB4
|
||||
|
||||
thumb_func_start sub_811FFD4
|
||||
sub_811FFD4: @ 811FFD4
|
||||
push {r4-r6,lr}
|
||||
mov r6, r8
|
||||
push {r6}
|
||||
sub sp, 0x28
|
||||
lsls r0, 16
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
ldr r4, =gUnknown_0859E67C
|
||||
str r4, [sp, 0x18]
|
||||
movs r4, 0x80
|
||||
add r5, sp, 0x18
|
||||
lsrs r6, r0, 16
|
||||
orrs r0, r4
|
||||
str r0, [r5, 0x4]
|
||||
str r2, [sp, 0x20]
|
||||
ldr r0, =0xffff0000
|
||||
mov r8, r0
|
||||
add r4, sp, 0x20
|
||||
ldr r0, [r4, 0x4]
|
||||
mov r2, r8
|
||||
ands r0, r2
|
||||
orrs r0, r1
|
||||
str r0, [r4, 0x4]
|
||||
mov r0, sp
|
||||
movs r2, 0
|
||||
strh r6, [r0]
|
||||
strh r1, [r0, 0x2]
|
||||
ldr r0, =gUnknown_0859EF1C
|
||||
str r0, [sp, 0x4]
|
||||
ldr r0, =gUnknown_0859EFA4
|
||||
str r0, [sp, 0x8]
|
||||
str r2, [sp, 0xC]
|
||||
ldr r0, =gDummySpriteAffineAnimTable
|
||||
str r0, [sp, 0x10]
|
||||
ldr r0, =TaskDummy7
|
||||
str r0, [sp, 0x14]
|
||||
lsls r3, 23
|
||||
lsrs r3, 16
|
||||
ldr r0, [r5, 0x4]
|
||||
mov r1, r8
|
||||
ands r0, r1
|
||||
orrs r0, r3
|
||||
str r0, [r5, 0x4]
|
||||
adds r0, r5, 0
|
||||
bl LoadSpriteSheet
|
||||
adds r0, r4, 0
|
||||
bl LoadSpritePalette
|
||||
mov r0, sp
|
||||
movs r1, 0
|
||||
movs r2, 0
|
||||
movs r3, 0
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
cmp r1, 0x40
|
||||
bne _08120068
|
||||
movs r0, 0
|
||||
b _08120072
|
||||
.pool
|
||||
_08120068:
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
ldr r1, =gSprites
|
||||
adds r0, r1
|
||||
_08120072:
|
||||
add sp, 0x28
|
||||
pop {r3}
|
||||
mov r8, r3
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_811FFD4
|
||||
|
||||
thumb_func_start sub_8120084
|
||||
sub_8120084: @ 8120084
|
||||
push {lr}
|
||||
lsls r0, 24
|
||||
lsrs r0, 17
|
||||
ldr r2, =gUnknown_0859E67C
|
||||
adds r0, r2
|
||||
movs r2, 0x80
|
||||
movs r3, 0x10
|
||||
bl RequestDma3Copy
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_8120084
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
1152
asm/rotating_gate.s
1152
asm/rotating_gate.s
File diff suppressed because it is too large
Load Diff
@ -1,157 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
.align 2, 0
|
||||
|
||||
gUnknown_0859E65C:: @ 859E65C
|
||||
.incbin "graphics/misc/mon_markings.gbapal"
|
||||
|
||||
gUnknown_0859E67C:: @ 859E67C
|
||||
.incbin "graphics/misc/mon_markings.4bpp"
|
||||
|
||||
gUnknown_0859EE7C:: @ 859EE7C
|
||||
.2byte 0, 0xC000, 0, 0
|
||||
|
||||
gUnknown_0859EE84:: @ 859EE84
|
||||
.2byte 0, 0, 0, 0
|
||||
|
||||
gUnknown_0859EE8C:: @ 859EE8C
|
||||
.2byte 0, 5, -1, 0
|
||||
|
||||
gUnknown_0859EE94:: @ 859EE94
|
||||
.2byte 1, 5, -1, 0
|
||||
|
||||
gUnknown_0859EE9C:: @ 859EE9C
|
||||
.2byte 2, 5, -1, 0
|
||||
|
||||
gUnknown_0859EEA4:: @ 859EEA4
|
||||
.2byte 3, 5, -1, 0
|
||||
|
||||
gUnknown_0859EEAC:: @ 859EEAC
|
||||
.2byte 4, 5, -1, 0
|
||||
|
||||
gUnknown_0859EEB4:: @ 859EEB4
|
||||
.2byte 5, 5, -1, 0
|
||||
|
||||
gUnknown_0859EEBC:: @ 859EEBC
|
||||
.2byte 6, 5, -1, 0
|
||||
|
||||
gUnknown_0859EEC4:: @ 859EEC4
|
||||
.2byte 7, 5, -1, 0
|
||||
|
||||
gUnknown_0859EECC:: @ 859EECC
|
||||
.2byte 8, 5, -1, 0
|
||||
|
||||
gUnknown_0859EED4:: @ 859EED4
|
||||
.2byte 9, 5, -1, 0
|
||||
|
||||
gUnknown_0859EEDC:: @ 859EEDC
|
||||
.4byte gUnknown_0859EE8C
|
||||
.4byte gUnknown_0859EE94
|
||||
.4byte gUnknown_0859EE9C
|
||||
.4byte gUnknown_0859EEA4
|
||||
.4byte gUnknown_0859EEAC
|
||||
.4byte gUnknown_0859EEB4
|
||||
.4byte gUnknown_0859EEBC
|
||||
.4byte gUnknown_0859EEC4
|
||||
.4byte gUnknown_0859EECC
|
||||
.4byte gUnknown_0859EED4
|
||||
|
||||
gUnknown_0859EF04:: @ 859EF04
|
||||
.2byte 0, 5, -1, 0
|
||||
|
||||
gUnknown_0859EF0C:: @ 859EF0C
|
||||
.2byte 64, 5, -1, 0
|
||||
|
||||
gUnknown_0859EF14:: @ 859EF14
|
||||
.4byte gUnknown_0859EF04
|
||||
.4byte gUnknown_0859EF0C
|
||||
|
||||
gUnknown_0859EF1C:: @ 859EF1C
|
||||
.2byte 0x4000
|
||||
.2byte 0x4000
|
||||
.2byte 0
|
||||
.2byte 0
|
||||
|
||||
gUnknown_0859EF24:: @ 859EF24
|
||||
obj_image_anim_frame 0, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_0859EF2C:: @ 859EF2C
|
||||
obj_image_anim_frame 4, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_0859EF34:: @ 859EF34
|
||||
obj_image_anim_frame 8, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_0859EF3C:: @ 859EF3C
|
||||
obj_image_anim_frame 12, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_0859EF44:: @ 859EF44
|
||||
obj_image_anim_frame 16, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_0859EF4C:: @ 859EF4C
|
||||
obj_image_anim_frame 20, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_0859EF54:: @ 859EF54
|
||||
obj_image_anim_frame 24, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_0859EF5C:: @ 859EF5C
|
||||
obj_image_anim_frame 28, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_0859EF64:: @ 859EF64
|
||||
obj_image_anim_frame 32, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_0859EF6C:: @ 859EF6C
|
||||
obj_image_anim_frame 36, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_0859EF74:: @ 859EF74
|
||||
obj_image_anim_frame 40, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_0859EF7C:: @ 859EF7C
|
||||
obj_image_anim_frame 44, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_0859EF84:: @ 859EF84
|
||||
obj_image_anim_frame 48, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_0859EF8C:: @ 859EF8C
|
||||
obj_image_anim_frame 52, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_0859EF94:: @ 859EF94
|
||||
obj_image_anim_frame 56, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_0859EF9C:: @ 859EF9C
|
||||
obj_image_anim_frame 60, 5
|
||||
obj_image_anim_end
|
||||
|
||||
gUnknown_0859EFA4:: @ 859EFA4
|
||||
.4byte gUnknown_0859EF24
|
||||
.4byte gUnknown_0859EF2C
|
||||
.4byte gUnknown_0859EF34
|
||||
.4byte gUnknown_0859EF3C
|
||||
.4byte gUnknown_0859EF44
|
||||
.4byte gUnknown_0859EF4C
|
||||
.4byte gUnknown_0859EF54
|
||||
.4byte gUnknown_0859EF5C
|
||||
.4byte gUnknown_0859EF64
|
||||
.4byte gUnknown_0859EF6C
|
||||
.4byte gUnknown_0859EF74
|
||||
.4byte gUnknown_0859EF7C
|
||||
.4byte gUnknown_0859EF84
|
||||
.4byte gUnknown_0859EF8C
|
||||
.4byte gUnknown_0859EF94
|
||||
.4byte gUnknown_0859EF9C
|
@ -1,285 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.section .rodata
|
||||
|
||||
.align 2
|
||||
gUnknown_0858E8B0:: @ 858E8B0
|
||||
.2byte 0x0006, 0x0007
|
||||
.byte 0x05, 0x01
|
||||
|
||||
.align 2
|
||||
.2byte 0x0009, 0x000f
|
||||
.byte 0x05, 0x02
|
||||
|
||||
.align 2
|
||||
.2byte 0x0003, 0x0013
|
||||
.byte 0x05, 0x01
|
||||
|
||||
.align 2
|
||||
.2byte 0x0002, 0x0006
|
||||
.byte 0x04, 0x01
|
||||
|
||||
.align 2
|
||||
.2byte 0x0009, 0x000c
|
||||
.byte 0x04, 0x00
|
||||
|
||||
.align 2
|
||||
.2byte 0x0006, 0x0017
|
||||
.byte 0x04, 0x00
|
||||
|
||||
.align 2
|
||||
.2byte 0x000c, 0x0016
|
||||
.byte 0x04, 0x00
|
||||
|
||||
.align 2
|
||||
.2byte 0x0006, 0x0003
|
||||
.byte 0x03, 0x02
|
||||
|
||||
.align 2
|
||||
gUnknown_0858E8F0:: @ 858E8F0
|
||||
.2byte 0x000e, 0x0005
|
||||
.byte 0x04, 0x01
|
||||
|
||||
.align 2
|
||||
.2byte 0x000a, 0x0006
|
||||
.byte 0x01, 0x02
|
||||
|
||||
.align 2
|
||||
.2byte 0x0006, 0x0006
|
||||
.byte 0x03, 0x01
|
||||
|
||||
.align 2
|
||||
.2byte 0x000e, 0x0008
|
||||
.byte 0x04, 0x01
|
||||
|
||||
.align 2
|
||||
.2byte 0x0003, 0x000a
|
||||
.byte 0x02, 0x03
|
||||
|
||||
.align 2
|
||||
.2byte 0x0009, 0x000e
|
||||
.byte 0x00, 0x01
|
||||
|
||||
.align 2
|
||||
.2byte 0x0003, 0x000f
|
||||
.byte 0x06, 0x00
|
||||
|
||||
.align 2
|
||||
.2byte 0x0002, 0x0011
|
||||
.byte 0x01, 0x02
|
||||
|
||||
.align 2
|
||||
.2byte 0x000c, 0x0012
|
||||
.byte 0x06, 0x03
|
||||
|
||||
.align 2
|
||||
.2byte 0x0005, 0x0012
|
||||
.byte 0x03, 0x01
|
||||
|
||||
.align 2
|
||||
.2byte 0x000a, 0x0013
|
||||
.byte 0x02, 0x02
|
||||
|
||||
.align 2
|
||||
gUnknown_0858E948:: @ 858E948
|
||||
.incbin "graphics/misc/rotating_gate_1.4bpp"
|
||||
|
||||
.align 2
|
||||
gUnknown_0858EB48:: @ 858EB48
|
||||
.incbin "graphics/misc/rotating_gate_2.4bpp"
|
||||
|
||||
.align 2
|
||||
gUnknown_0858F348:: @ 858F348
|
||||
.incbin "graphics/misc/rotating_gate_3.4bpp"
|
||||
|
||||
.align 2
|
||||
gUnknown_0858FB48:: @ 858FB48
|
||||
.incbin "graphics/misc/rotating_gate_4.4bpp"
|
||||
|
||||
.align 2
|
||||
gUnknown_08590348:: @ 8590348
|
||||
.incbin "graphics/misc/rotating_gate_5.4bpp"
|
||||
|
||||
.align 2
|
||||
gUnknown_08590548:: @ 8590548
|
||||
.incbin "graphics/misc/rotating_gate_6.4bpp"
|
||||
|
||||
.align 2
|
||||
gUnknown_08590D48:: @ 8590D48
|
||||
.incbin "graphics/misc/rotating_gate_7.4bpp"
|
||||
|
||||
.align 2
|
||||
gUnknown_08591548:: @ 8591548
|
||||
.incbin "graphics/misc/rotating_gate_8.4bpp"
|
||||
|
||||
.align 2
|
||||
gOamData_8591D48:: @ 8591D48
|
||||
.2byte 0x0100, 0xc000, 0x2800
|
||||
|
||||
.align 2
|
||||
gOamData_8591D50:: @ 8591D50
|
||||
.2byte 0x0100, 0x8000, 0x2800
|
||||
|
||||
.align 2
|
||||
gUnknown_08591D58:: @ 8591D58
|
||||
obj_tiles gUnknown_0858E948, 0x0200, 0x1300
|
||||
obj_tiles gUnknown_0858EB48, 0x0800, 0x1301
|
||||
obj_tiles gUnknown_0858F348, 0x0800, 0x1302
|
||||
obj_tiles gUnknown_0858FB48, 0x0800, 0x1303
|
||||
obj_tiles gUnknown_08590348, 0x0200, 0x1304
|
||||
obj_tiles gUnknown_08590548, 0x0800, 0x1305
|
||||
obj_tiles gUnknown_08590D48, 0x0800, 0x1306
|
||||
obj_tiles gUnknown_08591548, 0x0800, 0x1307
|
||||
null_obj_tiles
|
||||
|
||||
.align 2
|
||||
gSpriteAnim_8591DA0:: @ 8591DA0
|
||||
.2byte 0x0000, 0x0000, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAnim_8591DA8:: @ 8591DA8
|
||||
.2byte 0x0000, 0x0000, 0xffff, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAnimTable_8591DB0:: @ 8591DB0
|
||||
.4byte gSpriteAnim_8591DA0
|
||||
|
||||
.align 2
|
||||
gSpriteAnimTable_8591DB4:: @ 8591DB4
|
||||
.4byte gSpriteAnim_8591DA8
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591DB8:: @ 8591DB8
|
||||
.2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591DC8:: @ 8591DC8
|
||||
.2byte 0x0100, 0x0100, 0x00c0, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591DD8:: @ 8591DD8
|
||||
.2byte 0x0100, 0x0100, 0x0080, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591DE8:: @ 8591DE8
|
||||
.2byte 0x0100, 0x0100, 0x0040, 0x0000, 0x7ffe, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591DF8:: @ 8591DF8
|
||||
.2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x10fc, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591E10:: @ 8591E10
|
||||
.2byte 0x0100, 0x0100, 0x00c0, 0x0000, 0x0000, 0x0000, 0x10fc, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591E28:: @ 8591E28
|
||||
.2byte 0x0100, 0x0100, 0x0080, 0x0000, 0x0000, 0x0000, 0x10fc, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591E40:: @ 8591E40
|
||||
.2byte 0x0100, 0x0100, 0x0040, 0x0000, 0x0000, 0x0000, 0x10fc, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591E58:: @ 8591E58
|
||||
.2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x1004, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591E70:: @ 8591E70
|
||||
.2byte 0x0100, 0x0100, 0x0040, 0x0000, 0x0000, 0x0000, 0x1004, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591E88:: @ 8591E88
|
||||
.2byte 0x0100, 0x0100, 0x0080, 0x0000, 0x0000, 0x0000, 0x1004, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591EA0:: @ 8591EA0
|
||||
.2byte 0x0100, 0x0100, 0x00c0, 0x0000, 0x0000, 0x0000, 0x1004, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591EB8:: @ 8591EB8
|
||||
.2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x08f8, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591ED0:: @ 8591ED0
|
||||
.2byte 0x0100, 0x0100, 0x00c0, 0x0000, 0x0000, 0x0000, 0x08f8, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591EE8:: @ 8591EE8
|
||||
.2byte 0x0100, 0x0100, 0x0080, 0x0000, 0x0000, 0x0000, 0x08f8, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591F00:: @ 8591F00
|
||||
.2byte 0x0100, 0x0100, 0x0040, 0x0000, 0x0000, 0x0000, 0x08f8, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591F18:: @ 8591F18
|
||||
.2byte 0x0100, 0x0100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0808, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591F30:: @ 8591F30
|
||||
.2byte 0x0100, 0x0100, 0x0040, 0x0000, 0x0000, 0x0000, 0x0808, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591F48:: @ 8591F48
|
||||
.2byte 0x0100, 0x0100, 0x0080, 0x0000, 0x0000, 0x0000, 0x0808, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnim_8591F60:: @ 8591F60
|
||||
.2byte 0x0100, 0x0100, 0x00c0, 0x0000, 0x0000, 0x0000, 0x0808, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
|
||||
|
||||
.align 2
|
||||
gSpriteAffineAnimTable_8591F78:: @ 8591F78
|
||||
.4byte gSpriteAffineAnim_8591DB8
|
||||
.4byte gSpriteAffineAnim_8591DC8
|
||||
.4byte gSpriteAffineAnim_8591DD8
|
||||
.4byte gSpriteAffineAnim_8591DE8
|
||||
.4byte gSpriteAffineAnim_8591E58
|
||||
.4byte gSpriteAffineAnim_8591EA0
|
||||
.4byte gSpriteAffineAnim_8591E88
|
||||
.4byte gSpriteAffineAnim_8591E70
|
||||
.4byte gSpriteAffineAnim_8591DF8
|
||||
.4byte gSpriteAffineAnim_8591E10
|
||||
.4byte gSpriteAffineAnim_8591E28
|
||||
.4byte gSpriteAffineAnim_8591E40
|
||||
.4byte gSpriteAffineAnim_8591F18
|
||||
.4byte gSpriteAffineAnim_8591F60
|
||||
.4byte gSpriteAffineAnim_8591F48
|
||||
.4byte gSpriteAffineAnim_8591F30
|
||||
.4byte gSpriteAffineAnim_8591EB8
|
||||
.4byte gSpriteAffineAnim_8591ED0
|
||||
.4byte gSpriteAffineAnim_8591EE8
|
||||
.4byte gSpriteAffineAnim_8591F00
|
||||
|
||||
.align 2
|
||||
gUnknown_08591FC8:: @ 8591FC8
|
||||
spr_template 0x1300, 0xffff, gOamData_8591D48, gSpriteAnimTable_8591DB0, NULL, gSpriteAffineAnimTable_8591F78, sub_80FBAE4
|
||||
|
||||
.align 2
|
||||
gUnknown_08591FE0:: @ 8591FE0
|
||||
spr_template 0x1300, 0xffff, gOamData_8591D50, gSpriteAnimTable_8591DB4, NULL, gSpriteAffineAnimTable_8591F78, sub_80FBAE4
|
||||
|
||||
gUnknown_08591FF8:: @ 8591FF8
|
||||
.byte 0xff, 0xff, 0xff, 0xff, 0x27, 0x26, 0x12, 0x13, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
|
||||
|
||||
gUnknown_08592008:: @ 8592008
|
||||
.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x17, 0x16, 0x22, 0x23, 0xff, 0xff, 0xff, 0xff
|
||||
|
||||
gUnknown_08592018:: @ 8592018
|
||||
.byte 0xff, 0x11, 0xff, 0xff, 0xff, 0x10, 0xff, 0xff, 0xff, 0x24, 0xff, 0xff, 0xff, 0x25, 0xff, 0xff
|
||||
|
||||
gUnknown_08592028:: @ 8592028
|
||||
.byte 0xff, 0xff, 0x21, 0xff, 0xff, 0xff, 0x20, 0xff, 0xff, 0xff, 0x14, 0xff, 0xff, 0xff, 0x15, 0xff
|
||||
|
||||
gUnknown_08592038:: @ 8592038
|
||||
.byte 0x00, 0xff, 0x00, 0x00, 0x01, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x00
|
||||
|
||||
gUnknown_08592058:: @ 8592058
|
||||
.byte 0xff, 0xff, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00
|
||||
|
||||
gUnknown_08592078:: @ 8592078
|
||||
.byte 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00
|
||||
.byte 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00
|
||||
|
@ -4,7 +4,7 @@ FortreeCity_Gym_MapScripts:: @ 82165AB
|
||||
.byte 0
|
||||
|
||||
FortreeCity_Gym_MapScript1_2165B6: @ 82165B6
|
||||
special sub_80FBE90
|
||||
special RotatingGate_InitPuzzle
|
||||
end
|
||||
|
||||
FortreeCity_Gym_MapScript2_2165BA: @ 82165BA
|
||||
|
@ -4,7 +4,7 @@ Route110_TrickHousePuzzle6_MapScripts:: @ 826DDA7
|
||||
.byte 0
|
||||
|
||||
Route110_TrickHousePuzzle6_MapScript1_26DDB2: @ 826DDB2
|
||||
special sub_80FBE90
|
||||
special RotatingGate_InitPuzzle
|
||||
end
|
||||
|
||||
Route110_TrickHousePuzzle6_MapScript2_26DDB6: @ 826DDB6
|
||||
|
@ -212,7 +212,7 @@ gSpecials:: @ 81DBA64
|
||||
def_special SubtractMoneyFromVar0x8005
|
||||
def_special sub_80F972C
|
||||
def_special sp0C8_whiteout_maybe
|
||||
def_special sub_80FBE90
|
||||
def_special RotatingGate_InitPuzzle
|
||||
def_special RotatingGate_InitPuzzleAndGraphics
|
||||
def_special SetSSTidalFlag
|
||||
def_special ResetSSTidalFlag
|
||||
|
@ -63,6 +63,10 @@ enum
|
||||
ACRO_TRANS_WHEELIE_LOWERING_MOVING,
|
||||
};
|
||||
|
||||
// Exported RAM declarations
|
||||
extern bool8 gUnusedBikeCameraAheadPanback;
|
||||
|
||||
// Exported ROM declarations
|
||||
void MovePlayerOnBike(u8 direction, u16 newKeys, u16 heldKeys);
|
||||
void Bike_TryAcroBikeHistoryUpdate(u16 newKeys, u16 heldKeys);
|
||||
bool8 RS_IsRunningDisallowed(u8 tile);
|
||||
|
@ -6,22 +6,19 @@
|
||||
struct CameraObject
|
||||
{
|
||||
void (*callback)(struct CameraObject *);
|
||||
u32 unk4;
|
||||
u32 spriteId;
|
||||
s32 unk8;
|
||||
s32 unkC;
|
||||
s32 x;
|
||||
s32 y;
|
||||
};
|
||||
|
||||
extern struct CameraObject gUnknown_03005DD0;
|
||||
|
||||
// Exported RAM declarations
|
||||
|
||||
extern struct CameraObject gUnknown_03005DD0;
|
||||
extern u16 gUnknown_03005DEC;
|
||||
extern u16 gUnknown_03005DE8;
|
||||
|
||||
// Exported ROM declarations
|
||||
|
||||
void DrawWholeMapView(void);
|
||||
void CurrentMapDrawMetatileAt(int x, int y);
|
||||
void sub_8089C08(s16 *a0, s16 *a1);
|
||||
|
@ -91,6 +91,8 @@ void sub_808F23C(const struct MapObject *mapObject, u8 movementType);
|
||||
void sub_808F208(const struct MapObject *mapObject);
|
||||
void npc_coords_shift_still(struct MapObject *pObject);
|
||||
void FieldObjectMoveDestCoords(struct MapObject *pObject, u32 unk_19, s16 *pInt, s16 *pInt1);
|
||||
u8 AddCameraObject(u8 linkedSpriteId);
|
||||
void UpdateFieldObjectsForCameraUpdate(s16 x, s16 y);
|
||||
|
||||
// Exported data declarations
|
||||
|
||||
|
@ -16,5 +16,7 @@ s32 GetMapBorderIdAt(s16, s16);
|
||||
bool32 CanCameraMoveInDirection(u8);
|
||||
u16 GetBehaviorByMetatileId(u16 metatileId);
|
||||
void sav1_camera_get_focus_coords(u16 *x, u16 *y);
|
||||
u8 MapGridGetMetatileLayerTypeAt(s32 x, s32 y);
|
||||
u8 CameraMove(s32 deltaX, s32 deltaY);
|
||||
|
||||
#endif //GUARD_FIELDMAP_H
|
||||
|
@ -2864,4 +2864,8 @@ extern const u8 gBerryPalette_Enigma[];
|
||||
//credits
|
||||
extern const u8 gCreditsCopyrightEnd_Gfx[];
|
||||
|
||||
//pokenav condition marker
|
||||
extern const u8 gPokenavConditionMarker_Gfx[];
|
||||
extern const u16 gPokenavConditionMarker_Pal[];
|
||||
|
||||
#endif //GUARD_GRAPHICS_H
|
||||
|
24
include/mon_markings.h
Normal file
24
include/mon_markings.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef POKEEMERALD_MON_MARKINGS_H
|
||||
#define POKEEMERALD_MON_MARKINGS_H
|
||||
|
||||
struct PokemonMarkMenu
|
||||
{
|
||||
/*0x0000*/ u16 baseTileTag;
|
||||
/*0x0002*/ u16 basePaletteTag;
|
||||
/*0x0004*/ u8 markings; // bit flags
|
||||
/*0x0005*/ s8 cursorPos;
|
||||
/*0x0006*/ bool8 markingsArray[4];
|
||||
/*0x000A*/ u8 cursorBaseY;
|
||||
/*0x000B*/ bool8 spriteSheetLoadRequired;
|
||||
/*0x000C*/ struct Sprite *menuWindowSprites[2]; // upper and lower halves of menu window
|
||||
/*0x0014*/ struct Sprite *menuMarkingSprites[4];
|
||||
/*0x0024*/ struct Sprite *unkSprite;
|
||||
/*0x0028*/ struct Sprite *menuTextSprite;
|
||||
/*0x002C*/ const u8 *frameTiles;
|
||||
/*0x0030*/ const u16 *framePalette;
|
||||
/*0x0034*/ u8 menuWindowSpriteTiles[0x1000];
|
||||
/*0x1034*/ u8 filler1030[0x80];
|
||||
/*0x10B4*/ u8 tileLoadState;
|
||||
}; // 10b8
|
||||
|
||||
#endif //POKEEMERALD_MON_MARKINGS_H
|
@ -15,9 +15,15 @@ struct LinkPlayerMapObject
|
||||
u8 mode;
|
||||
};
|
||||
|
||||
// Exported RAM declarations
|
||||
extern struct WarpData gUnknown_020322DC;
|
||||
extern struct LinkPlayerMapObject gLinkPlayerMapObjects[4];
|
||||
|
||||
extern u16 *gBGTilemapBuffers1;
|
||||
extern u16 *gBGTilemapBuffers2;
|
||||
extern u16 *gBGTilemapBuffers3;
|
||||
|
||||
// Exported ROM declarations
|
||||
extern const struct UCoords32 gUnknown_08339D64[];
|
||||
|
||||
void DoWhiteOut(void);
|
||||
|
8
include/rotating_gate.h
Normal file
8
include/rotating_gate.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef GUARD_ROTATING_GATE_H
|
||||
#define GUARD_ROTATING_GATE_H
|
||||
|
||||
void RotatingGatePuzzleCameraUpdate(s16, s16);
|
||||
void RotatingGate_InitPuzzleAndGraphics();
|
||||
u32 CheckForRotatingGatePuzzleCollision(u8, s16, s16);
|
||||
|
||||
#endif // GUARD_ROTATING_GATE_H
|
@ -5,11 +5,11 @@
|
||||
|
||||
struct TilesPal
|
||||
{
|
||||
const u32 *tiles;
|
||||
const u8 *tiles;
|
||||
const u16 *pal;
|
||||
};
|
||||
|
||||
extern const u32 gTextWindowFrame1_Gfx[];
|
||||
extern const u8 gTextWindowFrame1_Gfx[];
|
||||
extern const u16 gTextWindowFrame1_Pal[];
|
||||
|
||||
const struct TilesPal* GetWindowFrameTilesPal(u8 id);
|
||||
|
@ -89,7 +89,7 @@ SECTIONS {
|
||||
src/overworld.o(.text);
|
||||
asm/fieldmap.o(.text);
|
||||
src/metatile_behavior.o(.text);
|
||||
asm/field_camera.o(.text);
|
||||
src/field_camera.o(.text);
|
||||
src/field_door.o(.text);
|
||||
asm/field_player_avatar.o(.text);
|
||||
src/field_map_obj.o(.text);
|
||||
@ -154,14 +154,14 @@ SECTIONS {
|
||||
src/pokemon_size_record.o(.text);
|
||||
asm/fldeff_80F9BCC.o(.text);
|
||||
src/field_special_scene.o(.text);
|
||||
asm/rotating_gate.o(.text);
|
||||
src/rotating_gate.o(.text);
|
||||
src/safari_zone.o(.text);
|
||||
asm/contest_link_80FC4F4.o(.text);
|
||||
src/item_use.o(.text);
|
||||
asm/battle_anim_80FE840.o(.text);
|
||||
src/bike.o(.text);
|
||||
asm/easy_chat.o(.text);
|
||||
asm/mon_markings.o(.text);
|
||||
src/mon_markings.o(.text);
|
||||
asm/mauville_old_man.o(.text);
|
||||
src/mail.o(.text);
|
||||
asm/menu_helpers.o(.text);
|
||||
@ -450,12 +450,12 @@ SECTIONS {
|
||||
src/pokemon_size_record.o(.rodata)
|
||||
data/field_effect_misc.o(.rodata);
|
||||
data/field_special_scene.o(.rodata);
|
||||
data/rotating_gate.o(.rodata);
|
||||
src/rotating_gate.o(.rodata);
|
||||
data/item_use.o(.rodata);
|
||||
data/battle_anim_80FE840.o(.rodata);
|
||||
src/bike.o(.rodata);
|
||||
data/easy_chat.o(.rodata);
|
||||
data/mon_markings.o(.rodata);
|
||||
src/mon_markings.o(.rodata);
|
||||
data/mauville_old_man.o(.rodata);
|
||||
src/mail.o(.rodata);
|
||||
data/menu_helpers.o(.rodata);
|
||||
|
@ -12,7 +12,6 @@
|
||||
|
||||
extern bool8 gBikeCyclingChallenge;
|
||||
extern u8 gBikeCollisions;
|
||||
extern bool8 gUnknown_02037348;
|
||||
|
||||
extern u8 sub_8093514(u8 direction);
|
||||
extern u8 sub_808B980(u8 direction);
|
||||
@ -989,7 +988,7 @@ bool8 player_should_look_direction_be_enforced_upon_movement(void)
|
||||
|
||||
void GetOnOffBike(u8 transitionFlags)
|
||||
{
|
||||
gUnknown_02037348 = FALSE;
|
||||
gUnusedBikeCameraAheadPanback = FALSE;
|
||||
|
||||
if (gPlayerAvatar.flags & (PLAYER_AVATAR_FLAG_MACH_BIKE | PLAYER_AVATAR_FLAG_ACRO_BIKE))
|
||||
{
|
||||
|
@ -1305,12 +1305,12 @@ void sub_8128060(u8 taskId)
|
||||
|
||||
void ConfigureCameraObjectForPlacingDecoration(struct PlaceDecorationGraphicsDataBuffer *data, u8 decor)
|
||||
{
|
||||
sDecor_CameraSpriteObjectIdx1 = gSprites[gUnknown_03005DD0.unk4].data[0];
|
||||
gUnknown_03005DD0.unk4 = gpu_pal_decompress_alloc_tag_and_upload(data, decor);
|
||||
gSprites[gUnknown_03005DD0.unk4].oam.priority = 1;
|
||||
gSprites[gUnknown_03005DD0.unk4].callback = sub_81292D0;
|
||||
gSprites[gUnknown_03005DD0.unk4].pos1.x = gUnknown_085A7250[data->decoration->shape].x;
|
||||
gSprites[gUnknown_03005DD0.unk4].pos1.y = gUnknown_085A7250[data->decoration->shape].y;
|
||||
sDecor_CameraSpriteObjectIdx1 = gSprites[gUnknown_03005DD0.spriteId].data[0];
|
||||
gUnknown_03005DD0.spriteId = gpu_pal_decompress_alloc_tag_and_upload(data, decor);
|
||||
gSprites[gUnknown_03005DD0.spriteId].oam.priority = 1;
|
||||
gSprites[gUnknown_03005DD0.spriteId].callback = sub_81292D0;
|
||||
gSprites[gUnknown_03005DD0.spriteId].pos1.x = gUnknown_085A7250[data->decoration->shape].x;
|
||||
gSprites[gUnknown_03005DD0.spriteId].pos1.y = gUnknown_085A7250[data->decoration->shape].y;
|
||||
}
|
||||
|
||||
void SetUpPlacingDecorationPlayerAvatar(u8 taskId, struct PlaceDecorationGraphicsDataBuffer *data)
|
||||
@ -1332,7 +1332,7 @@ void SetUpPlacingDecorationPlayerAvatar(u8 taskId, struct PlaceDecorationGraphic
|
||||
}
|
||||
gSprites[sDecor_CameraSpriteObjectIdx2].oam.priority = 1;
|
||||
DestroySprite(&gSprites[sDecor_CameraSpriteObjectIdx1]);
|
||||
sDecor_CameraSpriteObjectIdx1 = gUnknown_03005DD0.unk4;
|
||||
sDecor_CameraSpriteObjectIdx1 = gUnknown_03005DD0.spriteId;
|
||||
}
|
||||
|
||||
void sub_812826C(u8 taskId)
|
||||
@ -2251,9 +2251,9 @@ bool8 sub_81299AC(u8 taskId)
|
||||
void SetUpPuttingAwayDecorationPlayerAvatar(void)
|
||||
{
|
||||
player_get_direction_lower_nybble();
|
||||
sDecor_CameraSpriteObjectIdx1 = gSprites[gUnknown_03005DD0.unk4].data[0];
|
||||
sDecor_CameraSpriteObjectIdx1 = gSprites[gUnknown_03005DD0.spriteId].data[0];
|
||||
sub_812A39C();
|
||||
gUnknown_03005DD0.unk4 = CreateSprite(&gUnknown_085A7404, 0x78, 0x50, 0);
|
||||
gUnknown_03005DD0.spriteId = CreateSprite(&gUnknown_085A7404, 0x78, 0x50, 0);
|
||||
if (gSaveBlock2Ptr->playerGender == MALE)
|
||||
{
|
||||
sDecor_CameraSpriteObjectIdx2 = AddPseudoFieldObject(0xC1, SpriteCallbackDummy, 0x88, 0x48, 0);
|
||||
@ -2264,7 +2264,7 @@ void SetUpPuttingAwayDecorationPlayerAvatar(void)
|
||||
}
|
||||
gSprites[sDecor_CameraSpriteObjectIdx2].oam.priority = 1;
|
||||
DestroySprite(&gSprites[sDecor_CameraSpriteObjectIdx1]);
|
||||
sDecor_CameraSpriteObjectIdx1 = gUnknown_03005DD0.unk4;
|
||||
sDecor_CameraSpriteObjectIdx1 = gUnknown_03005DD0.spriteId;
|
||||
gSprites[sDecor_CameraSpriteObjectIdx1].oam.priority = 1;
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,18 @@
|
||||
|
||||
// Includes
|
||||
#include "global.h"
|
||||
#include "berry.h"
|
||||
#include "bike.h"
|
||||
#include "field_camera.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "fieldmap.h"
|
||||
#include "field_map_obj.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "menu.h"
|
||||
#include "overworld.h"
|
||||
#include "rotating_gate.h"
|
||||
#include "sprite.h"
|
||||
#include "text.h"
|
||||
|
||||
// Static type declarations
|
||||
|
||||
struct FieldCameraUnknownStruct
|
||||
{
|
||||
u8 unk0;
|
||||
@ -13,16 +22,474 @@ struct FieldCameraUnknownStruct
|
||||
bool8 unk4;
|
||||
};
|
||||
|
||||
// Static RAM declarations
|
||||
// static functions
|
||||
static void RedrawMapSliceNorth(struct FieldCameraUnknownStruct *a, const struct MapData *mapData);
|
||||
static void RedrawMapSliceSouth(struct FieldCameraUnknownStruct *a, const struct MapData *mapData);
|
||||
static void RedrawMapSliceEast(struct FieldCameraUnknownStruct *a, const struct MapData *mapData);
|
||||
static void RedrawMapSliceWest(struct FieldCameraUnknownStruct *a, const struct MapData *mapData);
|
||||
static s32 MapPosToBgTilemapOffset(struct FieldCameraUnknownStruct *a, s32 x, s32 y);
|
||||
static void DrawWholeMapViewInternal(int x, int y, const struct MapData *mapData);
|
||||
static void DrawMetatileAt(const struct MapData *mapData, u16, int, int);
|
||||
static void DrawMetatile(s32 a, u16 *b, u16 c);
|
||||
static void CameraPanningCB_PanAhead(void);
|
||||
|
||||
IWRAM_DATA struct FieldCameraUnknownStruct gUnknown_03000E20;
|
||||
IWRAM_DATA s16 gUnknown_03000E28;
|
||||
IWRAM_DATA s16 gUnknown_03000E2A;
|
||||
IWRAM_DATA u8 gUnknown_03000E2C;
|
||||
IWRAM_DATA void (*gUnknown_03000E30)(void);
|
||||
// IWRAM bss vars
|
||||
static IWRAM_DATA struct FieldCameraUnknownStruct gUnknown_03000E20;
|
||||
static IWRAM_DATA s16 gUnknown_03000E28;
|
||||
static IWRAM_DATA s16 gUnknown_03000E2A;
|
||||
static IWRAM_DATA u8 gUnknown_03000E2C;
|
||||
static IWRAM_DATA void (*gUnknown_03000E30)(void);
|
||||
|
||||
// Static ROM declarations
|
||||
// text
|
||||
static void move_tilemap_camera_to_upper_left_corner_(struct FieldCameraUnknownStruct *a)
|
||||
{
|
||||
a->unk2 = 0;
|
||||
a->unk3 = 0;
|
||||
a->unk0 = 0;
|
||||
a->unk1 = 0;
|
||||
a->unk4 = TRUE;
|
||||
}
|
||||
|
||||
// .rodata
|
||||
static void tilemap_move_something(struct FieldCameraUnknownStruct *a, u32 b, u32 c)
|
||||
{
|
||||
a->unk2 += b;
|
||||
a->unk2 %= 32;
|
||||
a->unk3 += c;
|
||||
a->unk3 %= 32;
|
||||
}
|
||||
|
||||
static void coords8_add(struct FieldCameraUnknownStruct *a, u32 b, u32 c)
|
||||
{
|
||||
a->unk0 += b;
|
||||
a->unk1 += c;
|
||||
}
|
||||
|
||||
void move_tilemap_camera_to_upper_left_corner(void)
|
||||
{
|
||||
move_tilemap_camera_to_upper_left_corner_(&gUnknown_03000E20);
|
||||
}
|
||||
|
||||
void FieldUpdateBgTilemapScroll(void)
|
||||
{
|
||||
u32 r4, r5;
|
||||
r5 = gUnknown_03000E20.unk0 + gUnknown_03000E28;
|
||||
r4 = gUnknown_03000E2A + gUnknown_03000E20.unk1 + 8;
|
||||
|
||||
SetGpuReg(REG_OFFSET_BG1HOFS, r5);
|
||||
SetGpuReg(REG_OFFSET_BG1VOFS, r4);
|
||||
SetGpuReg(REG_OFFSET_BG2HOFS, r5);
|
||||
SetGpuReg(REG_OFFSET_BG2VOFS, r4);
|
||||
SetGpuReg(REG_OFFSET_BG3HOFS, r5);
|
||||
SetGpuReg(REG_OFFSET_BG3VOFS, r4);
|
||||
}
|
||||
|
||||
void sub_8089C08(s16 *a, s16 *b)
|
||||
{
|
||||
*a = gUnknown_03000E20.unk0 + gUnknown_03000E28;
|
||||
*b = gUnknown_03000E20.unk1 + gUnknown_03000E2A + 8;
|
||||
}
|
||||
|
||||
void DrawWholeMapView(void)
|
||||
{
|
||||
DrawWholeMapViewInternal(gSaveBlock1Ptr->pos.x, gSaveBlock1Ptr->pos.y, gMapHeader.mapData);
|
||||
gUnknown_03000E20.unk4 = TRUE;
|
||||
}
|
||||
|
||||
static void DrawWholeMapViewInternal(int x, int y, const struct MapData *mapData)
|
||||
{
|
||||
u8 i;
|
||||
u8 j;
|
||||
u32 r6;
|
||||
u8 temp;
|
||||
|
||||
for (i = 0; i < 32; i += 2)
|
||||
{
|
||||
temp = gUnknown_03000E20.unk3 + i;
|
||||
if (temp >= 32)
|
||||
temp -= 32;
|
||||
r6 = temp * 32;
|
||||
for (j = 0; j < 32; j += 2)
|
||||
{
|
||||
temp = gUnknown_03000E20.unk2 + j;
|
||||
if (temp >= 32)
|
||||
temp -= 32;
|
||||
DrawMetatileAt(mapData, r6 + temp, x + j / 2, y + i / 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void RedrawMapSlicesForCameraUpdate(struct FieldCameraUnknownStruct *a, int x, int y)
|
||||
{
|
||||
const struct MapData *mapData = gMapHeader.mapData;
|
||||
|
||||
if (x > 0)
|
||||
RedrawMapSliceWest(a, mapData);
|
||||
if (x < 0)
|
||||
RedrawMapSliceEast(a, mapData);
|
||||
if (y > 0)
|
||||
RedrawMapSliceNorth(a, mapData);
|
||||
if (y < 0)
|
||||
RedrawMapSliceSouth(a, mapData);
|
||||
a->unk4 = TRUE;
|
||||
}
|
||||
|
||||
static void RedrawMapSliceNorth(struct FieldCameraUnknownStruct *a, const struct MapData *mapData)
|
||||
{
|
||||
u8 i;
|
||||
u8 temp;
|
||||
u32 r7;
|
||||
|
||||
temp = a->unk3 + 28;
|
||||
if (temp >= 32)
|
||||
temp -= 32;
|
||||
r7 = temp * 32;
|
||||
for (i = 0; i < 32; i += 2)
|
||||
{
|
||||
temp = a->unk2 + i;
|
||||
if (temp >= 32)
|
||||
temp -= 32;
|
||||
DrawMetatileAt(mapData, r7 + temp, gSaveBlock1Ptr->pos.x + i / 2, gSaveBlock1Ptr->pos.y + 14);
|
||||
}
|
||||
}
|
||||
|
||||
static void RedrawMapSliceSouth(struct FieldCameraUnknownStruct *a, const struct MapData *mapData)
|
||||
{
|
||||
u8 i;
|
||||
u8 temp;
|
||||
u32 r7 = a->unk3 * 32;
|
||||
|
||||
for (i = 0; i < 32; i += 2)
|
||||
{
|
||||
temp = a->unk2 + i;
|
||||
if (temp >= 32)
|
||||
temp -= 32;
|
||||
DrawMetatileAt(mapData, r7 + temp, gSaveBlock1Ptr->pos.x + i / 2, gSaveBlock1Ptr->pos.y);
|
||||
}
|
||||
}
|
||||
|
||||
static void RedrawMapSliceEast(struct FieldCameraUnknownStruct *a, const struct MapData *mapData)
|
||||
{
|
||||
u8 i;
|
||||
u8 temp;
|
||||
u32 r6 = a->unk2;
|
||||
|
||||
for (i = 0; i < 32; i += 2)
|
||||
{
|
||||
temp = a->unk3 + i;
|
||||
if (temp >= 32)
|
||||
temp -= 32;
|
||||
DrawMetatileAt(mapData, temp * 32 + r6, gSaveBlock1Ptr->pos.x, gSaveBlock1Ptr->pos.y + i / 2);
|
||||
}
|
||||
}
|
||||
|
||||
static void RedrawMapSliceWest(struct FieldCameraUnknownStruct *a, const struct MapData *mapData)
|
||||
{
|
||||
u8 i;
|
||||
u8 temp;
|
||||
u8 r5 = a->unk2 + 28;
|
||||
|
||||
if (r5 >= 32)
|
||||
r5 -= 32;
|
||||
for (i = 0; i < 32; i += 2)
|
||||
{
|
||||
temp = a->unk3 + i;
|
||||
if (temp >= 32)
|
||||
temp -= 32;
|
||||
DrawMetatileAt(mapData, temp * 32 + r5, gSaveBlock1Ptr->pos.x + 14, gSaveBlock1Ptr->pos.y + i / 2);
|
||||
}
|
||||
}
|
||||
|
||||
void CurrentMapDrawMetatileAt(int a, int b)
|
||||
{
|
||||
int offset = MapPosToBgTilemapOffset(&gUnknown_03000E20, a, b);
|
||||
|
||||
if (offset >= 0)
|
||||
{
|
||||
DrawMetatileAt(gMapHeader.mapData, offset, a, b);
|
||||
gUnknown_03000E20.unk4 = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void DrawDoorMetatileAt(int x, int y, u16 *arr)
|
||||
{
|
||||
int offset = MapPosToBgTilemapOffset(&gUnknown_03000E20, x, y);
|
||||
|
||||
if (offset >= 0)
|
||||
{
|
||||
DrawMetatile(1, arr, offset);
|
||||
gUnknown_03000E20.unk4 = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
static void DrawMetatileAt(const struct MapData *mapData, u16 b, int c, int d)
|
||||
{
|
||||
u16 metatileId = MapGridGetMetatileIdAt(c, d);
|
||||
u16 *metatiles;
|
||||
|
||||
if (metatileId > 1024)
|
||||
metatileId = 0;
|
||||
if (metatileId < 512)
|
||||
metatiles = mapData->primaryTileset->metatiles;
|
||||
else
|
||||
{
|
||||
metatiles = mapData->secondaryTileset->metatiles;
|
||||
metatileId -= 512;
|
||||
}
|
||||
DrawMetatile(MapGridGetMetatileLayerTypeAt(c, d), metatiles + metatileId * 8, b);
|
||||
}
|
||||
|
||||
static void DrawMetatile(s32 a, u16 *b, u16 c)
|
||||
{
|
||||
switch (a)
|
||||
{
|
||||
case 2:
|
||||
gBGTilemapBuffers3[c] = b[0];
|
||||
gBGTilemapBuffers3[c + 1] = b[1];
|
||||
gBGTilemapBuffers3[c + 0x20] = b[2];
|
||||
gBGTilemapBuffers3[c + 0x21] = b[3];
|
||||
|
||||
gBGTilemapBuffers1[c] = 0;
|
||||
gBGTilemapBuffers1[c + 1] = 0;
|
||||
gBGTilemapBuffers1[c + 0x20] = 0;
|
||||
gBGTilemapBuffers1[c + 0x21] = 0;
|
||||
|
||||
gBGTilemapBuffers2[c] = b[4];
|
||||
gBGTilemapBuffers2[c + 1] = b[5];
|
||||
gBGTilemapBuffers2[c + 0x20] = b[6];
|
||||
gBGTilemapBuffers2[c + 0x21] = b[7];
|
||||
break;
|
||||
case 1:
|
||||
gBGTilemapBuffers3[c] = b[0];
|
||||
gBGTilemapBuffers3[c + 1] = b[1];
|
||||
gBGTilemapBuffers3[c + 0x20] = b[2];
|
||||
gBGTilemapBuffers3[c + 0x21] = b[3];
|
||||
|
||||
gBGTilemapBuffers1[c] = b[4];
|
||||
gBGTilemapBuffers1[c + 1] = b[5];
|
||||
gBGTilemapBuffers1[c + 0x20] = b[6];
|
||||
gBGTilemapBuffers1[c + 0x21] = b[7];
|
||||
|
||||
gBGTilemapBuffers2[c] = 0;
|
||||
gBGTilemapBuffers2[c + 1] = 0;
|
||||
gBGTilemapBuffers2[c + 0x20] = 0;
|
||||
gBGTilemapBuffers2[c + 0x21] = 0;
|
||||
break;
|
||||
case 0:
|
||||
gBGTilemapBuffers3[c] = 0x3014;
|
||||
gBGTilemapBuffers3[c + 1] = 0x3014;
|
||||
gBGTilemapBuffers3[c + 0x20] = 0x3014;
|
||||
gBGTilemapBuffers3[c + 0x21] = 0x3014;
|
||||
|
||||
gBGTilemapBuffers1[c] = b[0];
|
||||
gBGTilemapBuffers1[c + 1] = b[1];
|
||||
gBGTilemapBuffers1[c + 0x20] = b[2];
|
||||
gBGTilemapBuffers1[c + 0x21] = b[3];
|
||||
|
||||
gBGTilemapBuffers2[c] = b[4];
|
||||
gBGTilemapBuffers2[c + 1] = b[5];
|
||||
gBGTilemapBuffers2[c + 0x20] = b[6];
|
||||
gBGTilemapBuffers2[c + 0x21] = b[7];
|
||||
break;
|
||||
}
|
||||
schedule_bg_copy_tilemap_to_vram(1);
|
||||
schedule_bg_copy_tilemap_to_vram(2);
|
||||
schedule_bg_copy_tilemap_to_vram(3);
|
||||
}
|
||||
|
||||
static s32 MapPosToBgTilemapOffset(struct FieldCameraUnknownStruct *a, s32 x, s32 y)
|
||||
{
|
||||
x -= gSaveBlock1Ptr->pos.x;
|
||||
x *= 2;
|
||||
if (x >= 32 || x < 0)
|
||||
return -1;
|
||||
x = x + a->unk2;
|
||||
if (x >= 32)
|
||||
x -= 32;
|
||||
|
||||
y = (y - gSaveBlock1Ptr->pos.y) * 2;
|
||||
if (y >= 32 || y < 0)
|
||||
return -1;
|
||||
y = y + a->unk3;
|
||||
if (y >= 32)
|
||||
y -= 32;
|
||||
|
||||
return y * 32 + x;
|
||||
}
|
||||
|
||||
static void CameraUpdateCallback(struct CameraObject *a)
|
||||
{
|
||||
if (a->spriteId != 0)
|
||||
{
|
||||
a->unk8 = gSprites[a->spriteId].data[2];
|
||||
a->unkC = gSprites[a->spriteId].data[3];
|
||||
}
|
||||
}
|
||||
|
||||
void ResetCameraUpdateInfo(void)
|
||||
{
|
||||
gUnknown_03005DD0.unk8 = 0;
|
||||
gUnknown_03005DD0.unkC = 0;
|
||||
gUnknown_03005DD0.x = 0;
|
||||
gUnknown_03005DD0.y = 0;
|
||||
gUnknown_03005DD0.spriteId = 0;
|
||||
gUnknown_03005DD0.callback = NULL;
|
||||
}
|
||||
|
||||
u32 InitCameraUpdateCallback(u8 a)
|
||||
{
|
||||
if (gUnknown_03005DD0.spriteId != 0)
|
||||
DestroySprite(&gSprites[gUnknown_03005DD0.spriteId]);
|
||||
gUnknown_03005DD0.spriteId = AddCameraObject(a);
|
||||
gUnknown_03005DD0.callback = CameraUpdateCallback;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CameraUpdate(void)
|
||||
{
|
||||
int deltaX;
|
||||
int deltaY;
|
||||
int r0;
|
||||
int r1;
|
||||
int r7;
|
||||
int r8;
|
||||
|
||||
if (gUnknown_03005DD0.callback != NULL)
|
||||
gUnknown_03005DD0.callback(&gUnknown_03005DD0);
|
||||
r7 = gUnknown_03005DD0.unk8;
|
||||
r8 = gUnknown_03005DD0.unkC;
|
||||
deltaX = 0;
|
||||
deltaY = 0;
|
||||
r1 = gUnknown_03005DD0.x;
|
||||
r0 = gUnknown_03005DD0.y;
|
||||
|
||||
|
||||
if (r1 == 0 && r7 != 0)
|
||||
{
|
||||
if (r7 > 0)
|
||||
deltaX = 1;
|
||||
else
|
||||
deltaX = -1;
|
||||
}
|
||||
if (r0 == 0 && r8 != 0)
|
||||
{
|
||||
if (r8 > 0)
|
||||
deltaY = 1;
|
||||
else
|
||||
deltaY = -1;
|
||||
}
|
||||
if (r1 != 0 && r1 == -r7)
|
||||
{
|
||||
if (r7 > 0)
|
||||
deltaX = 1;
|
||||
else
|
||||
deltaX = -1;
|
||||
}
|
||||
if (r0 != 0 && r0 == -r8)
|
||||
{
|
||||
if (r8 > 0)
|
||||
deltaX = 1;
|
||||
else
|
||||
deltaX = -1;
|
||||
}
|
||||
|
||||
gUnknown_03005DD0.x += r7;
|
||||
gUnknown_03005DD0.x = gUnknown_03005DD0.x - 16 * (gUnknown_03005DD0.x / 16);
|
||||
gUnknown_03005DD0.y += r8;
|
||||
gUnknown_03005DD0.y = gUnknown_03005DD0.y - 16 * (gUnknown_03005DD0.y / 16);
|
||||
|
||||
if (deltaX != 0 || deltaY != 0)
|
||||
{
|
||||
CameraMove(deltaX, deltaY);
|
||||
UpdateFieldObjectsForCameraUpdate(deltaX, deltaY);
|
||||
RotatingGatePuzzleCameraUpdate(deltaX, deltaY);
|
||||
ResetBerryTreeSparkleFlags();
|
||||
tilemap_move_something(&gUnknown_03000E20, deltaX * 2, deltaY * 2);
|
||||
RedrawMapSlicesForCameraUpdate(&gUnknown_03000E20, deltaX * 2, deltaY * 2);
|
||||
}
|
||||
|
||||
coords8_add(&gUnknown_03000E20, r7, r8);
|
||||
gUnknown_03005DEC -= r7;
|
||||
gUnknown_03005DE8 -= r8;
|
||||
}
|
||||
|
||||
void camera_move_and_redraw(int a, int b) //unused
|
||||
{
|
||||
CameraMove(a, b);
|
||||
UpdateFieldObjectsForCameraUpdate(a, b);
|
||||
DrawWholeMapView();
|
||||
gUnknown_03005DEC -= a * 16;
|
||||
gUnknown_03005DE8 -= b * 16;
|
||||
}
|
||||
|
||||
void SetCameraPanningCallback(void (*a)(void))
|
||||
{
|
||||
gUnknown_03000E30 = a;
|
||||
}
|
||||
|
||||
void SetCameraPanning(s16 a, s16 b)
|
||||
{
|
||||
gUnknown_03000E28 = a;
|
||||
gUnknown_03000E2A = b + 32;
|
||||
}
|
||||
|
||||
void InstallCameraPanAheadCallback(void)
|
||||
{
|
||||
gUnknown_03000E30 = CameraPanningCB_PanAhead;
|
||||
gUnknown_03000E2C = 0;
|
||||
gUnknown_03000E28 = 0;
|
||||
gUnknown_03000E2A = 32;
|
||||
}
|
||||
|
||||
void UpdateCameraPanning(void)
|
||||
{
|
||||
if (gUnknown_03000E30 != NULL)
|
||||
gUnknown_03000E30();
|
||||
//Update sprite offset of overworld objects
|
||||
gSpriteCoordOffsetX = gUnknown_03005DEC - gUnknown_03000E28;
|
||||
gSpriteCoordOffsetY = gUnknown_03005DE8 - gUnknown_03000E2A - 8;
|
||||
}
|
||||
|
||||
static void CameraPanningCB_PanAhead(void)
|
||||
{
|
||||
u8 var;
|
||||
|
||||
if (gUnusedBikeCameraAheadPanback == FALSE)
|
||||
{
|
||||
InstallCameraPanAheadCallback();
|
||||
}
|
||||
else
|
||||
{
|
||||
// this code is never reached.
|
||||
if (gPlayerAvatar.tileTransitionState == T_TILE_TRANSITION)
|
||||
{
|
||||
gUnknown_03000E2C ^= 1;
|
||||
if (gUnknown_03000E2C == 0)
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
gUnknown_03000E2C = 0;
|
||||
}
|
||||
|
||||
var = player_get_direction_upper_nybble();
|
||||
if (var == 2)
|
||||
{
|
||||
if (gUnknown_03000E2A > -8)
|
||||
gUnknown_03000E2A -= 2;
|
||||
}
|
||||
else if (var == 1)
|
||||
{
|
||||
if (gUnknown_03000E2A < 72)
|
||||
gUnknown_03000E2A += 2;
|
||||
}
|
||||
else if (gUnknown_03000E2A < 32)
|
||||
{
|
||||
gUnknown_03000E2A += 2;
|
||||
}
|
||||
else if (gUnknown_03000E2A > 32)
|
||||
{
|
||||
gUnknown_03000E2A -= 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// .text
|
||||
|
611
src/mon_markings.c
Normal file
611
src/mon_markings.c
Normal file
@ -0,0 +1,611 @@
|
||||
#include "global.h"
|
||||
#include "dma3.h"
|
||||
#include "graphics.h"
|
||||
#include "main.h"
|
||||
#include "menu_indicators.h"
|
||||
#include "mon_markings.h"
|
||||
#include "constants/songs.h"
|
||||
#include "sound.h"
|
||||
#include "sprite.h"
|
||||
#include "text_window.h"
|
||||
|
||||
#define MENU_TEXT_SPRITE_X_OFFSET 32
|
||||
|
||||
// static functions
|
||||
static void sub_811FC80(s16, s16, u16, u16);
|
||||
static void TaskDummy7(struct Sprite *);
|
||||
static void sub_811FF40(struct Sprite *);
|
||||
static void sub_811FF7C(struct Sprite *);
|
||||
static struct Sprite *sub_811FFD4(u16, u16, const u16 *, u16);
|
||||
|
||||
// .rodata
|
||||
static const u16 gUnknown_0859E65C[] = INCBIN_U16("graphics/misc/mon_markings.gbapal");
|
||||
static const u8 gUnknown_0859E67C[] = INCBIN_U8("graphics/misc/mon_markings.4bpp");
|
||||
|
||||
static const struct OamData gUnknown_0859EE7C =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 0,
|
||||
.objMode = 0,
|
||||
.mosaic = 0,
|
||||
.bpp = 0,
|
||||
.shape = 0,
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = 3,
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0,
|
||||
};
|
||||
|
||||
static const struct OamData gUnknown_0859EE84 =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 0,
|
||||
.objMode = 0,
|
||||
.mosaic = 0,
|
||||
.bpp = 0,
|
||||
.shape = 0,
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = 0,
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EE8C[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EE94[] =
|
||||
{
|
||||
ANIMCMD_FRAME(1, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EE9C[] =
|
||||
{
|
||||
ANIMCMD_FRAME(2, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EEA4[] =
|
||||
{
|
||||
ANIMCMD_FRAME(3, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EEAC[] =
|
||||
{
|
||||
ANIMCMD_FRAME(4, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EEB4[] =
|
||||
{
|
||||
ANIMCMD_FRAME(5, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EEBC[] =
|
||||
{
|
||||
ANIMCMD_FRAME(6, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EEC4[] =
|
||||
{
|
||||
ANIMCMD_FRAME(7, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EECC[] =
|
||||
{
|
||||
ANIMCMD_FRAME(8, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EED4[] =
|
||||
{
|
||||
ANIMCMD_FRAME(9, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const gUnknown_0859EEDC[] =
|
||||
{
|
||||
gUnknown_0859EE8C,
|
||||
gUnknown_0859EE94,
|
||||
gUnknown_0859EE9C,
|
||||
gUnknown_0859EEA4,
|
||||
gUnknown_0859EEAC,
|
||||
gUnknown_0859EEB4,
|
||||
gUnknown_0859EEBC,
|
||||
gUnknown_0859EEC4,
|
||||
gUnknown_0859EECC,
|
||||
gUnknown_0859EED4,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF04[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF0C[] =
|
||||
{
|
||||
ANIMCMD_FRAME(64, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const gUnknown_0859EF14[] =
|
||||
{
|
||||
gUnknown_0859EF04,
|
||||
gUnknown_0859EF0C,
|
||||
};
|
||||
|
||||
static const struct OamData gUnknown_0859EF1C =
|
||||
{
|
||||
.y = 0,
|
||||
.affineMode = 0,
|
||||
.objMode = 0,
|
||||
.mosaic = 0,
|
||||
.bpp = 0,
|
||||
.shape = 1,
|
||||
.x = 0,
|
||||
.matrixNum = 0,
|
||||
.size = 1,
|
||||
.tileNum = 0,
|
||||
.priority = 0,
|
||||
.paletteNum = 0,
|
||||
.affineParam = 0,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF24[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF2C[] =
|
||||
{
|
||||
ANIMCMD_FRAME(4, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF34[] =
|
||||
{
|
||||
ANIMCMD_FRAME(8, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF3C[] =
|
||||
{
|
||||
ANIMCMD_FRAME(12, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF44[] =
|
||||
{
|
||||
ANIMCMD_FRAME(16, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF4C[] =
|
||||
{
|
||||
ANIMCMD_FRAME(20, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF54[] =
|
||||
{
|
||||
ANIMCMD_FRAME(24, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF5C[] =
|
||||
{
|
||||
ANIMCMD_FRAME(28, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF64[] =
|
||||
{
|
||||
ANIMCMD_FRAME(32, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF6C[] =
|
||||
{
|
||||
ANIMCMD_FRAME(36, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF74[] =
|
||||
{
|
||||
ANIMCMD_FRAME(40, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF7C[] =
|
||||
{
|
||||
ANIMCMD_FRAME(44, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF84[] =
|
||||
{
|
||||
ANIMCMD_FRAME(48, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF8C[] =
|
||||
{
|
||||
ANIMCMD_FRAME(52, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF94[] =
|
||||
{
|
||||
ANIMCMD_FRAME(56, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_0859EF9C[] =
|
||||
{
|
||||
ANIMCMD_FRAME(60, 5),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const gUnknown_0859EFA4[] =
|
||||
{
|
||||
gUnknown_0859EF24,
|
||||
gUnknown_0859EF2C,
|
||||
gUnknown_0859EF34,
|
||||
gUnknown_0859EF3C,
|
||||
gUnknown_0859EF44,
|
||||
gUnknown_0859EF4C,
|
||||
gUnknown_0859EF54,
|
||||
gUnknown_0859EF5C,
|
||||
gUnknown_0859EF64,
|
||||
gUnknown_0859EF6C,
|
||||
gUnknown_0859EF74,
|
||||
gUnknown_0859EF7C,
|
||||
gUnknown_0859EF84,
|
||||
gUnknown_0859EF8C,
|
||||
gUnknown_0859EF94,
|
||||
gUnknown_0859EF9C,
|
||||
};
|
||||
|
||||
static EWRAM_DATA struct PokemonMarkMenu *sMenu = NULL;
|
||||
|
||||
void sub_811F90C(struct PokemonMarkMenu *ptr)
|
||||
{
|
||||
sMenu = ptr;
|
||||
}
|
||||
|
||||
void sub_811F918(void)
|
||||
{
|
||||
const struct TilesPal *frame = GetWindowFrameTilesPal(gSaveBlock2Ptr->optionsWindowFrameType);
|
||||
sMenu->frameTiles = frame->tiles;
|
||||
sMenu->framePalette = frame->pal;
|
||||
sMenu->tileLoadState = 0;
|
||||
CpuFill16(0, sMenu->menuWindowSpriteTiles, sizeof(sMenu->menuWindowSpriteTiles));
|
||||
}
|
||||
|
||||
bool8 sub_811F960(void)
|
||||
{
|
||||
u16 i;
|
||||
u8 *dest = sMenu->menuWindowSpriteTiles + sMenu->tileLoadState * 0x100;
|
||||
|
||||
switch (sMenu->tileLoadState)
|
||||
{
|
||||
case 0:
|
||||
CpuFastCopy(sMenu->frameTiles, dest, TILE_SIZE_4BPP);
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
CpuFastCopy(sMenu->frameTiles + TILE_SIZE_4BPP, dest + TILE_SIZE_4BPP * (i + 1), TILE_SIZE_4BPP);
|
||||
}
|
||||
CpuFastCopy(sMenu->frameTiles + TILE_SIZE_4BPP * 2, dest + TILE_SIZE_4BPP * 7, TILE_SIZE_4BPP);
|
||||
sMenu->tileLoadState++;
|
||||
break;
|
||||
default:
|
||||
CpuFastCopy(sMenu->frameTiles + TILE_SIZE_4BPP * 3, dest, TILE_SIZE_4BPP);
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
CpuFastCopy(sMenu->frameTiles + TILE_SIZE_4BPP * 4, dest + TILE_SIZE_4BPP * (i + 1), TILE_SIZE_4BPP);
|
||||
}
|
||||
CpuFastCopy(sMenu->frameTiles + TILE_SIZE_4BPP * 5, dest + TILE_SIZE_4BPP * 7, TILE_SIZE_4BPP);
|
||||
sMenu->tileLoadState++;
|
||||
break;
|
||||
case 13:
|
||||
CpuFastCopy(sMenu->frameTiles + TILE_SIZE_4BPP * 6, dest, TILE_SIZE_4BPP);
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
CpuFastCopy(sMenu->frameTiles + TILE_SIZE_4BPP * 7, dest + TILE_SIZE_4BPP * (i + 1), TILE_SIZE_4BPP);
|
||||
}
|
||||
CpuFastCopy(sMenu->frameTiles + TILE_SIZE_4BPP * 8, dest + TILE_SIZE_4BPP * 7, TILE_SIZE_4BPP);
|
||||
sMenu->tileLoadState++;
|
||||
return FALSE;
|
||||
case 14:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void sub_811FA90(void)
|
||||
{
|
||||
sub_811F918();
|
||||
while (sub_811F960());
|
||||
}
|
||||
|
||||
void sub_811FAA4(u8 markings, s16 x, s16 y)
|
||||
{
|
||||
u16 i;
|
||||
sMenu->cursorPos = 0;
|
||||
sMenu->markings = markings;
|
||||
for (i = 0; i < 4; i++)
|
||||
sMenu->markingsArray[i] = (sMenu->markings >> i) & 1;
|
||||
sub_811FC80(x, y, sMenu->baseTileTag, sMenu->basePaletteTag);
|
||||
}
|
||||
|
||||
void sub_811FAF8(void)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
FreeSpriteTilesByTag(sMenu->baseTileTag + i);
|
||||
FreeSpritePaletteByTag(sMenu->basePaletteTag + i);
|
||||
}
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
if (!sMenu->menuWindowSprites[i])
|
||||
return;
|
||||
DestroySprite(sMenu->menuWindowSprites[i]);
|
||||
sMenu->menuWindowSprites[i] = NULL;
|
||||
}
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (!sMenu->menuMarkingSprites[i])
|
||||
return;
|
||||
DestroySprite(sMenu->menuMarkingSprites[i]);
|
||||
sMenu->menuMarkingSprites[i] = NULL;
|
||||
}
|
||||
if (sMenu->unkSprite)
|
||||
{
|
||||
DestroySprite(sMenu->unkSprite);
|
||||
sMenu->unkSprite = NULL;
|
||||
}
|
||||
if (sMenu->menuTextSprite)
|
||||
{
|
||||
DestroySprite(sMenu->menuTextSprite);
|
||||
sMenu->menuTextSprite = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool8 sub_811FBA4(void)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
if (gMain.newKeys & DPAD_UP)
|
||||
{
|
||||
s8 pos;
|
||||
PlaySE(SE_SELECT);
|
||||
pos = --sMenu->cursorPos;
|
||||
if (pos < 0)
|
||||
sMenu->cursorPos = 5;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (gMain.newKeys & DPAD_DOWN)
|
||||
{
|
||||
s8 pos;
|
||||
PlaySE(SE_SELECT);
|
||||
pos = ++sMenu->cursorPos;
|
||||
if (pos > 5)
|
||||
sMenu->cursorPos = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (gMain.newKeys & A_BUTTON)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
|
||||
switch (sMenu->cursorPos)
|
||||
{
|
||||
case 4:
|
||||
sMenu->markings = 0;
|
||||
for (i = 0; i < 4; i++)
|
||||
sMenu->markings |= sMenu->markingsArray[i] << i;
|
||||
return FALSE;
|
||||
case 5:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
sMenu->markingsArray[sMenu->cursorPos] = !sMenu->markingsArray[sMenu->cursorPos];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void sub_811FC80(s16 x, s16 y, u16 baseTileTag, u16 basePaletteTag)
|
||||
{
|
||||
u16 i;
|
||||
u8 spriteId;
|
||||
|
||||
struct SpriteSheet sheets[] =
|
||||
{
|
||||
{ sMenu->menuWindowSpriteTiles, 0x1000, baseTileTag },
|
||||
{ gPokenavConditionMarker_Gfx, 0x320, baseTileTag + 1 },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
struct SpritePalette palettes[] =
|
||||
{
|
||||
{ sMenu->framePalette, basePaletteTag },
|
||||
{ gPokenavConditionMarker_Pal, basePaletteTag + 1},
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
struct SpriteTemplate sprTemplate =
|
||||
{
|
||||
baseTileTag,
|
||||
basePaletteTag,
|
||||
&gUnknown_0859EE7C,
|
||||
gUnknown_0859EF14,
|
||||
NULL,
|
||||
gDummySpriteAffineAnimTable,
|
||||
TaskDummy7,
|
||||
};
|
||||
|
||||
LoadSpriteSheets(sheets);
|
||||
LoadSpritePalettes(palettes);
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
spriteId = CreateSprite(&sprTemplate, x + 32, y + 32, 1);
|
||||
if (spriteId != 64)
|
||||
{
|
||||
sMenu->menuWindowSprites[i] = &gSprites[spriteId];
|
||||
StartSpriteAnim(&gSprites[spriteId], i);
|
||||
}
|
||||
else
|
||||
{
|
||||
sMenu->menuWindowSprites[i] = NULL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
sMenu->menuWindowSprites[1]->pos1.y = y + 96;
|
||||
|
||||
sprTemplate.tileTag++;
|
||||
sprTemplate.paletteTag++;
|
||||
sprTemplate.anims = gUnknown_0859EEDC;
|
||||
sprTemplate.callback = sub_811FF40;
|
||||
sprTemplate.oam = &gUnknown_0859EE84;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
spriteId = CreateSprite(&sprTemplate, x + 32, y + 16 + 16 * i, 0);
|
||||
if (spriteId != 64)
|
||||
{
|
||||
sMenu->menuMarkingSprites[i] = &gSprites[spriteId];
|
||||
gSprites[spriteId].data[0] = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
sMenu->menuMarkingSprites[i] = NULL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
sprTemplate.callback = SpriteCallbackDummy;
|
||||
|
||||
spriteId = CreateSprite(&sprTemplate, 0, 0, 0);
|
||||
|
||||
if (spriteId != 64)
|
||||
{
|
||||
sMenu->menuTextSprite = &gSprites[spriteId];
|
||||
sMenu->menuTextSprite->oam.shape = ST_OAM_SQUARE;
|
||||
sMenu->menuTextSprite->oam.size = 2;
|
||||
StartSpriteAnim(sMenu->menuTextSprite, 9);
|
||||
sMenu->menuTextSprite->pos1.x = x + MENU_TEXT_SPRITE_X_OFFSET;
|
||||
sMenu->menuTextSprite->pos1.y = y + 80;
|
||||
CalcCenterToCornerVec(sMenu->menuTextSprite, 1, 2, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
sMenu->menuTextSprite = NULL;
|
||||
}
|
||||
|
||||
sprTemplate.callback = sub_811FF7C;
|
||||
spriteId = CreateSprite(&sprTemplate, x + 12, 0, 0);
|
||||
if(spriteId != 64)
|
||||
{
|
||||
sMenu->unkSprite = &gSprites[spriteId];
|
||||
sMenu->unkSprite->data[0] = y + 16;
|
||||
StartSpriteAnim(sMenu->unkSprite, 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
sMenu->unkSprite = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void TaskDummy7(struct Sprite *sprite)
|
||||
{
|
||||
}
|
||||
|
||||
static void sub_811FF40(struct Sprite *sprite)
|
||||
{
|
||||
if (sMenu->markingsArray[sprite->data[0]])
|
||||
StartSpriteAnim(sprite, 2 * sprite->data[0] + 1);
|
||||
else
|
||||
StartSpriteAnim(sprite, 2 * sprite->data[0]);
|
||||
}
|
||||
|
||||
static void sub_811FF7C(struct Sprite *sprite)
|
||||
{
|
||||
sprite->pos1.y = (16 * sMenu->cursorPos) + sprite->data[0];
|
||||
}
|
||||
|
||||
struct Sprite *sub_811FF94(u16 tileTag, u16 paletteTag, const u16 *palette)
|
||||
{
|
||||
if (!palette)
|
||||
palette = gUnknown_0859E65C;
|
||||
return sub_811FFD4(tileTag, paletteTag, palette, 16);
|
||||
}
|
||||
|
||||
struct Sprite *sub_811FFB4(u16 tileTag, u16 paletteTag, const u16 *palette)
|
||||
{
|
||||
if (!palette)
|
||||
palette = gUnknown_0859E65C;
|
||||
return sub_811FFD4(tileTag, paletteTag, palette, 1);
|
||||
}
|
||||
|
||||
static struct Sprite *sub_811FFD4(u16 tileTag, u16 paletteTag, const u16 *palette, u16 size)
|
||||
{
|
||||
u8 spriteId;
|
||||
struct SpriteTemplate sprTemplate;
|
||||
struct SpriteSheet sheet = { gUnknown_0859E67C, 0x80, tileTag };
|
||||
struct SpritePalette sprPalette = { palette, paletteTag };
|
||||
|
||||
sprTemplate.tileTag = tileTag;
|
||||
sprTemplate.paletteTag = paletteTag;
|
||||
sprTemplate.oam = &gUnknown_0859EF1C;
|
||||
sprTemplate.anims = gUnknown_0859EFA4;
|
||||
sprTemplate.images = NULL;
|
||||
sprTemplate.affineAnims = gDummySpriteAffineAnimTable;
|
||||
sprTemplate.callback = TaskDummy7;
|
||||
|
||||
sheet.size = size * 0x80;
|
||||
|
||||
LoadSpriteSheet(&sheet);
|
||||
LoadSpritePalette(&sprPalette);
|
||||
|
||||
spriteId = CreateSprite(&sprTemplate, 0, 0, 0);
|
||||
if (spriteId != 64)
|
||||
return &gSprites[spriteId];
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void sub_8120084(u8 markings, void *dest)
|
||||
{
|
||||
RequestDma3Copy(gUnknown_0859E67C + markings * 0x80, dest, 0x80, 0x10);
|
||||
}
|
@ -89,9 +89,6 @@ extern const u16 gUnknown_82EC7C4[];
|
||||
|
||||
extern u16 gSaveFileStatus;
|
||||
extern u16 gUnknown_03005DA8;
|
||||
extern u8 *gUnknown_03005DA0;
|
||||
extern u8 *gUnknown_03005D9C;
|
||||
extern u8 *gUnknown_03005DA4;
|
||||
extern bool8 (*gUnknown_03005DB0)(void);
|
||||
extern u8 gUnknown_03005DB4;
|
||||
extern u8 gFieldLinkPlayerCount;
|
||||
@ -1422,12 +1419,12 @@ static void overworld_bg_setup(void)
|
||||
SetBgAttribute(1, BG_CTRL_ATTR_PALETTEMODE, 1);
|
||||
SetBgAttribute(2, BG_CTRL_ATTR_PALETTEMODE, 1);
|
||||
SetBgAttribute(3, BG_CTRL_ATTR_PALETTEMODE, 1);
|
||||
gUnknown_03005DA0 = AllocZeroed(0x800);
|
||||
gUnknown_03005D9C = AllocZeroed(0x800);
|
||||
gUnknown_03005DA4 = AllocZeroed(0x800);
|
||||
SetBgTilemapBuffer(1, gUnknown_03005DA0);
|
||||
SetBgTilemapBuffer(2, gUnknown_03005D9C);
|
||||
SetBgTilemapBuffer(3, gUnknown_03005DA4);
|
||||
gBGTilemapBuffers2 = AllocZeroed(0x800);
|
||||
gBGTilemapBuffers1 = AllocZeroed(0x800);
|
||||
gBGTilemapBuffers3 = AllocZeroed(0x800);
|
||||
SetBgTilemapBuffer(1, gBGTilemapBuffers2);
|
||||
SetBgTilemapBuffer(2, gBGTilemapBuffers1);
|
||||
SetBgTilemapBuffer(3, gBGTilemapBuffers3);
|
||||
sub_81971D0();
|
||||
}
|
||||
|
||||
@ -1435,12 +1432,12 @@ void overworld_free_bg_tilemaps(void)
|
||||
{
|
||||
sub_81BE72C();
|
||||
sub_81971F4();
|
||||
if (gUnknown_03005DA4 != NULL)
|
||||
FREE_AND_SET_NULL(gUnknown_03005DA4);
|
||||
if (gUnknown_03005D9C != NULL)
|
||||
FREE_AND_SET_NULL(gUnknown_03005D9C);
|
||||
if (gUnknown_03005DA0 != NULL)
|
||||
FREE_AND_SET_NULL(gUnknown_03005DA0);
|
||||
if (gBGTilemapBuffers3 != NULL)
|
||||
FREE_AND_SET_NULL(gBGTilemapBuffers3);
|
||||
if (gBGTilemapBuffers1 != NULL)
|
||||
FREE_AND_SET_NULL(gBGTilemapBuffers1);
|
||||
if (gBGTilemapBuffers2 != NULL)
|
||||
FREE_AND_SET_NULL(gBGTilemapBuffers2);
|
||||
}
|
||||
|
||||
static void ResetSafariZoneFlag_(void)
|
||||
|
1188
src/rotating_gate.c
Normal file
1188
src/rotating_gate.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -7,26 +7,26 @@
|
||||
#include "graphics.h"
|
||||
|
||||
// const rom data
|
||||
const u32 gTextWindowFrame1_Gfx[] = INCBIN_U32("graphics/text_window/1.4bpp");
|
||||
static const u32 sTextWindowFrame2_Gfx[] = INCBIN_U32("graphics/text_window/2.4bpp");
|
||||
static const u32 sTextWindowFrame3_Gfx[] = INCBIN_U32("graphics/text_window/3.4bpp");
|
||||
static const u32 sTextWindowFrame4_Gfx[] = INCBIN_U32("graphics/text_window/4.4bpp");
|
||||
static const u32 sTextWindowFrame5_Gfx[] = INCBIN_U32("graphics/text_window/5.4bpp");
|
||||
static const u32 sTextWindowFrame6_Gfx[] = INCBIN_U32("graphics/text_window/6.4bpp");
|
||||
static const u32 sTextWindowFrame7_Gfx[] = INCBIN_U32("graphics/text_window/7.4bpp");
|
||||
static const u32 sTextWindowFrame8_Gfx[] = INCBIN_U32("graphics/text_window/8.4bpp");
|
||||
static const u32 sTextWindowFrame9_Gfx[] = INCBIN_U32("graphics/text_window/9.4bpp");
|
||||
static const u32 sTextWindowFrame10_Gfx[] = INCBIN_U32("graphics/text_window/10.4bpp");
|
||||
static const u32 sTextWindowFrame11_Gfx[] = INCBIN_U32("graphics/text_window/11.4bpp");
|
||||
static const u32 sTextWindowFrame12_Gfx[] = INCBIN_U32("graphics/text_window/12.4bpp");
|
||||
static const u32 sTextWindowFrame13_Gfx[] = INCBIN_U32("graphics/text_window/13.4bpp");
|
||||
static const u32 sTextWindowFrame14_Gfx[] = INCBIN_U32("graphics/text_window/14.4bpp");
|
||||
static const u32 sTextWindowFrame15_Gfx[] = INCBIN_U32("graphics/text_window/15.4bpp");
|
||||
static const u32 sTextWindowFrame16_Gfx[] = INCBIN_U32("graphics/text_window/16.4bpp");
|
||||
static const u32 sTextWindowFrame17_Gfx[] = INCBIN_U32("graphics/text_window/17.4bpp");
|
||||
static const u32 sTextWindowFrame18_Gfx[] = INCBIN_U32("graphics/text_window/18.4bpp");
|
||||
static const u32 sTextWindowFrame19_Gfx[] = INCBIN_U32("graphics/text_window/19.4bpp");
|
||||
static const u32 sTextWindowFrame20_Gfx[] = INCBIN_U32("graphics/text_window/20.4bpp");
|
||||
const u8 gTextWindowFrame1_Gfx[] = INCBIN_U8("graphics/text_window/1.4bpp");
|
||||
static const u8 sTextWindowFrame2_Gfx[] = INCBIN_U8("graphics/text_window/2.4bpp");
|
||||
static const u8 sTextWindowFrame3_Gfx[] = INCBIN_U8("graphics/text_window/3.4bpp");
|
||||
static const u8 sTextWindowFrame4_Gfx[] = INCBIN_U8("graphics/text_window/4.4bpp");
|
||||
static const u8 sTextWindowFrame5_Gfx[] = INCBIN_U8("graphics/text_window/5.4bpp");
|
||||
static const u8 sTextWindowFrame6_Gfx[] = INCBIN_U8("graphics/text_window/6.4bpp");
|
||||
static const u8 sTextWindowFrame7_Gfx[] = INCBIN_U8("graphics/text_window/7.4bpp");
|
||||
static const u8 sTextWindowFrame8_Gfx[] = INCBIN_U8("graphics/text_window/8.4bpp");
|
||||
static const u8 sTextWindowFrame9_Gfx[] = INCBIN_U8("graphics/text_window/9.4bpp");
|
||||
static const u8 sTextWindowFrame10_Gfx[] = INCBIN_U8("graphics/text_window/10.4bpp");
|
||||
static const u8 sTextWindowFrame11_Gfx[] = INCBIN_U8("graphics/text_window/11.4bpp");
|
||||
static const u8 sTextWindowFrame12_Gfx[] = INCBIN_U8("graphics/text_window/12.4bpp");
|
||||
static const u8 sTextWindowFrame13_Gfx[] = INCBIN_U8("graphics/text_window/13.4bpp");
|
||||
static const u8 sTextWindowFrame14_Gfx[] = INCBIN_U8("graphics/text_window/14.4bpp");
|
||||
static const u8 sTextWindowFrame15_Gfx[] = INCBIN_U8("graphics/text_window/15.4bpp");
|
||||
static const u8 sTextWindowFrame16_Gfx[] = INCBIN_U8("graphics/text_window/16.4bpp");
|
||||
static const u8 sTextWindowFrame17_Gfx[] = INCBIN_U8("graphics/text_window/17.4bpp");
|
||||
static const u8 sTextWindowFrame18_Gfx[] = INCBIN_U8("graphics/text_window/18.4bpp");
|
||||
static const u8 sTextWindowFrame19_Gfx[] = INCBIN_U8("graphics/text_window/19.4bpp");
|
||||
static const u8 sTextWindowFrame20_Gfx[] = INCBIN_U8("graphics/text_window/20.4bpp");
|
||||
|
||||
const u16 gTextWindowFrame1_Pal[] = INCBIN_U16("graphics/text_window/1.gbapal");
|
||||
static const u16 sTextWindowFrame2_Pal[] = INCBIN_U16("graphics/text_window/2.gbapal");
|
||||
|
@ -30,13 +30,13 @@ gPokemonStoragePtr: @ 3005D94
|
||||
gInGameOpponentsNo: @ 3005D98
|
||||
.space 0x4
|
||||
|
||||
gUnknown_03005D9C: @ 3005D9C
|
||||
gBGTilemapBuffers1: @ 3005D9C
|
||||
.space 0x4
|
||||
|
||||
gUnknown_03005DA0: @ 3005DA0
|
||||
gBGTilemapBuffers2: @ 3005DA0
|
||||
.space 0x4
|
||||
|
||||
gUnknown_03005DA4: @ 3005DA4
|
||||
gBGTilemapBuffers3: @ 3005DA4
|
||||
.space 0x4
|
||||
|
||||
gUnknown_03005DA8: @ 3005DA8
|
||||
|
@ -222,7 +222,7 @@ gCamera: @ 2037334
|
||||
gUnknown_02037340: @ 2037340
|
||||
.space 0x8
|
||||
|
||||
gUnknown_02037348: @ 2037348
|
||||
gUnusedBikeCameraAheadPanback: @ 2037348
|
||||
.space 0x4
|
||||
|
||||
gUnknown_0203734C: @ 203734C
|
||||
@ -522,15 +522,7 @@ gUnknown_0203A018: @ 203A018
|
||||
gUnknown_0203A034: @ 203A034
|
||||
.space 0x4
|
||||
|
||||
gUnknown_0203A038: @ 203A038
|
||||
.space 0xC
|
||||
|
||||
gUnknown_0203A044: @ 203A044
|
||||
.space 0x4
|
||||
|
||||
gUnknown_0203A048: @ 203A048
|
||||
.space 0x4
|
||||
|
||||
.include "src/rotating_gate.o"
|
||||
.include "src/safari_zone.o"
|
||||
|
||||
gUnknown_0203A0F4: @ 203A0F4
|
||||
@ -556,9 +548,7 @@ gUnknown_0203A11C: @ 203A11C
|
||||
|
||||
gUnknown_0203A120: @ 203A120
|
||||
.space 0x4
|
||||
|
||||
gUnknown_0203A124: @ 203A124
|
||||
.space 0x4
|
||||
.include "src/mon_markings.o"
|
||||
|
||||
gUnknown_0203A128: @ 203A128
|
||||
.space 0x4
|
||||
|
Loading…
Reference in New Issue
Block a user