Advertisement
Guest User

Untitled

a guest
May 25th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. //Are hook will jump to here, will call this subroutine, this is are main subroutine, to select the enemy
  2. //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
  3. lui t0 $first half of controller
  4. lw t0 $second half of controller
  5. lui t1 $0880
  6. lw t1 $0610
  7. addiu t2 0 $button to teleport
  8. bne t0 t2 $to end jr ra
  9. nop
  10. addiu t3 0 $0000 //0 = enemy 1
  11. bne t1 t3 $branch to next addiu
  12. nop
  13. jal $to {Enemy 1}
  14. nop
  15. addiu t4 0 $0001 //1 = enemy 2, ect.
  16. bne t1 t4 $branch to next addiu
  17. nop
  18. jal $to {Enemy 2}
  19. nop
  20. addiu t5, 0 $0002
  21. bne t1 t5 $branch to next addiu
  22. nop
  23. jal $to {Enemy 3}
  24. nop
  25. jr ra
  26.  
  27. //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
  28. {Enemy 1}
  29. lui t0, $first half of player coord pointer
  30. lw t0, $second half of player coord poitner
  31. lui t1 $first half fo enemy coord pointer
  32. lw t1 $second half of enemy coord pointer
  33. lui t2 $first half of walk through walls address
  34. lui t3 $first half of walk through walls value
  35. addiu t3 t3 $second half of walk through walls value
  36. sw t3 $second half of walk through walls address(t2) //makes us teleport to the enemy through walls
  37. lw t4 $second half of x offset for enemy(t1)
  38. sw t4 $second half of x offset for player(t0)
  39. lw t4 $second half of z offset for enemy(t1)
  40. sw t4 $second half of z offset for player(t0)
  41. lw t4 $second half of y offset for enemy(t1)
  42. sw t4 $second half of y offset for player(t0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement