Advertisement
Guest User

mp3 model warp

a guest
Oct 22nd, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.62 KB | None | 0 0
  1. ; NAME: [PD] Waterfall
  2. ; GAMES: MP3_USA
  3. ; EXECUTION: Direct
  4. ; PARAM: Space|Destination
  5. ; PARAM: Space|PreviousSpace
  6. ; PARAM: Space|NextSpace
  7.  
  8. ADDIU SP SP -44
  9. SW RA 40(SP)
  10. SW S4 36(SP)
  11.  
  12.  
  13.  
  14. LI A0 4 ; Assigns Happening fade-out
  15. JAL InitFadeOut ; Fade to black
  16. LI A1 16 ; Assigns 16 frames of fade-out
  17.  
  18. JAL SleepProcess
  19. LI A0 17 ; Sleep for 16 frames
  20.  
  21. LUI T1 hi(p1_char)
  22. ADDIU T1 T1 lo(p1_char) ; Load Player 1's Character address to T1
  23.  
  24. LI T0 0x38 ; Distance between each player's character address
  25.  
  26. JAL GetCurrentPlayerIndex ; Current Player Index at V0
  27. NOP
  28.  
  29. MOVE S4 V0 ; Move Current Player Index to S4
  30.  
  31. MULT S4 T0 ; Multiply Current Player Index by T0
  32. MFLO T0 ; Move the result to T0
  33.  
  34. ADDU T1 T1 T0 ; Add result from above to T1
  35. LBU T1 0(T1) ; Load the value address value of T1 into T1
  36.  
  37. JAL PlaySound
  38. ADDIU A0 T1 0x287 ; Add Character Value to Mario Despair Voice Index
  39.  
  40. JAL SleepProcess
  41. LI A0 20 ; Sleep for 20 frames
  42.  
  43. JAL PlaySound
  44. LI A0 0x315 ; Water Splash Sound Index
  45.  
  46. JAL SleepProcess
  47. LI A0 25 ; Sleep for 25 frames
  48.  
  49. JAL PlaySound
  50. LI A0 0x315 ; Water Splash Sound Index
  51.  
  52. JAL SleepProcess
  53. LI A0 20 ; Sleep for 20 frames
  54.  
  55. MOVE A0 S4 ; Assigns Current Player Index to A0
  56. LI A1 Destination_chain_index ; Assigns Chain Index to A1
  57. LI A2 Destination_chain_space_index ; Assigns Space Index to A2
  58. JAL SetPlayerOntoChain
  59. NOP
  60.  
  61. MOVE A0 S4 ; Assigns Current Player Index to A0
  62. LI A1 PreviousSpace_chain_index ; Assigns Chain Index to A1
  63. LI A2 PreviousSpace_chain_space_index ; Assigns Space Index to A2
  64. JAL SetPrevChainAndSpace
  65. NOP
  66.  
  67. MOVE A0 S4 ; Assigns Current Player Index to A0
  68. LI A1 NextSpace_chain_index ; Assigns Chain Index to A1
  69. LI A2 NextSpace_chain_space_index ; Assigns Space Index to A2
  70. JAL SetNextChainAndSpace
  71. NOP
  72.  
  73. LI A0 Destination_chain_index
  74. LI A1 Destination_chain_space_index
  75. JAL GetAbsSpaceIndexFromChainSpaceIndex ; Gets True Space Index at V0
  76. NOP
  77.  
  78. MOVE A0 V0 ; Move True Space Index to A0
  79. JAL SetSpaceType ; Changes space type to Happening
  80. LI A1 0x4 ; Happening Space value
  81.  
  82. MOVE A0 S4
  83. JAL changecoords
  84. NOP
  85.  
  86. LI A0 4 ; Assigns Bar Code Fade-Out
  87. JAL InitFadeIn ; Fade in
  88. LI A1 16 ; Assigns 100 frames of fade-out
  89.  
  90. JAL SleepProcess
  91. LI A0 21 ; Sleep for 21 frames
  92.  
  93.  
  94.  
  95. LW S4 36(SP)
  96. LW RA 40(SP)
  97. JR RA
  98. ADDIU SP SP 44
  99.  
  100. changecoords:
  101. ADDIU SP SP -32
  102. SW RA 28(SP)
  103. SW S0 24(SP)
  104.  
  105. LUI T1 hi(0x8012E2CC)
  106. ADDIU T1 T1 lo(0x8012E2CC) ; Load Player 1's X Coordinates address
  107. LI T0 0x100 ; Distance between each player's X Coordinates address
  108. MULT A0 T0 ; Multiply Current Player Index by S3
  109. MFLO T0 ; Move the result to S3
  110.  
  111. ADDU T1 T1 T0 ; Add result to get current Player's X Coordinates
  112.  
  113. LI A0 Destination_chain_index
  114. JAL GetAbsSpaceIndexFromChainSpaceIndex ; Gets True Space Index at V0
  115. LI A1 Destination_chain_space_index
  116.  
  117. JAL GetSpaceData ; at V0
  118. MOVE A0 V0
  119.  
  120. MOVE S1 V0
  121. ADDIU V0 V0 8 ; This gets the X pos
  122. SW V0 0(T1)
  123.  
  124. LUI T1 hi(0x8012E2D4)
  125. ADDIU T1 T1 lo(0x8012E2D4) ; Load Player 1's Y Coordinates address
  126. LI T0 0x100 ; Distance between each player's Y Coordinates address
  127. MULT A0 T0 ; Multiply Current Player Index by S3
  128. MFLO T0 ; Move the result to S3
  129.  
  130. ADDU T1 T1 T0 ; Add result to get current Player's Star address
  131.  
  132. ADDIU V0 V0 8 ; This gets the Y pos
  133. SW V0 0(T1)
  134.  
  135. LUI T1 hi(0x8012E2D8)
  136. ADDIU T1 T1 lo(0x8012E2D8) ; Load Player 1's Rotation address
  137. LI T0 0x100 ; Distance between each player's Rotation address
  138. MULT A0 T0 ; Multiply Current Player Index by S3
  139. MFLO T0 ; Move the result to S3
  140.  
  141. ADDU T1 T1 T0 ; Add result to get current Player's Rotation address
  142.  
  143. LI S0 0x00000000
  144. SW S0 0(T1)
  145.  
  146. LW S0 24(SP)
  147. LW RA 28(SP)
  148. JR RA
  149. ADDIU SP SP 32
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement