├── .gitignore ├── README.md ├── manager_nodes ├── GJEffectManager.h ├── GameToolbox.h ├── LocalLevelManager.h ├── GJAccountManager.h ├── GManager.h ├── MusicDownloadManager.h ├── GameSoundManager.h ├── GameStatsManager.h ├── ObjectToolbox.h ├── AchievementManager.h ├── GameLevelManager.h ├── GJUserScore.h └── GameManager.h ├── audio_nodes ├── FMODSound.h └── FMODAudioEngine.h ├── layers_scenes_transitions_nodes ├── OBB2D.h ├── NumberInputLayer.h ├── ProfilePage.h ├── CCBlockLayer.h ├── GJSpecialColorSelect.h ├── SetIDPopup.h ├── LevelInfoLayer.h ├── TextAlertPopup.h ├── PauseLayer.h ├── GJListLayer.h ├── CCNodeContainer.h ├── LoadingCircle.h ├── MenuLayer.h ├── UploadActionPopup.h ├── LevelEditorLayer.h ├── SongInfoLayer.h ├── CustomSongWidget.h ├── GJGarageLayer.h ├── LoadingLayer.h ├── CustomSongLayer.h ├── OptionsLayer.h ├── GJDropDownLayer.h ├── FLAlertLayer.h ├── EditorUI.h ├── GJBaseGameLayer.h └── PlayLayer.h ├── sprite_nodes ├── ColorActionSprite.h ├── GJRobotSprite.h ├── GJSpiderSprite.h ├── TextArea.h ├── HardStreak.h ├── AnimatedShopKeeper.h ├── CCAnimatedSprite.h ├── GJSpriteColor.h ├── ButtonSprite.h ├── GJItemIcon.h ├── PlayerObject.h ├── CCSpritePlus.h ├── SimplePlayer.h └── GameObject.h ├── include ├── GDProtocols.h ├── gdMacros.h └── gd.h ├── other_nodes ├── PointNode.h ├── CheckpointObject.h └── PlayerCheckpoint.h ├── scroll_nodes ├── CCContentLayer.h ├── CCIndexPath.h ├── ScrollingLayer.h ├── CustomListView.h ├── BoomListView.h ├── CCScrollLayerExt.h └── TableView.h ├── achievement_nodes ├── AchievementBar.h └── AchievementNotifier.h ├── level_nodes ├── LevelSettingsObject.h ├── ColorAction.h ├── SongInfoObject.h ├── GJSearchObject.h └── GJGameLevel.h ├── menu_nodes ├── CCMenuItemSpriteExtra.h ├── CCMenuItemToggler.h └── Slider.h ├── actions └── CCCircleWave.h ├── LICENSE ├── text_input_nodes └── CCTextInputNode.h └── delegates └── delegates.h /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is a port of the gd.h for android 2 | 3 | https://github.com/matcool/gd.h 4 | https://github.com/poweredbypie/gd.h 5 | -------------------------------------------------------------------------------- /manager_nodes/GJEffectManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __GJEFFECTMANAGER_H__ 2 | #define __GJEFFECTMANAGER_H__ 3 | 4 | #include 5 | 6 | class GJEffectManager : public cocos2d::CCNode { 7 | }; 8 | 9 | 10 | #endif -------------------------------------------------------------------------------- /audio_nodes/FMODSound.h: -------------------------------------------------------------------------------- 1 | #ifndef __FMODSOUND_H__ 2 | #define __FMODSOUND_H__ 3 | 4 | #include 5 | 6 | class FMODSound : public cocos2d::CCNode { 7 | public: 8 | FMOD::Sound* m_pSound; 9 | }; 10 | 11 | 12 | #endif -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/OBB2D.h: -------------------------------------------------------------------------------- 1 | #ifndef __OBB2D_H__ 2 | #define __OBB2D_H__ 3 | 4 | #include 5 | 6 | 7 | class OBB2D : public cocos2d::CCNode { 8 | // todo 9 | }; 10 | 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /sprite_nodes/ColorActionSprite.h: -------------------------------------------------------------------------------- 1 | #ifndef __COLORACTIONSPRITE_H__ 2 | #define __COLORACTIONSPRITE_H__ 3 | 4 | #include 5 | 6 | class ColorActionSprite : public cocos2d::CCNode { 7 | 8 | }; 9 | 10 | 11 | #endif -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/NumberInputLayer.h: -------------------------------------------------------------------------------- 1 | #ifndef NUMBERINPUTLAYER_H 2 | #define NUMBERINPUTLAYER_H 3 | 4 | #include 5 | 6 | 7 | class NumberInputLayer : public FLAlertLayer { 8 | 9 | }; 10 | 11 | 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/ProfilePage.h: -------------------------------------------------------------------------------- 1 | #ifndef __PROFILEPAGE_H__ 2 | #define __PROFILEPAGE_H__ 3 | 4 | #include 5 | 6 | 7 | class ProfilePage : public FLAlertLayer { 8 | // todo 9 | }; 10 | 11 | 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /sprite_nodes/GJRobotSprite.h: -------------------------------------------------------------------------------- 1 | #ifndef __GJROBOTSPRITE_H__ 2 | #define __GJROBOTSPRITE_H__ 3 | 4 | #include 5 | 6 | 7 | class CCAnimatedSprite; 8 | 9 | class GJRobotSprite : public CCAnimatedSprite { 10 | 11 | }; 12 | 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /sprite_nodes/GJSpiderSprite.h: -------------------------------------------------------------------------------- 1 | #ifndef __GJSPIDERSPRITE_H__ 2 | #define __GJSPIDERSPRITE_H__ 3 | 4 | #include 5 | 6 | 7 | class GJRobotSprite; 8 | 9 | class GJSpiderSprite : public GJRobotSprite { 10 | 11 | }; 12 | 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /include/GDProtocols.h: -------------------------------------------------------------------------------- 1 | #ifndef __GDPROTOCOLS_H__ 2 | #define __GDPROTOCOLS_H__ 3 | 4 | #include 5 | 6 | class FLAlertLayer; 7 | 8 | class FLAlertLayerProtocol { 9 | public: 10 | virtual void FLAlert_Clicked(FLAlertLayer*, bool btn2) {}; 11 | }; 12 | 13 | 14 | #endif -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/CCBlockLayer.h: -------------------------------------------------------------------------------- 1 | #ifndef __CCBLOCKLAYER_H__ 2 | #define __CCBLOCKLAYER_H__ 3 | 4 | #include 5 | 6 | class CCBlockLayer : public cocos2d::CCLayerColor { 7 | protected: 8 | bool m_bUnknown; 9 | bool m_bUnknown2; 10 | }; 11 | 12 | #endif -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/GJSpecialColorSelect.h: -------------------------------------------------------------------------------- 1 | #ifndef __GJSPECIALCOLORSELECT_H__ 2 | #define __GJSPECIALCOLORSELECT_H__ 3 | 4 | #include 5 | 6 | 7 | class GJSpecialColorSelect : public FLAlertLayer { 8 | // todo 9 | }; 10 | 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/SetIDPopup.h: -------------------------------------------------------------------------------- 1 | #ifndef SETIDPOPUP_H 2 | #define SETIDPOPUP_H 3 | 4 | #include 5 | 6 | class TextInputDelegate; 7 | 8 | class SetIDPopup : public FLAlertLayer, public TextInputDelegate { 9 | // todo 10 | }; 11 | 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /manager_nodes/GameToolbox.h: -------------------------------------------------------------------------------- 1 | #ifndef __GAMETOOLBOX_H__ 2 | #define __GAMETOOLBOX_H__ 3 | 4 | #include 5 | #include 6 | 7 | 8 | class GameToolbox 9 | { 10 | public: 11 | static std::string getResponse(cocos2d::extension::CCHttpResponse * response); 12 | 13 | }; 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /other_nodes/PointNode.h: -------------------------------------------------------------------------------- 1 | #ifndef __POINTNODE_H__ 2 | #define __POINTNODE_H__ 3 | 4 | #include 5 | 6 | class PointNode : public cocos2d::CCObject { 7 | public: 8 | cocos2d::CCPoint m_point; 9 | 10 | static PointNode* create(cocos2d::CCPoint point); 11 | }; 12 | 13 | 14 | #endif -------------------------------------------------------------------------------- /scroll_nodes/CCContentLayer.h: -------------------------------------------------------------------------------- 1 | #ifndef __CCCONTENTLAYER_H__ 2 | #define __CCCONTENTLAYER_H__ 3 | 4 | #include 5 | 6 | class CCContentLayer : public cocos2d::CCLayerColor { 7 | //no members 8 | public: 9 | static CCContentLayer* create(const cocos2d::ccColor4B& color, float width, float height); 10 | }; 11 | 12 | 13 | #endif -------------------------------------------------------------------------------- /scroll_nodes/CCIndexPath.h: -------------------------------------------------------------------------------- 1 | #ifndef __CCINDEXPATH_H__ 2 | #define __CCINDEXPATH_H__ 3 | 4 | #include 5 | 6 | class CCIndexPath : public cocos2d::CCObject { 7 | protected: 8 | int m_nUnknown1; 9 | int m_nUnknown2; 10 | 11 | public: 12 | static CCIndexPath* create(unsigned int idk1, int idk2) ; 13 | }; 14 | 15 | 16 | #endif -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/LevelInfoLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by marco on 30/06/2021. 3 | // 4 | 5 | #ifndef _LEVELINFOLAYER_H 6 | #define _LEVELINFOLAYER_H 7 | 8 | #include 9 | 10 | class LevelInfoLayer : public cocos2d::CCLayer { 11 | public: 12 | static LevelInfoLayer * create(GJGameLevel*); 13 | 14 | 15 | }; 16 | 17 | 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/TextAlertPopup.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEXTALERTPOPUP_H__ 2 | #define __TEXTALERTPOPUP_H__ 3 | 4 | #include 5 | 6 | #define __cdecl 7 | using skip_t = char; 8 | 9 | class TextAlertPopup : public cocos2d::CCNode { 10 | public: 11 | static TextAlertPopup* create(std::string _text, float _time, float _scale) ; 12 | }; 13 | 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /sprite_nodes/TextArea.h: -------------------------------------------------------------------------------- 1 | #ifndef __TEXTAREA_H__ 2 | #define __TEXTAREA_H__ 3 | 4 | #include 5 | 6 | #pragma runtime_checks("s", off) 7 | class TextArea : public cocos2d::CCSprite { 8 | protected: 9 | PAD(0x58); 10 | 11 | public: 12 | static TextArea* create(const char* font, bool unknown, 13 | std::string caption, float scale, float width, float height); 14 | }; 15 | #pragma runtime_checks("s", restore) 16 | 17 | 18 | #endif -------------------------------------------------------------------------------- /achievement_nodes/AchievementBar.h: -------------------------------------------------------------------------------- 1 | #ifndef __ACHIEVEMENTBAR_H__ 2 | #define __ACHIEVEMENTBAR_H__ 3 | 4 | #include 5 | 6 | #pragma runtime_checks("s", off) 7 | class AchievementBar : public cocos2d::CCNodeRGBA { 8 | protected: 9 | PAD(0x24); 10 | 11 | public: 12 | static AchievementBar* create(const char* title, 13 | const char* desc, const char* icon, bool quest); 14 | }; 15 | #pragma runtime_checks("s", restore) 16 | 17 | 18 | #endif -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/PauseLayer.h: -------------------------------------------------------------------------------- 1 | #ifndef __PAUSELAYER_H__ 2 | #define __PAUSELAYER_H__ 3 | 4 | #include 5 | 6 | 7 | class CCBlockLayer; 8 | 9 | class PauseLayer : public CCBlockLayer { 10 | protected: 11 | bool m_bUnknown; 12 | bool m_bUnknown2; 13 | 14 | public: 15 | void createToggleButton(cocos2d::SEL_MenuHandler callback, bool on, 16 | cocos2d::CCMenu* menu, std::string caption, cocos2d::CCPoint pos) ; 17 | }; 18 | 19 | 20 | #endif -------------------------------------------------------------------------------- /scroll_nodes/ScrollingLayer.h: -------------------------------------------------------------------------------- 1 | #ifndef __SCROLLINGLAYER_H__ 2 | #define __SCROLLINGLAYER_H__ 3 | 4 | #include 5 | 6 | class ScrollingLayer : public cocos2d::CCLayerColor { 7 | public: 8 | PAD(0x28) 9 | float m_fLayerHeight; 10 | PAD(0x4) 11 | cocos2d::CCLayer * m_pScrollLayer; 12 | cocos2d::CCNode* m_pParent; 13 | 14 | static ScrollingLayer * create(cocos2d::CCSize _size, cocos2d::CCPoint _point, float _unknown); 15 | }; 16 | 17 | 18 | #endif -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/GJListLayer.h: -------------------------------------------------------------------------------- 1 | #ifndef __GJLISTLAYER_H__ 2 | #define __GJLISTLAYER_H__ 3 | 4 | #include "gd.h" 5 | 6 | #pragma runtime_checks("s", off) 7 | class GJListLayer : public cocos2d::CCLayerColor { 8 | protected: 9 | CCObject* m_pTarget; 10 | 11 | public: 12 | static GJListLayer* create(CCObject* target, const char* title, cocos2d::ccColor4B color, float width, float height) ; 13 | }; 14 | #pragma runtime_checks("s", restore) 15 | 16 | 17 | #endif -------------------------------------------------------------------------------- /manager_nodes/LocalLevelManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __LOCALLEVELMANAGER_H__ 2 | #define __LOCALLEVELMANAGER_H__ 3 | 4 | #include 5 | 6 | 7 | class LocalLevelManager : public cocos2d::CCNode { 8 | public: 9 | PAD(0x1C); 10 | cocos2d::CCDictionary* m_loadData; // seems to be just LoadData.plist 11 | cocos2d::CCDictionary* m_levelData; // level strings for all the main levels 12 | cocos2d::CCArray* m_localLevels; 13 | }; 14 | 15 | 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/CCNodeContainer.h: -------------------------------------------------------------------------------- 1 | #ifndef __CCNODECONTAINER_H__ 2 | #define __CCNODECONTAINER_H__ 3 | 4 | #include 5 | 6 | class CCNodeContainer : public cocos2d::CCNode { 7 | protected: 8 | // literally no extra fields or anything, just 9 | // these 3 methods 10 | 11 | bool init(); 12 | 13 | public: 14 | void visit(); 15 | 16 | static CCNodeContainer* create(); 17 | }; 18 | 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /level_nodes/LevelSettingsObject.h: -------------------------------------------------------------------------------- 1 | #ifndef __LEVELSETTINGSOBJECT_H__ 2 | #define __LEVELSETTINGSOBJECT_H__ 3 | 4 | #include 5 | 6 | class GJEffectManager; 7 | class GJGameLevel; 8 | 9 | class LevelSettingsObject : public cocos2d::CCNode { 10 | public: 11 | GJEffectManager* m_effectManager; 12 | PAD(9); 13 | bool m_twoPlayerMode; 14 | PAD(26); 15 | GJGameLevel* m_level; 16 | std::string m_unknownStr1; 17 | }; 18 | 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /sprite_nodes/HardStreak.h: -------------------------------------------------------------------------------- 1 | #ifndef __HARDSTREAK_H__ 2 | #define __HARDSTREAK_H__ 3 | 4 | #include 5 | 6 | class HardStreak : public cocos2d::CCDrawNode { 7 | public: 8 | cocos2d::CCArray* m_pointsArr; // 0x011C 9 | cocos2d::CCPoint m_currentPoint; // 0x0120 where the wave is at rn 10 | float m_waveSize; // 0x0128 bad name but its 1.0 for regular and 0.6 mini 11 | float m_pulseSize; // 0x012C 12 | bool m_isSolid; // 0x0130 13 | }; // size = 0x134 14 | 15 | 16 | #endif -------------------------------------------------------------------------------- /manager_nodes/GJAccountManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __GJACCOUNTMANAGER_H__ 2 | #define __GJACCOUNTMANAGER_H__ 3 | 4 | #include 5 | 6 | class GJAccountManager : public cocos2d::CCNode { 7 | protected: 8 | PAD(0x4) 9 | std::string m_sPassword; 10 | std::string m_sUsername; 11 | 12 | public: 13 | static GJAccountManager* sharedState(); 14 | 15 | const char* getPassword(); 16 | const char* getUsername() ; 17 | }; 18 | 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /manager_nodes/GManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __GMANAGER_H__ 2 | #define __GMANAGER_H__ 3 | 4 | #include 5 | 6 | class DS_Dictionary; 7 | 8 | 9 | class GManager : public cocos2d::CCNode { 10 | protected: 11 | std::string m_sFileName; 12 | bool m_bSetup; 13 | bool m_bSaved; 14 | 15 | public: 16 | std::string getSaveString(); 17 | void save(); 18 | virtual void setup() ; 19 | virtual void encodeDataTo(DS_Dictionary* data) {} 20 | virtual void dataLoaded(DS_Dictionary* data) {} 21 | virtual void firstLoad() {} 22 | }; 23 | 24 | 25 | #endif -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/LoadingCircle.h: -------------------------------------------------------------------------------- 1 | #ifndef __LOADINGCIRCLE_H__ 2 | #define __LOADINGCIRCLE_H__ 3 | 4 | #include 5 | 6 | class LoadingCircle : public cocos2d::CCLayerColor { 7 | protected: 8 | cocos2d::CCSprite* m_pSprite; 9 | cocos2d::CCLayer* m_pParentLayer; 10 | bool m_bFade; 11 | 12 | public: 13 | static LoadingCircle* create(); 14 | void show(); 15 | void setParentLayer(cocos2d::CCLayer* layer) { m_pParentLayer = layer; } 16 | void setFade(bool fade) { m_bFade = fade; } 17 | void fadeAndRemove() ; 18 | }; 19 | 20 | 21 | #endif -------------------------------------------------------------------------------- /menu_nodes/CCMenuItemSpriteExtra.h: -------------------------------------------------------------------------------- 1 | #ifndef __CCMENUITEMSPRITEEXTRA_H__ 2 | #define __CCMENUITEMSPRITEEXTRA_H__ 3 | 4 | #include 5 | 6 | #pragma runtime_checks("s", off) 7 | class CCMenuItemSpriteExtra : public cocos2d::CCMenuItemSprite { 8 | protected: 9 | float m_fUnknown; 10 | float m_fUnknown2; 11 | 12 | public: 13 | static CCMenuItemSpriteExtra *create(CCNode *normalSprite, CCNode *selectedSprite, CCObject *target, cocos2d::SEL_MenuHandler selector); 14 | void setSizeMult(float mult); 15 | }; 16 | #pragma runtime_checks("s", restore) 17 | 18 | 19 | #endif -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/MenuLayer.h: -------------------------------------------------------------------------------- 1 | #ifndef __MENULAYER_H__ 2 | #define __MENULAYER_H__ 3 | 4 | #include 5 | 6 | class FLAlertLayerProtocol; 7 | 8 | class MenuLayer : public cocos2d::CCLayer, public FLAlertLayerProtocol, public GooglePlayDelegate { 9 | public: 10 | static MenuLayer* node(); 11 | static cocos2d::CCScene* scene(bool options) ; 12 | virtual bool init(); 13 | virtual void keyBackClicked(); 14 | virtual void keyDown(cocos2d::enumKeyCodes key) ; 15 | virtual void googlePlaySignedIn(); 16 | virtual void FLAlert_Clicked(FLAlertLayer* alert, bool btn2); 17 | }; 18 | 19 | 20 | #endif -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/UploadActionPopup.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by marco on 30/06/2021. 3 | // 4 | 5 | #ifndef _UPLOADACTIONPOPUP_H 6 | #define _UPLOADACTIONPOPUP_H 7 | 8 | #pragma runtime_checks("s", off) 9 | class UploadActionPopup : public FLAlertLayer { 10 | public: 11 | static UploadActionPopup* create(UploadPopupDelegate*,std::string); 12 | bool init(UploadPopupDelegate*,std::string); 13 | 14 | void showSuccessMessage(std::string); 15 | void showFailMessage(std::string); 16 | void closePopup(); 17 | 18 | }; 19 | #pragma runtime_checks("s", restore) 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /sprite_nodes/AnimatedShopKeeper.h: -------------------------------------------------------------------------------- 1 | #ifndef __ANIMATEDSHOPKEEPER_H__ 2 | #define __ANIMATEDSHOPKEEPER_H__ 3 | 4 | #include 5 | 6 | 7 | class CCAnimatedSprite; 8 | 9 | typedef enum { 10 | kShopTypeNormal, 11 | kShopTypeSecret, 12 | kShopTypeCommunity 13 | } ShopType; 14 | 15 | class AnimatedShopKeeper : public CCAnimatedSprite { 16 | protected: 17 | float m_fUnknown1; 18 | float m_fUnknown2; 19 | bool m_bUnknown; 20 | 21 | public: 22 | static AnimatedShopKeeper* create(ShopType type) ; 23 | void startAnimating() ; 24 | //own vtable 25 | virtual void animationFinished(const char*) {} 26 | }; 27 | 28 | 29 | #endif -------------------------------------------------------------------------------- /achievement_nodes/AchievementNotifier.h: -------------------------------------------------------------------------------- 1 | #ifndef __ACHIEVEMENTNOTIFIER_H__ 2 | #define __ACHIEVEMENTNOTIFIER_H__ 3 | 4 | #include 5 | 6 | 7 | class AchievementBar; 8 | 9 | class AchievementNotifier : public cocos2d::CCNode { 10 | protected: 11 | cocos2d::CCScene* m_pCurrentScene; 12 | cocos2d::CCArray* m_pQueue; 13 | AchievementBar* m_pCurrentAchievement; 14 | 15 | public: 16 | static AchievementNotifier* sharedState(); 17 | void showNextAchievement(); 18 | //this is inlined on win32 so let's reconstruct it 19 | void notifyAchievement(const char* title, const char* desc, const char* icon, bool quest); 20 | }; 21 | 22 | 23 | #endif -------------------------------------------------------------------------------- /level_nodes/ColorAction.h: -------------------------------------------------------------------------------- 1 | #ifndef __COLORACTION_H__ 2 | #define __COLORACTION_H__ 3 | 4 | #include 5 | 6 | class ColorActionSprite; 7 | 8 | class ColorAction : public cocos2d::CCNode { 9 | public: 10 | PAD(12); 11 | cocos2d::ccColor3B m_color; 12 | PAD(5); 13 | float m_unk100; 14 | bool m_blending; //0x0104 15 | PAD(3); 16 | int m_playerColor; //0x0108 17 | int m_unk10C; 18 | float m_opacity; //0x0110 19 | float m_unk114; 20 | PAD(28); 21 | ColorActionSprite* m_colorSprite; //0x0134 22 | PAD(12); 23 | }; 24 | 25 | 26 | #endif -------------------------------------------------------------------------------- /manager_nodes/MusicDownloadManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __MUSICDOWNLOADMANAGER_H__ 2 | #define __MUSICDOWNLOADMANAGER_H__ 3 | 4 | #include 5 | 6 | class MusicDownloadManager : public cocos2d::CCNode { 7 | public: 8 | PAD(4); 9 | cocos2d::CCDictionary* m_unknownDict; 10 | cocos2d::CCArray* m_unknownArr; // list of MusicDelegateHandler s 11 | cocos2d::CCDictionary* m_songsDict; 12 | 13 | static MusicDownloadManager* sharedState(); 14 | static std::string pathForSong(int id) ; 15 | 16 | cocos2d::CCArray* getDownloadedSongs(); 17 | void songStateChanged() ; 18 | }; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/LevelEditorLayer.h: -------------------------------------------------------------------------------- 1 | #ifndef __LEVELEDITORLAYER_H__ 2 | #define __LEVELEDITORLAYER_H__ 3 | 4 | #include 5 | 6 | class GJBaseGameLayer; 7 | class EditorUI; 8 | class GameObject; 9 | 10 | class LevelEditorLayer : public GJBaseGameLayer { 11 | public: 12 | PAD(0x84) 13 | int m_currentLayer; 14 | PAD(0x2c) 15 | EditorUI* m_editorUI; 16 | 17 | void removeObject(GameObject * obj, bool idk); 18 | 19 | int getNextFreeGroupID(cocos2d::CCArray* objs); 20 | 21 | GameObject* addObjectFromString(std::string const& str) ; 22 | }; 23 | 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /sprite_nodes/CCAnimatedSprite.h: -------------------------------------------------------------------------------- 1 | #ifndef __CCANIMATEDSPRITE_H__ 2 | #define __CCANIMATEDSPRITE_H__ 3 | 4 | #include 5 | 6 | class CCAnimatedSprite : public cocos2d::CCSprite { 7 | protected: 8 | std::string m_sUnknown1; 9 | std::string m_sUnknown2; 10 | PAD(20); 11 | std::string m_sUnknown3; 12 | PAD(4); 13 | 14 | public: 15 | static CCAnimatedSprite* create(const char* file) ; 16 | 17 | //own vtable 18 | virtual void animationFinished(const char*) {} 19 | virtual void animationFinishedO(cocos2d::CCObject*) {} 20 | }; 21 | 22 | class AnimatedSpriteDelegate { 23 | virtual void animationFinished(const char*); 24 | }; 25 | 26 | #endif -------------------------------------------------------------------------------- /sprite_nodes/GJSpriteColor.h: -------------------------------------------------------------------------------- 1 | #ifndef __GJSPRITECOLOR_H__ 2 | #define __GJSPRITECOLOR_H__ 3 | 4 | #include 5 | 6 | class GJSpriteColor : public cocos2d::CCNode { 7 | public: 8 | int colorID; //0x00EC 9 | int defaultColorID; //0x00F0 10 | float unk_0F4; 11 | float hue; //0x00F8 12 | float saturation; //0x00FC 13 | float brightness; //0x0100 14 | bool saturationChecked; //0x0104 15 | bool brightnessChecked; //0x0105 16 | PAD(2); 17 | bool unk_108; 18 | PAD(3); 19 | float unk_10C; 20 | bool unk_110; 21 | PAD(3); 22 | }; 23 | 24 | 25 | #endif -------------------------------------------------------------------------------- /level_nodes/SongInfoObject.h: -------------------------------------------------------------------------------- 1 | #ifndef __SONGINFOOBJECT_H__ 2 | #define __SONGINFOOBJECT_H__ 3 | 4 | #include 5 | #include 6 | 7 | class LevelSettingsObject; 8 | 9 | class SongInfoObject : public cocos2d::CCNode { 10 | public: 11 | int m_songID; 12 | std::string m_songName; 13 | std::string m_artistName; 14 | std::string m_youtubeVideo; // unsure 15 | std::string m_youtubeChannel; 16 | std::string m_songURL; 17 | int m_artistID; 18 | float m_fileSize; 19 | bool m_unknownSong; 20 | int m_priority; 21 | LevelSettingsObject* m_levelSettings; 22 | }; 23 | 24 | #endif -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/SongInfoLayer.h: -------------------------------------------------------------------------------- 1 | #ifndef __SONGINFOLAYER_H__ 2 | #define __SONGINFOLAYER_H__ 3 | 4 | #include 5 | 6 | class FLAlertLayer; 7 | 8 | class SongInfoLayer : public FLAlertLayer { 9 | public: 10 | std::string m_downloadLink; 11 | std::string m_artistNewgrounds; 12 | std::string m_artistYoutube; 13 | std::string m_artistFacebook; 14 | 15 | static SongInfoLayer* create(int songID); 16 | static SongInfoLayer* create(std::string songName, std::string artistName, std::string downloadLink, std::string artistNG, std::string artistYT, std::string artistFB) ; 17 | }; 18 | 19 | 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /manager_nodes/GameSoundManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __GAMESOUNDMANAGER_H__ 2 | #define __GAMESOUNDMANAGER_H__ 3 | 4 | #include 5 | 6 | class GameSoundManager : public cocos2d::CCNode { 7 | protected: 8 | cocos2d::CCDictionary* m_pDictionary1; 9 | cocos2d::CCDictionary* m_pDictionary2; 10 | PAD(12); 11 | bool m_bPreloaded; 12 | PAD(4); 13 | std::string m_sFilePath; 14 | 15 | public: 16 | static GameSoundManager* sharedState() ; 17 | static void playSound(std::string sName) ; 18 | void playBackgroundMusic(std::string path, bool idk, bool idk2) ; 19 | void playBackgroundMusic(bool idk, std::string path); 20 | void stopBackgroundMusic() ; 21 | }; 22 | 23 | 24 | #endif -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/CustomSongWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef __CUSTOMSONGWIDGET_H__ 2 | #define __CUSTOMSONGWIDGET_H__ 3 | 4 | #include 5 | 6 | class FLAlertLayer; 7 | class FLAlertLayerProtocol; 8 | class SongInfoObject; 9 | 10 | class CustomSongWidget : public cocos2d::CCNode, MusicDownloadDelegate, FLAlertLayerProtocol { 11 | public: 12 | SongInfoObject* m_songInfo; 13 | 14 | void updateSongObject(SongInfoObject* song) ; 15 | 16 | virtual void FLAlert_Clicked(FLAlertLayer*, bool); 17 | // too lazy to type out all of them 18 | virtual void loadSongInfoFinished(SongInfoObject*); 19 | }; 20 | 21 | 22 | #endif 23 | 24 | -------------------------------------------------------------------------------- /include/gdMacros.h: -------------------------------------------------------------------------------- 1 | #ifndef __GDMACROS_H__ 2 | #define __GDMACROS_H__ 3 | 4 | /** __STR_CAT__(str) 5 | * Concatenate 2 tokens. Don't use this. 6 | */ 7 | #define __STR_CAT___(str1, str2) str1##str2 8 | #define __STR_CAT__(str1, str2) __STR_CAT___(str1, str2) 9 | 10 | /** PAD 11 | * Add padding to a class / struct. For shifting classes / 12 | * structs to be aligned, if too lazy to fully reverse. 13 | * 14 | * Based on line number, to be standard C / C++ compatible. 15 | */ 16 | #define PAD(size) char __STR_CAT__(__, __STR_CAT__(pad, __LINE__))[size] = {}; 17 | 18 | /** __WARN_DEBUG__ 19 | * Set this macro to 0 to disable warnings when compiling in debug. 20 | */ 21 | #define __WARN_DEBUG__ true 22 | 23 | #endif -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/GJGarageLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by marco on 30/06/2021. 3 | // 4 | 5 | #ifndef _GJGARAGELAYER_H 6 | #define _GJGARAGELAYER_H 7 | 8 | #pragma runtime_checks("s", off) 9 | class GJGarageLayer : public cocos2d::CCLayer, TextInputDelegate, FLAlertLayerProtocol /*, GameRateDelegate, ListButtonBarDelegate, DialogDelegate */ { 10 | public: 11 | static cocos2d::CCScene *scene(); 12 | static GJGarageLayer *node(); 13 | void updatePlayerSelect(cocos2d::CCNode* pushedBtn); 14 | void updateColorSelect(cocos2d::CCNode* pushedBtn, bool); 15 | void updatePlayerColors(); 16 | }; 17 | #pragma runtime_checks("s", restore) 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /actions/CCCircleWave.h: -------------------------------------------------------------------------------- 1 | #ifndef __CCCIRCLEWAVE_H__ 2 | #define __CCCIRCLEWAVE_H__ 3 | 4 | #include 5 | 6 | #pragma runtime_checks("s", off) 7 | class CCCircleWave : public cocos2d::CCNode { 8 | protected: 9 | cocos2d::CCArray* m_pArray; //idk what this is tho 10 | PAD(4); 11 | float m_fFrom1; //? 12 | float m_fFrom2; //? 13 | cocos2d::ccColor3B m_cColor; 14 | cocos2d::CCPoint m_obUnknown; 15 | //more that im too lazy to figure out lol 16 | 17 | public: 18 | static CCCircleWave* create(bool fade1, bool fade2, float from, float to, float duration); 19 | void setColor(cocos2d::ccColor3B color) { m_cColor = color; } 20 | }; 21 | #pragma runtime_checks("s", restore) 22 | 23 | 24 | #endif -------------------------------------------------------------------------------- /scroll_nodes/CustomListView.h: -------------------------------------------------------------------------------- 1 | #ifndef __CUSTOMLISTVIEW_H__ 2 | #define __CUSTOMLISTVIEW_H__ 3 | 4 | #include 5 | 6 | 7 | class BoomListView; 8 | 9 | #pragma runtime_checks("s", off) 10 | class CustomListView : public BoomListView { 11 | //no members 12 | protected: 13 | CustomListView(); 14 | virtual bool init(cocos2d::CCArray* entries, int type, float width, float height); 15 | 16 | public: 17 | static CustomListView* create(cocos2d::CCArray* entries, int type, float width, float height); 18 | 19 | virtual void setupList() ; 20 | virtual TableViewCell* getListCell(const char* key) ; 21 | virtual void loadCell(TableViewCell* cell, unsigned int index) ; 22 | }; 23 | #pragma runtime_checks("s", restore) 24 | 25 | 26 | #endif -------------------------------------------------------------------------------- /menu_nodes/CCMenuItemToggler.h: -------------------------------------------------------------------------------- 1 | #ifndef __CCMENUITEMTOGGLER_H__ 2 | #define __CCMENUITEMTOGGLER_H__ 3 | 4 | #include 5 | 6 | 7 | class CCMenuItemSpriteExtra; 8 | 9 | #pragma runtime_checks("s", off) 10 | class CCMenuItemToggler : public cocos2d::CCMenuItem { 11 | protected: 12 | CCMenuItemSpriteExtra* m_pOnButton; 13 | CCMenuItemSpriteExtra* m_pOffButton; 14 | bool m_bOn; 15 | bool m_bUnknown; 16 | 17 | public: 18 | static CCMenuItemToggler* create(cocos2d::CCNode* off, cocos2d::CCNode* on, 19 | cocos2d::CCObject* target, cocos2d::SEL_MenuHandler callback); 20 | void setSizeMult(float mult); 21 | //my own function 22 | inline bool isOn() { return m_bOn; } 23 | void toggle(bool on); 24 | }; 25 | #pragma runtime_checks("s", restore) 26 | 27 | 28 | #endif -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/LoadingLayer.h: -------------------------------------------------------------------------------- 1 | #ifndef __LOADINGLAYER_H__ 2 | #define __LOADINGLAYER_H__ 3 | 4 | #include 5 | 6 | class LoadingLayer : public cocos2d::CCLayer { 7 | protected: 8 | PAD(4); 9 | int m_nLoadIndex; 10 | cocos2d::CCLabelBMFont* m_pCaption; 11 | PAD(4); 12 | //artifacts of rob debugging something 13 | cocos2d::CCSprite* m_pSliderBar; 14 | float m_fSliderGrooveXPos; 15 | PAD(4); 16 | bool m_bFromRefresh; 17 | 18 | public: 19 | static LoadingLayer* create(bool fromReload) ; 20 | void setFromRefresh(bool value) { 21 | m_bFromRefresh = value; 22 | } 23 | 24 | void setWillFadeIn(bool willFadeIn) { 25 | *reinterpret_cast( 26 | reinterpret_cast(this) + 0x138 27 | ) = willFadeIn; 28 | } 29 | }; 30 | 31 | #endif -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/CustomSongLayer.h: -------------------------------------------------------------------------------- 1 | #ifndef __CUSTOMSONGLAYER_H__ 2 | #define __CUSTOMSONGLAYER_H__ 3 | 4 | #include 5 | 6 | class FLAlertLayer; 7 | class FLAlertLayerProtocol; 8 | class TextInputDelegate; 9 | class GJDropDownLayerDelegate; 10 | class LevelSettingsObject; 11 | class CCTextInputNode; 12 | class CustomSongWidget; 13 | class LevelSettingsLayer; 14 | class SongInfoObject; 15 | 16 | class CustomSongLayer : public FLAlertLayer, FLAlertLayerProtocol, TextInputDelegate, GJDropDownLayerDelegate { 17 | public: 18 | LevelSettingsObject* m_levelSettings; 19 | CCTextInputNode* m_songIDInput; 20 | CustomSongWidget* m_songWidget; 21 | LevelSettingsLayer* m_levelSettingsLayer; 22 | }; 23 | 24 | 25 | #endif -------------------------------------------------------------------------------- /other_nodes/CheckpointObject.h: -------------------------------------------------------------------------------- 1 | #ifndef __CHECKPOINTOBJECT_H__ 2 | #define __CHECKPOINTOBJECT_H__ 3 | 4 | #include 5 | 6 | class GameObject; 7 | class PlayerCheckpoint; 8 | 9 | class CheckpointObject : public cocos2d::CCNode { 10 | public: 11 | GameObject* m_gameObject; // 0x0EC 12 | PlayerCheckpoint* m_player1; // 0x0F0 13 | PlayerCheckpoint* m_player2; // 0x0F4 14 | bool m_isDual; // 0x0F8 15 | bool m_isFlipped; // 0x0F9 16 | cocos2d::CCPoint m_cameraPos; // 0x0FC unsure 17 | int unk104; // comes from playlayer + 2ac 18 | GameObject* m_lastPortal; // 0x108 19 | PAD(4); 20 | double unk110; 21 | std::string m_currentStateString; 22 | std::string m_objectsStateString; 23 | }; 24 | 25 | 26 | #endif -------------------------------------------------------------------------------- /sprite_nodes/ButtonSprite.h: -------------------------------------------------------------------------------- 1 | #ifndef __BUTTONSPRITE_H__ 2 | #define __BUTTONSPRITE_H__ 3 | 4 | #include 5 | 6 | #pragma runtime_checks("s", off) 7 | class ButtonSprite : public cocos2d::CCSprite { 8 | public: 9 | /*PARAMS: 10 | * caption - the button's caption. 11 | * width - the width of the button. only used if absolute is TRUE. 12 | * absolute - whether or not to use provided width. if FALSE, game will auto-adjust. 13 | * font - font file for caption. 14 | * texture - texture file for button background. 15 | * height - height of button. put 0 for auto. 16 | * scale - scale of the caption. 17 | */ 18 | static ButtonSprite* create(const char* caption, int width, bool absolute, 19 | const char* font, const char* texture, float height, float scale) ; 20 | }; 21 | #pragma runtime_checks("s", restore) 22 | 23 | 24 | #endif -------------------------------------------------------------------------------- /other_nodes/PlayerCheckpoint.h: -------------------------------------------------------------------------------- 1 | #ifndef __PLAYERCHECKPOINT_H__ 2 | #define __PLAYERCHECKPOINT_H__ 3 | 4 | #include 5 | 6 | class PlayerCheckpoint : public cocos2d::CCNode { 7 | public: 8 | cocos2d::CCPoint m_position; 9 | float m_yAccel; // 0x0F4 10 | bool m_isUpsideDown; // 0x0F8 11 | bool m_isShip; // 0x0F9 12 | bool m_isBall; // 0x0FA 13 | bool m_isUFO; // 0x0FB 14 | bool m_isWave; // 0x0FC 15 | bool m_isRobot; // 0x0FD 16 | bool m_isSpider; // 0x0FE 17 | bool m_isOnGround; // 0x0FF 18 | bool m_hasGhostTrail; // 0x100 this actually takes up 4 bytes for some reason, maybe rob has it as an int 19 | PAD(3); 20 | bool m_small; // 0x104 21 | float m_speed; // 0x108 22 | bool m_hidden; // 0x10C 23 | }; 24 | 25 | #endif -------------------------------------------------------------------------------- /manager_nodes/GameStatsManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by marco on 30/06/2021. 3 | // 4 | 5 | #ifndef _GAMESTATSMANAGER_H 6 | #define _GAMESTATSMANAGER_H 7 | 8 | #include 9 | 10 | class GJRewardItem; 11 | 12 | 13 | enum GJRewardType{ 14 | 15 | }; 16 | 17 | class GameStatsManager : public cocos2d::CCNode { 18 | public: 19 | cocos2d::CCDictionary *value_0; 20 | 21 | 22 | static GameStatsManager * sharedState(); 23 | GameStatsManager * setStat(const char *,int); 24 | int getBaseCurrency(int,bool,int); 25 | int checkAchievement(const char*); 26 | 27 | void collectReward(GJRewardType,GJRewardItem *); 28 | 29 | void storeRewardState(GJRewardType,int,int,std::string); 30 | 31 | void registerRewardsFromItem(GJRewardItem*); 32 | inline cocos2d::CCDictionary* getDict(){ return value_0;} 33 | 34 | 35 | 36 | }; 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /sprite_nodes/GJItemIcon.h: -------------------------------------------------------------------------------- 1 | #ifndef __GJITEMICON_H__ 2 | #define __GJITEMICON_H__ 3 | 4 | #include 5 | 6 | class GJItemIcon : public cocos2d::CCSprite { 7 | public: 8 | static GJItemIcon* create( 9 | UnlockType _type, 10 | int _id, 11 | cocos2d::_ccColor3B _col1, 12 | cocos2d::_ccColor3B _col2, 13 | bool _un0, 14 | bool _un1, 15 | bool _un2, 16 | cocos2d::_ccColor3B _col3 17 | ); 18 | 19 | static GJItemIcon* createBrowserIcon(UnlockType _type, int _id) { 20 | return GJItemIcon::create(_type, _id, 21 | { 0xaf, 0xaf, 0xaf }, { 0xff, 0xff, 0xff }, 22 | false, true, true, 23 | { 0xff, 0xff, 0xff } 24 | ); 25 | } 26 | }; 27 | 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/OptionsLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by marco on 30/06/2021. 3 | // 4 | 5 | #ifndef _OPTIONSLAYER_H 6 | #define _OPTIONSLAYER_H 7 | 8 | 9 | 10 | 11 | #include 12 | 13 | 14 | class OptionsLayer : public GJDropDownLayer, public FLAlertLayerProtocol { 15 | public: 16 | ~OptionsLayer(); 17 | 18 | static OptionsLayer *create(); 19 | 20 | 21 | cocos2d::CCMenu *menu_; 22 | void onSupport(); 23 | void onRate(); 24 | void onSoundtracks(); 25 | void onHelp(); 26 | void onMusic(); 27 | void onFX(); 28 | void onGC(); 29 | 30 | bool goToSupport_; 31 | bool goToSongs_; 32 | void exitLayer(); 33 | 34 | virtual void customSetup(); 35 | virtual void layerHidden(); 36 | virtual void FLAlert_Clicked(FLAlertLayer *layer, bool accept); 37 | 38 | }; 39 | 40 | 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /manager_nodes/ObjectToolbox.h: -------------------------------------------------------------------------------- 1 | #ifndef __OBJECTTOOLBOX_H__ 2 | #define __OBJECTTOOLBOX_H__ 3 | 4 | #include 5 | 6 | class ObjectToolbox : public cocos2d::CCNode { 7 | public: 8 | cocos2d::CCDictionary* m_frameToKey; 9 | cocos2d::CCDictionary* m_keyToFrame; 10 | PAD(4); 11 | 12 | static auto sharedState() ; 13 | 14 | cocos2d::CCArray* allKeys() ; 15 | 16 | const char* frameToKey(const char* frame); 17 | 18 | const char* intKeyToFrame(int key); 19 | 20 | const char* keyToFrame(const char* key) { 21 | return intKeyToFrame(atoi(key)); 22 | } 23 | 24 | static float gridNodeSizeForKey(int key) ; 25 | 26 | static const char* perspectiveBlockFrame(int key) ; 27 | 28 | // custom funcs 29 | 30 | void addObject(int id, const char* frame) { 31 | m_frameToKey->setObject(cocos2d::CCString::createWithFormat("%i", id), frame); 32 | m_keyToFrame->setObject(cocos2d::CCString::create(frame), id); 33 | } 34 | }; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /audio_nodes/FMODAudioEngine.h: -------------------------------------------------------------------------------- 1 | #ifndef __FMODAUDIOENGINE_H__ 2 | #define __FMODAUDIOENGINE_H__ 3 | 4 | #include 5 | 6 | class FMODAudioEngine : public cocos2d::CCNode { 7 | public: 8 | cocos2d::CCDictionary* m_pDictionary; 9 | std::string m_sFilePath; 10 | float m_fBackgroundMusicVolume; 11 | float m_fEffectsVolume; 12 | float m_fPulse1; 13 | float m_fPulse2; 14 | float m_fPulse3; 15 | int m_nPulseCounter; 16 | bool m_bMetering; 17 | bool m_bFading; 18 | bool m_bFadeIn; 19 | float m_fFadeInDuration; 20 | FMOD::System* m_pSystem; 21 | FMOD::Sound* m_pSound; 22 | FMOD::Channel* m_pCurrentSoundChannel; 23 | FMOD::Channel* m_pGlobalChannel; 24 | FMOD::DSP* m_pDSP; 25 | FMOD_RESULT m_eLastResult; 26 | int m_nVersion; 27 | void* m_pExtraDriverData; 28 | int m_nMusicOffset; 29 | 30 | public: 31 | static FMODAudioEngine * sharedEngine(); 32 | void playBackgroundMusic(std::string,bool,bool); 33 | void playEffect(std::string, bool, float, float, float); 34 | void stop(); 35 | void start(); 36 | void reloadEffects(); 37 | void resumeAllEffects(); 38 | }; 39 | 40 | 41 | #endif -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 poweredbypie 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /scroll_nodes/BoomListView.h: -------------------------------------------------------------------------------- 1 | #ifndef __BOOMLISTVIEW_H__ 2 | #define __BOOMLISTVIEW_H__ 3 | 4 | #include 5 | 6 | 7 | class TableViewDelegate; 8 | class TableViewDataSource; 9 | class TableView; 10 | class TableViewCell; 11 | 12 | class BoomListView : public cocos2d::CCLayer, public TableViewDelegate, public TableViewDataSource { 13 | protected: 14 | TableView* m_pTableView; 15 | cocos2d::CCArray* m_pEntries; 16 | int m_eType; //? probably wrong type 17 | float m_fWidth; 18 | float m_fHeight; 19 | PAD(8); 20 | 21 | public: 22 | //TableViewDelegate vtable 23 | virtual float cellHeightForRowAtIndexPath(CCIndexPath& path, TableView* view) ; 24 | 25 | //TableViewDataSource vtable 26 | virtual unsigned int numberOfRowsInSection(unsigned int section, TableView* view); 27 | virtual TableViewCell* cellForRowAtIndexPath(CCIndexPath& path, TableView* view); 28 | 29 | //own vtable 30 | virtual void setupList() ; 31 | virtual TableViewCell* getListCell(const char* key); 32 | virtual void loadCell(TableViewCell* cell, unsigned int index); 33 | 34 | virtual void didSelectRowAtIndexPath(CCIndexPath&, TableView*) {} 35 | }; 36 | 37 | 38 | #endif -------------------------------------------------------------------------------- /sprite_nodes/PlayerObject.h: -------------------------------------------------------------------------------- 1 | #ifndef __PLAYEROBJECT_H__ 2 | #define __PLAYEROBJECT_H__ 3 | 4 | #include 5 | 6 | class GameObject; 7 | class AnimatedSpriteDelegate; 8 | class GJRobotSprite; 9 | class GJSpiderSprite; 10 | class HardStreak; 11 | 12 | class PlayerObject : public GameObject, public AnimatedSpriteDelegate { 13 | public: 14 | PAD(24); 15 | PAD(12); 16 | PAD(40); 17 | PAD(36); 18 | PAD(12); 19 | PAD(40); 20 | PAD(8); 21 | PAD(188); 22 | PAD(104); 23 | cocos2d::CCPoint position; //0x067C 24 | PAD(4); 25 | double unk_0688; 26 | PAD(12); 27 | float yVelMaybeCantChangeItThough; //0x069C 28 | PAD(4); 29 | float last200YPositions[200]; //0x06A4 30 | PAD(28); 31 | 32 | 33 | virtual void setVisible(bool visible) ; 34 | void pushButton(int button); 35 | void releaseButton(int button) ; 36 | bool playerIsFalling() ; 37 | void runRotateAction(); 38 | void playBurstEffect() ; 39 | void spiderTestJump(bool param1) ; 40 | void incrementJumps(); 41 | void flipGravity(bool param1, bool param2) ; 42 | bool isFlying(); 43 | 44 | bool isShipMode(){ 45 | return *((bool*)((long)this + 1528)); 46 | } 47 | 48 | }; 49 | 50 | 51 | #endif -------------------------------------------------------------------------------- /manager_nodes/AchievementManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __ACHIEVEMENTMANAGER_H__ 2 | #define __ACHIEVEMENTMANAGER_H__ 3 | 4 | #include 5 | 6 | class AchievementManager : public cocos2d::CCNode { 7 | protected: 8 | PAD(16); 9 | cocos2d::CCDictionary* m_pAchievements; 10 | PAD(4); 11 | 12 | public: 13 | static AchievementManager * sharedState(); 14 | cocos2d::CCArray * getAllAchievements(); 15 | AchievementManager(); 16 | bool init(); 17 | void firstSetup(); 18 | void notifyAchievementWithID(const char* identifier); 19 | void notifyAchievement(char const* title,char const* desc,char const* icon); 20 | bool areAchievementsEarned(cocos2d::CCArray *); 21 | bool isAchievementEarned(char const* identifier); 22 | int percentForAchievement(char const* identifier); 23 | int percentageForCount(int,int); //?? 24 | void reportAchievementWithID(char const* identifier,int percentage,bool hidePopup); 25 | void reportPlatformAchievementWithID(char const*,int); //?? 26 | void resetAchievement(char const* identifier); 27 | void resetAchievements(void); 28 | void setReportedAchievements(cocos2d::CCDictionary *); 29 | void setup(); 30 | void storeAchievementUnlocks(); 31 | ~AchievementManager(); 32 | }; 33 | 34 | 35 | #endif -------------------------------------------------------------------------------- /scroll_nodes/CCScrollLayerExt.h: -------------------------------------------------------------------------------- 1 | #ifndef __CCSCROLLLAYEREXT_H__ 2 | #define __CCSCROLLLAYEREXT_H__ 3 | 4 | #include 5 | 6 | 7 | class CCContentLayer; 8 | 9 | class CCScrollLayerExt : public cocos2d::CCLayer { 10 | protected: 11 | PAD(4); 12 | cocos2d::CCPoint m_obUnknown1; 13 | cocos2d::CCPoint m_obUnknown2; 14 | PAD(8); 15 | bool m_bUnknown1; 16 | bool m_bUnknown2; 17 | cocos2d::CCLayerColor* m_pLayer; 18 | PAD(8); 19 | CCContentLayer* m_pContentLayer; 20 | PAD(16); 21 | float m_fScale1; //? 22 | float m_fScale2; //? 23 | 24 | protected: 25 | CCScrollLayerExt(cocos2d::CCRect rect) ; 26 | 27 | public: 28 | //own vtable 29 | virtual void preVisitWithClippingRect(cocos2d::CCRect rect) ; 30 | virtual void postVisit(); 31 | }; 32 | 33 | class CCScrollLayerExtDelegate { 34 | public: 35 | //lol nice typo rob 36 | virtual void scrllViewWillBeginDecelerating(CCScrollLayerExt*) {} 37 | virtual void scrollViewDidEndDecelerating(CCScrollLayerExt*) {} 38 | virtual void scrollViewTouchMoving(CCScrollLayerExt*) {} 39 | virtual void scrollViewDidEndMoving(CCScrollLayerExt*) {} 40 | virtual void scrollViewTouchBegin(CCScrollLayerExt*) {} 41 | virtual void scrollViewTouchEnd(CCScrollLayerExt*) {} 42 | }; 43 | 44 | 45 | #endif -------------------------------------------------------------------------------- /level_nodes/GJSearchObject.h: -------------------------------------------------------------------------------- 1 | #ifndef __GJSEARCHOBJECT_H__ 2 | #define __GJSEARCHOBJECT_H__ 3 | 4 | #include 5 | 6 | 7 | enum SearchType { 8 | kSearchTypeSearch = 0, 9 | kSearchTypeMostDownloaded = 1, 10 | kSearchTypeMostLiked = 2, 11 | kSearchTypeTrending = 3, 12 | kSearchTypeRecent = 4, 13 | kSearchTypeUsersLevels = 5, 14 | kSearchTypeFeatured = 6, 15 | kSearchTypeMagic = 7, 16 | kSearchTypeMapPacks = 9, 17 | kSearchTypeAwarded = 11, 18 | kSearchTypeFollowed = 12, 19 | kSearchTypeFriends = 13, 20 | kSearchTypeFindUsers = 14, 21 | kSearchTypeHallOfFame = 16, 22 | kSearchTypeMyLevels = 98, 23 | kSearchTypeSavedLevels = 99, 24 | }; 25 | 26 | class GJSearchObject : public cocos2d::CCNode { 27 | public: 28 | SearchType m_nScreenID; 29 | PAD(96); 30 | int currentFolder; // might be unsigned, but then again its robtop 31 | 32 | static GJSearchObject* create(SearchType nID) ; 33 | 34 | SearchType getType() { 35 | return this->m_nScreenID; 36 | } 37 | }; 38 | 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /sprite_nodes/CCSpritePlus.h: -------------------------------------------------------------------------------- 1 | #ifndef __CCSPRITEPLUS_H__ 2 | #define __CCSPRITEPLUS_H__ 3 | 4 | #include 5 | 6 | //credit to zmx (https://github.com/kyurime) 7 | class CCSpritePlus : public cocos2d::CCSprite { 8 | protected: 9 | cocos2d::CCArray* m_pFollowers; 10 | CCSpritePlus* m_pFollowing; 11 | bool m_bHasFollowers; 12 | bool m_bScaleFollowers; 13 | bool m_bFlipFollowers; 14 | 15 | public: 16 | //CCNode vtable 17 | virtual void setScaleX(float scale); 18 | virtual void setScaleY(float scale) ; 19 | virtual void setScale(float scale) ; 20 | virtual void setPosition(const cocos2d::CCPoint& pos) ; 21 | virtual void setRotation(float rotation); 22 | virtual bool initWithTexture(cocos2d::CCTexture2D* texture); 23 | virtual bool initWithSpriteFrameName(const char* name) ; 24 | 25 | //own vtable 26 | virtual void setFlipX(bool flip); 27 | virtual void setFlipY(bool flip); 28 | CCSpritePlus* getFollowingSprite() { return m_pFollowing; } 29 | 30 | // note: this is not an actual gd function. 31 | // this should really not be used. it's just 32 | // because camden314 has it. 33 | void setFollowingSprite(CCSpritePlus* spr) { this->m_pFollowing = spr; } 34 | 35 | static CCSpritePlus* createWithSpriteFrame(cocos2d::CCSpriteFrame* frame) ; 36 | }; 37 | 38 | 39 | #endif -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/GJDropDownLayer.h: -------------------------------------------------------------------------------- 1 | #ifndef __GJDROPDOWNLAYER_H__ 2 | #define __GJDROPDOWNLAYER_H__ 3 | 4 | #include 5 | 6 | 7 | class GJListLayer; 8 | 9 | #pragma runtime_checks("s", off) 10 | class GJDropDownLayer : public cocos2d::CCLayerColor { 11 | public: 12 | cocos2d::CCPoint m_obEndPosition; 13 | cocos2d::CCPoint m_obStartPosition; 14 | cocos2d::CCMenu* m_pButtonMenu; 15 | GJListLayer* m_pListLayer; 16 | bool m_bControllerEnabled; //? 17 | cocos2d::CCLayer* m_pLayer; 18 | bool m_bHidden; //? 19 | PAD(7); 20 | 21 | public: 22 | //CCNode vtable 23 | virtual void registerWithTouchDispatcher() ; 24 | virtual void draw() ; 25 | 26 | //CCTouchDelegate vtable 27 | virtual bool ccTouchBegan(cocos2d::CCTouch* pTouch, cocos2d::CCEvent* pEvent) { return true; } 28 | virtual void ccTouchMoved(cocos2d::CCTouch* pTouch, cocos2d::CCEvent* pEvent) {} 29 | virtual void ccTouchEnded(cocos2d::CCTouch* pTouch, cocos2d::CCEvent* pEvent) {} 30 | virtual void ccTouchCancelled(cocos2d::CCTouch* pTouch, cocos2d::CCEvent* pEvent) {} 31 | 32 | //CCKeypadDelegate vtable 33 | virtual void keyBackClicked(); 34 | 35 | //vtable 36 | virtual void customSetup() {} 37 | virtual void enterLayer() ; 38 | virtual void exitLayer(cocos2d::CCObject* btn); 39 | virtual void showLayer(bool noTransition) ; 40 | virtual void hideLayer(bool noTransition) ; 41 | virtual void layerVisible() ; 42 | virtual void layerHidden(); 43 | virtual void enterAnimFinished() {} 44 | virtual void disableUI() ; 45 | virtual void enableUI() ; 46 | GJDropDownLayer(); 47 | bool init(const char* title, float height); 48 | 49 | static GJDropDownLayer* create(const char* title, float height) ; 50 | }; 51 | #pragma runtime_checks("s", restore) 52 | 53 | 54 | #endif -------------------------------------------------------------------------------- /text_input_nodes/CCTextInputNode.h: -------------------------------------------------------------------------------- 1 | #ifndef __CCTEXTINPUTNODE_H__ 2 | #define __CCTEXTINPUTNODE_H__ 3 | 4 | #include 5 | 6 | class TextInputDelegate; 7 | 8 | #pragma runtime_checks("s", off) 9 | class CCTextInputNode : public cocos2d::CCLayer, public cocos2d::CCIMEDelegate, public cocos2d::CCTextFieldDelegate { 10 | protected: 11 | PAD(0x4); 12 | std::string m_sCaption; 13 | PAD(0x8); 14 | std::string m_sFilter; 15 | float m_fWidth; 16 | float m_fMaxLabelScale; 17 | float m_fPlaceholderScale; 18 | cocos2d::ccColor3B m_cPlaceholderColor; 19 | cocos2d::ccColor3B m_cNormalColor; 20 | cocos2d::CCLabelBMFont* m_pCursor; 21 | cocos2d::CCTextFieldTTF* m_pTextField; 22 | TextInputDelegate* m_delegate; 23 | int m_nMaxLabelLength; 24 | cocos2d::CCLabelBMFont* m_pPlaceholderLabel; 25 | bool m_bUnknown; 26 | bool m_bUnknown2; 27 | bool m_bForceOffset; 28 | 29 | public: 30 | //own vtable 31 | void onClickTrackNode(bool) {} 32 | 33 | static CCTextInputNode* create(const char* caption, cocos2d::CCObject* target, 34 | const char* fntFile, float width, float height); 35 | void setLabelPlaceholderColor(cocos2d::ccColor3B color); 36 | void setLabelPlaceholerScale(float scale); 37 | void setMaxLabelScale(float scale) ; 38 | void setMaxLabelLength(int length) { m_nMaxLabelLength = length; } 39 | void setAllowedChars(std::string filter) { m_sFilter = filter; } 40 | void refreshLabel() ; 41 | cocos2d::CCTextFieldTTF* getTextField() { return m_pTextField; } 42 | void setString(const char* text) { m_pTextField->setString(text); } 43 | const char* getString() { return m_pTextField->getString(); } 44 | cocos2d::CCLabelBMFont* getPlaceholderLabel() { return m_pPlaceholderLabel; } 45 | void setDelegate(TextInputDelegate* delegate) { m_delegate = delegate; } 46 | }; 47 | #pragma runtime_checks("s", restore) 48 | 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /sprite_nodes/SimplePlayer.h: -------------------------------------------------------------------------------- 1 | #ifndef __SIMPLEPLAYER_H__ 2 | #define __SIMPLEPLAYER_H__ 3 | 4 | #include 5 | 6 | 7 | enum IconType; 8 | 9 | class GJRobotSprite; 10 | class GJSpiderSprite; 11 | 12 | class SimplePlayer : public cocos2d::CCSprite { 13 | protected: 14 | cocos2d::CCSprite* m_pFirstLayer; // idk a good name for these, theyre not even layers 15 | cocos2d::CCSprite* m_pSecondLayer; 16 | cocos2d::CCSprite* m_pBirdDome; // the glass thingy on the ufo 17 | cocos2d::CCSprite* m_pOutlineSprite; 18 | cocos2d::CCSprite* m_pDetailSprite; 19 | GJRobotSprite* m_pRobotSprite; 20 | GJSpiderSprite* m_pSpiderSprite; 21 | PAD(4); // seems to be unused 22 | bool m_bHasGlowOutline; 23 | 24 | virtual bool init(int iconID); 25 | public: 26 | static SimplePlayer* create(int iconID); 27 | 28 | void updatePlayerFrame(int iconID, IconType iconType); 29 | 30 | void updateColors() ; 31 | 32 | void setFrames(const char* firstLayer, const char* secondLayer, const char* birdDome, const char* outlineSprite, const char* detailSprite); 33 | 34 | virtual void setColor(const cocos2d::ccColor3B& color); 35 | 36 | void setSecondColor(const cocos2d::ccColor3B& color) { 37 | // this function is inlined on windows 38 | m_pSecondLayer->setColor(color); 39 | updateColors(); 40 | } 41 | 42 | virtual void setOpacity(unsigned char opacity) ; 43 | 44 | // custom functions 45 | 46 | bool hasGlowOutline() { return m_bHasGlowOutline; } 47 | void setGlowOutline(bool value) { 48 | m_bHasGlowOutline = value; 49 | updateColors(); 50 | } 51 | 52 | inline bool getPlayerGlow() const 53 | { 54 | return *reinterpret_cast(reinterpret_cast(this) + 0x204); 55 | } 56 | inline void setPlayerGlow(bool n_glow) 57 | { 58 | auto glow_ptr = reinterpret_cast(reinterpret_cast(this) + 0x204); 59 | *glow_ptr = n_glow; 60 | }; 61 | }; 62 | 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /scroll_nodes/TableView.h: -------------------------------------------------------------------------------- 1 | #ifndef __TABLEVIEW_H__ 2 | #define __TABLEVIEW_H__ 3 | 4 | #include 5 | 6 | 7 | class CCScrollLayerExt; 8 | class CCScrollLayerExtDelegate; 9 | class CCIndexPath; 10 | 11 | typedef enum { 12 | //idk what goes here 13 | } TableViewCellEditingStyle; 14 | 15 | class TableView : public CCScrollLayerExt, public CCScrollLayerExtDelegate { 16 | //lol i kinda just gave up i dont feel like re'ing this rn 17 | protected: 18 | PAD(8); 19 | cocos2d::CCPoint m_obUnknown1; 20 | cocos2d::CCPoint m_obUnknown2; 21 | cocos2d::CCPoint m_obUnknown3; 22 | PAD(8); 23 | cocos2d::CCArray* m_pArray1; 24 | cocos2d::CCArray* m_pArray2; 25 | cocos2d::CCArray* m_pArray3; 26 | PAD(28); 27 | }; 28 | 29 | class TableViewCell : public cocos2d::CCLayer { 30 | protected: 31 | PAD(8); 32 | CCIndexPath m_iIndexPath; 33 | PAD(4); 34 | std::string m_sUnknown; 35 | PAD(8); 36 | cocos2d::CCLayerColor* m_pLayerColor; 37 | cocos2d::CCLayer* m_pLayer; 38 | PAD(4); 39 | 40 | TableViewCell(const char* name, float height, cocos2d::ccColor4B color); 41 | }; 42 | 43 | class TableViewDelegate { 44 | public: 45 | virtual void willTweenToIndexPath(CCIndexPath&, TableViewCell*, TableView*) {} 46 | virtual void didEndTweenToIndexPath(CCIndexPath&, TableView*) {} 47 | virtual void TableViewWillDisplayCellForRowAtIndexPath(CCIndexPath&, TableViewCell*, TableView*) {} 48 | virtual void TableViewDidDisplayCellForRowAtIndexPath(CCIndexPath&, TableViewCell*, TableView*) {} 49 | virtual void TableViewWillReloadCellForRowAtIndexPath(CCIndexPath&, TableViewCell*, TableView*) {} 50 | virtual float cellHeightForRowAtIndexPath(CCIndexPath&, TableView*) = 0; 51 | virtual void didSelectRowAtIndexPath(CCIndexPath&, TableView*) = 0; 52 | }; 53 | 54 | class TableViewDataSource { 55 | public: 56 | virtual unsigned int numberOfRowsInSection(unsigned int, TableView*) = 0; 57 | virtual unsigned int numberOfSectionsInTableView(TableView*) { return 1; } 58 | virtual void TableViewCommitCellEditingStyleForRowAtIndexPath(TableView*, TableViewCellEditingStyle, CCIndexPath&) {} 59 | virtual TableViewCell* cellForRowAtIndexPath(CCIndexPath&, TableView*) = 0; 60 | }; 61 | 62 | 63 | #endif -------------------------------------------------------------------------------- /menu_nodes/Slider.h: -------------------------------------------------------------------------------- 1 | #ifndef SLIDER_H 2 | #define SLIDER_H 3 | 4 | #include 5 | 6 | 7 | class Slider; 8 | 9 | class SliderThumb : public cocos2d::CCMenuItemImage { 10 | protected: 11 | float m_fLength; 12 | bool m_bVertical; 13 | 14 | public: 15 | void setValue(float val); 16 | 17 | float getValue() { 18 | float pos = this->m_bVertical ? 19 | this->getPositionY() : 20 | this->getPositionX(); 21 | 22 | float scale = this->getScale(); 23 | 24 | return (scale * this->m_fLength * .5f + pos) / (scale * this->m_fLength); 25 | } 26 | }; 27 | 28 | class SliderTouchLogic : public cocos2d::CCMenu { 29 | protected: 30 | PAD(0x4) 31 | float m_fLength; 32 | SliderThumb* m_pThumb; 33 | Slider* m_pSlider; 34 | bool m_bUnknown; 35 | PAD(0x8) 36 | bool m_bVertical; 37 | 38 | public: 39 | SliderThumb* getThumb() const { return m_pThumb; } 40 | }; 41 | 42 | class Slider : public cocos2d::CCLayer { 43 | protected: 44 | SliderTouchLogic* m_pTouchLogic; 45 | cocos2d::CCSprite* m_pSliderBar; 46 | cocos2d::CCSprite* m_pGroove; 47 | float m_fUnknown; 48 | float m_fHeight; 49 | 50 | public: 51 | void setValue(float val) { 52 | this->m_pTouchLogic->getThumb()->setValue(val); 53 | } 54 | 55 | float getValue() { 56 | return this->m_pTouchLogic->getThumb()->getValue(); 57 | } 58 | 59 | void setBarVisibility(bool v) { 60 | this->m_pSliderBar->setVisible(v); 61 | } 62 | 63 | static Slider* create( 64 | cocos2d::CCNode* target, 65 | cocos2d::SEL_MenuHandler click, 66 | const char* grooveSpr, 67 | const char* thumbSpr, 68 | const char* thumbSprSel, 69 | float scale 70 | ); 71 | 72 | static Slider* create( 73 | cocos2d::CCNode* target, 74 | cocos2d::SEL_MenuHandler click, 75 | float scale 76 | ) ; 77 | 78 | // todo 79 | }; 80 | 81 | 82 | 83 | #endif 84 | -------------------------------------------------------------------------------- /manager_nodes/GameLevelManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __GAMELEVELMANAGER_H__ 2 | #define __GAMELEVELMANAGER_H__ 3 | 4 | #include 5 | 6 | 7 | class GJGameLevel; 8 | 9 | class GameLevelManager : public cocos2d::CCNode { 10 | public: 11 | // thanks to wylie for most of these! 12 | 13 | cocos2d::CCDictionary* m_mainLevels; // the values are GJGameLevel 14 | cocos2d::CCDictionary* m_searchFilters; // the level search filters 15 | cocos2d::CCDictionary* m_onlineLevels; 16 | PAD(4); 17 | cocos2d::CCDictionary* m_followedCreators; // key is the account id 18 | cocos2d::CCDictionary* m_downloadedLevels; 19 | // dear robtop, have you heard of a set 20 | // all of these just have the value of CCString("1") 21 | cocos2d::CCDictionary* m_likedLevels; // https://github.com/Wyliemaster/gddocs/blob/client/docs/resources/client/gamesave/GLM.md#glm_12 22 | cocos2d::CCDictionary* m_ratedLevels; 23 | cocos2d::CCDictionary* m_reportedLevels; 24 | // the names of the folders 25 | cocos2d::CCDictionary* m_onlineFolders; 26 | cocos2d::CCDictionary* m_localLevelsFolders; 27 | cocos2d::CCDictionary* m_dailyLevels; 28 | int m_dailyTimeLeft; // i cant figure out the unit 29 | int m_dailyID; 30 | int m_dailyID_; 31 | PAD(4); 32 | int m_weeklyTimeLeft; 33 | int m_weeklyID; 34 | int m_weeklyID_; // ? (this was 2 lower than the other weekly id) 35 | cocos2d::CCDictionary* m_gauntletLevels; 36 | PAD(8); 37 | cocos2d::CCDictionary* unkDict14; // some cache thing it seems (values are strings) 38 | cocos2d::CCDictionary* m_knownUsers; // ? not sure 14C 39 | cocos2d::CCDictionary* m_accountIDtoUserIDDict; // 150 40 | cocos2d::CCDictionary* m_userIDtoAccountIDDict; // 154 41 | cocos2d::CCDictionary* unkDict18; // cached lvls?? (values are arrays) 42 | cocos2d::CCDictionary* unkDict19; // more cache stuff (values are strings) 43 | cocos2d::CCDictionary* unkDict20; 44 | cocos2d::CCDictionary* unkDict21; 45 | cocos2d::CCDictionary* unkDict22; 46 | cocos2d::CCDictionary* unkDict23; 47 | cocos2d::CCDictionary* unkDict24; 48 | cocos2d::CCDictionary* unkDict25; 49 | cocos2d::CCDictionary* unkDict26; 50 | cocos2d::CCDictionary* unkDict27; 51 | cocos2d::CCDictionary* unkDict28; 52 | std::string unkStr1; 53 | std::string unkStr2; // im not sure if this is actually is a std::string, although it looks like one 54 | PAD(92); 55 | std::string unkStr3; 56 | cocos2d::CCString* unkStr4; 57 | 58 | static GameLevelManager* sharedState(); 59 | 60 | GJGameLevel* createNewLevel(); 61 | }; 62 | 63 | 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /manager_nodes/GJUserScore.h: -------------------------------------------------------------------------------- 1 | #ifndef __GJUSERSCORE_H__ 2 | #define __GJUSERSCORE_H__ 3 | 4 | #include 5 | 6 | class GJUserScore : public cocos2d::CCNode { 7 | protected: 8 | std::string userName_; 9 | std::string userUDID_; 10 | int scoreType_; // legacy field, used in 1.9 to determine shown info 11 | int userID_; 12 | int accountID_; 13 | 14 | int stars_; 15 | int diamonds_; 16 | int demons_; 17 | int playerRank_; 18 | int creatorPoints_; // note - internally this is named levels 19 | int secretCoins_; 20 | int userCoins_; 21 | 22 | int iconID_; // for leaderboards, icon id to show 23 | int color1_; 24 | int color2_; 25 | int special_; 26 | IconType iconType_; 27 | 28 | int messageState_; 29 | int friendStatus_; 30 | int commentHistoryStatus_; 31 | 32 | std::string youtubeURL_; 33 | std::string twitterURL_; 34 | std::string twitchURL_; 35 | 36 | int playerCube_; 37 | int playerShip_; 38 | int playerBall_; 39 | int playerUfo_; 40 | int playerWave_; 41 | int playerRobot_; 42 | int playerSpider_; 43 | int playerStreak_; 44 | bool glowEnabled_ : 4; 45 | 46 | int playerExplosion_; 47 | 48 | int modBadge_; 49 | int globalRank_; 50 | 51 | int friendReqStatus_; 52 | int newMsgCount_; 53 | int friendReqCount_; 54 | bool isBlocked : 4; 55 | 56 | std::string lastScoreAge; 57 | 58 | public: 59 | // static GJUserScore* create(); 60 | // static GJUserScore* create(cocos2d::CCDictionary*); 61 | 62 | // bool isCurrentUser(); 63 | // void mergeWithScore(GJUserScore*); 64 | 65 | inline IconType getIconType() const { return this->iconType_; }; 66 | 67 | inline int getPlayerCube() const { return this->playerCube_; }; 68 | inline int getPlayerShip() const { return this->playerShip_; }; 69 | inline int getPlayerBall() const { return this->playerBall_; }; 70 | inline int getPlayerUfo() const { return this->playerUfo_; }; 71 | inline int getPlayerWave() const { return this->playerWave_; }; 72 | inline int getPlayerRobot() const { return this->playerRobot_; }; 73 | inline int getPlayerSpider() const { return this->playerSpider_; }; 74 | inline int getPlayerStreak() const { return this->playerStreak_; }; 75 | inline bool getGlowEnabled() const { return this->glowEnabled_; }; 76 | inline int getPlayerExplosion() const { return this->playerExplosion_; }; 77 | 78 | inline int getPlayerColor1() const { return this->color1_; }; 79 | inline int getPlayerColor2() const { return this->color2_; }; 80 | 81 | inline std::string getPlayerName() const { return this->userName_; }; 82 | }; 83 | 84 | 85 | #endif 86 | -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/FLAlertLayer.h: -------------------------------------------------------------------------------- 1 | #ifndef __FLALERTLAYER_H__ 2 | #define __FLALERTLAYER_H__ 3 | 4 | #include 5 | 6 | 7 | class FLAlertLayerProtocol; 8 | class ButtonSprite; 9 | class ScrollingLayer; 10 | 11 | #pragma runtime_checks("s", off) 12 | class FLAlertLayer : public cocos2d::CCLayerColor { 13 | public: 14 | 15 | cocos2d::CCMenu* m_pButtonMenu; 16 | int m_nControlConnected; //? 17 | cocos2d::CCObject* m_pTarget; 18 | bool m_bReverseKeyBack; 19 | cocos2d::ccColor3B m_cColor; 20 | PAD(4); 21 | cocos2d::CCLayer* m_pLayer; 22 | int m_nZOrder2; 23 | bool m_bNoElasticity; 24 | cocos2d::ccColor3B m_cColor2; //? 25 | ButtonSprite* m_pButton1; 26 | ButtonSprite* m_pButton2; 27 | ScrollingLayer* m_pScrollingLayer; 28 | int m_nJoystickConnected; 29 | bool m_bBorder; //? 30 | bool m_bNoAction; //? 31 | 32 | 33 | public: 34 | FLAlertLayer(); 35 | 36 | static FLAlertLayer *create(FLAlertLayerProtocol *delegate, const char *title, std::string text, const char *btn1Text, const char *btn2Text); 37 | static FLAlertLayer *create(FLAlertLayerProtocol *delegate, const char *title, std::string text, const char *btn1Text, const char *btn2Text, float layerHeight); 38 | static FLAlertLayer *create(FLAlertLayerProtocol *delegate, const char *title, std::string text, const char *btn1Text, const char *btn2Text, float layerHeight, bool scrollable, float ); 39 | bool init(FLAlertLayerProtocol *delegate, const char *title, const char *text, std::string btn1Text, const char *btn2Text, float layerHeight); 40 | void onBtn2(cocos2d::CCObject *); 41 | void onBtn1(cocos2d::CCObject *); 42 | 43 | 44 | 45 | virtual void onEnter(void); 46 | virtual bool ccTouchBegan(cocos2d::CCTouch *,cocos2d::CCEvent *); 47 | virtual void ccTouchMoved(cocos2d::CCTouch *,cocos2d::CCEvent *); 48 | virtual void ccTouchEnded(cocos2d::CCTouch *,cocos2d::CCEvent *); 49 | virtual void ccTouchCancelled(cocos2d::CCTouch *,cocos2d::CCEvent *); 50 | virtual void registerWithTouchDispatcher(void); 51 | virtual void keyBackClicked(void); 52 | virtual void keyDown(cocos2d::enumKeyCodes); 53 | virtual void show(void); 54 | 55 | 56 | 57 | /* 58 | static FLAlertLayer *create(FLAlertLayerProtocol *delegate, const char *title, std::string text, const char *btn1Text, const char *btn2Text, float layerHeight); 59 | bool init(FLAlertLayerProtocol *delegate, const char *title, const char *text, std::string btn1Text, const char *btn2Text, float layerHeight); 60 | void onBtn2(cocos2d::CCObject *); 61 | void onBtn1(cocos2d::CCObject *); 62 | 63 | 64 | ~FLAlertLayer(); 65 | 66 | 67 | 68 | 69 | 70 | virtual void registerWithTouchDispatcher(); 71 | virtual void onEnter(); 72 | virtual void keyBackClicked(); 73 | //virtual void keyDown(int); 74 | virtual void show(); 75 | 76 | 77 | CC_SYNTHESIZE(FLAlertLayerProtocol*, pParent_, PParent); 78 | CC_SYNTHESIZE(CCNode*, targetScene_, TargetScene); 79 | CC_SYNTHESIZE(bool, reverseKeyBack_, ReverseKeyBack); 80 | CC_SYNTHESIZE(CCLayer*, internalLayer_, InternalLayer); 81 | */ 82 | }; 83 | #pragma runtime_checks("s", restore) 84 | 85 | 86 | 87 | #endif -------------------------------------------------------------------------------- /include/gd.h: -------------------------------------------------------------------------------- 1 | #ifndef __GD_H__ 2 | #define __GD_H__ 3 | 4 | #include 5 | #include "fmod_common.h" 6 | #include "gdMacros.h" 7 | 8 | namespace gd { 9 | 10 | } 11 | 12 | namespace FMOD { 13 | class System; 14 | class Sound; 15 | class Channel; 16 | class DSP; 17 | } 18 | 19 | 20 | 21 | #include "GDProtocols.h" 22 | 23 | #include "delegates/delegates.h" 24 | 25 | #include "actions/CCCircleWave.h" 26 | 27 | #include "achievement_nodes/AchievementBar.h" 28 | #include "achievement_nodes/AchievementNotifier.h" 29 | 30 | #include "layers_scenes_transitions_nodes/CCNodeContainer.h" 31 | #include "layers_scenes_transitions_nodes/OBB2D.h" 32 | #include "layers_scenes_transitions_nodes/FLAlertLayer.h" 33 | #include "layers_scenes_transitions_nodes/GJDropDownLayer.h" 34 | #include "layers_scenes_transitions_nodes/GJListLayer.h" 35 | #include "layers_scenes_transitions_nodes/LoadingLayer.h" 36 | #include "layers_scenes_transitions_nodes/MenuLayer.h" 37 | #include "layers_scenes_transitions_nodes/TextAlertPopup.h" 38 | #include "layers_scenes_transitions_nodes/LoadingCircle.h" 39 | #include "layers_scenes_transitions_nodes/CCBlockLayer.h" 40 | #include "layers_scenes_transitions_nodes/PauseLayer.h" 41 | #include "layers_scenes_transitions_nodes/GJBaseGameLayer.h" 42 | #include "layers_scenes_transitions_nodes/PlayLayer.h" 43 | #include "layers_scenes_transitions_nodes/LevelEditorLayer.h" 44 | #include "layers_scenes_transitions_nodes/EditorUI.h" 45 | #include "layers_scenes_transitions_nodes/NumberInputLayer.h" 46 | #include "layers_scenes_transitions_nodes/SetIDPopup.h" 47 | #include "layers_scenes_transitions_nodes/CustomSongWidget.h" 48 | #include "layers_scenes_transitions_nodes/CustomSongLayer.h" 49 | #include "layers_scenes_transitions_nodes/SongInfoLayer.h" 50 | #include "layers_scenes_transitions_nodes/GJSpecialColorSelect.h" 51 | #include "layers_scenes_transitions_nodes/GJGarageLayer.h" 52 | #include "layers_scenes_transitions_nodes/ProfilePage.h" 53 | #include "layers_scenes_transitions_nodes/OptionsLayer.h" 54 | #include "layers_scenes_transitions_nodes/LevelInfoLayer.h" 55 | #include "layers_scenes_transitions_nodes/UploadActionPopup.h" 56 | 57 | #include "scroll_nodes/CCContentLayer.h" 58 | #include "scroll_nodes/CCIndexPath.h" 59 | #include "scroll_nodes/CCScrollLayerExt.h" 60 | #include "scroll_nodes/TableView.h" 61 | #include "scroll_nodes/BoomListView.h" 62 | #include "scroll_nodes/CustomListView.h" 63 | #include "scroll_nodes/ScrollingLayer.h" 64 | 65 | #include "manager_nodes/GManager.h" 66 | #include "manager_nodes/GameManager.h" 67 | #include "manager_nodes/GameSoundManager.h" 68 | #include "manager_nodes/GameLevelManager.h" 69 | #include "manager_nodes/AchievementManager.h" 70 | #include "manager_nodes/GJUserScore.h" 71 | #include "manager_nodes/GJAccountManager.h" 72 | #include "manager_nodes/GJEffectManager.h" 73 | #include "manager_nodes/MusicDownloadManager.h" 74 | #include "manager_nodes/ObjectToolbox.h" 75 | #include "manager_nodes/GameStatsManager.h" 76 | #include "manager_nodes/GameToolbox.h" 77 | 78 | #include "menu_nodes/CCMenuItemSpriteExtra.h" 79 | #include "menu_nodes/CCMenuItemToggler.h" 80 | #include "menu_nodes/Slider.h" 81 | 82 | #include "audio_nodes/FMODAudioEngine.h" 83 | #include "audio_nodes/FMODSound.h" 84 | 85 | #include "level_nodes/GJGameLevel.h" 86 | #include "level_nodes/GJSearchObject.h" 87 | #include "level_nodes/LevelSettingsObject.h" 88 | #include "level_nodes/SongInfoObject.h" 89 | #include "level_nodes/ColorAction.h" 90 | 91 | #include "sprite_nodes/CCSpritePlus.h" 92 | #include "sprite_nodes/ColorActionSprite.h" 93 | #include "sprite_nodes/ButtonSprite.h" 94 | #include "sprite_nodes/GameObject.h" 95 | #include "sprite_nodes/CCAnimatedSprite.h" 96 | #include "sprite_nodes/AnimatedShopKeeper.h" 97 | #include "sprite_nodes/PlayerObject.h" 98 | #include "sprite_nodes/TextArea.h" 99 | #include "sprite_nodes/GJItemIcon.h" 100 | #include "sprite_nodes/GJRobotSprite.h" 101 | #include "sprite_nodes/GJSpiderSprite.h" 102 | #include "sprite_nodes/GJSpriteColor.h" 103 | #include "sprite_nodes/SimplePlayer.h" 104 | #include "sprite_nodes/HardStreak.h" 105 | 106 | #include "text_input_nodes/CCTextInputNode.h" 107 | 108 | #include "other_nodes/CheckpointObject.h" 109 | #include "other_nodes/PlayerCheckpoint.h" 110 | #include "other_nodes/PointNode.h" 111 | 112 | #endif 113 | -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/EditorUI.h: -------------------------------------------------------------------------------- 1 | #ifndef __EDITORUI_H__ 2 | #define __EDITORUI_H__ 3 | 4 | #include 5 | 6 | 7 | class EditButtonBar : public cocos2d::CCNode {}; 8 | class GJRotationControl : public cocos2d::CCLayer {}; 9 | class GJScaleControl : public cocos2d::CCLayer {}; 10 | 11 | class CCMenuItemSpriteExtra; 12 | class CCMenuItemToggler; 13 | class Slider; 14 | class GameObject; 15 | 16 | class EditorUI : public cocos2d::CCLayer, 17 | public FLAlertLayerProtocol, 18 | public ColorSelectDelegate, 19 | public GJRotationControlDelegate, 20 | public GJScaleControlDelegate, 21 | public MusicDownloadDelegate { 22 | 23 | public: 24 | EditButtonBar* m_pEditButtonBar; 25 | PAD(0x4) 26 | cocos2d::CCArray* m_pUnknownArray; 27 | PAD(0x28) 28 | cocos2d::CCLabelBMFont* m_pUnknownLabel; 29 | GJRotationControl* m_pRotationControl; 30 | PAD(0x10) 31 | GJScaleControl* m_pScaleControl; 32 | cocos2d::CCDictionary* m_pUnknownDict; 33 | EditButtonBar* m_pEditButtonBar2; 34 | EditButtonBar* m_pEditButtonBar3; 35 | Slider* m_pPositionSlider; 36 | PAD(0x20) 37 | cocos2d::CCArray* m_pUnknownArray2; 38 | PAD(0x8) 39 | cocos2d::CCArray* m_pUnknownArray3; 40 | cocos2d::CCMenu* m_pUnknownMenu; 41 | cocos2d::CCArray* m_pUnknownArray4; 42 | CCMenuItemSpriteExtra* m_pButton0; 43 | CCMenuItemSpriteExtra* m_pButton1; 44 | CCMenuItemSpriteExtra* m_pButton2; 45 | CCMenuItemSpriteExtra* m_pButton3; 46 | CCMenuItemSpriteExtra* m_pButton4; 47 | CCMenuItemSpriteExtra* m_pButton5; 48 | CCMenuItemSpriteExtra* m_pButton6; 49 | CCMenuItemSpriteExtra* m_pButton7; 50 | CCMenuItemSpriteExtra* m_pButton8; 51 | CCMenuItemSpriteExtra* m_pButton9; 52 | CCMenuItemSpriteExtra* m_pButton10; 53 | CCMenuItemSpriteExtra* m_pButton11; 54 | CCMenuItemSpriteExtra* m_pButton12; 55 | CCMenuItemSpriteExtra* m_pButton13; 56 | CCMenuItemSpriteExtra* m_pButton14; 57 | CCMenuItemSpriteExtra* m_pButton15; 58 | CCMenuItemSpriteExtra* m_pButton16; 59 | CCMenuItemSpriteExtra* m_pButton17; 60 | CCMenuItemSpriteExtra* m_pButton18; 61 | CCMenuItemSpriteExtra* m_pButton19; 62 | CCMenuItemSpriteExtra* m_pButton20; 63 | CCMenuItemSpriteExtra* m_pButton21; 64 | CCMenuItemSpriteExtra* m_pButton22; 65 | CCMenuItemSpriteExtra* m_pButton23; 66 | CCMenuItemSpriteExtra* m_pButton24; 67 | CCMenuItemSpriteExtra* m_pButton25; 68 | CCMenuItemSpriteExtra* m_pButton26; 69 | CCMenuItemToggler* m_pUnknownToggler; 70 | cocos2d::CCArray* m_pUnknownArray5; 71 | cocos2d::CCMenu* m_pUnknownMenu2; 72 | cocos2d::CCArray* m_pUnknownArray6; 73 | cocos2d::CCSprite* m_pIdkSprite0; 74 | cocos2d::CCSprite* m_pIdkSprite1; 75 | CCMenuItemSpriteExtra* m_pButton27; 76 | CCMenuItemSpriteExtra* m_pButton28; 77 | CCMenuItemSpriteExtra* m_pButton29; 78 | CCMenuItemSpriteExtra* m_pButton30; 79 | CCMenuItemSpriteExtra* m_pButton31; 80 | CCMenuItemSpriteExtra* m_pButton32; 81 | cocos2d::CCLabelBMFont* m_pCurrentLayerLabel; 82 | CCMenuItemSpriteExtra* m_pButton33; 83 | CCMenuItemSpriteExtra* m_pButton34; 84 | CCMenuItemSpriteExtra* m_pButton35; 85 | PAD(0xc) 86 | cocos2d::CCArray* m_pUnknownArray7; 87 | cocos2d::CCArray* m_pUnknownArray8; 88 | cocos2d::CCArray* m_pUnknownArray9; 89 | PAD(0x4) 90 | LevelEditorLayer* m_pEditorLayer; 91 | PAD(60) 92 | std::string m_clipBoard; 93 | 94 | public: 95 | cocos2d::CCArray* pasteObjects(std::string const& _str) ; 96 | 97 | void deselectAll() ; 98 | void updateButtons() ; 99 | 100 | void selectObjects(cocos2d::CCArray* objs, bool idk) ; 101 | cocos2d::CCArray* getSelectedObjects() ; 102 | 103 | void moveObject(GameObject* obj, cocos2d::CCPoint position) ; 104 | 105 | void updateZoom(float amt) ; 106 | 107 | cocos2d::CCPoint getGroupCenter(cocos2d::CCArray* objects, bool idk); 108 | 109 | void scaleObjects(cocos2d::CCArray* objects, float scale, cocos2d::CCPoint center); 110 | }; 111 | 112 | 113 | #endif 114 | -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/GJBaseGameLayer.h: -------------------------------------------------------------------------------- 1 | #ifndef __GJBASEGAMELAYER_H__ 2 | #define __GJBASEGAMELAYER_H__ 3 | 4 | #include 5 | 6 | class OBB2D; 7 | class GJEffectManager; 8 | class CCNodeContainer; 9 | class LevelSettingsObject; 10 | class PlayerObject; 11 | 12 | class GJBaseGameLayer : public cocos2d::CCLayer { 13 | public: 14 | PAD(0x4) 15 | OBB2D* m_boundingBox; 16 | GJEffectManager* m_effectManager; 17 | cocos2d::CCLayer* m_gameLayer; 18 | cocos2d::CCSpriteBatchNode* m_spriteBatch1; 19 | cocos2d::CCSpriteBatchNode* m_spriteBatch2; 20 | cocos2d::CCSpriteBatchNode* m_spriteBatch3; 21 | cocos2d::CCSpriteBatchNode* m_spriteBatch4; 22 | cocos2d::CCSpriteBatchNode* m_spriteBatch5; 23 | CCNodeContainer* m_nodeContainer1; 24 | cocos2d::CCSpriteBatchNode* m_spriteBatch6; 25 | cocos2d::CCSpriteBatchNode* m_spriteBatch7; 26 | cocos2d::CCSpriteBatchNode* m_spriteBatch8; 27 | cocos2d::CCSpriteBatchNode* m_spriteBatch9; 28 | cocos2d::CCSpriteBatchNode* m_spriteBatch10; 29 | cocos2d::CCSpriteBatchNode* m_spriteBatch11; 30 | cocos2d::CCSpriteBatchNode* m_spriteBatch12; 31 | CCNodeContainer* m_nodeContainer2; 32 | cocos2d::CCSpriteBatchNode* m_spriteBatch13; 33 | cocos2d::CCSpriteBatchNode* m_spriteBatch14; 34 | cocos2d::CCSpriteBatchNode* m_spriteBatch15; 35 | cocos2d::CCSpriteBatchNode* m_spriteBatch16; 36 | cocos2d::CCSpriteBatchNode* m_spriteBatch17; 37 | cocos2d::CCSpriteBatchNode* m_spriteBatch18; 38 | cocos2d::CCSpriteBatchNode* m_spriteBatch19; 39 | CCNodeContainer* m_nodeContainer3; 40 | cocos2d::CCSpriteBatchNode* m_spriteBatch20; 41 | cocos2d::CCSpriteBatchNode* m_spriteBatch21; 42 | cocos2d::CCSpriteBatchNode* m_spriteBatch22; 43 | cocos2d::CCSpriteBatchNode* m_spriteBatch23; 44 | cocos2d::CCSpriteBatchNode* m_spriteBatch24; 45 | cocos2d::CCSpriteBatchNode* m_spriteBatch25; 46 | cocos2d::CCSpriteBatchNode* m_spriteBatch26; 47 | cocos2d::CCSpriteBatchNode* m_spriteBatch27; 48 | cocos2d::CCSpriteBatchNode* m_spriteBatch28; 49 | cocos2d::CCSpriteBatchNode* m_spriteBatch29; 50 | cocos2d::CCSpriteBatchNode* m_spriteBatch30; 51 | CCNodeContainer* m_nodeContainer4; 52 | cocos2d::CCSpriteBatchNode* m_spriteBatch31; 53 | cocos2d::CCSpriteBatchNode* m_spriteBatch32; 54 | cocos2d::CCSpriteBatchNode* m_spriteBatch33; 55 | cocos2d::CCSpriteBatchNode* m_spriteBatch34; 56 | cocos2d::CCSpriteBatchNode* m_spriteBatch35; 57 | cocos2d::CCSpriteBatchNode* m_spriteBatch36; 58 | cocos2d::CCSpriteBatchNode* m_spriteBatch37; 59 | CCNodeContainer* m_nodeContainer5; 60 | cocos2d::CCSpriteBatchNode* m_spriteBatch38; 61 | cocos2d::CCSpriteBatchNode* m_spriteBatch39; 62 | cocos2d::CCSpriteBatchNode* m_spriteBatch40; 63 | cocos2d::CCSpriteBatchNode* m_spriteBatch41; 64 | cocos2d::CCSpriteBatchNode* m_spriteBatch42; 65 | cocos2d::CCSpriteBatchNode* m_spriteBatch43; 66 | cocos2d::CCSpriteBatchNode* m_spriteBatch44; 67 | CCNodeContainer* m_nodeContainer6; 68 | cocos2d::CCSpriteBatchNode* m_spriteBatch45; 69 | cocos2d::CCSpriteBatchNode* m_spriteBatch46; 70 | cocos2d::CCSpriteBatchNode* m_spriteBatch47; 71 | cocos2d::CCSpriteBatchNode* m_spriteBatch48; 72 | cocos2d::CCSpriteBatchNode* m_spriteBatch49; 73 | cocos2d::CCSpriteBatchNode* m_spriteBatch50; 74 | cocos2d::CCSpriteBatchNode* m_spriteBatch51; 75 | CCNodeContainer* m_nodeContainer7; 76 | cocos2d::CCSpriteBatchNode* m_spriteBatch52; 77 | cocos2d::CCSpriteBatchNode* m_spriteBatch53; 78 | cocos2d::CCSpriteBatchNode* m_spriteBatch54; 79 | cocos2d::CCSpriteBatchNode* m_spriteBatch55; 80 | PlayerObject* m_player1; //0x478 81 | PlayerObject* m_player2; 82 | LevelSettingsObject* m_levelSettings; 83 | cocos2d::CCDictionary* m_dict1; 84 | cocos2d::CCArray* m_objects; 85 | cocos2d::CCArray* m_array1; 86 | cocos2d::CCArray* m_array2; 87 | cocos2d::CCArray* m_array3; 88 | cocos2d::CCArray* m_array4; 89 | cocos2d::CCArray* m_array5; 90 | cocos2d::CCNode* m_unknownNode; 91 | PAD(0x1c) 92 | cocos2d::CCDictionary* m_dict2; 93 | cocos2d::CCDictionary* m_dict3; 94 | cocos2d::CCDictionary* m_dict4; 95 | PAD(0x28) 96 | cocos2d::CCArray* m_array6; 97 | cocos2d::CCArray* m_array7; 98 | cocos2d::CCDictionary* m_dict5; 99 | cocos2d::CCDictionary* m_dict6; 100 | PAD(28) 101 | }; 102 | 103 | #endif 104 | -------------------------------------------------------------------------------- /delegates/delegates.h: -------------------------------------------------------------------------------- 1 | #ifndef DELEGATES_H 2 | #define DELEGATES_h 3 | 4 | #include 5 | 6 | class GJGameLevel; 7 | class NumberInputLayer; 8 | class SetIDPopup; 9 | class CCTextInputNode; 10 | class GJDropDownLayer; 11 | class SongInfoObject; 12 | class GJSpecialColorSelect; 13 | 14 | enum GJSongError { 15 | kGJSongErrorUnknown = 0, 16 | // dunno, didnt bother to RE 17 | }; 18 | 19 | class TextInputDelegate { 20 | virtual void textChanged(CCTextInputNode*) {} 21 | virtual void textInputOpened(CCTextInputNode*) {} 22 | virtual void textInputClosed(CCTextInputNode*) {} 23 | virtual void textInputShouldOffset(CCTextInputNode*, float) {} 24 | virtual void textInputReturn(CCTextInputNode*) {} 25 | virtual bool allowTextInput(CCTextInputNode*) { return true; } 26 | }; 27 | 28 | 29 | class ColorSelectDelegate { 30 | virtual void colorSelectClosed(cocos2d::CCNode*); 31 | }; 32 | 33 | class GJSpecialColorSelectDelegate { 34 | virtual void colorSelectClosed(GJSpecialColorSelect*, int); 35 | }; 36 | 37 | class GJRotationControlDelegate { 38 | virtual void angleChangeBegin(void); 39 | virtual void angleChangeEnded(void); 40 | virtual void angleChanged(float); 41 | }; 42 | 43 | class GJScaleControlDelegate { 44 | virtual void scaleChangeBegin(void); 45 | virtual void scaleChangeEnded(void); 46 | virtual void scaleChanged(float); 47 | }; 48 | 49 | class MusicDownloadDelegate { 50 | virtual void downloadSongFailed(int, GJSongError); 51 | virtual void downloadSongFinished(SongInfoObject*); 52 | virtual void loadSongInfoFailed(int, GJSongError); 53 | virtual void loadSongInfoFinished(SongInfoObject*); 54 | virtual void songStateChanged(void); 55 | }; 56 | 57 | enum UpdateResponse { 58 | kUpdateResponseUnknown, 59 | kUpdateResponseUpToDate, 60 | kUpdateResponseGameVerOutOfDate, 61 | kUpdateResponseUpdateSuccess, 62 | }; 63 | 64 | enum LikeItemType { 65 | kLikeItemTypeUnknown, 66 | }; 67 | 68 | class LevelDownloadDelegate { 69 | virtual void levelDownloadFinished(GJGameLevel*); 70 | virtual void levelDownloadFailed(int); 71 | }; 72 | 73 | class LevelDeleteDelegate { 74 | virtual void levelDeleteFinished(int); 75 | virtual void levelDeleteFailed(int); 76 | }; 77 | 78 | class LevelUpdateDelegate { 79 | virtual void levelUpdateFinished(GJGameLevel*, UpdateResponse); 80 | virtual void levelUpdateFailed(int); 81 | }; 82 | 83 | class UploadActionDelegate { 84 | virtual void uploadActionFinished(int, int) {}; 85 | virtual void uploadActionFailed(int, int) {}; 86 | }; 87 | 88 | class UploadPopupDelegate { 89 | virtual void onClosePopup(void) {}; 90 | }; 91 | 92 | class LikeItemDelegate { 93 | virtual void likedItem(LikeItemType, int, bool); 94 | }; 95 | 96 | class RateLevelDelegate { 97 | virtual void rateLevelClosed(void); 98 | }; 99 | 100 | class NumberInputDelegate { 101 | virtual void numberInputClosed(NumberInputLayer*); 102 | }; 103 | 104 | class SetIDPopupDelegate { 105 | virtual void setIDPopupClosed(SetIDPopup*, int); 106 | }; 107 | 108 | class GJDropDownLayerDelegate { 109 | virtual void dropDownLayerWillClose(GJDropDownLayer*); 110 | }; 111 | 112 | class GooglePlayDelegate { 113 | virtual void googlePlaySignedIn() {} 114 | }; 115 | 116 | class AppDelegate : public cocos2d::CCApplication { 117 | public: 118 | AppDelegate(); 119 | ~AppDelegate(); 120 | 121 | static AppDelegate *get(); 122 | 123 | virtual void applicationDidEnterBackground(); 124 | virtual bool applicationDidFinishLaunching(); 125 | virtual void applicationWillEnterForeground(); 126 | virtual void applicationWillResignActive(); 127 | 128 | /* Called on loading end */ 129 | void loadingIsFinished(); 130 | 131 | void pauseGame(); 132 | void resumeSound(); 133 | /* Don't use this function */ 134 | 135 | /* Saves the managers if loading is finished */ 136 | void trySaveGame(); 137 | 138 | virtual void willSwitchToScene(cocos2d::CCScene *pScene); 139 | 140 | }; 141 | 142 | 143 | #endif 144 | -------------------------------------------------------------------------------- /layers_scenes_transitions_nodes/PlayLayer.h: -------------------------------------------------------------------------------- 1 | #ifndef __PLAYLAYER_H__ 2 | #define __PLAYLAYER_H__ 3 | 4 | #include 5 | 6 | 7 | class GJBaseGameLayer; 8 | class GameObject; 9 | // class EndPortalObject; 10 | using EndPortalObject = GameObject; 11 | // class AudioEffectsLayer; 12 | using AudioEffectsLayer = cocos2d::CCLayerColor; 13 | // class GJGroundLayer; 14 | using GJGroundLayer = cocos2d::CCLayer; 15 | class GJGameLevel; 16 | // class UILayer; 17 | using UILayer = cocos2d::CCLayerColor; 18 | 19 | class PlayLayer : public GJBaseGameLayer { 20 | public: 21 | unsigned int unk_2D8; 22 | bool unk_2DC; 23 | bool has_cheated; //0x02DD // by taking less than 30s to beat lvl 24 | PAD(2); 25 | int rand_0_100_plus_2E8; //0x02E0 26 | int rand_0_100; //0x02E4 27 | int unk_2E8; 28 | bool opposite_is_frozen; //0x02EC 29 | bool unk_2ED; 30 | PAD(10); 31 | cocos2d::CCDrawNode* draw_node; //0x02F8 32 | float camera_y_again_maybe; //0x02FC 33 | float unk_300; 34 | float unk_304; 35 | float bottom_ground_y_maybe; //0x0308 36 | float unk_30C; //0x030C // last y or smth idk 37 | bool unk_310; 38 | bool unk_311; 39 | bool unk_312; 40 | PAD(33); 41 | EndPortalObject* end_portal; //0x0334 42 | cocos2d::CCArray* checkpoint_array; //0x0338 43 | cocos2d::CCArray* unk_33C; //0x033C 44 | cocos2d::CCArray* unk_340; //0x0340 45 | cocos2d::CCArray* unk_344; //0x0344 46 | cocos2d::CCSprite* unk_348; 47 | PAD(8); 48 | cocos2d::CCArray* unk_354; 49 | cocos2d::CCArray* unk_358; 50 | cocos2d::CCArray* unk_35C; 51 | cocos2d::CCArray* unk_360; 52 | bool is_mute; //0x0364 // maybe 53 | PAD(7); 54 | cocos2d::CCArray* ringObjectsOnScreen; //0x036C 55 | cocos2d::CCParticleSystemQuad* unk_370; 56 | cocos2d::CCDictionary* unk_374; 57 | cocos2d::CCArray* circleWaves; //0x0378 58 | cocos2d::CCArray* unk_37C; 59 | AudioEffectsLayer* audio_effects_layer; //0x0380 60 | PAD(8); 61 | GJGroundLayer* ground1; //0x038C 62 | GJGroundLayer* ground2; //0x0390 63 | PAD(8); 64 | bool is_dead; //0x039C 65 | bool unk_39D; //0x039D // smth to do with the camera 66 | bool cameraMoveX_called; //0x039E 67 | bool cameraMoveY_called; //0x039F 68 | PAD(4) 69 | int unk_3A4; 70 | PAD(4); 71 | float unk_1245; //0x03B4 72 | float level_length; //0x03B4 73 | float unk_3B8; 74 | cocos2d::CCLabelBMFont* attempt_label; //0x03BC 75 | cocos2d::CCLabelBMFont* percent_label; //0x03C0 76 | bool is_camera_shaking; //0x03C4 77 | PAD(3); 78 | float current_shake_strength; //0x03C8 79 | float current_shake_interval; //0x03CC 80 | double last_shake_time; //0x03D0 81 | cocos2d::CCPoint unk_3D8; 82 | PAD(12); 83 | int unk_always_40; //0x03F0 84 | cocos2d::CCDictionary* particleSystemPlistEffectDict; //0x03F4 85 | cocos2d::CCDictionary* unk_3F8; 86 | cocos2d::CCArray* particleSystemArr; //0x03FC 87 | cocos2d::CCNode* unk_400; 88 | cocos2d::CCSprite* spr_slidergroove2; //0x0404 89 | cocos2d::CCSprite* spr_sliderBar2; //0x0408 90 | float slider_width; //0x040C //sliderbar2 width (?) minus 4 91 | float unk_always_8; //0x0410 92 | PAD(16); 93 | int unk_always_4; //0x0418 94 | PAD(8); 95 | cocos2d::CCArray* arr_GravityEffectSprite; //0x0424 96 | bool unk_428; 97 | bool do_record_actions; //0x0429 98 | bool unk_42A; 99 | bool is_paused; //0x042B 100 | bool unk_42C; 101 | bool is_player_2_frozen; //0x042D // wtf 102 | PAD(2); 103 | std::string record_string; //0x0430 104 | PAD(8); 105 | double time; //0x0450 106 | PAD(9); 107 | bool unk_461; 108 | PAD(2); 109 | cocos2d::CCDictionary* unk_464; 110 | PAD(8); 111 | bool playback_mode; //0x0470 112 | PAD(19); 113 | UILayer* ui_layer; //0x0484 114 | GJGameLevel* level; //0x0488 115 | float camera_x; //0x048C 116 | float camera_y; //0x0490 117 | bool is_test_mode; //0x0494 118 | bool is_practice_mode; //0x0495 119 | bool unk_496; 120 | bool unk_497; 121 | cocos2d::CCArray* animationsArrMaybe; //0x0498 122 | bool unk_49C; 123 | PAD(11); 124 | int current_attempt; //0x04A8 125 | int jump_count; //0x04AC 126 | bool unk_4B0; 127 | PAD(3); 128 | float total_time; //0x04B4 129 | int jump_count_resets_when_you_die; //0x04B8 130 | bool unk_4BC; 131 | bool has_lvl_complete_menu; //0x04BD 132 | bool has_completed_lvl; //0x04BE 133 | PAD(1); 134 | int last_death_percent; //0x04C0 135 | bool unk_4C4; 136 | PAD(11); 137 | bool unk_4D0; 138 | PAD(3); 139 | cocos2d::CCArray* unk_4d4; //0x04D4 140 | cocos2d::CCDictionary* unk_4d8; //0x04D8 141 | PAD(4); 142 | double unk_4E0; 143 | double unk_4e8; //0x04E8 // seems to be time modulo 2 for some reason 144 | PAD(24); 145 | double time_again; //0x0508 146 | PAD(31); 147 | bool is_paused_again; //0x052F 148 | GameObject* unk_game_object; //0x0530 149 | bool unk_534; //0x0534 150 | bool unk_535; 151 | bool gv_value_0072; //0x0536 152 | PAD(1); 153 | 154 | 155 | void cameraMoveY(float,float,float); 156 | }; 157 | 158 | 159 | #endif -------------------------------------------------------------------------------- /level_nodes/GJGameLevel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef GJGAMELEVEL_H 3 | #define GJGAMELEVEL_H 4 | 5 | #include 6 | 7 | 8 | enum GJLevelType { 9 | kGJLevelTypeLocal = 1, 10 | kGJLevelTypeEditor = 2, 11 | kGJLevelTypeSaved = 3 12 | }; 13 | 14 | class GJGameLevel : public cocos2d::CCNode { 15 | public: 16 | cocos2d::CCDictionary *lastBuildSave; 17 | 18 | int levelID_rand; // levelID + seed = levelID_rand 19 | int levelID_seed; 20 | int levelID; 21 | 22 | std::string levelName; 23 | std::string levelDesc; 24 | std::string levelString; 25 | std::string userName; 26 | std::string recordString; 27 | 28 | std::string uploadDate; 29 | std::string updateDate; 30 | 31 | int userID_rand; 32 | int userID_seed; 33 | int userID; 34 | 35 | int accountID_rand; 36 | int accountID_seed; 37 | int accountID; 38 | 39 | int difficulty; 40 | int audioTrack; 41 | int songID; 42 | 43 | int levelRev; 44 | 45 | bool unlisted; 46 | 47 | int objectCount_rand; 48 | int objectCount_seed; 49 | int objectCount; 50 | int averageDifficulty; 51 | int ratings; 52 | int ratingsSum; 53 | 54 | int downloads; 55 | 56 | bool isEditable; 57 | bool gauntletLevel; 58 | bool gauntletLevel2; 59 | 60 | int workingTime; 61 | int workingTime2; 62 | 63 | bool lowDetailMode; 64 | bool lowDetailModeToggled; 65 | 66 | int isVerified_rand; 67 | int isVerified_seed; 68 | bool isVerified; 69 | bool isUploaded; 70 | bool hasBeenModified; 71 | 72 | int levelVersion; 73 | int gameVersion; 74 | 75 | int attempts_rand; 76 | int attempts_seed; 77 | int attempts; 78 | 79 | int jumps_rand; 80 | int jumps_seed; 81 | int jumps; 82 | 83 | int clicks_rand; 84 | int clicks_seed; 85 | int clicks; 86 | 87 | int attemptTime_rand; 88 | int attemptTime_seed; 89 | int attemptTime; 90 | 91 | int chk; 92 | 93 | bool isChkValid; 94 | bool isCompletionLegitimate; 95 | 96 | int normalPercent; // yes, it is out of order 97 | int normalPercent_seed; 98 | int normalPercent_rand; 99 | 100 | int orbCompletion_rand; 101 | int orbCompletion_seed; 102 | int orbCompletion; 103 | 104 | int newNormalPercent2_rand; 105 | int newNormalPercent2_seed; 106 | int newNormalPercent2; 107 | 108 | int practicePercent; 109 | 110 | int likes; 111 | int dislikes; 112 | int levelLength; 113 | int featured; 114 | 115 | bool isEpic; 116 | bool levelFavorited; 117 | int levelFolder; 118 | 119 | int dailyID_rand; 120 | int dailyID_seed; 121 | int dailyID; 122 | 123 | int demon_rand; 124 | int demon_seed; 125 | int demon; 126 | int demonDifficulty; 127 | int stars_rand; 128 | int stars_seed; 129 | int stars; 130 | 131 | bool autoLevel; 132 | int coins; 133 | int coinsVerified_rand; 134 | int coinsVerified_seed; 135 | int coinsVerified; 136 | 137 | int password_rand; 138 | int password_seed; 139 | 140 | int originalLevel_rand; 141 | int originalLevel_seed; 142 | int originalLevel; 143 | 144 | bool twoPlayerMode; 145 | 146 | int failedPasswordAttempts; 147 | 148 | int firstCoinVerified_rand; 149 | int firstCoinVerified_seed; 150 | int firstCoinVerified; 151 | 152 | int secondCoinVerified_rand; 153 | int secondCoinVerified_seed; 154 | int secondCoinVerified; 155 | 156 | int thirdCoinVerified_rand; 157 | int thirdCoinVerified_seed; 158 | int thirdCoinVerified; 159 | 160 | int starsRequested; 161 | 162 | bool showedSongWarning; 163 | int starRatings; 164 | int starRatingsSum; 165 | int maxStarRatings; 166 | int minStarRatings; 167 | int demonVotes; 168 | int rateStars; 169 | int rateFeature; 170 | 171 | std::string rateUser; 172 | 173 | bool dontSave; 174 | bool levelNotDownloaded; 175 | 176 | int requiredCoins; 177 | bool isUnlocked; 178 | 179 | cocos2d::CCPoint lastCameraPos; 180 | 181 | float lastEditorZoom; 182 | int lastBuildTab; 183 | int lastBuildPage; 184 | int lastBuildGroupID; 185 | 186 | GJLevelType levelType; 187 | 188 | int M_ID; 189 | std::string tempName; 190 | std::string capacityString; 191 | 192 | bool highObjectsEnabled; 193 | std::string personalBests; 194 | 195 | // this function is inlined on pc builds 196 | static GJGameLevel *create(); 197 | bool init(); 198 | 199 | static int getLengthKey(int levelDistance); 200 | static std::string lengthKeyToString(int lengthKey); 201 | 202 | bool canEncode(); 203 | std::string getSongName(); 204 | void levelWasAltered(); 205 | void levelWasSubmitted(); 206 | void savePercentage(int percentage, bool practiceMode); 207 | void savePercentage(int,bool isPractice,int,int,bool); 208 | 209 | void setNormalPercent(int); 210 | void setNewNormalPercent(int); 211 | void setNewNormalPercent2(int); 212 | int getNormalPercent(); 213 | void setStars(int); 214 | void setDemon(int); 215 | void setLevelID(int); 216 | void setAttempts(int); 217 | cocos2d::CCString* getCoinKey(int); 218 | void setJumps(int); 219 | }; 220 | 221 | 222 | 223 | #endif 224 | -------------------------------------------------------------------------------- /sprite_nodes/GameObject.h: -------------------------------------------------------------------------------- 1 | #ifndef __GAMEOBJECT_H__ 2 | #define __GAMEOBJECT_H__ 3 | 4 | #include 5 | 6 | 7 | class CCSpritePlus; 8 | 9 | // jesus fucking christ (painfully written by @hjfod) 10 | enum GameObjectType { 11 | kGameObjectTypeSolid = 0, 12 | kGameObjectTypeHazard = 2, 13 | kGameObjectTypeInverseGravityPortal = 3, 14 | kGameObjectTypeNormalGravityPortal = 4, 15 | kGameObjectTypeShipPortal = 5, 16 | kGameObjectTypeCubePortal = 6, 17 | kGameObjectTypeDecoration = 7, 18 | kGameObjectTypeYellowJumpPad = 8, 19 | kGameObjectTypePinkJumpPad = 9, 20 | kGameObjectTypeGravityPad = 10, 21 | kGameObjectTypeYellowJumpRing = 11, 22 | kGameObjectTypePinkJumpRing = 12, 23 | kGameObjectTypeGravityRing = 13, 24 | kGameObjectTypeInverseMirrorPortal = 14, 25 | kGameObjectTypeNormalMirrorPortal = 15, 26 | kGameObjectTypeBallPortal = 16, 27 | kGameObjectTypeRegularSizePortal = 17, 28 | kGameObjectTypeMiniSizePortal = 18, 29 | kGameObjectTypeUfoPortal = 19, 30 | kGameObjectTypeModifier = 20, 31 | kGameObjectTypeSecretCoin = 22, 32 | kGameObjectTypeDualPortal = 23, 33 | kGameObjectTypeSoloPortal = 24, 34 | kGameObjectTypeSlope = 25, 35 | kGameObjectTypeWavePortal = 26, 36 | kGameObjectTypeRobotPortal = 27, 37 | kGameObjectTypeTeleportPortal = 28, 38 | kGameObjectTypeCollectible = 30, 39 | kGameObjectTypeUserCoin = 31, 40 | kGameObjectTypeDropRing = 32, 41 | kGameObjectTypeSpiderPortal = 33, 42 | kGameObjectTypeRedJumpPad = 34, 43 | kGameObjectTypeRedJumpRing = 35, 44 | kGameObjectTypeCustomRing = 36, 45 | kGameObjectTypeDashRing = 37, 46 | kGameObjectTypeGravityDashRing = 38, 47 | kGameObjectTypeCollisionObject = 39, 48 | kGameObjectTypeSpecial = 40, 49 | }; 50 | 51 | class GJSpriteColor; 52 | class ColorActionSprite; 53 | class GJEffectManager; 54 | 55 | class GJSpriteColor; 56 | class ColorActionSprite; 57 | class GJEffectManager; 58 | 59 | #pragma runtime_checks("s", off) 60 | class GameObject : public CCSpritePlus { 61 | public: 62 | PAD(100) 63 | PAD(44); 64 | bool m_unk21C; 65 | bool m_unk21D; 66 | bool m_unk21E; 67 | PAD(13); 68 | cocos2d::CCPoint m_startPosOffset; //0x22C 69 | PAD(4); 70 | bool m_unk238; 71 | bool m_isFlippedX; //0x239 72 | bool m_isFlippedY; //0x23A 73 | PAD(1); 74 | cocos2d::CCPoint m_boxOffset; //0x23C 75 | bool m_isOriented; //0x244 idek what this is 76 | PAD(3); 77 | cocos2d::CCPoint m_unk248; // related to box offset 78 | PAD(4); 79 | bool m_unk254; 80 | PAD(11); 81 | cocos2d::CCAction* m_action; //0x260 82 | PAD(4); 83 | cocos2d::CCSize m_objectSize; //0x268 84 | bool m_unk270; 85 | bool m_unk271; 86 | bool m_unk272; 87 | PAD(1); 88 | cocos2d::CCParticleSystemQuad* m_particleSystem; 89 | std::string m_effectPlistName; //0x278 90 | PAD(32); 91 | bool m_unk2B0; // has custom scale or moved idfk 92 | PAD(7); 93 | cocos2d::CCRect m_objectRect2; //0x2B8 94 | bool m_isObjectRectDirty; //0x2C8 95 | bool m_isOrientedRectDirty; //0x2C9 96 | bool m_hasBeenActivated; //0x2CA 97 | bool m_hasBeenActivatedP2; //0x2CB 98 | PAD(24); 99 | cocos2d::CCSprite* m_unkSprite; //0x2E4 100 | PAD(8); 101 | bool m_isRotatedSide; //0x2F0 for 90 and 270 degrees rotations 102 | PAD(3); 103 | float m_unk2F4; 104 | float m_unk2F8; 105 | int m_uniqueID; //0x2FC 106 | GameObjectType m_objectType; //0x300 107 | int m_section; //0x304 108 | PAD(4); 109 | cocos2d::CCPoint m_startPosition; //0x30C 110 | std::string m_textureName; //0x314 111 | bool m_unk32C; 112 | bool m_unk32D; 113 | PAD(14); 114 | float m_unk33C; 115 | float m_unk340; 116 | PAD(16); 117 | bool m_isGlowDisabled; //0x354 118 | PAD(7); 119 | float m_scale; //0x35C 120 | int m_objectID; //0x360 121 | PAD(4); 122 | bool m_unk368; 123 | bool m_unk369; 124 | bool m_unk36A; 125 | bool m_isDontEnter; //0x36B 126 | bool m_isDontFade; //0x36C 127 | PAD(31); 128 | bool m_unk38C; 129 | bool m_unk38D; 130 | bool m_unk38E; 131 | PAD(1); 132 | float m_unk390; 133 | PAD(20); 134 | GJSpriteColor* m_baseColor; //0x3A8 135 | GJSpriteColor* m_detailColor; //0x3AC 136 | PAD(8); 137 | int m_zLayer; //0x3B8 138 | int m_zOrder; //0x3BC 139 | std::string m_unk3C0; 140 | bool m_unk3D8; 141 | bool m_unk3D9; 142 | bool m_isSelected; //0x3DA 143 | PAD(1); 144 | int m_globalClickCounter; //0x3DC i have no idea what this is for 145 | PAD(12); 146 | float m_multiScaleMultiplier; 147 | bool m_isGroupParent; //0x3F0 148 | PAD(3); 149 | short* m_groups; //0x3F4 150 | short m_groupCount; //0x3F8 151 | PAD(18); 152 | int m_editorLayer; //0x40C 153 | int m_editorLayer2; //0x410 154 | PAD(16); 155 | cocos2d::CCPoint m_firstPosition; //0x424 first position from when its placed in the editor 156 | PAD(28); 157 | bool m_isHighDetail; //0x448 158 | PAD(3); 159 | ColorActionSprite* m_colorActionSprite1; //0x44C 160 | ColorActionSprite* m_colorActionSprite2; //0x450 161 | GJEffectManager* m_effectManager; //0x454 162 | PAD(16); 163 | 164 | //CCNode vtable 165 | virtual void setScaleX(float scale); 166 | virtual void setScaleY(float scale) ; 167 | virtual void setScale(float scale) ; 168 | virtual void setPosition(const cocos2d::CCPoint& pos); 169 | virtual void setVisible(bool visible) ; 170 | virtual void setRotation(float rotation); 171 | virtual bool initWithTexture(cocos2d::CCTexture2D* texture) ; 172 | virtual void setChildColor(const cocos2d::ccColor3B& color); 173 | 174 | //CCRGBAProtocol vtable 175 | virtual void setOpacity(GLubyte opacity); 176 | static GameObject* createWithFrame(const char* frame) ; 177 | static GameObject* objectFromString(std::string str, bool unknown) ; 178 | 179 | void deselectObject(); 180 | 181 | std::string getSaveString() ; 182 | void addToGroup(int id); 183 | void updateCustomScale(float scale); 184 | // this is actually a virtual but i cant be bothered to get it in the right place 185 | void setRScale(float scale) ; 186 | }; 187 | #pragma runtime_checks("s", restore) 188 | 189 | 190 | #endif -------------------------------------------------------------------------------- /manager_nodes/GameManager.h: -------------------------------------------------------------------------------- 1 | #ifndef __GAMEMANAGER_H__ 2 | #define __GAMEMANAGER_H__ 3 | 4 | #include 5 | 6 | #define PLAYER_ICON_FUNC(x) void setPlayer##x(int v) { m_nPlayer##x = v; __STR_CAT__(m_nPlayer##x,Rand1) = v + __STR_CAT__(m_nPlayer##x,Rand2); } 7 | 8 | enum IconType { 9 | kIconTypeCube = 0, 10 | kIconTypeShip = 1, 11 | kIconTypeBall = 2, 12 | kIconTypeUfo = 3, 13 | kIconTypeWave = 4, 14 | kIconTypeRobot = 5, 15 | kIconTypeSpider = 6, 16 | kIconTypeDeathEffect = 98, 17 | kIconTypeSpecial = 99, 18 | }; 19 | 20 | enum UnlockType { 21 | kUnlockTypeUnknown = 0, 22 | kUnlockTypeCube = 1, 23 | kUnlockTypeColor1 = 2, 24 | kUnlockTypeColor2 = 3, 25 | kUnlockTypeShip = 4, 26 | kUnlockTypeBall = 5, 27 | kUnlockTypeUfo = 6, 28 | kUnlockTypeWave = 7, 29 | kUnlockTypeRobot = 8, 30 | kUnlockTypeSpider = 9, 31 | kUnlockTypeSpecial = 10, 32 | kUnlockTypeDeathEffect = 11, 33 | kUnlockTypeGlow = 12, 34 | }; 35 | 36 | class PlayLayer; 37 | 38 | class GameManager : public GManager { 39 | public: 40 | bool m_bSwitchModes; 41 | bool m_bToFullscreen; 42 | bool m_bReloading; 43 | bool m_bUnknown; 44 | PAD(4); 45 | cocos2d::CCDictionary* m_pValueKeeper; 46 | cocos2d::CCDictionary* m_pUnlockValueKeeper; 47 | cocos2d::CCDictionary* m_pCustomObjectDict; 48 | PAD(4); 49 | double m_dUnknown; 50 | PAD(16); 51 | double m_dUnknown2; 52 | //PAD(8); // tolto per funzionare con android! 53 | bool m_bLoaded; //? 54 | std::string m_sUnknown; 55 | PlayLayer* m_pPlayLayer; 56 | PAD(24); 57 | std::string m_sPlayerUDID; 58 | std::string m_sPlayerName; 59 | bool m_bCommentsEnabled; 60 | int m_nPlayerUserIDRand1; 61 | int m_nPlayerUserIDRand2; 62 | int m_nPlayerUserID; 63 | float m_fBackgroundMusicVolume; 64 | float m_fEffectsVolume; 65 | int m_nTimeOffset; 66 | PAD(28); 67 | int m_nPlayerFrameRand1; 68 | int m_nPlayerFrameRand2; 69 | int m_nPlayerFrame; 70 | int m_nPlayerShipRand1; 71 | int m_nPlayerShipRand2; 72 | int m_nPlayerShip; 73 | int m_nPlayerBallRand1; 74 | int m_nPlayerBallRand2; 75 | int m_nPlayerBall; 76 | int m_nPlayerBirdRand1; 77 | int m_nPlayerBirdRand2; 78 | int m_nPlayerBird; 79 | int m_nPlayerDartRand1; 80 | int m_nPlayerDartRand2; 81 | int m_nPlayerDart; 82 | int m_nPlayerRobotRand1; 83 | int m_nPlayerRobotRand2; 84 | int m_nPlayerRobot; 85 | int m_nPlayerSpiderRand1; 86 | int m_nPlayerSpiderRand2; 87 | int m_nPlayerSpider; 88 | int m_nPlayerColorRand1; 89 | int m_nPlayerColorRand2; 90 | int m_nPlayerColor; 91 | int m_nPlayerColor2Rand1; 92 | int m_nPlayerColor2Rand2; 93 | int m_nPlayerColor2; 94 | int m_nPlayerStreakRand1; 95 | int m_nPlayerStreakRand2; 96 | int m_nPlayerStreak; 97 | int m_nPlayerDeathEffectRand1; 98 | int m_nPlayerDeathEffectRand2; 99 | int m_nPlayerDeathEffect; 100 | PAD(8); 101 | int m_nSecretNumberRand1; //? may be named differently 102 | int m_nSecretNumberRand2; 103 | bool m_bPlayerGlow; 104 | int m_nPlayerIconType; 105 | bool m_bUnknown2; 106 | bool m_bShowSongMarkers; 107 | bool m_bShowBPMMarkers; 108 | bool m_bRecordGameplay; 109 | bool m_bShowProgressBar; 110 | bool m_bPerformanceMode; 111 | bool m_bClickedGarage; 112 | bool m_bClickedEditor; 113 | bool m_bClickedName; 114 | bool m_bClickedPractice; 115 | bool m_bShowedEditorGuide; 116 | bool m_bShowedRateDiffDialog; 117 | bool m_bShowedRateStarDialog; 118 | bool m_bShowedLowDetailDialog; 119 | PAD(48); 120 | int m_nBootups; 121 | bool m_bHasRatedGame; 122 | PAD(3); 123 | bool m_bGameCenterEnabled; 124 | bool m_bSmoothFix; 125 | PAD(16); 126 | int m_nResolution; 127 | cocos2d::TextureQuality m_eQuality; //more after that i havent re'd 128 | 129 | 130 | 131 | PlayLayer* getPlayLayer(){ 132 | return *((PlayLayer**)((long)this + 312)); 133 | } 134 | 135 | 136 | ~GameManager(); 137 | 138 | static GameManager *sharedState(); 139 | bool init(); 140 | 141 | 142 | 143 | cocos2d::ccColor3B colorForIdx(int); 144 | 145 | //setter 146 | int setPlayerShip(int); 147 | int setPlayerBall(int); 148 | int setPlayerBird(int); 149 | int setPlayerDart(int); 150 | int setPlayerRobot(int); 151 | int setPlayerSpider(int); 152 | int setPlayerColor(int); 153 | int setPlayerColor2(int); 154 | int setPlayerStreak(int); 155 | int setPlayerDeathEffect(int); 156 | int setGameVariable(const char *,bool); 157 | int setUGV(const char *,bool); 158 | int setIntGameVariable(const char *,int); 159 | int setPlayerFrame(int Frame); 160 | int setPlayerUserID(int userID); 161 | int setHasRatingPower(int ratingPower); 162 | 163 | 164 | void doQuickSave(); 165 | 166 | //getter 167 | int getGameVariable(const char* variable); 168 | 169 | void reloadAll(bool,bool,bool); 170 | 171 | 172 | bool toggleGameVariable(const char * variable); 173 | 174 | const char *colorKey(int colorIdx, bool mainColor); 175 | bool isColorUnlocked(int colorIdx, bool mainColor); 176 | void unlockColor(int colorIdx, bool mainColor); 177 | const char *iconKey(int iconIdx); 178 | bool isIconUnlocked(int, IconType); 179 | void unlockIcon(int iconIdx); 180 | cocos2d::CCDictionary *valueKeeper_; 181 | void reportPercentageForLevel(int level, int percentage, bool practiceMode); 182 | void reportAchievementWithID(const char *achievementID, int percentage,bool showAchievementPopup); 183 | void completedAchievement(const char *achievementID); 184 | 185 | void fadeInMusic(const char *a2) ; 186 | 187 | inline int getPlayerBall() const 188 | { 189 | return *reinterpret_cast(reinterpret_cast(this) + 0x1B8); 190 | } 191 | 192 | inline int getPlayerBird() const 193 | { 194 | return *reinterpret_cast(reinterpret_cast(this) + 0x1C4); 195 | } 196 | 197 | inline int getPlayerColor() const 198 | { 199 | return *reinterpret_cast(reinterpret_cast(this) + 0x1F4); 200 | } 201 | 202 | inline int getPlayerColor2() const 203 | { 204 | return *reinterpret_cast(reinterpret_cast(this) + 0x200); 205 | } 206 | 207 | inline int getPlayerDeathEffect() const 208 | { 209 | return *reinterpret_cast(reinterpret_cast(this) + 0x218); 210 | } 211 | 212 | inline int getPlayerFrame() const 213 | { 214 | return *reinterpret_cast(reinterpret_cast(this) + 0x1A0); 215 | } 216 | 217 | inline int getPlayerShip() const 218 | { 219 | return *reinterpret_cast(reinterpret_cast(this) + 0x1AC); 220 | } 221 | 222 | inline int getPlayerDart() const 223 | { 224 | return *reinterpret_cast(reinterpret_cast(this) + 0x1D0); 225 | } 226 | 227 | inline int getPlayerRobot() const 228 | { 229 | return *reinterpret_cast(reinterpret_cast(this) + 0x1DC); 230 | } 231 | 232 | inline int getPlayerSpider() const 233 | { 234 | return *reinterpret_cast(reinterpret_cast(this) + 0x1E8); 235 | } 236 | 237 | inline int getPlayerStreak() const 238 | { 239 | return *reinterpret_cast(reinterpret_cast(this) + 0x20C); 240 | } 241 | 242 | inline IconType getPlayerIconType() const 243 | { 244 | return *reinterpret_cast(reinterpret_cast(this) + 0x230); 245 | } 246 | inline void setPlayerIconType(IconType n_type) 247 | { 248 | auto icontype_ptr = reinterpret_cast(reinterpret_cast(this) + 0x230); 249 | *icontype_ptr = n_type; 250 | }; 251 | 252 | inline bool getPlayerGlow() const 253 | { 254 | return *reinterpret_cast(reinterpret_cast(this) + 0x22C); 255 | } 256 | inline void setPlayerGlow(bool n_glow) 257 | { 258 | auto glow_ptr = reinterpret_cast(reinterpret_cast(this) + 0x22C); 259 | *glow_ptr = n_glow; 260 | }; 261 | }; 262 | 263 | #endif --------------------------------------------------------------------------------