merge overworld with master

This commit is contained in:
DizzyEggg 2018-02-14 01:12:17 +01:00
commit 5dde701c81
46 changed files with 2827 additions and 7155 deletions

View File

@ -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

View File

@ -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

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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

View File

@ -3757,7 +3757,7 @@ sub_81C8EF8: @ 81C8EF8
lsls r2, 2
add r2, r8
str r2, [r5, 0x44]
ldrh r3, [r2( 0x4]
ldrh r3, [r2, 0x4]
lsls r1, r3, 22
lsrs r1, 22
adds r1, 0x2

View File

@ -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.

View File

@ -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

View File

@ -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

1
common_syms/item_menu.txt Executable file
View File

@ -0,0 +1 @@
gFieldCallback

View File

@ -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

View File

@ -1,127 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnknown_08613F90:: @ 8613F90
.4byte 0x11F0, 0x1E1, 0x21DE
@ possibly a struct
gUnknown_08613F9C:: @ 8613F9C
.4byte 0
.4byte bag_menu_change_item_callback
.4byte sub_81AB520
.4byte 0
.4byte 0x80000
.4byte 0x7003011
gUnknown_08613FB4:: @ 8613FB4
.4byte gMenuText_Use, ItemMenu_UseOutOfBattle
.4byte gMenuText_Toss, ItemMenu_Toss
.4byte gMenuText_Register, ItemMenu_Register
.4byte gMenuText_Give, ItemMenu_Give
.4byte gText_Cancel2, ItemMenu_Cancel
.4byte gMenuText_Use, ItemMenu_UseInBattle
.4byte gMenuText_Check, ItemMenu_UseOutOfBattle
.4byte gMenuText_Walk, ItemMenu_UseOutOfBattle
.4byte gMenuText_Deselect, ItemMenu_Register
.4byte gMenuText_CheckTag, ItemMenu_CheckTag
.4byte gMenuText_Confirm, unknown_ItemMenu_Confirm
.4byte gMenuText_Show, unknown_ItemMenu_Show
.4byte gMenuText_Give2, unknown_ItemMenu_Give2
.4byte gMenuText_Confirm, unknown_ItemMenu_Confirm2
.4byte gText_EmptyString2, NULL
gUnknown_0861402C:: @ 861402C
.byte 0, 3, 1, 4
gUnknown_08614030:: @ 8614030
.byte 0, 2, 14, 4
gUnknown_08614034:: @ 8614034
.byte 3, 14, 1, 4
gUnknown_08614038:: @ 8614038
.byte 0, 3, 14, 4
gUnknown_0861403C:: @ 861403C
.byte 9, 14, 0, 3, 1, 4
gUnknown_08614042:: @ 8614042
.byte 5, 4
gUnknown_08614044:: @ 8614044
.byte 3, 4
gUnknown_08614046:: @ 8614046
.byte 4
gUnknown_08614047:: @ 8614047
.byte 10, 9, 14, 4
gUnknown_0861404B:: @ 861404B
.byte 11, 4
gUnknown_0861404D:: @ 861404D
.byte 12, 4
gUnknown_0861404F:: @ 861404F
.byte 13, 4
.align 2
gUnknown_08614054:: @ 8614054
.4byte unknown_item_menu_type
.4byte unknown_item_menu_type
.4byte item_menu_type_2
.4byte display_sell_item_ask_str
.4byte unknown_ItemMenu_Confirm
.4byte unknown_item_menu_type
.4byte display_deposit_item_ask_str
.4byte unknown_item_menu_type
.4byte unknown_item_menu_type
.4byte unknown_item_menu_type
.4byte NULL
.4byte item_menu_type_b
.align 2
gUnknown_08614084:: @ 8614084
.4byte BagMenuActuallyToss
.4byte BagMenuCancelToss
gUnknown_0861408C:: @ 861408C
.4byte sub_81AD84C
.4byte sub_81AD6FC
@ probably a struct
gUnknown_08614094:: @ 8614094
.4byte 0x1101C00
.4byte 0xFFFF1064
.4byte 0x6FFFFF
.4byte 0x6F
gUnknown_086140A4:: @ 86140A4
.incbin "graphics/interface/select_button.4bpp"
gUnknown_08614164:: @ 8614164
.byte 0, 1, 3, 0, 1, 4, 0, 3, 6, 2, 1, 3, 0, 14, 10, 0
gUnknown_08614174:: @ 8614174
window_template 0, 14, 2, 15, 16, 1, 0x27
window_template 0, 0, 13, 14, 6, 1, 0x117
window_template 0, 4, 1, 8, 2, 1, 0x1A1
window_template 0, 1, 13, 5, 6, 12, 0x16B
window_template 0, 7, 13, 4, 6, 12, 0x189
window_template 1, 2, 15, 27, 4, 15, 0x1B1
null_window_template
gUnknown_086141AC:: @ 86141AC
window_template 1, 22, 17, 7, 2, 15, 0x21D
window_template 1, 22, 15, 7, 4, 15, 0x21D
window_template 1, 15, 15, 14, 4, 15, 0x21D
window_template 1, 15, 13, 14, 6, 15, 0x21D
window_template 1, 2, 15, 27, 4, 15, 0x1B1
window_template 1, 24, 15, 5, 4, 15, 0x21D
window_template 1, 21, 9, 5, 4, 15, 0x21D
window_template 1, 24, 17, 5, 2, 15, 0x21D
window_template 1, 18, 11, 10, 2, 15, 0x245
window_template 1, 1, 1, 10, 2, 15, 0x231

View File

@ -12,99 +12,99 @@ gUnknown_082A5D2C:: @ 82A5D2C
.string "So, youve seen {STR_VAR_1} POKéMON,\n"
.string "and youve 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 youre 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 "Thats the feeling Im getting.$"
gUnknown_082A5F82:: @ 82A5F82
gBirchDexRatingText_LessThan90:: @ 82A5F82
.string "Youve 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 "Youve 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 "Ive 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 "Dont 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 "youre a real professional at this!$"
gUnknown_082A62C9:: @ 82A62C9
gBirchDexRatingText_LessThan200:: @ 82A62C9
.string "Youre 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!$"

View File

@ -6,5 +6,6 @@ void sub_81A895C(void);
u16 sub_81A89A0(u8);
void sub_81A8AF8(void);
bool8 InBattlePike(void);
void sub_819FA50(void);
#endif // GUARD_BATTLE_FRONTIER_2_H

View File

@ -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

View File

@ -27,5 +27,6 @@ void sub_8098044(u8);
void UnfreezeMapObjects(void);
void FreezeMapObjectsExceptOne(u8 mapObjectId);
void sub_8097B78(u8, u8);
void FreezeMapObjects(void);
#endif //GUARD_FIELD_MAP_OBJ_HELPERS_H

View File

@ -33,8 +33,10 @@ u8 PlayerGetZCoord(void);
void SetPlayerAvatarTransitionFlags(u16 a);
void sub_808BCE8(void);
void InitPlayerAvatar(s16 a, s16 b, u8 c, u8 d);
void sub_808B864(void);
void sub_808BCF4(void);
void sub_808D074(u8);
void GetXYCoordsOneStepInFrontOfPlayer(s16 *xPtr, s16 *yPtr);
u8 GetRivalAvatarGraphicsIdByStateIdAndGender(u8, u8);
#endif //GUARD_FIELD_PLAYER_AVATAR_H
#endif // GUARD_FIELD_PLAYER_AVATAR_H

View File

@ -4,5 +4,6 @@
u8 GetLeadMonIndex(void);
u8 sub_813B260(void);
u16 get_unknown_box_id(void);
bool8 InMultiBattleRoom(void);
#endif // GUARD_FIELD_SPECIALS_H

View File

@ -2719,4 +2719,10 @@ extern const u16 gFireRedMenuElements2_Pal[16];
extern const u16 gFireRedMenuElements3_Pal[16];
extern const u8 gFireRedMenuElements_Gfx[];
//item menu graphics
extern const u8 gBagScreen_Gfx[];
extern const u16 gBagScreenFemale_Pal[];
extern const u16 gBagScreenMale_Pal[];
extern const u8 gBagMenuHMIcon_Gfx[];
#endif //GUARD_GRAPHICS_H

View File

@ -61,5 +61,8 @@ ItemUseFunc ItemId_GetBattleFunc(u16 itemId);
u8 ItemId_GetSecondaryId(u16 itemId);
u16 itemid_get_market_price(u16 itemId);
u16 BagGetItemIdByPocketPosition(u8 pocketId, u16 pocketPos);
void sub_80D6FB4(struct BagPocket*);
void sub_80D6F64(struct BagPocket*);
void sub_80D702C(struct ItemSlot*, s16, u16);
#endif // ITEM_H

View File

@ -8,5 +8,9 @@ u8 sub_80D511C(u8 a0, u8 a1, u8 a2, u8 a3);
u8 CreateBerryTagSprite(u8 id, s16 x, s16 y);
void FreeBerryTagSpritePalette(void);
u8 CreateBerryFlavorCircleSprite(s16 x);
void sub_80D4FAC(void);
void RemoveBagItemIconObject(u8);
void sub_80D4FEC(u8);
void sub_80D4FC8(u8);
#endif // GUARD_ITEM_MENU_ICONS

View File

@ -12,7 +12,7 @@ void ItemUseOutOfBattle_Itemfinder(u8);
void ItemUseOnFieldCB_Itemfinder(u8);
void RunItemfinderResults(u8);
void ExitItemfinder(u8);
bool8 ItemfinderCheckForHiddenItems(struct MapEvents *, u8);
bool8 ItemfinderCheckForHiddenItems(const struct MapEvents *, u8);
void sub_80C9720(u8);
void sub_80C9838(u8, s16, s16);
u8 GetPlayerDirectionTowardsHiddenItem(s16, s16);
@ -50,5 +50,6 @@ void ItemUseOutOfBattle_EnigmaBerry(u8);
void ItemUseInBattle_EnigmaBerry(u8);
void ItemUseOutOfBattle_CannotUse(u8);
u8 CheckIfItemIsTMHMOrEvolutionStone(u16 itemId);
void sub_80FDD10(u8);
#endif // GUARD_ITEM_USE_H

View File

@ -57,5 +57,6 @@ u8 ListMenuInit(struct ListMenuTemplate *template, u16 cursorPage, u16 cursorPos
s32 ListMenuHandleInputGetItemId(u8 listTaskId);
void sub_81AE860(u8 listTaskId, u16 *a1, u16 *a2);
void sub_81AE6C8(u8 listTaskId, u16 *a1, u16 *a2);
u8 ListMenuGetYCoordForPrintingArrowCursor(u8);
#endif //GUARD_LIST_MENU_H

View File

@ -62,5 +62,10 @@ u16 sub_8198AA4(u8, u8, u8, u8, u8, u8, u16);
void *malloc_and_decompress(const void *src, int *sizeOut);
u16 copy_decompressed_tile_data_to_vram(u8 bgId, const void *src, u16 size, u16 offset, u8 mode);
void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress);
void AddItemMenuActionTextPrinters (u8, u8, u8, u8, u8, u8, u8, const struct MenuAction*, const u8*);
void sub_8198DBC(u8, u8, u8, u8, u8, u8, u8, const struct MenuAction*, const u8*);
u8 sub_8199944(u8, u8, u8, u8, u8);
u8 sub_8199134(s8, s8);
void sub_819A2BC(u8, u8);
#endif // GUARD_MENU_H

View File

@ -32,5 +32,10 @@ void DisplayMessageAndContinueTask(u8 taskId, u8 arg1, u16 arg2, u8 arg3, u8 arg
void CreateYesNoMenuWithCallbacks(u8 taskId, const struct WindowTemplate *template, u8 arg2, u8 arg3, u8 arg4, u16 tileStart, u8 palette, const struct YesNoFuncTable *yesNo);
u8 GetLRKeysState(void);
u8 sub_812210C(void);
bool8 sub_81221EC(void);
bool8 sub_81221AC(void);
bool8 sub_8122148(u16);
bool8 AdjustQuantityAccordingToDPadInput(s16*, u16);
bool8 itemid_80BF6D8_mail_related(u16);
#endif //GUARD_MENU_HELPERS_H

View File

@ -8,5 +8,7 @@
// Exported ROM declarations
u8 AddScrollIndicatorArrowPairParametrized(u8, u8, u8, u8, s32, u16, u16, u16 *);
void RemoveScrollIndicatorArrowPair(u8);
u8 AddScrollIndicatorArrowPair(void*, void*);
void sub_81AF15C(u8, u8, u8);
#endif //GUARD_MENU_INDICATORS_H

View File

@ -18,5 +18,6 @@ u8 pokemon_ailments_get_primary(u32 status);
u8 *GetMonNickname(struct Pokemon *mon, u8 *dst);
u8 GetCursorSelectionMonId(void);
bool8 FieldCallback_Teleport(void);
void sub_81B7F60(void);
#endif // GUARD_PARTY_MENU_H

View File

@ -8,5 +8,6 @@
// Exported ROM declarations
void sub_816B060(u8 taskId);
void sub_816B31C(void);
#endif //GUARD_PLAYER_PC_H

View File

@ -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

View File

@ -0,0 +1,6 @@
#ifndef GUARD_POKEMON_SUMMARY_SCREEN_H
#define GUARD_POKEMON_SUMMARY_SCREEN_H
void sub_81C4F98(u8, void(*)(void));
#endif // GUARD_POKEMON_SUMMARY_SCREEN_H

View File

@ -6,5 +6,6 @@ extern EWRAM_DATA struct ItemSlot gUnknown_02039F80[3];
void CreatePokemartMenu(const u16 *);
void CreateDecorationShop1Menu(const u16 *);
void CreateDecorationShop2Menu(const u16 *);
void CB2_ExitSellMenu(void);
#endif // GUARD_SHOP_H

View File

@ -139,6 +139,14 @@ extern const u8 gMenuText_Use[];
extern const u8 gMenuText_Toss[];
extern const u8 gMenuText_Give[];
extern const u8 gMenuText_Give2[];
extern const u8 gMenuText_Register[];
extern const u8 gMenuText_Check[];
extern const u8 gMenuText_Walk[];
extern const u8 gMenuText_Deselect[];
extern const u8 gMenuText_CheckTag[];
extern const u8 gMenuText_Confirm[];
extern const u8 gMenuText_Show[];
extern const u8 gMenuText_Give2[];
extern const u8 gText_Cancel2[];
@ -244,4 +252,52 @@ extern const u8 gText_Var1DotVar2[];
extern const u8 gText_ThreeMarks[];
extern const u8 gText_FirmSlash[];
//item menu screen text
extern const u8 gText_CloseBag[];
extern const u8 gText_ClearTo11Var1Clear5Var2[];
extern const u8 gText_UnkF908Var1Clear7Var2[];
extern const u8 gText_xVar1[];
extern const u8 gText_ReturnToVar1[];
extern const u8 gText_SelectorArrow2[];
extern const u8 gText_MoveVar1Where[];
extern const u8 gText_Var1IsSelected[];
extern const u8 gText_TossHowManyVar1s[];
extern const u8 gText_ConfirmTossItems[];
extern const u8 gText_ThrewAwayVar2Var1s[];
extern const u8 gText_CantWriteMail[];
extern const u8 gText_NoPokemon[];
extern const u8 gText_Var1CantBeHeld[];
extern const u8 gText_Var1CantBeHeldHere[];
extern const u8 gText_CantBuyKeyItem[];
extern const u8 gText_HowManyToSell[];
extern const u8 gText_ICanPayVar1[];
extern const u8 gText_TurnedOverVar1ForVar2[];
extern const u8 gText_DepositHowManyVar1[];
extern const u8 gText_CantStoreImportantItems[];
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

View File

@ -208,6 +208,7 @@ void DecompressGlyphTile(const u16 *src, u16 *dest);
u8 GetLastTextColor(u8 colorType);
void CopyGlyphToWindow(struct TextPrinter *x);
void ClearTextSpan(struct TextPrinter *textPrinter, u32 width);
u8 GetMenuCursorDimensionByFont(u8, u8);
u16 Font0Func(struct TextPrinter *textPrinter);
u16 Font1Func(struct TextPrinter *textPrinter);

View File

@ -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);
@ -246,7 +246,7 @@ SECTIONS {
asm/battle_frontier_1.o(.text);
src/menu.o(.text);
asm/battle_frontier_2.o(.text);
asm/item_menu.o(.text);
src/item_menu.o(.text);
asm/list_menu.o(.text);
asm/menu_indicators.o(.text);
src/unk_text_util.o(.text);
@ -520,7 +520,7 @@ SECTIONS {
data/battle_frontier_1.o(.rodata);
src/menu.o(.rodata);
data/battle_frontier_2.o(.rodata);
data/item_menu.o(.rodata);
src/item_menu.o(.rodata);
data/menu_indicators.o(.rodata);
src/save_location.o(.rodata);
data/item_icon.o(.rodata);

View File

@ -49,6 +49,8 @@ struct TrainerBattleParameter
u8 ptrType;
};
extern void (*gFieldCallback)(void);
extern bool8 InBattlePyramid(void);
extern bool8 InBattlePike(void);
extern bool32 InTrainerHill(void);

93
src/birch_pc.c Normal file
View 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));
}

View File

@ -38,6 +38,8 @@
#include "decoration.h"
#include "graphics.h"
extern void (*gFieldCallback)(void);
// Static type declarations
#define OVERWORLD_PLACE_DECOR_SELECTOR_PAL_TAG 0xbe5

2448
src/item_menu.c Executable file

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,7 @@
#include "global.h"
#include "item_use.h"
#include "battle.h"
#include "main.h"
#include "berry.h"
#include "bike.h"
#include "coins.h"
@ -90,6 +91,7 @@ extern u8* sub_806CF78(u16);
extern void sub_81B89F0(void);
extern u8 GetItemEffectType(u16);
extern struct MapConnection *sub_8088A8C(s16, s16);
extern void (*gFieldCallback)(void);
void MapPostLoadHook_UseItem(void);
void sub_80AF6D4(void);
@ -113,13 +115,13 @@ void sub_80FE024(u8 taskId);
void sub_80FE124(u8 taskId);
void sub_80FE164(u8 taskId);
void DisplayItemMessage(u8 taskId, u8 a, u8* str, void(*callback)(u8 taskId));
void DisplayItemMessage(u8 taskId, u8 a, const u8* str, void(*callback)(u8 taskId));
void DisplayItemMessageInBattlePyramid(u8 taskId, u8* str, void(*callback)(u8 taskId));
void DisplayItemMessageOnField(u8 taskId, u8* str, void(*callback)(u8 taskId));
void sub_81C6714(u8 taskId);
void CleanUpAfterFailingToUseRegisteredKeyItemOnField(u8 taskId);
void StartFishing(u8 a);
bool8 ItemfinderCheckForHiddenItems(struct MapEvents *, u8);
bool8 ItemfinderCheckForHiddenItems(const struct MapEvents *, u8);
u8 sub_80FD9B0(s16 a, s16 b);
void sub_80FDA24(u8 a);
void sub_80FD8E0(u8 taskId, s16 x, s16 y);
@ -363,7 +365,7 @@ void sub_80FD5CC(u8 taskId)
DestroyTask(taskId);
}
bool8 ItemfinderCheckForHiddenItems(struct MapEvents *events, u8 taskId)
bool8 ItemfinderCheckForHiddenItems(const struct MapEvents *events, u8 taskId)
{
int distanceX, distanceY;
s16 x, y, i, newDistanceX, newDistanceY;
@ -390,7 +392,7 @@ bool8 ItemfinderCheckForHiddenItems(struct MapEvents *events, u8 taskId)
return FALSE;
}
bool8 sub_80FD6D4(struct MapEvents *events, s16 x, s16 y)
bool8 sub_80FD6D4(const struct MapEvents *events, s16 x, s16 y)
{
u8 bgEventCount = events->bgEventCount;
struct BgEvent *bgEvent = events->bgEvents;

View File

@ -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:

View File

@ -3,6 +3,7 @@
#include "global.h"
#include "constants/decorations.h"
#include "malloc.h"
#include "main.h"
#include "task.h"
#include "palette.h"
#include "list_menu.h"
@ -39,6 +40,10 @@
#include "tv.h"
#include "secret_base.h"
extern void (*gFieldCallback)(void);
extern void mapldr_default(void);
// Static type declarations
struct SecretBaseListMenuBuffer {
@ -244,7 +249,7 @@ void sub_80E8C98(void)
void sub_80E8CB0(s16 *xPtr, s16 *yPtr, u16 tile)
{
struct MapData *mapData;
const struct MapData *mapData;
s16 x;
s16 y;
@ -773,7 +778,7 @@ void sub_80E9AD0(void)
u16 i;
u16 j;
s16 tile;
struct MapEvents *events;
const struct MapEvents *events;
events = gMapHeader.events;
for (i = 0; i < events->bgEventCount; i ++)

71
src/smokescreen.c Normal file
View 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);
}
}

View File

@ -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;

View File

@ -43,7 +43,8 @@ gUnknown_03005DA8: @ 3005DA8
.space 0x4
gFieldCallback: @ 3005DAC
.space 0x4
.include "item_menu.o"
gUnknown_03005DB0: @ 3005DB0
.space 0x4

View File

@ -931,37 +931,9 @@ gUnknown_0203CE50: @ 203CE50
.space 0x4
gUnknown_0203CE54: @ 203CE54
.space 0x4
.align 2
gUnknown_0203CE58: @ 203CE58
.space 0x5
gUnknown_0203CE5D: @ 203CE5D
.space 0x1
gUnknown_0203CE5E: @ 203CE5E
.space 0x2
gUnknown_0203CE60: @ 203CE60
.space 0xA
gUnknown_0203CE6A: @ 203CE6A
.space 0x6
gUnknown_0203CE70: @ 203CE70
.space 0x4
gUnknown_0203CE74: @ 203CE74
.space 0x4
gUnknown_0203CE78: @ 203CE78
.space 0x4
gSpecialVar_ItemId: @ 203CE7C
.space 0x4
gUnknown_0203CE80: @ 203CE80
.space 0x4
.include "src/item_menu.o"
gUnknown_0203CE84: @ 203CE84
.space 0x8