Advertisement
BenArthur_7

Attempt ECB point visualization

May 30th, 2018
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.79 KB | None | 0 0
  1. begin 0x0, 0x8 #bones 3,6,10,15,21. Skip 19 because it has an offset that I can't take into account
  2. pushInt. 0x0 #set the initial variables to 0
  3. floatVarSet. 0x0, 0x0 #minX
  4. floatVarSet. 0x0, 0x1 #midX
  5. floatVarSet. 0x0, 0x2 #maxX
  6. floatVarSet. 0x0, 0x3 #minY
  7. floatVarSet. 0x0, 0x4 #midY
  8. floatVarSet 0x0, 0x5 #maxY
  9. pushInt. 0x2723 #clear previous GFX
  10. pushInt. 0x1000013
  11. pushInt. 0x0
  12. pushInt. 0x0
  13. sys 0x4, 0x1c
  14. #for every bone I have to update these values to make a bounding box
  15. pushInt. 0x0
  16. pushInt. 0x3
  17. sys. 0x2, 0x28 #Global X position of bone 3
  18. pushInt. 0x1
  19. sys. 0x1, 0x15 #Global X position of character (TransN)
  20. subf.
  21. floatVarSet 0x0, 0x6 #X offset
  22. pushInt. 0x1
  23. pushInt. 0x3
  24. sys. 0x2, 0x28 #Global Y of bone 3
  25. pushInt. 0x2
  26. sys. 0x1, 0x15 #Global Y position of character (TransN)
  27. subf.
  28. floatVarSet 0x0, 0x7 #Y offset
  29. pushVar. 0x0, 0x6
  30. pushVar. 0x0, 0x2
  31. floatGreater.
  32. if loc_1 #basically just update the min/max values for every bone
  33. pushVar. 0x0, 0x6
  34. floatVarSet 0x0, 0x2
  35.  
  36. loc_1:
  37. pushVar. 0x0, 0x6
  38. pushVar. 0x0, 0x0
  39. floatLess.
  40. if loc_2
  41. pushVar. 0x0, 0x6
  42. floatVarSet 0x0, 0x0
  43.  
  44. loc_2:
  45. pushVar. 0x0, 0x7
  46. pushVar. 0x0, 0x5
  47. floatGreater.
  48. if loc_3
  49. pushVar. 0x0, 0x7
  50. floatVarSet 0x0, 0x5
  51.  
  52. loc_3:
  53. pushVar. 0x0, 0x7
  54. pushVar. 0x0, 0x3
  55. floatLess.
  56. if loc_4
  57. pushVar. 0x0, 0x7
  58. floatVarSet 0x0, 0x3
  59.  
  60. loc_4:
  61. pushInt. 0x0
  62. pushInt. 0x6
  63. sys. 0x2, 0x28
  64. pushInt. 0x1
  65. sys. 0x1, 0x15
  66. subf.
  67. floatVarSet 0x0, 0x6 #X offset
  68. pushInt. 0x1
  69. pushInt. 0x6
  70. sys. 0x2, 0x28
  71. pushInt. 0x2
  72. sys. 0x1, 0x15
  73. subf.
  74. floatVarSet 0x0, 0x7 #Y offset
  75. pushVar. 0x0, 0x6
  76. pushVar. 0x0, 0x2
  77. floatGreater.
  78. if loc_5
  79. pushVar. 0x0, 0x6
  80. floatVarSet 0x0, 0x2
  81.  
  82. loc_5:
  83. pushVar. 0x0, 0x6
  84. pushVar. 0x0, 0x0
  85. floatLess.
  86. if loc_6
  87. pushVar. 0x0, 0x6
  88. floatVarSet 0x0, 0x0
  89.  
  90. loc_6:
  91. pushVar. 0x0, 0x7
  92. pushVar. 0x0, 0x5
  93. floatGreater.
  94. if loc_7
  95. pushVar. 0x0, 0x7
  96. floatVarSet 0x0, 0x5
  97.  
  98. loc_7:
  99. pushVar. 0x0, 0x7
  100. pushVar. 0x0, 0x3
  101. floatLess.
  102. if loc_8
  103. pushVar. 0x0, 0x7
  104. floatVarSet 0x0, 0x3
  105.  
  106. loc_8:
  107. pushInt. 0x0
  108. pushInt. 0xa
  109. sys. 0x2, 0x28
  110. pushInt. 0x1
  111. sys. 0x1, 0x15
  112. subf.
  113. floatVarSet 0x0, 0x6 #X offset
  114. pushInt. 0x1
  115. pushInt. 0xa
  116. sys. 0x2, 0x28
  117. pushInt. 0x2
  118. sys. 0x1, 0x15
  119. subf.
  120. floatVarSet 0x0, 0x7 #Y offset
  121. pushVar. 0x0, 0x6
  122. pushVar. 0x0, 0x2
  123. floatGreater.
  124. if loc_9
  125. pushVar. 0x0, 0x6
  126. floatVarSet 0x0, 0x2
  127.  
  128. loc_9:
  129. pushVar. 0x0, 0x6
  130. pushVar. 0x0, 0x0
  131. floatLess.
  132. if loc_10
  133. pushVar. 0x0, 0x6
  134. floatVarSet 0x0, 0x0
  135.  
  136. loc_10:
  137. pushVar. 0x0, 0x7
  138. pushVar. 0x0, 0x5
  139. floatGreater.
  140. if loc_11
  141. pushVar. 0x0, 0x7
  142. floatVarSet 0x0, 0x5
  143.  
  144. loc_11:
  145. pushVar. 0x0, 0x7
  146. pushVar. 0x0, 0x3
  147. floatLess.
  148. if loc_12
  149. pushVar. 0x0, 0x7
  150. floatVarSet 0x0, 0x3
  151.  
  152. loc_12:
  153. pushInt. 0x0
  154. pushInt. 0xf
  155. sys. 0x2, 0x28
  156. pushInt. 0x1
  157. sys. 0x1, 0x15
  158. subf.
  159. floatVarSet 0x0, 0x6 #X offset
  160. pushInt. 0x1
  161. pushInt. 0xf
  162. sys. 0x2, 0x28
  163. pushInt. 0x2
  164. sys. 0x1, 0x15
  165. subf.
  166. floatVarSet 0x0, 0x7 #Y offset
  167. pushVar. 0x0, 0x6
  168. pushVar. 0x0, 0x2
  169. floatGreater.
  170. if loc_13
  171. pushVar. 0x0, 0x6
  172. floatVarSet 0x0, 0x2
  173.  
  174. loc_13:
  175. pushVar. 0x0, 0x6
  176. pushVar. 0x0, 0x0
  177. floatLess.
  178. if loc_14
  179. pushVar. 0x0, 0x6
  180. floatVarSet 0x0, 0x0
  181.  
  182. loc_14:
  183. pushVar. 0x0, 0x7
  184. pushVar. 0x0, 0x5
  185. floatGreater.
  186. if loc_15
  187. pushVar. 0x0, 0x7
  188. floatVarSet 0x0, 0x5
  189.  
  190. loc_15:
  191. pushVar. 0x0, 0x7
  192. pushVar. 0x0, 0x3
  193. floatLess.
  194. if loc_16
  195. pushVar. 0x0, 0x7
  196. floatVarSet 0x0, 0x3
  197.  
  198. loc_16:
  199. pushInt. 0x0
  200. pushInt. 0x15
  201. sys. 0x2, 0x28
  202. pushInt. 0x1
  203. sys. 0x1, 0x15
  204. subf.
  205. floatVarSet 0x0, 0x6 #X offset
  206. pushInt. 0x1
  207. pushInt. 0x15
  208. sys. 0x2, 0x28
  209. pushInt. 0x2
  210. sys. 0x1, 0x15
  211. subf.
  212. floatVarSet 0x0, 0x7 #Y offset
  213. pushVar. 0x0, 0x6
  214. pushVar. 0x0, 0x2
  215. floatGreater.
  216. if loc_17
  217. pushVar. 0x0, 0x6
  218. floatVarSet 0x0, 0x2
  219.  
  220. loc_17:
  221. pushVar. 0x0, 0x6
  222. pushVar. 0x0, 0x0
  223. floatLess.
  224. if loc_18
  225. pushVar. 0x0, 0x6
  226. floatVarSet 0x0, 0x0
  227.  
  228. loc_18:
  229. pushVar. 0x0, 0x7
  230. pushVar. 0x0, 0x5
  231. floatGreater.
  232. if loc_19
  233. pushVar. 0x0, 0x7
  234. floatVarSet 0x0, 0x5
  235.  
  236. loc_19:
  237. pushVar. 0x0, 0x7
  238. pushVar. 0x0, 0x3
  239. floatLess.
  240. if loc_20
  241. pushVar. 0x0, 0x7
  242. floatVarSet 0x0, 0x3
  243.  
  244. loc_20:
  245. pushVar. 0x0, 0x0
  246. pushInt. -1f
  247. floatGreater.
  248. if loc_21
  249. pushInt. -1f
  250. floatVarSet 0x0, 0x0
  251.  
  252. loc_21:
  253. pushVar. 0x0, 0x2
  254. pushInt. 1f
  255. floatLess.
  256. if loc_22
  257. pushInt. 1f
  258. floatVarSet 0x0, 0x2
  259.  
  260. loc_22:
  261. pushVar. 0x0, 0x5
  262. pushInt. 2f
  263. floatLess.
  264. if loc_23
  265. pushInt. 2f
  266. floatVarSet 0x0, 0x5
  267.  
  268. loc_23:
  269. pushVar. 0x0, 0x3
  270. pushVar. 0x0, 0x5
  271. addf.
  272. pushInt. 0.5f
  273. multf.
  274. floatVarSet 0x0, 0x4
  275. pushInt. 0x272e #bottom
  276. pushInt. 0x1000013
  277. pushInt. 0x0
  278. pushInt. 0x0
  279. pushVar. 0x0, 0x3
  280. pushVar. 0x0, 0x1
  281. pushInt. 0x0
  282. pushInt. 0x0
  283. pushInt. 0x0
  284. pushInt. 0x1f
  285. pushInt. 0x0
  286. pushInt. 0x0
  287. sys 0xc, 0x1c
  288. pushInt. 0x272e #left
  289. pushInt. 0x1000013
  290. pushInt. 0x0
  291. pushInt. 0x0
  292. pushVar. 0x0, 0x4
  293. pushVar. 0x0, 0x0
  294. pushInt. 0x0
  295. pushInt. 0x0
  296. pushInt. 0x0
  297. pushInt. 0x1f
  298. pushInt. 0x0
  299. pushInt. 0x0
  300. sys 0xc, 0x1c
  301. pushInt. 0x272e #top
  302. pushInt. 0x1000013
  303. pushInt. 0x0
  304. pushInt. 0x0
  305. pushVar. 0x0, 0x5
  306. pushVar. 0x0, 0x1
  307. pushInt. 0x0
  308. pushInt. 0x0
  309. pushInt. 0x0
  310. pushInt. 0x1f
  311. pushInt. 0x0
  312. pushInt. 0x0
  313. sys 0xc, 0x1c
  314. pushInt. 0x272e #right
  315. pushInt. 0x1000013
  316. pushInt. 0x0
  317. pushInt. 0x0
  318. pushVar. 0x0, 0x4
  319. pushVar. 0x0, 0x2
  320. pushInt. 0x0
  321. pushInt. 0x0
  322. pushInt. 0x0
  323. pushInt. 0x1f
  324. pushInt. 0x0
  325. pushInt. 0x0
  326. sys 0xc, 0x1c
  327. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement