설명 없음

hooks.asm 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. _call_via_r0 equ 0x081E3BA8
  2. _call_via_r1 equ 0x081E3BAC
  3. //Ipatix sound stuff
  4. .org 0x080007B4
  5. .word 0x0203E000 // new PCM work area
  6. .org 0x081DD0B4
  7. .word main_mixer // new mixer ROM location
  8. .word 0x03005F50 // new mixer RAM location (used for loading)
  9. .halfword mixer_size
  10. .halfword 0x400 // CpuSet, copy code by 32 bit units
  11. .word 0x0203E000 // new PCM work area
  12. .org 0x081DD0C8
  13. // set correct sound driver operation mode
  14. // 12 channels at 26758 Hz samplerate
  15. .byte 0x00, 0xCC, 0x98, 0x00
  16. .org 0x081DC094
  17. .word 0x03005F50+1 // new mixer RAM location (used for branch)
  18. // repoint correctly to the new cry tables
  19. .org 0x080720C8
  20. .include "patches/disable_cry_table_blocks.s"
  21. // cry-ID = poke-ID
  22. .org 0x08043304
  23. LSL R0, R0, #0x10
  24. LSR R0, R0, #0x10
  25. BX LR
  26. // music overrides
  27. .org 0x0808064C // encounter music ([!] Box) song hook
  28. LDR R1, =mhk_intro_music_id_to_song|1
  29. BL _call_via_r1
  30. B 0x080806BA
  31. .pool
  32. .org 0x08044090
  33. LDR R1, =mhk_current_map_music_set_default_for_battle|1
  34. BX R1
  35. .pool
  36. .org 0x080156FE // trainer victory music hook
  37. LDR R0, =mhk_trainer_battle_play_defeat|1
  38. BL _call_via_r0
  39. B 0x0801576E
  40. .pool
  41. .org 0x08021D46 // wild poke defeated
  42. BL _call_via_r0
  43. .org 0x08021D94
  44. .word mhk_wild_poke_def_music|1
  45. .org 0x0807F9F8
  46. LDR R1, =0x0807FA3E
  47. BL _call_via_r1
  48. MOV R1, R0
  49. B 0x0807FA3E
  50. .pool
  51. .org 0x080159D0
  52. LDR R0, =mhk_fadeout|1
  53. BL _call_via_r0
  54. B 0x080159DC
  55. .pool
  56. //End of sound stuff
  57. //Don't know what thats all about... leaving it commented for now
  58. //.org 0x0800f268
  59. // .halfword 0xE000
  60. //flag routine
  61. .org 0x0806E5D6
  62. ldr r0, =flag_hook|1
  63. bx r0
  64. lsl r0, #0
  65. .pool
  66. .org 0x0806E584
  67. ldr r3, =var_set_hack|1
  68. bx r3
  69. .pool
  70. .org 0x0806E568
  71. ldr r3, =var_get_hack|1
  72. bx r3
  73. .pool
  74. .org 0x0806E680
  75. ldr r1, =flag_set_hack|1
  76. bx r1
  77. .pool
  78. //end of flag routine
  79. //var routine
  80. .org 0x0806E45C
  81. ldr r0,=var_hook+1
  82. bx r0
  83. .pool
  84. .org 0x0806A390
  85. ldr r3, =var_set_script_hack|1
  86. bx r3
  87. .pool
  88. //end of var routine
  89. .org 0x0804C034
  90. ldr r0, =clear_sav1|1
  91. bx r0
  92. .pool
  93. //trainer Flag stuff
  94. .org 0x08080378
  95. ldr r1, =trainerflag_read_fix+1
  96. bx r1
  97. .pool
  98. .org 0x080800B8
  99. ldr r2, =trainerflag_opponent_fix+1
  100. bx r2
  101. .pool
  102. .org 0x08080424
  103. ldr r1, =trainerflag_check_fix+1
  104. bx r1
  105. .pool
  106. .org 0x0808043c
  107. ldr r1, =trainerflag_set_fix+1
  108. bx r1
  109. .pool
  110. .org 0x08080450
  111. ldr r1, =trainerflag_clear_fix+1
  112. bx r1
  113. .pool
  114. //end of trainer flag stuff
  115. //New behavior bytes for jumping
  116. .org 0x0806811A
  117. ldr r0,=jump_behavior|1
  118. bx r0
  119. .pool
  120. //behavior walk stuff
  121. .org 0x0806D720
  122. ldr r0,=on_step|1
  123. bx r0
  124. .pool
  125. //end of new behavior bytes for jumping
  126. //transparent textboxes and mugshots
  127. .org 0x08069410
  128. bx r0
  129. .org 0x0806941C
  130. .word trans_activate|1
  131. .org 0x08069504
  132. bx r1
  133. .org 0x0806950C
  134. .word trans_deactivate|1
  135. .org 0x08150000
  136. ldr r0, =pal_load_hook_2|1
  137. bx r0
  138. .pool
  139. .org 0x0815044A
  140. bx r1
  141. .org 0x08150450
  142. .word pal_load_hook|1
  143. .org 0x0809CEB2
  144. ldr r0, =trans_mug_close_fix+1
  145. bx r0
  146. lsl r0, #0
  147. .pool
  148. //end of transparent textboxes and mugshots
  149. //saveblock routine start
  150. .org 0x080D9EDC
  151. ldr r0, =load_hijack|1
  152. bx r0
  153. .pool
  154. .org 0x080d991E
  155. bx r7
  156. .org 0x080d995C
  157. .word store_hijack|1
  158. .org 0x083FEC94
  159. .include "patches/save_table/save_table.s"
  160. //end of saveblock routine
  161. //new battle script commands
  162. //replace tables
  163. .org 0x08014C1C
  164. .word bs_command_table
  165. .org 0x08015A28
  166. .word bs_command_table
  167. .org 0x08015C6C
  168. .word bs_command_table
  169. .org 0x08015C98
  170. .word bs_command_table
  171. .org 0x0801D054
  172. .word bs_command_table
  173. //end of new battle script commands
  174. //move effect table
  175. .org 0x08016364
  176. .word m_effect_table
  177. .org 0x08023328
  178. .word m_effect_table
  179. .org 0x08025CF8
  180. .word m_effect_table
  181. .org 0x08027464
  182. .word m_effect_table
  183. .org 0x080297F0
  184. .word m_effect_table
  185. .org 0x0802BE80
  186. .word m_effect_table
  187. //end of move effect table
  188. //move limits
  189. .org 0x080D75FC
  190. .byte 0,0,0,0,0,0
  191. //end of move limits
  192. //print string mod
  193. .org 0x080D77C0
  194. bx r1
  195. .org 0x080D77CC
  196. .word custom_print_string|1
  197. //end of print string mod
  198. //new move animation table
  199. .org 0x080725d0
  200. .word m_animation_table
  201. //end of new move animation table