mirror of
https://github.com/pret/pokegold-spaceworld.git
synced 2026-03-21 17:45:52 -05:00
Adding bank14, good chunk of text transcribed and labelled in bank0d, renaming farcall to callab, and much more (#112)
Some checks failed
CI / build (push) Has been cancelled
Some checks failed
CI / build (push) Has been cancelled
* Sporadic constantifying and function naming * Added bank 14 * Delete .DS_Store files * Delete EOL whitespace * Use Tab indents instead of four spaces * Identify some routines * Identify more stuff * Identified party and box structs * Identified wBattleMon and wEnemyMon structs * Macro'd landmarks, cleaned up comments --------- Co-authored-by: vulcandth <vulcandth@gmail.com>
This commit is contained in:
parent
daff281646
commit
ce247cc761
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -22,3 +22,6 @@ __pycache__
|
|||
|
||||
# utility output
|
||||
/coverage.png
|
||||
|
||||
# macos files
|
||||
.DS_STORE
|
||||
|
|
|
|||
1
Makefile
1
Makefile
|
|
@ -128,6 +128,7 @@ $(BUILD)/%.tilemap: %.png | $$(dir $$@)
|
|||
$(RGBGFX) -t $@ $<
|
||||
|
||||
.PRECIOUS: $(BUILD)/%.sgb.tilemap
|
||||
export LC_ALL=C
|
||||
$(BUILD)/%.sgb.tilemap: %.bin | $$(dir $$@)
|
||||
tr < $< -d '\000' > $@
|
||||
|
||||
|
|
|
|||
|
|
@ -654,7 +654,7 @@ Music_Bicycle_branch_ed7c9::
|
|||
sound_loop 0, Music_Bicycle_branch_ed7c9
|
||||
|
||||
Music_Bicycle_Ch4::
|
||||
toggle_noise 1
|
||||
toggle_noise 1
|
||||
drum_speed 12
|
||||
rest 2
|
||||
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ Music_NidorinoIntro_Ch3::
|
|||
|
||||
|
||||
Music_NidorinoIntro_Ch4::
|
||||
toggle_noise 2
|
||||
toggle_noise 2
|
||||
drum_speed 6
|
||||
drum_note 4, 1
|
||||
drum_note 4, 1
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ Music_OakIntro_branch_ec77c::
|
|||
sound_ret
|
||||
|
||||
Music_OakIntro_Ch4::
|
||||
toggle_noise 0
|
||||
toggle_noise 0
|
||||
|
||||
Music_OakIntro_branch_ec7e9::
|
||||
drum_speed 12
|
||||
|
|
|
|||
|
|
@ -590,7 +590,7 @@ Music_ViridianCity_branch_ec441::
|
|||
sound_ret
|
||||
|
||||
Music_ViridianCity_Ch4::
|
||||
toggle_noise 0
|
||||
toggle_noise 0
|
||||
|
||||
Music_ViridianCity_branch_ec464::
|
||||
drum_speed 12
|
||||
|
|
|
|||
|
|
@ -58,3 +58,6 @@ INCLUDE "constants/sgb_constants.asm"
|
|||
INCLUDE "constants/map_object_constants.asm"
|
||||
INCLUDE "constants/start_menu_constants.asm"
|
||||
INCLUDE "constants/movement_constants.asm"
|
||||
|
||||
INCLUDE "constants/flypoint_constants.asm"
|
||||
INCLUDE "constants/spawnpoint_constants.asm"
|
||||
|
|
|
|||
|
|
@ -294,3 +294,13 @@
|
|||
charmap "7", $fd
|
||||
charmap "8", $fe
|
||||
charmap "9", $ff
|
||||
|
||||
; Actual characters (from gfx/font/font_battle_extra.png)
|
||||
|
||||
charmap "<LV>", $6e
|
||||
|
||||
charmap "<DO>", $70 ; hiragana small do, unused
|
||||
charmap "◀", $71
|
||||
|
||||
charmap "<ID>", $73
|
||||
charmap "№", $74
|
||||
|
|
|
|||
25
constants/flypoint_constants.asm
Normal file
25
constants/flypoint_constants.asm
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
; Fly point indexes (see data/flypoint)
|
||||
const_def
|
||||
|
||||
const FLY_POINT_SILENT_HILL ; 0
|
||||
const FLY_POINT_OLD ; 1
|
||||
const FLY_POINT_WEST ; 2
|
||||
const FLY_POINT_HAITEKU ; 3
|
||||
const FLY_POINT_FONTO ; 4
|
||||
const FLY_POINT_BAADON ; 5
|
||||
const FLY_POINT_NEWTYPE ; 6
|
||||
const FLY_POINT_SUGAR ; 7
|
||||
const FLY_POINT_BULL_FOREST ; 8
|
||||
const FLY_POINT_STAND ; 9
|
||||
const FLY_POINT_KANTO ; 10
|
||||
const FLY_POINT_PRINCE ; 11
|
||||
const FLY_POINT_MT_FUJI ; 12
|
||||
const FLY_POINT_SOUTH ; 13
|
||||
const FLY_POINT_NORTH ; 14
|
||||
|
||||
; Unused?
|
||||
|
||||
const FLY_POINT_ROUTE_15 ; 15
|
||||
const FLY_POINT_ROUTE_18 ; 16
|
||||
|
||||
DEF FLY_POINT_N_A EQU $FF
|
||||
|
|
@ -43,3 +43,5 @@ DEF DOUBLESPRITEBUFFERSIZE EQU 2 * SPRITEBUFFERSIZE
|
|||
const SPRITEOAMSTRUCT_ATTRIBUTES ; 3
|
||||
DEF SPRITEOAMSTRUCT_LENGTH EQU const_value
|
||||
DEF NUM_SPRITE_OAM_STRUCTS EQU 40 ; see wShadowOAM
|
||||
|
||||
DEF OAM_YCOORD_HIDDEN EQU 160 ; hides an OAM offscreen
|
||||
|
|
|
|||
|
|
@ -51,14 +51,7 @@ DEF NUM_MAP_PALETTES EQU const_value
|
|||
const FISHGROUP_REMORAID
|
||||
const FISHGROUP_QWILFISH_NO_SWARM
|
||||
|
||||
; connection directions (see data/maps/data.asm)
|
||||
const_def
|
||||
const EAST_F
|
||||
const WEST_F
|
||||
const SOUTH_F
|
||||
const NORTH_F
|
||||
|
||||
; wMapConnections
|
||||
; wMapConnections / connection directions (see data/maps/data.asm)
|
||||
const_def
|
||||
shift_const EAST
|
||||
shift_const WEST
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ DEF OBJECT_SPRITE_TILE rb ; 02
|
|||
DEF OBJECT_MOVEMENT_TYPE rb ; 03
|
||||
DEF OBJECT_FLAGS1 rb ; 04
|
||||
DEF OBJECT_FLAGS2 rb ; 05
|
||||
DEF OBJECT_PALETTE rb ; 06
|
||||
DEF OBJECT_WALKING rb ; 07
|
||||
DEF OBJECT_DIRECTION rb ; 08
|
||||
DEF OBJECT_STEP_TYPE rb ; 09
|
||||
DEF OBJECT_STEP_DURATION rb ; 0a
|
||||
DEF OBJECT_ACTION rb ; 0b
|
||||
DEF OBJECT_STEP_FRAME rb ; 0c
|
||||
DEF OBJECT_WALKING rb ; 06
|
||||
DEF OBJECT_DIRECTION rb ; 07
|
||||
DEF OBJECT_STEP_TYPE rb ; 08
|
||||
DEF OBJECT_STEP_DURATION rb ; 09
|
||||
DEF OBJECT_ACTION rb ; 0a
|
||||
DEF OBJECT_STEP_FRAME rb ; 0b
|
||||
DEF OBJECT_0C rb ; 0c
|
||||
DEF OBJECT_FACING rb ; 0d
|
||||
DEF OBJECT_TILE rb ; 0e
|
||||
DEF OBJECT_LAST_TILE rb ; 0f
|
||||
|
|
@ -21,13 +21,13 @@ DEF OBJECT_LAST_MAP_X rb ; 12
|
|||
DEF OBJECT_LAST_MAP_Y rb ; 13
|
||||
DEF OBJECT_INIT_X rb ; 14
|
||||
DEF OBJECT_INIT_Y rb ; 15
|
||||
DEF OBJECT_RADIUS rb ; 16
|
||||
DEF OBJECT_SPRITE_X rb ; 17
|
||||
DEF OBJECT_SPRITE_Y rb ; 18
|
||||
DEF OBJECT_SPRITE_X_OFFSET rb ; 19
|
||||
DEF OBJECT_SPRITE_Y_OFFSET rb ; 1a
|
||||
DEF OBJECT_MOVEMENT_INDEX rb ; 1b
|
||||
DEF OBJECT_1C rb ; 1c
|
||||
DEF OBJECT_RADIUS_X rb ; 16
|
||||
DEF OBJECT_RADIUS_Y rb ; 17
|
||||
DEF OBJECT_SPRITE_X rb ; 18
|
||||
DEF OBJECT_SPRITE_Y rb ; 19
|
||||
DEF OBJECT_SPRITE_X_OFFSET rb ; 1a
|
||||
DEF OBJECT_SPRITE_Y_OFFSET rb ; 1b
|
||||
DEF OBJECT_MOVEMENT_INDEX rb ; 1c
|
||||
DEF OBJECT_1D rb ; 1d
|
||||
DEF OBJECT_1E rb ; 1e
|
||||
DEF OBJECT_1F rb ; 1f
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
; MenuHeader flags
|
||||
const_def
|
||||
shift_const MENU_RESTORE_TILES ; Will be set if MENU_BACKUP_TILES(_2) is set.
|
||||
shift_const MENU_UNUSED_1
|
||||
shift_const MENU_UNUSED_2
|
||||
const_skip 2
|
||||
shift_const MENU_NO_CLICK_SFX
|
||||
shift_const MENU_SPRITE_ANIMS
|
||||
shift_const MENU_UNUSED_3
|
||||
shift_const MENU_UNUSED
|
||||
shift_const MENU_BACKUP_TILES
|
||||
shift_const MENU_BACKUP_TILES_2
|
||||
|
||||
|
|
@ -32,37 +31,49 @@
|
|||
shift_const SCROLLINGMENU_ENABLE_START
|
||||
shift_const SCROLLINGMENU_ENABLE_SELECT
|
||||
|
||||
; _2DMenu more flags
|
||||
const_def
|
||||
shift_const _2DMENU_EXIT_RIGHT ; 0
|
||||
shift_const _2DMENU_EXIT_LEFT ; 1
|
||||
shift_const _2DMENU_EXIT_UP ; 2
|
||||
shift_const _2DMENU_EXIT_DOWN ; 3
|
||||
shift_const _2DMENU_WRAP_LEFT_RIGHT ; 4
|
||||
shift_const _2DMENU_WRAP_UP_DOWN ; 5
|
||||
shift_const _2DMENU_ENABLE_SPRITE_ANIMS ; 6
|
||||
shift_const _2DMENU_DISABLE_JOYPAD_FILTER ; 7
|
||||
|
||||
; _2DMenu more flags 2
|
||||
const_def
|
||||
const_skip 7
|
||||
shift_const _2DMENU_EXITING ; 7
|
||||
|
||||
|
||||
; MonMenuOptions indexes (see data/mon_menu.asm)
|
||||
; used by PokemonActionSubmenu (see engine/menus/start_menu.asm)
|
||||
const_def 1
|
||||
; moves
|
||||
const MONMENUITEM_CUT ; 1
|
||||
const MONMENUITEM_FLY ; 2
|
||||
const MONMENUITEM_SURF ; 3
|
||||
const MONMENUITEM_STRENGTH ; 4
|
||||
const MONMENUITEM_WATERFALL ; 5
|
||||
const MONMENUITEM_FLASH ; 6
|
||||
const MONMENUITEM_WHIRLPOOL ; 7
|
||||
const MONMENUITEM_DIG ; 8
|
||||
const MONMENUITEM_TELEPORT ; 9
|
||||
const MONMENUITEM_SOFTBOILED ; 10
|
||||
const MONMENUITEM_HEADBUTT ; 11
|
||||
const MONMENUITEM_ROCKSMASH ; 12
|
||||
const MONMENUITEM_MILKDRINK ; 13
|
||||
const MONMENUITEM_SWEETSCENT ; 14
|
||||
const MONMENUITEM_CUT ; 1
|
||||
const MONMENUITEM_FLY ; 2
|
||||
const MONMENUITEM_SURF ; 3
|
||||
const MONMENUITEM_STRENGTH ; 4
|
||||
const MONMENUITEM_FLASH ; 5
|
||||
const MONMENUITEM_WHIRLPOOL ; 6
|
||||
const MONMENUITEM_BOUNCE ; 7
|
||||
const MONMENUITEM_DIG ; 8
|
||||
const MONMENUITEM_TELEPORT ; 9
|
||||
const MONMENUITEM_SOFTBOILED ; 10
|
||||
; options
|
||||
const MONMENUITEM_STATS ; 15
|
||||
const MONMENUITEM_SWITCH ; 16
|
||||
const MONMENUITEM_ITEM ; 17
|
||||
const MONMENUITEM_CANCEL ; 18
|
||||
const MONMENUITEM_MOVE ; 19
|
||||
const MONMENUITEM_MAIL ; 20
|
||||
const MONMENUITEM_ERROR ; 21
|
||||
const MONMENUITEM_STATS ; 11
|
||||
const MONMENUITEM_SWITCH ; 12
|
||||
const MONMENUITEM_ITEM ; 13
|
||||
const MONMENUITEM_CANCEL ; 14
|
||||
const MONMENUITEM_MOVE ; 15
|
||||
const MONMENUITEM_MAIL ; 16
|
||||
const MONMENUITEM_ERROR ; 17
|
||||
|
||||
; MonMenuOptions categories
|
||||
DEF MONMENU_FIELD_MOVE EQU 0
|
||||
DEF MONMENU_MENUOPTION EQU 1
|
||||
DEF MONMENU_MENUOPTION EQU 0
|
||||
DEF MONMENU_FIELD_MOVE EQU 1
|
||||
|
||||
DEF NUM_MONMENU_ITEMS EQU 8
|
||||
|
||||
|
|
|
|||
|
|
@ -192,3 +192,33 @@
|
|||
const MON_BELLSPROUT ; bc
|
||||
const MON_WEEPINBELL ; bd
|
||||
const MON_VICTREEBEL ; be
|
||||
|
||||
; Unown forms
|
||||
const_def 1
|
||||
const UNOWN_A ; 1
|
||||
const UNOWN_B ; 2
|
||||
const UNOWN_C ; 3
|
||||
const UNOWN_D ; 4
|
||||
const UNOWN_E ; 5
|
||||
const UNOWN_F ; 6
|
||||
const UNOWN_G ; 7
|
||||
const UNOWN_H ; 8
|
||||
const UNOWN_I ; 9
|
||||
const UNOWN_J ; 10
|
||||
const UNOWN_K ; 11
|
||||
const UNOWN_L ; 12
|
||||
const UNOWN_M ; 13
|
||||
const UNOWN_N ; 14
|
||||
const UNOWN_O ; 15
|
||||
const UNOWN_P ; 16
|
||||
const UNOWN_Q ; 17
|
||||
const UNOWN_R ; 18
|
||||
const UNOWN_S ; 19
|
||||
const UNOWN_T ; 20
|
||||
const UNOWN_U ; 21
|
||||
const UNOWN_V ; 22
|
||||
const UNOWN_W ; 23
|
||||
const UNOWN_X ; 24
|
||||
const UNOWN_Y ; 25
|
||||
const UNOWN_Z ; 26
|
||||
DEF NUM_UNOWN EQU const_value - 1 ; 26
|
||||
|
|
|
|||
|
|
@ -100,8 +100,9 @@ DEF CAUGHT_EGG_LEVEL EQU 1
|
|||
DEF PARTY_LENGTH EQU 6
|
||||
|
||||
; boxes
|
||||
DEF MONS_PER_BOX EQU 20
|
||||
DEF NUM_BOXES EQU 14
|
||||
; The Japanese version fits more Pokémon into the boxes, but has less boxes total
|
||||
DEF MONS_PER_BOX EQU 30
|
||||
DEF NUM_BOXES EQU 10
|
||||
|
||||
; hall of fame
|
||||
DEF HOF_MON_LENGTH EQUS "(wHallOfFamePokemonListMon1End - wHallOfFamePokemonListMon1)"
|
||||
|
|
|
|||
49
constants/spawnpoint_constants.asm
Normal file
49
constants/spawnpoint_constants.asm
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
; Spawn point indexes (see data/maps/landmarks.asm)
|
||||
const_def
|
||||
|
||||
const SPAWN_POINT_NONE
|
||||
const SPAWN_POINT_SILENT
|
||||
const SPAWN_POINT_OLD
|
||||
const SPAWN_POINT_WEST
|
||||
const SPAWN_POINT_HIGH_TECH
|
||||
const SPAWN_POINT_FOUNT
|
||||
const SPAWN_POINT_BIRDON
|
||||
const SPAWN_POINT_NEW_TYPE
|
||||
const SPAWN_POINT_SUGAR
|
||||
const SPAWN_POINT_BLUE_FOREST
|
||||
const SPAWN_POINT_STAND
|
||||
const SPAWN_POINT_KANTO
|
||||
const SPAWN_POINT_PRINCE
|
||||
const SPAWN_POINT_MT_FUJI
|
||||
const SPAWN_POINT_SOUTH
|
||||
const SPAWN_POINT_NORTH
|
||||
const SPAWN_POINT_ROUTE_15
|
||||
const SPAWN_POINT_ROUTE_18
|
||||
const SPAWN_POINT_POWER_PLANT_1
|
||||
const SPAWN_POINT_POWER_PLANT_2
|
||||
const SPAWN_POINT_POWER_PLANT_3
|
||||
const SPAWN_POINT_POWER_PLANT_4
|
||||
const SPAWN_POINT_RUINS_1
|
||||
const SPAWN_POINT_RUINS_2
|
||||
const SPAWN_POINT_MINES_1
|
||||
const SPAWN_POINT_MINES_2
|
||||
const SPAWN_POINT_MINES_3
|
||||
const SPAWN_POINT_MINES_4
|
||||
const SPAWN_POINT_MINES_5
|
||||
const SPAWN_POINT_MINES_6
|
||||
const SPAWN_POINT_MINES_7
|
||||
const SPAWN_POINT_HIDEOUT_1
|
||||
const SPAWN_POINT_HIDEOUT_2
|
||||
const SPAWN_POINT_HIDEOUT_3
|
||||
const SPAWN_POINT_SLOWPOKE_WELL_1
|
||||
const SPAWN_POINT_SLOWPOKE_WELL_2
|
||||
const SPAWN_POINT_POKEMON_LEAGUE_1
|
||||
const SPAWN_POINT_POKEMON_LEAGUE_1_2
|
||||
const SPAWN_POINT_POKEMON_LEAGUE_2
|
||||
const SPAWN_POINT_POKEMON_LEAGUE_3
|
||||
const SPAWN_POINT_POKEMON_LEAGUE_4
|
||||
const SPAWN_POINT_POKEMON_LEAGUE_5
|
||||
const SPAWN_POINT_POKEMON_LEAGUE_6
|
||||
const SPAWN_POINT_POKEMON_LEAGUE_7
|
||||
const SPAWN_POINT_POKEMON_LEAGUE_7_2
|
||||
const SPAWN_POINT_SILENT_HILL
|
||||
|
|
@ -3,7 +3,7 @@ DEF NAME_LENGTH EQU 11 ; English
|
|||
DEF PLAYER_NAME_LENGTH EQU 6 ; Japanese
|
||||
DEF BOX_NAME_LENGTH EQU 9 ; English
|
||||
DEF MON_NAME_LENGTH EQU 6
|
||||
DEF MOVE_NAME_LENGTH EQU 13 ; English
|
||||
DEF MOVE_NAME_LENGTH EQU 5
|
||||
DEF ITEM_NAME_LENGTH EQU 11
|
||||
DEF TRAINER_CLASS_NAME_LENGTH EQU 13 ; English
|
||||
|
||||
|
|
|
|||
27
data/maps/flypoints.asm
Normal file
27
data/maps/flypoints.asm
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
INCLUDE "constants.asm"
|
||||
|
||||
SECTION "data/maps/flypoints.asm", ROMX
|
||||
|
||||
;
|
||||
; Table that the game reads for determining which Fly point to move to depending on D-Pad input.
|
||||
; Each row corresponds to the index of a Fly point.
|
||||
;
|
||||
; db UP, DOWN, LEFT, RIGHT
|
||||
;
|
||||
FlyPointPaths:
|
||||
|
||||
db FLY_POINT_PRINCE, FLY_POINT_N_A, FLY_POINT_OLD, FLY_POINT_KANTO ; FLY_POINT_SILENT_HILL
|
||||
db FLY_POINT_HAITEKU, FLY_POINT_SILENT_HILL, FLY_POINT_WEST, FLY_POINT_SILENT_HILL ; FLY_POINT_OLD
|
||||
db FLY_POINT_BAADON, FLY_POINT_OLD, FLY_POINT_HAITEKU, FLY_POINT_OLD ; FLY_POINT_WEST
|
||||
db FLY_POINT_FONTO, FLY_POINT_WEST, FLY_POINT_SOUTH, FLY_POINT_WEST ; FLY_POINT_HAITEKU
|
||||
db FLY_POINT_SOUTH, FLY_POINT_HAITEKU, FLY_POINT_SOUTH, FLY_POINT_BAADON ; FLY_POINT_FONTO
|
||||
db FLY_POINT_FONTO, FLY_POINT_WEST, FLY_POINT_FONTO, FLY_POINT_NEWTYPE ; FLY_POINT_BAADON
|
||||
db FLY_POINT_SUGAR, FLY_POINT_N_A, FLY_POINT_BAADON, FLY_POINT_BULL_FOREST ; FLY_POINT_NEWTYPE
|
||||
db FLY_POINT_N_A, FLY_POINT_NEWTYPE, FLY_POINT_N_A, FLY_POINT_N_A ; FLY_POINT_SUGAR
|
||||
db FLY_POINT_NORTH, FLY_POINT_STAND, FLY_POINT_NEWTYPE, FLY_POINT_NORTH ; FLY_POINT_BULL_FOREST
|
||||
db FLY_POINT_BULL_FOREST, FLY_POINT_KANTO, FLY_POINT_KANTO, FLY_POINT_BULL_FOREST ; FLY_POINT_STAND
|
||||
db FLY_POINT_STAND, FLY_POINT_SILENT_HILL, FLY_POINT_SILENT_HILL, FLY_POINT_STAND ; FLY_POINT_KANTO
|
||||
db FLY_POINT_MT_FUJI, FLY_POINT_SILENT_HILL, FLY_POINT_N_A, FLY_POINT_N_A ; FLY_POINT_PRINCE
|
||||
db FLY_POINT_N_A, FLY_POINT_PRINCE, FLY_POINT_N_A, FLY_POINT_N_A ; FLY_POINT_MT_FUJI
|
||||
db FLY_POINT_FONTO, FLY_POINT_HAITEKU, FLY_POINT_N_A, FLY_POINT_FONTO ; FLY_POINT_SOUTH
|
||||
db FLY_POINT_N_A, FLY_POINT_BULL_FOREST, FLY_POINT_BULL_FOREST, FLY_POINT_N_A ; FLY_POINT_NORTH
|
||||
|
|
@ -1,7 +1,62 @@
|
|||
INCLUDE "constants.asm"
|
||||
|
||||
MACRO landmark
|
||||
; X, Y.
|
||||
; Unlike the final game, the prototype actually stores and reads the bytes swapped, with Y first and X second.
|
||||
db \2 + 16, \1 + 8
|
||||
|
||||
ENDM
|
||||
|
||||
SECTION "data/maps/landmarks.asm", ROMX
|
||||
|
||||
LandmarkPositions:
|
||||
landmark -8, -16 ; LANDMARK_NONE
|
||||
landmark 148, 12 ; LANDMARK_NORTH
|
||||
landmark 148, 24 ; LANDMARK_BULL_FOREST_ROUTE_3
|
||||
landmark 148, 36 ; LANDMARK_BULL_FOREST
|
||||
landmark 148, 48 ; LANDMARK_BULL_FOREST_ROUTE_2
|
||||
landmark 148, 60 ; LANDMARK_STAND
|
||||
landmark 148, 76 ; LANDMARK_STAND_ROUTE
|
||||
landmark 140, 92 ; LANDMARK_KANTO_EAST_ROUTE
|
||||
landmark 124, 92 ; LANDMARK_KANTO
|
||||
landmark 112, 92 ; LANDMARK_ROUTE_SILENT_EAST
|
||||
landmark 100, 92 ; LANDMARK_SILENT_HILL
|
||||
landmark 100, 84 ; LANDMARK_PRINCE
|
||||
landmark 100, 76 ; LANDMARK_MT_FUJI
|
||||
landmark 92, 92 ; LANDMARK_ROUTE_1_P1
|
||||
landmark 84, 92 ; LANDMARK_ROUTE_1_P2
|
||||
landmark 84, 76 ; LANDMARK_OLD_CITY
|
||||
landmark 72, 76 ; LANDMARK_ROUTE_2
|
||||
landmark 60, 76 ; LANDMARK_WEST
|
||||
landmark 60, 64 ; LANDMARK_BAADON_ROUTE_1
|
||||
landmark 60, 52 ; LANDMARK_BAADON
|
||||
landmark 84, 52 ; LANDMARK_BAADON_ROUTE_2
|
||||
landmark 100, 52 ; LANDMARK_BAADON_ROUTE_3
|
||||
landmark 108, 60 ; LANDMARK_ROUTE_15
|
||||
landmark 116, 60 ; LANDMARK_NEWTYPE
|
||||
landmark 116, 48 ; LANDMARK_SUGAR_ROUTE
|
||||
landmark 116, 36 ; LANDMARK_SUGAR
|
||||
landmark 124, 60 ; LANDMARK_NEWTYPE_ROUTE
|
||||
landmark 132, 44 ; LANDMARK_ROUTE_18
|
||||
landmark 140, 36 ; LANDMARK_BULL_FOREST_ROUTE_1
|
||||
landmark 120, 76 ; LANDMARK_1C
|
||||
landmark 96, 68 ; LANDMARK_1D
|
||||
landmark 48, 44 ; LANDMARK_FONTO_ROUTE_3
|
||||
landmark 36, 44 ; LANDMARK_FONTO
|
||||
landmark 36, 36 ; LANDMARK_FONTO_ROUTE_2
|
||||
landmark 24, 28 ; LANDMARK_FONTO_ROUTE_6
|
||||
landmark 12, 36 ; LANDMARK_FONTO_ROUTE_5
|
||||
landmark 12, 44 ; LANDMARK_SOUTH
|
||||
landmark 24, 44 ; LANDMARK_FONTO_ROUTE_1
|
||||
landmark 12, 56 ; LANDMARK_HAITEKU_WEST_ROUTE_OCEAN
|
||||
landmark 20, 68 ; LANDMARK_HAITEKU_WEST_ROUTE
|
||||
landmark 36, 68 ; LANDMARK_HAITEKU
|
||||
landmark 48, 68 ; LANDMARK_WASTE_BRIDGE
|
||||
landmark 60, 44 ; LANDMARK_FONTO_ROUTE_4
|
||||
landmark 36, 56 ; LANDMARK_FONTO_BRIDGE
|
||||
|
||||
SECTION "data/maps/landmarks.asm@LandmarkNames", ROMX
|
||||
|
||||
LandmarkNames::
|
||||
db "サイレント@" ; SILENT
|
||||
db "オールド@" ; OLD
|
||||
|
|
|
|||
72
data/maps/spawn_points.asm
Normal file
72
data/maps/spawn_points.asm
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
INCLUDE "constants.asm"
|
||||
|
||||
SECTION "data/maps/spawn_points.asm", ROMX
|
||||
;
|
||||
; Spawn points used by Fly, Debug Warp, etc.
|
||||
;
|
||||
; Group, Map, X Position, Y Position
|
||||
;
|
||||
SpawnPoints:
|
||||
|
||||
; Fly destinations
|
||||
|
||||
db GROUP_SILENT_HILL, MAP_SILENT_HILL, $05, $05
|
||||
db GROUP_OLD_CITY, MAP_OLD_CITY, $1b, $1d
|
||||
db GROUP_WEST, MAP_WEST, $19, $0f
|
||||
db GROUP_HAITEKU, MAP_HAITEKU, $1f, $0b
|
||||
db GROUP_FONTO, MAP_FONTO, $03, $0d
|
||||
db GROUP_BAADON, MAP_BAADON, $0f, $05
|
||||
db GROUP_NEWTYPE, MAP_NEWTYPE, $07, $09
|
||||
db GROUP_SUGAR, MAP_SUGAR, $09, $0b
|
||||
db GROUP_BULL_FOREST, MAP_BULL_FOREST, $0d, $13
|
||||
db GROUP_STAND, MAP_STAND, $21, $15
|
||||
db GROUP_KANTO, MAP_KANTO, $31, $1f
|
||||
db GROUP_PRINCE, MAP_PRINCE, $05, $05
|
||||
db GROUP_MT_FUJI, MAP_MT_FUJI, $05, $05
|
||||
db GROUP_SOUTH, MAP_SOUTH, $21, $0f
|
||||
db GROUP_NORTH, MAP_NORTH, $0d, $0b
|
||||
|
||||
; Seemingly recognized as valid warps by hacking wFlyDestination, but inaccessible other than through debug Warp
|
||||
|
||||
db GROUP_NEWTYPE, MAP_ROUTE_15, $09, $0b
|
||||
db GROUP_NEWTYPE, MAP_ROUTE_18, $0d, $1d
|
||||
|
||||
; Hidden warps (do not appear in debug menu normally)
|
||||
|
||||
db GROUP_POWER_PLANT_1, MAP_POWER_PLANT_1, $06, $06
|
||||
db GROUP_POWER_PLANT_2, MAP_POWER_PLANT_2, $06, $06
|
||||
db GROUP_POWER_PLANT_3, MAP_POWER_PLANT_3, $04, $10
|
||||
db GROUP_POWER_PLANT_4, MAP_POWER_PLANT_4, $06, $06
|
||||
|
||||
db GROUP_RUINS_OF_ALPH_ENTRANCE, MAP_RUINS_OF_ALPH_ENTRANCE, $09, $0d
|
||||
db GROUP_RUINS_OF_ALPH_MAIN, MAP_RUINS_OF_ALPH_MAIN, $17, $2f
|
||||
|
||||
db GROUP_CAVE_MINECARTS_1, MAP_CAVE_MINECARTS_1, $06, $0a
|
||||
db GROUP_CAVE_MINECARTS_2, MAP_CAVE_MINECARTS_2, $06, $06
|
||||
db GROUP_CAVE_MINECARTS_3, MAP_CAVE_MINECARTS_3, $06, $06
|
||||
db GROUP_CAVE_MINECARTS_4, MAP_CAVE_MINECARTS_4, $06, $06
|
||||
db GROUP_CAVE_MINECARTS_5, MAP_CAVE_MINECARTS_5, $06, $06
|
||||
db GROUP_CAVE_MINECARTS_6, MAP_CAVE_MINECARTS_6, $06, $06
|
||||
db GROUP_CAVE_MINECARTS_7, MAP_CAVE_MINECARTS_7, $06, $06
|
||||
|
||||
db GROUP_OFFICE_1, MAP_OFFICE_1, $10, $0d
|
||||
db GROUP_OFFICE_2, MAP_OFFICE_2, $08, $08
|
||||
db GROUP_OFFICE_3, MAP_OFFICE_3, $08, $08
|
||||
|
||||
db GROUP_SLOWPOKE_WELL_ENTRANCE, MAP_SLOWPOKE_WELL_ENTRANCE, $09, $0b
|
||||
db GROUP_SLOWPOKE_WELL_MAIN, MAP_SLOWPOKE_WELL_MAIN, $09, $23
|
||||
|
||||
db GROUP_OLD_CITY_GYM, MAP_OLD_CITY_GYM, $06, $06
|
||||
db GROUP_WEST_GYM, MAP_WEST_GYM, $06, $06
|
||||
db GROUP_HAITEKU_LEAGUE_2F, MAP_HAITEKU_LEAGUE_2F, $06, $06
|
||||
db GROUP_BAADON_LEAGUE_2F, MAP_BAADON_LEAGUE_2F, $06, $06
|
||||
db GROUP_NEWTYPE_LEAGUE_2F, MAP_NEWTYPE_LEAGUE_2F, $06, $06
|
||||
db GROUP_BULL_LEAGUE_2F, MAP_BULL_LEAGUE_2F, $06, $06
|
||||
db GROUP_STAND_LEAGUE_2F, MAP_STAND_LEAGUE_2F, $06, $06
|
||||
db GROUP_KANTO_LEAGUE_2F, MAP_KANTO_LEAGUE_2F, $06, $06
|
||||
db GROUP_KANTO_LEAGUE_2_2F, MAP_KANTO_LEAGUE_2_2F, $06, $06
|
||||
|
||||
; Only appears in debug menu, likely for the purposes of testing the demo
|
||||
|
||||
db GROUP_SHIZUKANA_OKA, MAP_SHIZUKANA_OKA, $10, $10
|
||||
db $ff, $ff, $ff, $ff
|
||||
|
|
@ -60,24 +60,24 @@ GiveItemPredef::
|
|||
add_predef Function28d6e
|
||||
add_predef Function40ac7
|
||||
add_predef Function40000
|
||||
add_predef Function40b5c ; 30
|
||||
add_predef Function50000
|
||||
add_predef Function50bfe
|
||||
add_predef ConvertMon_1to2 ; 30
|
||||
add_predef CopyMonToTempMon
|
||||
add_predef ListMoves
|
||||
add_predef Function50bcd
|
||||
add_predef Function50b92
|
||||
add_predef Function508c4
|
||||
add_predef Function50771
|
||||
add_predef Function50774
|
||||
add_predef PartyMenuInBattle_Setup
|
||||
add_predef PartyMenuInBattle
|
||||
add_predef Function5081f ; 38
|
||||
add_predef Function506d4
|
||||
add_predef Function5069e
|
||||
add_predef ListMovePP
|
||||
add_predef GetGender
|
||||
add_predef Function502b5
|
||||
add_predef Function50244
|
||||
add_predef Function50248
|
||||
add_predef Function500c6
|
||||
add_predef Function500a0
|
||||
add_predef Function50073 ; 40
|
||||
add_predef Function50ed9
|
||||
add_predef DrawPlayerHP
|
||||
add_predef DrawEnemyHP
|
||||
add_predef GetTypeName
|
||||
add_predef PrintMoveType
|
||||
add_predef PrintMonTypes ; 40
|
||||
add_predef GetUnownLetter
|
||||
add_predef Functioncb6ff
|
||||
add_predef Functioncb710
|
||||
add_predef Functioncb733
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ DoBattleTransition:
|
|||
ret
|
||||
|
||||
.InitGFX:
|
||||
callba ReanchorBGMap_NoOAMUpdate
|
||||
farcall ReanchorBGMap_NoOAMUpdate
|
||||
call UpdateSprites
|
||||
call ConvertTrainerBattlePokeballTilesTo2bpp
|
||||
call WaitBGMap
|
||||
|
|
|
|||
|
|
@ -537,7 +537,7 @@ BattleBGEffect_HeadFollow:
|
|||
ret
|
||||
|
||||
_QueueBattleAnimation:
|
||||
callab QueueBattleAnimation
|
||||
callfar QueueBattleAnimation
|
||||
ret
|
||||
|
||||
BattleBGEffect_27:
|
||||
|
|
@ -2340,12 +2340,12 @@ BattleBGEffects_CheckSGB:
|
|||
|
||||
BattleBGEffects_Sine:
|
||||
ld e, a
|
||||
callab BattleAnim_Sine_e
|
||||
callfar BattleAnim_Sine_e
|
||||
ld a, e
|
||||
ret
|
||||
|
||||
BattleBGEffects_Cosine:
|
||||
ld e, a
|
||||
callab BattleAnim_Cosine_e
|
||||
callfar BattleAnim_Cosine_e
|
||||
ld a, e
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -84,11 +84,11 @@ DebugMenuOptionFight::
|
|||
ret
|
||||
|
||||
DebugMenuOptionSubGames::
|
||||
callab CallSubGameMenu
|
||||
callfar CallSubGameMenu
|
||||
jp DebugMenu
|
||||
|
||||
DebugMenuOptionMonsterTest::
|
||||
ld hl, wPokedexOwned
|
||||
ld hl, wPokedexCaught
|
||||
ld de, wPokedexSeen
|
||||
ld b, NUM_POKEMON / 8
|
||||
ld a, %11111111
|
||||
|
|
@ -101,7 +101,7 @@ DebugMenuOptionMonsterTest::
|
|||
ld a, (1 << ((NUM_POKEMON - 1) % 8)) - 1 ; discount #251
|
||||
ld [hl], a
|
||||
ld [de], a
|
||||
callab MonsterTest
|
||||
callfar MonsterTest
|
||||
ld a, %11100100
|
||||
ldh [rBGP], a
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ Function40eb::
|
|||
jp DebugMenu
|
||||
|
||||
DebugMenuOptionName::
|
||||
callab OpenTrainerGear
|
||||
callfar OpenTrainerGear
|
||||
ld a, %11100100
|
||||
ldh [rBGP], a
|
||||
jp DebugMenu
|
||||
|
|
@ -292,22 +292,22 @@ CallSubGameMenu:
|
|||
db "スロット@"
|
||||
|
||||
SubGameMenu_PokerGame:
|
||||
callab PokerMinigame
|
||||
callfar PokerMinigame
|
||||
ret
|
||||
|
||||
SubGameMenu_PuzzleGame:
|
||||
callab FifteenPuzzleMinigame
|
||||
callfar FifteenPuzzleMinigame
|
||||
ret
|
||||
|
||||
SubGameMenu_CardFlipGame:
|
||||
callab MemoryMinigame
|
||||
callfar MemoryMinigame
|
||||
ret
|
||||
|
||||
SubGameMenu_PicrossGame:
|
||||
callab PicrossMinigame
|
||||
callfar PicrossMinigame
|
||||
ret
|
||||
|
||||
SubGameMenu_SlotMachineGame:
|
||||
callab SlotMachineGame
|
||||
callfar SlotMachineGame
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ FieldDebug_ChangeTransportation:
|
|||
call MenuTextBox
|
||||
|
||||
.update_sprite
|
||||
callab GetPlayerSprite
|
||||
callfar GetPlayerSprite
|
||||
ld a, BUTTONS
|
||||
call FieldDebug_WaitJoypadInput
|
||||
call CloseWindow
|
||||
|
|
@ -149,7 +149,7 @@ FieldDebug_CheckFacingSurfable:
|
|||
ret
|
||||
|
||||
FieldDebug_SetSurfDirection:
|
||||
ld a, [wPlayerWalking]
|
||||
ld a, [wPlayerDirection]
|
||||
srl a
|
||||
srl a
|
||||
ld e, a
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ FieldDebug_FollowNPCTest:
|
|||
ret
|
||||
|
||||
.asm_fc9a5:
|
||||
callab SpawnFollower
|
||||
callfar SetFollowerDefaultAttributes
|
||||
ld a, 1
|
||||
call Function15ed
|
||||
ld a, 1
|
||||
|
|
@ -50,7 +50,7 @@ FieldDebug_FollowNPCTest:
|
|||
.asm_fc9c2:
|
||||
call Function18cc
|
||||
ld a, 1
|
||||
call Function169f
|
||||
call DeleteMapObject
|
||||
ret
|
||||
|
||||
.MenuHeader:
|
||||
|
|
|
|||
|
|
@ -166,9 +166,9 @@ FieldDebug_ItemTest:
|
|||
|
||||
.DetermineItemTossable:
|
||||
push hl
|
||||
callab _CheckTossableItem
|
||||
callfar _CheckTossableItem
|
||||
pop hl
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
ld a, [wItemAttributeValue]
|
||||
and a
|
||||
jr nz, .not_tossable
|
||||
call .tossable
|
||||
|
|
@ -183,7 +183,7 @@ FieldDebug_ItemTest:
|
|||
|
||||
.tossable
|
||||
push hl
|
||||
callab SelectQuantityToToss
|
||||
callfar SelectQuantityToToss
|
||||
jr c, .cancel_toss
|
||||
call .load_item
|
||||
ld hl, .TossConfirmText
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ DebugMapViewer::
|
|||
jr c, .continue
|
||||
call Function2c4a
|
||||
jr nc, .loop
|
||||
callab Function824c
|
||||
callfar Function824c
|
||||
jr .loop
|
||||
|
||||
.continue
|
||||
|
|
@ -141,7 +141,7 @@ DebugMapViewer::
|
|||
ld d, 2
|
||||
ld b, 1
|
||||
ld c, 0
|
||||
callab Function83a2
|
||||
callfar Function83a2
|
||||
ld a, DEBUGMAPVIEWER_WAIT_FINISHED_MOVING
|
||||
ldh [hDebugMapViewerJumptable], a
|
||||
and a
|
||||
|
|
@ -159,7 +159,7 @@ DebugMapViewer::
|
|||
|
||||
.Cleanup:
|
||||
ld a, 1
|
||||
call Function169f
|
||||
call DeleteMapObject
|
||||
call Function18cc
|
||||
ld a, 0
|
||||
call Function1908
|
||||
|
|
@ -190,7 +190,7 @@ DebugMapViewer_ShowSelectedDetails:
|
|||
ld a, 0
|
||||
ldh [hTextBoxCursorBlinkInterval], a
|
||||
ld bc, wObjectStructs
|
||||
callab Function77a1
|
||||
callfar Function77a1
|
||||
jr nc, .skip
|
||||
call RefreshScreen
|
||||
call .DisplayActorCastID
|
||||
|
|
@ -323,7 +323,7 @@ DebugMapViewer_DoMovement:
|
|||
ret
|
||||
|
||||
DebugMapViewer_ReplacePlayerObject:
|
||||
callab Function807b
|
||||
callfar DebugMapViewer_SetupCursor
|
||||
ld a, 1
|
||||
call Function15ed
|
||||
ld a, 1
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ FieldDebug_PokemonFollowing:
|
|||
ld a, [wPlayerStructEnd]
|
||||
and a
|
||||
jr nz, .ShowUnableText
|
||||
callab Function8031
|
||||
callfar SpawnFollower
|
||||
ld de, SFX_24
|
||||
call PlaySFX
|
||||
call CloseWindow
|
||||
|
|
@ -27,7 +27,7 @@ FieldDebug_PokemonFollowing:
|
|||
ret
|
||||
|
||||
.remove
|
||||
callab Function806c
|
||||
callfar DeleteFollower
|
||||
ld de, SFX_25
|
||||
call PlaySFX
|
||||
jr .done
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ FieldDebug_MoveToRoute1Entrance:
|
|||
ld e, $d
|
||||
ld b, 0
|
||||
ld c, 1
|
||||
callab Function833a
|
||||
callfar Function833a
|
||||
ld a, 0
|
||||
ld hl, wMovementBuffer
|
||||
call LoadMovementDataPointer
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ FieldDebug_PokemartMenu:
|
|||
|
||||
.DoPokemartMenu:
|
||||
call LoadStandardMenuHeader
|
||||
callab asm_24860
|
||||
callfar asm_24860
|
||||
ld hl, DebugMart_PokemartMenuText
|
||||
call PrintText
|
||||
ld hl, .MenuHeader
|
||||
|
|
@ -68,7 +68,7 @@ DebugMart_BuyMenuHeader:
|
|||
ld a, [wScrollingMenuCursorPosition]
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, wcc40
|
||||
ld hl, wcc3a
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
|
|
@ -122,7 +122,7 @@ DebugMart_Buy:
|
|||
ld [wItemQuantityBuffer], a
|
||||
ld hl, .HowManyText
|
||||
call PrintText
|
||||
callab asm_24c64
|
||||
callfar asm_24c64
|
||||
call ExitMenu
|
||||
jr c, .done
|
||||
predef LoadItemData
|
||||
|
|
@ -172,14 +172,14 @@ DebugMart_Sell:
|
|||
ret
|
||||
|
||||
; unused
|
||||
callab CheckItemsQuantity
|
||||
callfar CheckItemsQuantity
|
||||
jp c, .no_items
|
||||
call LoadStandardMenuHeader
|
||||
xor a
|
||||
ld [wActiveBackpackPocket], a
|
||||
.bag_loop
|
||||
callab DrawBackpack
|
||||
callab DebugBackpackLoop
|
||||
callfar DrawBackpack
|
||||
callfar DebugBackpackLoop
|
||||
jr c, .close_bag
|
||||
call .DoBagFunctions
|
||||
jr nc, .bag_loop
|
||||
|
|
@ -191,8 +191,8 @@ DebugMart_Sell:
|
|||
ret
|
||||
|
||||
.DoBagFunctions:
|
||||
callab CheckItemMenu
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
callfar CheckItemMenu
|
||||
ld a, [wItemAttributeValue]
|
||||
ld hl, .BagJumptable
|
||||
call CallJumptable
|
||||
ret
|
||||
|
|
@ -207,7 +207,7 @@ DebugMart_Sell:
|
|||
dw .CheckSellableItem
|
||||
|
||||
.FlipPocket:
|
||||
callab FlipPocket2Status
|
||||
callfar FlipPocket2Status
|
||||
xor a
|
||||
ld [wSelectedSwapPosition], a
|
||||
ret
|
||||
|
|
@ -223,14 +223,14 @@ DebugMart_Sell:
|
|||
prompt
|
||||
|
||||
.BallPocket:
|
||||
callab BallPocket
|
||||
callfar BallPocket
|
||||
jr nc, .CheckSellableItem
|
||||
and a
|
||||
ret
|
||||
|
||||
.CheckSellableItem:
|
||||
callab _CheckTossableItem
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
callfar _CheckTossableItem
|
||||
ld a, [wItemAttributeValue]
|
||||
and a
|
||||
jr nz, .not_sellable
|
||||
jp .ItemQuantityPrompt
|
||||
|
|
@ -260,7 +260,7 @@ DebugMart_Sell:
|
|||
.ItemQuantityPrompt:
|
||||
ld hl, .HowManyItemsText
|
||||
call PrintText
|
||||
callab asm_24c64
|
||||
callfar asm_24c64
|
||||
jr c, .got_quantity
|
||||
jr .CannotSellItem
|
||||
|
||||
|
|
@ -280,7 +280,7 @@ DebugMart_LoadItems:
|
|||
ld [hli], a
|
||||
cp -1
|
||||
jr nz, .load_loop
|
||||
ld hl, wcc40
|
||||
ld hl, wcc3a
|
||||
ld de, wcd60 + 1
|
||||
.load_loop2
|
||||
ld a, [de]
|
||||
|
|
@ -298,7 +298,7 @@ DebugMart_LoadItems:
|
|||
.GetPrice:
|
||||
push hl
|
||||
ld [wCurItem], a
|
||||
callab GetItemPrice
|
||||
callfar GetItemPrice
|
||||
ld a, d
|
||||
ld [wcdc3], a
|
||||
ld a, e
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ FieldDebug_SpriteViewer:
|
|||
ld [wSpriteViewerMenuStartingItem], a
|
||||
ld a, 1
|
||||
ldh [hTextBoxCursorBlinkInterval], a
|
||||
callab Function77ad
|
||||
callfar Function77ad
|
||||
ret nc
|
||||
ldh a, [hEventID]
|
||||
call GetObjectStruct
|
||||
|
|
@ -110,8 +110,8 @@ FieldDebug_SpriteViewer:
|
|||
ret
|
||||
|
||||
.SetFollowing:
|
||||
ld hl, Function8031
|
||||
ld a, BANK(Function8031)
|
||||
ld hl, SpawnFollower
|
||||
ld a, BANK(SpawnFollower)
|
||||
call QueueScript
|
||||
|
||||
; Exits immediately after setting sprite to follow the player
|
||||
|
|
@ -259,7 +259,7 @@ FieldDebug_SpriteViewer:
|
|||
call PlaceString
|
||||
call .SetStartingPoint
|
||||
ld c, a
|
||||
callab Function14144
|
||||
callfar Function14144
|
||||
ld hl, vSprites + $c0
|
||||
ld de, vFont
|
||||
ld bc, 12
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ FieldDebug_Teleport:
|
|||
ld d, a
|
||||
ld a, [wMapId]
|
||||
ld e, a
|
||||
callab IsSpawnPoint
|
||||
callfar IsSpawnPoint
|
||||
jr nc, .not_spawn_point
|
||||
ld a, [wMapGroup]
|
||||
ld [wLastSpawnMapGroup], a
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ FieldDebug_Toolgear:
|
|||
jr .UpdateDayNightCycle
|
||||
|
||||
.ChangeRTC:
|
||||
callab SetTime
|
||||
callfar SetTime
|
||||
|
||||
.UpdateDayNightCycle:
|
||||
callab Function8c325
|
||||
callfar Function8c325
|
||||
call UpdateTimePals
|
||||
ld a, FIELDDEBUG_RETURN_CLOSE
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -75,9 +75,9 @@ ENDM
|
|||
|
||||
Functionfd91e: ; unused?
|
||||
call .asm_fd930
|
||||
ld a, [wCountSetBitsResult]
|
||||
ld [wMonDexIndex], a
|
||||
callab Pokepic
|
||||
ld a, [wNumSetBits]
|
||||
ld [wCurPartySpecies], a
|
||||
callfar Pokepic
|
||||
ret
|
||||
|
||||
.asm_fd930
|
||||
|
|
@ -85,6 +85,6 @@ Functionfd91e: ; unused?
|
|||
cp 251
|
||||
jr nc, .asm_fd930
|
||||
inc a
|
||||
ld [wCountSetBitsResult], a
|
||||
ld [wNumSetBits], a
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ FieldDebug_DoVRAMViewer:
|
|||
call .LoadTilesetsCommon
|
||||
call DisableLCD
|
||||
call LoadFont
|
||||
callab LoadBackpackGraphics
|
||||
callfar LoadBackpackGraphics
|
||||
call EnableLCD
|
||||
ret
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ FieldDebug_DoVRAMViewer:
|
|||
call DisableLCD
|
||||
call LoadFontsBattleExtra
|
||||
call LoadFont
|
||||
callab LoadPokemonStatsGraphics
|
||||
callfar LoadPokemonStatsGraphics
|
||||
xor a
|
||||
ldh [hMapAnims], a
|
||||
call EnableLCD
|
||||
|
|
@ -151,7 +151,7 @@ FieldDebug_DoVRAMViewer:
|
|||
ld bc, $180 tiles
|
||||
call ByteFill
|
||||
call LoadFont
|
||||
callab Call_LoadBattleGraphics
|
||||
callfar Call_LoadBattleGraphics
|
||||
xor a
|
||||
ldh [hMapAnims], a
|
||||
call EnableLCD
|
||||
|
|
@ -159,15 +159,15 @@ FieldDebug_DoVRAMViewer:
|
|||
call .LoadPokemon
|
||||
ld de, $9310
|
||||
ld a, 3
|
||||
ld [wcdd8], a
|
||||
ld [wTempBattleMonSpecies], a
|
||||
predef Function3f04a
|
||||
ret
|
||||
|
||||
.LoadPokemon:
|
||||
ld a, 3
|
||||
ld [wce37], a
|
||||
ld [wMonDexIndex], a
|
||||
call GetMonHeader
|
||||
ld [wCurPartySpecies], a
|
||||
call GetBaseData
|
||||
call LoadMonFrontSprite
|
||||
ret
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ FieldDebug_DoVRAMViewer:
|
|||
call LoadTilesetGFX
|
||||
ld a, 1
|
||||
ldh [hMapAnims], a
|
||||
callab LoadUsedSpritesGfx
|
||||
callfar LoadUsedSpritesGfx
|
||||
call LoadFontExtra
|
||||
call EnableLCD
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ FieldDebug_Reset:
|
|||
ret
|
||||
|
||||
FieldDebug_ShowTrainerCard: ; unreferenced?
|
||||
callab _TrainerCard
|
||||
callfar _TrainerCard
|
||||
ld a, FIELDDEBUG_RETURN_REOPEN
|
||||
ret
|
||||
|
||||
|
|
@ -185,7 +185,7 @@ INCLUDE "engine/debug/field/change_tileset.inc"
|
|||
FieldDebug_TownMap:
|
||||
call LoadStandardMenuHeader
|
||||
call ClearSprites
|
||||
callab FlyMap
|
||||
callfar FlyMap
|
||||
call ClearPalettes
|
||||
call Function3657
|
||||
call LoadFontExtra
|
||||
|
|
@ -201,7 +201,7 @@ FieldDebug_NamePlayer:
|
|||
call LoadStandardMenuHeader
|
||||
ld de, wPlayerName
|
||||
ld b, 1
|
||||
callab NamingScreen
|
||||
callfar NamingScreen
|
||||
call ClearBGPalettes
|
||||
call ClearTileMap
|
||||
call CloseWindow
|
||||
|
|
@ -229,7 +229,7 @@ FieldDebug_HealPokemon:
|
|||
prompt
|
||||
|
||||
FieldDebug_CableClub:
|
||||
callab Function29abf
|
||||
callfar Function29abf
|
||||
ld a, FIELDDEBUG_RETURN_REOPEN
|
||||
ret
|
||||
|
||||
|
|
@ -256,9 +256,9 @@ FieldDebug_TrainerGear:
|
|||
|
||||
.OpenTrainerGear:
|
||||
call LoadStandardMenuHeader
|
||||
callab OpenTrainerGear
|
||||
callfar OpenTrainerGear
|
||||
call ClearPalettes
|
||||
callab StartMenuLoadSprites
|
||||
callfar StartMenuLoadSprites
|
||||
call CloseWindow
|
||||
ret
|
||||
|
||||
|
|
@ -267,7 +267,7 @@ INCLUDE "engine/debug/field/map_viewer.inc"
|
|||
INCLUDE "engine/debug/field/item_test.inc"
|
||||
|
||||
FieldDebug_PCMenu:
|
||||
callab PokemonCenterPC
|
||||
callfar PokemonCenterPC
|
||||
ld a, FIELDDEBUG_RETURN_REOPEN
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -3020,7 +3020,7 @@ LoadFonts_NoOAMUpdate:
|
|||
|
||||
Function6445:
|
||||
call BackUpTilesToBuffer
|
||||
ld a, [wWhichPokemon]
|
||||
ld a, [wCurPartyMon]
|
||||
ld hl, wPartyMonNicknames
|
||||
call GetNick
|
||||
ld hl, wStringBuffer1
|
||||
|
|
@ -3029,8 +3029,8 @@ Function6445:
|
|||
call CopyBytes
|
||||
.sub_645d
|
||||
ld hl, wPartyMon1Moves
|
||||
ld bc, $0030
|
||||
ld a, [wWhichPokemon]
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
ld a, [wCurPartyMon]
|
||||
call AddNTimes
|
||||
ld d, h
|
||||
ld e, l
|
||||
|
|
@ -3043,7 +3043,7 @@ Function6445:
|
|||
dec b
|
||||
jr nz, .sub_646d
|
||||
push de
|
||||
call .sub_64f4
|
||||
call ForgetMove
|
||||
pop de
|
||||
jp c, .sub_64d6
|
||||
push hl
|
||||
|
|
@ -3073,19 +3073,19 @@ Function6445:
|
|||
ld a, [wBattleMode]
|
||||
and a
|
||||
jp z, .sub_64eb
|
||||
ld a, [wWhichPokemon]
|
||||
ld a, [wCurPartyMon]
|
||||
ld b, a
|
||||
ld a, [wcd41]
|
||||
ld a, [wCurBattleMon]
|
||||
cp b
|
||||
jp nz, .sub_64eb
|
||||
ld h, d
|
||||
ld l, e
|
||||
ld de, wca04
|
||||
ld de, wBattleMonMoves
|
||||
ld bc, $0004
|
||||
call CopyBytes
|
||||
ld bc, $0011
|
||||
add hl, bc
|
||||
ld de, wca0a
|
||||
ld de, wBattleMonPP
|
||||
ld bc, $0004
|
||||
call CopyBytes
|
||||
jp .sub_64eb
|
||||
|
|
@ -3103,38 +3103,38 @@ Function6445:
|
|||
call PrintText
|
||||
ld b, $01
|
||||
ret
|
||||
.sub_64f4
|
||||
|
||||
ForgetMove::
|
||||
push hl
|
||||
ld hl, Text65f0
|
||||
ld hl, AskForgetMoveText
|
||||
call PrintText
|
||||
call YesNoBox
|
||||
pop hl
|
||||
ret c
|
||||
ld bc, $fffc
|
||||
ld bc, -NUM_MOVES
|
||||
add hl, bc
|
||||
push hl
|
||||
ld de, wce2e
|
||||
ld bc, $0004
|
||||
ld de, wListMoves_MoveIndicesBuffer
|
||||
ld bc, NUM_MOVES
|
||||
call CopyBytes
|
||||
pop hl
|
||||
.sub_650f
|
||||
push hl
|
||||
ld hl, Text65a8
|
||||
ld hl, MoveAskForgetText
|
||||
call PrintText
|
||||
coord hl, 10, 8
|
||||
ld b, $08
|
||||
ld c, $08
|
||||
call DrawTextBox
|
||||
coord hl, 12, 10
|
||||
ld a, $28
|
||||
ld [wFieldMoveScriptID], a
|
||||
ld a, $32
|
||||
call Predef
|
||||
ld a, SCREEN_WIDTH*2
|
||||
ld [wListMovesLineSpacing], a
|
||||
predef ListMoves
|
||||
ld a, $0a
|
||||
ld [w2DMenuCursorInitY], a
|
||||
ld a, $0b
|
||||
ld [w2DMenuCursorInitX], a
|
||||
ld a, [wcd57]
|
||||
ld a, [wNumMoves]
|
||||
inc a
|
||||
ld [w2DMenuNumRows], a
|
||||
ld a, $01
|
||||
|
|
@ -3199,7 +3199,7 @@ Text65a5:
|
|||
text_waitbutton
|
||||
text_end
|
||||
|
||||
Text65a8:
|
||||
MoveAskForgetText:
|
||||
text "どの わざを"
|
||||
next "わすれさせたい?"
|
||||
done
|
||||
|
|
@ -3225,26 +3225,20 @@ Text65de:
|
|||
line "おぼえずに おわった!"
|
||||
prompt
|
||||
|
||||
Text65f0:
|
||||
AskForgetMoveText:
|
||||
text_from_ram wcd11
|
||||
text "は あたらしく"
|
||||
line ""
|
||||
text_end
|
||||
|
||||
Text65fd:
|
||||
text_from_ram wStringBuffer2
|
||||
text "を おぼえたい<⋯⋯>!"
|
||||
para "しかし "
|
||||
text_end
|
||||
|
||||
Text6610:
|
||||
text_from_ram wcd11
|
||||
text "は わざを 4つ"
|
||||
line "おぼえるので せいいっぱいだ!"
|
||||
para ""
|
||||
text_end
|
||||
|
||||
Text662e:
|
||||
text_from_ram wStringBuffer2
|
||||
text "の かわりに"
|
||||
line "ほかの わざを わすれさせますか?"
|
||||
|
|
@ -3359,7 +3353,7 @@ Function6713:
|
|||
ld b, $04
|
||||
ld c, $0a
|
||||
call z, ClearBox
|
||||
ld a, [wMonDexIndex]
|
||||
ld a, [wCurPartySpecies]
|
||||
ld [wce37], a
|
||||
call GetPokemonName
|
||||
ld a, [wDebugFlags]
|
||||
|
|
@ -3390,9 +3384,7 @@ Function6713:
|
|||
call Function3657
|
||||
jr .sub_6773
|
||||
.sub_676b
|
||||
ld hl, Function3e3a7
|
||||
ld a, BANK(Function3e3a7)
|
||||
call FarCall_hl
|
||||
callfar Function3e3a7
|
||||
.sub_6773
|
||||
pop hl
|
||||
ld a, [hl]
|
||||
|
|
@ -3430,7 +3422,7 @@ Function679d:
|
|||
jr z, .sub_67d3
|
||||
ld hl, wPartyMonNicknames
|
||||
ld bc, $0006
|
||||
ld a, [wWhichPokemon]
|
||||
ld a, [wCurPartyMon]
|
||||
call AddNTimes
|
||||
ld e, l
|
||||
ld d, h
|
||||
|
|
@ -3741,7 +3733,7 @@ Function78f0:
|
|||
ld a, [hl]
|
||||
xor $08
|
||||
ld [hl], a
|
||||
callab UpdateSGBBorder
|
||||
callfar UpdateSGBBorder
|
||||
call LoadFont
|
||||
call LoadFontExtra
|
||||
ld c, $70
|
||||
|
|
|
|||
|
|
@ -22,18 +22,18 @@ PlayerObjectTemplate:
|
|||
object_event -4, -4, SPRITE_GOLD, $10, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
db $00, $00
|
||||
|
||||
Function8031:
|
||||
call SpawnFollower
|
||||
SpawnFollower:
|
||||
call SetFollowerDefaultAttributes
|
||||
ld a, [wUsedSprites+1]
|
||||
ld [wMap1ObjectSprite], a
|
||||
ld a, $01
|
||||
ld a, FOLLOWER
|
||||
call Function1602
|
||||
ld b, PLAYER
|
||||
ld c, FOLLOWER
|
||||
call StartFollow
|
||||
ret
|
||||
|
||||
SpawnFollower:
|
||||
SetFollowerDefaultAttributes:
|
||||
ld a, FOLLOWER
|
||||
ld hl, FollowerObjectTemplate
|
||||
call CopyPlayerObjectTemplate
|
||||
|
|
@ -48,16 +48,16 @@ FollowerObjectTemplate:
|
|||
object_event -4, -4, SPRITE_RHYDON, $18, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
db $00, $00
|
||||
|
||||
Function806c:
|
||||
ld a, $01
|
||||
call Function169f
|
||||
DeleteFollower:
|
||||
ld a, FOLLOWER
|
||||
call DeleteMapObject
|
||||
xor a
|
||||
ld [wObjectFollow_Follower], a
|
||||
ld a, $ff
|
||||
ld [wObjectFollow_Leader], a
|
||||
ret
|
||||
|
||||
Function807b:
|
||||
DebugMapViewer_SetupCursor:
|
||||
ld a, $01
|
||||
ld hl, Data8089
|
||||
call CopyPlayerObjectTemplate
|
||||
|
|
@ -183,7 +183,7 @@ Function8125:
|
|||
ret
|
||||
|
||||
Function8131:
|
||||
ldh a, [hConnectionStripLength]
|
||||
ldh a, [hMapObjectIndex]
|
||||
ld e, a
|
||||
ld d, $00
|
||||
ld hl, wUnknownWordcc9c
|
||||
|
|
@ -202,7 +202,7 @@ CopyMapObjectToObjectStruct:
|
|||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
ld hl, OBJECT_DIRECTION
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, de
|
||||
ld [hl], $00
|
||||
|
||||
|
|
@ -220,7 +220,7 @@ CopyMapObjectToObjectStruct:
|
|||
sub [hl]
|
||||
and $f
|
||||
swap a
|
||||
ld hl, OBJECT_SPRITE_X_OFFSET
|
||||
ld hl, OBJECT_SPRITE_Y
|
||||
add hl, de
|
||||
ld [hl], a
|
||||
|
||||
|
|
@ -238,7 +238,7 @@ CopyMapObjectToObjectStruct:
|
|||
sub [hl]
|
||||
and $f
|
||||
swap a
|
||||
ld hl, OBJECT_SPRITE_Y
|
||||
ld hl, OBJECT_SPRITE_X
|
||||
add hl, de
|
||||
ld [hl], a
|
||||
|
||||
|
|
@ -255,11 +255,11 @@ CopyMapObjectToObjectStruct:
|
|||
add hl, de
|
||||
ld [hl], -1
|
||||
|
||||
ld hl, OBJECT_STEP_DURATION
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, de
|
||||
ld [hl], 0
|
||||
|
||||
ld hl, OBJECT_WALKING
|
||||
ld hl, OBJECT_DIRECTION
|
||||
add hl, de
|
||||
ld [hl], 0
|
||||
|
||||
|
|
@ -278,7 +278,7 @@ CopyMapObjectToObjectStruct:
|
|||
ld hl, MAPOBJECT_RADIUS
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
call Function81f8
|
||||
call CopyMapObject_Radius
|
||||
|
||||
ld hl, MAPOBJECT_SCRIPT_POINTER + 1
|
||||
add hl, bc
|
||||
|
|
@ -317,18 +317,18 @@ InitObjectFlags:
|
|||
set 4, [hl]
|
||||
ret
|
||||
|
||||
Function81f8:
|
||||
CopyMapObject_Radius:
|
||||
push af
|
||||
swap a
|
||||
and $0f
|
||||
inc a
|
||||
ld hl, OBJECT_RADIUS
|
||||
ld hl, OBJECT_RADIUS_X
|
||||
add hl, de
|
||||
ld [hl], a
|
||||
pop af
|
||||
and $0f
|
||||
inc a
|
||||
ld hl, OBJECT_SPRITE_X
|
||||
ld hl, OBJECT_RADIUS_Y
|
||||
add hl, de
|
||||
ld [hl], a
|
||||
ret
|
||||
|
|
@ -961,9 +961,9 @@ FlyMap:
|
|||
.sub_86fc
|
||||
call DelayFrame
|
||||
call GetJoypadDebounced
|
||||
ld hl, EffectObjectJumpNoDelay
|
||||
ld a, BANK(EffectObjectJumpNoDelay)
|
||||
call FarCall_hl
|
||||
|
||||
callfar EffectObjectJumpNoDelay
|
||||
|
||||
ld hl, hJoyDown
|
||||
ld a, [hl]
|
||||
and $02
|
||||
|
|
@ -972,11 +972,11 @@ FlyMap:
|
|||
and $01
|
||||
jr nz, .sub_8743
|
||||
call Function8747
|
||||
ld hl, Functionc77d
|
||||
ld a, BANK(Functionc77d)
|
||||
call FarCall_hl
|
||||
|
||||
callfar GetFlyPointMapLocation
|
||||
|
||||
ld d, $00
|
||||
ld hl, Data8a53
|
||||
ld hl, LandmarkPositions
|
||||
add hl, de
|
||||
add hl, de
|
||||
ld d, [hl]
|
||||
|
|
@ -1001,29 +1001,29 @@ FlyMap:
|
|||
ldh [hJoyDebounceSrc], a
|
||||
ret
|
||||
|
||||
Function8747:
|
||||
Function8747: ; Choose fly destination based on D-Pad input
|
||||
ld a, [wFlyDestination]
|
||||
ld l, a
|
||||
ld h, $00
|
||||
add hl, hl
|
||||
add hl, hl
|
||||
ld de, Data8a17
|
||||
ld de, FlyPointPaths
|
||||
add hl, de
|
||||
ld de, hJoySum
|
||||
ld a, [de]
|
||||
and $40
|
||||
and D_UP
|
||||
jr nz, .sub_876e
|
||||
inc hl
|
||||
ld a, [de]
|
||||
and $80
|
||||
and D_DOWN
|
||||
jr nz, .sub_876e
|
||||
inc hl
|
||||
ld a, [de]
|
||||
and $20
|
||||
and D_LEFT
|
||||
jr nz, .sub_876e
|
||||
inc hl
|
||||
ld a, [de]
|
||||
and $10
|
||||
and D_RIGHT
|
||||
jr nz, .sub_876e
|
||||
ret
|
||||
.sub_876e
|
||||
|
|
@ -1095,7 +1095,7 @@ Function87ea:
|
|||
push hl
|
||||
ld e, a
|
||||
ld d, $00
|
||||
ld hl, Data8a53
|
||||
ld hl, LandmarkPositions
|
||||
add hl, de
|
||||
add hl, de
|
||||
ld e, l
|
||||
|
|
@ -1167,7 +1167,7 @@ PlaceGoldInMap:
|
|||
ld hl, vChars0
|
||||
lb bc, BANK(GoldSpriteGFX), $04
|
||||
call Request2bpp
|
||||
ld de, GoldSpriteGFX + $c0
|
||||
ld de, GoldSpriteGFX + LEN_2BPP_TILE * 12 ; Gold's front-facing walking sprite
|
||||
ld hl, vChars0 + $40
|
||||
lb bc, BANK(GoldSpriteGFX), $04
|
||||
call Request2bpp
|
||||
|
|
@ -1185,7 +1185,7 @@ PlaceGoldInMap:
|
|||
call GetWorldMapLocation
|
||||
ld e, a
|
||||
ld d, $00
|
||||
ld hl, Data8a53
|
||||
ld hl, LandmarkPositions
|
||||
add hl, de
|
||||
add hl, de
|
||||
ld d, [hl]
|
||||
|
|
@ -1219,57 +1219,3 @@ Function88b3:
|
|||
|
||||
TownMapTilemap:
|
||||
INCBIN "gfx/trainer_gear/town_map.tilemap.rle"
|
||||
|
||||
SECTION "engine/dumps/bank02.asm@Data8a17", ROMX
|
||||
|
||||
Data8a17:
|
||||
db $0b
|
||||
db $ff
|
||||
|
||||
db $01, $0a, $03, $00, $02, $00, $05, $01, $03, $01, $04, $02, $0d, $02
|
||||
db $0d, $03, $0d, $05, $04, $02, $04, $06, $07
|
||||
db $ff
|
||||
|
||||
db $05, $08
|
||||
db $ff
|
||||
|
||||
db $06
|
||||
db $ff
|
||||
|
||||
db $ff
|
||||
|
||||
db $0e, $09, $06, $0e, $08, $0a, $0a
|
||||
db $08, $09, $00, $00, $09, $0c, $00
|
||||
db $ff
|
||||
|
||||
db $ff
|
||||
|
||||
db $ff
|
||||
|
||||
db $0b
|
||||
db $ff
|
||||
|
||||
db $ff
|
||||
|
||||
db $04, $03
|
||||
db $ff
|
||||
|
||||
db $04
|
||||
db $ff
|
||||
|
||||
db $08, $08
|
||||
db $ff
|
||||
|
||||
Data8a53:
|
||||
db $00, $00, $1c, $9c, $28, $9c, $34, $9c
|
||||
db $40, $9c, $4c, $9c, $5c, $9c, $6c, $94
|
||||
db $6c, $84, $6c, $78, $6c, $6c, $64, $6c
|
||||
db $5c, $6c, $6c, $64, $6c, $5c, $5c, $5c
|
||||
db $5c, $50, $5c, $44, $50, $44, $44, $44
|
||||
db $44, $5c, $44, $6c, $4c, $74, $4c, $7c
|
||||
db $40, $7c, $34, $7c, $4c, $84, $3c, $8c
|
||||
db $34, $94, $5c, $80, $54, $68, $3c, $38
|
||||
db $3c, $2c, $34, $2c, $2c, $20, $34, $14
|
||||
db $3c, $14, $3c, $20, $48, $14, $54, $1c
|
||||
db $54, $2c, $54, $38, $3c, $44, $48, $2c
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -344,7 +344,7 @@ UpdateItemDescription::
|
|||
ld c, $12
|
||||
call DrawTextBox
|
||||
decoord 1, 14
|
||||
callab ShowItemDescription
|
||||
callfar ShowItemDescription
|
||||
ret
|
||||
|
||||
Pokepic:
|
||||
|
|
@ -358,9 +358,9 @@ Pokepic:
|
|||
call GetSGBLayout
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
ld a, [wMonDexIndex]
|
||||
ld a, [wCurPartySpecies]
|
||||
ld [wCurSpecies], a
|
||||
call GetMonHeader
|
||||
call GetBaseData
|
||||
ld de, vFont
|
||||
call LoadMonFrontSprite
|
||||
ld a, [wMenuBorderTopCoord]
|
||||
|
|
@ -551,7 +551,7 @@ asm_2438a:
|
|||
ld a, [wMenuDataItems]
|
||||
add [hl]
|
||||
ld b, a
|
||||
ld a, [wcdbc]
|
||||
ld a, [wScrollingMenuListSize]
|
||||
cp b
|
||||
jp c, ClearAccumulator
|
||||
inc [hl]
|
||||
|
|
@ -585,13 +585,13 @@ asm_243c3:
|
|||
ld l, a
|
||||
ld a, [wMenuDataDisplayFunctionPointer]
|
||||
call GetFarByte
|
||||
ld [wcdbc], a
|
||||
ld [wScrollingMenuListSize], a
|
||||
ld a, [wMenuScrollPosition]
|
||||
ld c, a
|
||||
ld a, [wMenuCursorBuffer]
|
||||
add c
|
||||
ld b, a
|
||||
ld a, [wcdbc]
|
||||
ld a, [wScrollingMenuListSize]
|
||||
inc a
|
||||
cp b
|
||||
jr c, .asm_243f2
|
||||
|
|
@ -600,7 +600,7 @@ asm_243c3:
|
|||
ld a, [wMenuDataItems]
|
||||
add c
|
||||
ld b, a
|
||||
ld a, [wcdbc]
|
||||
ld a, [wScrollingMenuListSize]
|
||||
inc a
|
||||
cp b
|
||||
jr nc, .asm_243fb
|
||||
|
|
@ -615,7 +615,7 @@ asm_243c3:
|
|||
asm_243fc:
|
||||
ld a, [wMenuDataHeaderEnd]
|
||||
ld c, a
|
||||
ld a, [wcdbc]
|
||||
ld a, [wScrollingMenuListSize]
|
||||
ld b, a
|
||||
ld a, [wMenuBorderTopCoord]
|
||||
add $01
|
||||
|
|
@ -849,7 +849,7 @@ asm_24576:
|
|||
ret
|
||||
|
||||
asm_24590:
|
||||
ld a, [wcdbc]
|
||||
ld a, [wScrollingMenuListSize]
|
||||
ld d, a
|
||||
ld a, e
|
||||
cp d
|
||||
|
|
@ -868,7 +868,7 @@ asm_2459b:
|
|||
push bc
|
||||
push hl
|
||||
ld c, d
|
||||
callab GetBallByIndex
|
||||
callfar GetBallByIndex
|
||||
ld d, c
|
||||
pop hl
|
||||
pop bc
|
||||
|
|
@ -1125,8 +1125,8 @@ Function2473b::
|
|||
cp $ff
|
||||
jr z, .asm_24762
|
||||
push de
|
||||
callab CheckItemMenu
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
callfar CheckItemMenu
|
||||
ld a, [wItemAttributeValue]
|
||||
ld e, a
|
||||
ld d, $00
|
||||
ld hl, .data_2475b
|
||||
|
|
@ -1163,8 +1163,8 @@ PlaceMenuItemQuantity::
|
|||
push de
|
||||
ld a, [wMenuSelection]
|
||||
ld [wCurItem], a
|
||||
callab _CheckTossableItem
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
callfar _CheckTossableItem
|
||||
ld a, [wItemAttributeValue]
|
||||
pop hl
|
||||
and a
|
||||
jr nz, .done
|
||||
|
|
@ -1177,9 +1177,9 @@ PlaceMenuItemQuantity::
|
|||
ret
|
||||
|
||||
asm_247a6:
|
||||
ld hl, wPartyMonOTEnd
|
||||
ld hl, wPartyMonNicknames
|
||||
jr .asm_247ae
|
||||
ld hl, wdf17
|
||||
ld hl, wBoxMonNicknames
|
||||
.asm_247ae
|
||||
push de
|
||||
ld a, [wScrollingMenuCursorPosition]
|
||||
|
|
@ -1197,8 +1197,8 @@ asm_247ba:
|
|||
.asm_247c6
|
||||
push de
|
||||
ld a, [wScrollingMenuCursorPosition]
|
||||
ld [wWhichPokemon], a
|
||||
predef Function50000
|
||||
ld [wCurPartyMon], a
|
||||
predef CopyMonToTempMon
|
||||
pop hl
|
||||
call PrintLevel
|
||||
ret
|
||||
|
|
@ -1222,7 +1222,7 @@ asm_247d8:
|
|||
add hl, de
|
||||
push hl
|
||||
ld a, [wScrollingMenuCursorPosition]
|
||||
ld hl, wdf17
|
||||
ld hl, wBoxMonNicknames
|
||||
call GetNick
|
||||
pop hl
|
||||
call PlaceString
|
||||
|
|
@ -1230,11 +1230,10 @@ asm_247d8:
|
|||
add hl, de
|
||||
push hl
|
||||
ld a, [wScrollingMenuCursorPosition]
|
||||
ld [wWhichPokemon], a
|
||||
ld [wCurPartyMon], a
|
||||
ld a, $02
|
||||
ld [wMonType], a
|
||||
ld a, $31
|
||||
call Predef
|
||||
predef CopyMonToTempMon
|
||||
pop hl
|
||||
push hl
|
||||
call PrintLevel
|
||||
|
|
@ -1242,7 +1241,7 @@ asm_247d8:
|
|||
ld de, 3
|
||||
add hl, de
|
||||
push hl
|
||||
callab Function5069e
|
||||
callfar GetGender
|
||||
ld a, $ef
|
||||
jr c, .asm_2482e
|
||||
ld a, $f5
|
||||
|
|
@ -1257,9 +1256,9 @@ asm_4831:
|
|||
call MenuBox
|
||||
call PlaceVerticalMenuItems
|
||||
call MenuBoxCoord2Tile
|
||||
ld de, $0015
|
||||
ld de, SCREEN_WIDTH + 1
|
||||
add hl, de
|
||||
ld de, wd15d
|
||||
ld de, wMoney
|
||||
ld bc, $4306
|
||||
call PrintNumber
|
||||
ret
|
||||
|
|
@ -1288,9 +1287,9 @@ asm_24868:
|
|||
asm_24872:
|
||||
call MenuBox
|
||||
call MenuBoxCoord2Tile
|
||||
ld de, $0015
|
||||
ld de, SCREEN_WIDTH + 1
|
||||
add hl, de
|
||||
ld de, wd15d
|
||||
ld de, wMoney
|
||||
ld bc, $4306
|
||||
call PrintNumber
|
||||
ld [hl], $f0
|
||||
|
|
@ -1302,99 +1301,115 @@ MenuHeader24888:
|
|||
dw 0
|
||||
db 1
|
||||
|
||||
asm_24890:
|
||||
ld hl, .MenuHeader2489a
|
||||
UnreferencedMenu_24890:
|
||||
; An unreferenced, nonfunctional menu that resembles the field debug menu.
|
||||
ld hl, .MenuData
|
||||
call LoadMenuHeader
|
||||
call VerticalMenu
|
||||
ret
|
||||
|
||||
.MenuHeader2489a:
|
||||
.MenuData:
|
||||
db MENU_BACKUP_TILES
|
||||
menu_coords 0, 0, 6, 10
|
||||
dw .text_248a2
|
||||
dw .MenuText
|
||||
db 1
|
||||
|
||||
.text_248a2:
|
||||
db "たエ゛うる@"
|
||||
db "かう@"
|
||||
db "やめる@"
|
||||
db "くさかり@"
|
||||
db "とんでけ@"
|
||||
db "どんぶらこ@"
|
||||
db "フルパワー@"
|
||||
db "ひかりゴケ@"
|
||||
db "うずしお@"
|
||||
db "とびはねる@"
|
||||
db "あなをほる@"
|
||||
db "テレポート@"
|
||||
db "タマゴうみ@"
|
||||
.MenuText:
|
||||
db (STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING)
|
||||
db 3 ; amount of options
|
||||
db "うる@" ; Switch
|
||||
db "かう@" ; Buy
|
||||
db "やめる@" ; Cancel
|
||||
db "くさかり@" ; "Mower"? (replaced by Uproot)
|
||||
db "とんでけ@" ; "Flight"? (replaced by Wind Ride)
|
||||
db "どんぶらこ@" ; "Splash"? (replaced by Water Sport)
|
||||
db "フルパワー@" ; "Full Power" (replaced by Strong Arm)
|
||||
db "ひかりゴケ@" ; Bright Moss
|
||||
db "うずしお@" ; Whirlpool
|
||||
db "とびはねる@" ; Bounce
|
||||
db "あなをほる@" ; Dig
|
||||
db "テレポート@" ; Teleport
|
||||
db "タマゴうみ@" ; Softboiled
|
||||
|
||||
Text248e7:
|
||||
db "つよさをみる@"
|
||||
db "ならびかえ@"
|
||||
db "そうび@"
|
||||
db "キャンセル@"
|
||||
db "もちわざ@"
|
||||
db "メール@"
|
||||
db "エラー!@"
|
||||
; MonMenuOptionStrings indexes
|
||||
const_def 1
|
||||
const MONMENUVALUE_STATS ; 1
|
||||
const MONMENUVALUE_SWITCH ; 2
|
||||
const MONMENUVALUE_ITEM ; 3
|
||||
const MONMENUVALUE_CANCEL ; 4
|
||||
const MONMENUVALUE_MOVE ; 5
|
||||
const MONMENUVALUE_MAIL ; 6
|
||||
const MONMENUVALUE_ERROR ; 7
|
||||
DEF NUM_MONMENUVALUES EQU const_value - 1
|
||||
|
||||
Data2490c:
|
||||
db $f5, $01
|
||||
db $f6, $02
|
||||
db $f7, $03
|
||||
db $f8, $04
|
||||
db $f9, $05
|
||||
db $fa, $06
|
||||
db $fb, $07
|
||||
db $5b, $08
|
||||
db $64, $09
|
||||
db $87, $0a
|
||||
db $ff
|
||||
MonMenuOptionStrings:
|
||||
db "つよさをみる@" ; Stats
|
||||
db "ならびかえ@" ; Switch
|
||||
db "そうび@" ; Item
|
||||
db "キャンセル@" ; Cancel
|
||||
db "もちわざ@" ; Moves
|
||||
db "メール@" ; Mail
|
||||
db "エラー!@" ; Error!
|
||||
|
||||
Data24921:
|
||||
db $01, $01, $f5
|
||||
db $01, $02, $f6
|
||||
db $01, $03, $f7
|
||||
db $01, $04, $f8
|
||||
db $01, $05, $f9
|
||||
db $01, $06, $fa
|
||||
db $01, $07, $fb
|
||||
db $01, $08, $5b
|
||||
db $01, $09, $64
|
||||
db $01, $0a, $87
|
||||
db $00, $0b, $01
|
||||
db $00, $0c, $02
|
||||
db $00, $0d, $03
|
||||
db $00, $0e, $04
|
||||
db $00, $0f, $05
|
||||
db $00, $10, $06
|
||||
db $00, $11, $07
|
||||
db $ff
|
||||
Unreferenced_FieldMoveList:
|
||||
; Possibly how the
|
||||
db MOVE_UPROOT, MONMENUITEM_CUT
|
||||
db MOVE_WIND_RIDE, MONMENUITEM_FLY
|
||||
db MOVE_WATER_SPORT, MONMENUITEM_SURF
|
||||
db MOVE_STRONG_ARM, MONMENUITEM_STRENGTH
|
||||
db MOVE_BRIGHT_MOSS, MONMENUITEM_FLASH
|
||||
db MOVE_WHIRLPOOL, MONMENUITEM_WHIRLPOOL
|
||||
db MOVE_BOUNCE, MONMENUITEM_BOUNCE
|
||||
db MOVE_DIG, MONMENUITEM_DIG
|
||||
db MOVE_TELEPORT, MONMENUITEM_TELEPORT
|
||||
db MOVE_SOFTBOILED, MONMENUITEM_SOFTBOILED
|
||||
db -1
|
||||
|
||||
Function24955::
|
||||
MonMenuOptions:
|
||||
db MONMENU_FIELD_MOVE, MONMENUITEM_CUT, MOVE_UPROOT
|
||||
db MONMENU_FIELD_MOVE, MONMENUITEM_FLY, MOVE_WIND_RIDE
|
||||
db MONMENU_FIELD_MOVE, MONMENUITEM_SURF, MOVE_WATER_SPORT
|
||||
db MONMENU_FIELD_MOVE, MONMENUITEM_STRENGTH, MOVE_STRONG_ARM
|
||||
db MONMENU_FIELD_MOVE, MONMENUITEM_FLASH, MOVE_BRIGHT_MOSS
|
||||
db MONMENU_FIELD_MOVE, MONMENUITEM_WHIRLPOOL, MOVE_WHIRLPOOL
|
||||
db MONMENU_FIELD_MOVE, MONMENUITEM_BOUNCE, MOVE_BOUNCE
|
||||
db MONMENU_FIELD_MOVE, MONMENUITEM_DIG, MOVE_DIG
|
||||
db MONMENU_FIELD_MOVE, MONMENUITEM_TELEPORT, MOVE_TELEPORT
|
||||
db MONMENU_FIELD_MOVE, MONMENUITEM_SOFTBOILED, MOVE_SOFTBOILED
|
||||
db MONMENU_MENUOPTION, MONMENUITEM_STATS, MONMENUVALUE_STATS
|
||||
db MONMENU_MENUOPTION, MONMENUITEM_SWITCH, MONMENUVALUE_SWITCH
|
||||
db MONMENU_MENUOPTION, MONMENUITEM_ITEM, MONMENUVALUE_ITEM
|
||||
db MONMENU_MENUOPTION, MONMENUITEM_CANCEL, MONMENUVALUE_CANCEL
|
||||
db MONMENU_MENUOPTION, MONMENUITEM_MOVE, MONMENUVALUE_MOVE
|
||||
db MONMENU_MENUOPTION, MONMENUITEM_MAIL, MONMENUVALUE_MAIL
|
||||
db MONMENU_MENUOPTION, MONMENUITEM_ERROR, MONMENUVALUE_ERROR
|
||||
db -1
|
||||
|
||||
MonSubmenu::
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
call asm_24a0c
|
||||
callab Function_8f1cb
|
||||
ld hl, .MenuHeader2497d
|
||||
call GetMonSubmenuItems
|
||||
callfar FreezeMonIcons
|
||||
ld hl, .MenuHeader
|
||||
call LoadMenuHeader
|
||||
call asm_24985
|
||||
call asm_249c9
|
||||
call .GetTopCoord
|
||||
call PopulateMonMenu
|
||||
|
||||
ld a, 1
|
||||
ldh [hBGMapMode], a
|
||||
call asm_24997
|
||||
call MonMenuLoop
|
||||
ld [wMenuSelection], a
|
||||
call CloseWindow
|
||||
ret
|
||||
|
||||
.MenuHeader2497d:
|
||||
db $40
|
||||
menu_coords 11, 0, $13, $11
|
||||
.MenuHeader:
|
||||
db MENU_BACKUP_TILES ; flags
|
||||
menu_coords 11, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
|
||||
dw 0
|
||||
db 1
|
||||
db 1 ; default option
|
||||
|
||||
asm_24985:
|
||||
ld a, [wFieldMoveScriptID]
|
||||
.GetTopCoord:
|
||||
ld a, [wMonSubmenuCount]
|
||||
inc a
|
||||
add a
|
||||
ld b, a
|
||||
|
|
@ -1405,179 +1420,193 @@ asm_24985:
|
|||
call MenuBox
|
||||
ret
|
||||
|
||||
asm_24997:
|
||||
ld a, $a0
|
||||
ld [wMenuDataHeaderEnd], a
|
||||
ld a, [wFieldMoveScriptID]
|
||||
MonMenuLoop:
|
||||
ld a, (STATICMENU_CURSOR | STATICMENU_WRAP)
|
||||
ld [wMenuDataFlags], a
|
||||
ld a, [wMonSubmenuCount]
|
||||
ld [wMenuDataItems], a
|
||||
call InitVerticalMenuCursor
|
||||
|
||||
ld hl, w2DMenuFlags
|
||||
set 6, [hl]
|
||||
set _2DMENU_ENABLE_SPRITE_ANIMS_F, [hl]
|
||||
|
||||
call Get2DMenuJoypad
|
||||
ldh a, [hJoyDown]
|
||||
bit 0, a
|
||||
jr nz, asm_249bc
|
||||
bit 1, a
|
||||
jr nz, asm_249b9
|
||||
jr asm_24997
|
||||
asm_249b9:
|
||||
ld a, $0e
|
||||
bit A_BUTTON_F, a
|
||||
jr nz, .select
|
||||
bit B_BUTTON_F, a
|
||||
jr nz, .cancel
|
||||
jr MonMenuLoop
|
||||
|
||||
.cancel:
|
||||
ld a, MONMENUITEM_CANCEL
|
||||
ret
|
||||
|
||||
asm_249bc:
|
||||
ld a, [w2DMenuDataEnd]
|
||||
.select:
|
||||
ld a, [wMenuCursorY]
|
||||
dec a
|
||||
ld c, a
|
||||
ld b, $00
|
||||
ld hl, wMapBlocksAddress
|
||||
ld b, 0
|
||||
ld hl, wMonSubmenuItems
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ret
|
||||
|
||||
asm_249c9:
|
||||
PopulateMonMenu:
|
||||
call MenuBoxCoord2Tile
|
||||
ld bc, $002a
|
||||
ld bc, 2*SCREEN_WIDTH + 2
|
||||
add hl, bc
|
||||
ld de, wMapBlocksAddress
|
||||
asm_249d3:
|
||||
ld de, wMonSubmenuItems
|
||||
.loop
|
||||
ld a, [de]
|
||||
inc de
|
||||
cp $ff
|
||||
ret z
|
||||
push de
|
||||
push hl
|
||||
call asm_249e8
|
||||
call GetMonMenuString
|
||||
pop hl
|
||||
call PlaceString
|
||||
ld bc, $0028
|
||||
ld bc, 2*SCREEN_WIDTH
|
||||
add hl, bc
|
||||
pop de
|
||||
jr asm_249d3
|
||||
asm_249e8:
|
||||
jr .loop
|
||||
|
||||
GetMonMenuString:
|
||||
dec a
|
||||
ld b, a
|
||||
add a
|
||||
add b
|
||||
ld c, a
|
||||
ld b, $00
|
||||
ld hl, Data24921
|
||||
ld hl, MonMenuOptions
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
and a
|
||||
jr z, asm_24a00
|
||||
and a ; if MONMENU_MENUOPTION
|
||||
jr z, .NotMove
|
||||
inc hl
|
||||
ld a, [hl]
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
call Unreferenced_GetMoveName
|
||||
ret
|
||||
|
||||
asm_24a00:
|
||||
.NotMove:
|
||||
inc hl
|
||||
ld a, [hl]
|
||||
dec a
|
||||
ld hl, Text248e7
|
||||
ld hl, MonMenuOptionStrings
|
||||
call GetNthString
|
||||
ld d, h
|
||||
ld e, l
|
||||
ret
|
||||
|
||||
asm_24a0c:
|
||||
call asm_24a78
|
||||
ld a, $02
|
||||
GetMonSubmenuItems:
|
||||
call ResetMonSubmenu
|
||||
ld a, MON_MOVES
|
||||
call GetPartyParamLocation
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld hl, wMapBlocksAddress
|
||||
ld c, $04
|
||||
asm_24a1b:
|
||||
ld hl, wMonSubmenuItems
|
||||
ld c, NUM_MOVES
|
||||
|
||||
.loop
|
||||
push bc
|
||||
push de
|
||||
ld a, [de]
|
||||
and a
|
||||
jr z, asm_24a2b
|
||||
and a ; no move in this slot
|
||||
jr z, .next
|
||||
|
||||
push hl
|
||||
call asm_24a63
|
||||
call IsFieldMove
|
||||
|
||||
pop hl
|
||||
jr nc, asm_24a2b
|
||||
call asm_24a93
|
||||
asm_24a2b:
|
||||
jr nc, .next
|
||||
call AddMonMenuItem
|
||||
|
||||
.next
|
||||
pop de
|
||||
inc de
|
||||
pop bc
|
||||
dec c
|
||||
jr nz, asm_24a1b
|
||||
ld a, $0b
|
||||
call asm_24a93
|
||||
ld a, $0c
|
||||
call asm_24a93
|
||||
ld a, $0f
|
||||
call asm_24a93
|
||||
jr nz, .loop
|
||||
|
||||
ld a, MONMENUITEM_STATS
|
||||
call AddMonMenuItem
|
||||
ld a, MONMENUITEM_SWITCH
|
||||
call AddMonMenuItem
|
||||
ld a, MONMENUITEM_MOVE
|
||||
call AddMonMenuItem
|
||||
|
||||
push hl
|
||||
ld a, $01
|
||||
ld a, MON_ITEM
|
||||
call GetPartyParamLocation
|
||||
ld a, [hl]
|
||||
pop hl
|
||||
cp $9e
|
||||
ld a, $0d
|
||||
jr nz, asm_24a50
|
||||
ld a, $10
|
||||
asm_24a50:
|
||||
call asm_24a93
|
||||
ld a, [wFieldMoveScriptID]
|
||||
cp $08
|
||||
jr z, asm_24a5f
|
||||
ld a, $0e
|
||||
call asm_24a93
|
||||
asm_24a5f:
|
||||
call asm_24a86
|
||||
cp ITEM_MAIL
|
||||
ld a, MONMENUITEM_ITEM
|
||||
jr nz, .notmail
|
||||
ld a, MONMENUITEM_MAIL
|
||||
|
||||
.notmail
|
||||
call AddMonMenuItem
|
||||
ld a, [wMonSubmenuCount]
|
||||
cp NUM_MONMENU_ITEMS
|
||||
jr z, .maxitems
|
||||
|
||||
ld a, MONMENUITEM_CANCEL
|
||||
call AddMonMenuItem
|
||||
|
||||
.maxitems
|
||||
call TerminateMonSubmenu
|
||||
ret
|
||||
|
||||
asm_24a63:
|
||||
IsFieldMove:
|
||||
ld b, a
|
||||
ld hl, Data24921
|
||||
asm_24a67:
|
||||
ld hl, MonMenuOptions
|
||||
.next
|
||||
ld a, [hli]
|
||||
cp $ff
|
||||
jr z, asm_24a77
|
||||
and a
|
||||
jr z, asm_24a77
|
||||
cp -1
|
||||
jr z, .nope
|
||||
and a ; MONMENU_MENUOPTION
|
||||
jr z, .nope
|
||||
ld d, [hl]
|
||||
inc hl
|
||||
ld a, [hli]
|
||||
cp b
|
||||
jr nz, asm_24a67
|
||||
jr nz, .next
|
||||
ld a, d
|
||||
scf
|
||||
asm_24a77:
|
||||
|
||||
.nope
|
||||
ret
|
||||
|
||||
asm_24a78:
|
||||
ResetMonSubmenu:
|
||||
xor a
|
||||
ld [wFieldMoveScriptID], a
|
||||
ld hl, wMapBlocksAddress
|
||||
ld bc, $9
|
||||
ld [wMonSubmenuCount], a
|
||||
ld hl, wMonSubmenuItems
|
||||
ld bc, NUM_MONMENU_ITEMS + 1
|
||||
call ByteFill
|
||||
ret
|
||||
|
||||
asm_24a86:
|
||||
ld a, [wFieldMoveScriptID]
|
||||
TerminateMonSubmenu:
|
||||
ld a, [wMonSubmenuCount]
|
||||
ld e, a
|
||||
ld d, $00
|
||||
ld hl, wMapBlocksAddress
|
||||
ld d, 0
|
||||
ld hl, wMonSubmenuItems
|
||||
add hl, de
|
||||
ld [hl], $ff
|
||||
ld [hl], -1
|
||||
ret
|
||||
|
||||
asm_24a93:
|
||||
AddMonMenuItem:
|
||||
push hl
|
||||
push de
|
||||
push af
|
||||
ld a, [wFieldMoveScriptID]
|
||||
ld a, [wMonSubmenuCount]
|
||||
ld e, a
|
||||
inc a
|
||||
ld [wFieldMoveScriptID], a
|
||||
ld [wMonSubmenuCount], a
|
||||
ld d, $00
|
||||
ld hl, wMapBlocksAddress
|
||||
ld hl, wMonSubmenuItems
|
||||
add hl, de
|
||||
pop af
|
||||
ld [hl], a
|
||||
|
|
@ -1585,8 +1614,8 @@ asm_24a93:
|
|||
pop hl
|
||||
ret
|
||||
|
||||
asm_24aa9:
|
||||
ld hl, .MenuHeader24ae9
|
||||
BattleMonMenu:
|
||||
ld hl, .MenuHeader
|
||||
call CopyMenuHeader
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
|
|
@ -1594,45 +1623,50 @@ asm_24aa9:
|
|||
call UpdateSprites
|
||||
call PlaceVerticalMenuItems
|
||||
call WaitBGMap
|
||||
|
||||
ld hl, wMenuDataPointer
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ld de, wMenuDataHeaderEnd
|
||||
ld bc, $8
|
||||
ld de, wMenuData2
|
||||
ld bc, $8 ; TODO: constantify
|
||||
call CopyBytes
|
||||
ld a, [wMenuDataHeaderEnd]
|
||||
bit 7, a
|
||||
jr z, .asm_24ae4
|
||||
|
||||
ld a, [wMenuDataFlags]
|
||||
bit STATICMENU_CURSOR_F, a
|
||||
jr z, .set_carry
|
||||
call InitVerticalMenuCursor
|
||||
ld hl, w2DMenuFlags
|
||||
set 6, [hl]
|
||||
set _2DMENU_ENABLE_SPRITE_ANIMS_F, [hl]
|
||||
call Get2DMenuJoypad
|
||||
bit 1, a
|
||||
jr z, .asm_24ae6
|
||||
bit B_BUTTON_F, a
|
||||
jr z, .clear_carry
|
||||
ret z
|
||||
.asm_24ae4:
|
||||
|
||||
.set_carry:
|
||||
scf
|
||||
ret
|
||||
|
||||
.asm_24ae6:
|
||||
.clear_carry:
|
||||
and a
|
||||
ret
|
||||
|
||||
ret
|
||||
|
||||
.MenuHeader24ae9:
|
||||
db 0
|
||||
menu_coords 11, 11, $13, $11
|
||||
dw .text_24af1
|
||||
db 1
|
||||
.MenuHeader:
|
||||
db 0 ; flags
|
||||
menu_coords 11, 11, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
|
||||
dw .MenuText
|
||||
db 1 ; default option
|
||||
|
||||
.text_24af1:
|
||||
db "たエ゛とりかえる@"
|
||||
db "つよさをみる@"
|
||||
db "キャンセル@"
|
||||
.MenuText:
|
||||
db (STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING)
|
||||
db 3
|
||||
db "とりかえる@" ; Switch
|
||||
db "つよさをみる@" ; Stats
|
||||
db "キャンセル@" ; Cancel
|
||||
|
||||
asm_24b06:
|
||||
LoadBattleMenu:
|
||||
ld hl, MenuHeader24b24
|
||||
jr asm_24b0e
|
||||
|
||||
|
|
@ -1655,10 +1689,13 @@ MenuHeader24b24:
|
|||
db 1
|
||||
|
||||
.text_24b2c:
|
||||
db "ア<TA!>ガたたかう@"
|
||||
db "どうぐ@"
|
||||
db "#@"
|
||||
db "にげる@"
|
||||
db STATICMENU_CURSOR
|
||||
dn 2, 2
|
||||
db 5
|
||||
db "たたかう@" ; "FIGHT"
|
||||
db "どうぐ@" ; "ITEM"
|
||||
db "#@" ; "<PK><MN>"
|
||||
db "にげる@" ; "RUN"
|
||||
|
||||
MenuHeader24b3e:
|
||||
db MENU_BACKUP_TILES
|
||||
|
|
@ -1667,10 +1704,13 @@ MenuHeader24b3e:
|
|||
db 1
|
||||
|
||||
.text_24b46:
|
||||
db "ア<TA!>ジサファりボール× @"
|
||||
db "エサをなげる@"
|
||||
db "いしをなげる@"
|
||||
db "にげる@"
|
||||
db STATICMENU_CURSOR
|
||||
dn 2, 2
|
||||
db 11
|
||||
db "サファりボール× @" ; "SAFARI BALL× @"
|
||||
db "エサをなげる@" ; "BAIT"
|
||||
db "いしをなげる@" ; "THROW ROCK"
|
||||
db "にげる@" ; "RUN"
|
||||
|
||||
asm_24b67:
|
||||
call CopyMenuData
|
||||
|
|
@ -1838,7 +1878,7 @@ SelectQuantityToToss::
|
|||
ret
|
||||
|
||||
asm_24c64:
|
||||
callab GetItemPrice
|
||||
callfar GetItemPrice
|
||||
ld a, d
|
||||
ld [wFieldMoveScriptID], a
|
||||
ld a, e
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ asm_2d36c:
|
|||
ld a, $1a
|
||||
call Predef
|
||||
push bc
|
||||
ld a, [wWhichPokemon]
|
||||
ld a, [wCurPartyMon]
|
||||
ld hl, wPartyMonNicknames
|
||||
call GetNick
|
||||
pop bc
|
||||
|
|
@ -87,7 +87,7 @@ asm_2d36c:
|
|||
jr asm_2d33e
|
||||
|
||||
asm_2d390:
|
||||
callab Functionfdab
|
||||
callfar Functionfdab
|
||||
jr c, asm_2d33e
|
||||
ld a, $0
|
||||
call Predef
|
||||
|
|
@ -217,8 +217,7 @@ asm_2d4a3:
|
|||
ld [wCurSpecies], a
|
||||
ld b, a
|
||||
ld hl, $c395
|
||||
ld a, $3f
|
||||
call Predef
|
||||
predef PrintMoveType
|
||||
ld hl, $c3b9
|
||||
call Function2d663
|
||||
ld hl, $c39b
|
||||
|
|
@ -226,10 +225,10 @@ asm_2d4a3:
|
|||
call PlaceString
|
||||
ld a, [wCurSpecies]
|
||||
dec a
|
||||
ld hl, Data418b8
|
||||
ld bc, $7
|
||||
ld hl, Moves + MOVE_POWER
|
||||
ld bc, MOVE_LENGTH
|
||||
call AddNTimes
|
||||
ld a, BANK(Data418b8)
|
||||
ld a, BANK(Moves)
|
||||
call GetFarByte
|
||||
ld hl, $c3a0
|
||||
cp $2
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2130
engine/dumps/bank14.asm
Normal file
2130
engine/dumps/bank14.asm
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -152,7 +152,7 @@ CutScript:
|
|||
ld hl, wPartyMonNicknames
|
||||
ld a, BOXMON
|
||||
ld [wMonType], a
|
||||
ld a, [wWhichPokemon]
|
||||
ld a, [wCurPartyMon]
|
||||
call GetNick
|
||||
call CopyStringToStringBuffer2
|
||||
ld hl, Text_CutItDown
|
||||
|
|
@ -242,7 +242,7 @@ SurfScript:
|
|||
ld hl, wPartyMonNicknames
|
||||
ld a, BOXMON
|
||||
ld [wMonType], a
|
||||
ld a, [wWhichPokemon]
|
||||
ld a, [wCurPartyMon]
|
||||
call GetNick
|
||||
call CopyStringToStringBuffer2
|
||||
ld hl, Text_UsedSurf
|
||||
|
|
@ -273,7 +273,7 @@ MovePlayerIntoWater:
|
|||
ld hl, wMovementBuffer
|
||||
call LoadMovementDataPointer
|
||||
.get_movement_direction
|
||||
ld a, [wPlayerWalking]
|
||||
ld a, [wPlayerDirection]
|
||||
srl a
|
||||
srl a
|
||||
ld e, a
|
||||
|
|
@ -328,7 +328,7 @@ TryFly:
|
|||
ShowFlyMap:
|
||||
call LoadStandardMenuHeader
|
||||
call ClearSprites
|
||||
callab FlyMap
|
||||
callfar FlyMap
|
||||
call ClearPalettes
|
||||
call GetMemSGBLayout
|
||||
call ExitMenu
|
||||
|
|
@ -375,7 +375,7 @@ Text_CantUseFlyHere:
|
|||
FlyScript:
|
||||
ld a, MAPSETUP_TELEPORT
|
||||
ldh [hMapEntryMethod], a
|
||||
jpab Functionfcc24
|
||||
jpfar Functionfcc24
|
||||
|
||||
|
||||
DigFunction:
|
||||
|
|
@ -441,7 +441,7 @@ DigScript:
|
|||
call CopyBytes
|
||||
ld a, MAPSETUP_WARP
|
||||
ldh [hMapEntryMethod], a
|
||||
jpab Functionfcc24
|
||||
jpfar Functionfcc24
|
||||
|
||||
EmptyFunctiond2da:
|
||||
ret
|
||||
|
|
@ -487,7 +487,7 @@ CheckIfSpawnPoint:
|
|||
ld d, a
|
||||
ld a, [wLastSpawnMapNumber]
|
||||
ld e, a
|
||||
callab IsSpawnPoint
|
||||
callfar IsSpawnPoint
|
||||
jr c, .not_spawn
|
||||
ld hl, Text_CantFindDestination
|
||||
call MenuTextBoxBackup
|
||||
|
|
@ -534,7 +534,7 @@ TeleportScript:
|
|||
call Function1fea
|
||||
ld a, MAPSETUP_TELEPORT
|
||||
ldh [hMapEntryMethod], a
|
||||
jpab Functionfcc24
|
||||
jpfar Functionfcc24
|
||||
|
||||
Text_ReturnToLastMonCenter:
|
||||
text "さいごに たちよった"
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ PC_Demo:
|
|||
done
|
||||
|
||||
BillsPC:
|
||||
callab _BillsPC
|
||||
callfar _BillsPC
|
||||
and a
|
||||
ret
|
||||
|
||||
|
|
@ -241,8 +241,8 @@ PlayerWithdrawItemMenu:
|
|||
ret
|
||||
|
||||
.Submenu:
|
||||
callab _CheckTossableItem
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
callfar _CheckTossableItem
|
||||
ld a, [wItemAttributeValue]
|
||||
and a
|
||||
jr z, .AskQuantity
|
||||
ld a, 1
|
||||
|
|
@ -252,7 +252,7 @@ PlayerWithdrawItemMenu:
|
|||
.AskQuantity:
|
||||
ld hl, .HowManyToWithdrawText
|
||||
call MenuTextBox
|
||||
callab SelectQuantityToToss
|
||||
callfar SelectQuantityToToss
|
||||
call ExitMenu
|
||||
call ExitMenu
|
||||
jr c, .done
|
||||
|
|
@ -307,7 +307,7 @@ PlayerTossItemMenu:
|
|||
call PCItemsJoypad
|
||||
jr c, .quit
|
||||
ld de, wUnknownListLengthd1ea
|
||||
callab TryTossItem
|
||||
callfar TryTossItem
|
||||
jr .loop
|
||||
.quit
|
||||
ld hl, wVramState
|
||||
|
|
@ -324,10 +324,10 @@ PlayerDepositItemMenu:
|
|||
call .CheckItemsInBag
|
||||
ret c
|
||||
call LoadStandardMenuHeader
|
||||
callab GetPocket2Status
|
||||
callab DrawBackpack
|
||||
callfar GetPocket2Status
|
||||
callfar DrawBackpack
|
||||
.loop
|
||||
callab DebugBackpackLoop
|
||||
callfar DebugBackpackLoop
|
||||
jr c, .quit
|
||||
call .TryDepositItem
|
||||
jr .loop
|
||||
|
|
@ -340,7 +340,7 @@ PlayerDepositItemMenu:
|
|||
ret
|
||||
|
||||
.CheckItemsInBag:
|
||||
callab CheckItemsQuantity
|
||||
callfar CheckItemsQuantity
|
||||
ret nc
|
||||
|
||||
; no item to deposit
|
||||
|
|
@ -355,8 +355,8 @@ PlayerDepositItemMenu:
|
|||
prompt
|
||||
|
||||
.TryDepositItem:
|
||||
callab CheckItemMenu
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
callfar CheckItemMenu
|
||||
ld a, [wItemAttributeValue]
|
||||
ld hl, .Jumptable
|
||||
jp CallJumptable
|
||||
|
||||
|
|
@ -390,7 +390,7 @@ PlayerDepositItemMenu:
|
|||
prompt
|
||||
|
||||
.SwapPockets:
|
||||
callab FlipPocket2Status
|
||||
callfar FlipPocket2Status
|
||||
xor a
|
||||
ld [wSelectedSwapPosition], a
|
||||
ret
|
||||
|
|
@ -400,8 +400,8 @@ PlayerDepositItemMenu:
|
|||
ret
|
||||
|
||||
.DepositItem:
|
||||
callab _CheckTossableItem
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
callfar _CheckTossableItem
|
||||
ld a, [wItemAttributeValue]
|
||||
and a
|
||||
jr z, .AskQuantity
|
||||
ld a, 1
|
||||
|
|
@ -411,7 +411,7 @@ PlayerDepositItemMenu:
|
|||
.AskQuantity:
|
||||
ld hl, .HowManyDepositText
|
||||
call MenuTextBox
|
||||
callab SelectQuantityToToss
|
||||
callfar SelectQuantityToToss
|
||||
push af
|
||||
call ExitMenu
|
||||
call ExitMenu
|
||||
|
|
@ -479,12 +479,12 @@ PCItemsJoypad:
|
|||
jr z, .select
|
||||
jr .next
|
||||
.select
|
||||
callab SwitchItemsInBag
|
||||
callfar SwitchItemsInBag
|
||||
jp .next
|
||||
.next
|
||||
jp PCItemsJoypad
|
||||
.a_button
|
||||
callab ScrollingMenu_ClearLeftColumn
|
||||
callfar ScrollingMenu_ClearLeftColumn
|
||||
call PlaceHollowCursor
|
||||
and a
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ MemoryMinigame:
|
|||
call DisableLCD
|
||||
ld b, SGB_DIPLOMA
|
||||
call GetSGBLayout
|
||||
callab InitEffectObject
|
||||
callfar InitEffectObject
|
||||
|
||||
ld hl, MemoryGameGFX
|
||||
ld de, vChars2
|
||||
|
|
@ -79,7 +79,7 @@ MemoryMinigame:
|
|||
bit MEMORYGAME_END_LOOP_F, a
|
||||
jr nz, .quit
|
||||
call .ExecuteJumptable
|
||||
callab EffectObjectJumpNoDelay
|
||||
callfar EffectObjectJumpNoDelay
|
||||
call DelayFrame
|
||||
and a
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ PicrossMinigame:
|
|||
|
||||
.Init:
|
||||
call DisableLCD
|
||||
callba InitEffectObject
|
||||
farcall InitEffectObject
|
||||
call .InitGFX
|
||||
call .PlacePlayerBG
|
||||
call .InitRAM
|
||||
|
|
@ -203,13 +203,13 @@ PicrossMinigame:
|
|||
|
||||
; load Gold sprites
|
||||
ld de, vSprites + $100
|
||||
ld hl, GoldSpriteGFX + $40
|
||||
ld hl, GoldSpriteGFX + LEN_2BPP_TILE * 4 ; Gold's back-facing standing sprite
|
||||
ld bc, 4 tiles
|
||||
ld a, BANK(GoldSpriteGFX)
|
||||
call FarCopyData
|
||||
|
||||
ld de, vSprites + $140
|
||||
ld hl, GoldSpriteGFX + $100
|
||||
ld hl, GoldSpriteGFX + LEN_2BPP_TILE * 16 ; Gold's back-facing walking sprite
|
||||
ld bc, 4 tiles
|
||||
ld a, BANK(GoldSpriteGFX)
|
||||
call FarCopyData
|
||||
|
|
@ -265,7 +265,7 @@ PicrossMinigame:
|
|||
jr nz, .quit
|
||||
|
||||
call .ExecuteJumptable
|
||||
callba EffectObjectJumpNoDelay
|
||||
farcall EffectObjectJumpNoDelay
|
||||
call DelayFrame
|
||||
and a
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ PikachuMiniGame::
|
|||
call DisableLCD
|
||||
ld b, SGB_PIKACHU_MINIGAME
|
||||
call GetSGBLayout
|
||||
callab InitEffectObject
|
||||
callfar InitEffectObject
|
||||
call PikachuMiniGame_ClearBothTilemaps
|
||||
|
||||
ld hl, IntroForestGFX
|
||||
|
|
@ -362,7 +362,7 @@ PikachuMiniGame_RunFrame:
|
|||
|
||||
.skip_playing_sfx
|
||||
call PikachuMiniGame_PerformGameFunction
|
||||
callba EffectObjectJumpNoDelay
|
||||
farcall EffectObjectJumpNoDelay
|
||||
|
||||
ld a, 1
|
||||
ldh [hBGMapMode], a
|
||||
|
|
@ -382,7 +382,7 @@ PikachuMiniGame_RunFrame:
|
|||
ret
|
||||
|
||||
.Done:
|
||||
callab InitEffectObject
|
||||
callfar InitEffectObject
|
||||
|
||||
ld hl, wShadowOAM
|
||||
ld c, SPRITEOAMSTRUCT_LENGTH * NUM_SPRITE_OAM_STRUCTS
|
||||
|
|
@ -857,7 +857,7 @@ MinigamePikachuDoMovement::
|
|||
dec [hl]
|
||||
ld d, $30
|
||||
ld e, a
|
||||
callba BattleAnim_Sine_e
|
||||
farcall BattleAnim_Sine_e
|
||||
ld a, e
|
||||
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
||||
add hl, bc
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ SlotMachineGame_Init:
|
|||
call DisableLCD
|
||||
ld b, SGB_SLOT_MACHINE
|
||||
call GetSGBLayout
|
||||
callab InitEffectObject
|
||||
callfar InitEffectObject
|
||||
ld hl, wSlots
|
||||
ld bc, wSlotsDataEnd - wSlots
|
||||
xor a
|
||||
|
|
@ -193,7 +193,7 @@ SlotsLoop:
|
|||
call Slots_SpinReels
|
||||
ld a, $60
|
||||
ld [wc4bd], a
|
||||
callab DoNextFrameForFirst16Sprites
|
||||
callfar DoNextFrameForFirst16Sprites
|
||||
call Slots_PrintCoinsAndPayout
|
||||
call Slots_FlashPaletteOnMatchingSevens
|
||||
call Slots_AnimateReelSpritesAfterSpin
|
||||
|
|
@ -2030,7 +2030,7 @@ Slots_AnimateGolem:
|
|||
dec [hl]
|
||||
ld e, a
|
||||
ld d, 14 * 8
|
||||
callba BattleAnim_Sine_e
|
||||
farcall BattleAnim_Sine_e
|
||||
ld a, e
|
||||
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
||||
add hl, bc
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ SGB_BattleColors:
|
|||
call CopyBytes
|
||||
|
||||
ld a, [wca3f]
|
||||
ld hl, wca02
|
||||
ld hl, wBattleMon
|
||||
call Function9567
|
||||
jr c, .sub_92f7
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ SGB_BattleColors:
|
|||
.sub_92f7
|
||||
ld b, a
|
||||
ld a, [wca44]
|
||||
ld hl, wcdd7
|
||||
ld hl, wTempEnemyMonSpecies
|
||||
call Function9567
|
||||
jr c, .sub_9308
|
||||
ld e, $01
|
||||
|
|
@ -120,7 +120,7 @@ SGB_StatsScreenHPPals:
|
|||
ld de, wcce1
|
||||
ld bc, PALPACKET_LENGTH
|
||||
call CopyBytes
|
||||
ld a, [wMonDexIndex]
|
||||
ld a, [wCurPartySpecies]
|
||||
call Function956d
|
||||
call Function957e
|
||||
push af
|
||||
|
|
@ -145,7 +145,7 @@ SGB_Pokedex:
|
|||
ld de, wcce1
|
||||
ld bc, PALPACKET_LENGTH
|
||||
call CopyBytes
|
||||
ld a, [wMonDexIndex]
|
||||
ld a, [wCurPartySpecies]
|
||||
call Function956d
|
||||
ld hl, wcce4
|
||||
ld [hl], a
|
||||
|
|
@ -264,7 +264,7 @@ SGB12:
|
|||
call GetMapPalsIndex
|
||||
ld hl, wcce2
|
||||
ld [hl], a
|
||||
ld a, [wMonDexIndex]
|
||||
ld a, [wCurPartySpecies]
|
||||
call Function956d
|
||||
ld hl, wcce4
|
||||
ld [hl], a
|
||||
|
|
@ -436,7 +436,7 @@ Function957e:
|
|||
push bc
|
||||
push af
|
||||
ld hl, wPartyMon1DVs
|
||||
ld a, [wWhichPokemon]
|
||||
ld a, [wCurPartyMon]
|
||||
ld bc, $0030
|
||||
call AddNTimes
|
||||
call Function95b0
|
||||
|
|
@ -490,11 +490,11 @@ Function95b0:
|
|||
ret
|
||||
|
||||
Function95cc:
|
||||
ld hl, wcddf
|
||||
ld hl, wEnemyMonDVs
|
||||
ldh a, [hBattleTurn]
|
||||
and a
|
||||
jr nz, .sub_95d7
|
||||
ld hl, wca08
|
||||
ld hl, wBattleMonDVs
|
||||
.sub_95d7
|
||||
call Function95b0
|
||||
ld hl, wcae1
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ _ReceiveItem:
|
|||
call DoesHLEqualwNumBagItems
|
||||
jp nz, PutItemInPocket
|
||||
push hl
|
||||
callab CheckItemPocket
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
callfar CheckItemPocket
|
||||
ld a, [wItemAttributeValue]
|
||||
dec a
|
||||
ld hl, .Pockets
|
||||
jp CallJumptable
|
||||
|
|
@ -45,8 +45,8 @@ _TossItem:
|
|||
call DoesHLEqualwNumBagItems
|
||||
jr nz, .remove_item
|
||||
push hl
|
||||
callab CheckItemPocket
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
callfar CheckItemPocket
|
||||
ld a, [wItemAttributeValue]
|
||||
dec a
|
||||
ld hl, .Pockets
|
||||
jp CallJumptable
|
||||
|
|
@ -86,8 +86,8 @@ _CheckItem:
|
|||
call DoesHLEqualwNumBagItems
|
||||
jr nz, .not_bag
|
||||
push hl
|
||||
callab CheckItemPocket
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
callfar CheckItemPocket
|
||||
ld a, [wItemAttributeValue]
|
||||
dec a
|
||||
ld hl, .Pockets
|
||||
jp CallJumptable
|
||||
|
|
@ -636,7 +636,7 @@ CheckAmountInKeyItems:
|
|||
|
||||
SECTION "engine/items/inventory.asm@_CheckTossableItem", ROMX
|
||||
|
||||
; Return 1 in wItemAttributeParamBuffer and
|
||||
; Return 1 in wItemAttributeValue and
|
||||
; carry if wCurItem can't be removed from the bag.
|
||||
_CheckTossableItem:
|
||||
ld a, ITEMATTR_PERMISSIONS
|
||||
|
|
@ -646,7 +646,7 @@ _CheckTossableItem:
|
|||
and a
|
||||
ret
|
||||
|
||||
; Return 1 in wItemAttributeParamBuffer
|
||||
; Return 1 in wItemAttributeValue
|
||||
; and carry if wCurItem can't be selected.
|
||||
CheckSelectableItem:
|
||||
ld a, ITEMATTR_PERMISSIONS
|
||||
|
|
@ -656,29 +656,29 @@ CheckSelectableItem:
|
|||
and a
|
||||
ret
|
||||
|
||||
; Return the pocket for wCurItem in wItemAttributeParamBuffer.
|
||||
; Return the pocket for wCurItem in wItemAttributeValue.
|
||||
CheckItemPocket:
|
||||
ld a, ITEMATTR_POCKET
|
||||
call GetItemAttr
|
||||
and $f
|
||||
ld [wItemAttributeParamBuffer], a
|
||||
ld [wItemAttributeValue], a
|
||||
ret
|
||||
|
||||
; Return the context for wCurItem in wItemAttributeParamBuffer.
|
||||
; Return the context for wCurItem in wItemAttributeValue.
|
||||
CheckItemContext:
|
||||
ld a, ITEMATTR_HELP
|
||||
call GetItemAttr
|
||||
and $f
|
||||
ld [wItemAttributeParamBuffer], a
|
||||
ld [wItemAttributeValue], a
|
||||
ret
|
||||
|
||||
; Return the menu for wCurItem in wItemAttributeParamBuffer.
|
||||
; Return the menu for wCurItem in wItemAttributeValue.
|
||||
CheckItemMenu:
|
||||
ld a, ITEMATTR_HELP
|
||||
call GetItemAttr
|
||||
swap a
|
||||
and $f
|
||||
ld [wItemAttributeParamBuffer], a
|
||||
ld [wItemAttributeValue], a
|
||||
ret
|
||||
|
||||
; Get attribute a of wCurItem.
|
||||
|
|
@ -690,7 +690,7 @@ GetItemAttr:
|
|||
ld b, 0
|
||||
add hl, bc
|
||||
xor a
|
||||
ld [wItemAttributeParamBuffer], a
|
||||
ld [wItemAttributeValue], a
|
||||
ld a, [wCurItem]
|
||||
dec a
|
||||
ld c, a
|
||||
|
|
@ -704,7 +704,7 @@ GetItemAttr:
|
|||
|
||||
ItemAttr_ReturnCarry:
|
||||
ld a, 1
|
||||
ld [wItemAttributeParamBuffer], a
|
||||
ld [wItemAttributeValue], a
|
||||
scf
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -4,16 +4,16 @@ SECTION "engine/items/tmhm.asm", ROMX
|
|||
|
||||
CanLearnTMHMMove:
|
||||
; Gets the index of TM or HM with move ID wce32,
|
||||
; then checks the corresponding flag in wMonDexIndex's learnset.
|
||||
; then checks the corresponding flag in wCurPartySpecies's learnset.
|
||||
; Sets register c to 1 if TM/HM is in learnset OR if debug is enabled.
|
||||
ld a, [wDebugFlags]
|
||||
ld c, 01
|
||||
bit 1, a
|
||||
ret nz
|
||||
|
||||
ld a, [wMonDexIndex]
|
||||
ld a, [wCurPartySpecies]
|
||||
ld [wCurSpecies], a
|
||||
call GetMonHeader
|
||||
call GetBaseData
|
||||
ld hl, wMonHLearnset
|
||||
push hl
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ DebugMenu_WarpMenuHeader::
|
|||
db 4 ; items
|
||||
dw $0100 ; ???
|
||||
|
||||
dba Data_3f_4bc6
|
||||
dba WarpMenuOptions
|
||||
dba PlaceSelectedMapName
|
||||
|
||||
db $00, $00, $00 ; ???
|
||||
|
|
@ -60,51 +60,58 @@ GetLandmarkName::
|
|||
|
||||
SECTION "engine/landmarks.asm@2", ROMX
|
||||
|
||||
Data_3f_4bc6::
|
||||
db 16 ; #
|
||||
db $01
|
||||
db $02
|
||||
db $03
|
||||
db $04
|
||||
db $05
|
||||
db $06
|
||||
db $07
|
||||
db $08
|
||||
db $09
|
||||
db $0a
|
||||
db $0b
|
||||
db $0e
|
||||
db $0f
|
||||
db $10
|
||||
db $11
|
||||
db $2d
|
||||
WarpMenuOptions::
|
||||
|
||||
db 16 ; Number of options in the menu - 43 total stored in data, but most are unused
|
||||
|
||||
db SPAWN_POINT_SILENT
|
||||
db SPAWN_POINT_OLD
|
||||
db SPAWN_POINT_WEST
|
||||
db SPAWN_POINT_HIGH_TECH
|
||||
db SPAWN_POINT_FOUNT
|
||||
db SPAWN_POINT_BIRDON
|
||||
db SPAWN_POINT_NEW_TYPE
|
||||
db SPAWN_POINT_SUGAR
|
||||
db SPAWN_POINT_BLUE_FOREST
|
||||
db SPAWN_POINT_STAND
|
||||
db SPAWN_POINT_KANTO
|
||||
|
||||
; PRINCE and MT_FUJI are skipped in the menu
|
||||
|
||||
db SPAWN_POINT_SOUTH
|
||||
db SPAWN_POINT_NORTH
|
||||
db SPAWN_POINT_ROUTE_15
|
||||
db SPAWN_POINT_ROUTE_18
|
||||
db SPAWN_POINT_SILENT_HILL
|
||||
db $ff
|
||||
|
||||
db $12
|
||||
db $13
|
||||
db $14
|
||||
db $15
|
||||
db $16
|
||||
db $17
|
||||
db $18
|
||||
db $19
|
||||
db $1a
|
||||
db $1b
|
||||
db $1c
|
||||
db $1d
|
||||
db $1e
|
||||
db $1f
|
||||
db $20
|
||||
db $21
|
||||
db $22
|
||||
db $23
|
||||
db $24
|
||||
db $25
|
||||
db $26
|
||||
db $27
|
||||
db $28
|
||||
db $29
|
||||
db $2a
|
||||
db $2b
|
||||
db $2c
|
||||
; The demo's options stop here, but the spawn points included actually extend far beyond what is available
|
||||
|
||||
db SPAWN_POINT_POWER_PLANT_1
|
||||
db SPAWN_POINT_POWER_PLANT_2
|
||||
db SPAWN_POINT_POWER_PLANT_3
|
||||
db SPAWN_POINT_POWER_PLANT_4
|
||||
db SPAWN_POINT_RUINS_1
|
||||
db SPAWN_POINT_RUINS_2
|
||||
db SPAWN_POINT_MINES_1
|
||||
db SPAWN_POINT_MINES_2
|
||||
db SPAWN_POINT_MINES_3
|
||||
db SPAWN_POINT_MINES_4
|
||||
db SPAWN_POINT_MINES_5
|
||||
db SPAWN_POINT_MINES_6
|
||||
db SPAWN_POINT_MINES_7
|
||||
db SPAWN_POINT_HIDEOUT_1
|
||||
db SPAWN_POINT_HIDEOUT_2
|
||||
db SPAWN_POINT_HIDEOUT_3
|
||||
db SPAWN_POINT_SLOWPOKE_WELL_1
|
||||
db SPAWN_POINT_SLOWPOKE_WELL_2
|
||||
db SPAWN_POINT_POKEMON_LEAGUE_1
|
||||
db SPAWN_POINT_POKEMON_LEAGUE_1_2
|
||||
db SPAWN_POINT_POKEMON_LEAGUE_2
|
||||
db SPAWN_POINT_POKEMON_LEAGUE_3
|
||||
db SPAWN_POINT_POKEMON_LEAGUE_4
|
||||
db SPAWN_POINT_POKEMON_LEAGUE_5
|
||||
db SPAWN_POINT_POKEMON_LEAGUE_6
|
||||
db SPAWN_POINT_POKEMON_LEAGUE_7
|
||||
db SPAWN_POINT_POKEMON_LEAGUE_7_2
|
||||
db $ff
|
||||
|
|
|
|||
|
|
@ -42,13 +42,13 @@ InitializeNewGameWRAM:
|
|||
call DelayFrame
|
||||
|
||||
ldh a, [hRandomSub]
|
||||
ld [wce73], a
|
||||
ld [wPlayerID], a
|
||||
ldh a, [rLY]
|
||||
ldh [hRTCRandom], a
|
||||
call DelayFrame
|
||||
|
||||
ldh a, [hRandomAdd]
|
||||
ld [wce74], a
|
||||
ld [wPlayerID + 1], a
|
||||
|
||||
ld hl, wPartyCount
|
||||
call InitializeByteList
|
||||
|
|
@ -67,13 +67,13 @@ InitializeNewGameWRAM:
|
|||
ld [wKantoBadges], a
|
||||
ld [wCoins], a
|
||||
ld [wd15c], a
|
||||
ld [wd15d], a
|
||||
ld [wMoney], a
|
||||
|
||||
ld a, $0B
|
||||
ld [wd15e], a
|
||||
ld [wMoney + 1], a
|
||||
|
||||
ld a, $B8
|
||||
ld [wd15f], a
|
||||
ld [wMoney + 2], a
|
||||
|
||||
ld hl, wUnknownListLengthd1ea
|
||||
ld a, ITEM_REPEL
|
||||
|
|
@ -192,11 +192,11 @@ PlayPokemonSetTimeMenu:
|
|||
db -1
|
||||
|
||||
MainMenuOptionSetTime::
|
||||
callab SetTime
|
||||
callfar SetTime
|
||||
ret
|
||||
|
||||
MainMenuOptionContinue::
|
||||
callab Function14624
|
||||
callfar Function14624
|
||||
call DisplayContinueGameInfo
|
||||
.loop
|
||||
call ClearJoypad
|
||||
|
|
@ -256,17 +256,17 @@ PrintNumBadges::
|
|||
ld b, $01 ; only Johto Badges
|
||||
call CountSetBits
|
||||
pop hl
|
||||
ld de, wCountSetBitsResult
|
||||
ld de, wNumSetBits
|
||||
ld bc, $0102 ; flags and constants for this? 1 byte source, 2 digit display
|
||||
jp PrintNumber
|
||||
|
||||
PrintNumOwnedMons::
|
||||
push hl
|
||||
ld hl, wPokedexOwned
|
||||
ld hl, wPokedexCaught
|
||||
ld b, $20 ; flag_array NUM_POKEMON?
|
||||
call CountSetBits
|
||||
pop hl
|
||||
ld de, wCountSetBitsResult
|
||||
ld de, wNumSetBits
|
||||
ld bc, $0103 ; 1 byte, 3 digit
|
||||
jp PrintNumber
|
||||
|
||||
|
|
@ -295,7 +295,7 @@ StartNewGame::
|
|||
call LoadFontExtra
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
callba InitializeNewGameWRAM
|
||||
farcall InitializeNewGameWRAM
|
||||
call ClearTileMap
|
||||
call ClearWindowData
|
||||
xor a
|
||||
|
|
|
|||
|
|
@ -174,14 +174,17 @@ StartMenu_Exit:
|
|||
ret
|
||||
|
||||
StartMenu_SetFrame:
|
||||
callab FrameTypeDialog
|
||||
callfar FrameTypeDialog
|
||||
ld a, 0
|
||||
ret
|
||||
|
||||
StartMenu_Reset:
|
||||
; This SHOULD be the setup for a FarCall_hl to DisplayResetDialog.
|
||||
; Instead, it mistakenly calls DisplayResetDialog prior to loading its bank.
|
||||
; This causes it to read data as code, specifically from the middle of MapGroup_Newtype in vanilla.
|
||||
ld hl, DisplayResetDialog
|
||||
ld a, BANK(DisplayResetDialog)
|
||||
call DisplayResetDialog ; should be farcall
|
||||
call DisplayResetDialog ; the problematic line
|
||||
ld a, 0
|
||||
ret
|
||||
|
||||
|
|
@ -197,7 +200,7 @@ StartMenu_Settings:
|
|||
ldh [hBGMapMode], a
|
||||
call ClearTileMap
|
||||
call UpdateSprites
|
||||
callab MenuCallSettings
|
||||
callfar MenuCallSettings
|
||||
call ClearPalettes
|
||||
call Call_ExitMenu
|
||||
call LoadTilesetGFX
|
||||
|
|
@ -219,7 +222,7 @@ _TrainerCard:
|
|||
push af
|
||||
xor a
|
||||
ldh [hMapAnims], a
|
||||
callab TrainerCardLoop
|
||||
callfar TrainerCardLoop
|
||||
call ClearPalettes
|
||||
call LoadFont
|
||||
call ReloadFontAndTileset
|
||||
|
|
@ -338,7 +341,7 @@ DrawBackpack:
|
|||
res 0, [hl]
|
||||
call ClearSprites
|
||||
call ClearTileMap
|
||||
callab LoadBackpackGraphics
|
||||
callfar LoadBackpackGraphics
|
||||
hlcoord 2, 2
|
||||
ld b, 08
|
||||
ld c, $0F
|
||||
|
|
@ -476,7 +479,7 @@ HandleBackpackInput:
|
|||
jp .exit
|
||||
|
||||
.BackpackSelect
|
||||
callab SwitchItemsInBag
|
||||
callfar SwitchItemsInBag
|
||||
jp .exit
|
||||
|
||||
.exit
|
||||
|
|
@ -496,11 +499,11 @@ HandleBackpackInput:
|
|||
ret
|
||||
|
||||
BackpackSelected:
|
||||
callab ScrollingMenu_ClearLeftColumn
|
||||
callfar ScrollingMenu_ClearLeftColumn
|
||||
call PlaceHollowCursor
|
||||
call LoadItemData
|
||||
callab CheckItemMenu
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
callfar CheckItemMenu
|
||||
ld a, [wItemAttributeValue]
|
||||
ld hl, .BagSelectJumptable
|
||||
jp CallJumptable
|
||||
|
||||
|
|
@ -522,7 +525,7 @@ BackpackSelected:
|
|||
|
||||
.UnknownSelection
|
||||
call LoadStandardMenuHeader
|
||||
callab Function2d2fc
|
||||
callfar Function2d2fc
|
||||
call ExitMenu
|
||||
call DrawBackpack
|
||||
and a
|
||||
|
|
@ -577,7 +580,7 @@ DebugSelectedItemMenu:
|
|||
db 01
|
||||
|
||||
.DebugSelectedItemMenuText
|
||||
db $C0
|
||||
db (STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING)
|
||||
db 3
|
||||
db "つかう@" ; use
|
||||
db "すてる@" ; toss
|
||||
|
|
@ -590,7 +593,7 @@ SelectedItemMenu:
|
|||
db 01
|
||||
|
||||
.SelectedItemMenuText
|
||||
db $C0
|
||||
db (STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING)
|
||||
db 2
|
||||
db "つかう@" ; use
|
||||
db "すてる@" ; toss
|
||||
|
|
@ -607,8 +610,8 @@ RegisterItemSelection:
|
|||
ret
|
||||
|
||||
UseItemSelection:
|
||||
callab CheckItemMenu
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
callfar CheckItemMenu
|
||||
ld a, [wItemAttributeValue]
|
||||
ld hl, .UseItemJumptable
|
||||
jp CallJumptable
|
||||
|
||||
|
|
@ -658,13 +661,13 @@ UseItemSelection:
|
|||
TryTossItem:
|
||||
push de
|
||||
call LoadItemData
|
||||
callab _CheckTossableItem
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
callfar _CheckTossableItem
|
||||
ld a, [wItemAttributeValue]
|
||||
and a
|
||||
jr nz, .TossFail
|
||||
ld hl, .TossedText
|
||||
call MenuTextBox
|
||||
callab SelectQuantityToToss
|
||||
callfar SelectQuantityToToss
|
||||
push af
|
||||
call CloseWindow
|
||||
call ExitMenu
|
||||
|
|
@ -823,7 +826,7 @@ StartMenuLoadSprites:
|
|||
call DisableLCD
|
||||
ld a, 6
|
||||
call UpdateSoundNTimes
|
||||
callab Function140d9
|
||||
callfar Function140d9
|
||||
call LoadTilesetGFX
|
||||
call LoadFontExtra
|
||||
call ClearSprites
|
||||
|
|
@ -835,8 +838,8 @@ StartMenuLoadSprites:
|
|||
ret
|
||||
|
||||
TryRegisterItem:
|
||||
callab CheckItemMenu
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
callfar CheckItemMenu
|
||||
ld a, [wItemAttributeValue]
|
||||
ld hl, .RegisterItemJumptable
|
||||
jp CallJumptable
|
||||
|
||||
|
|
@ -892,23 +895,23 @@ StartMenu_Party:
|
|||
ret
|
||||
.partynonzero
|
||||
call LoadStandardMenuHeader
|
||||
callab Function50756
|
||||
callfar ClearGraphicsForPartyMenu
|
||||
|
||||
HandleSelectedPokemon:
|
||||
xor a
|
||||
ld [wcdb9], a
|
||||
ld [wSelectedSwapPosition], a
|
||||
predef Function50774
|
||||
predef PartyMenuInBattle
|
||||
jr PartyPrompt.partypromptreturn
|
||||
|
||||
PartyPrompt:
|
||||
ld a, [wWhichPokemon]
|
||||
ld a, [wCurPartyMon]
|
||||
inc a
|
||||
ld [wSelectedSwapPosition], a
|
||||
callab Function8f1f2
|
||||
callfar Function8f1f2
|
||||
ld a, 4
|
||||
ld [wcdb9], a
|
||||
predef Function50774
|
||||
predef PartyMenuInBattle
|
||||
.partypromptreturn
|
||||
jr c, .return
|
||||
jp SelectedPokemonSubmenu
|
||||
|
|
@ -932,7 +935,7 @@ SelectedPokemonSubmenu:
|
|||
hlcoord 1, 13
|
||||
lb bc, 4, $12
|
||||
call ClearBox
|
||||
callab Function24955
|
||||
callfar MonSubmenu
|
||||
call GetCurNick
|
||||
ld a, [wMenuSelection]
|
||||
ld hl, PartyJumpTable
|
||||
|
|
@ -972,7 +975,7 @@ PartyCheckLessThanTwo:
|
|||
jp PartyPrompt
|
||||
|
||||
PartyHeldItem:
|
||||
callab Function_8f1cb
|
||||
callfar FreezeMonIcons
|
||||
ld hl, .HoldItemMenu
|
||||
call LoadMenuHeader
|
||||
call VerticalMenu
|
||||
|
|
@ -1009,7 +1012,7 @@ PartyHeldItem:
|
|||
call SpeechTextBox
|
||||
call LoadItemData
|
||||
call CheckTossableItem
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
ld a, [wItemAttributeValue]
|
||||
and a
|
||||
jp nz, .CantGive
|
||||
call GetPartyItemOffset
|
||||
|
|
@ -1198,8 +1201,8 @@ PartyRecieveItem:
|
|||
ret
|
||||
|
||||
UnusedHandleItemJumptable:
|
||||
callab CheckItemMenu
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
callfar CheckItemMenu
|
||||
ld a, [wItemAttributeValue]
|
||||
ld hl, UnusedItemJumptable
|
||||
jp CallJumptable
|
||||
|
||||
|
|
@ -1233,13 +1236,13 @@ PartyBallPocket:
|
|||
PartyGiveMail:
|
||||
call LoadStandardMenuHeader
|
||||
ld de, wMovementBufferCount
|
||||
callab ComposeMailMessage
|
||||
callfar ComposeMailMessage
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
call LoadFontsBattleExtra
|
||||
call Call_ExitMenu
|
||||
call WaitBGMap
|
||||
ld a, [wWhichPokemon]
|
||||
ld a, [wCurPartyMon]
|
||||
ld hl, $BA68
|
||||
ld bc, $0028
|
||||
call AddNTimes
|
||||
|
|
@ -1269,7 +1272,7 @@ PartyMailMenu:
|
|||
call YesNoBox
|
||||
call CloseWindow
|
||||
jp c, .exit
|
||||
ld a, [wWhichPokemon]
|
||||
ld a, [wCurPartyMon]
|
||||
ld hl, wPartyMon1 + MON_ITEM
|
||||
ld bc, $0030
|
||||
call AddNTimes
|
||||
|
|
@ -1289,7 +1292,7 @@ PartyMailMenu:
|
|||
call MenuTextBoxBackup
|
||||
jr .exit
|
||||
.GiveMail
|
||||
ld a, [wWhichPokemon]
|
||||
ld a, [wCurPartyMon]
|
||||
ld hl, $BA68
|
||||
ld bc, $0028
|
||||
call AddNTimes
|
||||
|
|
@ -1365,7 +1368,7 @@ PartyPokemonSummary:
|
|||
jp HandleSelectedPokemon
|
||||
|
||||
PartyTryCut:
|
||||
callab CutFunction
|
||||
callfar CutFunction
|
||||
ld a, [wFieldMoveSucceeded]
|
||||
cp $F
|
||||
jp nz, HandleSelectedPokemon
|
||||
|
|
@ -1375,7 +1378,7 @@ PartyTryCut:
|
|||
PartyTryFly:
|
||||
bit 2, a
|
||||
jp z, PrintNeedNewBadgeText
|
||||
callab FlyFunction
|
||||
callfar FlyFunction
|
||||
ld a, [wFieldMoveSucceeded]
|
||||
cp $F
|
||||
jp nz, HandleSelectedPokemon
|
||||
|
|
@ -1387,7 +1390,7 @@ PartyCantUseMove:
|
|||
jp HandleSelectedPokemon
|
||||
|
||||
PartyTryTeleport:
|
||||
callab TeleportFunction
|
||||
callfar TeleportFunction
|
||||
ld a, [wFieldMoveSucceeded]
|
||||
and a
|
||||
jp z, HandleSelectedPokemon
|
||||
|
|
@ -1397,7 +1400,7 @@ PartyTryTeleport:
|
|||
PartyTrySurf:
|
||||
bit 4, a
|
||||
jp z, PrintNeedNewBadgeText
|
||||
callab SurfFunction
|
||||
callfar SurfFunction
|
||||
ld a, [wFieldMoveSucceeded]
|
||||
and a
|
||||
jp z, HandleSelectedPokemon
|
||||
|
|
@ -1405,7 +1408,7 @@ PartyTrySurf:
|
|||
jp PartyPromptExit
|
||||
|
||||
PartyTryDig:
|
||||
callab DigFunction
|
||||
callfar DigFunction
|
||||
ld a, [wFieldMoveSucceeded]
|
||||
cp $F
|
||||
jp nz, HandleSelectedPokemon
|
||||
|
|
@ -1429,9 +1432,9 @@ PartyCalculateHealth:
|
|||
sub [hl]
|
||||
dec hl
|
||||
ldh a, [hQuotient + 1]
|
||||
sbc a, [hl]
|
||||
sbc [hl]
|
||||
jp nc, PrintNotHealthyEnoughText
|
||||
callab Functionf218
|
||||
callfar Functionf218
|
||||
jp HandleSelectedPokemon
|
||||
|
||||
PrintNotHealthyEnoughText:
|
||||
|
|
@ -1468,9 +1471,9 @@ PokeSummary:
|
|||
call ClearSprites
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
callab LoadOnlyPokemonStatsGraphics
|
||||
callab Function8f0cc
|
||||
ld a, [wWhichPokemon]
|
||||
callfar LoadOnlyPokemonStatsGraphics
|
||||
callfar Function8f0cc
|
||||
ld a, [wCurPartyMon]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, wPartySpecies
|
||||
|
|
@ -1498,7 +1501,7 @@ PokeSummary:
|
|||
lb bc, 1, 9
|
||||
call ClearBox
|
||||
hlcoord 16, 0
|
||||
ld a, [wWhichPokemon]
|
||||
ld a, [wCurPartyMon]
|
||||
and a
|
||||
jr z, .FirstPokeChosen
|
||||
ld [hl], "」"
|
||||
|
|
@ -1519,20 +1522,20 @@ SummaryDrawPoke:
|
|||
ldh [hBGMapMode], a
|
||||
ld [wSelectedSwapPosition], a
|
||||
ld [wMonType], a
|
||||
predef Function50000
|
||||
ld hl, wcd81
|
||||
ld de, wce2e
|
||||
predef CopyMonToTempMon
|
||||
ld hl, wTempMonMoves
|
||||
ld de, wListMoves_MoveIndicesBuffer
|
||||
ld bc, $0004
|
||||
call CopyBytes
|
||||
ld a, $28
|
||||
ld [wHPBarMaxHP], a
|
||||
hlcoord 2, 3
|
||||
predef Function50bfe
|
||||
predef ListMoves
|
||||
hlcoord 11, 3
|
||||
predef Function506d4
|
||||
predef ListMovePP
|
||||
call WaitBGMap
|
||||
call SetPalettes
|
||||
ld a, [wcd57]
|
||||
ld a, [wNumMoves]
|
||||
inc a
|
||||
ld [w2DMenuNumRows], a
|
||||
hlcoord 0, 10
|
||||
|
|
@ -1555,7 +1558,7 @@ PartySelectionInputs:
|
|||
.PartySelectSkipInputs
|
||||
ld hl, wPartyMon1 + MON_MOVES
|
||||
lb bc, 0, $30
|
||||
ld a, [wWhichPokemon]
|
||||
ld a, [wCurPartyMon]
|
||||
call AddNTimes
|
||||
ld a, [wMenuCursorY]
|
||||
dec a
|
||||
|
|
@ -1576,13 +1579,13 @@ PartySelectionInputs:
|
|||
ld a, [wCurSpecies]
|
||||
ld b, a
|
||||
hlcoord 5, 12
|
||||
predef Function500a0
|
||||
predef PrintMoveType
|
||||
ld a, [wCurSpecies]
|
||||
dec a
|
||||
ld hl, Data418b8
|
||||
ld bc, $7
|
||||
ld hl, Moves + MOVE_POWER
|
||||
ld bc, MOVE_LENGTH
|
||||
call AddNTimes
|
||||
ld a, BANK(Data418b8)
|
||||
ld a, BANK(Moves)
|
||||
call GetFarByte
|
||||
hlcoord 15, 12
|
||||
cp 2
|
||||
|
|
@ -1610,7 +1613,7 @@ PartySelectionInputs:
|
|||
jp PartySelectionInputs
|
||||
|
||||
.PartyPokeDetailsAdvancePage
|
||||
ld hl, wWhichPokemon
|
||||
ld hl, wCurPartyMon
|
||||
inc [hl]
|
||||
ld a, [wPartyCount]
|
||||
cp [hl]
|
||||
|
|
@ -1619,7 +1622,7 @@ PartySelectionInputs:
|
|||
jp PartySelectionInputs
|
||||
|
||||
.PartyPokeDetailsBackPage
|
||||
ld hl, wWhichPokemon
|
||||
ld hl, wCurPartyMon
|
||||
ld a, [hl]
|
||||
and a
|
||||
jp z, PartySelectionInputs
|
||||
|
|
@ -1637,7 +1640,7 @@ PartySelectionInputs:
|
|||
.swap
|
||||
ld hl, wPartyMon1 + MON_MOVES
|
||||
ld bc, $0030
|
||||
ld a, [wWhichPokemon]
|
||||
ld a, [wCurPartyMon]
|
||||
call AddNTimes
|
||||
push hl
|
||||
call SwapEntries
|
||||
|
|
@ -1647,9 +1650,9 @@ PartySelectionInputs:
|
|||
call SwapEntries
|
||||
ld a, [wBattleMode]
|
||||
jr z, .NotInBattle
|
||||
ld hl, wca04
|
||||
ld hl, wBattleMonMoves
|
||||
ld bc, $0020
|
||||
ld a, [wWhichPokemon]
|
||||
ld a, [wCurPartyMon]
|
||||
call AddNTimes
|
||||
push hl
|
||||
call SwapEntries
|
||||
|
|
@ -1792,8 +1795,8 @@ GetRegisteredItemID:
|
|||
ret
|
||||
|
||||
UseRegisteredItem:
|
||||
callab CheckItemMenu
|
||||
ld a, [wItemAttributeParamBuffer]
|
||||
callfar CheckItemMenu
|
||||
ld a, [wItemAttributeValue]
|
||||
ld hl, .RegisteredItemJumptable
|
||||
jp CallJumptable
|
||||
|
||||
|
|
@ -2110,15 +2113,15 @@ DrawTrainerCardMainPage:
|
|||
ld de, wPlayerName
|
||||
call PlaceString
|
||||
hlcoord 5, 4
|
||||
ld de, wce73
|
||||
ld de, wPlayerID
|
||||
lb bc, 2, 5
|
||||
call PrintNumber
|
||||
hlcoord 7, 6
|
||||
ld de, wd15d
|
||||
ld de, wMoney
|
||||
lb bc, 3, 6
|
||||
call PrintNumber
|
||||
ld [hl], $F0
|
||||
ld hl, wPokedexOwned
|
||||
ld hl, wPokedexCaught
|
||||
ld b, $1C
|
||||
call CountSetBits
|
||||
ld de, wce37
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ NamingScreenJoypadLoop:
|
|||
bit 7, a
|
||||
jr nz, .leap
|
||||
call .RunJumpTable
|
||||
callba PlaySpriteAnimationsAndDelayFrame
|
||||
farcall PlaySpriteAnimationsAndDelayFrame
|
||||
call .UpdateStringEntry
|
||||
call DelayFrame
|
||||
and a
|
||||
|
|
@ -255,7 +255,7 @@ NamingScreenJoypadLoop:
|
|||
|
||||
.leap
|
||||
; kills sprites and resets screen position
|
||||
callab InitEffectObject
|
||||
callfar InitEffectObject
|
||||
call ClearSprites
|
||||
xor a
|
||||
ldh [hSCX], a
|
||||
|
|
@ -620,7 +620,7 @@ NamingScreenGetLastCharacter:
|
|||
|
||||
LoadNamingScreenGFX:
|
||||
call ClearSprites
|
||||
callab InitEffectObject
|
||||
callfar InitEffectObject
|
||||
call LoadFont
|
||||
|
||||
ld de, TextScreenGFX_End
|
||||
|
|
@ -811,14 +811,14 @@ DoMailEntry:
|
|||
bit 7, a
|
||||
jr nz, .exit_mail
|
||||
call .DoJumpTable
|
||||
callba PlaySpriteAnimationsAndDelayFrame
|
||||
farcall PlaySpriteAnimationsAndDelayFrame
|
||||
call .Update
|
||||
call DelayFrame
|
||||
and a
|
||||
ret
|
||||
|
||||
.exit_mail
|
||||
callab InitEffectObject
|
||||
callfar InitEffectObject
|
||||
call ClearSprites
|
||||
xor a
|
||||
ldh [hSCX], a
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ GameFreakIntro::
|
|||
ld b, SGB_GF_INTRO
|
||||
call GetSGBLayout
|
||||
|
||||
callab IntroCopyRightInfo
|
||||
callfar IntroCopyRightInfo
|
||||
|
||||
ld a, 1
|
||||
ldh [hBGMapMode], a
|
||||
|
|
@ -77,7 +77,7 @@ GameFreakIntro::
|
|||
ld a, BANK(GameFreakLogoSparkleGFX)
|
||||
call FarCopyData
|
||||
|
||||
callba InitEffectObject
|
||||
farcall InitEffectObject
|
||||
|
||||
ld hl, wSpriteAnimDict
|
||||
ld a, SPRITE_ANIM_DICT_GS_SPLASH
|
||||
|
|
@ -119,7 +119,7 @@ GameFreakIntro::
|
|||
bit 7, a
|
||||
jr nz, .Finished
|
||||
|
||||
callba EffectObjectJumpNoDelay
|
||||
farcall EffectObjectJumpNoDelay
|
||||
|
||||
call GameFreakPresentsScene
|
||||
call DelayFrame
|
||||
|
|
@ -131,7 +131,7 @@ GameFreakIntro::
|
|||
set 6, [hl]
|
||||
|
||||
.Finished:
|
||||
callab InitEffectObject
|
||||
callfar InitEffectObject
|
||||
call ClearTileMap
|
||||
call ClearSprites
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ GameStart::
|
|||
call ClearTileMap
|
||||
ld a, DEX_YADOKING
|
||||
ld [wCurSpecies], a
|
||||
ld [wMonDexIndex], a
|
||||
call GetMonHeader
|
||||
ld [wCurPartySpecies], a
|
||||
call GetBaseData
|
||||
hlcoord 6, 4
|
||||
hlcoord 6, 4
|
||||
call PrepMonFrontpic
|
||||
|
|
@ -69,7 +69,7 @@ GameStart::
|
|||
call FadeInIntroPic
|
||||
ld hl, OakSpeech6
|
||||
call PrintText
|
||||
callba SetClockDialog
|
||||
farcall SetClockDialog
|
||||
call Function04ac
|
||||
call GBFadeOutToWhite
|
||||
call ClearTileMap
|
||||
|
|
@ -162,11 +162,11 @@ GameStartPlacement::
|
|||
DebugSetUpPlayer::
|
||||
call SetPlayerNamesDebug
|
||||
ld a, $0F
|
||||
ld [wd15d], a
|
||||
ld [wMoney], a
|
||||
ld a, $42
|
||||
ld [wd15e], a
|
||||
ld [wMoney + 1], a
|
||||
ld a, $3F
|
||||
ld [wd15f], a
|
||||
ld [wMoney + 2], a
|
||||
ld a, $FF ; give all badges
|
||||
ld [wJohtoBadges], a
|
||||
ld [wKantoBadges], a
|
||||
|
|
@ -176,11 +176,11 @@ DebugSetUpPlayer::
|
|||
call FillTMs
|
||||
ld de, DebugBagItems
|
||||
call FillBagWithList
|
||||
ld hl, wPokedexOwned
|
||||
ld hl, wPokedexCaught
|
||||
call DebugFillPokedex
|
||||
ld hl, wPokedexSeen
|
||||
call DebugFillPokedex
|
||||
ld hl, wAnnonDex
|
||||
ld hl, wUnownDex
|
||||
ld [hl], $01
|
||||
call Function40fd
|
||||
ret
|
||||
|
|
@ -276,7 +276,7 @@ GiveKantoStarters::
|
|||
ret
|
||||
|
||||
GivePokemon::
|
||||
ld [wMonDexIndex], a
|
||||
ld [wCurPartySpecies], a
|
||||
ld a, b
|
||||
ld [wCurPartyLevel], a
|
||||
ld a, $10
|
||||
|
|
@ -291,13 +291,13 @@ AddRandomPokemonToBox:
|
|||
xor a
|
||||
ld [wca44], a
|
||||
call RandomUnder246
|
||||
ld [wcdd7], a
|
||||
ld [wTempEnemyMonSpecies], a
|
||||
ld a, $05
|
||||
ld [wCurPartyLevel], a
|
||||
callab AddPokemonToBox
|
||||
ld a, [wcdd7]
|
||||
ld [wMonDexIndex], a
|
||||
callab Functiondd5c
|
||||
callfar AddPokemonToBox
|
||||
ld a, [wTempEnemyMonSpecies]
|
||||
ld [wCurPartySpecies], a
|
||||
callfar Functiondd5c
|
||||
pop af
|
||||
dec a
|
||||
jr nz, .loop
|
||||
|
|
@ -494,7 +494,7 @@ ChoosePlayerName::
|
|||
.loop
|
||||
ld b, $01
|
||||
ld de, wPlayerName
|
||||
callba NamingScreen
|
||||
farcall NamingScreen
|
||||
ld a, [wPlayerName]
|
||||
cp "@"
|
||||
jr z, .loop
|
||||
|
|
@ -547,7 +547,7 @@ ChooseRivalName::
|
|||
.loop
|
||||
ld b, $02
|
||||
ld de, wRivalName
|
||||
callba NamingScreen
|
||||
farcall NamingScreen
|
||||
ld a, [wRivalName]
|
||||
cp "@"
|
||||
jr z, .loop
|
||||
|
|
@ -599,14 +599,14 @@ MomNamePrompt::
|
|||
.loop
|
||||
ld b, $03
|
||||
ld de, wMomsName
|
||||
callba NamingScreen
|
||||
farcall NamingScreen
|
||||
ld a, [wMomsName]
|
||||
cp "@"
|
||||
jr z, .loop
|
||||
|
||||
call ClearPalettes
|
||||
call ClearTileMap
|
||||
callab Function140d9
|
||||
callfar Function140d9
|
||||
call LoadFontExtra
|
||||
call GetMemSGBLayout
|
||||
call WaitBGMap
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ OpeningCutscene::
|
|||
ret
|
||||
|
||||
.Init:
|
||||
callba InitEffectObject
|
||||
farcall InitEffectObject
|
||||
xor a
|
||||
ld [wIntroJumptableIndex], a
|
||||
ldh [hBGMapMode], a
|
||||
|
|
@ -27,14 +27,14 @@ OpeningCutscene::
|
|||
bit 7, a
|
||||
jr nz, .Finish
|
||||
|
||||
callba EffectObjectJumpNoDelay
|
||||
farcall EffectObjectJumpNoDelay
|
||||
call IntroSceneJumper
|
||||
call DelayFrame
|
||||
and a
|
||||
ret
|
||||
|
||||
.Finish:
|
||||
callab InitEffectObject
|
||||
callfar InitEffectObject
|
||||
call ClearSprites
|
||||
call DelayFrame
|
||||
xor a
|
||||
|
|
@ -80,7 +80,7 @@ IntroScene1:
|
|||
ld c, 0
|
||||
call GetSGBLayout
|
||||
|
||||
callab InitEffectObject
|
||||
callfar InitEffectObject
|
||||
|
||||
call Intro_ResetLYOverrides
|
||||
|
||||
|
|
@ -330,7 +330,7 @@ IntroScene3_Jumper:
|
|||
call Intro_InitMagikarps
|
||||
ret
|
||||
.load_palettes
|
||||
callab LoadMagikarpPalettes_Intro
|
||||
callfar LoadMagikarpPalettes_Intro
|
||||
ret
|
||||
|
||||
.scene3_5:
|
||||
|
|
@ -547,7 +547,7 @@ Intro_InitSineLYOverrides:
|
|||
.loop
|
||||
push af
|
||||
push de
|
||||
callba BattleAnim_Sine_e
|
||||
farcall BattleAnim_Sine_e
|
||||
ld a, e
|
||||
ld [bc], a
|
||||
inc bc
|
||||
|
|
@ -602,7 +602,7 @@ IntroScene6:
|
|||
ld b, SGB_GS_INTRO
|
||||
ld c, 1
|
||||
call GetSGBLayout
|
||||
callab InitEffectObject
|
||||
callfar InitEffectObject
|
||||
call Intro_ResetLYOverrides
|
||||
ld hl, vChars2
|
||||
ld de, IntroForestGFX
|
||||
|
|
@ -700,7 +700,7 @@ IntroScene8:
|
|||
ld [wIntroFrameCounter1], a
|
||||
ld hl, wIntroJumptableIndex
|
||||
inc [hl]
|
||||
callab LoadForestPalettes2_Intro
|
||||
callfar LoadForestPalettes2_Intro
|
||||
ret
|
||||
|
||||
IntroScene9:
|
||||
|
|
@ -791,7 +791,7 @@ IntroScene10:
|
|||
ld b, SGB_GS_INTRO
|
||||
ld c, 2
|
||||
call GetSGBLayout
|
||||
callab InitEffectObject
|
||||
callfar InitEffectObject
|
||||
call Intro_ResetLYOverrides
|
||||
call Intro_BlankTilemapAndBGMap
|
||||
|
||||
|
|
@ -1057,11 +1057,11 @@ Intro_FlashSilhouette:
|
|||
ret
|
||||
|
||||
Intro_LoadVenusaurPalette:
|
||||
callab LoadVenusaurPalettes_Intro
|
||||
callfar LoadVenusaurPalettes_Intro
|
||||
ret
|
||||
|
||||
Intro_LoadCharizardPalette:
|
||||
callab LoadCharizardPalettes_Intro
|
||||
callfar LoadCharizardPalettes_Intro
|
||||
ret
|
||||
|
||||
DrawIntroCharizardGraphic:
|
||||
|
|
|
|||
|
|
@ -3,22 +3,22 @@ INCLUDE "constants.asm"
|
|||
SECTION "engine/movie/title.asm@Title screen", ROMX
|
||||
|
||||
IntroSequence::
|
||||
callab GameFreakIntro
|
||||
callfar GameFreakIntro
|
||||
jr c, TitleSequenceStart
|
||||
ld a, [wTitleSequenceOpeningType]
|
||||
and a
|
||||
jr z, .opening_sequence
|
||||
|
||||
.pikachu_minigame
|
||||
callab PikachuMiniGame
|
||||
callfar PikachuMiniGame
|
||||
jr TitleSequenceStart
|
||||
|
||||
.opening_sequence
|
||||
callab OpeningCutscene
|
||||
callfar OpeningCutscene
|
||||
|
||||
TitleSequenceStart::
|
||||
call TitleSequenceInit
|
||||
callab SetTitleBGDecorationBorder
|
||||
callfar SetTitleBGDecorationBorder
|
||||
|
||||
.loop
|
||||
call TitleScreenMain
|
||||
|
|
@ -64,7 +64,7 @@ TitleSequenceInit::
|
|||
call DisableLCD
|
||||
call ClearSprites
|
||||
|
||||
callba InitEffectObject
|
||||
farcall InitEffectObject
|
||||
ld hl, vChars0
|
||||
ld bc, vBGMap0 - vChars0
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ TitleScreenMain::
|
|||
bit 7, a
|
||||
jr nz, .exit
|
||||
call TitleScreenSequence
|
||||
callba EffectObjectJumpNoDelay
|
||||
farcall EffectObjectJumpNoDelay
|
||||
call DelayFrame
|
||||
and a
|
||||
ret
|
||||
|
|
@ -540,7 +540,7 @@ SRAMClearMenu::
|
|||
cp $01
|
||||
jp z, Init
|
||||
|
||||
callab InitAllSRAMBanks
|
||||
callfar InitAllSRAMBanks
|
||||
jp Init
|
||||
|
||||
SRAMClear_Message::
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ OverworldMovementCheck::
|
|||
UnusedOverworldMovementCheck::
|
||||
ld a, PLAYER_OBJECT_INDEX
|
||||
ldh [hEventCollisionException], a
|
||||
ld a, [wPlayerDirection]
|
||||
ld a, [wPlayerStepType]
|
||||
and a
|
||||
jr z, SetPlayerIdle ; player movement is disabled
|
||||
ldh a, [hJoyState]
|
||||
|
|
@ -514,7 +514,7 @@ IsPlayerCollisionTileSolid::
|
|||
; c - solid/sometimes solid
|
||||
push de
|
||||
ld bc, wPlayerStruct
|
||||
callab _IsObjectCollisionTileSolid
|
||||
callfar _IsObjectCollisionTileSolid
|
||||
ld a, e
|
||||
pop de
|
||||
ret
|
||||
|
|
@ -526,7 +526,7 @@ CheckPlayerObjectCollision::
|
|||
; nc - no collision
|
||||
; c - collision
|
||||
push de
|
||||
callab _CheckPlayerObjectCollision
|
||||
callfar _CheckPlayerObjectCollision
|
||||
pop de
|
||||
ret nc
|
||||
jp CheckCompanionObjectCollision
|
||||
|
|
@ -565,7 +565,7 @@ CheckCompanionObjectCollision::
|
|||
_OverworldMovementCheck::
|
||||
ld a, PLAYER_OBJECT_INDEX
|
||||
ldh [hEventCollisionException], a
|
||||
ld a, [wPlayerDirection]
|
||||
ld a, [wPlayerStepType]
|
||||
and a
|
||||
jp z, SetPlayerIdle
|
||||
ldh a, [hJoyState]
|
||||
|
|
@ -1040,7 +1040,7 @@ CheckObjectCollision::
|
|||
ld a, [wPlayerMapY]
|
||||
add e
|
||||
ld e, a
|
||||
callab _CheckObjectCollision
|
||||
callfar _CheckObjectCollision
|
||||
ret nc
|
||||
jp CheckCompanionObjectCollision
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ HealParty:
|
|||
|
||||
.party_done
|
||||
xor a
|
||||
ld [wWhichPokemon], a
|
||||
ld [wCurPartyMon], a
|
||||
ld [wce37], a
|
||||
ld a, [wPartyCount]
|
||||
ld b, a
|
||||
|
|
@ -89,7 +89,7 @@ HealParty:
|
|||
push bc
|
||||
call ApplyPPUp
|
||||
pop bc
|
||||
ld hl, wWhichPokemon
|
||||
ld hl, wCurPartyMon
|
||||
inc [hl]
|
||||
dec b
|
||||
jr nz, .pp_up
|
||||
|
|
@ -236,7 +236,7 @@ UpdateHPBar_AnimateHPBar:
|
|||
push af
|
||||
push de
|
||||
ld d, HP_BAR_LENGTH
|
||||
ld a, [wHPBarType]
|
||||
ld a, [wWhichHPBar]
|
||||
and BATTLE_HP_BAR
|
||||
ld b, a
|
||||
call DrawBattleHPBar
|
||||
|
|
@ -300,7 +300,7 @@ UpdateHPBar_CalcHPDifference:
|
|||
UpdateHPBar_PrintHPNumber:
|
||||
push af
|
||||
push de
|
||||
ld a, [wHPBarType]
|
||||
ld a, [wWhichHPBar]
|
||||
and a
|
||||
jr z, .done
|
||||
ld a, [wHPBarOldHP]
|
||||
|
|
|
|||
|
|
@ -107,25 +107,25 @@ AddOutdoorSprites:
|
|||
ret
|
||||
|
||||
Function140d9:
|
||||
ld hl, wcdaf
|
||||
ld hl, wSpriteFlags
|
||||
ld a, [hl]
|
||||
push af
|
||||
res 7, [hl]
|
||||
set 6, [hl]
|
||||
call LoadUsedSpritesGfx
|
||||
pop af
|
||||
ld [wcdaf], a
|
||||
ld [wSpriteFlags], a
|
||||
ret
|
||||
|
||||
Function140ea:
|
||||
ld hl, wcdaf
|
||||
ld hl, wSpriteFlags
|
||||
ld a, [hl]
|
||||
push af
|
||||
set 7, [hl]
|
||||
res 6, [hl]
|
||||
call LoadUsedSpritesGfx
|
||||
pop af
|
||||
ld [wcdaf], a
|
||||
ld [wSpriteFlags], a
|
||||
ret
|
||||
|
||||
LoadUsedSpritesGfx:
|
||||
|
|
@ -197,7 +197,7 @@ LoadOverworldSprite:
|
|||
push bc
|
||||
push hl
|
||||
push de
|
||||
ld a, [wcdaf]
|
||||
ld a, [wSpriteFlags]
|
||||
bit 7, a
|
||||
jr nz, .dont_copy
|
||||
call Get2bpp
|
||||
|
|
@ -214,7 +214,7 @@ LoadOverworldSprite:
|
|||
pop af
|
||||
call IsAnimatedSprite
|
||||
ret c
|
||||
ld a, [wcdaf]
|
||||
ld a, [wSpriteFlags]
|
||||
bit 6, a
|
||||
ret nz
|
||||
call Get2bpp
|
||||
|
|
|
|||
|
|
@ -169,13 +169,13 @@ TrainerGear_Loop:
|
|||
bit TRAINERGEAR_END_LOOP_F, a
|
||||
jr nz, .done
|
||||
call TrainerGear_Jumptable
|
||||
callba EffectObjectJumpNoDelay
|
||||
farcall EffectObjectJumpNoDelay
|
||||
call TrainerGear_UpdateTime
|
||||
call DelayFrame
|
||||
and a
|
||||
ret
|
||||
.done
|
||||
callab InitEffectObject
|
||||
callfar InitEffectObject
|
||||
call ClearSprites
|
||||
xor a
|
||||
ldh [hSCX], a
|
||||
|
|
@ -224,7 +224,7 @@ TrainerGear_Next:
|
|||
ret
|
||||
|
||||
TrainerGear_InitPointerSprite:
|
||||
callab InitEffectObject
|
||||
callfar InitEffectObject
|
||||
ld de, PointerGFX
|
||||
ld hl, vChars0 tile TRAINERGEAR_GFX_POINTER
|
||||
lb bc, BANK(PointerGFX), 4
|
||||
|
|
@ -623,7 +623,7 @@ TrainerGear_PhoneJoypad:
|
|||
ret
|
||||
|
||||
TrainerGear_ClearView:
|
||||
callab InitEffectObject
|
||||
callfar InitEffectObject
|
||||
call ClearSprites
|
||||
call WaitForAutoBgMapTransfer
|
||||
coord hl, 0, 3
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ Function1130b:
|
|||
cp PARTY_LENGTH
|
||||
jr c, .bigjump
|
||||
ld a, [wBoxListLength]
|
||||
cp $1E
|
||||
cp MONS_PER_BOX
|
||||
jr nc, .fullbox
|
||||
xor a
|
||||
ld [wca44], a
|
||||
ld a, [wMonDexIndex]
|
||||
ld [wcdd7], a
|
||||
callab AddPokemonToBox
|
||||
ld a, [wCurPartySpecies]
|
||||
ld [wTempEnemyMonSpecies], a
|
||||
callfar AddPokemonToBox
|
||||
call RecievePokemon
|
||||
predef Functiondd5c
|
||||
and $7F
|
||||
|
|
@ -40,12 +40,12 @@ Function1130b:
|
|||
ret
|
||||
|
||||
RecievePokemon:
|
||||
ld a, [wMonDexIndex]
|
||||
ld a, [wCurPartySpecies]
|
||||
push af
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
dec a
|
||||
ld c, a
|
||||
ld hl, wPokedexOwned
|
||||
ld hl, wPokedexCaught
|
||||
ld b, 01 ;SET_FLAG
|
||||
predef SmallFarFlagAction
|
||||
pop af
|
||||
|
|
|
|||
|
|
@ -3,19 +3,19 @@ INCLUDE "constants.asm"
|
|||
SECTION "home/copy2.asm", ROM0
|
||||
|
||||
RedrawPlayerSprite::
|
||||
jpab _RedrawPlayerSprite
|
||||
jpfar _RedrawPlayerSprite
|
||||
|
||||
LoadFont::
|
||||
jpab LoadFontGraphics
|
||||
jpfar LoadFontGraphics
|
||||
|
||||
LoadFontsBattleExtra::
|
||||
jpab LoadPokemonMenuGraphics
|
||||
jpfar LoadPokemonMenuGraphics
|
||||
|
||||
LoadFontExtra::
|
||||
jpab LoadFontExtraGraphicsWithCursor
|
||||
jpfar LoadFontExtraGraphicsWithCursor
|
||||
|
||||
LoadToolgearGraphics::
|
||||
jpab LoadToolgearGraphicsDebug
|
||||
jpfar LoadToolgearGraphicsDebug
|
||||
|
||||
FarCopyData:
|
||||
; Identical to FarCopyBytes except for tail call optimization.
|
||||
|
|
|
|||
10
home/cry.asm
10
home/cry.asm
|
|
@ -64,7 +64,7 @@ GetCryIndex::
|
|||
push af
|
||||
ld a, d
|
||||
ld [wce37], a
|
||||
callba Function40b45
|
||||
farcall ConvertMon_2to1
|
||||
ld a, [wce37]
|
||||
dec a
|
||||
ld c, a
|
||||
|
|
@ -77,7 +77,7 @@ PrintLevel::
|
|||
ld a, $6e ; ":L"
|
||||
ld [hli], a
|
||||
ld c, 2
|
||||
ld a, [wLoadedMonLevel]
|
||||
ld a, [wTempMonLevel]
|
||||
cp 100
|
||||
jr c, _PrintLevelCommon
|
||||
dec hl
|
||||
|
|
@ -88,15 +88,15 @@ PrintLevelFullWidth::
|
|||
ld a, $6e ; ":L"
|
||||
ld [hli], a
|
||||
ld c, 3
|
||||
ld a, [wLoadedMonLevel]
|
||||
ld a, [wTempMonLevel]
|
||||
_PrintLevelCommon:
|
||||
ld [wce37], a
|
||||
ld de, wce37
|
||||
ld b, PRINTNUM_RIGHTALIGN | 1
|
||||
jp PrintNumber
|
||||
|
||||
Function3a42::
|
||||
ld hl, wce2e
|
||||
GetNthMove:: ; unreferenced?
|
||||
ld hl, wListMoves_MoveIndicesBuffer
|
||||
ld c, a
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
|
|
|
|||
45
home/map.asm
45
home/map.asm
|
|
@ -325,13 +325,13 @@ MapSetup_22af::
|
|||
ret
|
||||
|
||||
MapSetup_22de::
|
||||
callab OverworldFadeOut
|
||||
callfar OverworldFadeOut
|
||||
|
||||
MapSetup_Continue::
|
||||
call DisableLCD
|
||||
call DisableAudio
|
||||
call VolumeOff
|
||||
callab LoadSpawnPoint
|
||||
callfar LoadSpawnPoint
|
||||
call CopyMapPartialAndAttributes
|
||||
call SetUpMapBuffer
|
||||
call InitUnknownBuffercc9e
|
||||
|
|
@ -348,19 +348,19 @@ MapSetup_Continue::
|
|||
ld b, 9 ; TODO: constantify this
|
||||
call GetSGBLayout
|
||||
call LoadWildMons
|
||||
call $242C ; TODO
|
||||
call Function242c ; TODO
|
||||
call FadeIn
|
||||
ret
|
||||
|
||||
MapSetup_Warp::
|
||||
callab OverworldFadeOut
|
||||
callfar OverworldFadeOut
|
||||
call DisableLCD
|
||||
call Function27C7 ; TODO
|
||||
ld a, [wNextWarp]
|
||||
ld [wWarpNumber], a
|
||||
ld a, [wNextMapGroup]
|
||||
ld [wMapGroup], a
|
||||
ld a, [wNextMapId]
|
||||
ld a, [wNextMapNumber]
|
||||
ld [wMapId], a
|
||||
call CopyMapPartialAndAttributes
|
||||
call SetUpMapBuffer
|
||||
|
|
@ -381,7 +381,7 @@ MapSetup_Warp::
|
|||
ret
|
||||
|
||||
LoadMapTimeOfDay::
|
||||
callab ReplaceTimeOfDayPals
|
||||
callfar ReplaceTimeOfDayPals
|
||||
call LoadMapPart
|
||||
call .ClearBGMap
|
||||
call .PushAttrMap
|
||||
|
|
@ -422,18 +422,18 @@ LoadMapTimeOfDay::
|
|||
ret
|
||||
|
||||
LoadWildMons::
|
||||
callab _LoadWildMons
|
||||
callfar _LoadWildMons
|
||||
ret
|
||||
|
||||
LoadGraphics::
|
||||
call LoadTileset
|
||||
call LoadTilesetGFX
|
||||
callba RefreshSprites
|
||||
farcall RefreshSprites
|
||||
call LoadFontExtra
|
||||
ret
|
||||
|
||||
InitializeVisibleSprites::
|
||||
callab _InitializeVisibleSprites
|
||||
callfar _InitializeVisibleSprites
|
||||
ret
|
||||
|
||||
FadeIn:: ; This is not OverworldFadeIn, but I don't know what it is
|
||||
|
|
@ -442,16 +442,16 @@ FadeIn:: ; This is not OverworldFadeIn, but I don't know what it is
|
|||
ld hl, wVramState
|
||||
set 0, [hl]
|
||||
call Function2407
|
||||
callab _UpdateSprites
|
||||
callfar _UpdateSprites
|
||||
call DelayFrame
|
||||
callab OverworldFadeIn
|
||||
callfar OverworldFadeIn
|
||||
ret
|
||||
|
||||
Function2407::
|
||||
ld a, NO_MOVEMENT
|
||||
ld [wPlayerMovement], a
|
||||
xor a
|
||||
ld [wPlayerAction], a
|
||||
ld [wPlayerStepFrame], a
|
||||
ld a, [wPlayerFacing]
|
||||
and $c
|
||||
ld [wPlayerFacing], a
|
||||
|
|
@ -466,6 +466,7 @@ Function2407::
|
|||
ret z
|
||||
cp $78
|
||||
ret z
|
||||
Function242c::
|
||||
ld a, $0
|
||||
ld [wPlayerFacing], a
|
||||
ld a, $0
|
||||
|
|
@ -692,7 +693,7 @@ WarpCheck::
|
|||
ld a, [hli]
|
||||
ld [wNextMapGroup], a
|
||||
ld a, [hli]
|
||||
ld [wNextMapId], a
|
||||
ld [wNextMapNumber], a
|
||||
ld a, c
|
||||
ld [wPrevWarp], a
|
||||
ld a, MAPSETUP_WARP
|
||||
|
|
@ -894,7 +895,7 @@ ReadObjectEvents::
|
|||
.skip
|
||||
ld a, [wCurrMapObjectCount]
|
||||
ld c, a
|
||||
ld a, NUM_OBJECTS
|
||||
ld a, NUM_OBJECTS
|
||||
sub c
|
||||
jr z, .finish
|
||||
|
||||
|
|
@ -1092,7 +1093,7 @@ Function27C7:: ; TODO
|
|||
.interior
|
||||
ld a, [wNextMapGroup]
|
||||
ld b, a
|
||||
ld a, [wNextMapId]
|
||||
ld a, [wNextMapNumber]
|
||||
ld c, a
|
||||
call GetAnyMapEnvironment
|
||||
cp 3
|
||||
|
|
@ -1114,7 +1115,7 @@ Function27C7:: ; TODO
|
|||
ret
|
||||
|
||||
LoadMapPart::
|
||||
callab UpdateTimeOfDayPal
|
||||
callfar UpdateTimeOfDayPal
|
||||
|
||||
ldh a, [hROMBank]
|
||||
push af
|
||||
|
|
@ -1612,13 +1613,13 @@ Function2ae5::
|
|||
ret nz
|
||||
call OverworldStartButtonCheck
|
||||
ret nz
|
||||
callab OverworldMovementCheck
|
||||
callfar OverworldMovementCheck
|
||||
ldh a, [hMapEntryMethod]
|
||||
and a
|
||||
ret nz
|
||||
call Function2c4a
|
||||
jr nc, .loop
|
||||
callba Function824c
|
||||
farcall Function824c
|
||||
ld a, [wc5ed]
|
||||
bit 6, a
|
||||
jr nz, .loop
|
||||
|
|
@ -1652,7 +1653,7 @@ Function2b52::
|
|||
ret nz
|
||||
call Function2c4a
|
||||
jr nc, .asm_2b52
|
||||
callba Function824c
|
||||
farcall Function824c
|
||||
call CheckMovingOffEdgeOfMap
|
||||
ret c
|
||||
call WarpCheck
|
||||
|
|
@ -1666,7 +1667,7 @@ Function2b78::
|
|||
ret
|
||||
|
||||
Function2b79::
|
||||
callab DebugMapViewer
|
||||
callfar DebugMapViewer
|
||||
ld a, $4
|
||||
call WriteIntod637
|
||||
ret
|
||||
|
|
@ -1677,10 +1678,10 @@ Function2b87::
|
|||
call GetJoypad
|
||||
call OverworldStartButtonCheck
|
||||
ret nz
|
||||
callab OverworldMovementCheck
|
||||
callfar OverworldMovementCheck
|
||||
call Function2ba8
|
||||
jr nc, .asm_2b87
|
||||
callba Function824c
|
||||
farcall Function824c
|
||||
jr .asm_2b87
|
||||
|
||||
Function2ba8::
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ INCLUDE "constants.asm"
|
|||
SECTION "home/map_objects.asm", ROM0
|
||||
|
||||
Function15b5::
|
||||
callab SpawnPlayer
|
||||
callfar SpawnPlayer
|
||||
ret
|
||||
|
||||
GetMapObject::
|
||||
|
|
@ -28,7 +28,7 @@ Function15d1::
|
|||
|
||||
Function15da::
|
||||
ldh [hMapObjectIndex], a
|
||||
callab Function8131
|
||||
callfar Function8131
|
||||
ldh a, [hMapObjectIndex]
|
||||
call GetMapObject
|
||||
call Function40eb
|
||||
|
|
@ -40,7 +40,7 @@ Function15ed::
|
|||
ld a, $0
|
||||
ldh [hObjectStructIndex], a
|
||||
ld de, wObjectStructs
|
||||
callab CopyMapObjectToObjectStruct
|
||||
callfar CopyMapObjectToObjectStruct
|
||||
ret
|
||||
|
||||
Function1602::
|
||||
|
|
@ -49,7 +49,7 @@ Function1602::
|
|||
ld a, FOLLOWER_STRUCT
|
||||
ldh [hObjectStructIndex], a
|
||||
ld de, wObject1Struct
|
||||
callab CopyMapObjectToObjectStruct
|
||||
callfar CopyMapObjectToObjectStruct
|
||||
ret
|
||||
|
||||
Function1617::
|
||||
|
|
@ -84,7 +84,7 @@ Function1617::
|
|||
|
||||
Function164a::
|
||||
call Function1617
|
||||
callab Function8125
|
||||
callfar Function8125
|
||||
ret
|
||||
|
||||
CopyPlayerObjectTemplate::
|
||||
|
|
@ -134,7 +134,7 @@ Function1680::
|
|||
and a
|
||||
ret
|
||||
|
||||
Function169f::
|
||||
DeleteMapObject::
|
||||
call GetMapObject
|
||||
ld hl, MAPOBJECT_OBJECT_STRUCT_ID
|
||||
add hl, bc
|
||||
|
|
@ -200,7 +200,7 @@ Function16fb::
|
|||
ld hl, OBJECT_MOVEMENT_TYPE
|
||||
add hl, bc
|
||||
ld [hl], $19
|
||||
ld hl, OBJECT_DIRECTION
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
.asm_171f:
|
||||
|
|
@ -310,8 +310,8 @@ UpdateSprites::
|
|||
ld a, [wVramState]
|
||||
bit 0, a
|
||||
ret z
|
||||
callab Function5007
|
||||
callab _UpdateSprites
|
||||
callfar Function5007
|
||||
callfar _UpdateSprites
|
||||
ret
|
||||
|
||||
GetObjectStruct::
|
||||
|
|
@ -522,12 +522,12 @@ Function18cc::
|
|||
res 5, [hl]
|
||||
ld hl, wPlayerMovementType
|
||||
ld [hl], $10
|
||||
ld hl, wPlayerDirection
|
||||
ld hl, wPlayerStepType
|
||||
ld [hl], $0
|
||||
ret
|
||||
|
||||
Function18e5::
|
||||
ld hl, OBJECT_WALKING
|
||||
ld hl, OBJECT_DIRECTION
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
srl a
|
||||
|
|
@ -541,7 +541,7 @@ Function18e5::
|
|||
ld hl, OBJECT_MOVEMENT_TYPE
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ld hl, OBJECT_DIRECTION
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
ret
|
||||
|
|
@ -581,7 +581,7 @@ StartFollow::
|
|||
pop bc
|
||||
ld a, c
|
||||
call SetFollowerIfVisible
|
||||
callab QueueFollowerFirstStep
|
||||
callfar QueueFollowerFirstStep
|
||||
ret
|
||||
|
||||
SetLeaderIfVisible::
|
||||
|
|
@ -605,7 +605,7 @@ SetFollowerIfVisible::
|
|||
ld hl, OBJECT_MOVEMENT_TYPE
|
||||
add hl, bc
|
||||
ld [hl], $18
|
||||
ld hl, OBJECT_DIRECTION
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
ldh a, [hObjectStructIndex]
|
||||
|
|
@ -680,7 +680,7 @@ SetObjectFacing::
|
|||
add a
|
||||
add a
|
||||
and $c
|
||||
ld hl, OBJECT_WALKING
|
||||
ld hl, OBJECT_DIRECTION
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ SECTION "home/math.asm", ROM0
|
|||
Multiply::
|
||||
push hl
|
||||
push bc
|
||||
callab _Multiply
|
||||
callfar _Multiply
|
||||
pop bc
|
||||
pop hl
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ Menu_WasButtonPressed::
|
|||
ld a, [w2DMenuFlags]
|
||||
bit 6, a
|
||||
jr z, .asm_1ad6
|
||||
callba PlaySpriteAnimationsAndDelayFrame
|
||||
farcall PlaySpriteAnimationsAndDelayFrame
|
||||
.asm_1ad6:
|
||||
call GetJoypadDebounced
|
||||
ldh a, [hJoySum]
|
||||
|
|
@ -285,7 +285,7 @@ PushWindow::
|
|||
|
||||
ExitMenu::
|
||||
push af
|
||||
callab _ExitMenu
|
||||
callfar _ExitMenu
|
||||
call Function1c0a
|
||||
pop af
|
||||
ret
|
||||
|
|
@ -327,7 +327,7 @@ Function1c0a::
|
|||
ret
|
||||
|
||||
InitVerticalMenuCursor::
|
||||
jpab _InitVerticalMenuCursor
|
||||
jpfar _InitVerticalMenuCursor
|
||||
|
||||
CloseWindow::
|
||||
push af
|
||||
|
|
@ -338,7 +338,7 @@ CloseWindow::
|
|||
ret
|
||||
|
||||
Function1c58::
|
||||
jpab Function24185
|
||||
jpfar Function24185
|
||||
|
||||
RestoreTileBackup::
|
||||
call MenuBoxCoord2Tile
|
||||
|
|
|
|||
|
|
@ -28,12 +28,12 @@ SECTION "home/misc_32c8.asm@Unknown 3686", ROM0
|
|||
GiveMonToPlayer::
|
||||
; Give to the player Pokemon of species b at level c.
|
||||
ld a, b
|
||||
ld [wMonDexIndex], a
|
||||
ld [wCurPartySpecies], a
|
||||
ld a, c
|
||||
ld [wCurPartyLevel], a
|
||||
xor a
|
||||
ld [wMonType], a
|
||||
jpba Function1130a
|
||||
farjp Function1130a
|
||||
|
||||
WaitPressedAny::
|
||||
; Waits for one of the buttons in d to be pressed.
|
||||
|
|
@ -70,7 +70,7 @@ WaitPressedAny::
|
|||
|
||||
CountSetBits::
|
||||
; Count the number of bits set in b bytes at hl.
|
||||
; Return to a, c, and wCountSetBitsResult.
|
||||
; Return to a, c, and wNumSetBits.
|
||||
ld c, $0
|
||||
.asm_36b3:
|
||||
ld a, [hli]
|
||||
|
|
@ -86,5 +86,5 @@ CountSetBits::
|
|||
dec b
|
||||
jr nz, .asm_36b3
|
||||
ld a, c
|
||||
ld [wCountSetBitsResult], a
|
||||
ld [wNumSetBits], a
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -10,19 +10,19 @@ GetPartyParamLocation::
|
|||
ld b, 0
|
||||
add hl, bc
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
ld a, [wWhichPokemon]
|
||||
ld a, [wCurPartyMon]
|
||||
call AddNTimes
|
||||
pop bc
|
||||
ret
|
||||
|
||||
UseItem::
|
||||
jpba _UseItem
|
||||
farjp _UseItem
|
||||
|
||||
CheckTossableItem::
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
callab _CheckTossableItem
|
||||
callfar _CheckTossableItem
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ PrepMonFrontpic::
|
|||
ld a, $1
|
||||
ld [wSpriteFlipped], a
|
||||
_PrepMonFrontpic::
|
||||
ld a, [wMonDexIndex]
|
||||
ld a, [wCurPartySpecies]
|
||||
and a
|
||||
jr z, .asm_39a8
|
||||
cp NUM_POKEMON + 1
|
||||
|
|
@ -74,5 +74,5 @@ _PrepMonFrontpic::
|
|||
xor a
|
||||
ld [wSpriteFlipped], a
|
||||
inc a
|
||||
ld [wMonDexIndex], a
|
||||
ld [wCurPartySpecies], a
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ NamesPointers::
|
|||
dba MoveNames ; MOVE_NAME
|
||||
dbw 0, 0 ; DUMMY_NAME
|
||||
dba ItemNames ; ITEM_NAME
|
||||
dbw $00, wPartyMonOT ; PARTY_OT_NAME
|
||||
dbw $00, wPartyMonOTs ; PARTY_OT_NAME
|
||||
dbw $00, wOTPartyMonOT ; ENEMY_OT_NAME
|
||||
dba TrainerClassNames ; TRAINER_NAME
|
||||
dbw $04, $5677 ; MOVE_DESC_NAME_BROKEN (wrong bank..?)
|
||||
|
|
@ -245,7 +245,7 @@ Unreferenced_GetMoveName::
|
|||
SECTION "home/names.asm@GetNick", ROM0
|
||||
|
||||
GetCurNick::
|
||||
ld a, [wWhichPokemon]
|
||||
ld a, [wCurPartyMon]
|
||||
ld hl, wPartyMonNicknames
|
||||
|
||||
GetNick:
|
||||
|
|
@ -258,7 +258,7 @@ GetNick:
|
|||
ld bc, MON_NAME_LENGTH
|
||||
call CopyBytes
|
||||
pop de
|
||||
callab CorrectNickErrors
|
||||
callfar CorrectNickErrors
|
||||
pop bc
|
||||
pop hl
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ OverworldStartButtonCheck::
|
|||
ld a, [wDebugFlags]
|
||||
bit DEBUG_FIELD_F, a
|
||||
ret z ; debug disabled
|
||||
callba FieldDebugMenu
|
||||
farcall FieldDebugMenu
|
||||
jr CheckStartmenuSelectHook
|
||||
.regularMenu
|
||||
callba DisplayStartMenu
|
||||
farcall DisplayStartMenu
|
||||
jr CheckStartmenuSelectHook
|
||||
SelectButtonFunction::
|
||||
callab CheckRegisteredItem
|
||||
callfar CheckRegisteredItem
|
||||
CheckStartmenuSelectHook:
|
||||
ldh a, [hStartmenuCloseAndSelectHookEnable]
|
||||
and a
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ INCLUDE "constants.asm"
|
|||
|
||||
SECTION "home/pokemon.asm@3A4B", ROM0
|
||||
|
||||
GetMonHeader::
|
||||
GetBaseData::
|
||||
; copies the base stat data of a pokemon to wMonHeader
|
||||
; INPUT:
|
||||
; [wCurSpecies] = pokemon ID in dex order
|
||||
|
|
@ -14,9 +14,13 @@ GetMonHeader::
|
|||
push af
|
||||
ld a, BANK(BaseData)
|
||||
call Bankswitch
|
||||
|
||||
; Egg doesn't have BaseData
|
||||
ld a, [wCurSpecies]
|
||||
cp DEX_EGG
|
||||
jr z, .egg
|
||||
|
||||
; Get BaseData
|
||||
dec a
|
||||
ld bc, BaseData.FirstEntryEnd - BaseData
|
||||
ld hl, BaseData
|
||||
|
|
@ -24,20 +28,27 @@ GetMonHeader::
|
|||
ld de, wMonHeader
|
||||
ld bc, BaseData.FirstEntryEnd - BaseData
|
||||
call CopyBytes
|
||||
jr .done
|
||||
jr .end
|
||||
|
||||
.egg
|
||||
ld de, EggPicFront
|
||||
|
||||
; Sprite dimensions
|
||||
ln b, 5, 5 ; egg sprite dimension
|
||||
ld hl, wMonHSpriteDim
|
||||
ld [hl], b
|
||||
|
||||
; front sprite
|
||||
ld hl, wMonHFrontSprite
|
||||
ld [hl], e
|
||||
inc hl
|
||||
ld [hl], d
|
||||
jr .done ; useless
|
||||
.done
|
||||
jr .end ; useless
|
||||
|
||||
.end
|
||||
ld a, [wCurSpecies]
|
||||
ld [wMonHIndex], a
|
||||
|
||||
pop af
|
||||
call Bankswitch
|
||||
pop hl
|
||||
|
|
@ -52,7 +63,7 @@ UncompressMonSprite::
|
|||
; Uncompresses the front or back sprite of the specified mon
|
||||
; assumes the corresponding mon header is already loaded
|
||||
; hl contains offset to sprite pointer ($b for front or $d for back)
|
||||
ld a, [wMonDexIndex]
|
||||
ld a, [wCurPartySpecies]
|
||||
and a
|
||||
ret z
|
||||
ld bc, wMonHeader
|
||||
|
|
@ -64,7 +75,7 @@ UncompressMonSprite::
|
|||
ld a, [hl]
|
||||
ld [wSpriteInputPtr + 1], a
|
||||
ld hl, MonSpriteBankList
|
||||
ld a, [wMonDexIndex]
|
||||
ld a, [wCurPartySpecies]
|
||||
ld b, a
|
||||
; get Pokémon picture bank pointer from list
|
||||
.loop
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ UpdateTimeOfDayPalettes:
|
|||
; fallthrough
|
||||
|
||||
TimeOfDayPals::
|
||||
callab _TimeOfDayPals
|
||||
callfar _TimeOfDayPals
|
||||
ret
|
||||
|
||||
UpdateTimePals::
|
||||
callab _UpdateTimePals
|
||||
callfar _UpdateTimePals
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ Function385a::
|
|||
jr asm_3865
|
||||
|
||||
Function385d::
|
||||
callab Function_8f1cb
|
||||
callfar FreezeMonIcons
|
||||
asm_3865:
|
||||
pop hl
|
||||
call MenuTextBox
|
||||
|
|
@ -73,7 +73,7 @@ Function3872::
|
|||
jr asm_387d
|
||||
|
||||
Function3875::
|
||||
callab PlaySpriteAnimationsAndDelayFrame
|
||||
callfar PlaySpriteAnimationsAndDelayFrame
|
||||
asm_387d:
|
||||
pop bc
|
||||
call GetJoypad
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ Serial_ExchangeLinkMenuSelection::
|
|||
|
||||
Serial_PrintWaitingTextAndSyncAndExchangeNybble::
|
||||
call BackUpTilesToBuffer
|
||||
callab PlaceWaitingText
|
||||
callfar PlaceWaitingText
|
||||
call WaitLinkTransfer
|
||||
jp ReloadTilesFromBuffer
|
||||
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ Function30e8::
|
|||
ret
|
||||
|
||||
GetFacingPersonText::
|
||||
callba Function776e
|
||||
farcall Function776e
|
||||
ret nc
|
||||
call TurnNPCTalkingTo
|
||||
scf
|
||||
|
|
@ -208,7 +208,7 @@ PrepareTextbox::
|
|||
ret
|
||||
|
||||
TextboxCleanup:
|
||||
callab ReanchorBGMap_NoOAMUpdate
|
||||
callfar ReanchorBGMap_NoOAMUpdate
|
||||
call UpdateSprites
|
||||
xor a
|
||||
ldh [hBGMapMode], a
|
||||
|
|
@ -221,7 +221,7 @@ TextboxCleanup:
|
|||
ret
|
||||
|
||||
Function318f:
|
||||
callab Function140ea
|
||||
callfar Function140ea
|
||||
call RedrawPlayerSprite
|
||||
ret
|
||||
|
||||
|
|
@ -234,9 +234,9 @@ TurnNPCTalkingTo::
|
|||
ld a, [hl]
|
||||
call IsAnimatedSprite
|
||||
jr c, .Jump
|
||||
ld a, [wPlayerWalking]
|
||||
ld a, [wPlayerDirection]
|
||||
xor 04
|
||||
ld hl, OBJECT_WALKING
|
||||
ld hl, OBJECT_DIRECTION
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
push bc
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ asm_0fbb:
|
|||
push de
|
||||
and a
|
||||
jr nz, .asm_0fc4
|
||||
ld de, wEnemyMonNickname
|
||||
ld de, wBattleMonNickname
|
||||
jr PlaceCommandCharacter
|
||||
|
||||
.asm_0fc4:
|
||||
|
|
@ -275,7 +275,7 @@ asm_0fbb:
|
|||
call PlaceString
|
||||
ld h, b
|
||||
ld l, c
|
||||
ld de, wBattleMonNickname
|
||||
ld de, wEnemyMonNickname
|
||||
PlaceCommandCharacter:
|
||||
call PlaceString
|
||||
ld h, b
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ SetHPPal::
|
|||
|
||||
Function3657::
|
||||
call DisableLCD
|
||||
callab Function140d9
|
||||
callfar Function140d9
|
||||
call LoadFont
|
||||
call UpdateSprites
|
||||
call EnableLCD
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ RefreshTiles::
|
|||
|
||||
|
||||
GetFacingTileCoord::
|
||||
ld a, [wPlayerWalking] ; TODO: wPlayerDirection in Crystal. Not here?
|
||||
ld a, [wPlayerDirection] ; TODO: wPlayerDirection in Crystal. Not here?
|
||||
and %1100
|
||||
srl a
|
||||
srl a
|
||||
|
|
|
|||
|
|
@ -6,35 +6,35 @@ Function388f::
|
|||
ret
|
||||
|
||||
Function3890::
|
||||
callba Function14cac
|
||||
farcall Function14cac
|
||||
ret
|
||||
|
||||
Function3899::
|
||||
callba Function14dac
|
||||
farcall Function14dac
|
||||
ret
|
||||
|
||||
Function38a2::
|
||||
callba Function14dc4
|
||||
farcall Function14dc4
|
||||
ret
|
||||
|
||||
Function38ab::
|
||||
callba Function14ddd
|
||||
farcall Function14ddd
|
||||
ret
|
||||
|
||||
Function38b4::
|
||||
callba Function14e00
|
||||
farcall Function14e00
|
||||
ret
|
||||
|
||||
Function38bd::
|
||||
callba Function14e5f
|
||||
farcall Function14e5f
|
||||
ret
|
||||
|
||||
Function38c6::
|
||||
callba Function14e27
|
||||
farcall Function14e27
|
||||
ret
|
||||
|
||||
Function38cf::
|
||||
callba Function14e4a
|
||||
farcall Function14e4a
|
||||
ret
|
||||
|
||||
Function38d8::
|
||||
|
|
@ -50,7 +50,7 @@ TestWildBattleStart::
|
|||
ret z ; if no directions are down, don't try and trigger a wild encounter
|
||||
call CheckBPressedDebug
|
||||
jp nz, ClearAccumulator ; if b button is down, clear acc
|
||||
callab Function3ee3e
|
||||
callfar Function3ee3e
|
||||
ld a, [wBattleMode]
|
||||
and a
|
||||
ret z ; if no battle, return
|
||||
|
|
|
|||
18
layout.link
18
layout.link
|
|
@ -123,7 +123,10 @@ ROMX $02
|
|||
"gfx.asm@Bank 2 Misc GFX"
|
||||
"engine/dumps/bank02.asm@QueueFollowerFirstStep"
|
||||
"gfx.asm@Mon Nest Icon"
|
||||
"engine/dumps/bank02.asm@Data8a17"
|
||||
|
||||
"data/maps/flypoints.asm"
|
||||
"data/maps/landmarks.asm"
|
||||
|
||||
"engine/trainer_gear.asm@OpenTrainerGear"
|
||||
"gfx.asm@Trainer Gear GFX"
|
||||
"engine/trainer_gear.asm@TrainerGear_RadioText"
|
||||
|
|
@ -140,9 +143,9 @@ ROMX $03
|
|||
"engine/overworld/player_movement.asm@Player Movement"
|
||||
"data/collision/collision_type_table.asm"
|
||||
"engine/overworld/player_movement.asm@Rest of Player Movement"
|
||||
"engine/dumps/bank03.asm@Functionc77d"
|
||||
"engine/dumps/bank03.asm@GetFlyPointMapLocation"
|
||||
"engine/overworld/spawn_points.asm"
|
||||
"engine/dumps/bank03.asm@SpawnPoints"
|
||||
"data/maps/spawn_points.asm"
|
||||
"data/tileset_headers.asm"
|
||||
"engine/dumps/bank03.asm@Functionc9c1"
|
||||
"engine/items/inventory.asm@Inventory"
|
||||
|
|
@ -155,7 +158,7 @@ ROMX $03
|
|||
"engine/items/inventory.asm@_CheckTossableItem"
|
||||
"engine/dumps/bank03.asm@Functiond41d"
|
||||
"engine/items/item_effects.asm"
|
||||
"engine/dumps/bank03.asm@Functionf960"
|
||||
"engine/dumps/bank03.asm@GetMaxPPOfMove"
|
||||
|
||||
ROMX $04
|
||||
org $4000
|
||||
|
|
@ -307,8 +310,13 @@ ROMX $13
|
|||
|
||||
ROMX $14
|
||||
org $4000
|
||||
"engine/dumps/bank14.asm@CopyMonToTempMon"
|
||||
org $40dd
|
||||
"data/types/names.asm"
|
||||
org $4162
|
||||
"engine/dumps/bank14.asm@GetTrainerClassName_Old"
|
||||
org $4756
|
||||
"engine/dumps/bank14.asm@Party Menu Routines"
|
||||
org $4f10
|
||||
"data/pokemon/base_stats.asm"
|
||||
"data/pokemon/names.asm"
|
||||
|
|
@ -951,7 +959,7 @@ ROMX $3f
|
|||
"engine/menu/reset_dialog.asm"
|
||||
"engine/debug/field/change_tileset.inc@FieldDebug_ChangeTileset"
|
||||
"engine/landmarks.asm@1"
|
||||
"data/maps/landmarks.asm"
|
||||
"data/maps/landmarks.asm@LandmarkNames"
|
||||
"engine/landmarks.asm@2"
|
||||
"engine/debug/field/warp.inc@FieldDebug_ShowWarpToText"
|
||||
"gfx.asm@Town Map Cursor"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ ENDM
|
|||
|
||||
MACRO shift_const
|
||||
DEF \1 EQU (1 << const_value)
|
||||
DEF const_value += const_inc
|
||||
const \1_F
|
||||
ENDM
|
||||
|
||||
MACRO const_skip
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
|
||||
MACRO callba ; bank, address
|
||||
MACRO farcall ; bank, address
|
||||
ld a, BANK(\1)
|
||||
ld hl, \1
|
||||
call FarCall_hl
|
||||
ENDM
|
||||
|
||||
MACRO callab ; address, bank
|
||||
MACRO callfar ; address, bank
|
||||
ld hl, \1
|
||||
ld a, BANK(\1)
|
||||
call FarCall_hl
|
||||
|
|
@ -21,13 +21,13 @@ MACRO homecall
|
|||
call Bankswitch
|
||||
ENDM
|
||||
|
||||
MACRO jpba
|
||||
MACRO farjp
|
||||
ld a, BANK(\1)
|
||||
ld hl, \1
|
||||
jp FarCall_hl
|
||||
ENDM
|
||||
|
||||
MACRO jpab
|
||||
MACRO jpfar
|
||||
ld hl, \1
|
||||
ld a, BANK(\1)
|
||||
jp FarCall_hl
|
||||
|
|
|
|||
|
|
@ -265,13 +265,13 @@ MACRO object_struct
|
|||
\1SpriteTile:: db
|
||||
\1MovementType:: db
|
||||
\1Flags:: dw
|
||||
\1Palette:: db
|
||||
\1Walking:: db
|
||||
\1Direction:: db
|
||||
\1StepType:: db
|
||||
\1StepDuration:: db
|
||||
\1Action:: db
|
||||
\1StepFrame:: db
|
||||
\1Object12:: db
|
||||
\1Facing:: db
|
||||
\1Tile:: db ; collision
|
||||
\1LastTile:: db ; collision
|
||||
|
|
@ -281,13 +281,13 @@ MACRO object_struct
|
|||
\1LastMapY:: db
|
||||
\1InitX:: db
|
||||
\1InitY:: db
|
||||
\1Radius:: db
|
||||
\1RadiusX:: db
|
||||
\1RadiusY:: db
|
||||
\1SpriteX:: db
|
||||
\1SpriteY:: db
|
||||
\1SpriteXOffset:: db
|
||||
\1SpriteYOffset:: db
|
||||
\1MovementIndex:: db
|
||||
\1Object28:: db
|
||||
\1Object29:: db
|
||||
\1Object30:: db
|
||||
\1Object31:: db
|
||||
|
|
@ -305,7 +305,7 @@ MACRO map_object
|
|||
\1ObjectRadius:: db
|
||||
\1ObjectHour:: db
|
||||
\1ObjectTimeOfDay:: db
|
||||
\1ObjectPalette:: db
|
||||
\1ObjectPalette:: db ; ...Questionable. Needs investigation
|
||||
\1ObjectSightRange:: db
|
||||
\1ObjectScript:: dw
|
||||
\1ObjectEventFlag:: dw
|
||||
|
|
|
|||
407
ram/wram.asm
407
ram/wram.asm
|
|
@ -91,7 +91,7 @@ SECTION "OAM Buffer", WRAM0
|
|||
wShadowOAM::
|
||||
; wShadowOAMSprite00 - wShadowOAMSprite39
|
||||
for n, NUM_SPRITE_OAM_STRUCTS
|
||||
wShadowOAMSprite{02d:n}:: sprite_oam_struct wShadowOAMSprite{02d:n}
|
||||
wShadowOAMSprite{02d:n}:: sprite_oam_struct wShadowOAMSprite{02d:n}
|
||||
endr
|
||||
wShadowOAMEnd::
|
||||
|
||||
|
|
@ -375,83 +375,25 @@ wBattleAnimEnd::
|
|||
|
||||
ds $1a3 ; TODO
|
||||
|
||||
wc9e8:: ds 1
|
||||
wc9e9:: ds 1
|
||||
wc9ea:: ds 1
|
||||
wc9eb:: ds 1
|
||||
wc9ec:: ds 1
|
||||
wc9ed:: ds 1
|
||||
wc9ee:: ds 1
|
||||
wc9ef:: ds 1
|
||||
wc9f0:: ds 1
|
||||
wc9f1:: ds 1
|
||||
wc9f2:: ds 1
|
||||
wc9f3:: ds 1
|
||||
wBattle::
|
||||
wEnemyMoveStruct:: move_struct wEnemyMoveStruct
|
||||
wPlayerMoveStruct:: move_struct wPlayerMoveStruct
|
||||
|
||||
ds 1
|
||||
|
||||
wc9f5:: ds 1
|
||||
|
||||
wBattleMonNickname:: ds 6
|
||||
wEnemyMonNickname:: ds 6
|
||||
|
||||
wca02:: ds 1
|
||||
wca03:: ds 1
|
||||
wca04:: ds 1
|
||||
wca05:: ds 1
|
||||
|
||||
ds 2
|
||||
|
||||
wca08:: ds 1
|
||||
wca09:: ds 1
|
||||
wca0a:: ds 1
|
||||
|
||||
ds 3
|
||||
|
||||
wca0e:: ds 1
|
||||
wca0f:: ds 1
|
||||
|
||||
wIntroJumptableIndex::
|
||||
wca10:: ds 1
|
||||
wBattleMonNickname:: ds 6
|
||||
|
||||
UNION
|
||||
wBattleMon:: battle_struct wBattleMon
|
||||
NEXTU
|
||||
ds 14
|
||||
wIntroJumptableIndex:: db
|
||||
wIntroBGMapPointer:: ds 2
|
||||
NEXTU
|
||||
wca11:: ds 1
|
||||
wca12:: ds 1
|
||||
ENDU
|
||||
|
||||
UNION
|
||||
wIntroTilemapPointer:: ds 2
|
||||
NEXTU
|
||||
wca13:: ds 1
|
||||
wca14:: ds 1
|
||||
ENDU
|
||||
|
||||
UNION
|
||||
wIntroTilesPointer:: ds 2
|
||||
wIntroFrameCounter1:: ds 1
|
||||
NEXTU
|
||||
|
||||
wca15:: ds 1
|
||||
wca16:: ds 1
|
||||
wca17:: ds 1
|
||||
|
||||
ENDU
|
||||
|
||||
wca18::
|
||||
wIntroFrameCounter2:: ds 1
|
||||
|
||||
wIntroSpriteStateFlag:: ds 1
|
||||
|
||||
wca1a:: ds 1
|
||||
wca1b:: ds 1
|
||||
wca1c:: ds 1
|
||||
ds 1
|
||||
wca1e:: ds 1
|
||||
ds 1
|
||||
wca20:: ds 1
|
||||
wca21:: ds 1
|
||||
ENDU
|
||||
wca22:: ds 1
|
||||
wca23:: ds 1
|
||||
wca24:: ds 1
|
||||
|
|
@ -508,7 +450,10 @@ wca58:: ds 1
|
|||
wca59:: ds 1
|
||||
wca5a:: ds 1
|
||||
wca5b:: ds 1
|
||||
|
||||
wBattleAnimParam::
|
||||
wca5c:: ds 1
|
||||
|
||||
wca5d:: ds 1
|
||||
|
||||
ds $1d
|
||||
|
|
@ -557,7 +502,11 @@ wcabe:: ds 1
|
|||
ds 1
|
||||
|
||||
wcac0:: ds 1
|
||||
|
||||
wCurPlayerSelectedMove::
|
||||
wcac1:: ds 1
|
||||
|
||||
wCurEnemySelectedMove::
|
||||
wcac2:: ds 1
|
||||
|
||||
wLinkBattleRNCount:: db
|
||||
|
|
@ -569,11 +518,15 @@ wcac4:: ds 1
|
|||
wcac7:: ds 1
|
||||
wcac8:: ds 1
|
||||
wcac9:: ds 1
|
||||
|
||||
UNION
|
||||
wPayDayMoney:: ds 3
|
||||
NEXTU
|
||||
wcaca:: ds 1
|
||||
|
||||
ds 1
|
||||
|
||||
wcacb:: ds 1
|
||||
wcacc:: ds 1
|
||||
ENDU
|
||||
|
||||
wcacd:: ds 1
|
||||
wcace:: ds 1
|
||||
|
||||
|
|
@ -581,12 +534,21 @@ wcace:: ds 1
|
|||
|
||||
wcad0:: ds 1
|
||||
wcad1:: ds 1
|
||||
|
||||
wAlreadyDisobeyed::
|
||||
wcad2:: ds 1
|
||||
|
||||
wcad3:: ds 1
|
||||
wcad4:: ds 1
|
||||
wcad5:: ds 1
|
||||
|
||||
UNION
|
||||
wCurPlayerMove:: ds 1
|
||||
wCurEnemyMove:: ds 1
|
||||
NEXTU
|
||||
wcad6:: ds 1
|
||||
wcad7:: ds 1
|
||||
ENDU
|
||||
wcad8:: ds 1
|
||||
wcad9:: ds 1
|
||||
wcada:: ds 1
|
||||
|
|
@ -770,10 +732,10 @@ wDefaultSpawnPoint::
|
|||
|
||||
UNION
|
||||
|
||||
wcc40:: ; XXX fix this to cc3a
|
||||
wcc3a::
|
||||
wMovementBufferCount:: db
|
||||
|
||||
wcc41:: ; XXX fix this to cc3b
|
||||
wcc3b::
|
||||
wMovementBufferObject:: db
|
||||
|
||||
ptrba wMovementBufferPointer
|
||||
|
|
@ -822,8 +784,8 @@ wSpriteOutputPtrCached:: ds 2
|
|||
wSpriteDecodeTable0Ptr:: ds 2
|
||||
wSpriteDecodeTable1Ptr:: ds 2
|
||||
|
||||
wccc0:: ds 1
|
||||
wccc1:: ds 1
|
||||
wFXAnimID:: dw
|
||||
|
||||
wccc2:: ds 1
|
||||
wccc3:: ds 1
|
||||
wccc4:: ds 1
|
||||
|
|
@ -838,7 +800,7 @@ wBGP:: db
|
|||
wOBP0:: db
|
||||
wOBP1:: db
|
||||
|
||||
wcccd:: ds 1
|
||||
wNumHits:: db
|
||||
|
||||
wDisableVBlankWYUpdate:: db
|
||||
wSGB:: db
|
||||
|
|
@ -884,6 +846,11 @@ wcd1d:: ds 8
|
|||
|
||||
wStringBuffer1:: ds 1 ; How long is this?
|
||||
wcd27:: ds 1
|
||||
|
||||
ds 1
|
||||
|
||||
wcd29:: ds 1
|
||||
wcd2a:: ds 1
|
||||
SECTION "CD31", WRAM0[$CD31]
|
||||
|
||||
UNION
|
||||
|
|
@ -910,8 +877,10 @@ SECTION "CD3C", WRAM0[$CD3C]
|
|||
wcd3c:: db
|
||||
wRegularItemsCursor:: db
|
||||
wBackpackAndKeyItemsCursor:: db
|
||||
wBattleMenuCursorPosition::
|
||||
wStartmenuCursor:: db
|
||||
wcd40:: db
|
||||
wCurBattleMon::
|
||||
wcd41:: db
|
||||
wcd42:: db
|
||||
wFieldDebugMenuCursorBuffer::
|
||||
|
|
@ -941,7 +910,11 @@ wFarCallBCBuffer::
|
|||
dw
|
||||
|
||||
wcd56:: ds 1
|
||||
wNumMoves::
|
||||
wcd57:: ds 1
|
||||
|
||||
wItemEffectSucceeded::
|
||||
wBattlePlayerAction::
|
||||
wFieldMoveSucceeded:: db
|
||||
wVramState:: db
|
||||
|
||||
|
|
@ -960,36 +933,20 @@ wcd75:: db
|
|||
|
||||
wCurItem:: db
|
||||
wItemIndex:: db
|
||||
wMonDexIndex: db
|
||||
wWhichPokemon: db
|
||||
wCurPartySpecies: db
|
||||
wCurPartyMon: db
|
||||
|
||||
SECTION "CD7B", WRAM0[$CD7B]
|
||||
|
||||
wHPBarType:: db
|
||||
wcd7c:: ds 1
|
||||
wWhichHPBar:: db
|
||||
wPokemonWithdrawDepositParameter:: ds 1
|
||||
|
||||
wItemQuantity:: db
|
||||
wItemQuantityBuffer:: db
|
||||
wcd7f:: db
|
||||
wcd80:: db
|
||||
wcd81:: db
|
||||
|
||||
ds 7
|
||||
wTempMon:: party_struct wTempMon
|
||||
|
||||
wcd89:: db
|
||||
|
||||
ds 10
|
||||
|
||||
wcd94:: db
|
||||
|
||||
ds 9
|
||||
|
||||
wLoadedMonLevel:: db
|
||||
wcd9f:: db
|
||||
|
||||
ds 15
|
||||
|
||||
wcdaf:: db
|
||||
wSpriteFlags:: db
|
||||
|
||||
wTalkingTargetType:: db
|
||||
;bit 0 = has engaged NPC in dialogue
|
||||
|
|
@ -1008,9 +965,12 @@ wcdb6:: ds 1
|
|||
|
||||
wcdb9:: ds 1
|
||||
|
||||
wItemAttributeParamBuffer:: db
|
||||
wItemAttributeValue:: db
|
||||
|
||||
wCurPartyLevel:: db
|
||||
wcdbc:: db
|
||||
|
||||
wScrollingMenuListSize:: db
|
||||
|
||||
wLinkMode:: db
|
||||
; 00 -
|
||||
; 01 -
|
||||
|
|
@ -1019,20 +979,27 @@ wLinkMode:: db
|
|||
|
||||
wNextWarp:: db
|
||||
wNextMapGroup:: db
|
||||
wNextMapId:: db
|
||||
wNextMapNumber:: db
|
||||
wPrevWarp:: db
|
||||
|
||||
wcdc2:: db
|
||||
|
||||
UNION
|
||||
wListMovesLineSpacing::
|
||||
wFieldMoveScriptID:: db
|
||||
wMapBlocksAddress:: dw
|
||||
wReplacementBlock:: db
|
||||
|
||||
NEXTU
|
||||
wMonSubmenuCount:: db
|
||||
wMonSubmenuItems:: ds NUM_MONMENU_ITEMS + 1
|
||||
NEXTU
|
||||
|
||||
wHPBarMaxHP:: dw
|
||||
wHPBarOldHP:: dw
|
||||
wHPBarNewHP:: dw
|
||||
wHPBarDelta:: dw
|
||||
wHPBarHPDifference:: dw
|
||||
|
||||
NEXTU
|
||||
|
||||
|
|
@ -1044,27 +1011,20 @@ NEXTU
|
|||
|
||||
wEnemyEffectivenessVsPlayerMons:: db
|
||||
wPlayerEffectivenessVsEnemyMons:: db
|
||||
|
||||
|
||||
ds 1
|
||||
|
||||
wcdc6:: db
|
||||
|
||||
ENDU
|
||||
|
||||
UNION
|
||||
|
||||
wHPBarNewHP:: dw
|
||||
|
||||
NEXTU
|
||||
|
||||
wcdc7:: db
|
||||
wcdc8:: db
|
||||
ds 1
|
||||
wcdca:: db
|
||||
|
||||
ENDU
|
||||
|
||||
wHPBarDelta:: db
|
||||
wcdca:: db
|
||||
wHPBarHPDifference:: dw
|
||||
|
||||
|
||||
|
||||
|
||||
UNION
|
||||
|
||||
|
|
@ -1079,53 +1039,14 @@ wcdd4: ds 1
|
|||
ds 1
|
||||
ENDU
|
||||
|
||||
wcdd7:: ds 1
|
||||
wcdd8:: ds 1
|
||||
wcdd9:: ds 1
|
||||
wcdda:: ds 1
|
||||
wcddb:: ds 1
|
||||
wcddc:: ds 1
|
||||
wcddd:: ds 1
|
||||
wcdde:: ds 1
|
||||
wcddf:: ds 1
|
||||
wcde0:: ds 1
|
||||
wcde1:: ds 1
|
||||
wcde2:: ds 1
|
||||
wcde3:: ds 1
|
||||
wcde4:: ds 1
|
||||
wcde5:: ds 1
|
||||
wcde6:: ds 1
|
||||
wcde7:: ds 1
|
||||
wcde8:: ds 1
|
||||
wcde9:: ds 1
|
||||
wcdea:: ds 1
|
||||
wcdeb:: ds 1
|
||||
wcdec:: ds 1
|
||||
wcded:: ds 1
|
||||
wcdee:: ds 1
|
||||
wcdef:: ds 1
|
||||
wTempEnemyMonSpecies:: ds 1
|
||||
wTempBattleMonSpecies:: ds 1
|
||||
|
||||
ds 1
|
||||
|
||||
wcdf1:: ds 1
|
||||
wcdf2:: ds 1
|
||||
wcdf3:: ds 1
|
||||
wEnemyMon:: battle_struct wEnemyMon
|
||||
wEnemyMonBaseStats:: ds NUM_EXP_STATS
|
||||
|
||||
ds 1
|
||||
|
||||
wcdf5:: ds 1
|
||||
|
||||
ds 1
|
||||
|
||||
wcdf7:: ds 1
|
||||
|
||||
ds 1
|
||||
|
||||
wcdf9:: ds 1
|
||||
|
||||
ds 4
|
||||
|
||||
wcdfe:: ds 1
|
||||
wEnemyMonCatchRate:: db
|
||||
wcdff:: ds 1
|
||||
wBattleMode:: db
|
||||
wce01:: ds 1
|
||||
|
|
@ -1210,10 +1131,8 @@ wce2a:: ds 1
|
|||
ds 2
|
||||
|
||||
wce2d:: ds 1
|
||||
wce2e:: ds 1
|
||||
wce2f:: ds 1
|
||||
wce30:: ds 1
|
||||
wce31:: ds 1
|
||||
|
||||
wListMoves_MoveIndicesBuffer:: ds NUM_MOVES
|
||||
wce32:: ds 1
|
||||
wce33:: ds 1
|
||||
wce34:: ds 1
|
||||
|
|
@ -1221,11 +1140,15 @@ wce35:: ds 1
|
|||
wce36:: ds 1
|
||||
|
||||
wNamedObjectIndexBuffer::
|
||||
wCountSetBitsResult::
|
||||
wNumSetBits::
|
||||
wMoveGrammar::
|
||||
wTempByteValue::
|
||||
wce37::
|
||||
db
|
||||
|
||||
wce38:: ds 1
|
||||
|
||||
wNumFleeAttempts::
|
||||
wce39:: ds 1
|
||||
|
||||
SECTION "CE3A", WRAM0[$CE3A]
|
||||
|
|
@ -1275,8 +1198,12 @@ wMomsName:: ds 6
|
|||
|
||||
SECTION "CE73", WRAM0[$CE73]
|
||||
|
||||
UNION
|
||||
wPlayerID:: dw
|
||||
NEXTU
|
||||
wce73: ds 1
|
||||
wce74: ds 1
|
||||
ENDU
|
||||
wce75: ds 1
|
||||
|
||||
wObjectFollow_Leader::
|
||||
|
|
@ -1352,11 +1279,13 @@ wCoins:: db
|
|||
|
||||
wd15c:: db
|
||||
|
||||
wd15d:: db
|
||||
wMoney:: ds 3
|
||||
|
||||
wd15e:: db
|
||||
;wd15d:: db
|
||||
|
||||
wd15f:: db
|
||||
;wd15e:: db
|
||||
|
||||
;wd15f:: db
|
||||
|
||||
SECTION "D163", WRAM0[$D163]
|
||||
|
||||
|
|
@ -1590,44 +1519,48 @@ wTilesetAnim::
|
|||
ds 2 ; TODO
|
||||
wTilesetEnd::
|
||||
|
||||
wPokemonData::
|
||||
wPartyCount:: db
|
||||
wPartySpecies:: ds PARTY_LENGTH
|
||||
wPartyEnd:: db
|
||||
|
||||
wPartyMons::
|
||||
wPartyMon1:: party_struct wPartyMon1
|
||||
wPartyMon2:: party_struct wPartyMon2
|
||||
wPartyMon3:: party_struct wPartyMon3
|
||||
wPartyMon4:: party_struct wPartyMon4
|
||||
wPartyMon5:: party_struct wPartyMon5
|
||||
wPartyMon6:: party_struct wPartyMon6
|
||||
wPlayerPartyEnd::
|
||||
; wPartyMon1 - wPartyMon6
|
||||
for n, 1, PARTY_LENGTH + 1
|
||||
wPartyMon{d:n}:: party_struct wPartyMon{d:n}
|
||||
endr
|
||||
|
||||
wPartyMonOT::
|
||||
ds PARTY_LENGTH * 6
|
||||
wPartyMonOTEnd::
|
||||
wPartyMonOTs::
|
||||
; wPartyMon1OT - wPartyMon6OT
|
||||
for n, 1, PARTY_LENGTH + 1
|
||||
wPartyMon{d:n}OT:: ds PLAYER_NAME_LENGTH
|
||||
endr
|
||||
|
||||
wPartyMonNicknames::
|
||||
ds PARTY_LENGTH * MON_NAME_LENGTH ; = $24
|
||||
; wPartyMon1Nickname - wPartyMon6Nickname
|
||||
for n, 1, PARTY_LENGTH + 1
|
||||
wPartyMon{d:n}Nickname:: ds MON_NAME_LENGTH
|
||||
endr
|
||||
wPartyMonNicknamesEnd::
|
||||
|
||||
wPokedexOwned::
|
||||
flag_array NUM_POKEMON
|
||||
wPokedexOwnedEnd::
|
||||
wPokedexCaught:: flag_array NUM_POKEMON
|
||||
wEndPokedexCaught::
|
||||
|
||||
wPokedexSeen::
|
||||
flag_array NUM_POKEMON
|
||||
wPokedexSeenEnd::
|
||||
wPokedexSeen:: flag_array NUM_POKEMON
|
||||
wEndPokedexSeen::
|
||||
|
||||
wAnnonDex:: ds 26
|
||||
wUnownDex:: ds NUM_UNOWN
|
||||
|
||||
wAnnonID:: ds 1
|
||||
|
||||
wd875:: ds 1
|
||||
|
||||
wBufferMonNickname::
|
||||
wd876:: ds 1
|
||||
|
||||
ds 5
|
||||
|
||||
wBufferMonOT::
|
||||
wd87c:: ds 1
|
||||
|
||||
ds 5
|
||||
|
|
@ -1641,37 +1574,14 @@ SECTION "D8A2", WRAM0[$D8A2]
|
|||
wd8a2:: ds 1
|
||||
wd8a3:: ds 1
|
||||
wd8a4:: ds 1
|
||||
wd8a5:: ds 1
|
||||
|
||||
ds 5
|
||||
wBreedMon1Nickname:: ds MON_NAME_LENGTH
|
||||
wBreedMon1OT:: ds PLAYER_NAME_LENGTH
|
||||
wBreedMon1:: box_struct wBreedMon1
|
||||
|
||||
wd8ab:: ds 1
|
||||
|
||||
SECTION "wd8b1", WRAM0[$D8B1]
|
||||
|
||||
wd8b1:: ds 1
|
||||
|
||||
ds 5
|
||||
|
||||
wd8b7:: ds 1
|
||||
wd8b8:: ds 1
|
||||
|
||||
SECTION "D8D1", WRAM0[$D8D1]
|
||||
|
||||
wd8d1:: ds 1
|
||||
|
||||
ds 5
|
||||
|
||||
wd8d7:: ds 1
|
||||
|
||||
ds 5
|
||||
|
||||
wd8dd:: ds 1
|
||||
|
||||
SECTION "D8E3", WRAM0[$D8E3]
|
||||
|
||||
wd8e3:: ds 1
|
||||
wd8e4:: ds 1
|
||||
wBreedMon2Nickname:: ds MON_NAME_LENGTH
|
||||
wBreedMon2OT:: ds PLAYER_NAME_LENGTH
|
||||
wBreedMon2:: box_struct wBreedMon2
|
||||
|
||||
SECTION "D8FD", WRAM0[$D8FD]
|
||||
|
||||
|
|
@ -1680,7 +1590,9 @@ wd8fe:: ds 1
|
|||
|
||||
SECTION "D913", WRAM0[$D913]
|
||||
|
||||
wd913:: ds 1
|
||||
wOTPartyCount:: db
|
||||
wOTPartySpecies:: ds PARTY_LENGTH
|
||||
wOTPartySpeciesEnd:: db
|
||||
|
||||
SECTION "Wild mon buffer", WRAM0[$D91B]
|
||||
|
||||
|
|
@ -1688,48 +1600,57 @@ UNION
|
|||
wWildMons::
|
||||
ds 41
|
||||
NEXTU
|
||||
ds 1
|
||||
wd91c:: ds 1
|
||||
wd91d:: ds 1
|
||||
wd91e:: ds 1
|
||||
ds 19
|
||||
wd932:: ds 1
|
||||
ds 7
|
||||
wd93a:: ds 1
|
||||
wd93b:: ds 1
|
||||
ds 1
|
||||
wd93d:: ds 1
|
||||
wd93e:: ds 1
|
||||
wd93f:: ds 1
|
||||
wOTPartyMons::
|
||||
; wOTPartyMon1 - wOTPartyMon6
|
||||
for n, 1, PARTY_LENGTH + 1
|
||||
wOTPartyMon{d:n}:: party_struct wOTPartyMon{d:n}
|
||||
endr
|
||||
|
||||
wOTPartyMonOT::
|
||||
; wOTPartyMon1OT - wOTPartyMon6OT
|
||||
for n, 1, PARTY_LENGTH + 1
|
||||
wOTPartyMon{d:n}OT:: ds PLAYER_NAME_LENGTH
|
||||
endr
|
||||
|
||||
wOTPartyMonNicknames::
|
||||
; wOTPartyMon1Nickname - wOTPartyMon6Nickname
|
||||
for n, 1, PARTY_LENGTH + 1
|
||||
wOTPartyMon{d:n}Nickname:: ds MON_NAME_LENGTH
|
||||
endr
|
||||
wOTPartyDataEnd::
|
||||
ENDU
|
||||
|
||||
SECTION "DA3B", WRAM0[$DA3B]
|
||||
|
||||
wOTPartyMonOT:: db
|
||||
|
||||
SECTION "DA5F", WRAM0[$DA5F]
|
||||
|
||||
wda5f:: db
|
||||
|
||||
SECTION "DA83", WRAM0[$DA83]
|
||||
|
||||
wBoxListLength:: db
|
||||
wBoxList:: ds MONS_PER_BOX
|
||||
wBoxListEnd:: db
|
||||
|
||||
SECTION "DAA3", WRAM0[$DAA3]
|
||||
|
||||
wdaa3:: db
|
||||
wdaa4:: db
|
||||
wdaa5:: db
|
||||
wBoxMons::
|
||||
; wBoxMon1 - wBoxMon30
|
||||
for n, 1, MONS_PER_BOX + 1
|
||||
wBoxMon{d:n}:: box_struct wBoxMon{d:n}
|
||||
endr
|
||||
|
||||
wBoxDataEnd::
|
||||
|
||||
SECTION "DE63", WRAM0[$DE63]
|
||||
|
||||
wde63:: db
|
||||
wBoxMonOT::
|
||||
; wBoxMon1OT - wBoxMon30OT
|
||||
for n, 1, MONS_PER_BOX + 1
|
||||
wBoxMon{d:n}OT:: ds PLAYER_NAME_LENGTH
|
||||
endr
|
||||
wBoxMonOTEnd::
|
||||
|
||||
SECTION "DF17", WRAM0[$DF17]
|
||||
wdf17:: ds 1
|
||||
|
||||
SECTION "DFCB", WRAM0[$DFCB]
|
||||
wBoxMonNicknames::
|
||||
; wBoxMon1Nick - wBoxMon30Nick
|
||||
for n, 1, MONS_PER_BOX + 1
|
||||
wBoxMon{d:n}Nick:: ds MON_NAME_LENGTH
|
||||
endr
|
||||
wBoxMonNicknamesEnd::
|
||||
wdfcb:: ds 1
|
||||
|
||||
SECTION "Stack Bottom", WRAM0
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ OldCityPokecenter2FText1:
|
|||
ld [wce37], a
|
||||
ld hl, wJoypadFlags
|
||||
set 5, [hl]
|
||||
callab Function29abf
|
||||
callfar Function29abf
|
||||
ld hl, wJoypadFlags
|
||||
res 5, [hl]
|
||||
ret
|
||||
|
|
@ -46,7 +46,7 @@ OldCityPokecenter2FText2:
|
|||
ld [wce37], a
|
||||
ld hl, wJoypadFlags
|
||||
set 5, [hl]
|
||||
callab Function29abf
|
||||
callfar Function29abf
|
||||
ld hl, wJoypadFlags
|
||||
res 5, [hl]
|
||||
ret
|
||||
|
|
@ -63,15 +63,15 @@ Text947e3:
|
|||
OldCityPokecenter2FText4:
|
||||
ld hl, OldCityPokecenter2FTextString4
|
||||
call OpenTextbox
|
||||
callab Function29a1f
|
||||
callfar Function29a1f
|
||||
jr c, .asm_9480c
|
||||
ld a, $05
|
||||
call Function169f ; something related to follow
|
||||
call DeleteMapObject
|
||||
jr .asm_9480c
|
||||
; unreferenced?
|
||||
ld hl, Data14824
|
||||
ld a, $5
|
||||
call Function16fb
|
||||
call Function16fb ; something related to follow
|
||||
ld hl, $0000
|
||||
nop
|
||||
.asm_9480c
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ OldCityPokecenterBattleText1:
|
|||
call OpenTextbox
|
||||
ld hl, wJoypadFlags
|
||||
res 5, [hl]
|
||||
callab Function28000
|
||||
callfar Function28000
|
||||
ret
|
||||
|
||||
OldCityPokecenterBattleTextString1:
|
||||
|
|
|
|||
|
|
@ -31,5 +31,5 @@ OldCityPokecenterTimeMachine_TextPointers:
|
|||
OldCityPokecenterTimeMachineText1:
|
||||
xor a
|
||||
ld [wce37], a
|
||||
callab Function29abf
|
||||
callfar Function29abf
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ OldCityPokecenterTradeText1:
|
|||
call OpenTextbox
|
||||
ld hl, wJoypadFlags
|
||||
res 5, [hl]
|
||||
callab Function28000
|
||||
callfar Function28000
|
||||
ret
|
||||
|
||||
OldCityPokecenterTradeTextString1:
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ PlayerHouse2FComputerText:
|
|||
|
||||
.jump
|
||||
call RefreshScreen
|
||||
callab PokemonCenterPC
|
||||
callfar PokemonCenterPC
|
||||
call Function1fea
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ SilentHillTextRival1:
|
|||
|
||||
LoadMomNamePromptUnused:
|
||||
call LoadStandardMenuHeader
|
||||
callab MomNamePrompt
|
||||
callfar MomNamePrompt
|
||||
call CloseWindow
|
||||
call GetMemSGBLayout
|
||||
call UpdateSprites
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ SilentHillHouseNPCText1:
|
|||
|
||||
.jump
|
||||
call RefreshScreen
|
||||
callab PokemonCenterPC
|
||||
callfar PokemonCenterPC
|
||||
call Function1fea
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -219,10 +219,10 @@ ConfirmPokemonSelection:
|
|||
ld hl, wJoypadFlags
|
||||
set 5, [hl]
|
||||
ld a, [wd265]
|
||||
ld [wMonDexIndex], a
|
||||
ld [wCurPartySpecies], a
|
||||
ld a, 5
|
||||
ld [wCurPartyLevel], a
|
||||
callab Function60a0
|
||||
callfar Function60a0
|
||||
xor a
|
||||
ld [wPartyMon1 + 1], a
|
||||
ld a, 3
|
||||
|
|
@ -311,7 +311,7 @@ SilentHillLabBackFunc4:
|
|||
ld [wd265], a
|
||||
push hl
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
callba Function6734
|
||||
farcall Function6734
|
||||
ld a, [wd265]
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
call GetPokemonName
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user