Created
November 18, 2016 03:19
-
-
Save DankRank/4037cf74b850fcfbeaf628839ba9a632 to your computer and use it in GitHub Desktop.
CameraSwitch mod for SADX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SADXModLoader.h> | |
#define EXPORT __declspec(dllexport) | |
FunctionPointer(void, SetCameraLock, (bool), 0x004348A0); | |
FunctionPointer(bool, GetCameraLock, (void), 0x004348E0); | |
FunctionPointer(void, SetCameraMode, (bool), 0x004348F0); | |
FunctionPointer(bool, GetCameraMode, (void), 0x00434930); | |
extern "C"{ | |
EXPORT void OnFrame(){ | |
//Thanks to SF94 for disassembling pause menu options thingy | |
if( (!IsGamePaused()) | |
&& GetCameraLock() | |
&& CurrentLevel < (signed)LevelIDs_SSGarden | |
&& Controllers[0].PressedButtons&Buttons_Y ) { | |
SetCameraMode(!GetCameraMode()); | |
PlaySound(3,0,0,0); | |
} | |
} | |
EXPORT ModInfo SADXModInfo = { ModLoaderVer }; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment