Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Sonic_Init(const char *path, const HelperFunctions &helperFunctions)
- {
- //Disable Sonic Morphs
- WriteData<3>((void*)0x493711, 0x90);
- WriteData<3>((void*)0x49356D, 0x90);
- WriteData<3>((void*)0x4935E3, 0x90);
- WriteData<3>((void*)0x493722, 0x90);
- WriteData<3>((void*)0x4936EA, 0x90);
- WriteData<3>((void*)0x493657, 0x90);
- WriteData<3>((void*)0x4936CD, 0x90);
- WriteData<3>((void*)0x493C5D, 0x90);
- WriteData<3>((void*)0x4937A1, 0x90);
- //Animated texture stuff
- HMODULE hmodule = GetModuleHandle(L"CHRMODELS_orig");
- NJS_OBJECT **___SONIC_OBJECTS = (NJS_OBJECT **)GetProcAddress(hmodule, "___SONIC_OBJECTS");
- processobject(&object_010056AF50);
- processobject(&object_01005729CC);
- processobject2(&object_020056AF50);
- processobject2(&object_02005729CC);
- //Original __SONIC_ACTIONS[]
- sonicaction1motion = ___SONIC_ACTIONS[1]->motion;
- sonicaction2motion = ___SONIC_ACTIONS[2]->motion;
- sonicaction3motion = ___SONIC_ACTIONS[3]->motion;
- sonicaction4motion = ___SONIC_ACTIONS[4]->motion;
- sonicaction5motion = ___SONIC_ACTIONS[5]->motion;
- sonicaction6motion = ___SONIC_ACTIONS[6]->motion;
- sonicaction18motion = ___SONIC_ACTIONS[18]->motion;
- sonicaction120motion = ___SONIC_ACTIONS[120]->motion;
- sonicaction121motion = ___SONIC_ACTIONS[121]->motion;
- sonicaction122motion = ___SONIC_ACTIONS[122]->motion;
- sonicaction123motion = ___SONIC_ACTIONS[123]->motion;
- };
- IN ONFRAME :
- //To get the right anim without the weird crashes...
- ___SONIC_OBJECTS[0] = &object_0056AF50;
- ___SONIC_ACTIONS[6]->motion = &___SONIC_ACTIONS_6;
- //Super/Hyper anims index changes
- if (is_super || is_hyper)
- {
- ___SONIC_ACTIONS[1]->motion = ___SONIC_ACTIONS[130]->motion;//Standing
- ___SONIC_ACTIONS[2]->motion = ___SONIC_ACTIONS[130]->motion;
- ___SONIC_ACTIONS[3]->motion = ___SONIC_ACTIONS[130]->motion;//Walking
- ___SONIC_ACTIONS[4]->motion = ___SONIC_ACTIONS[132]->motion;//Run slowest 132
- if (GameState != 21) ___SONIC_ACTIONS[5]->motion = ___SONIC_ACTIONS[133]->motion;//for char sel
- else ___SONIC_ACTIONS[5]->motion = ___SONIC_ACTIONS[130]->motion;//Run faster 133
- //___SONIC_ACTIONS[6]->motion = ___SONIC_ACTIONS[119]->motion;//Run armsback 64
- if (co2->Speed.x >= 10 && !(ControllerPointers[0]->PressedButtons & Buttons_Z))
- {
- ___SONIC_ACTIONS[6]->motion = ___SONIC_ACTIONS[119]->motion;//Run armsback 64
- ((AnimData_t*)0x3C56210)[12].Property = 9;
- ((AnimData_t*)0x3C56210)[12].AnimationSpeed = 1.0;
- }
- else if (co2->Speed.x < 10 && !(ControllerPointers[0]->PressedButtons & Buttons_Z))
- {
- ___SONIC_ACTIONS[6]->motion = ___SONIC_ACTIONS[133]->motion;//Run faster 133
- ((AnimData_t*)0x3C56210)[12].Property = 9;
- ((AnimData_t*)0x3C56210)[12].AnimationSpeed = 0.07;
- }
- ___SONIC_ACTIONS[18]->motion = ___SONIC_ACTIONS[119]->motion;//Run fastest 64
- ___SONIC_ACTIONS[120]->motion = ___SONIC_ACTIONS[130]->motion;
- ___SONIC_ACTIONS[121]->motion = ___SONIC_ACTIONS[130]->motion;
- ___SONIC_ACTIONS[122]->motion = ___SONIC_ACTIONS[130]->motion;
- ___SONIC_ACTIONS[123]->motion = ___SONIC_ACTIONS[130]->motion;
- }
- else
- {
- ___SONIC_ACTIONS[1]->motion = sonicaction1motion;
- ___SONIC_ACTIONS[2]->motion = sonicaction2motion;
- ___SONIC_ACTIONS[3]->motion = sonicaction3motion;
- ___SONIC_ACTIONS[4]->motion = sonicaction4motion;
- ___SONIC_ACTIONS[5]->motion = sonicaction5motion;
- ___SONIC_ACTIONS[6]->motion = sonicaction6motion;
- ___SONIC_ACTIONS[18]->motion = sonicaction18motion;
- ___SONIC_ACTIONS[120]->motion = sonicaction120motion;
- ___SONIC_ACTIONS[121]->motion = sonicaction121motion;
- ___SONIC_ACTIONS[122]->motion = sonicaction122motion;
- ___SONIC_ACTIONS[123]->motion = sonicaction123motion;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement