Advertisement
Benji23245

Untitled

Mar 6th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.67 KB | None | 0 0
  1. void Sonic_Init(const char *path, const HelperFunctions &helperFunctions)
  2. {
  3. //Disable Sonic Morphs
  4. WriteData<3>((void*)0x493711, 0x90);
  5. WriteData<3>((void*)0x49356D, 0x90);
  6. WriteData<3>((void*)0x4935E3, 0x90);
  7. WriteData<3>((void*)0x493722, 0x90);
  8. WriteData<3>((void*)0x4936EA, 0x90);
  9. WriteData<3>((void*)0x493657, 0x90);
  10. WriteData<3>((void*)0x4936CD, 0x90);
  11. WriteData<3>((void*)0x493C5D, 0x90);
  12. WriteData<3>((void*)0x4937A1, 0x90);
  13.  
  14. //Animated texture stuff
  15. HMODULE hmodule = GetModuleHandle(L"CHRMODELS_orig");
  16. NJS_OBJECT **___SONIC_OBJECTS = (NJS_OBJECT **)GetProcAddress(hmodule, "___SONIC_OBJECTS");
  17. processobject(&object_010056AF50);
  18. processobject(&object_01005729CC);
  19. processobject2(&object_020056AF50);
  20. processobject2(&object_02005729CC);
  21.  
  22.  
  23. //Original __SONIC_ACTIONS[]
  24. sonicaction1motion = ___SONIC_ACTIONS[1]->motion;
  25. sonicaction2motion = ___SONIC_ACTIONS[2]->motion;
  26. sonicaction3motion = ___SONIC_ACTIONS[3]->motion;
  27. sonicaction4motion = ___SONIC_ACTIONS[4]->motion;
  28. sonicaction5motion = ___SONIC_ACTIONS[5]->motion;
  29. sonicaction6motion = ___SONIC_ACTIONS[6]->motion;
  30. sonicaction18motion = ___SONIC_ACTIONS[18]->motion;
  31. sonicaction120motion = ___SONIC_ACTIONS[120]->motion;
  32. sonicaction121motion = ___SONIC_ACTIONS[121]->motion;
  33. sonicaction122motion = ___SONIC_ACTIONS[122]->motion;
  34. sonicaction123motion = ___SONIC_ACTIONS[123]->motion;
  35.  
  36. };
  37.  
  38.  
  39.  
  40.  
  41.  
  42. IN ONFRAME :
  43.  
  44.  
  45. //To get the right anim without the weird crashes...
  46. ___SONIC_OBJECTS[0] = &object_0056AF50;
  47. ___SONIC_ACTIONS[6]->motion = &___SONIC_ACTIONS_6;
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54. //Super/Hyper anims index changes
  55. if (is_super || is_hyper)
  56. {
  57. ___SONIC_ACTIONS[1]->motion = ___SONIC_ACTIONS[130]->motion;//Standing
  58. ___SONIC_ACTIONS[2]->motion = ___SONIC_ACTIONS[130]->motion;
  59. ___SONIC_ACTIONS[3]->motion = ___SONIC_ACTIONS[130]->motion;//Walking
  60. ___SONIC_ACTIONS[4]->motion = ___SONIC_ACTIONS[132]->motion;//Run slowest 132
  61. if (GameState != 21) ___SONIC_ACTIONS[5]->motion = ___SONIC_ACTIONS[133]->motion;//for char sel
  62. else ___SONIC_ACTIONS[5]->motion = ___SONIC_ACTIONS[130]->motion;//Run faster 133
  63. //___SONIC_ACTIONS[6]->motion = ___SONIC_ACTIONS[119]->motion;//Run armsback 64
  64. if (co2->Speed.x >= 10 && !(ControllerPointers[0]->PressedButtons & Buttons_Z))
  65. {
  66. ___SONIC_ACTIONS[6]->motion = ___SONIC_ACTIONS[119]->motion;//Run armsback 64
  67. ((AnimData_t*)0x3C56210)[12].Property = 9;
  68. ((AnimData_t*)0x3C56210)[12].AnimationSpeed = 1.0;
  69. }
  70. else if (co2->Speed.x < 10 && !(ControllerPointers[0]->PressedButtons & Buttons_Z))
  71. {
  72. ___SONIC_ACTIONS[6]->motion = ___SONIC_ACTIONS[133]->motion;//Run faster 133
  73. ((AnimData_t*)0x3C56210)[12].Property = 9;
  74. ((AnimData_t*)0x3C56210)[12].AnimationSpeed = 0.07;
  75. }
  76. ___SONIC_ACTIONS[18]->motion = ___SONIC_ACTIONS[119]->motion;//Run fastest 64
  77. ___SONIC_ACTIONS[120]->motion = ___SONIC_ACTIONS[130]->motion;
  78. ___SONIC_ACTIONS[121]->motion = ___SONIC_ACTIONS[130]->motion;
  79. ___SONIC_ACTIONS[122]->motion = ___SONIC_ACTIONS[130]->motion;
  80. ___SONIC_ACTIONS[123]->motion = ___SONIC_ACTIONS[130]->motion;
  81. }
  82. else
  83. {
  84. ___SONIC_ACTIONS[1]->motion = sonicaction1motion;
  85. ___SONIC_ACTIONS[2]->motion = sonicaction2motion;
  86. ___SONIC_ACTIONS[3]->motion = sonicaction3motion;
  87. ___SONIC_ACTIONS[4]->motion = sonicaction4motion;
  88. ___SONIC_ACTIONS[5]->motion = sonicaction5motion;
  89. ___SONIC_ACTIONS[6]->motion = sonicaction6motion;
  90. ___SONIC_ACTIONS[18]->motion = sonicaction18motion;
  91. ___SONIC_ACTIONS[120]->motion = sonicaction120motion;
  92. ___SONIC_ACTIONS[121]->motion = sonicaction121motion;
  93. ___SONIC_ACTIONS[122]->motion = sonicaction122motion;
  94. ___SONIC_ACTIONS[123]->motion = sonicaction123motion;
  95. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement