Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding bank14, good chunk of text transcribed and labelled in bank0d, renaming farcall to callab, and much more #112

Merged
merged 13 commits into from
Jan 16, 2025
Merged
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ __pycache__

# utility output
/coverage.png

# macos files
.DS_STORE
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ $(BUILD)/%.tilemap: %.png | $$(dir $$@)
$(RGBGFX) -t $@ $<

.PRECIOUS: $(BUILD)/%.sgb.tilemap
export LC_ALL=C
$(BUILD)/%.sgb.tilemap: %.bin | $$(dir $$@)
tr < $< -d '\000' > $@

Expand Down
2 changes: 1 addition & 1 deletion audio/songs/bicycle.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion audio/songs/nidorinointro.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion audio/songs/oakintro.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion audio/songs/viridiancity.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
10 changes: 10 additions & 0 deletions constants/charmap.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 25 additions & 0 deletions constants/flypoint_constants.asm
Original file line number Diff line number Diff line change
@@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

index comments should be aligned one space after the longest const name.


DEF FLY_POINT_N_A EQU $FF
2 changes: 2 additions & 0 deletions constants/gfx_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
28 changes: 14 additions & 14 deletions constants/map_object_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double check that the comments line up.

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
30 changes: 30 additions & 0 deletions constants/pokemon_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 6 additions & 2 deletions constants/pokemon_data_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,12 @@ 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
; English version:
;DEF MONS_PER_BOX EQU 20
;DEF NUM_BOXES EQU 14
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably just get rid of these lines.


; hall of fame
DEF HOF_MON_LENGTH EQUS "(wHallOfFamePokemonListMon1End - wHallOfFamePokemonListMon1)"
Expand Down
49 changes: 49 additions & 0 deletions constants/spawnpoint_constants.asm
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion constants/text_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
27 changes: 27 additions & 0 deletions data/maps/flypoints.asm
Original file line number Diff line number Diff line change
@@ -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
Loading
Loading