SHARE
TWEET

BS-X Dr. Hiroshi Script

LuigiBlood Feb 6th, 2013 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. arch snes.cpu
  2.  
  3. //Disassembly of Dr. Hiroshi Character Tokens
  4. //Using BSXTokens.asm as a base
  5.  
  6. incsrc "BSXTokens.asm"
  7. base $91DD82
  8. OBJ_Data:
  9. dl OBJ_GFX, OBJ_PAL
  10.  
  11. OBJ_GFX:        //COMPRESSED GRAPHICS
  12.         incbin "BSX_DrHiroshiGFXCompressed.bin"
  13. OBJ_PAL:        //PALETTE DATA
  14.         incbin "BSX_DrHiroshiPalette.bin"
  15. //Has 16-bit Size at the Start for both
  16.  
  17. OBJ_Shape:
  18.         incbin "BSX_DrHiroshiOBJShape.bin"
  19. //Format Unknown
  20.  
  21. //$91E4A4 (SNES) / $08E4A4 (PC)
  22. ScriptDrHiroshi:
  23.  
  24. {AllocateAndInitObjPaletteAndObjTilesOrUseExistingOnes OBJ_Data}
  25. {SetObjWidthDepthFlagmask ({var_imm}+$0006), ({var_imm}+$0004), ({var_imm}+$0022)}
  26. {CreateAnotherInterpreterThreadWithLimit ({var_prv}+$1768), $01, _SubThread4}
  27. {MathsLet ({var_prv}+$19DA), ({var_prv}+$1650)}
  28. {MathsLet ({var_prv}+$1A02), ({var_prv}+$1650)}
  29. {MathsSub ({var_prv}+$19DA), ({var_imm}+$0060)}
  30. {MathsAdd ({var_prv}+$1A02), ({var_imm}+$0060)}
  31. {MathsLet ({var_prv}+$1A2A), ({var_imm}+$0180)}
  32. {ControlSubThread _SubThread2}
  33.  
  34. _label0:
  35. {SignedCompareWithConditionalGoto ({var_prv}+$1650), {cmp_lessequ}, ({var_prv}+$19DA), _label1}
  36. {SignedCompareWithConditionalGoto ({var_prv}+$1650), {cmp_greatequ}, ({var_prv}+$1A02), _label2}
  37. {Goto _label3}
  38.  
  39. _label1:
  40. {ControlSubThread _SubThread1}
  41. {MathsLet ({var_prv}+$1A2A), ({var_imm}+$0180)}
  42. {Goto _label3}
  43.  
  44. _label2:
  45. {ControlSubThread _SubThread2}
  46. {MathsLet ({var_prv}+$1A2A), ({var_imm}+$FE80)}
  47. {Goto _label3}
  48.  
  49. _label3:
  50. {GosubIfAccessedByPlayer $000001}
  51. {SetXYsignViewDirectionToSignsOfIncomingValues ({var_prv}+$16C8), ({var_prv}+$16F0)}
  52. {SleepAndMoveChangeXYstepIfCollideOtherThread $0001, ({var_imm}+$0001), ({var_prv}+$1A2A), ({var_imm}+$0000)}
  53. {Gosub {PauseSubThreadIfXYstepIsZero}}
  54. {Goto _label0}
  55.  
  56.  
  57. _SubThread1:
  58. {SleepWithXYsignAs9wayObjShape $000B, _Sub1_9way1, $000000, $000000, $000000, $000000, $000000, $000000, $000000, $000000}
  59. {SleepWithXYsignAs9wayObjShape $0008, _Sub1_9way2, $000000, $000000, $000000, $000000, $000000, $000000, $000000, $000000}
  60. {SleepWithXYsignAs9wayObjShape $0008, _Sub1_9way3, $000000, $000000, $000000, $000000, $000000, $000000, $000000, $000000}
  61. {SleepWithXYsignAs9wayObjShape $000B, _Sub1_9way4, $000000, $000000, $000000, $000000, $000000, $000000, $000000, $000000}
  62. {SleepWithXYsignAs9wayObjShape $0008, _Sub1_9way3, $000000, $000000, $000000, $000000, $000000, $000000, $000000, $000000}
  63. {SleepWithXYsignAs9wayObjShape $0008, _Sub1_9way2, $000000, $000000, $000000, $000000, $000000, $000000, $000000, $000000}
  64. {Goto _SubThread1}
  65.  
  66. _Sub1_9way1:
  67.         dl $91E24C, $91E24C, $91E24C, $91E310, $91E24C, $91E442, $91E2AE, $91E2AE, $91E2AE
  68. _Sub1_9way2:
  69.         dl $91E262, $91E262, $91E262, $91E326, $91E262, $91E458, $91E2C4, $91E2C4, $91E2C4
  70. _Sub1_9way3:
  71.         dl $91E27D, $91E27D, $91E27D, $91E341, $91E27D, $91E473, $91E2DF, $91E2DF, $91E2DF
  72. _Sub1_9way4:
  73.         dl $91E298, $91E298, $91E298, $91E35C, $91E298, $91E48E, $91E2DF, $91E2DF, $91E2DF
  74.  
  75. _SubThread2:
  76. {SleepWithXYsignAs9wayObjShape $000B, _Sub2_9way1, $000000, $000000, $000000, $000000, $000000, $000000, $000000, $000000}
  77. {SleepWithXYsignAs9wayObjShape $0008, _Sub2_9way2, $000000, $000000, $000000, $000000, $000000, $000000, $000000, $000000}
  78. {SleepWithXYsignAs9wayObjShape $0008, _Sub2_9way3, $000000, $000000, $000000, $000000, $000000, $000000, $000000, $000000}
  79. {SleepWithXYsignAs9wayObjShape $000B, _Sub2_9way4, $000000, $000000, $000000, $000000, $000000, $000000, $000000, $000000}
  80. {SleepWithXYsignAs9wayObjShape $0008, _Sub2_9way3, $000000, $000000, $000000, $000000, $000000, $000000, $000000, $000000}
  81. {SleepWithXYsignAs9wayObjShape $0008, _Sub2_9way2, $000000, $000000, $000000, $000000, $000000, $000000, $000000, $000000}
  82. {Goto _SubThread2}
  83.  
  84. _Sub2_9way1:
  85.         dl $91E37E, $91E37E, $91E37E, $91E310, $91E37E, $91E442, $91E3E0, $91E3E0, $91E3E0
  86. _Sub2_9way2:
  87.         dl $91E394, $91E394, $91E394, $91E326, $91E394, $91E458, $91E3F6, $91E3F6, $91E3F6
  88. _Sub2_9way3:
  89.         dl $91E3AF, $91E3AF, $91E3AF, $91E341, $91E3AF, $91E473, $91E411, $91E411, $91E411
  90. _Sub2_9way4:
  91.         dl $91E3CA, $91E3CA, $91E3CA, $91E35C, $91E3CA, $91E48E, $91E42C, $91E42C, $91E42C
  92.  
  93. _SubThread3:
  94. {SleepWithFixedObjShape $0001, $91E372}
  95. {Goto _SubThread4}
  96.  
  97. _SubThread4:
  98. {SetObjWidthDepthFlagmask ({var_imm}+$0000), ({var_imm}+$0000), ({var_imm}+$0022)}
  99. {ControlSubThread _SubThread3}
  100. _label4:
  101. {SetXYposRelativeToParentThread ({var_imm}+$0000), ({var_imm}+$0000)}
  102. {Sleep $0001}
  103. {Goto _label4}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top