Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; NAME: [PD] Waterfall
- ; GAMES: MP3_USA
- ; EXECUTION: Direct
- ; PARAM: Space|Destination
- ; PARAM: Space|PreviousSpace
- ; PARAM: Space|NextSpace
- ADDIU SP SP -44
- SW RA 40(SP)
- SW S4 36(SP)
- LI A0 4 ; Assigns Happening fade-out
- JAL InitFadeOut ; Fade to black
- LI A1 16 ; Assigns 16 frames of fade-out
- JAL SleepProcess
- LI A0 17 ; Sleep for 16 frames
- LUI T1 hi(p1_char)
- ADDIU T1 T1 lo(p1_char) ; Load Player 1's Character address to T1
- LI T0 0x38 ; Distance between each player's character address
- JAL GetCurrentPlayerIndex ; Current Player Index at V0
- NOP
- MOVE S4 V0 ; Move Current Player Index to S4
- MULT S4 T0 ; Multiply Current Player Index by T0
- MFLO T0 ; Move the result to T0
- ADDU T1 T1 T0 ; Add result from above to T1
- LBU T1 0(T1) ; Load the value address value of T1 into T1
- JAL PlaySound
- ADDIU A0 T1 0x287 ; Add Character Value to Mario Despair Voice Index
- JAL SleepProcess
- LI A0 20 ; Sleep for 20 frames
- JAL PlaySound
- LI A0 0x315 ; Water Splash Sound Index
- JAL SleepProcess
- LI A0 25 ; Sleep for 25 frames
- JAL PlaySound
- LI A0 0x315 ; Water Splash Sound Index
- JAL SleepProcess
- LI A0 20 ; Sleep for 20 frames
- MOVE A0 S4 ; Assigns Current Player Index to A0
- LI A1 Destination_chain_index ; Assigns Chain Index to A1
- LI A2 Destination_chain_space_index ; Assigns Space Index to A2
- JAL SetPlayerOntoChain
- NOP
- MOVE A0 S4 ; Assigns Current Player Index to A0
- LI A1 PreviousSpace_chain_index ; Assigns Chain Index to A1
- LI A2 PreviousSpace_chain_space_index ; Assigns Space Index to A2
- JAL SetPrevChainAndSpace
- NOP
- MOVE A0 S4 ; Assigns Current Player Index to A0
- LI A1 NextSpace_chain_index ; Assigns Chain Index to A1
- LI A2 NextSpace_chain_space_index ; Assigns Space Index to A2
- JAL SetNextChainAndSpace
- NOP
- LI A0 Destination_chain_index
- LI A1 Destination_chain_space_index
- JAL GetAbsSpaceIndexFromChainSpaceIndex ; Gets True Space Index at V0
- NOP
- MOVE A0 V0 ; Move True Space Index to A0
- JAL SetSpaceType ; Changes space type to Happening
- LI A1 0x4 ; Happening Space value
- MOVE A0 S4
- JAL changecoords
- NOP
- LI A0 4 ; Assigns Bar Code Fade-Out
- JAL InitFadeIn ; Fade in
- LI A1 16 ; Assigns 100 frames of fade-out
- JAL SleepProcess
- LI A0 21 ; Sleep for 21 frames
- LW S4 36(SP)
- LW RA 40(SP)
- JR RA
- ADDIU SP SP 44
- changecoords:
- ADDIU SP SP -32
- SW RA 28(SP)
- SW S0 24(SP)
- LUI T1 hi(0x8012E2CC)
- ADDIU T1 T1 lo(0x8012E2CC) ; Load Player 1's X Coordinates address
- LI T0 0x100 ; Distance between each player's X Coordinates address
- MULT A0 T0 ; Multiply Current Player Index by S3
- MFLO T0 ; Move the result to S3
- ADDU T1 T1 T0 ; Add result to get current Player's X Coordinates
- LI A0 Destination_chain_index
- JAL GetAbsSpaceIndexFromChainSpaceIndex ; Gets True Space Index at V0
- LI A1 Destination_chain_space_index
- JAL GetSpaceData ; at V0
- MOVE A0 V0
- MOVE S1 V0
- ADDIU V0 V0 8 ; This gets the X pos
- SW V0 0(T1)
- LUI T1 hi(0x8012E2D4)
- ADDIU T1 T1 lo(0x8012E2D4) ; Load Player 1's Y Coordinates address
- LI T0 0x100 ; Distance between each player's Y Coordinates address
- MULT A0 T0 ; Multiply Current Player Index by S3
- MFLO T0 ; Move the result to S3
- ADDU T1 T1 T0 ; Add result to get current Player's Star address
- ADDIU V0 V0 8 ; This gets the Y pos
- SW V0 0(T1)
- LUI T1 hi(0x8012E2D8)
- ADDIU T1 T1 lo(0x8012E2D8) ; Load Player 1's Rotation address
- LI T0 0x100 ; Distance between each player's Rotation address
- MULT A0 T0 ; Multiply Current Player Index by S3
- MFLO T0 ; Move the result to S3
- ADDU T1 T1 T0 ; Add result to get current Player's Rotation address
- LI S0 0x00000000
- SW S0 0(T1)
- LW S0 24(SP)
- LW RA 28(SP)
- JR RA
- ADDIU SP SP 32
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement