Advertisement
Guest User

Skelux's Hide HUD

a guest
Nov 2nd, 2014
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. Hide HUD and enable on Button press.
  3.   Button values:
  4.     BUTTON_C_RIGHT = 0x0001,
  5.     BUTTON_C_LEFT  = 0x0002,
  6.     BUTTON_C_DOWN  = 0x0004,
  7.     BUTTON_C_UP    = 0x0008,
  8.     BUTTON_R       = 0x0010,
  9.     BUTTON_L       = 0x0020,
  10.     BUTTON_D_RIGHT = 0x0100,
  11.     BUTTON_D_LEFT  = 0x0200,
  12.     BUTTON_D_DOWN  = 0x0400,
  13.     BUTTON_D_UP    = 0x0800,
  14.     BUTTON_START   = 0x1000,
  15.     BUTTON_Z       = 0x2000,
  16.     BUTTON_B       = 0x4000,
  17.     BUTTON_A       = 0x8000
  18.    
  19.     Code originally made by Skelux. Please credit him if using the code.
  20.     Ready to be assembled with CajeASM.
  21. */
  22.  
  23. .org 0x9EB68
  24. LUI S1, 0x8034
  25. LB S1, 0xAFA1(S1)
  26. ADDIU S2, R0, 0x0010
  27. BNE S2, S1, 0x0009ED18
  28. NOP
  29.  
  30. .org 0x9EDA0
  31. LUI S4, $8034
  32. LB S1, $AFA1 (S4)
  33. ANDI S2, S1, $0020 // Button Check for displaying HUD. (Button L)
  34. BEQ R0, S2, $0009EDEC
  35. LH S0, $001E (SP)
  36. JAL $002E3744
  37. LUI S3, $8033
  38. JAL $002E37A8
  39. LB S1, $AFDB (S4)
  40. JAL $002E380C
  41. ANDI S2, S1, $0020 // Button check, which plays sound. (Button L)
  42. BEQ R0, S2, $0009EDEC
  43. LUI A0, $701A
  44. ADDIU A1, S3, $3F10
  45. JAL $0031EB00
  46. ORI A0, A0, $8081
  47. NOP
  48. NOP
  49. NOP
  50. ANDI T9, S0, $0020
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement