This commit is contained in:
altalk23 2023-06-24 00:45:21 +03:00
commit f5e57380aa
16 changed files with 272 additions and 103 deletions

View file

@ -1,5 +1,5 @@
name: Bug Report name: Bug Report
description: Report a bug where something is not working as expected, which does not crash the game. description: Report a bug where something is not working as expected in Geode Loader (not specific mods), which does not crash the game.
labels: [ "unverified", "bug" ] labels: [ "unverified", "bug" ]
body: body:
- type: dropdown - type: dropdown

View file

@ -1,5 +1,5 @@
name: Crash Report name: Crash Report
description: Report a bug that crashes the game or prevents startup. description: Report a bug that crashes the game or prevents startup caused by Geode Loader (not individual mods).
labels: [ "unverified", "crash" ] labels: [ "unverified", "crash" ]
body: body:
- type: dropdown - type: dropdown
@ -40,7 +40,7 @@ body:
id: crash-report id: crash-report
attributes: attributes:
label: Crash Report label: Crash Report
description: "You can find the crash report in `geode/crashlogs/`, if one was created. If you are using MacOS you can find the crash report in `Console.app` too. Additionally, please attach latest log in `geode/log/`. If either or both files do not exist, state such. Please link to a paste site with their content, such as GitHub Gists or Pastebin. **Do not paste the contents of either these files directly into the text box.**" description: "You can find the crash report in `geode/crashlogs/`, if one was created. Additionally, please attach latest log in `geode/log/`. If either or both files do not exist, state such. Please link to a paste site with their content, such as GitHub Gists or Pastebin. **Do not paste the contents of either these files directly into the text box.**"
placeholder: "Example: a link to a paste site with the crash report and latest.log." placeholder: "Example: a link to a paste site with the crash report and latest.log."
validations: validations:
required: false required: false

View file

@ -1,6 +1,7 @@
# Geode Changelog # Geode Changelog
## v1.0.0 ## v1.0.0
* Make JSON library exported (a2b8f27)
* Fix GLFW headers for Windows (6ada069) * Fix GLFW headers for Windows (6ada069)
* Add crashlog to MacOS (9b58b33) * Add crashlog to MacOS (9b58b33)
* Implement a new updater / bootstrapper for Windows (b47870e) * Implement a new updater / bootstrapper for Windows (b47870e)

View file

@ -17,6 +17,7 @@ class cocos2d::CCAnimation {
} }
class cocos2d::CCApplication { class cocos2d::CCApplication {
virtual auto run();
virtual auto getCurrentLanguage() = mac 0x1a3f40, ios 0x10e508; virtual auto getCurrentLanguage() = mac 0x1a3f40, ios 0x10e508;
virtual auto getTargetPlatform() = mac 0x1a3f20, ios 0x10e57c; virtual auto getTargetPlatform() = mac 0x1a3f20, ios 0x10e57c;
virtual auto openURL(char const*) = mac 0x1a4550, ios 0x10e7a4; virtual auto openURL(char const*) = mac 0x1a4550, ios 0x10e7a4;
@ -71,7 +72,7 @@ class cocos2d::CCClippingNode {
m_fAlphaThreshold = 1.f; m_fAlphaThreshold = 1.f;
m_bInverted = false; m_bInverted = false;
} }
~CCClippingNode() = mac 0x4191e0; ~CCClippingNode() = mac 0x4191e0, win 0xadae0;
static cocos2d::CCClippingNode* create() = mac 0x4192a0; static cocos2d::CCClippingNode* create() = mac 0x4192a0;
static cocos2d::CCClippingNode* create(cocos2d::CCNode*) = mac 0x419330; static cocos2d::CCClippingNode* create(cocos2d::CCNode*) = mac 0x419330;
// Inlined in create() call // Inlined in create() call
@ -91,6 +92,13 @@ class cocos2d::CCClippingNode {
auto visit() = mac 0x419530; 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 { class cocos2d::CCDelayTime {
static cocos2d::CCDelayTime* create(float) = mac 0x1f4380; static cocos2d::CCDelayTime* create(float) = mac 0x1f4380;
} }
@ -143,6 +151,7 @@ class cocos2d::CCDirector {
auto willSwitchToScene(cocos2d::CCScene* scene); auto willSwitchToScene(cocos2d::CCScene* scene);
auto setOpenGLView(cocos2d::CCEGLView *pobOpenGLView) = mac 0x249be0; auto setOpenGLView(cocos2d::CCEGLView *pobOpenGLView) = mac 0x249be0;
auto updateScreenScale(cocos2d::CCSize) = mac 0x249f10; auto updateScreenScale(cocos2d::CCSize) = mac 0x249f10;
auto setContentScaleFactor(float);
auto setNextScene() = mac 0x2498d0; auto setNextScene() = mac 0x2498d0;
auto showStats() = mac 0x2499e0; auto showStats() = mac 0x2499e0;
@ -151,7 +160,7 @@ class cocos2d::CCDirector {
} }
class cocos2d::CCDrawNode { class cocos2d::CCDrawNode {
CCDrawNode() = mac 0x378b40; CCDrawNode() = mac 0x378b40, win 0x6b9f0;
auto clear() = mac 0x379e80; auto clear() = mac 0x379e80;
static cocos2d::CCDrawNode* create() = mac 0x378d00; static cocos2d::CCDrawNode* create() = mac 0x378d00;
auto drawPolygon(cocos2d::CCPoint*, unsigned int, cocos2d::_ccColor4F const&, float, cocos2d::_ccColor4F const&) = mac 0x3797f0; auto drawPolygon(cocos2d::CCPoint*, unsigned int, cocos2d::_ccColor4F const&, float, cocos2d::_ccColor4F const&) = mac 0x3797f0;
@ -162,12 +171,12 @@ class cocos2d::CCDrawNode {
virtual auto init() = mac 0x378e00; virtual auto init() = mac 0x378e00;
auto setBlendFunc(cocos2d::_ccBlendFunc const&) = mac 0x379eb0; auto setBlendFunc(cocos2d::_ccBlendFunc const&) = mac 0x379eb0;
virtual auto draw() = mac 0x379020; virtual auto draw() = mac 0x379020;
virtual ~CCDrawNode() = mac 0x378cc0; virtual ~CCDrawNode() = mac 0x378cc0, win 0x6ba60;
} }
class cocos2d::CCAction { class cocos2d::CCAction {
CCAction() = mac 0x35b610; CCAction() = mac 0x35b610, win 0x7a6d0;
virtual ~CCAction() = mac 0x35b6b0; virtual ~CCAction() = mac 0x35b6b0, win 0x7a7f0;
auto stop() = mac 0x35b860; auto stop() = mac 0x35b860;
auto copyWithZone(cocos2d::CCZone* zone) = mac 0x35b7a0; auto copyWithZone(cocos2d::CCZone* zone) = mac 0x35b7a0;
auto startWithTarget(cocos2d::CCNode* target) = mac 0x35b850; auto startWithTarget(cocos2d::CCNode* target) = mac 0x35b850;
@ -238,8 +247,8 @@ class cocos2d::CCEGLView {
} }
class cocos2d::CCEGLViewProtocol { class cocos2d::CCEGLViewProtocol {
CCEGLViewProtocol(); CCEGLViewProtocol() = win 0xbac00;
virtual ~CCEGLViewProtocol(); virtual ~CCEGLViewProtocol() = win 0xbacc0;
auto getViewPortRect() const = mac 0x29e2f0; auto getViewPortRect() const = mac 0x29e2f0;
auto getScaleX() const = mac 0x29e300; auto getScaleX() const = mac 0x29e300;
auto getScaleY() const = mac 0x29e310; auto getScaleY() const = mac 0x29e310;
@ -293,8 +302,8 @@ class cocos2d::CCIMEDispatcher {
} }
class cocos2d::CCImage { class cocos2d::CCImage {
CCImage() = mac 0x24fa00; CCImage() = mac 0x24fa00, win 0xc5fd0;
virtual ~CCImage() = mac 0x24fa80; virtual ~CCImage() = mac 0x24fa80, win 0xc6100;
auto initWithImageFile(const char*, cocos2d::CCImage::EImageFormat imageType); auto initWithImageFile(const char*, cocos2d::CCImage::EImageFormat imageType);
auto initWithImageFileThreadSafe(const char*, cocos2d::CCImage::EImageFormat imageType); auto initWithImageFileThreadSafe(const char*, cocos2d::CCImage::EImageFormat imageType);
auto initWithImageData(void*, int, cocos2d::CCImage::EImageFormat, int, int, int) = mac 0x24fcb0; auto initWithImageData(void*, int, cocos2d::CCImage::EImageFormat, int, int, int) = mac 0x24fcb0;
@ -308,13 +317,13 @@ class cocos2d::CCKeyboardDispatcher {
class cocos2d::CCKeyboardHandler { class cocos2d::CCKeyboardHandler {
static cocos2d::CCKeyboardHandler* handlerWithDelegate(cocos2d::CCKeyboardDelegate*) = mac 0x242030; static cocos2d::CCKeyboardHandler* handlerWithDelegate(cocos2d::CCKeyboardDelegate*) = mac 0x242030;
virtual auto initWithDelegate(cocos2d::CCKeyboardDelegate*) = mac 0x241ff0, ios 0x13f8b8; virtual auto initWithDelegate(cocos2d::CCKeyboardDelegate*) = mac 0x241ff0, ios 0x13f8b8;
~CCKeyboardHandler() = mac 0x241e90, ios 0x13f87c; ~CCKeyboardHandler() = mac 0x241e90, ios 0x13f87c, win 0x99a10;
} }
class cocos2d::CCKeypadHandler { class cocos2d::CCKeypadHandler {
static cocos2d::CCKeypadHandler* handlerWithDelegate(cocos2d::CCKeypadDelegate*) = mac 0x1ff2d0; static cocos2d::CCKeypadHandler* handlerWithDelegate(cocos2d::CCKeypadDelegate*) = mac 0x1ff2d0;
virtual auto initWithDelegate(cocos2d::CCKeypadDelegate*) = mac 0x1ff290, ios 0x69; // iOS stub virtual auto initWithDelegate(cocos2d::CCKeypadDelegate*) = mac 0x1ff290, ios 0x69; // iOS stub
virtual ~CCKeypadHandler() = mac 0x1ff130, ios 0x2c530; virtual ~CCKeypadHandler() = mac 0x1ff130, ios 0x2c530, win 0xf5f50;
cocos2d::CCKeypadDelegate* getDelegate() = mac 0x1ff0b0; cocos2d::CCKeypadDelegate* getDelegate() = mac 0x1ff0b0;
} }
@ -352,7 +361,7 @@ class cocos2d::CCLabelBMFont {
virtual auto isCascadeColorEnabled() = mac 0x3493c0, ios 0x21aa3c; virtual auto isCascadeColorEnabled() = mac 0x3493c0, ios 0x21aa3c;
virtual auto setCascadeColorEnabled(bool) = mac 0x3493e0, ios 0x21aa4c; virtual auto setCascadeColorEnabled(bool) = mac 0x3493e0, ios 0x21aa4c;
virtual auto setString(unsigned short*, bool) = mac 0x348a60, ios 0x21a4b4; virtual auto setString(unsigned short*, bool) = mac 0x348a60, ios 0x21a4b4;
virtual ~CCLabelBMFont() = mac 0x347e80; virtual ~CCLabelBMFont() = mac 0x347e80, win 0x9be70;
} }
class cocos2d::CCLabelTTF { class cocos2d::CCLabelTTF {
@ -363,7 +372,7 @@ class cocos2d::CCLabelTTF {
} }
class cocos2d::CCLayer { class cocos2d::CCLayer {
CCLayer() = mac 0x2725b0, ios 0xc7708; CCLayer() = mac 0x2725b0, ios 0xc7708, win 0xa15e0;
virtual auto ccTouchBegan(cocos2d::CCTouch*, cocos2d::CCEvent*) = mac 0x2734d0, ios 0xc810c; virtual auto ccTouchBegan(cocos2d::CCTouch*, cocos2d::CCEvent*) = mac 0x2734d0, ios 0xc810c;
virtual auto ccTouchCancelled(cocos2d::CCTouch*, cocos2d::CCEvent*) = mac 0x273650, ios 0xc82ac; virtual auto ccTouchCancelled(cocos2d::CCTouch*, cocos2d::CCEvent*) = mac 0x273650, ios 0xc82ac;
virtual auto ccTouchEnded(cocos2d::CCTouch*, cocos2d::CCEvent*) = mac 0x2735d0, ios 0xc820c; virtual auto ccTouchEnded(cocos2d::CCTouch*, cocos2d::CCEvent*) = mac 0x2735d0, ios 0xc820c;
@ -399,11 +408,11 @@ class cocos2d::CCLayer {
virtual auto setTouchMode(cocos2d::ccTouchesMode) = mac 0x272d60, ios 0xc7acc; virtual auto setTouchMode(cocos2d::ccTouchesMode) = mac 0x272d60, ios 0xc7acc;
virtual auto setTouchPriority(int) = mac 0x272db0, ios 0xc7b30; virtual auto setTouchPriority(int) = mac 0x272db0, ios 0xc7b30;
virtual auto unregisterScriptTouchHandler() = mac 0x272c30, ios 0xc7a28; virtual auto unregisterScriptTouchHandler() = mac 0x272c30, ios 0xc7a28;
~CCLayer() = mac 0x2727b0, ios 0xc7848; virtual ~CCLayer() = mac 0x2727b0, ios 0xc7848, win 0xa1940;
} }
class cocos2d::CCLayerColor { class cocos2d::CCLayerColor {
CCLayerColor() = mac 0x274320, ios 0xc8aec; CCLayerColor() = mac 0x274320, ios 0xc8aec, win 0xa1710;
static cocos2d::CCLayerColor* create(cocos2d::_ccColor4B const&, float, float) = mac 0x2745e0; static cocos2d::CCLayerColor* create(cocos2d::_ccColor4B const&, float, float) = mac 0x2745e0;
static cocos2d::CCLayerColor* create(cocos2d::_ccColor4B const&) = mac 0x2744c0; static cocos2d::CCLayerColor* create(cocos2d::_ccColor4B const&) = mac 0x2744c0;
virtual auto draw() = mac 0x274b50, ios 0xc8fe0; virtual auto draw() = mac 0x274b50, ios 0xc8fe0;
@ -416,11 +425,11 @@ class cocos2d::CCLayerColor {
virtual auto setContentSize(cocos2d::CCSize const&) = mac 0x2749f0, ios 0xc8f64; virtual auto setContentSize(cocos2d::CCSize const&) = mac 0x2749f0, ios 0xc8f64;
virtual auto setOpacity(unsigned char) = mac 0x274db0, ios 0xc9108; virtual auto setOpacity(unsigned char) = mac 0x274db0, ios 0xc9108;
virtual auto updateColor() = mac 0x274ae0, ios 0xc8f80; virtual auto updateColor() = mac 0x274ae0, ios 0xc8f80;
virtual ~CCLayerColor() = mac 0x2743d0, ios 0x2743e0; virtual ~CCLayerColor() = mac 0x2743d0, ios 0x2743e0, win 0xa1a20;
} }
class cocos2d::CCLayerRGBA { class cocos2d::CCLayerRGBA {
CCLayerRGBA() = mac 0x2738d0, ios 0xc85cc; CCLayerRGBA() = mac 0x2738d0, ios 0xc85cc, win 0xa1890;
virtual auto init() = mac 0x273b40, ios 0xc8de8; virtual auto init() = mac 0x273b40, ios 0xc8de8;
virtual auto getOpacity() = mac 0x273be0, ios 0xc8698; virtual auto getOpacity() = mac 0x273be0, ios 0xc8698;
virtual auto getDisplayedOpacity() = mac 0x273c00, ios 0xc8724; virtual auto getDisplayedOpacity() = mac 0x273c00, ios 0xc8724;
@ -436,7 +445,7 @@ class cocos2d::CCLayerRGBA {
virtual auto setCascadeColorEnabled(bool) = mac 0x274250, ios 0xc8adc; virtual auto setCascadeColorEnabled(bool) = mac 0x274250, ios 0xc8adc;
// virtual auto setOpacityModifyRGB(bool) = mac 0x6180, ios 0x68e8; // virtual auto setOpacityModifyRGB(bool) = mac 0x6180, ios 0x68e8;
// virtual auto isOpacityModifyRGB() = mac 0x6190, ios 0x68ec; // virtual auto isOpacityModifyRGB() = mac 0x6190, ios 0x68ec;
virtual ~CCLayerRGBA() = mac 0x273aa0, ios 0xc77b0; virtual ~CCLayerRGBA() = mac 0x273aa0, ios 0xc77b0, win 0xa1b20;
} }
class cocos2d::CCMenu { class cocos2d::CCMenu {
@ -464,7 +473,7 @@ class cocos2d::CCMenu {
class cocos2d::CCMenuItem { class cocos2d::CCMenuItem {
bool initWithTarget(cocos2d::CCObject*, cocos2d::SEL_MenuHandler) = mac 0x1fb7f0; bool initWithTarget(cocos2d::CCObject*, cocos2d::SEL_MenuHandler) = mac 0x1fb7f0;
virtual ~CCMenuItem() = mac 0x1fb8e0, ios 0x2cdf4; virtual ~CCMenuItem() = mac 0x1fb8e0, ios 0x2cdf4, win 0xab9c0;
virtual auto activate() = mac 0x1fba70, ios 0x2ceb0; virtual auto activate() = mac 0x1fba70, ios 0x2ceb0;
virtual auto selected() = mac 0x1fb9e0, ios 0x2ce2e; virtual auto selected() = mac 0x1fb9e0, ios 0x2ce2e;
virtual auto unselected() = mac 0x1fb9f0, ios 0x2ce38; virtual auto unselected() = mac 0x1fb9f0, ios 0x2ce38;
@ -514,6 +523,8 @@ class cocos2d::CCMenuItemSprite {
} }
class cocos2d::CCMotionStreak { class cocos2d::CCMotionStreak {
CCMotionStreak() = win 0xae310;
virtual ~CCMotionStreak() = win 0xae450;
auto reset() = mac 0x2ee190; auto reset() = mac 0x2ee190;
auto resumeStroke() = mac 0x2edb30; auto resumeStroke() = mac 0x2edb30;
auto stopStroke() = mac 0x2edb20; auto stopStroke() = mac 0x2edb20;
@ -529,7 +540,7 @@ class cocos2d::CCMouseDispatcher {
class cocos2d::CCMouseHandler { class cocos2d::CCMouseHandler {
static cocos2d::CCMouseHandler* handlerWithDelegate(cocos2d::CCMouseDelegate*) = mac 0x12ef80; static cocos2d::CCMouseHandler* handlerWithDelegate(cocos2d::CCMouseDelegate*) = mac 0x12ef80;
virtual auto initWithDelegate(cocos2d::CCMouseDelegate*) = mac 0x12ef40, ios 0x43798; virtual auto initWithDelegate(cocos2d::CCMouseDelegate*) = mac 0x12ef40, ios 0x43798;
~CCMouseHandler() = mac 0x12ede0, ios 0x4375c; ~CCMouseHandler() = mac 0x12ede0, ios 0x4375c, win 0xb1fd0;
} }
class cocos2d::CCMoveBy { class cocos2d::CCMoveBy {
@ -541,7 +552,7 @@ class cocos2d::CCMoveTo {
} }
class cocos2d::CCNode { class cocos2d::CCNode {
CCNode() = mac 0x122550; CCNode() = mac 0x122550, win 0x5e7d0;
auto boundingBox() = mac 0x123030; auto boundingBox() = mac 0x123030;
virtual auto _setZOrder(int) = mac 0x122990, ios 0x15dd7c; virtual auto _setZOrder(int) = mac 0x122990, ios 0x15dd7c;
virtual auto addChild(cocos2d::CCNode*) = mac 0x1233d0, ios 0x15e5d4; virtual auto addChild(cocos2d::CCNode*) = mac 0x1233d0, ios 0x15e5d4;
@ -656,12 +667,12 @@ class cocos2d::CCNode {
virtual auto updateTweenAction(float, char const*) = mac 0x1249c0, ios 0x15f644; virtual auto updateTweenAction(float, char const*) = mac 0x1249c0, ios 0x15f644;
virtual auto visit() = mac 0x123850, ios 0x15e978; virtual auto visit() = mac 0x123850, ios 0x15e978;
virtual auto worldToNodeTransform() = mac 0x124710, ios 0x15f51c; virtual auto worldToNodeTransform() = mac 0x124710, ios 0x15f51c;
virtual ~CCNode() = mac 0x122750, ios 0x6c98; virtual ~CCNode() = mac 0x122750, ios 0x6c98, win 0x5ea40;
} }
class cocos2d::CCNodeRGBA { class cocos2d::CCNodeRGBA {
CCNodeRGBA() = mac 0x124b30; CCNodeRGBA() = mac 0x124b30, win 0x5e9d0;
virtual ~CCNodeRGBA() = mac 0x124bb0, ios 0x15f748; virtual ~CCNodeRGBA() = mac 0x124bb0, ios 0x15f748, win 0x5ebb0;
virtual auto init() = mac 0x124bf0, ios 0x15f780; virtual auto init() = mac 0x124bf0, ios 0x15f780;
virtual auto getOpacity() = mac 0x124cd0, ios 0x15f7b8; virtual auto getOpacity() = mac 0x124cd0, ios 0x15f7b8;
virtual auto getDisplayedOpacity() = mac 0x124cf0, ios 0x15f7c8; virtual auto getDisplayedOpacity() = mac 0x124cf0, ios 0x15f7c8;
@ -678,7 +689,7 @@ class cocos2d::CCNodeRGBA {
} }
class cocos2d::CCObject { class cocos2d::CCObject {
CCObject() = mac 0x250ca0, ios 0x43864; CCObject() = mac 0x250ca0, ios 0x43864, win 0x69230;
auto acceptVisitor(cocos2d::CCDataVisitor&) = mac 0x250f30, ios 0x439f0; auto acceptVisitor(cocos2d::CCDataVisitor&) = mac 0x250f30, ios 0x439f0;
auto autorelease() = mac 0x250ed0, ios 0x439b8; auto autorelease() = mac 0x250ed0, ios 0x439b8;
auto canEncode() = mac 0x250f90, ios 0x43a24; auto canEncode() = mac 0x250f90, ios 0x43a24;
@ -689,12 +700,12 @@ class cocos2d::CCObject {
auto retain() = mac 0x250ec0, ios 0x439a8; auto retain() = mac 0x250ec0, ios 0x439a8;
virtual auto setTag(int) = mac 0x250f60, ios 0x43a10; virtual auto setTag(int) = mac 0x250f60, ios 0x43a10;
~CCObject() = mac 0x250d20, ios 0x6ac0; ~CCObject() = mac 0x250d20, ios 0x6ac0, win 0x69270;
} }
class cocos2d::CCParticleSystem { class cocos2d::CCParticleSystem {
CCParticleSystem(); CCParticleSystem() = win 0xb6650;
virtual ~CCParticleSystem(); virtual ~CCParticleSystem() = win 0xb68e0;
virtual auto update(float); virtual auto update(float);
virtual auto draw(); virtual auto draw();
auto initParticle(cocos2d::tCCParticle*); auto initParticle(cocos2d::tCCParticle*);
@ -704,8 +715,8 @@ class cocos2d::CCParticleSystem {
} }
class cocos2d::CCParticleSystemQuad { class cocos2d::CCParticleSystemQuad {
CCParticleSystemQuad(); CCParticleSystemQuad() = win 0xb9bd0;
virtual ~CCParticleSystemQuad(); virtual ~CCParticleSystemQuad() = win 0xb9c10;
static cocos2d::CCParticleSystemQuad* create(char const*) = mac 0x36b000; static cocos2d::CCParticleSystemQuad* create(char const*) = mac 0x36b000;
virtual auto draw(); virtual auto draw();
auto setupVBO(); auto setupVBO();
@ -778,10 +789,10 @@ class cocos2d::CCSequence {
} }
class cocos2d::CCSet { class cocos2d::CCSet {
CCSet() = mac 0x45ad80, ios 0x10e870; CCSet() = mac 0x45ad80, ios 0x10e870, win 0x699e0;
static auto create() = mac 0x45b0b0; static auto create() = mac 0x45b0b0;
auto addObject(cocos2d::CCObject*) = mac 0x45b1f0; auto addObject(cocos2d::CCObject*) = mac 0x45b1f0;
virtual ~CCSet() = mac 0x45b050, ios 0x10ebcc; virtual ~CCSet() = mac 0x45b050, ios 0x10ebcc, win 0x69a80;
virtual auto acceptVisitor(cocos2d::CCDataVisitor&) = mac 0x45b090, ios 0x10ec04; virtual auto acceptVisitor(cocos2d::CCDataVisitor&) = mac 0x45b090, ios 0x10ec04;
auto anyObject() = mac 0x45b410; auto anyObject() = mac 0x45b410;
} }
@ -792,7 +803,7 @@ class cocos2d::CCShaderCache {
} }
class cocos2d::CCSprite { class cocos2d::CCSprite {
virtual ~CCSprite() = mac 0x133430, ios 0x15b92c; virtual ~CCSprite() = mac 0x133430, ios 0x15b92c, win 0xd2f90;
virtual auto init() = mac 0x132ef0, ios 0x15b488; virtual auto init() = mac 0x132ef0, ios 0x15b488;
virtual auto setVertexZ(float) = mac 0x134a80, ios 0x15ccc8; virtual auto setVertexZ(float) = mac 0x134a80, ios 0x15ccc8;
virtual auto setScaleX(float) = mac 0x134900, ios 0x15cb3c; virtual auto setScaleX(float) = mac 0x134900, ios 0x15cb3c;
@ -852,7 +863,7 @@ class cocos2d::CCSprite {
virtual auto setReorderChildDirtyRecursively() = mac 0x134550, ios 0x15c764; virtual auto setReorderChildDirtyRecursively() = mac 0x134550, ios 0x15c764;
virtual auto setDirtyRecursively(bool) = mac 0x1345b0, ios 0x15c7cc; virtual auto setDirtyRecursively(bool) = mac 0x1345b0, ios 0x15c7cc;
CCSprite() = mac 0x133300, ios 0x15b82c; CCSprite() = mac 0x133300, ios 0x15b82c, win 0xd2eb0;
static cocos2d::CCSprite* create() = mac 0x132df0; static cocos2d::CCSprite* create() = mac 0x132df0;
static cocos2d::CCSprite* create(char const*) = mac 0x132a80; static cocos2d::CCSprite* create(char const*) = mac 0x132a80;
@ -871,7 +882,7 @@ class cocos2d::CCSpriteBatchNode {
auto getUsedAtlasCapacity() = mac 0xbc6b0; auto getUsedAtlasCapacity() = mac 0xbc6b0;
auto increaseAtlasCapacity(unsigned int) = mac 0xbc670; auto increaseAtlasCapacity(unsigned int) = mac 0xbc670;
virtual ~CCSpriteBatchNode() = mac 0xbb790, ios 0x130d18; virtual ~CCSpriteBatchNode() = mac 0xbb790, ios 0x130d18, win 0xd5580;
virtual auto init() = mac 0xbb680, ios 0x130c20; virtual auto init() = mac 0xbb680, ios 0x130c20;
virtual auto addChild(cocos2d::CCNode*) = mac 0xbbb40, ios 0x131034; virtual auto addChild(cocos2d::CCNode*) = mac 0xbbb40, ios 0x131034;
@ -904,7 +915,7 @@ class cocos2d::CCSpriteFrameCache {
class cocos2d::CCStandardTouchHandler { class cocos2d::CCStandardTouchHandler {
static cocos2d::CCStandardTouchHandler* handlerWithDelegate(cocos2d::CCTouchDelegate*, int) = mac 0x247f30; static cocos2d::CCStandardTouchHandler* handlerWithDelegate(cocos2d::CCTouchDelegate*, int) = mac 0x247f30;
virtual auto initWithDelegate(cocos2d::CCTouchDelegate*, int) = mac 0x247ed0, ios 0x69; // iOS stub virtual auto initWithDelegate(cocos2d::CCTouchDelegate*, int) = mac 0x247ed0, ios 0x69; // iOS stub
~CCStandardTouchHandler() = mac 0x2482a0, ios 0x6d28; ~CCStandardTouchHandler() = mac 0x2482a0, ios 0x6d28, win 0xf5a40;
} }
class cocos2d::CCString { class cocos2d::CCString {
@ -925,13 +936,13 @@ class cocos2d::CCString {
class cocos2d::CCTargetedTouchHandler { class cocos2d::CCTargetedTouchHandler {
static cocos2d::CCTargetedTouchHandler* handlerWithDelegate(cocos2d::CCTouchDelegate*, int, bool) = mac 0x248010; static cocos2d::CCTargetedTouchHandler* handlerWithDelegate(cocos2d::CCTouchDelegate*, int, bool) = mac 0x248010;
auto initWithDelegate(cocos2d::CCTouchDelegate*, int, bool) = mac 0x2480f0, ios 0x69; // iOS stub auto initWithDelegate(cocos2d::CCTouchDelegate*, int, bool) = mac 0x2480f0, ios 0x69; // iOS stub
~CCTargetedTouchHandler() = mac 0x248180, ios 0x6cec; ~CCTargetedTouchHandler() = mac 0x248180, ios 0x6cec, win 0xf59a0;
} }
class cocos2d::CCTexture2D { class cocos2d::CCTexture2D {
~CCTexture2D() = mac 0x246350; CCTexture2D() = mac 0x246280, win 0xe9300;
CCTexture2D() = mac 0x246280; ~CCTexture2D() = mac 0x246350, win 0xe93f0;
auto getContentSize() = mac 0x246460; auto getContentSize() = mac 0x246460;
auto getMaxS() = mac 0x2464e0; auto getMaxS() = mac 0x2464e0;
auto getMaxT() = mac 0x246500; auto getMaxT() = mac 0x246500;
@ -954,8 +965,8 @@ class cocos2d::CCTexture2D {
} }
class cocos2d::CCTextureAtlas { class cocos2d::CCTextureAtlas {
CCTextureAtlas(); CCTextureAtlas() = win 0xea680;
virtual ~CCTextureAtlas(); virtual ~CCTextureAtlas() = win 0xea6c0;
auto drawNumberOfQuads(unsigned int, unsigned int); auto drawNumberOfQuads(unsigned int, unsigned int);
auto mapBuffers(); auto mapBuffers();
} }

View file

@ -97,9 +97,14 @@ class AppDelegate : cocos2d::CCApplication, cocos2d::CCSceneDelegate {
void resumeSound() = win 0x3d4d0; void resumeSound() = win 0x3d4d0;
void setupGLView() = win 0x3c950; void setupGLView() = win 0x3c950;
bool m_unk0;
bool m_unk1;
cocos2d::CCScene* m_runningScene; cocos2d::CCScene* m_runningScene;
bool m_loadingFinished; bool m_loadingFinished;
// there's 0x18 more on Windows bool m_unk2;
bool m_unk3;
bool m_use16BitFormatForColorPicker;
bool m_unk4;
} }
class ArtistCell : TableViewCell { class ArtistCell : TableViewCell {
@ -451,8 +456,65 @@ class CCMenuItemToggler : cocos2d::CCMenuItem {
} }
class CCMoveCNode : cocos2d::CCNode { class CCMoveCNode : cocos2d::CCNode {
static CCMoveCNode* create() = mac 0x1842a0; static CCMoveCNode* create() = mac 0x1842a0, win 0x121c70;
~CCMoveCNode() = mac 0x18b2c0; ~CCMoveCNode() = mac 0x18b2c0;
float m_staticMoveX;
float m_staticMoveY;
float m_staticRotation;
bool m_lockObjectRotation;
int m_parentGroupId;
bool m_forceUpdate;
int m_unk104;
float m_followXMod;
float m_followYMod;
bool m_unk110;
float m_optimizedMoveX;
float m_optimizedMoveY;
float m_optimizedRotation;
float m_playerFollowSpeed;
float m_playerFollowDelay;
float m_playerFollowOffset;
float m_playerFollowMaxSpeed;
GroupCommandObject* m_followCommand;
}
class GroupCommandObject : cocos2d::CCNode {
// too lazy to re rn
// the ints are definitely real members but idk their types
cocos2d::CCPoint m_ec;
int m_f4;
int m_f8;
int m_fc;
int m_100;
int m_104;
int m_108;
cocos2d::CCPoint m_10c;
cocos2d::CCPoint m_114;
cocos2d::CCPoint m_11c;
int m_124;
int m_128;
int m_12c;
int m_130;
int m_134;
bool m_138;
float m_13c;
float m_140;
bool m_144;
int m_148;
int m_14c;
int m_150;
int m_154;
int m_158;
int m_15c;
cocos2d::CCPoint m_160;
cocos2d::CCPoint m_168;
int m_170;
int m_174;
int m_178;
int m_17c;
int m_180;
bool m_184;
} }
class CCNodeContainer : cocos2d::CCNode { class CCNodeContainer : cocos2d::CCNode {
@ -2163,12 +2225,12 @@ class GJEffectManager : cocos2d::CCNode {
cocos2d::CCDictionary* m_followActions; cocos2d::CCDictionary* m_followActions;
cocos2d::CCArray* m_spawnActions; cocos2d::CCArray* m_spawnActions;
cocos2d::CCArray* m_moveActions; cocos2d::CCArray* m_moveActions;
cocos2d::CCArray* m_f1c28; cocos2d::CCArray* m_groupCommands; // array of GroupCommandObject
cocos2d::CCNode* m_f1c30; cocos2d::CCNode* m_f1c30;
cocos2d::CCDictionary* m_f1c38; cocos2d::CCDictionary* m_moveNodes; // dict of CCMoveCNode
cocos2d::CCDictionary* m_f1c40; cocos2d::CCDictionary* m_rotationNodes; // dict of CCMoveCNode
cocos2d::CCDictionary* m_f1c48; cocos2d::CCDictionary* m_followNodes; // dict of CCMoveCNode
cocos2d::CCDictionary* m_f1c50; cocos2d::CCDictionary* m_playerFollowNodes; // dict of CCMoveCNode
float m_time; float m_time;
float m_velocity; float m_velocity;
float m_acceleration; float m_acceleration;
@ -3250,6 +3312,7 @@ class GameObject : CCSpritePlus {
bool m_hasBeenActivatedP2; bool m_hasBeenActivatedP2;
bool m_hasDetailColor; bool m_hasDetailColor;
bool m_isPulseStick; bool m_isPulseStick;
bool m_hasOrientedBox;
int m_linkedGroup; int m_linkedGroup;
bool m_isSaw; bool m_isSaw;
int m_customRotateSpeed; int m_customRotateSpeed;
@ -3316,7 +3379,7 @@ class GameObject : CCSpritePlus {
float m_realOpacity; float m_realOpacity;
GJSpriteColor* m_baseColor; GJSpriteColor* m_baseColor;
GJSpriteColor* m_detailColor; GJSpriteColor* m_detailColor;
int m_unknown420; int m_unknown420;
ZLayer m_defaultZLayer; ZLayer m_defaultZLayer;
ZLayer m_zLayer; ZLayer m_zLayer;
int m_gameZOrder; int m_gameZOrder;
@ -3340,14 +3403,27 @@ class GameObject : CCSpritePlus {
int m_unk414; int m_unk414;
PAD = mac 0xc, win 0xc; PAD = mac 0xc, win 0xc;
cocos2d::CCPoint m_firstPosition; cocos2d::CCPoint m_firstPosition;
PAD = mac 0x15, win 0x15; bool m_unk42C;
bool m_unk42D;
PAD = mac 0x6, win 0x6;
bool m_isAnimated;
PAD = mac 0x7, win 0x7;
bool m_hasEffectLine;
bool m_specialUnk43d;
PAD = mac 0x1, win 0x1;
bool m_hasDurationLine;
bool m_isTriggerable; bool m_isTriggerable;
bool m_triggeredInEditor;
PAD = mac 0x6, win 0x6; PAD = mac 0x6, win 0x6;
bool m_highDetail; bool m_highDetail;
ColorActionSprite* m_colorActionSpriteBase; ColorActionSprite* m_colorActionSpriteBase;
ColorActionSprite* m_colorActionSpriteDetail; ColorActionSprite* m_colorActionSpriteDetail;
GJEffectManager* m_effectManager; GJEffectManager* m_effectManager;
PAD = mac 0xc, win 0xc; bool m_unk458;
bool m_unk459;
bool m_unk45A;
bool m_wasForcedRotatedPositionUpdateIdk;
PAD = mac 0x8, win 0x8;
bool m_orbMultiActivate; bool m_orbMultiActivate;
} }

View file

@ -4,7 +4,7 @@
[project] [project]
name = "Geode" name = "Geode"
version = "v1.0.0-beta" version = "v1.0.0"
repository = "https://github.com/geode-sdk/geode" repository = "https://github.com/geode-sdk/geode"
tree = "https://github.com/geode-sdk/geode/tree/main" tree = "https://github.com/geode-sdk/geode/tree/main"
icon = "loader/resources/logos/geode-circle.png" icon = "loader/resources/logos/geode-circle.png"
@ -60,4 +60,4 @@ build-args = [
] ]
# The file we use to get all the include paths and such # The file we use to get all the include paths and such
infer-args-from = "loader/src/main.cpp" infer-args-from = "loader/src/load.cpp"

View file

@ -348,13 +348,13 @@ public:
protected: protected:
virtual void mainLoop(void) {} virtual void mainLoop(void) {}
public:
/** The size in pixels of the surface. It could be different than the screen size. /** The size in pixels of the surface. It could be different than the screen size.
High-res devices might have a higher surface size than the screen size. High-res devices might have a higher surface size than the screen size.
Only available when compiled using SDK >= 4.0. Only available when compiled using SDK >= 4.0.
@since v0.99.4 @since v0.99.4
*/ */
void setContentScaleFactor(float scaleFactor); void setContentScaleFactor(float scaleFactor);
public:
inline float getContentScaleFactor(void) { return m_fContentScaleFactor; } inline float getContentScaleFactor(void) { return m_fContentScaleFactor; }
RT_ADD( RT_ADD(

View file

@ -5,6 +5,7 @@
#include "CCStdC.h" #include "CCStdC.h"
#include "../CCCommon.h" #include "../CCCommon.h"
#include "../CCApplicationProtocol.h" #include "../CCApplicationProtocol.h"
#include "CCControllerHandler.h"
#include <string> #include <string>
NS_CC_BEGIN NS_CC_BEGIN
@ -47,6 +48,11 @@ public:
virtual void setupGLView(); virtual void setupGLView();
virtual void platformShutdown(); virtual void platformShutdown();
void toggleVerticalSync(bool); void toggleVerticalSync(bool);
RT_ADD(
void setupVerticalSync();
void updateVerticalSync();
void updateControllerKeys();
)
/** /**
* Sets the Resource root path. * Sets the Resource root path.
@ -71,18 +77,18 @@ public:
HINSTANCE m_hInstance; HINSTANCE m_hInstance;
HACCEL m_hAccelTable; HACCEL m_hAccelTable;
LARGE_INTEGER m_nAnimationInterval; LARGE_INTEGER m_nAnimationInterval;
PAD(8); LARGE_INTEGER m_nVsyncInterval;
std::string m_resourceRootPath; std::string m_resourceRootPath;
std::string m_startupScriptFilename; std::string m_startupScriptFilename;
void* m_pUnknown; CCControllerHandler* m_pControllerHandler;
bool m_bUpdateController; bool m_bUpdateController;
CC_SYNTHESIZE_NV(bool, m_bShutdownCalled, ShutdownCalled); CC_SYNTHESIZE_NV(bool, m_bShutdownCalled, ShutdownCalled);
INPUT m_iInput; INPUT m_iInput;
CCPoint m_obUnknown1; CCPoint m_obLeftThumb;
CCPoint m_obUnknown2; CCPoint m_obRightThumb;
bool m_bMouseControl; bool m_bMouseControl;
float m_fOldAnimationInterval;
float m_fAnimationInterval; float m_fAnimationInterval;
float m_fVsyncInterval;
CC_SYNTHESIZE_READONLY_NV(bool, m_bVerticalSyncEnabled, VerticalSyncEnabled); CC_SYNTHESIZE_READONLY_NV(bool, m_bVerticalSyncEnabled, VerticalSyncEnabled);
CC_SYNTHESIZE_READONLY_NV(bool, m_bControllerConnected, ControllerConnected); CC_SYNTHESIZE_READONLY_NV(bool, m_bControllerConnected, ControllerConnected);
CC_SYNTHESIZE_NV(bool, m_bSleepMode, SleepMode); CC_SYNTHESIZE_NV(bool, m_bSleepMode, SleepMode);

View 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

View 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

View file

@ -95,6 +95,7 @@ public:
float getFrameZoomFactor(); float getFrameZoomFactor();
RT_REMOVE( virtual void centerWindow(); ) RT_REMOVE( virtual void centerWindow(); )
RT_ADD( void centerWindow(); ) RT_ADD( void centerWindow(); )
RT_ADD( bool windowShouldClose(); )
RT_ADD( void showCursor(bool state); ) RT_ADD( void showCursor(bool state); )
@ -169,7 +170,7 @@ public:
RT_ADD( RT_ADD(
CC_SYNTHESIZE_NV(CCSize, m_obWindowedSize, WindowedSize); CC_SYNTHESIZE_NV(CCSize, m_obWindowedSize, WindowedSize);
) )
protected:
RT_ADD( RT_ADD(
float m_fMouseX; float m_fMouseX;
float m_fMouseY; float m_fMouseY;
@ -178,6 +179,7 @@ protected:
bool m_bShouldCallGLFinish; bool m_bShouldCallGLFinish;
) )
protected:
RT_ADD( RT_ADD(
void onGLFWCharCallback(GLFWwindow* window, unsigned int entered); void onGLFWCharCallback(GLFWwindow* window, unsigned int entered);
void onGLFWCursorEnterFunCallback(GLFWwindow* window, int entered); void onGLFWCursorEnterFunCallback(GLFWwindow* window, int entered);

View file

@ -53,7 +53,7 @@ namespace geode {
template<class T, class N> template<class T, class N>
concept InheritsEnterLayer = std::is_base_of_v<EnterLayerEvent<N>, T>; concept InheritsEnterLayer = std::is_base_of_v<EnterLayerEvent<N>, T>;
template<class N, InheritsEnterLayer<N> T> template<class N, InheritsEnterLayer<N> T = EnterLayerEvent<N>>
class EnterLayerFilter : public EventFilter<EnterLayerEvent<N>> { class EnterLayerFilter : public EventFilter<EnterLayerEvent<N>> {
public: public:
using Callback = void(T*); using Callback = void(T*);

View file

@ -1,2 +1 @@
#include <Windows.h> __declspec(dllexport) void fake() { }
__declspec(dllexport) DWORD WINAPI loadGeode(void* arg) { return 0; }

View file

@ -5,23 +5,10 @@
#pragma comment(linker, "/export:XInputSetState=xinput1_4.XInputSetState") #pragma comment(linker, "/export:XInputSetState=xinput1_4.XInputSetState")
#pragma comment(linker, "/export:XInputGetCapabilities=xinput1_4.XInputGetCapabilities") #pragma comment(linker, "/export:XInputGetCapabilities=xinput1_4.XInputGetCapabilities")
__declspec(dllimport) void fake();
DWORD XInputGetDSoundAudioDeviceGuids(DWORD user, GUID* render, GUID* capture) { DWORD XInputGetDSoundAudioDeviceGuids(DWORD user, GUID* render, GUID* capture) {
fake();
return ERROR_BAD_ARGUMENTS; return ERROR_BAD_ARGUMENTS;
} }
#pragma comment(linker, "/export:XInputGetDSoundAudioDeviceGuids=_XInputGetDSoundAudioDeviceGuids") #pragma comment(linker, "/export:XInputGetDSoundAudioDeviceGuids=_XInputGetDSoundAudioDeviceGuids")
__declspec(dllimport) DWORD WINAPI loadGeode(void*);
BOOL WINAPI DllMain(HINSTANCE module, DWORD reason, LPVOID _) {
if (reason == DLL_PROCESS_ATTACH) {
// Prevents threads from notifying this DLL on creation or destruction.
// Kind of redundant for a game that isn't multi-threaded but will provide
// some slight optimizations if a mod frequently creates and deletes threads.
DisableThreadLibraryCalls(module);
DWORD code = loadGeode(module);
if (code != 0)
return FALSE;
}
return TRUE;
}

View file

@ -42,7 +42,7 @@ int WINAPI gdMainHook(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd
return reinterpret_cast<decltype(&wWinMain)>(geode::base::get() + 0x260ff8)(hInstance, hPrevInstance, lpCmdLine, nCmdShow); return reinterpret_cast<decltype(&wWinMain)>(geode::base::get() + 0x260ff8)(hInstance, hPrevInstance, lpCmdLine, nCmdShow);
} }
extern "C" __declspec(dllexport) DWORD WINAPI loadGeode(void* arg) { bool loadGeode() {
auto process = GetCurrentProcess(); auto process = GetCurrentProcess();
auto patchAddr = reinterpret_cast<void*>(geode::base::get() + 0x260ff8); auto patchAddr = reinterpret_cast<void*>(geode::base::get() + 0x260ff8);
@ -59,19 +59,11 @@ extern "C" __declspec(dllexport) DWORD WINAPI loadGeode(void* arg) {
}; };
DWORD oldProtect; DWORD oldProtect;
if (VirtualProtectEx(process, patchAddr, patchLength, PAGE_EXECUTE_READWRITE, &oldProtect)) { if (!VirtualProtectEx(process, patchAddr, patchLength, PAGE_EXECUTE_READWRITE, &oldProtect))
std::memcpy(patchAddr, patchBytes, patchLength); return false;
VirtualProtectEx(process, patchAddr, patchLength, oldProtect, &oldProtect); std::memcpy(patchAddr, patchBytes, patchLength);
} else { VirtualProtectEx(process, patchAddr, patchLength, oldProtect, &oldProtect);
LoaderImpl::get()->platformMessageBox( return true;
"Unable to Load Geode!",
"There was an unknown fatal error hooking "
"the GD main function and Geode can not be loaded."
);
return 1;
}
return 0;
} }
DWORD WINAPI upgradeThread(void*) { DWORD WINAPI upgradeThread(void*) {
@ -79,18 +71,45 @@ DWORD WINAPI upgradeThread(void*) {
return 0; return 0;
} }
BOOL WINAPI DllMain(HINSTANCE module, DWORD reason, LPVOID) { void earlyError(std::string message) {
if (reason == DLL_PROCESS_ATTACH) { // try to write a file and display a message box
DisableThreadLibraryCalls(module); // wine might not display the message box but *should* write a file
std::ofstream fout("_geode_early_error.txt");
fout << message;
fout.close();
LoaderImpl::get()->platformMessageBox("Unable to Load Geode!", message);
}
extern "C" __declspec(dllexport) void fake() { }
BOOL WINAPI DllMain(HINSTANCE module, DWORD reason, LPVOID) {
if (reason != DLL_PROCESS_ATTACH)
return TRUE;
// Prevents threads from notifying this DLL on creation or destruction.
// Kind of redundant for a game that isn't multi-threaded but will provide
// some slight optimizations if a mod frequently creates and deletes threads.
DisableThreadLibraryCalls(module);
try {
// if we find the old bootstrapper dll, don't load geode, copy new updater and let it do the rest // if we find the old bootstrapper dll, don't load geode, copy new updater and let it do the rest
auto workingDir = dirs::getGameDir(); auto workingDir = dirs::getGameDir();
auto error = std::error_code(); std::error_code error;
if (ghc::filesystem::exists(workingDir / "GeodeBootstrapper.dll", error) && !error) bool oldBootstrapperExists = ghc::filesystem::exists(workingDir / "GeodeBootstrapper.dll", error);
CreateThread(nullptr, 0, upgradeThread, nullptr, 0, nullptr); if (error) {
if (error) earlyError("There was an error checking whether the old GeodeBootstrapper.dll exists: " + error.message());
return FALSE; return FALSE;
}
else if (oldBootstrapperExists)
CreateThread(nullptr, 0, upgradeThread, nullptr, 0, nullptr);
else if (!loadGeode()) {
earlyError("There was an unknown error hooking the GD main function.");
return FALSE;
}
} }
catch(...) {
earlyError("There was an unknown error somewhere very very early and this is really really bad.");
return FALSE;
}
return TRUE; return TRUE;
} }

View file

@ -2,6 +2,9 @@
#ifdef GEODE_IS_WINDOWS #ifdef GEODE_IS_WINDOWS
GEODE_MEMBER_CHECK(cocos2d::CCApplication, m_fVsyncInterval, 0x8c);
GEODE_MEMBER_CHECK(AppDelegate, m_runningScene, 0xa0);
GEODE_MEMBER_CHECK(GameObject, m_effectPlistName, 0x278); GEODE_MEMBER_CHECK(GameObject, m_effectPlistName, 0x278);
GEODE_MEMBER_CHECK(GameObject, m_effectManager, 0x454); GEODE_MEMBER_CHECK(GameObject, m_effectManager, 0x454);
GEODE_MEMBER_CHECK(GameObject, m_firstPosition, 0x424); GEODE_MEMBER_CHECK(GameObject, m_firstPosition, 0x424);
@ -53,4 +56,4 @@ static_assert(sizeof(GJBaseGameLayer) == 0x2cc);
GEODE_MEMBER_CHECK(AudioEffectsLayer, m_unk19C, 0x19c); GEODE_MEMBER_CHECK(AudioEffectsLayer, m_unk19C, 0x19c);
#endif #endif