mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 19:54:21 +01:00
commit
bb8c53f898
@ -15923,11 +15923,11 @@ sub_8197080: @ 8197080
|
||||
b _0819715C
|
||||
_081970A2:
|
||||
movs r0, 0
|
||||
bl sub_80C0844
|
||||
bl GetHoennPokedexCount
|
||||
lsls r0, 16
|
||||
lsrs r4, r0, 16
|
||||
movs r0, 0x1
|
||||
bl sub_80C0844
|
||||
bl GetHoennPokedexCount
|
||||
lsls r0, 16
|
||||
lsrs r6, r0, 16
|
||||
ldr r0, =gStringVar1
|
||||
@ -15977,11 +15977,11 @@ _081970A2:
|
||||
strb r6, [r5]
|
||||
adds r5, 0x1
|
||||
movs r0, 0
|
||||
bl pokedex_count
|
||||
bl GetNationalPokedexCount
|
||||
lsls r0, 16
|
||||
lsrs r4, r0, 16
|
||||
movs r0, 0x1
|
||||
bl pokedex_count
|
||||
bl GetNationalPokedexCount
|
||||
lsls r0, 16
|
||||
lsrs r6, r0, 16
|
||||
mov r0, r10
|
||||
|
234
asm/birch_pc.s
234
asm/birch_pc.s
@ -1,234 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start ScriptGetPokedexInfo
|
||||
ScriptGetPokedexInfo: @ 8137A4C
|
||||
push {lr}
|
||||
ldr r0, =gSpecialVar_0x8004
|
||||
ldrh r0, [r0]
|
||||
cmp r0, 0
|
||||
bne _08137A70
|
||||
movs r0, 0
|
||||
bl sub_80C0844
|
||||
ldr r1, =gSpecialVar_0x8005
|
||||
strh r0, [r1]
|
||||
movs r0, 0x1
|
||||
bl sub_80C0844
|
||||
b _08137A80
|
||||
.pool
|
||||
_08137A70:
|
||||
movs r0, 0
|
||||
bl pokedex_count
|
||||
ldr r1, =gSpecialVar_0x8005
|
||||
strh r0, [r1]
|
||||
movs r0, 0x1
|
||||
bl pokedex_count
|
||||
_08137A80:
|
||||
ldr r1, =gSpecialVar_0x8006
|
||||
strh r0, [r1]
|
||||
bl IsNationalPokedexEnabled
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end ScriptGetPokedexInfo
|
||||
|
||||
thumb_func_start GetPokedexRatingText
|
||||
GetPokedexRatingText: @ 8137A98
|
||||
push {lr}
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
cmp r0, 0x9
|
||||
bhi _08137AA4
|
||||
b _08137BFC
|
||||
_08137AA4:
|
||||
cmp r0, 0x13
|
||||
bhi _08137AB0
|
||||
ldr r0, =gUnknown_082A5DAB
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137AB0:
|
||||
cmp r0, 0x1D
|
||||
bhi _08137ABC
|
||||
ldr r0, =gUnknown_082A5DF1
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137ABC:
|
||||
cmp r0, 0x27
|
||||
bhi _08137AC8
|
||||
ldr r0, =gUnknown_082A5E34
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137AC8:
|
||||
cmp r0, 0x31
|
||||
bhi _08137AD4
|
||||
ldr r0, =gUnknown_082A5E83
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137AD4:
|
||||
cmp r0, 0x3B
|
||||
bhi _08137AE0
|
||||
ldr r0, =gUnknown_082A5EB9
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137AE0:
|
||||
cmp r0, 0x45
|
||||
bhi _08137AEC
|
||||
ldr r0, =gUnknown_082A5EF4
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137AEC:
|
||||
cmp r0, 0x4F
|
||||
bhi _08137AF8
|
||||
ldr r0, =gUnknown_082A5F39
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137AF8:
|
||||
cmp r0, 0x59
|
||||
bhi _08137B04
|
||||
ldr r0, =gUnknown_082A5F82
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137B04:
|
||||
cmp r0, 0x63
|
||||
bhi _08137B10
|
||||
ldr r0, =gUnknown_082A5FB9
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137B10:
|
||||
cmp r0, 0x6D
|
||||
bhi _08137B1C
|
||||
ldr r0, =gUnknown_082A6018
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137B1C:
|
||||
cmp r0, 0x77
|
||||
bhi _08137B28
|
||||
ldr r0, =gUnknown_082A6061
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137B28:
|
||||
cmp r0, 0x81
|
||||
bhi _08137B34
|
||||
ldr r0, =gUnknown_082A609C
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137B34:
|
||||
cmp r0, 0x8B
|
||||
bhi _08137B40
|
||||
ldr r0, =gUnknown_082A60D5
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137B40:
|
||||
cmp r0, 0x95
|
||||
bhi _08137B4C
|
||||
ldr r0, =gUnknown_082A6124
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137B4C:
|
||||
cmp r0, 0x9F
|
||||
bhi _08137B58
|
||||
ldr r0, =gUnknown_082A616F
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137B58:
|
||||
cmp r0, 0xA9
|
||||
bhi _08137B64
|
||||
ldr r0, =gUnknown_082A61D6
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137B64:
|
||||
cmp r0, 0xB3
|
||||
bhi _08137B70
|
||||
ldr r0, =gUnknown_082A623A
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137B70:
|
||||
cmp r0, 0xBD
|
||||
bhi _08137B7C
|
||||
ldr r0, =gUnknown_082A6287
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137B7C:
|
||||
cmp r0, 0xC7
|
||||
bls _08137BEA
|
||||
cmp r0, 0xC8
|
||||
bne _08137BB8
|
||||
ldr r0, =0x00000199
|
||||
bl SpeciesToNationalPokedexNum
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
movs r1, 0x1
|
||||
bl GetSetPokedexFlag
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08137BEA
|
||||
movs r0, 0xCD
|
||||
lsls r0, 1
|
||||
bl SpeciesToNationalPokedexNum
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
movs r1, 0x1
|
||||
bl GetSetPokedexFlag
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08137BEA
|
||||
b _08137C04
|
||||
.pool
|
||||
_08137BB8:
|
||||
cmp r0, 0xC9
|
||||
bne _08137BF8
|
||||
ldr r0, =0x00000199
|
||||
bl SpeciesToNationalPokedexNum
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
movs r1, 0x1
|
||||
bl GetSetPokedexFlag
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08137C04
|
||||
movs r0, 0xCD
|
||||
lsls r0, 1
|
||||
bl SpeciesToNationalPokedexNum
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
movs r1, 0x1
|
||||
bl GetSetPokedexFlag
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08137C04
|
||||
_08137BEA:
|
||||
ldr r0, =gUnknown_082A62C9
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137BF8:
|
||||
cmp r0, 0xCA
|
||||
beq _08137C04
|
||||
_08137BFC:
|
||||
ldr r0, =gUnknown_082A5D6C
|
||||
b _08137C06
|
||||
.pool
|
||||
_08137C04:
|
||||
ldr r0, =gUnknown_082A6312
|
||||
_08137C06:
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end GetPokedexRatingText
|
||||
|
||||
thumb_func_start ShowPokedexRatingMessage
|
||||
ShowPokedexRatingMessage: @ 8137C10
|
||||
push {lr}
|
||||
ldr r0, =gSpecialVar_0x8004
|
||||
ldrh r0, [r0]
|
||||
bl GetPokedexRatingText
|
||||
bl ShowFieldMessage
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end ShowPokedexRatingMessage
|
@ -9252,7 +9252,7 @@ start_menu_is_selected_item_valid: @ 811EA6C
|
||||
cmp r0, 0
|
||||
bne _0811EA84
|
||||
movs r0, 0
|
||||
bl pokedex_count
|
||||
bl GetNationalPokedexCount
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
b _0811EA9A
|
||||
@ -10369,7 +10369,7 @@ sub_811F2D4: @ 811F2D4
|
||||
movs r5, 0
|
||||
strh r5, [r0]
|
||||
movs r0, 0
|
||||
bl pokedex_count
|
||||
bl GetNationalPokedexCount
|
||||
lsls r0, 16
|
||||
cmp r0, 0
|
||||
beq _0811F2FC
|
||||
|
@ -4654,12 +4654,12 @@ fmt_pokedex: @ 8031F7C
|
||||
cmp r0, 0
|
||||
beq _08031FA4
|
||||
movs r0, 0x1
|
||||
bl pokedex_count
|
||||
bl GetNationalPokedexCount
|
||||
b _08031FAA
|
||||
.pool
|
||||
_08031FA4:
|
||||
movs r0, 0x1
|
||||
bl sub_80C0844
|
||||
bl GetHoennPokedexCount
|
||||
_08031FAA:
|
||||
lsls r0, 16
|
||||
lsrs r7, r0, 16
|
||||
|
@ -443,24 +443,24 @@ _080BB65E:
|
||||
cmp r0, 0
|
||||
bne _080BB6D0
|
||||
movs r0, 0
|
||||
bl sub_80C0844
|
||||
bl GetHoennPokedexCount
|
||||
ldr r1, [r4]
|
||||
ldr r2, =0x0000061a
|
||||
adds r1, r2
|
||||
strh r0, [r1]
|
||||
movs r0, 0x1
|
||||
bl sub_80C0844
|
||||
bl GetHoennPokedexCount
|
||||
b _080BB6E4
|
||||
.pool
|
||||
_080BB6D0:
|
||||
movs r0, 0
|
||||
bl pokedex_count
|
||||
bl GetNationalPokedexCount
|
||||
ldr r1, [r4]
|
||||
ldr r2, =0x0000061a
|
||||
adds r1, r2
|
||||
strh r0, [r1]
|
||||
movs r0, 0x1
|
||||
bl pokedex_count
|
||||
bl GetNationalPokedexCount
|
||||
_080BB6E4:
|
||||
ldr r1, [r4]
|
||||
ldr r3, =0x0000061c
|
||||
@ -5058,7 +5058,7 @@ _080BDF4C:
|
||||
movs r1, 0x1
|
||||
bl StartSpriteAnim
|
||||
movs r0, 0
|
||||
bl sub_80C0844
|
||||
bl GetHoennPokedexCount
|
||||
lsls r0, 16
|
||||
lsrs r6, r0, 16
|
||||
movs r0, 0
|
||||
@ -5283,7 +5283,7 @@ _080BE198:
|
||||
lsrs r1, 24
|
||||
bl StartSpriteAnim
|
||||
movs r0, 0x1
|
||||
bl sub_80C0844
|
||||
bl GetHoennPokedexCount
|
||||
lsls r0, 16
|
||||
lsrs r6, r0, 16
|
||||
movs r0, 0
|
||||
@ -9597,8 +9597,8 @@ _080C07E8:
|
||||
.pool
|
||||
thumb_func_end GetSetPokedexFlag
|
||||
|
||||
thumb_func_start pokedex_count
|
||||
pokedex_count: @ 80C07F4
|
||||
thumb_func_start GetNationalPokedexCount
|
||||
GetNationalPokedexCount: @ 80C07F4
|
||||
push {r4-r7,lr}
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
@ -9641,10 +9641,10 @@ _080C0832:
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end pokedex_count
|
||||
thumb_func_end GetNationalPokedexCount
|
||||
|
||||
thumb_func_start sub_80C0844
|
||||
sub_80C0844: @ 80C0844
|
||||
thumb_func_start GetHoennPokedexCount
|
||||
GetHoennPokedexCount: @ 80C0844
|
||||
push {r4-r6,lr}
|
||||
lsls r0, 24
|
||||
lsrs r6, r0, 24
|
||||
@ -9691,7 +9691,7 @@ _080C088C:
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_80C0844
|
||||
thumb_func_end GetHoennPokedexCount
|
||||
|
||||
thumb_func_start sub_80C089C
|
||||
sub_80C089C: @ 80C089C
|
||||
|
@ -1,214 +0,0 @@
|
||||
.include "asm/macros.inc"
|
||||
.include "constants/constants.inc"
|
||||
|
||||
.syntax unified
|
||||
|
||||
.text
|
||||
|
||||
thumb_func_start sub_807521C
|
||||
sub_807521C: @ 807521C
|
||||
push {r4-r7,lr}
|
||||
mov r7, r10
|
||||
mov r6, r9
|
||||
mov r5, r8
|
||||
push {r5-r7}
|
||||
lsls r0, 16
|
||||
lsrs r6, r0, 16
|
||||
lsls r1, 16
|
||||
lsrs r7, r1, 16
|
||||
lsls r2, 24
|
||||
lsrs r4, r2, 24
|
||||
ldr r5, =gUnknown_0831C620
|
||||
ldrh r0, [r5, 0x6]
|
||||
bl GetSpriteTileStartByTag
|
||||
lsls r0, 16
|
||||
ldr r1, =0xffff0000
|
||||
cmp r0, r1
|
||||
bne _0807524E
|
||||
adds r0, r5, 0
|
||||
bl LoadCompressedObjectPicUsingHeap
|
||||
ldr r0, =gUnknown_0831C628
|
||||
bl LoadCompressedObjectPaletteUsingHeap
|
||||
_0807524E:
|
||||
ldr r0, =sub_8075370
|
||||
bl CreateInvisibleSpriteWithCallback
|
||||
mov r8, r0
|
||||
mov r0, r8
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
mov r8, r0
|
||||
lsls r5, r0, 4
|
||||
add r5, r8
|
||||
lsls r5, 2
|
||||
ldr r0, =gSprites
|
||||
adds r5, r0
|
||||
strh r4, [r5, 0x30]
|
||||
ldr r0, =gUnknown_0831C688
|
||||
mov r9, r0
|
||||
lsls r6, 16
|
||||
asrs r0, r6, 16
|
||||
mov r10, r0
|
||||
ldr r0, =0xfff00000
|
||||
adds r6, r0
|
||||
asrs r6, 16
|
||||
lsls r4, r7, 16
|
||||
asrs r7, r4, 16
|
||||
adds r4, r0
|
||||
asrs r4, 16
|
||||
mov r0, r9
|
||||
adds r1, r6, 0
|
||||
adds r2, r4, 0
|
||||
movs r3, 0x2
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r1, r0, 4
|
||||
adds r1, r0
|
||||
lsls r1, 2
|
||||
ldr r0, =gSprites
|
||||
adds r1, r0
|
||||
mov r0, r8
|
||||
strh r0, [r1, 0x2E]
|
||||
ldrh r0, [r5, 0x2E]
|
||||
adds r0, 0x1
|
||||
strh r0, [r5, 0x2E]
|
||||
adds r0, r1, 0
|
||||
bl AnimateSprite
|
||||
mov r0, r9
|
||||
mov r1, r10
|
||||
adds r2, r4, 0
|
||||
movs r3, 0x2
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r4, r0, 4
|
||||
adds r4, r0
|
||||
lsls r4, 2
|
||||
ldr r0, =gSprites
|
||||
adds r4, r0
|
||||
mov r0, r8
|
||||
strh r0, [r4, 0x2E]
|
||||
ldrh r0, [r5, 0x2E]
|
||||
adds r0, 0x1
|
||||
strh r0, [r5, 0x2E]
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x1
|
||||
bl StartSpriteAnim
|
||||
adds r0, r4, 0
|
||||
bl AnimateSprite
|
||||
mov r0, r9
|
||||
adds r1, r6, 0
|
||||
adds r2, r7, 0
|
||||
movs r3, 0x2
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r4, r0, 4
|
||||
adds r4, r0
|
||||
lsls r4, 2
|
||||
ldr r0, =gSprites
|
||||
adds r4, r0
|
||||
mov r0, r8
|
||||
strh r0, [r4, 0x2E]
|
||||
ldrh r0, [r5, 0x2E]
|
||||
adds r0, 0x1
|
||||
strh r0, [r5, 0x2E]
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x2
|
||||
bl StartSpriteAnim
|
||||
adds r0, r4, 0
|
||||
bl AnimateSprite
|
||||
mov r0, r9
|
||||
mov r1, r10
|
||||
adds r2, r7, 0
|
||||
movs r3, 0x2
|
||||
bl CreateSprite
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
lsls r4, r0, 4
|
||||
adds r4, r0
|
||||
lsls r4, 2
|
||||
ldr r0, =gSprites
|
||||
adds r4, r0
|
||||
mov r0, r8
|
||||
strh r0, [r4, 0x2E]
|
||||
ldrh r0, [r5, 0x2E]
|
||||
adds r0, 0x1
|
||||
strh r0, [r5, 0x2E]
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x3
|
||||
bl StartSpriteAnim
|
||||
adds r0, r4, 0
|
||||
bl AnimateSprite
|
||||
mov r0, r8
|
||||
pop {r3-r5}
|
||||
mov r8, r3
|
||||
mov r9, r4
|
||||
mov r10, r5
|
||||
pop {r4-r7}
|
||||
pop {r1}
|
||||
bx r1
|
||||
.pool
|
||||
thumb_func_end sub_807521C
|
||||
|
||||
thumb_func_start sub_8075370
|
||||
sub_8075370: @ 8075370
|
||||
push {r4,lr}
|
||||
adds r4, r0, 0
|
||||
movs r1, 0x2E
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0
|
||||
bne _080753A8
|
||||
ldr r0, =gUnknown_0831C620
|
||||
ldrh r0, [r0, 0x6]
|
||||
bl FreeSpriteTilesByTag
|
||||
ldr r0, =gUnknown_0831C628
|
||||
ldrh r0, [r0, 0x4]
|
||||
bl FreeSpritePaletteByTag
|
||||
movs r1, 0x30
|
||||
ldrsh r0, [r4, r1]
|
||||
cmp r0, 0
|
||||
bne _080753A4
|
||||
adds r0, r4, 0
|
||||
bl DestroySprite
|
||||
b _080753A8
|
||||
.pool
|
||||
_080753A4:
|
||||
ldr r0, =SpriteCallbackDummy
|
||||
str r0, [r4, 0x1C]
|
||||
_080753A8:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_8075370
|
||||
|
||||
thumb_func_start sub_80753B4
|
||||
sub_80753B4: @ 80753B4
|
||||
push {lr}
|
||||
adds r3, r0, 0
|
||||
adds r0, 0x3F
|
||||
ldrb r1, [r0]
|
||||
movs r0, 0x10
|
||||
ands r0, r1
|
||||
cmp r0, 0
|
||||
beq _080753DE
|
||||
ldr r2, =gSprites
|
||||
movs r0, 0x2E
|
||||
ldrsh r1, [r3, r0]
|
||||
lsls r0, r1, 4
|
||||
adds r0, r1
|
||||
lsls r0, 2
|
||||
adds r0, r2
|
||||
ldrh r1, [r0, 0x2E]
|
||||
subs r1, 0x1
|
||||
strh r1, [r0, 0x2E]
|
||||
adds r0, r3, 0
|
||||
bl DestroySprite
|
||||
_080753DE:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.pool
|
||||
thumb_func_end sub_80753B4
|
||||
|
||||
.align 2, 0 @ Don't pad with nop.
|
@ -418,7 +418,7 @@ _0809FAFE:
|
||||
cmp r1, r0
|
||||
bne _0809FB34
|
||||
movs r0, 0
|
||||
bl pokedex_count
|
||||
bl GetNationalPokedexCount
|
||||
lsls r0, 16
|
||||
cmp r0, 0
|
||||
beq _0809FBA0
|
||||
|
@ -1925,11 +1925,11 @@ sub_80C376C: @ 80C376C
|
||||
cmp r0, 0
|
||||
bne _080C377E
|
||||
movs r0, 0x1
|
||||
bl sub_80C0844
|
||||
bl GetHoennPokedexCount
|
||||
b _080C3784
|
||||
_080C377E:
|
||||
movs r0, 0x1
|
||||
bl pokedex_count
|
||||
bl GetNationalPokedexCount
|
||||
_080C3784:
|
||||
lsls r0, 16
|
||||
lsrs r0, 16
|
||||
|
@ -1872,24 +1872,24 @@ gUnknown_0860F010:: @ 860F010
|
||||
.2byte FLAG_BADGE08_GET
|
||||
|
||||
gUnknown_0860F020:: @ 860F020
|
||||
.4byte gUnknown_082A5D6C
|
||||
.4byte gUnknown_082A5DAB
|
||||
.4byte gUnknown_082A5DF1
|
||||
.4byte gUnknown_082A5E34
|
||||
.4byte gUnknown_082A5E83
|
||||
.4byte gUnknown_082A5EB9
|
||||
.4byte gUnknown_082A5EF4
|
||||
.4byte gUnknown_082A5F39
|
||||
.4byte gUnknown_082A5F82
|
||||
.4byte gUnknown_082A5FB9
|
||||
.4byte gUnknown_082A6018
|
||||
.4byte gUnknown_082A6061
|
||||
.4byte gUnknown_082A609C
|
||||
.4byte gUnknown_082A60D5
|
||||
.4byte gUnknown_082A6124
|
||||
.4byte gUnknown_082A616F
|
||||
.4byte gUnknown_082A61D6
|
||||
.4byte gUnknown_082A623A
|
||||
.4byte gUnknown_082A6287
|
||||
.4byte gUnknown_082A62C9
|
||||
.4byte gUnknown_082A6312
|
||||
.4byte gBirchDexRatingText_LessThan10
|
||||
.4byte gBirchDexRatingText_LessThan20
|
||||
.4byte gBirchDexRatingText_LessThan30
|
||||
.4byte gBirchDexRatingText_LessThan40
|
||||
.4byte gBirchDexRatingText_LessThan50
|
||||
.4byte gBirchDexRatingText_LessThan60
|
||||
.4byte gBirchDexRatingText_LessThan70
|
||||
.4byte gBirchDexRatingText_LessThan80
|
||||
.4byte gBirchDexRatingText_LessThan90
|
||||
.4byte gBirchDexRatingText_LessThan100
|
||||
.4byte gBirchDexRatingText_LessThan110
|
||||
.4byte gBirchDexRatingText_LessThan120
|
||||
.4byte gBirchDexRatingText_LessThan130
|
||||
.4byte gBirchDexRatingText_LessThan140
|
||||
.4byte gBirchDexRatingText_LessThan150
|
||||
.4byte gBirchDexRatingText_LessThan160
|
||||
.4byte gBirchDexRatingText_LessThan170
|
||||
.4byte gBirchDexRatingText_LessThan180
|
||||
.4byte gBirchDexRatingText_LessThan190
|
||||
.4byte gBirchDexRatingText_LessThan200
|
||||
.4byte gBirchDexRatingText_DexCompleted
|
||||
|
@ -12,99 +12,99 @@ gUnknown_082A5D2C:: @ 82A5D2C
|
||||
.string "So, you’ve seen {STR_VAR_1} POKéMON,\n"
|
||||
.string "and you’ve caught {STR_VAR_2} POKéMON…$"
|
||||
|
||||
gUnknown_082A5D6C:: @ 82A5D6C
|
||||
gBirchDexRatingText_LessThan10:: @ 82A5D6C
|
||||
.string "Go into grassy areas more and look\n"
|
||||
.string "for POKéMON more carefully.$"
|
||||
|
||||
gUnknown_082A5DAB:: @ 82A5DAB
|
||||
gBirchDexRatingText_LessThan20:: @ 82A5DAB
|
||||
.string "I guess you’re getting the hang\n"
|
||||
.string "of it. But, it gets harder from here.$"
|
||||
|
||||
gUnknown_082A5DF1:: @ 82A5DF1
|
||||
gBirchDexRatingText_LessThan30:: @ 82A5DF1
|
||||
.string "Some POKéMON only appear in\n"
|
||||
.string "certain areas.\l"
|
||||
.string "You must be persistent.$"
|
||||
|
||||
gUnknown_082A5E34:: @ 82A5E34
|
||||
gBirchDexRatingText_LessThan40:: @ 82A5E34
|
||||
.string "Well, it could use more quantity,\n"
|
||||
.string "but this is looking more like\l"
|
||||
.string "a POKéDEX now.$"
|
||||
|
||||
gUnknown_082A5E83:: @ 82A5E83
|
||||
gBirchDexRatingText_LessThan50:: @ 82A5E83
|
||||
.string "This is coming along pretty good.\n"
|
||||
.string "Keep up the effort.$"
|
||||
|
||||
gUnknown_082A5EB9:: @ 82A5EB9
|
||||
gBirchDexRatingText_LessThan60:: @ 82A5EB9
|
||||
.string "Are you using any RODS?\n"
|
||||
.string "There are many POKéMON in the sea.$"
|
||||
|
||||
gUnknown_082A5EF4:: @ 82A5EF4
|
||||
gBirchDexRatingText_LessThan70:: @ 82A5EF4
|
||||
.string "Instead of just catching POKéMON,\n"
|
||||
.string "how about making them evolve, too?$"
|
||||
|
||||
gUnknown_082A5F39:: @ 82A5F39
|
||||
gBirchDexRatingText_LessThan80:: @ 82A5F39
|
||||
.string "This is going to be a fantastic\n"
|
||||
.string "POKéDEX.\l"
|
||||
.string "That’s the feeling I’m getting.$"
|
||||
|
||||
gUnknown_082A5F82:: @ 82A5F82
|
||||
gBirchDexRatingText_LessThan90:: @ 82A5F82
|
||||
.string "You’ve collected this many…\n"
|
||||
.string "Your talent is remarkable!$"
|
||||
|
||||
gUnknown_082A5FB9:: @ 82A5FB9
|
||||
gBirchDexRatingText_LessThan100:: @ 82A5FB9
|
||||
.string "Have you visited the SAFARI ZONE?\p"
|
||||
.string "I hear there are some POKéMON that\n"
|
||||
.string "can only be caught there.$"
|
||||
|
||||
gUnknown_082A6018:: @ 82A6018
|
||||
gBirchDexRatingText_LessThan110:: @ 82A6018
|
||||
.string "You’ve finally reached\n"
|
||||
.string "the 100-kind mark.\p"
|
||||
.string "This is an impressive POKéDEX!$"
|
||||
|
||||
gUnknown_082A6061:: @ 82A6061
|
||||
gBirchDexRatingText_LessThan120:: @ 82A6061
|
||||
.string "There might be POKéMON that can be\n"
|
||||
.string "found using ROCK SMASH.$"
|
||||
|
||||
gUnknown_082A609C:: @ 82A609C
|
||||
gBirchDexRatingText_LessThan130:: @ 82A609C
|
||||
.string "You should get some more POKéMON\n"
|
||||
.string "by trading with others.$"
|
||||
|
||||
gUnknown_082A60D5:: @ 82A60D5
|
||||
gBirchDexRatingText_LessThan140:: @ 82A60D5
|
||||
.string "I’ve heard of POKéMON that evolve\n"
|
||||
.string "when they come to fully love their\l"
|
||||
.string "TRAINERS.$"
|
||||
|
||||
gUnknown_082A6124:: @ 82A6124
|
||||
gBirchDexRatingText_LessThan150:: @ 82A6124
|
||||
.string "I had no idea that there were so\n"
|
||||
.string "many POKéMON species in the HOENN\l"
|
||||
.string "region.$"
|
||||
|
||||
gUnknown_082A616F:: @ 82A616F
|
||||
gBirchDexRatingText_LessThan160:: @ 82A616F
|
||||
.string "On occasion, some POKéMON appear\n"
|
||||
.string "in large numbers like outbreaks.\p"
|
||||
.string "Don’t miss opportunities like\n"
|
||||
.string "those.$"
|
||||
|
||||
gUnknown_082A61D6:: @ 82A61D6
|
||||
gBirchDexRatingText_LessThan170:: @ 82A61D6
|
||||
.string "One can get a very good idea about\n"
|
||||
.string "the POKéMON of the HOENN region\l"
|
||||
.string "by looking through your POKéDEX.$"
|
||||
|
||||
gUnknown_082A623A:: @ 82A623A
|
||||
gBirchDexRatingText_LessThan180:: @ 82A623A
|
||||
.string "I would say you already qualify as\n"
|
||||
.string "a POKéMON PROFESSOR, and a good\l"
|
||||
.string "one, too!$"
|
||||
|
||||
gUnknown_082A6287:: @ 82A6287
|
||||
gBirchDexRatingText_LessThan190:: @ 82A6287
|
||||
.string "With a POKéDEX this complete,\n"
|
||||
.string "you’re a real professional at this!$"
|
||||
|
||||
gUnknown_082A62C9:: @ 82A62C9
|
||||
gBirchDexRatingText_LessThan200:: @ 82A62C9
|
||||
.string "You’re very close to completing\n"
|
||||
.string "this POKéDEX.\l"
|
||||
.string "I can feel it in my bones!$"
|
||||
|
||||
gUnknown_082A6312:: @ 82A6312
|
||||
gBirchDexRatingText_DexCompleted:: @ 82A6312
|
||||
.string "Congratulations!\n"
|
||||
.string "Your POKéDEX is complete!$"
|
||||
|
||||
|
@ -16,5 +16,9 @@ extern const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1];
|
||||
extern const u8 gMoveNames[][13];
|
||||
extern const u8 gAbilityNames[][13];
|
||||
extern const u8 gTypeNames[][7];
|
||||
extern struct CompressedSpriteSheet gUnknown_0831C620;
|
||||
extern struct CompressedSpritePalette gUnknown_0831C628;
|
||||
extern const struct SpriteTemplate gUnknown_0831C688;
|
||||
|
||||
|
||||
#endif // GUARD_DATA2_H
|
||||
|
@ -17,7 +17,7 @@ enum
|
||||
};
|
||||
|
||||
s8 GetSetPokedexFlag(u16 nationalNum, u8 caseId);
|
||||
u16 pokedex_count(u8);
|
||||
u16 sub_80C0844(u8);
|
||||
u16 GetNationalPokedexCount(u8);
|
||||
u16 GetHoennPokedexCount(u8);
|
||||
|
||||
#endif // GUARD_POKEDEX_H
|
||||
|
@ -278,4 +278,26 @@ extern const u8 gText_DepositedVar2Var1s[];
|
||||
extern const u8 gText_NoRoomForItems[];
|
||||
extern const u8 gText_ThreeDashes[];
|
||||
|
||||
extern const u8 gBirchDexRatingText_LessThan10[];
|
||||
extern const u8 gBirchDexRatingText_LessThan20[];
|
||||
extern const u8 gBirchDexRatingText_LessThan30[];
|
||||
extern const u8 gBirchDexRatingText_LessThan40[];
|
||||
extern const u8 gBirchDexRatingText_LessThan50[];
|
||||
extern const u8 gBirchDexRatingText_LessThan60[];
|
||||
extern const u8 gBirchDexRatingText_LessThan70[];
|
||||
extern const u8 gBirchDexRatingText_LessThan80[];
|
||||
extern const u8 gBirchDexRatingText_LessThan90[];
|
||||
extern const u8 gBirchDexRatingText_LessThan100[];
|
||||
extern const u8 gBirchDexRatingText_LessThan110[];
|
||||
extern const u8 gBirchDexRatingText_LessThan120[];
|
||||
extern const u8 gBirchDexRatingText_LessThan130[];
|
||||
extern const u8 gBirchDexRatingText_LessThan140[];
|
||||
extern const u8 gBirchDexRatingText_LessThan150[];
|
||||
extern const u8 gBirchDexRatingText_LessThan160[];
|
||||
extern const u8 gBirchDexRatingText_LessThan170[];
|
||||
extern const u8 gBirchDexRatingText_LessThan180[];
|
||||
extern const u8 gBirchDexRatingText_LessThan190[];
|
||||
extern const u8 gBirchDexRatingText_LessThan200[];
|
||||
extern const u8 gBirchDexRatingText_DexCompleted[];
|
||||
|
||||
#endif //GUARD_STRINGS_H
|
||||
|
@ -79,7 +79,7 @@ SECTIONS {
|
||||
src/daycare.o(.text);
|
||||
src/egg_hatch.o(.text);
|
||||
src/battle_interface.o(.text);
|
||||
asm/smokescreen.o(.text);
|
||||
src/smokescreen.o(.text);
|
||||
src/pokeball.o(.text);
|
||||
src/load_save.o(.text);
|
||||
asm/trade.o(.text);
|
||||
@ -183,7 +183,7 @@ SECTIONS {
|
||||
asm/fldeff_flash.o(.text);
|
||||
asm/post_battle_event_funcs.o(.text);
|
||||
src/time_events.o(.text);
|
||||
asm/birch_pc.o(.text);
|
||||
src/birch_pc.o(.text);
|
||||
src/hof_pc.o(.text);
|
||||
asm/field_specials.o(.text);
|
||||
asm/battle_records.o(.text);
|
||||
|
93
src/birch_pc.c
Normal file
93
src/birch_pc.c
Normal file
@ -0,0 +1,93 @@
|
||||
#include "global.h"
|
||||
#include "event_data.h"
|
||||
#include "field_message_box.h"
|
||||
#include "pokedex.h"
|
||||
#include "constants/species.h"
|
||||
#include "strings.h"
|
||||
|
||||
extern u16 gSpecialVar_0x8004;
|
||||
extern u16 gSpecialVar_0x8005;
|
||||
extern u16 gSpecialVar_0x8006;
|
||||
|
||||
bool16 ScriptGetPokedexInfo(void)
|
||||
{
|
||||
if (gSpecialVar_0x8004 == 0) // is national dex not present?
|
||||
{
|
||||
gSpecialVar_0x8005 = GetHoennPokedexCount(0);
|
||||
gSpecialVar_0x8006 = GetHoennPokedexCount(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
gSpecialVar_0x8005 = GetNationalPokedexCount(0);
|
||||
gSpecialVar_0x8006 = GetNationalPokedexCount(1);
|
||||
}
|
||||
|
||||
return IsNationalPokedexEnabled();
|
||||
}
|
||||
|
||||
// This shows your Hoenn Pokedex rating and not your National Dex.
|
||||
const u8 *GetPokedexRatingText(u16 count)
|
||||
{
|
||||
if (count < 10)
|
||||
return gBirchDexRatingText_LessThan10;
|
||||
if (count < 20)
|
||||
return gBirchDexRatingText_LessThan20;
|
||||
if (count < 30)
|
||||
return gBirchDexRatingText_LessThan30;
|
||||
if (count < 40)
|
||||
return gBirchDexRatingText_LessThan40;
|
||||
if (count < 50)
|
||||
return gBirchDexRatingText_LessThan50;
|
||||
if (count < 60)
|
||||
return gBirchDexRatingText_LessThan60;
|
||||
if (count < 70)
|
||||
return gBirchDexRatingText_LessThan70;
|
||||
if (count < 80)
|
||||
return gBirchDexRatingText_LessThan80;
|
||||
if (count < 90)
|
||||
return gBirchDexRatingText_LessThan90;
|
||||
if (count < 100)
|
||||
return gBirchDexRatingText_LessThan100;
|
||||
if (count < 110)
|
||||
return gBirchDexRatingText_LessThan110;
|
||||
if (count < 120)
|
||||
return gBirchDexRatingText_LessThan120;
|
||||
if (count < 130)
|
||||
return gBirchDexRatingText_LessThan130;
|
||||
if (count < 140)
|
||||
return gBirchDexRatingText_LessThan140;
|
||||
if (count < 150)
|
||||
return gBirchDexRatingText_LessThan150;
|
||||
if (count < 160)
|
||||
return gBirchDexRatingText_LessThan160;
|
||||
if (count < 170)
|
||||
return gBirchDexRatingText_LessThan170;
|
||||
if (count < 180)
|
||||
return gBirchDexRatingText_LessThan180;
|
||||
if (count < 190)
|
||||
return gBirchDexRatingText_LessThan190;
|
||||
if (count < 200)
|
||||
return gBirchDexRatingText_LessThan200;
|
||||
if (count == 200)
|
||||
{
|
||||
if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), 1)
|
||||
|| GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), 1)) // Jirachi or Deoxys is not counted towards the dex completion. If either of these flags are enabled, it means the actual count is less than 200.
|
||||
return gBirchDexRatingText_LessThan200;
|
||||
return gBirchDexRatingText_DexCompleted;
|
||||
}
|
||||
if (count == 201)
|
||||
{
|
||||
if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), 1)
|
||||
&& GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), 1)) // If both of these flags are enabled, it means the actual count is less than 200.
|
||||
return gBirchDexRatingText_LessThan200;
|
||||
return gBirchDexRatingText_DexCompleted;
|
||||
}
|
||||
if (count == 202)
|
||||
return gBirchDexRatingText_DexCompleted; // Hoenn dex is considered complete, even though the hoenn dex count is 210.
|
||||
return gBirchDexRatingText_LessThan10;
|
||||
}
|
||||
|
||||
void ShowPokedexRatingMessage(void)
|
||||
{
|
||||
ShowFieldMessage(GetPokedexRatingText(gSpecialVar_0x8004));
|
||||
}
|
@ -2388,9 +2388,9 @@ void sub_819A344(u8 a0, u8 *a1, u8 a2)
|
||||
break;
|
||||
case 1:
|
||||
if (IsNationalPokedexEnabled())
|
||||
string = ConvertIntToDecimalStringN(string, pokedex_count(1), 0, 3);
|
||||
string = ConvertIntToDecimalStringN(string, GetNationalPokedexCount(1), 0, 3);
|
||||
else
|
||||
string = ConvertIntToDecimalStringN(string, sub_80C0844(1), 0, 3);
|
||||
string = ConvertIntToDecimalStringN(string, GetHoennPokedexCount(1), 0, 3);
|
||||
*string = EOS;
|
||||
break;
|
||||
case 2:
|
||||
|
71
src/smokescreen.c
Normal file
71
src/smokescreen.c
Normal file
@ -0,0 +1,71 @@
|
||||
#include "global.h"
|
||||
#include "data2.h"
|
||||
#include "decompress.h"
|
||||
#include "sprite.h"
|
||||
#include "util.h"
|
||||
|
||||
static void sub_8075370(struct Sprite *);
|
||||
|
||||
u8 sub_807521C(s16 x, s16 y, u8 a3)
|
||||
{
|
||||
u8 mainSpriteId;
|
||||
u8 spriteId1, spriteId2, spriteId3, spriteId4;
|
||||
struct Sprite *mainSprite;
|
||||
|
||||
if (GetSpriteTileStartByTag(gUnknown_0831C620.tag) == 0xFFFF)
|
||||
{
|
||||
LoadCompressedObjectPicUsingHeap(&gUnknown_0831C620);
|
||||
LoadCompressedObjectPaletteUsingHeap(&gUnknown_0831C628);
|
||||
}
|
||||
|
||||
mainSpriteId = CreateInvisibleSpriteWithCallback(sub_8075370);
|
||||
mainSprite = &gSprites[mainSpriteId];
|
||||
mainSprite->data[1] = a3;
|
||||
|
||||
spriteId1 = CreateSprite(&gUnknown_0831C688, x - 16, y - 16, 2);
|
||||
gSprites[spriteId1].data[0] = mainSpriteId;
|
||||
mainSprite->data[0]++;
|
||||
AnimateSprite(&gSprites[spriteId1]);
|
||||
|
||||
spriteId2 = CreateSprite(&gUnknown_0831C688, x, y - 16, 2);
|
||||
gSprites[spriteId2].data[0] = mainSpriteId;
|
||||
mainSprite->data[0]++;
|
||||
StartSpriteAnim(&gSprites[spriteId2], 1);
|
||||
AnimateSprite(&gSprites[spriteId2]);
|
||||
|
||||
spriteId3 = CreateSprite(&gUnknown_0831C688, x - 16, y, 2);
|
||||
gSprites[spriteId3].data[0] = mainSpriteId;
|
||||
mainSprite->data[0]++;
|
||||
StartSpriteAnim(&gSprites[spriteId3], 2);
|
||||
AnimateSprite(&gSprites[spriteId3]);
|
||||
|
||||
spriteId4 = CreateSprite(&gUnknown_0831C688, x, y, 2);
|
||||
gSprites[spriteId4].data[0] = mainSpriteId;
|
||||
mainSprite->data[0]++;
|
||||
StartSpriteAnim(&gSprites[spriteId4], 3);
|
||||
AnimateSprite(&gSprites[spriteId4]);
|
||||
|
||||
return mainSpriteId;
|
||||
}
|
||||
|
||||
static void sub_8075370(struct Sprite *sprite)
|
||||
{
|
||||
if (!sprite->data[0])
|
||||
{
|
||||
FreeSpriteTilesByTag(gUnknown_0831C620.tag);
|
||||
FreeSpritePaletteByTag(gUnknown_0831C628.tag);
|
||||
if (!sprite->data[1])
|
||||
DestroySprite(sprite);
|
||||
else
|
||||
sprite->callback = SpriteCallbackDummy;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80753B4(struct Sprite *sprite)
|
||||
{
|
||||
if (sprite->animEnded)
|
||||
{
|
||||
gSprites[sprite->data[0]].data[0]--;
|
||||
DestroySprite(sprite);
|
||||
}
|
||||
}
|
4
src/tv.c
4
src/tv.c
@ -1957,11 +1957,11 @@ void sub_80EDB44(void)
|
||||
show->rivalTrainer.badgeCount = nBadges;
|
||||
if (IsNationalPokedexEnabled())
|
||||
{
|
||||
show->rivalTrainer.dexCount = pokedex_count(0x01);
|
||||
show->rivalTrainer.dexCount = GetNationalPokedexCount(0x01);
|
||||
}
|
||||
else
|
||||
{
|
||||
show->rivalTrainer.dexCount = sub_80C0844(0x01);
|
||||
show->rivalTrainer.dexCount = GetHoennPokedexCount(0x01);
|
||||
}
|
||||
show->rivalTrainer.location = gMapHeader.regionMapSectionId;
|
||||
show->rivalTrainer.mapDataId = gMapHeader.mapDataId;
|
||||
|
Loading…
Reference in New Issue
Block a user