Advertisement
Guest User

gta3inGameAnimViewer

a guest
Jun 30th, 2012
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.43 KB | None | 0 0
  1. {$CLEO}
  2.  
  3. const
  4. // variables
  5. currentAnimID = 0@ // int
  6. modelClump = 1@ // RpClump*
  7. FUNC_blendAnimation = 2@ // int
  8. gameVersion = 3@
  9. timer = 16@
  10.  
  11. // constants
  12. KEY_SWITCH = 77
  13. KEY_LEFT = 188
  14. KEY_RIGHT = 190
  15. KEY_APPLYANIM = 191
  16. KEY_RESET = 16
  17. TIME_FOR_SWITCH = 120
  18. ANIM_RATE = 8.0
  19. end
  20.  
  21. goto @begin
  22.  
  23. :drawNumber
  24. 03F0: enable_text_draw 1
  25. 01E3: text_1number_styled 'NUMBER' currentAnimID 70 ms 3
  26. return
  27.  
  28. :applyCurrentAnimToPlayer
  29. 05E6: modelClump = actor $3 struct
  30. modelClump += 0x4C
  31. 05E0: modelClump = read_memory modelClump size 4 virtual_protect 1
  32. 05E5: gameVersion = game_version
  33. if
  34. gameVersion == 0
  35. then
  36. FUNC_blendAnimation = 0x403710
  37. else
  38. FUNC_blendAnimation = 0x403710
  39. end
  40. 05E1: call 0x403710 num_params 4 pop 4 8.0 currentAnimID 0 modelClump
  41. return
  42.  
  43. :begin
  44. currentAnimID = 0
  45. while true
  46. wait 0
  47. if
  48. 0256: player 0 defined
  49. then
  50. if
  51. 05EE: key_pressed KEY_SWITCH
  52. then
  53. while 05EE: key_pressed KEY_SWITCH
  54. wait 0
  55. if
  56. 8256: not player 0 defined
  57. then
  58. goto @begin
  59. end
  60. end
  61. // here we go
  62. while true
  63. wait 0
  64. gosub @drawNumber
  65. if
  66. 8256: not player 0 defined
  67. then
  68. goto @begin
  69. end
  70. if
  71. 05EE: key_pressed KEY_SWITCH
  72. then
  73. while 05EE: key_pressed KEY_SWITCH
  74. wait 0
  75. end
  76. goto @begin
  77. end
  78. if
  79. 05EE: key_pressed KEY_LEFT
  80. then
  81. timer = 0
  82. while 05EE: key_pressed KEY_LEFT
  83. wait 0
  84. gosub @drawNumber
  85. if
  86. 8256: not player 0 defined
  87. then
  88. goto @begin
  89. end
  90. if
  91. timer > TIME_FOR_SWITCH
  92. then
  93. break
  94. end
  95. end
  96. if
  97. currentAnimID > 0
  98. then
  99. currentAnimID -= 1
  100. end
  101. else if
  102. 05EE: key_pressed KEY_RIGHT
  103. then
  104. while 05EE: key_pressed KEY_RIGHT
  105. wait 0
  106. gosub @drawNumber
  107. if
  108. 8256: not player 0 defined
  109. then
  110. goto @begin
  111. end
  112. if
  113. timer > TIME_FOR_SWITCH
  114. then
  115. break
  116. end
  117. end
  118. currentAnimID += 1
  119. end
  120. end
  121. if
  122. 05EE: key_pressed KEY_RESET
  123. then
  124. while 05EE: key_pressed KEY_RESET
  125. wait 0
  126. gosub @drawNumber
  127. if
  128. 8256: not player 0 defined
  129. then
  130. goto @begin
  131. end
  132. end
  133. currentAnimID = 0
  134. gosub @applyCurrentAnimToPlayer
  135. end
  136. if
  137. 05EE: key_pressed KEY_APPLYANIM
  138. then
  139. while 05EE: key_pressed KEY_APPLYANIM
  140. wait 0
  141. gosub @drawNumber
  142. if
  143. 8256: not player 0 defined
  144. then
  145. goto @begin
  146. end
  147. end
  148. gosub @applyCurrentAnimToPlayer
  149. end
  150. end
  151. end
  152. else
  153. goto @begin
  154. end
  155. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement