MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / Recruit_Loop

Method Recruit_Loop

Source/Recruits.cpp:1250–1346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1248}
1249
1250bool cFodder::Recruit_Loop() {
1251
1252 mRecruit_Screen_Active = true;
1253 mSurface->clearBuffer();
1254
1255 // If demo data is loaded, we need to load
1256 if (mVersionCurrent->isDemo()) {
1257
1258 if (mCustom_Mode == eCustomMode_Set) {
1259 VersionSwitch(mVersionDefault);
1260 }
1261 // Failed to switch mode?
1262 if (mVersionCurrent->isDemo())
1263 return 0;
1264 }
1265
1266 mWindow->SetScreenSize(mVersionCurrent->GetScreenSize());
1267
1268 Mouse_Setup();
1269
1270 Sidebar_Clear_ScreenBufferPtr();
1271 Recruit_Prepare();
1272
1273 mGUI_Mouse_Modifier_X = 0;
1274 mGUI_Mouse_Modifier_Y = 0x1D;
1275
1276 mMouseCursor_Enabled = -1;
1277
1278 Recruit_Prepare_Anims();
1279
1280 Recruit_Update_Actors();
1281 Recruit_Update_Actors();
1282
1283 mMouse_Exit_Loop = false;
1284
1285 mSurfaceRecruit->copyFrom(mSurface);
1286 mInterruptCallback = [this]() {
1287
1288 int16 DataC = PLATFORM_BASED(0xB6, 0xBE);
1289 GUI_Draw_Frame_8(0x22, mRecruit_Truck_Frame, 0x31, DataC);
1290
1291 Recruit_Draw_Soldiers();
1292 mGraphics->Sidebar_Copy_To_Surface(0x18);
1293
1294 if (mVersionCurrent->isPC())
1295 mGraphics->Recruit_Draw_HomeAway();
1296
1297 if (mMouseCursor_Enabled)
1298 Mouse_DrawCursor();
1299
1300 if (mSurface->isPaletteAdjusting())
1301 mSurface->palette_FadeTowardNew();
1302
1303 mSurfaceRecruit->copyFrom(mSurface);
1304 };
1305
1306 for (;; ) {
1307 {

Callers

nothing calls this directly

Calls 11

clearBufferMethod · 0.80
isDemoMethod · 0.80
SetScreenSizeMethod · 0.80
copyFromMethod · 0.80
isPCMethod · 0.80
isPaletteAdjustingMethod · 0.80
palette_FadeTowardNewMethod · 0.80
paletteNew_SetToBlackMethod · 0.80
GetScreenSizeMethod · 0.45
Recruit_Draw_HomeAwayMethod · 0.45

Tested by

no test coverage detected