Skip to content

Commit

Permalink
Identified wBattleMon and wEnemyMon structs
Browse files Browse the repository at this point in the history
  • Loading branch information
DrippingYellow committed Jan 15, 2025
1 parent 630163f commit a2ce32b
Show file tree
Hide file tree
Showing 20 changed files with 959 additions and 972 deletions.
9 changes: 1 addition & 8 deletions constants/map_data_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
49 changes: 30 additions & 19 deletions constants/menu_constants.asm
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -32,6 +31,22 @@
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)
Expand All @@ -41,28 +56,24 @@
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_FLASH ; 5
const MONMENUITEM_WHIRLPOOL ; 6
const MONMENUITEM_BOUNCE ; 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
; 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

Expand Down
2 changes: 1 addition & 1 deletion data/predef_pointers.inc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ GiveItemPredef::
add_predef Function28d6e
add_predef Function40ac7
add_predef Function40000
add_predef Function40b5c ; 30
add_predef ConvertMon_1to2 ; 30
add_predef CopyMonToTempMon
add_predef ListMoves
add_predef Function50bcd
Expand Down
2 changes: 1 addition & 1 deletion engine/debug/field/vram_viewer.inc
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ FieldDebug_DoVRAMViewer:
call .LoadPokemon
ld de, $9310
ld a, 3
ld [wcdd8], a
ld [wTempBattleMonSpecies], a
predef Function3f04a
ret

Expand Down
6 changes: 3 additions & 3 deletions engine/dumps/bank01.asm
Original file line number Diff line number Diff line change
Expand Up @@ -3029,7 +3029,7 @@ Function6445:
call CopyBytes
.sub_645d
ld hl, wPartyMon1Moves
ld bc, $0030
ld bc, PARTYMON_STRUCT_LENGTH
ld a, [wCurPartyMon]
call AddNTimes
ld d, h
Expand Down Expand Up @@ -3080,12 +3080,12 @@ Function6445:
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
Expand Down
Loading

0 comments on commit a2ce32b

Please sign in to comment.