misc_constants.asm 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. MAX_LEVEL EQU 100
  2. NUM_MOVES EQU 4
  3. NUM_STATS EQU 5
  4. NUM_STAT_MODS EQU 8
  5. NUM_DVS EQU 2
  6. PARTY_LENGTH EQU 6
  7. MONS_PER_BOX EQU 20
  8. NUM_BOXES EQU 12
  9. BAG_ITEM_CAPACITY EQU 20
  10. PC_ITEM_CAPACITY EQU 50
  11. HOF_MON EQU $10
  12. HOF_TEAM EQU PARTY_LENGTH * HOF_MON
  13. HOF_TEAM_CAPACITY EQU 50
  14. NAME_LENGTH EQU 11
  15. ITEM_NAME_LENGTH EQU 13
  16. A_BUTTON EQU %00000001
  17. B_BUTTON EQU %00000010
  18. SELECT EQU %00000100
  19. START EQU %00001000
  20. D_RIGHT EQU %00010000
  21. D_LEFT EQU %00100000
  22. D_UP EQU %01000000
  23. D_DOWN EQU %10000000
  24. const_value set 0
  25. const BIT_A_BUTTON
  26. const BIT_B_BUTTON
  27. const BIT_SELECT
  28. const BIT_START
  29. const BIT_D_RIGHT
  30. const BIT_D_LEFT
  31. const BIT_D_UP
  32. const BIT_D_DOWN
  33. SCREEN_WIDTH EQU 20
  34. SCREEN_HEIGHT EQU 18
  35. SCREEN_WIDTH_PIXELS EQU SCREEN_WIDTH * 8
  36. SCREEN_HEIGHT_PIXELS EQU SCREEN_HEIGHT * 8
  37. BG_MAP_WIDTH EQU 32
  38. BG_MAP_HEIGHT EQU 32
  39. SPRITEBUFFERSIZE EQU 7*7 * 8 ; 7 * 7 (tiles) * 8 (bytes per tile)
  40. NPC_MOVEMENT_DOWN EQU $00
  41. NPC_MOVEMENT_UP EQU $40
  42. NPC_MOVEMENT_LEFT EQU $80
  43. NPC_MOVEMENT_RIGHT EQU $C0
  44. ; text box IDs
  45. MESSAGE_BOX EQU $01
  46. FIELD_MOVE_MON_MENU EQU $04
  47. JP_MOCHIMONO_MENU_TEMPLATE EQU $05
  48. USE_TOSS_MENU_TEMPLATE EQU $06
  49. JP_SAVE_MESSAGE_MENU_TEMPLATE EQU $08
  50. JP_SPEED_OPTIONS_MENU_TEMPLATE EQU $09
  51. BATTLE_MENU_TEMPLATE EQU $0b
  52. SWITCH_STATS_CANCEL_MENU_TEMPLATE EQU $0c
  53. LIST_MENU_BOX EQU $0d
  54. BUY_SELL_QUIT_MENU_TEMPLATE EQU $0e
  55. MONEY_BOX_TEMPLATE EQU $0f
  56. MON_SPRITE_POPUP EQU $11
  57. JP_AH_MENU_TEMPLATE EQU $12
  58. MONEY_BOX EQU $13
  59. TWO_OPTION_MENU EQU $14
  60. BUY_SELL_QUIT_MENU EQU $15
  61. JP_POKEDEX_MENU_TEMPLATE EQU $1a
  62. SAFARI_BATTLE_MENU_TEMPLATE EQU $1b
  63. ; two option menu constants
  64. YES_NO_MENU EQU 0
  65. NORTH_WEST_MENU EQU 1
  66. SOUTH_EAST_MENU EQU 2
  67. WIDE_YES_NO_MENU EQU 3
  68. NORTH_EAST_MENU EQU 4
  69. TRADE_CANCEL_MENU EQU 5
  70. HEAL_CANCEL_MENU EQU 6
  71. NO_YES_MENU EQU 7
  72. ; menu exit method constants for list menus and the buy/sell/quit menu
  73. CHOSE_MENU_ITEM EQU 1 ; pressed A
  74. CANCELLED_MENU EQU 2 ; pressed B
  75. ; menu exit method constants for two-option menus
  76. CHOSE_FIRST_ITEM EQU 1
  77. CHOSE_SECOND_ITEM EQU 2
  78. ; move mon constants
  79. BOX_TO_PARTY EQU 0
  80. PARTY_TO_BOX EQU 1
  81. DAYCARE_TO_PARTY EQU 2
  82. PARTY_TO_DAYCARE EQU 3
  83. ; emotion bubbles
  84. EXCLAMATION_BUBBLE EQU 0
  85. QUESTION_BUBBLE EQU 1
  86. SMILE_BUBBLE EQU 2
  87. ; slot symbols
  88. SLOTS7 EQU $0200
  89. SLOTSBAR EQU $0604
  90. SLOTSCHERRY EQU $0A08
  91. SLOTSFISH EQU $0E0C
  92. SLOTSBIRD EQU $1210
  93. SLOTSMOUSE EQU $1614
  94. ; party menu types
  95. NORMAL_PARTY_MENU EQU 0
  96. USE_ITEM_PARTY_MENU EQU 1
  97. BATTLE_PARTY_MENU EQU 2
  98. TMHM_PARTY_MENU EQU 3
  99. SWAP_MONS_PARTY_MENU EQU 4
  100. EVO_STONE_PARTY_MENU EQU 5
  101. ; party menu message IDs
  102. ANTIDOTE_MSG EQU $F0
  103. BURN_HEAL_MSG EQU $F1
  104. ICE_HEAL_MSG EQU $F2
  105. AWAKENING_MSG EQU $F3
  106. PARALYZ_HEAL_MSG EQU $F4
  107. POTION_MSG EQU $F5
  108. FULL_HEAL_MSG EQU $F6
  109. REVIVE_MSG EQU $F7
  110. RARE_CANDY_MSG EQU $F8
  111. ; naming screen types
  112. NAME_PLAYER_SCREEN EQU 0
  113. NAME_RIVAL_SCREEN EQU 1
  114. NAME_MON_SCREEN EQU 2
  115. ; mon data locations
  116. ; Note that some values are not supported by all functions that use these values.
  117. PLAYER_PARTY_DATA EQU 0
  118. ENEMY_PARTY_DATA EQU 1
  119. BOX_DATA EQU 2
  120. DAYCARE_DATA EQU 3
  121. BATTLE_MON_DATA EQU 4
  122. ; player direction constants
  123. PLAYER_DIR_BIT_RIGHT EQU 0
  124. PLAYER_DIR_BIT_LEFT EQU 1
  125. PLAYER_DIR_BIT_DOWN EQU 2
  126. PLAYER_DIR_BIT_UP EQU 3
  127. PLAYER_DIR_RIGHT EQU (1 << PLAYER_DIR_BIT_RIGHT)
  128. PLAYER_DIR_LEFT EQU (1 << PLAYER_DIR_BIT_LEFT)
  129. PLAYER_DIR_DOWN EQU (1 << PLAYER_DIR_BIT_DOWN)
  130. PLAYER_DIR_UP EQU (1 << PLAYER_DIR_BIT_UP)
  131. ; flag operations
  132. FLAG_RESET EQU 0
  133. FLAG_SET EQU 1
  134. FLAG_TEST EQU 2
  135. ; HP bar
  136. HP_BAR_GREEN EQU 0
  137. HP_BAR_YELLOW EQU 1
  138. HP_BAR_RED EQU 2
  139. ; D733 flags
  140. BIT_TEST_BATTLE EQU 0
  141. ; battle type constants
  142. BATTLE_TYPE_NORMAL EQU 0
  143. BATTLE_TYPE_OLD_MAN EQU 1
  144. BATTLE_TYPE_SAFARI EQU 2
  145. ; serial
  146. ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01
  147. ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK EQU $02
  148. USING_EXTERNAL_CLOCK EQU $01
  149. USING_INTERNAL_CLOCK EQU $02
  150. CONNECTION_NOT_ESTABLISHED EQU $ff
  151. ; signals the start of an array of bytes transferred over the link cable
  152. SERIAL_PREAMBLE_BYTE EQU $FD
  153. ; this byte is used when there is no data to send
  154. SERIAL_NO_DATA_BYTE EQU $FE
  155. ; signals the end of one part of a patch list (there are two parts) for player/enemy party data
  156. SERIAL_PATCH_LIST_PART_TERMINATOR EQU $FF
  157. LINK_STATE_NONE EQU $00 ; not using link
  158. LINK_STATE_IN_CABLE_CLUB EQU $01 ; in a cable club room (Colosseum or Trade Centre)
  159. LINK_STATE_START_TRADE EQU $02 ; pre-trade selection screen initialisation
  160. LINK_STATE_START_BATTLE EQU $03 ; pre-battle initialisation
  161. LINK_STATE_BATTLING EQU $04 ; in a link battle
  162. LINK_STATE_RESET EQU $05 ; reset game (unused)
  163. LINK_STATE_TRADING EQU $32 ; in a link trade
  164. LINKBATTLE_RUN EQU $F
  165. LINKBATTLE_STRUGGLE EQU $E
  166. LINKBATTLE_NO_ACTION EQU $D