Skip to content

Commit e9cfc1c

Browse files
authored
Member test improve (#1270)
* add inline sources to build too1 * move member tests to its appropriate folder * added the old ones just in case * android inline to some ctors * update broma for = inline * some inline replaces * update broma * more inline fixes * update broma, set versions for each platform * remove error limit thing
1 parent ebb565f commit e9cfc1c

24 files changed

Lines changed: 6112 additions & 811 deletions

bindings/2.2081/Cocos2d.bro

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3900,7 +3900,7 @@ class cocos2d::CCSpawn : cocos2d::CCActionInterval {
39003900

39013901
static cocos2d::CCSpawn* create(cocos2d::CCArray* arrayOfActions) = imac 0x3b6ef0, m1 0x3399ec, ios inline;
39023902
// static cocos2d::CCSpawn* create(cocos2d::CCFiniteTimeAction*, ...) = m1 0x33e430, imac 0x3b9e30;
3903-
static cocos2d::CCSpawn* create(cocos2d::CCFiniteTimeAction* first, ...) = imac inline, m1 inline, win inline;
3903+
static cocos2d::CCSpawn* create(cocos2d::CCFiniteTimeAction* first, ...) = inline;
39043904
static cocos2d::CCSpawn* createWithTwoActions(cocos2d::CCFiniteTimeAction*, cocos2d::CCFiniteTimeAction*) = imac 0x3b6e60, m1 0x339960;
39053905

39063906
virtual cocos2d::CCObject* copyWithZone(cocos2d::CCZone*) = imac 0x3b74a0, m1 0x339ef4;
@@ -5401,8 +5401,8 @@ class cocos2d::extension::CCControlButton : cocos2d::extension::CCControl {
54015401

54025402
[[link(win, android)]]
54035403
class cocos2d::extension::CCControlColourPicker : cocos2d::extension::CCControl {
5404-
CCControlColourPicker() = imac inline, m1 inline, win inline;
5405-
virtual ~CCControlColourPicker() = imac inline, m1 inline, win inline;
5404+
CCControlColourPicker() = inline;
5405+
virtual ~CCControlColourPicker() = inline;
54065406

54075407
static cocos2d::extension::CCControlColourPicker* colourPicker() = imac 0x355d60, m1 0x2e2214;
54085408

@@ -5411,7 +5411,7 @@ class cocos2d::extension::CCControlColourPicker : cocos2d::extension::CCControl
54115411
virtual void setColorValue(cocos2d::ccColor3B const&) = m1 0x2e22a8, imac 0x355e30;
54125412

54135413
void colourSliderValueChanged(cocos2d::CCObject*, unsigned int) = imac 0x355b30, m1 0x2e2064;
5414-
cocos2d::ccColor3B const& getColorValue() const = imac inline, m1 inline, win inline;
5414+
cocos2d::ccColor3B const& getColorValue() const = inline;
54155415
void hueSliderValueChanged(cocos2d::CCObject*, unsigned int) = imac 0x355a00, m1 0x2e1f80;
54165416
void updateControlPicker() = imac 0x355f80, m1 0x2e23a0, ios inline;
54175417
void updateHueAndControlPicker() = imac 0x355c10, m1 0x2e2120;
@@ -5839,7 +5839,7 @@ class cocos2d::ZipUtils {
58395839
static gd::string decompressString(gd::string const& data, bool encrypt, int encryptionKey);
58405840
static gd::string decompressString2(unsigned char* data, bool encrypt, int size, int encryptionKey) = m1 0x1b14a0;
58415841
static gd::string encryptDecrypt(gd::string const& data, int encryptionKey);
5842-
static gd::string encryptDecryptWKey(gd::string const&, gd::string) = imac inline, m1 inline, win inline;
5842+
static gd::string encryptDecryptWKey(gd::string const&, gd::string) = inline;
58435843
static unsigned char hexToChar(gd::string const&);
58445844
static gd::string urlDecode(gd::string const&);
58455845
}
@@ -5934,6 +5934,6 @@ class pugi::xml_document : pugi::xml_node {
59345934
[[link(android)]]
59355935
class pugi::xml_node {
59365936
// i'm not bothering
5937-
xml_node() = imac inline, m1 inline, win inline;
5937+
xml_node() = inline;
59385938
}
59395939

bindings/2.2081/GeometryDash.bro

Lines changed: 788 additions & 788 deletions
Large diffs are not rendered by default.

codegen/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ project(Codegen LANGUAGES C CXX)
44
include(../cmake/CPM.cmake)
55

66
CPMAddPackage("gh:fmtlib/fmt#11.0.2")
7-
CPMAddPackage("gh:geode-sdk/Broma#6157d12")
7+
CPMAddPackage("gh:geode-sdk/Broma#397eecb")
88
CPMAddPackage("gh:geode-sdk/json@3.2.1")
99

1010
target_compile_definitions(fmt PUBLIC -DFMT_CONSTEVAL=)

test/members/2.206/Android32.cpp

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
#include <Common.hpp>
2+
3+
#ifdef GEODE_IS_ANDROID32
4+
5+
using namespace geode::prelude;
6+
7+
// Add known android struct members here
8+
9+
GEODE_SIZE_CHECK(CCObject, 0x34);
10+
GEODE_SIZE_CHECK(CCNode, 0x108);
11+
GEODE_SIZE_CHECK(CCNodeRGBA, 0x118);
12+
GEODE_SIZE_CHECK(CCLayer, 0x13c);
13+
GEODE_SIZE_CHECK(CCLayerRGBA, 0x14c);
14+
GEODE_SIZE_CHECK(CCLayerColor, 0x1b8);
15+
GEODE_SIZE_CHECK(CCSprite, 0x1fc);
16+
17+
GEODE_SIZE_CHECK(CCMenu, 0x154);
18+
GEODE_SIZE_CHECK(CCMenuItem, 0x12c);
19+
GEODE_SIZE_CHECK(CCMenuItemSprite, 0x138);
20+
21+
GEODE_SIZE_CHECK(CCScale9Sprite, 0x1a4);
22+
23+
GEODE_SIZE_CHECK(FLAlertLayer, 0x1f0);
24+
GEODE_SIZE_CHECK(BoomListView, 0x164);
25+
GEODE_SIZE_CHECK(CustomListView, 0x168);
26+
GEODE_SIZE_CHECK(CCMenuItemSpriteExtra, 0x174);
27+
GEODE_SIZE_CHECK(LoadingLayer, 0x15c);
28+
GEODE_SIZE_CHECK(GJDropDownLayer, 0x1e0);
29+
GEODE_SIZE_CHECK(TableViewCell, 0x19c);
30+
GEODE_SIZE_CHECK(Slider, 0x158);
31+
GEODE_SIZE_CHECK(SliderTouchLogic, 0x174);
32+
GEODE_SIZE_CHECK(CCScrollLayerExt, 0x184);
33+
GEODE_SIZE_CHECK(TableView, 0x1dc);
34+
GEODE_SIZE_CHECK(CCTextInputNode, 0x1a0);
35+
GEODE_SIZE_CHECK(CCTouchDispatcher, 0x6c);
36+
GEODE_SIZE_CHECK(CCSpritePlus, 0x208);
37+
38+
// GEODE_MEMBER_CHECK(CCTouchDispatcher, m_forcePrio, 0x60);
39+
40+
GEODE_MEMBER_CHECK(CCTextInputNode, m_maxLabelWidth, 0x164);
41+
GEODE_MEMBER_CHECK(CCTextInputNode, m_textField, 0x17c);
42+
GEODE_MEMBER_CHECK(FLAlertLayer, m_buttonMenu, 0x1b8);
43+
GEODE_MEMBER_CHECK(FLAlertLayer, m_mainLayer, 0x1c8);
44+
GEODE_MEMBER_CHECK(TableView, m_cellArray, 0x1b0);
45+
GEODE_MEMBER_CHECK(TableViewCell, m_indexPath, 0x144);
46+
GEODE_MEMBER_CHECK(TableViewCell, m_unknownString, 0x184);
47+
GEODE_MEMBER_CHECK(TableViewCell, m_backgroundLayer, 0x190);
48+
GEODE_SIZE_CHECK(CCBlockLayer, 0x1bc);
49+
50+
51+
GEODE_SIZE_CHECK(GJBaseGameLayer, 0x2d68);
52+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_player1, 0x894);
53+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_player2, 0x898);
54+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_groupDict, 0x95c);
55+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_unknownE38, 0x98c);
56+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_massiveFloatArray, 0xa48);
57+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_particlesDict, 0x2a04);
58+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_customParticles, 0x2a08);
59+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_unclaimedParticles, 0x2a0c);
60+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_claimedParticles, 0x2a2c);
61+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_temporaryParticles, 0x2a30);
62+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_attempts, 0x29d4);
63+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_gradientLayers, 0x2a50);
64+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_startPosObject, 0x2a60);
65+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_unk2a84, 0x2aa4);
66+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_audioEffectsLayer, 0x2b04);
67+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_queuedButtons, 0x2b5c);
68+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_uiLayer, 0x2c10);
69+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_sections, 0x2c34);
70+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_sectionSizes, 0x2c88);
71+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_audioVisualizerBG, 0x2ce4);
72+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_loadingLayer, 0x2d54);
73+
GEODE_MEMBER_CHECK(GJBaseGameLayer, m_debugDrawNode, 0x2d58);
74+
// GEODE_MEMBER_CHECK(GJBaseGameLayer, m_started, 0x2c28); // i dont even know anymore
75+
76+
GEODE_SIZE_CHECK(PlayLayer, 0x2f60);
77+
GEODE_MEMBER_CHECK(PlayLayer, m_circleWaveArray, 0x2e24);
78+
GEODE_MEMBER_CHECK(PlayLayer, m_attemptLabel, 0x2e38);
79+
GEODE_MEMBER_CHECK(PlayLayer, m_progressBar, 0x2e44);
80+
GEODE_MEMBER_CHECK(PlayLayer, m_jumps, 0x2e8c);
81+
GEODE_MEMBER_CHECK(PlayLayer, m_hasCompletedLevel, 0x2e99);
82+
GEODE_MEMBER_CHECK(PlayLayer, m_isPaused, 0x2eff);
83+
84+
GEODE_SIZE_CHECK(DrawGridLayer, 0x1c0);
85+
GEODE_MEMBER_CHECK(DrawGridLayer, m_editorLayer, 0x17c);
86+
GEODE_MEMBER_CHECK(DrawGridLayer, m_gridSize, 0x1bc);
87+
88+
GEODE_SIZE_CHECK(LevelEditorLayer, 0x2f48);
89+
GEODE_MEMBER_CHECK(LevelEditorLayer, m_trailTimer, 0x2e04);
90+
GEODE_MEMBER_CHECK(LevelEditorLayer, m_drawGridLayer, 0x2e24);
91+
92+
GEODE_SIZE_CHECK(GameObject, 0x488);
93+
GEODE_MEMBER_CHECK(GameObject, m_particleString, 0x298);
94+
95+
GEODE_SIZE_CHECK(EnhancedGameObject, 0x4f0);
96+
GEODE_SIZE_CHECK(EffectGameObject, 0x668);
97+
GEODE_SIZE_CHECK(TextGameObject, 0x490);
98+
GEODE_SIZE_CHECK(SmartGameObject, 0x490);
99+
GEODE_SIZE_CHECK(ParticleGameObject, 0x618);
100+
GEODE_SIZE_CHECK(SpecialAnimGameObject, 0x4f0);
101+
GEODE_SIZE_CHECK(RingObject, 0x668);
102+
GEODE_SIZE_CHECK(StartPosObject, 0x668);
103+
GEODE_SIZE_CHECK(LabelGameObject, 0x690);
104+
GEODE_SIZE_CHECK(TeleportPortalObject, 0x6a0);
105+
106+
GEODE_SIZE_CHECK(PlayerObject, 0x9c8);
107+
GEODE_MEMBER_CHECK(PlayerObject, m_particleSystems, 0x580);
108+
GEODE_MEMBER_CHECK(PlayerObject, m_isHidden, 0x5cb);
109+
GEODE_MEMBER_CHECK(PlayerObject, m_ghostTrail, 0x5d0);
110+
GEODE_MEMBER_CHECK(PlayerObject, m_waveTrail, 0x610);
111+
GEODE_MEMBER_CHECK(PlayerObject, m_trailingParticleLife, 0x630);
112+
GEODE_MEMBER_CHECK(PlayerObject, m_padRingRelated, 0x640);
113+
GEODE_MEMBER_CHECK(PlayerObject, m_gv0096, 0x68a);
114+
GEODE_MEMBER_CHECK(PlayerObject, m_ringRelatedSet, 0x6a4);
115+
GEODE_MEMBER_CHECK(PlayerObject, m_objectSnappedTo, 0x6c0);
116+
GEODE_MEMBER_CHECK(PlayerObject, m_spiderSprite, 0x6d0);
117+
GEODE_MEMBER_CHECK(PlayerObject, m_playerGroundParticles, 0x6d8);
118+
GEODE_MEMBER_CHECK(PlayerObject, m_landParticles1, 0x704);
119+
GEODE_MEMBER_CHECK(PlayerObject, m_hasCustomGlowColor, 0x770);
120+
GEODE_MEMBER_CHECK(PlayerObject, m_isDart, 0x7ac);
121+
GEODE_MEMBER_CHECK(PlayerObject, m_vehicleSize, 0x7e0);
122+
GEODE_MEMBER_CHECK(PlayerObject, m_playerSpeed, 0x7e4);
123+
GEODE_MEMBER_CHECK(PlayerObject, m_shipRotation, 0x7e8);
124+
GEODE_MEMBER_CHECK(PlayerObject, m_lastGroundedPos, 0x81c);
125+
GEODE_MEMBER_CHECK(PlayerObject, m_touchingRings, 0x824);
126+
GEODE_MEMBER_CHECK(PlayerObject, m_position, 0x850);
127+
GEODE_MEMBER_CHECK(PlayerObject, m_playerFollowFloats, 0x880);
128+
GEODE_MEMBER_CHECK(PlayerObject, m_platformerXVelocity, 0x8a8);
129+
GEODE_MEMBER_CHECK(PlayerObject, m_isPlatformer, 0x920);
130+
GEODE_MEMBER_CHECK(PlayerObject, m_currentRobotAnimation, 0x988);
131+
GEODE_MEMBER_CHECK(PlayerObject, m_gameLayer, 0x9a8);
132+
GEODE_MEMBER_CHECK(PlayerObject, m_parentLayer, 0x9ac);
133+
GEODE_MEMBER_CHECK(PlayerObject, m_actionManager, 0x9b0);
134+
135+
136+
137+
// following are from 2.205 so might not all be right
138+
139+
GEODE_SIZE_CHECK(FMODAudioEngine, 0x4b0);
140+
GEODE_SIZE_CHECK(FMODAudioState, 0x1c8);
141+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_musicVolume, 0x15c);
142+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_sfxVolume, 0x160);
143+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_pulse1, 0x16c);
144+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_pulse2, 0x170);
145+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_pulse3, 0x174);
146+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_metering, 0x17c);
147+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_system, 0x184);
148+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_mainDSP, 0x188);
149+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_globalChannelDSP, 0x18c);
150+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_globalChannel, 0x190);
151+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_channelGroup2, 0x194);
152+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_lastResult, 0x198);
153+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_sampleRate, 0x19c);
154+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_reducedQuality, 0x1a0);
155+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_audioState, 0x1b0);
156+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_unkSoundVector, 0x378);
157+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_queuedEffects, 0x430);
158+
GEODE_MEMBER_CHECK(FMODAudioEngine, m_unkMapIntChannelGroup474, 0x474);
159+
160+
GEODE_MEMBER_CHECK(GameManager, m_playLayer, 0x16c);
161+
GEODE_MEMBER_CHECK(GameManager, m_gameLayer, 0x174);
162+
163+
GEODE_MEMBER_CHECK(EditorUI, m_selectedObjects, 0x260);
164+
GEODE_MEMBER_CHECK(EditorUI, m_selectedObject, 0x370);
165+
GEODE_MEMBER_CHECK(EditorUI, m_buttonBar, 0x1c0);
166+
GEODE_MEMBER_CHECK(EditorUI, m_transformControl, 0x218);
167+
GEODE_MEMBER_CHECK(EditorUI, m_editButtonBar, 0x22c);
168+
GEODE_MEMBER_CHECK(EditorUI, m_positionSlider, 0x230);
169+
GEODE_MEMBER_CHECK(EditorUI, m_transformState, 0x174);
170+
GEODE_MEMBER_CHECK(EditorUI, m_editButtonBar, 0x22c);
171+
GEODE_MEMBER_CHECK(EditorUI, m_positionSlider, 0x230);
172+
GEODE_MEMBER_CHECK(EditorUI, m_selectedObjects, 0x260);
173+
GEODE_MEMBER_CHECK(EditorUI, m_selectedMode, 0x338);
174+
GEODE_MEMBER_CHECK(EditorUI, m_selectedObject, 0x370);
175+
176+
GEODE_MEMBER_CHECK(GameObject, m_hasExtendedCollision, 0x218);
177+
GEODE_MEMBER_CHECK(GameObject, m_scaleX, 0x3e8);
178+
179+
GEODE_SIZE_CHECK(SetupTriggerPopup, 0x2a8);
180+
GEODE_SIZE_CHECK(GJOptionsLayer, 0x2d8);
181+
182+
GEODE_MEMBER_CHECK(ColorSelectPopup, m_colorAction, 0x2f0);
183+
184+
GEODE_MEMBER_CHECK(ChallengesPage, m_dots, 0x1FC);
185+
GEODE_MEMBER_CHECK(ChallengesPage, m_challengeNodes, 0x210);
186+
187+
GEODE_MEMBER_CHECK(GJEffectManager, m_colorActionDict, 0x198);
188+
189+
GEODE_MEMBER_CHECK(HardStreak, m_pointArray, 0x158);
190+
191+
GEODE_MEMBER_CHECK(GJShaderState, m_time, 0x38);
192+
GEODE_MEMBER_CHECK(GJShaderState, m_prevTime, 0x40);
193+
GEODE_MEMBER_CHECK(GJShaderState, m_lensCircleTintR, 0x176);
194+
GEODE_MEMBER_CHECK(GJShaderState, m_lensCircleTintG, 0x177);
195+
GEODE_MEMBER_CHECK(GJShaderState, m_lensCircleTintB, 0x178);
196+
197+
GEODE_MEMBER_CHECK(ShaderLayer, m_shader, 0x3c4);
198+
GEODE_MEMBER_CHECK(ShaderLayer, m_gameLayer, 0x3d8);
199+
GEODE_MEMBER_CHECK(ShaderLayer, m_splitYRangeMultUniform, 0x590);
200+
201+
GEODE_MEMBER_CHECK(SetupInstantCountPopup, m_itemID, 0x2b4);
202+
203+
#endif

0 commit comments

Comments
 (0)