Advertisement
Benji23245

Untitled

Oct 17th, 2017
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.48 KB | None | 0 0
  1. //Extra transformations
  2. if (co2 == NULL) return;
  3. if (GetCharacterObject(0) && GetCharacterID(0) == Characters_Sonic && MetalSonicFlag == 0)
  4. {
  5. if (GameState != 16)
  6. {
  7. if (!just_transformed)
  8. {
  9. if (ControllerPointers[0]->PressedButtons & Buttons_C)//Super transformation (toggle)
  10. {
  11. if (!is_super)
  12. {
  13. if (!is_hyper)
  14. {
  15. if (CharObj1Ptrs[0]->Action == 8)
  16. {
  17. transforming = true;
  18. is_super = true;
  19. just_transformed = true;
  20. ChangeToSuperModel();
  21. njReleaseTexture((NJS_TEXLIST*)0x927CB8);
  22. njReleaseTexture((NJS_TEXLIST*)0x142272C);
  23. njReleaseTexture((NJS_TEXLIST*)0x94A2A8);
  24. LoadPVM("SUP_SON_EFF", (NJS_TEXLIST*)0x927CB8);
  25. LoadPVM("SUP_SUPERSONIC", (NJS_TEXLIST*)0x142272C);
  26. LoadPVM("SUP_EFF_REGULAR", (NJS_TEXLIST*)0x94A2A8);
  27. co2->Powerups |= Powerups_Invincibility;
  28. }
  29. }
  30. else
  31. {
  32. is_super = true;
  33. is_hyper = false;
  34. ChangeToSuperModel();
  35. njReleaseTexture((NJS_TEXLIST*)0x927CB8);
  36. njReleaseTexture((NJS_TEXLIST*)0x142272C);
  37. njReleaseTexture((NJS_TEXLIST*)0x94A2A8);
  38. LoadPVM("SUP_SON_EFF", (NJS_TEXLIST*)0x927CB8);
  39. LoadPVM("SUP_SUPERSONIC", (NJS_TEXLIST*)0x142272C);
  40. LoadPVM("SUP_EFF_REGULAR", (NJS_TEXLIST*)0x94A2A8);
  41. DeleteObject_(hypersparkles);
  42. hypersparkles = nullptr;
  43. co2->Powerups |= Powerups_Invincibility;
  44. }
  45. }
  46. else
  47. {
  48. just_untransformed = true;
  49. is_super = false;
  50. is_hyper = false;
  51. ChangeToNormalModel();
  52. WriteData((short*)0x4BA46D, (short)1380);
  53. njReleaseTexture((NJS_TEXLIST*)0x927CB8);
  54. njReleaseTexture((NJS_TEXLIST*)0x142272C);
  55. njReleaseTexture((NJS_TEXLIST*)0x94A2A8);
  56. LoadPVM("SON_EFF", (NJS_TEXLIST*)0x927CB8);
  57. LoadPVM("SUPERSONIC", (NJS_TEXLIST*)0x142272C);
  58. LoadPVM("EFF_REGULAR", (NJS_TEXLIST*)0x94A2A8);
  59. co2->Powerups &= ~Powerups_Invincibility;
  60. }
  61. }
  62. if (ControllerPointers[0]->PressedButtons & Buttons_D)//Hyper transformation (toggle)
  63. {
  64. if (!is_hyper)
  65. {
  66. if (CharObj1Ptrs[0]->Action == 8)
  67. {
  68. transforming = true;
  69. is_super = false;
  70. is_hyper = true;
  71. just_transformed = true;
  72. ChangeToHyperModel();
  73. WriteData((short*)0x4BA46D, (short)65534);
  74. njReleaseTexture((NJS_TEXLIST*)0x927CB8);
  75. njReleaseTexture((NJS_TEXLIST*)0x142272C);
  76. njReleaseTexture((NJS_TEXLIST*)0x94A2A8);
  77. LoadPVM("HYP_SON_EFF", (NJS_TEXLIST*)0x927CB8);
  78. LoadPVM("HYP_SUPERSONIC", (NJS_TEXLIST*)0x142272C);
  79. LoadPVM("HYP_EFF_REGULAR", (NJS_TEXLIST*)0x94A2A8);
  80. co2->Powerups &= ~Powerups_Invincibility;
  81. }
  82. }
  83. else
  84. {
  85. just_untransformed = true;
  86. is_super = false;
  87. is_hyper = false;
  88. ChangeToNormalModel();
  89. WriteData((short*)0x4BA46D, (short)1380);
  90. njReleaseTexture((NJS_TEXLIST*)0x927CB8);
  91. njReleaseTexture((NJS_TEXLIST*)0x142272C);
  92. njReleaseTexture((NJS_TEXLIST*)0x94A2A8);
  93. LoadPVM("SON_EFF", (NJS_TEXLIST*)0x927CB8);
  94. LoadPVM("SUPERSONIC", (NJS_TEXLIST*)0x142272C);
  95. LoadPVM("EFF_REGULAR", (NJS_TEXLIST*)0x94A2A8);
  96. co2->Powerups &= ~Powerups_Invincibility;
  97. DeleteObject_(hypersparkles);
  98. hypersparkles = nullptr;
  99. }
  100. }
  101. }
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement