mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-28 13:52:07 -04:00
CCApplication, AppDelegate and controller stuff
This commit is contained in:
parent
e98a756361
commit
17dfe975af
6 changed files with 86 additions and 5 deletions
bindings
loader
include/Geode/cocos/platform/win32
test/members
|
@ -91,6 +91,13 @@ class cocos2d::CCClippingNode {
|
|||
auto visit() = mac 0x419530;
|
||||
}
|
||||
|
||||
// not sure how the entire class is supposed to be added to only windows cuz idk if it even exists on mac
|
||||
//class cocos2d::CCControllerHandler {
|
||||
// CCControllerHandler(int userIndex) = win 0xc7f50;
|
||||
// cocos2d::CCControllerState getState() = win 0xc7f80;
|
||||
// void updateConnected() = win 0xc7fb0;
|
||||
//}
|
||||
|
||||
class cocos2d::CCDelayTime {
|
||||
static cocos2d::CCDelayTime* create(float) = mac 0x1f4380;
|
||||
}
|
||||
|
|
|
@ -97,9 +97,14 @@ class AppDelegate : cocos2d::CCApplication, cocos2d::CCSceneDelegate {
|
|||
void resumeSound() = win 0x3d4d0;
|
||||
void setupGLView() = win 0x3c950;
|
||||
|
||||
bool m_unk0;
|
||||
bool m_unk1;
|
||||
cocos2d::CCScene* m_runningScene;
|
||||
bool m_loadingFinished;
|
||||
// there's 0x18 more on Windows
|
||||
bool m_unk2;
|
||||
bool m_unk3;
|
||||
bool m_use16BitFormatForColorPicker;
|
||||
bool m_unk4;
|
||||
}
|
||||
|
||||
class ArtistCell : TableViewCell {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "CCStdC.h"
|
||||
#include "../CCCommon.h"
|
||||
#include "../CCApplicationProtocol.h"
|
||||
#include "CCControllerHandler.h"
|
||||
#include <string>
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
@ -71,15 +72,15 @@ public:
|
|||
HINSTANCE m_hInstance;
|
||||
HACCEL m_hAccelTable;
|
||||
LARGE_INTEGER m_nAnimationInterval;
|
||||
PAD(8);
|
||||
LARGE_INTEGER m_nVsyncInterval;
|
||||
std::string m_resourceRootPath;
|
||||
std::string m_startupScriptFilename;
|
||||
void* m_pUnknown;
|
||||
CCControllerHandler* m_pControllerHandler;
|
||||
bool m_bUpdateController;
|
||||
CC_SYNTHESIZE_NV(bool, m_bShutdownCalled, ShutdownCalled);
|
||||
INPUT m_iInput;
|
||||
CCPoint m_obUnknown1;
|
||||
CCPoint m_obUnknown2;
|
||||
CCPoint m_obLeftThumb;
|
||||
CCPoint m_obRightThumb;
|
||||
bool m_bMouseControl;
|
||||
float m_fOldAnimationInterval;
|
||||
float m_fAnimationInterval;
|
||||
|
|
40
loader/include/Geode/cocos/platform/win32/CCControllerHandler.h
vendored
Normal file
40
loader/include/Geode/cocos/platform/win32/CCControllerHandler.h
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
#ifndef __CC_CONTROLLER_HANDLER_WIN32_H__
|
||||
#define __CC_CONTROLLER_HANDLER_WIN32_H__
|
||||
|
||||
#include "../../include/ccMacros.h"
|
||||
#include "CCStdC.h"
|
||||
#include "CCControllerState.h"
|
||||
#include <Xinput.h>
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class CC_DLL CCControllerHandler
|
||||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
//CCControllerHandler();
|
||||
//CCControllerState getState();
|
||||
//void updateConnected();
|
||||
|
||||
XINPUT_STATE m_xinputState;
|
||||
int m_userIndex;
|
||||
bool m_controllerConnected;
|
||||
bool m_dpadUp;
|
||||
bool m_dpadDown;
|
||||
bool m_dpadLeft;
|
||||
bool m_dpadRight;
|
||||
bool m_start;
|
||||
bool m_back;
|
||||
bool m_lt;
|
||||
bool m_rt;
|
||||
bool m_lb;
|
||||
bool m_rb;
|
||||
bool m_buttonA;
|
||||
bool m_buttonB;
|
||||
bool m_buttonX;
|
||||
bool m_buttonY;
|
||||
};
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif
|
25
loader/include/Geode/cocos/platform/win32/CCControllerState.h
vendored
Normal file
25
loader/include/Geode/cocos/platform/win32/CCControllerState.h
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
#ifndef __CC_CONTROLLER_STATE_WIN32_H__
|
||||
#define __CC_CONTROLLER_STATE_WIN32_H__
|
||||
|
||||
#include "../../include/ccMacros.h"
|
||||
#include "CCStdC.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class CC_DLL CCControllerState
|
||||
{
|
||||
GEODE_FRIEND_MODIFY
|
||||
public:
|
||||
DWORD m_packetNumber;
|
||||
WORD m_buttons;
|
||||
byte m_leftTrigger;
|
||||
byte m_rightTrigger;
|
||||
short m_thumbLX;
|
||||
short m_thumbLY;
|
||||
short m_thumbRX;
|
||||
short m_thumbRY;
|
||||
};
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
#ifdef GEODE_IS_WINDOWS
|
||||
|
||||
GEODE_MEMBER_CHECK(cocos2d::CCApplication, m_fAnimationInterval, 0x8c);
|
||||
GEODE_MEMBER_CHECK(AppDelegate, m_runningScene, 0xa0);
|
||||
|
||||
GEODE_MEMBER_CHECK(GameObject, m_effectPlistName, 0x278);
|
||||
GEODE_MEMBER_CHECK(GameObject, m_effectManager, 0x454);
|
||||
GEODE_MEMBER_CHECK(GameObject, m_firstPosition, 0x424);
|
||||
|
|
Loading…
Add table
Reference in a new issue