Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Are hook will jump to here, will call this subroutine, this is are main subroutine, to select the enemy
- //Like are hook is a line that is not the subroutine you need to add in the walk through walls addrss with the off value, let me know if you dont get this
- lui t0 $first half of controller
- lw t0 $second half of controller
- lui t1 $0880
- lw t1 $0610
- addiu t2 0 $button to teleport
- bne t0 t2 $to end jr ra
- nop
- addiu t3 0 $0000 //0 = enemy 1
- bne t1 t3 $branch to next addiu
- nop
- jal $to {Enemy 1}
- nop
- addiu t4 0 $0001 //1 = enemy 2, ect.
- bne t1 t4 $branch to next addiu
- nop
- jal $to {Enemy 2}
- nop
- addiu t5, 0 $0002
- bne t1 t5 $branch to next addiu
- nop
- jal $to {Enemy 3}
- nop
- jr ra
- //Now we can make a subroutine at a different nop cave (Not needed but w/e) and the jal from the main subroutine calls this, the jals in the main are the hooks for this
- {Enemy 1}
- lui t0, $first half of player coord pointer
- lw t0, $second half of player coord poitner
- lui t1 $first half fo enemy coord pointer
- lw t1 $second half of enemy coord pointer
- lui t2 $first half of walk through walls address
- lui t3 $first half of walk through walls value
- addiu t3 t3 $second half of walk through walls value
- sw t3 $second half of walk through walls address(t2) //makes us teleport to the enemy through walls
- lw t4 $second half of x offset for enemy(t1)
- sw t4 $second half of x offset for player(t0)
- lw t4 $second half of z offset for enemy(t1)
- sw t4 $second half of z offset for player(t0)
- lw t4 $second half of y offset for enemy(t1)
- sw t4 $second half of y offset for player(t0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement