@@ -121,6 +121,104 @@ enum GameState
121121 STATE_SUMOREWARD = 0x24 ,
122122};
123123
124+ enum GameStage : int
125+ {
126+ STAGE_PALM_BEACH,
127+ STAGE_DEEP_LAKE,
128+ STAGE_INDUSTRIAL_COMPLEX,
129+ STAGE_ALPINE,
130+ STAGE_SNOW_MOUNTAIN,
131+ STAGE_CLOUDY_HIGHLAND,
132+ STAGE_CASTLE_WALL,
133+ STAGE_GHOST_FOREST,
134+ STAGE_CONIFEROUS_FOREST,
135+ STAGE_DESERT,
136+ STAGE_TULIP_GARDEN,
137+ STAGE_METROPOLIS,
138+ STAGE_ANCIENT_RUINS,
139+ STAGE_CAPE_WAY,
140+ STAGE_IMPERIAL_AVENUE,
141+ STAGE_BEACH,
142+ STAGE_SEQUOIA,
143+ STAGE_NIAGARA,
144+ STAGE_LAS_VEGAS,
145+ STAGE_ALASKA,
146+ STAGE_GRAND_CANYON,
147+ STAGE_SAN_FRANCISCO,
148+ STAGE_AMAZON,
149+ STAGE_MACHU_PICCHU,
150+ STAGE_YOSEMITE,
151+ STAGE_MAYA,
152+ STAGE_NEW_YORK,
153+ STAGE_PRINCE_EDWARD,
154+ STAGE_FLORIDA,
155+ STAGE_EASTER_ISLAND,
156+ STAGE_PALM_BEACH_R,
157+ STAGE_DEEP_LAKE_R,
158+ STAGE_INDUSTRIAL_COMPLEX_R,
159+ STAGE_ALPINE_R,
160+ STAGE_SNOW_MOUNTAIN_R,
161+ STAGE_CLOUDY_HIGHLAND_R,
162+ STAGE_CASTLE_WALL_R,
163+ STAGE_GHOST_FOREST_R,
164+ STAGE_CONIFEROUS_FOREST_R,
165+ STAGE_DESERT_R,
166+ STAGE_TULIP_GARDEN_R,
167+ STAGE_METROPOLIS_R,
168+ STAGE_ANCIENT_RUINS_R,
169+ STAGE_CAPE_WAY_R,
170+ STAGE_IMPERIAL_AVENUE_R,
171+ STAGE_BEACH_R,
172+ STAGE_SEQUOIA_R,
173+ STAGE_NIAGARA_R,
174+ STAGE_LAS_VEGAS_R,
175+ STAGE_ALASKA_R,
176+ STAGE_GRAND_CANYON_R,
177+ STAGE_SAN_FRANCISCO_R,
178+ STAGE_AMAZON_R,
179+ STAGE_MACHU_PICCHU_R,
180+ STAGE_YOSEMITE_R,
181+ STAGE_MAYA_R,
182+ STAGE_NEW_YORK_R,
183+ STAGE_PRINCE_EDWARD_R,
184+ STAGE_FLORIDA_R,
185+ STAGE_EASTER_ISLAND_R,
186+ STAGE_PALM_BEACH_T,
187+ STAGE_BEACH_T,
188+ STAGE_PALM_BEACH_BT,
189+ STAGE_BEACH_BT,
190+ STAGE_PALM_BEACH_BR,
191+ STAGE_BEACH_BR
192+ };
193+ static_assert (sizeof (GameStage) == 4 );
194+
195+ struct TAG_model_info
196+ {
197+ uint8_t todo[0x98 ];
198+ };
199+ static_assert (sizeof (TAG_model_info) == 0x98 );
200+
201+ struct StageTable_mb
202+ {
203+ GameStage StageUniqueName_0;
204+ int StageTableIdx_4;
205+ uint32_t field_8;
206+ uint32_t field_C;
207+ int ExtendedTime_10;
208+ TAG_model_info* CsInfoPtr_14;
209+ TAG_model_info* BrInfoPtr_18;
210+ int CsInfoId_1C;
211+ int BrInfoId_20;
212+ int ExitTableIdx_24[2 ];
213+ int ExitIDs_2C[2 ];
214+ uint8_t gap34[48 ];
215+ struct tagOthcarPercentTable * OthcarPercentTablePtr_64;
216+ void * OthcarPercentTablePtr_68;
217+ uint32_t field_6C;
218+ uint32_t field_70;
219+ uint32_t field_74;
220+ };
221+
124222enum ChrSet
125223{
126224 CHR_AUT01 = 0 ,
@@ -500,6 +598,8 @@ typedef struct tagEVWORK_CAR
500598 float field_10DC;
501599 float field_10E0;
502600 uint8_t unk_10E4[12 ];
601+
602+ inline bool is_in_bunki () { return OnRoadPlace_5C.loadColiType_0 != 0 ; }
503603} EVWORK_CAR;
504604static_assert (sizeof (EVWORK_CAR) == 0x10F0 );
505605// car0 = 0x7804B0
@@ -632,11 +732,48 @@ typedef struct TDrawBuffer
632732} DrawBuffer;
633733static_assert (sizeof (DrawBuffer) == 0x1C );
634734
635- inline void WaitForDebugger ()
735+ struct SumoNet_MatchMakingInfo
636736{
637- #ifdef _DEBUG
638- while (!IsDebuggerPresent ())
737+ uint32_t SlotCount_0;
738+ uint32_t SlotCount_4;
739+ int SlotCount_8;
740+ int SlotCount_C;
741+ char unk_field_24_10;
742+ uint8_t unk_11[3 ];
743+ uint32_t MatchType_14;
744+ uint32_t Nationality_18;
745+ uint32_t unk_field_54_1C;
746+ uint32_t unk_field_58_20;
747+ uint32_t CourseType_24;
748+ uint32_t Course_28;
749+ uint32_t unk_field_64_2C;
750+ uint32_t CarClass_30;
751+ uint32_t CarType_34;
752+ uint32_t CatchUp_38;
753+ uint32_t unk_field_74_3C;
754+ uint32_t Collision_40;
755+ uint32_t unk_field_7C_44;
756+ char LobbyName_48[16 ];
757+ };
758+ static_assert (sizeof (SumoNet_MatchMakingInfo) == 0x58 );
759+
760+ struct SumoNet_NetDriver
761+ {
762+ uint32_t vftable;
763+ uint8_t unk_4;
764+ uint8_t is_hosting_5;
765+ uint8_t unk_6;
766+ uint8_t is_online_7;
767+
768+ inline bool is_online_driver ()
639769 {
770+ // some other drivers seem to be for lan/online/etc
771+ // TODO: should probably use Module::exe_ptr here, but it's not included atm..
772+ return vftable == 0x627EB8 ;
640773 }
641- #endif
642- }
774+
775+ inline bool is_hosting_online ()
776+ {
777+ return is_online_driver () && is_hosting_5 && is_online_7;
778+ }
779+ };
0 commit comments