暂无描述

hooks.asm 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  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. //Battle bg use new table
  61. .org 0x0800F2A0
  62. .word battle_bg_table
  63. .org 0x0800F2E0
  64. .word battle_bg_table
  65. .org 0x0800F320
  66. .word battle_bg_table
  67. .org 0x0800F40E
  68. ldr r0, =battle_bg_hook|1
  69. bx r0
  70. lsl r0, #0
  71. .pool
  72. .org 0x0800FD5C
  73. .word battle_bg_table
  74. .org 0x0800FD88
  75. .word battle_bg_table
  76. //end of battle bg table
  77. //flag routine
  78. .org 0x0806E5D6
  79. ldr r0, =flag_hook|1
  80. bx r0
  81. lsl r0, #0
  82. .pool
  83. //end of flag routine
  84. //var routine
  85. .org 0x0806E45C
  86. ldr r0,=var_hook+1
  87. bx r0
  88. .pool
  89. //end of var routine
  90. //trainer Flag stuff
  91. .org 0x08080382
  92. mov r1, #0x80
  93. lsl r1, #0x15
  94. .org 0x080800BA
  95. mov r2, #0x80
  96. lsl r2, #0x5
  97. .org 0x08080428
  98. mov r1, #0x80
  99. lsl r1, #0x15
  100. .org 0x08080440
  101. mov r1, #0x80
  102. lsl r1, #0x15
  103. .org 0x08080454
  104. mov r1, #0x80
  105. lsl r1, #0x15
  106. //end of trainer flag stuff
  107. //New behavior bytes for jumping
  108. .org 0x0806811A
  109. ldr r0,=jump_behavior|1
  110. bx r0
  111. .pool
  112. //behavior walk stuff
  113. .org 0x0806D720
  114. ldr r0,=on_step|1
  115. bx r0
  116. .pool
  117. //end of new behavior bytes for jumping
  118. //transparent textboxes and mugshots
  119. .org 0x08069410
  120. bx r0
  121. .org 0x0806941C
  122. .word trans_activate|1
  123. .org 0x08069504
  124. bx r1
  125. .org 0x0806950C
  126. .word trans_deactivate|1
  127. .org 0x08150000
  128. ldr r0, =pal_load_hook_2|1
  129. bx r0
  130. .pool
  131. .org 0x0815044A
  132. bx r1
  133. .org 0x08150450
  134. .word pal_load_hook|1
  135. .org 0x0809CEB2
  136. ldr r0, =trans_mug_close_fix+1
  137. bx r0
  138. lsl r0, #0
  139. .pool
  140. //end of transparent textboxes and mugshots
  141. //saveblock routine start
  142. .org 0x080D9EDC
  143. ldr r0, =load_hijack|1
  144. bx r0
  145. .pool
  146. .org 0x080d991E
  147. bx r7
  148. .org 0x080d995C
  149. .word store_hijack|1
  150. .org 0x083FEC94
  151. .include "patches/save_table/save_table.S"
  152. //end of saveblock routine
  153. //new battle script commands
  154. //replace tables
  155. .org 0x08014C1C
  156. .word bs_command_table
  157. .org 0x08015A28
  158. .word bs_command_table
  159. .org 0x08015C6C
  160. .word bs_command_table
  161. .org 0x08015C98
  162. .word bs_command_table
  163. .org 0x0801D054
  164. .word bs_command_table
  165. //end of new battle script commands
  166. //move effect table
  167. .org 0x08016364
  168. .word m_effect_table
  169. .org 0x08023328
  170. .word m_effect_table
  171. .org 0x08025CF8
  172. .word m_effect_table
  173. .org 0x08027464
  174. .word m_effect_table
  175. .org 0x080297F0
  176. .word m_effect_table
  177. .org 0x0802BE80
  178. .word m_effect_table
  179. //end of move effect table
  180. //move limits
  181. .org 0x080D75FC
  182. .byte 0,0,0,0,0,0
  183. //end of move limits
  184. //print string mod
  185. .org 0x080D77C0
  186. bx r1
  187. .org 0x080D77CC
  188. .word custom_print_string|1
  189. //end of print string mod
  190. //new move animation table
  191. .org 0x080725d0
  192. .word m_animation_table
  193. //end of new move animation table