From 86c1e0feea0ba487b020b801835aa19b221edb4d Mon Sep 17 00:00:00 2001 From: yenatch Date: Tue, 10 Jun 2014 23:08:07 -0700 Subject: Consolidate NUM_MOVES usage and monster struct labels. There turned out to be a lot of instances of NUM_MOVES. --- constants/misc_constants.asm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'constants/misc_constants.asm') diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index 9236887a4..076684345 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -2,9 +2,18 @@ ; strings PLAYER_NAME_LENGTH EQU 8 PKMN_NAME_LENGTH EQU 11 +MOVE_NAME_LENGTH EQU 13 NAME_LENGTH EQU 11 LV_CHAR EQU $6e +; GetName types +PKMN_NAME EQU 1 +MOVE_NAME EQU 2 +ITEM_NAME EQU 4 +PARTY_OT_NAME EQU 5 +ENEMY_OT_NAME EQU 6 +TRAINER_NAME EQU 7 + ; boxes NUM_BOXES EQU 14 @@ -22,6 +31,7 @@ PREDEF_UPDATE_ENEMY_HUD EQU $15 PREDEF_START_BATTLE EQU $16 PREDEF_FILL_IN_EXP_BAR EQU $17 PREDEF_FILLMOVES EQU $1B +PREDEF_LIST_MOVES EQU $20 PREDEF_GET_GENDER EQU $24 PREDEF_STATS_SCREEN EQU $25 PREDEF_DRAW_PLAYER_HP EQU $26 -- cgit v1.2.3 From 023cfdbb051ea5184ebc7fa329db3ca43f1ca23e Mon Sep 17 00:00:00 2001 From: yenatch Date: Thu, 12 Jun 2014 18:32:42 -0700 Subject: Consolidate monster structs in wram and sram. The PartyMon struct is really the box struct with volatile variables like status added. Some other labels have been reworked. Move structs no longer have explicit labels since their location is arbitrary and usually shared. --- constants/misc_constants.asm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'constants/misc_constants.asm') diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index 076684345..605344478 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -1,3 +1,4 @@ +PARTY_LENGTH EQU 6 ; strings PLAYER_NAME_LENGTH EQU 8 @@ -16,7 +17,8 @@ TRAINER_NAME EQU 7 ; boxes -NUM_BOXES EQU 14 +MONS_PER_BOX EQU 20 +NUM_BOXES EQU 14 ; predefs -- cgit v1.2.3 From eb9fc6676cfed0460d19ce441134dbcdfce49b0d Mon Sep 17 00:00:00 2001 From: yenatch Date: Fri, 13 Jun 2014 21:18:14 -0700 Subject: More battle code cleanup. - Use more substatus constants. - Reformat some code to be more atomic. - Add constants for unused status prevention held item effects. - Remove pointless or redundant comments. --- constants/misc_constants.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'constants/misc_constants.asm') diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index 605344478..bf56c15a1 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -72,9 +72,9 @@ D_DOWN EQU %10000000 ; screen HP_BAR_LENGTH EQU 6 -HP_BAR_LENGTH_PX EQU 48 +HP_BAR_LENGTH_PX EQU HP_BAR_LENGTH * 8 EXP_BAR_LENGTH EQU 8 -EXP_BAR_LENGTH_PX EQU 64 +EXP_BAR_LENGTH_PX EQU EXP_BAR_LENGTH * 8 SCREEN_WIDTH EQU 20 SCREEN_HEIGHT EQU 18 -- cgit v1.2.3 From 0b7dfeb9b208a16682e92de9cf15e19fb8cf8a94 Mon Sep 17 00:00:00 2001 From: yenatch Date: Mon, 16 Jun 2014 10:32:39 -0700 Subject: Name and comment some move learning functions. --- constants/misc_constants.asm | 1 + 1 file changed, 1 insertion(+) (limited to 'constants/misc_constants.asm') diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index bf56c15a1..f2e5f2100 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -22,6 +22,7 @@ NUM_BOXES EQU 14 ; predefs +PREDEF_LEARN_MOVE EQU $00 PREDEF_FLAG EQU $03 PREDEF_FILLPP EQU $05 PREDEF_ADDPARTYMON EQU $06 -- cgit v1.2.3 From 8639fcd29b0e929ec6cc236a209d0e07a495db14 Mon Sep 17 00:00:00 2001 From: yenatch Date: Mon, 16 Jun 2014 11:20:01 -0700 Subject: Use a predef macro that takes labels instead of juggling constants. Besides making predefs convenient, naming a predef no longer requires adding or renaming a predef constant. This also lets predefs be rearranged at will. --- constants/misc_constants.asm | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'constants/misc_constants.asm') diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index f2e5f2100..2e5c5573a 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -21,35 +21,6 @@ MONS_PER_BOX EQU 20 NUM_BOXES EQU 14 -; predefs -PREDEF_LEARN_MOVE EQU $00 -PREDEF_FLAG EQU $03 -PREDEF_FILLPP EQU $05 -PREDEF_ADDPARTYMON EQU $06 -PREDEF_FILLSTATS EQU $0C -PREDEF_PRINT_MOVE_DESCRIPTION EQU $11 -PREDEF_UPDATE_PLAYER_HUD EQU $12 -PREDEF_FILL_BOX EQU $13 -PREDEF_UPDATE_ENEMY_HUD EQU $15 -PREDEF_START_BATTLE EQU $16 -PREDEF_FILL_IN_EXP_BAR EQU $17 -PREDEF_FILLMOVES EQU $1B -PREDEF_LIST_MOVES EQU $20 -PREDEF_GET_GENDER EQU $24 -PREDEF_STATS_SCREEN EQU $25 -PREDEF_DRAW_PLAYER_HP EQU $26 -PREDEF_DRAW_ENEMY_HP EQU $27 -PREDEF_GET_TYPE_NAME EQU $29 -PREDEF_PRINT_MOVE_TYPE EQU $2A -PREDEF_PRINT_TYPE EQU $2B -PREDEF_GET_UNOWN_LETTER EQU $2D -PREDEF_LOAD_SGB_LAYOUT EQU $31 -PREDEF_CHECK_CONTEST_MON EQU $33 -PREDEF_BATTLE_TRANSITION EQU $34 -PREDEF_PARTYMON_ITEM_NAME EQU $3B -PREDEF_DECOMPRESS EQU $40 - - ; flag manipulation RESET_FLAG EQU 0 SET_FLAG EQU 1 -- cgit v1.2.3 From 541a9c73472db20472db5531cba196a0dcd148ea Mon Sep 17 00:00:00 2001 From: yenatch Date: Mon, 16 Jun 2014 22:52:59 -0700 Subject: Name the UpdateEnemyHUD predef. Also start using hp palette constants. --- constants/misc_constants.asm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'constants/misc_constants.asm') diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index 2e5c5573a..5b291f6e8 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -15,6 +15,10 @@ PARTY_OT_NAME EQU 5 ENEMY_OT_NAME EQU 6 TRAINER_NAME EQU 7 +; hp +HP_GREEN EQU 0 +HP_YELLOW EQU 1 +HP_RED EQU 2 ; boxes MONS_PER_BOX EQU 20 -- cgit v1.2.3