diff --git a/constants.asm b/constants.asm index a665c4dad..7de20dfe2 100644 --- a/constants.asm +++ b/constants.asm @@ -31,6 +31,7 @@ INCLUDE "constants/pokemon_data_constants.asm" INCLUDE "constants/icon_constants.asm" INCLUDE "constants/serial_constants.asm" INCLUDE "constants/mobile_constants.asm" +INCLUDE "constants/text_constants.asm" INCLUDE "constants/misc_constants.asm" INCLUDE "constants/std_constants.asm" INCLUDE "constants/deco_constants.asm" diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index 88ae90c89..6289b610c 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -16,39 +16,13 @@ HP_GREEN EQU 0 HP_YELLOW EQU 1 HP_RED EQU 2 +; save file corruption check values +SAVE_CHECK_VALUE_1 EQU 99 +SAVE_CHECK_VALUE_2 EQU 127 -; name lengths -NAME_LENGTH EQU 11 -PLAYER_NAME_LENGTH EQU 8 -BOX_NAME_LENGTH EQU 9 -PKMN_NAME_LENGTH EQU 11 -MOVE_NAME_LENGTH EQU 13 -ITEM_NAME_LENGTH EQU 13 -TRAINER_CLASS_NAME_LENGTH EQU 13 -NAME_LENGTH_JAPANESE EQU 6 - -; GetName types (see home/names.asm) -PKMN_NAME EQU 1 -MOVE_NAME EQU 2 -; dummied out EQU 3 -ITEM_NAME EQU 4 -PARTY_OT_NAME EQU 5 -ENEMY_OT_NAME EQU 6 -TRAINER_NAME EQU 7 -; broken ptr EQU 8 - - -; printing text -const_value set 5 - const PRINTNUM_MONEY_F ; 5 - const PRINTNUM_RIGHTALIGN_F ; 6 - const PRINTNUM_LEADINGZEROS_F ; 7 - -; PrintNum arguments (see engine/printnum.asm) -PRINTNUM_MONEY EQU 1 << PRINTNUM_MONEY_F -PRINTNUM_RIGHTALIGN EQU 1 << PRINTNUM_RIGHTALIGN_F -PRINTNUM_LEADINGZEROS EQU 1 << PRINTNUM_LEADINGZEROS_F - +; hMenuReturn +HMENURETURN_SCRIPT EQU %10000000 +HMENURETURN_ASM EQU %11111111 ; DoPlayerMovement.DoStep arguments (see engine/player_movement.asm) const_def @@ -61,17 +35,6 @@ PRINTNUM_LEADINGZEROS EQU 1 << PRINTNUM_LEADINGZEROS_F const STEP_BACK_LEDGE ; 6 const STEP_WALK_IN_PLACE ; 7 - -; hMenuReturn -HMENURETURN_SCRIPT EQU %10000000 -HMENURETURN_ASM EQU %11111111 - - -; save file corruption check values -SAVE_CHECK_VALUE_1 EQU 99 -SAVE_CHECK_VALUE_2 EQU 127 - - ; time of day boundaries MORN_HOUR EQU 4 ; 4 AM DAY_HOUR EQU 10 ; 10 AM @@ -79,7 +42,6 @@ NITE_HOUR EQU 18 ; 6 PM NOON_HOUR EQU 12 ; 12 PM MAX_HOUR EQU 24 ; 12 AM - ; boxes MONS_PER_BOX EQU 20 NUM_BOXES EQU 14 @@ -91,14 +53,12 @@ NUM_HOF_TEAMS = 30 MAX_LINK_RECORD EQU 9999 - ; significant money values START_MONEY EQU 3000 MOM_MONEY EQU 2300 MAX_MONEY EQU 999999 MAX_COINS EQU 9999 - ; ChangeHappiness arguments (see data/happiness_changes.asm) const_value = 1 const HAPPINESS_GAINLEVEL ; 01 @@ -121,4 +81,5 @@ const_value = 1 const HAPPINESS_MASSAGE ; 12 const HAPPINESS_GAINLEVELATHOME ; 13 +; day-care MAX_DAY_CARE_EXP EQU $500000 diff --git a/constants/text_constants.asm b/constants/text_constants.asm new file mode 100644 index 000000000..d867c77f7 --- /dev/null +++ b/constants/text_constants.asm @@ -0,0 +1,41 @@ +; name lengths +NAME_LENGTH EQU 11 +PLAYER_NAME_LENGTH EQU 8 +BOX_NAME_LENGTH EQU 9 +PKMN_NAME_LENGTH EQU 11 +MOVE_NAME_LENGTH EQU 13 +ITEM_NAME_LENGTH EQU 13 +TRAINER_CLASS_NAME_LENGTH EQU 13 +NAME_LENGTH_JAPANESE EQU 6 + +; GetName types (see home/names.asm) +PKMN_NAME EQU 1 +MOVE_NAME EQU 2 +; dummied out EQU 3 +ITEM_NAME EQU 4 +PARTY_OT_NAME EQU 5 +ENEMY_OT_NAME EQU 6 +TRAINER_NAME EQU 7 +; broken ptr EQU 8 + +; see home/text.asm +BORDER_WIDTH EQU 2 +TEXTBOX_WIDTH EQU SCREEN_WIDTH +TEXTBOX_INNERW EQU TEXTBOX_WIDTH - BORDER_WIDTH +TEXTBOX_HEIGHT EQU 6 +TEXTBOX_INNERH EQU TEXTBOX_HEIGHT - BORDER_WIDTH +TEXTBOX_X EQU 0 +TEXTBOX_INNERX EQU TEXTBOX_X + 1 +TEXTBOX_Y EQU SCREEN_HEIGHT - TEXTBOX_HEIGHT +TEXTBOX_INNERY EQU TEXTBOX_Y + 2 + +; PrintNum bit flags +const_value set 5 + const PRINTNUM_MONEY_F ; 5 + const PRINTNUM_RIGHTALIGN_F ; 6 + const PRINTNUM_LEADINGZEROS_F ; 7 + +; PrintNum arguments (see engine/printnum.asm) +PRINTNUM_MONEY EQU 1 << PRINTNUM_MONEY_F +PRINTNUM_RIGHTALIGN EQU 1 << PRINTNUM_RIGHTALIGN_F +PRINTNUM_LEADINGZEROS EQU 1 << PRINTNUM_LEADINGZEROS_F diff --git a/data/palettes/pokemon_palettes.asm b/data/palettes/pokemon_palettes.asm index 1c491254a..2e47bbdaf 100644 --- a/data/palettes/pokemon_palettes.asm +++ b/data/palettes/pokemon_palettes.asm @@ -1,4 +1,5 @@ PokemonPalettes: ; a8ce +; entries correspond to Pokémon species, two apiece ; 000 RGB 30, 22, 17 diff --git a/data/pokemon/pic_pointers.asm b/data/pokemon/pic_pointers.asm index 58631e09a..27f1f949f 100644 --- a/data/pokemon/pic_pointers.asm +++ b/data/pokemon/pic_pointers.asm @@ -1,5 +1,5 @@ PicPointers:: -; entries correspond to constants/pokemon_constants.asm, two apiece +; entries correspond to Pokémon species, two apiece dba_pic BulbasaurFrontpic dba_pic BulbasaurBackpic dba_pic IvysaurFrontpic diff --git a/docs/effect_commands.md b/docs/effect_commands.md index 3112950a9..bd982a51d 100644 --- a/docs/effect_commands.md +++ b/docs/effect_commands.md @@ -1,6 +1,6 @@ # Effect Commands -Defined in [macros/scripts/effect_commands.asm](/macros/scripts/effect_commands.asm) and [battle/effect_command_pointers.asm:BattleCommandPointers](/battle/effect_command_pointers.asm). +Defined in [macros/scripts/effect_commands.asm](/macros/scripts/effect_commands.asm) and [data/moves/effect_command_pointers.asm:BattleCommandPointers](/data/moves/effect_command_pointers.asm). ## `$01`: `checkturn` diff --git a/docs/music_commands.md b/docs/music_commands.md index 21befa71f..7f7bd8b32 100644 --- a/docs/music_commands.md +++ b/docs/music_commands.md @@ -2,7 +2,7 @@ Defined in [macros/scripts/audio.asm](/macros/scripts/audio.asm) and [audio/engine.asm:MusicCommands](/audio/engine.asm). -See also: [Sound Engine Commands](https://github.com/pret/pokecrystal/wiki/Sound-Engine-Commands) +*See also: [Sound Engine Commands](https://github.com/pret/pokecrystal/wiki/Sound-Engine-Commands)* ## `musicheader` *n*, *index*, *address* diff --git a/home/text.asm b/home/text.asm index 4b0d0d5df..39d9a3ed1 100644 --- a/home/text.asm +++ b/home/text.asm @@ -1,17 +1,7 @@ -BORDER_WIDTH EQU 2 -TEXTBOX_WIDTH EQU SCREEN_WIDTH -TEXTBOX_INNERW EQU TEXTBOX_WIDTH - BORDER_WIDTH -TEXTBOX_HEIGHT EQU 6 -TEXTBOX_INNERH EQU TEXTBOX_HEIGHT - BORDER_WIDTH -TEXTBOX_X EQU 0 -TEXTBOX_INNERX EQU TEXTBOX_X + 1 -TEXTBOX_Y EQU SCREEN_HEIGHT - TEXTBOX_HEIGHT -TEXTBOX_INNERY EQU TEXTBOX_Y + 2 - ClearBox:: ; fb6 ; Fill a c*b box at hl with blank tiles. - ld a, " " + ; fallthrough FillBoxWithByte:: .row @@ -56,7 +46,6 @@ ClearScreen:: ; fdb ; fe8 - TextBox:: ; fe8 ; Draw a text box at hl with room for ; b lines of c characters each.