Skip to content

Commit

Permalink
const_def N
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Jan 31, 2018
1 parent 9e368ee commit 08891da
Show file tree
Hide file tree
Showing 370 changed files with 397 additions and 393 deletions.
4 changes: 2 additions & 2 deletions constants/battle_anim_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const BATTLEANIMOAMSET_D7

; BattleBGEffects indexes (see engine/battle_anims/bg_effects.asm)
const_value set 1
const_def 1
const ANIM_BG_FLASH_INVERTED
const ANIM_BG_FLASH_WHITE
const ANIM_BG_WHITE_HUES
Expand Down Expand Up @@ -764,7 +764,7 @@ const_value set 1
const ANIM_BG_35

; AnimObjGFX indexes (see data/battle_anims/object_gfx.asm)
const_value set 1
const_def 1
const ANIM_GFX_HIT
const ANIM_GFX_CUT
const ANIM_GFX_FIRE
Expand Down
6 changes: 3 additions & 3 deletions constants/battle_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ MOVE_LENGTH EQU const_value
; indexes for:
; - PlayerStats and EnemyStats (see wram.asm)
; - party_struct and battle_struct members (see macros/wram.asm)
const_value set 1
const_def 1
const STAT_HP
const STAT_ATK
const STAT_DEF
Expand All @@ -76,7 +76,7 @@ ATKDEFDV_SHINY EQU $EA
SPDSPCDV_SHINY EQU $AA

; battle classes (wBattleMode values)
const_value set 1
const_def 1
const WILD_BATTLE
const TRAINER_BATTLE

Expand Down Expand Up @@ -151,7 +151,7 @@ const_value set 1

; status condition bit flags
SLP EQU %111 ; 0-7 turns
const_value set 3
const_def 3
const PSN
const BRN
const FRZ
Expand Down
2 changes: 1 addition & 1 deletion constants/battle_tower_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ BATTLE_TOWER_STRUCT_LENGTH EQU $e0 ; NAME_LENGTH + BATTLETOWER_PARTY_LENGTH * (P
MOBILE_EVENT_OBJECT_GS_BALL EQU $b

; BattleTowerText arguments (see engine/events/battle_tower/trainer_text.asm)
const_value set 1
const_def 1
const BATTLETOWERTEXT_INTRO
const BATTLETOWERTEXT_WIN_TEXT
const BATTLETOWERTEXT_LOSS_TEXT
Expand Down
2 changes: 1 addition & 1 deletion constants/credits_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
const PAAD_TESTING

; CreditsScript indexes (see data/credits_script.asm)
const_value set -7
const_def -7
const CREDITS_THEEND
const CREDITS_WAIT2
const CREDITS_MUSIC
Expand Down
14 changes: 7 additions & 7 deletions constants/item_data_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ITEMATTR_STRUCT_LENGTH EQU const_value

; item types
const_value set 1
const_def 1
const ITEM ; 1
const KEY_ITEM ; 2
const BALL ; 3
Expand Down Expand Up @@ -65,7 +65,7 @@ MAIL_STRUCT_LENGTH EQU $2f ; mailmsg struct
const HELD_7
const HELD_CLEANSE_TAG

const_value set 10
const_def 10
const HELD_HEAL_POISON
const HELD_HEAL_FREEZE
const HELD_HEAL_BURN
Expand All @@ -74,15 +74,15 @@ const_value set 10
const HELD_HEAL_STATUS
const HELD_HEAL_CONFUSION

const_value set 20
const_def 20
const HELD_PREVENT_POISON
const HELD_PREVENT_BURN
const HELD_PREVENT_FREEZE
const HELD_PREVENT_SLEEP
const HELD_PREVENT_PARALYZE
const HELD_PREVENT_CONFUSE

const_value set 30
const_def 30
const HELD_30
const HELD_ATTACK_UP
const HELD_DEFENSE_UP
Expand All @@ -93,12 +93,12 @@ const_value set 30
const HELD_EVASION_UP
const HELD_38

const_value set 40
const_def 40
const HELD_40
const HELD_41
const HELD_METAL_POWDER

const_value set 50
const_def 50
const HELD_NORMAL_BOOST
const HELD_FIGHTING_BOOST
const HELD_FLYING_BOOST
Expand All @@ -117,7 +117,7 @@ const_value set 50
const HELD_DARK_BOOST
const HELD_STEEL_BOOST

const_value set 70
const_def 70
const HELD_CATCH_CHANCE
const HELD_71
const HELD_ESCAPE
Expand Down
2 changes: 1 addition & 1 deletion constants/map_data_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ MAP_NONE EQU 0
NUM_MAPDEF_ATTRIBUTES EQU const_value

; map environments (wEnvironment)
const_value set 1
const_def 1
const TOWN
const ROUTE
const INDOOR
Expand Down
4 changes: 2 additions & 2 deletions constants/map_setup_constants.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
; hMapEntryMethod values
; MapSetupScripts indexes (see data/maps/setup_scripts.asm)
const_value set $f1
const_def $f1
const MAPSETUP_WARP ; f1
const MAPSETUP_CONTINUE ; f2
const MAPSETUP_RELOADMAP ; f3
Expand Down Expand Up @@ -67,7 +67,7 @@ const_value set $f1
map_end EQU -1

; callback types
const_value set 1
const_def 1
const MAPCALLBACK_TILES
const MAPCALLBACK_OBJECTS
const MAPCALLBACK_CMDQUEUE
Expand Down
8 changes: 4 additions & 4 deletions constants/menu_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@

; MonMenuOptions indexes (see data/mon_menu.asm)
; used by PokemonActionSubmenu (see engine/start_menu.asm)
const_value set 1
; moves
const_def 1
; moves
const MONMENUITEM_CUT ; 1
const MONMENUITEM_FLY ; 2
const MONMENUITEM_SURF ; 3
Expand All @@ -51,7 +51,7 @@ const_value set 1
const MONMENUITEM_ROCKSMASH ; 12
const MONMENUITEM_MILKDRINK ; 13
const MONMENUITEM_SWEETSCENT ; 14
; options
; options
const MONMENUITEM_STATS ; 15
const MONMENUITEM_SWITCH ; 16
const MONMENUITEM_ITEM ; 17
Expand Down Expand Up @@ -84,7 +84,7 @@ HMENURETURN_ASM EQU %11111111
const PARTYMENUACTION_GIVE_ITEM
const PARTYMENUACTION_MOBILE ; mobile
; PrintPartyMenuActionText arguments (see engine/party_menu.asm)
const_value set $f0
const_def $f0
const PARTYMENUTEXT_HEAL_PSN
const PARTYMENUTEXT_HEAL_BRN
const PARTYMENUTEXT_HEAL_FRZ
Expand Down
4 changes: 2 additions & 2 deletions constants/pokemon_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
; - BitmasksPointers (see gfx/pokemon/bitmask_pointers.asm)
; - FramesPointers (see gfx/pokemon/frame_pointers.asm)
; - Footprints (see gfx/footprints.asm)
const_value set 1
const_def 1
const BULBASAUR ; 01
const IVYSAUR ; 02
const VENUSAUR ; 03
Expand Down Expand Up @@ -284,7 +284,7 @@ NUM_POKEMON EQU const_value +- 1
; - UnownAnimationIdlePointers (see gfx/pokemon/unown_idle_pointers.asm)
; - UnownBitmasksPointers (see gfx/pokemon/unown_bitmask_pointers.asm)
; - UnownFramesPointers (see gfx/pokemon/unown_frame_pointers.asm)
const_value set 1
const_def 1
const UNOWN_A ; 1
const UNOWN_B ; 2
const UNOWN_C ; 3
Expand Down
8 changes: 4 additions & 4 deletions constants/pokemon_data_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ GENDERLESS EQU 255
const SLOW

; BaseEggGroups values
const_value set 1
const_def 1
const MONSTER ; 1
const AMPHIBIAN ; 2
const INSECT ; 3
Expand Down Expand Up @@ -131,21 +131,21 @@ NUM_HOF_TEAMS = 30


; evolution types (used in data/pokemon/evos_attacks.asm)
const_value set 1
const_def 1
const EVOLVE_LEVEL
const EVOLVE_ITEM
const EVOLVE_TRADE
const EVOLVE_HAPPINESS
const EVOLVE_STAT

; EVOLVE_HAPPINESS triggers
const_value set 1
const_def 1
const TR_ANYTIME
const TR_MORNDAY
const TR_NITE

; EVOLVE_STAT triggers
const_value set 1
const_def 1
const ATK_GT_DEF
const ATK_LT_DEF
const ATK_EQ_DEF
Expand Down
2 changes: 1 addition & 1 deletion constants/printer_constants.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; wPrinterStatus
const_value set 1
const_def 1
const PRINTER_STATUS_CHECKING
const PRINTER_STATUS_TRANSMITTING
const PRINTER_STATUS_PRINTING
Expand Down
6 changes: 3 additions & 3 deletions constants/script_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ RETVAR_EXECUTE EQU (2 << 6)


; PlayerEventScriptPointers indexes (see engine/events.asm)
const_value set -1
const_def -1
const PLAYEREVENT_MAPSCRIPT
const PLAYEREVENT_NONE
const PLAYEREVENT_SEENBYTRAINER
Expand Down Expand Up @@ -168,7 +168,7 @@ EMOTE_MEM EQU -1

; fruittree arguments
; FruitTreeItems indexes (see data/items/fruit_trees.asm)
const_value set 1
const_def 1
const FRUITTREE_ROUTE_29 ; 01
const FRUITTREE_ROUTE_30_1 ; 02
const FRUITTREE_ROUTE_38 ; 03
Expand Down Expand Up @@ -275,7 +275,7 @@ NUM_UNOWN_PUZZLES EQU const_value
const UNOWNWORDS_HO_OH ; 3

; MoveTutor writebyte arguments
const_value set 1
const_def 1
const MOVETUTOR_FLAMETHROWER ; 1
const MOVETUTOR_THUNDERBOLT ; 2
const MOVETUTOR_ICE_BEAM ; 3
6 changes: 3 additions & 3 deletions constants/sprite_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
const SPRITE_STANDING_YOUNGSTER ; 66

; SpriteMons indexes (see data/sprites/sprite_mons.asm)
const_value set $80
const_def $80
SPRITE_POKEMON EQU const_value
const SPRITE_UNOWN ; 80
const SPRITE_GEODUDE ; 81
Expand Down Expand Up @@ -145,12 +145,12 @@ SPRITE_POKEMON EQU const_value
const SPRITE_HO_OH ; a2

; special GetMonSprite values (see engine/overworld.asm)
const_value set $e0
const_def $e0
const SPRITE_DAY_CARE_MON_1 ; e0
const SPRITE_DAY_CARE_MON_2 ; e1

; VariableSprites indexes (see wram.asm)
const_value set $f0
const_def $f0
SPRITE_VARS EQU const_value
const SPRITE_CONSOLE ; f0
const SPRITE_DOLL_1 ; f1
Expand Down
4 changes: 2 additions & 2 deletions constants/sprite_data_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
NUM_SPRITEDATA_FIELDS EQU const_value

; sprite types
const_value set 1
const_def 1
const WALKING_SPRITE ; 1
const STANDING_SPRITE ; 2
const STILL_SPRITE ; 3
Expand All @@ -27,7 +27,7 @@ const_value set 1

; object_events set bit 3 so as not to use the sprite's default palette
; MapObjectPals indexes (see gfx/overworld/npc_sprites.pal)
const_value set (1 << 3)
const_def 1 << 3
const PAL_NPC_RED ; 8
const PAL_NPC_BLUE ; 9
const PAL_NPC_GREEN ; a
Expand Down
4 changes: 2 additions & 2 deletions constants/text_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ TRAINER_CLASS_NAME_LENGTH EQU 13
NAME_LENGTH_JAPANESE EQU 6

; GetName types (see home/names.asm)
const_value set 1
const_def 1
const MON_NAME ; 1
const MOVE_NAME ; 2
const DUMMY_NAME ; 3
Expand All @@ -31,7 +31,7 @@ TEXTBOX_Y EQU SCREEN_HEIGHT - TEXTBOX_HEIGHT
TEXTBOX_INNERY EQU TEXTBOX_Y + 2

; PrintNum bit flags
const_value set 5
const_def 5
const PRINTNUM_MONEY_F ; 5
const PRINTNUM_RIGHTALIGN_F ; 6
const PRINTNUM_LEADINGZEROS_F ; 7
Expand Down
2 changes: 1 addition & 1 deletion constants/tileset_constants.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; Tilesets indexes (see data/tilesets.asm)
const_value set 1
const_def 1
const TILESET_JOHTO ; 01
const TILESET_JOHTO_MODERN ; 02
const TILESET_KANTO ; 03
Expand Down
4 changes: 2 additions & 2 deletions constants/wram_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ GAMETIMERPAUSE_TIMER_PAUSED_F EQU 0
GAMETIMERPAUSE_MOBILE_7_F EQU 7

; Options:: ; cfcc
const_value set 4
const_def 4
const NO_TEXT_SCROLL ; 4
const STEREO ; 5
const BATTLE_SHIFT ; 6
Expand Down Expand Up @@ -60,7 +60,7 @@ GBPRINTER_DARKEST EQU $7f
const MENU_ACCOUNT ; 0

; WalkingDirection:: ; d043
const_value set -1
const_def -1
const STANDING ; -1
const DOWN ; 0
const UP ; 1
Expand Down
2 changes: 1 addition & 1 deletion data/mon_menu.asm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; MonMenuOptionStrings indexes
const_value set 1
const_def 1
const MONMENUVALUE_STATS ; 1
const MONMENUVALUE_SWITCH ; 2
const MONMENUVALUE_ITEM ; 3
Expand Down
2 changes: 1 addition & 1 deletion docs/map_event_scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
## Object constants

<pre>
const_value set 2 ; object constants
const_def 2 ; object constants
const <i>MAPNAME</i>_<i>OBJECTNAME</i>
</pre>

Expand Down
2 changes: 1 addition & 1 deletion engine/debug.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const_value set $6a
const_def $6a
const DEBUGTEST_UP_ARROW ; $6a
const DEBUGTEST_TICKS ; $6b
const DEBUGTEST_WHITE ; $6c
Expand Down
2 changes: 1 addition & 1 deletion engine/stats_screen.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const_value set 1
const_def 1
const PINK_PAGE ; 1
const GREEN_PAGE ; 2
const BLUE_PAGE ; 3
Expand Down
4 changes: 4 additions & 0 deletions macros/enum.asm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ ENDM
; Enumerate constants

const_def: MACRO
if _NARG >= 1
const_value = \1
else
const_value = 0
endc
ENDM

const: MACRO
Expand Down
2 changes: 1 addition & 1 deletion maps/AzaleaGym.asm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const_value set 2 ; object constants
const_def 2 ; object constants
const AZALEAGYM_BUGSY
const AZALEAGYM_BUG_CATCHER1
const AZALEAGYM_BUG_CATCHER2
Expand Down
Loading

0 comments on commit 08891da

Please sign in to comment.