Aucune description

hooks.asm 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. //Ipatix sound stuff
  2. .org 0x080007B4
  3. .word 0x0203E000 // new PCM work area
  4. .org 0x081DD0B4
  5. .word main_mixer // new mixer ROM location
  6. .word 0x03005F50 // new mixer RAM location (used for loading)
  7. .halfword mixer_size
  8. .halfword 0x400 // CpuSet, copy code by 32 bit units
  9. .word 0x0203E000 // new PCM work area
  10. .org 0x081DD0C8
  11. // set correct sound driver operation mode
  12. // 12 channels at 26758 Hz samplerate
  13. .byte 0x00, 0xCC, 0x98, 0x00
  14. .org 0x081DC094
  15. .word 0x03005F50+1 // new mixer RAM location (used for branch)
  16. // repoint correctly to the new cry tables
  17. .org 0x080720C8
  18. .include "patches/disable_cry_table_blocks.s"
  19. // cry-ID = poke-ID
  20. .org 0x08043304
  21. LSL R0, R0, #0x10
  22. LSR R0, R0, #0x10
  23. BX LR
  24. // music overrides
  25. .org 0x081DD0F4
  26. LDR R1, =music_override|1
  27. BX R1
  28. .pool
  29. //End of sound stuff
  30. //Don't know what thats all about... leaving it commented for now
  31. //.org 0x0800f268
  32. // .halfword 0xE000
  33. //Battle bg use new table
  34. .org 0x0800F2A0
  35. .word battle_bg_table
  36. .org 0x0800F2E0
  37. .word battle_bg_table
  38. .org 0x0800F320
  39. .word battle_bg_table
  40. .org 0x0800F40E
  41. ldr r0, =battle_bg_hook|1
  42. bx r0
  43. lsl r0, #0
  44. .pool
  45. .org 0x0800FD5C
  46. .word battle_bg_table
  47. .org 0x0800FD88
  48. .word battle_bg_table
  49. //end of battle bg table
  50. //flag routine
  51. .org 0x0806E5D6
  52. ldr r0, =flag_hook|1
  53. bx r0
  54. lsl r0, #0
  55. .pool
  56. //end of flag routine
  57. //var routine
  58. .org 0x0806E45C
  59. ldr r0,=var_hook+1
  60. bx r0
  61. .pool
  62. //end of var routine
  63. //trainer Flag stuff
  64. .org 0x08080382
  65. mov r1, #0x80
  66. lsl r1, #0x15
  67. .org 0x080800BA
  68. mov r2, #0x80
  69. lsl r2, #0x5
  70. .org 0x08080428
  71. mov r1, #0x80
  72. lsl r1, #0x15
  73. .org 0x08080440
  74. mov r1, #0x80
  75. lsl r1, #0x15
  76. .org 0x08080454
  77. mov r1, #0x80
  78. lsl r1, #0x15
  79. //end of trainer flag stuff
  80. //New behavior bytes for jumping
  81. .org 0x0806811A
  82. ldr r0,=jump_behavior|1
  83. bx r0
  84. .pool
  85. //behavior walk stuff
  86. .org 0x0806D720
  87. ldr r0,=on_step|1
  88. bx r0
  89. .pool
  90. //end of new behavior bytes for jumping
  91. //transparent textboxes and mugshots
  92. .org 0x08069410
  93. bx r0
  94. .org 0x0806941C
  95. .word trans_activate|1
  96. .org 0x08069504
  97. bx r1
  98. .org 0x0806950C
  99. .word trans_deactivate|1
  100. .org 0x08150000
  101. ldr r0, =pal_load_hook_2|1
  102. bx r0
  103. .pool
  104. .org 0x0815044A
  105. bx r1
  106. .org 0x08150450
  107. .word pal_load_hook|1
  108. .org 0x0809CEB2
  109. ldr r0, =trans_mug_close_fix+1
  110. bx r0
  111. lsl r0, #0
  112. .pool
  113. //end of transparent textboxes and mugshots
  114. //saveblock routine start
  115. .org 0x080D9EDC
  116. ldr r0, =load_hijack|1
  117. bx r0
  118. .pool
  119. .org 0x080d991E
  120. bx r7
  121. .org 0x080d995C
  122. .word store_hijack|1
  123. .org 0x083FEC94
  124. .include "patches/save_table/save_table.S"
  125. //end of saveblock routine
  126. //new battle script commands
  127. //replace tables
  128. .org 0x08014C1C
  129. .word bs_command_table
  130. .org 0x08015A28
  131. .word bs_command_table
  132. .org 0x08015C6C
  133. .word bs_command_table
  134. .org 0x08015C98
  135. .word bs_command_table
  136. .org 0x0801D054
  137. .word bs_command_table
  138. //end of new battle script commands
  139. //move effect table
  140. .org 0x08016364
  141. .word m_effect_table
  142. .org 0x08023328
  143. .word m_effect_table
  144. .org 0x08025CF8
  145. .word m_effect_table
  146. .org 0x08027464
  147. .word m_effect_table
  148. .org 0x080297F0
  149. .word m_effect_table
  150. .org 0x0802BE80
  151. .word m_effect_table
  152. //end of move effect table
  153. //move limits
  154. .org 0x080D75FC
  155. .byte 0,0,0,0,0,0
  156. //end of move limits
  157. //print string mod
  158. .org 0x080D77C0
  159. bx r1
  160. .org 0x080D77CC
  161. .word custom_print_string|1
  162. //end of print string mod
  163. //new move animation table
  164. .org 0x080725d0
  165. .word m_animation_table
  166. //end of new move animation table