shithub: pokecrystal

Download patch

ref: c4a18b13295cd9f2777bfa27a37aafc09eb31684
parent: d15429e3b78b55c5f111898bd1aaf58b1273d5d7
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Tue Dec 26 17:36:01 EST 2017

Correct documentation
Split out text_constants.asm

--- a/constants.asm
+++ b/constants.asm
@@ -31,6 +31,7 @@
 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"
--- a/constants/misc_constants.asm
+++ b/constants/misc_constants.asm
@@ -16,40 +16,14 @@
 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
+; hMenuReturn
+HMENURETURN_SCRIPT EQU %10000000
+HMENURETURN_ASM    EQU %11111111
 
-; 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
-
-
 ; DoPlayerMovement.DoStep arguments (see engine/player_movement.asm)
 	const_def
 	const STEP_SLOW          ; 0
@@ -61,17 +35,6 @@
 	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 @@
 NOON_HOUR EQU 12 ; 12 PM
 MAX_HOUR  EQU 24 ; 12 AM
 
-
 ; boxes
 MONS_PER_BOX EQU 20
 NUM_BOXES    EQU 14
@@ -91,7 +53,6 @@
 
 MAX_LINK_RECORD EQU 9999
 
-
 ; significant money values
 START_MONEY EQU 3000
 MOM_MONEY   EQU 2300
@@ -98,7 +59,6 @@
 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 HAPPINESS_MASSAGE           ; 12
 	const HAPPINESS_GAINLEVELATHOME   ; 13
 
+; day-care
 MAX_DAY_CARE_EXP EQU $500000
--- /dev/null
+++ b/constants/text_constants.asm
@@ -1,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
--- 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
--- 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
--- 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`
--- 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*
--- 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
@@ -54,7 +44,6 @@
 	call ByteFill
 	jr ClearTileMap
 ; fe8
-
 
 
 TextBox:: ; fe8