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

Method Recruit_Truck_Anim_Prepare

Source/Recruits.cpp:1367–1396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1365}
1366
1367void cFodder::Recruit_Truck_Anim_Prepare() {
1368 uint16* di = mRecruit_Truck_FramesPlay;
1369 int16 count;
1370
1371 // Do any troops need to enter the truck?
1372 if (mGame_Data.mGamePhase_Data.mSoldiers_Required > 0) {
1373
1374 // Welcome Troops
1375 Recruit_Truck_Anim_CopyFrames(&di, mRecruit_Truck_Anim_Welcome);
1376
1377 count = mGame_Data.mGamePhase_Data.mSoldiers_Required;
1378 count -= 2;
1379
1380 // Wave Troop Past
1381 while (count >= 0) {
1382 Recruit_Truck_Anim_CopyFrames(&di, mRecruit_Truck_Anim_PassTroop);
1383 --count;
1384 }
1385
1386 // Swing Arm to stop Troops
1387 Recruit_Truck_Anim_CopyFrames(&di, mRecruit_Truck_Anim_SwingArm);
1388
1389 // Close the truck door
1390 Recruit_Truck_Anim_CopyFrames(&di, mRecruit_Truck_Anim_CloseDoor);
1391 }
1392
1393 // Set end markers
1394 *di++ = 0;
1395 *di = -1;
1396}
1397
1398void cFodder::Recruit_Truck_Anim_CopyFrames(uint16** pDi, const int16* pSource) {
1399 int16 ax;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected