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

Method clear

Source/GameData.cpp:169–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169void sGameRecorded::clear() {
170 std::lock_guard<std::mutex> lock(mLockMtx);
171
172 mVersion = DEMO_CURRENT_VERSION;
173
174 mState.clear();
175 mEvents.clear();
176 mVideoTicks.clear();
177
178 mTick = 0;
179 mTickDisabled = false;
180
181 g_Fodder->mRandom.getSeeds(mSeed[0], mSeed[1], mSeed[2], mSeed[3]);
182
183 mInputTicks = g_Fodder->mInterruptTick;
184 mEngineTicks = g_Fodder->mMission_EngineTicks;
185
186 if (g_Fodder->mVersionCurrent)
187 mRecordedPlatform = g_Fodder->mVersionCurrent->mPlatform;
188 else
189 mRecordedPlatform = g_Fodder->mParams->mDefaultPlatform;
190
191 *mParams = *g_Fodder->mParams;
192}
193
194void sGameRecorded::playback() {
195 std::lock_guard<std::mutex> lock(mLockMtx);

Callers 15

cAboutMethod · 0.45
Phase_PrepareMethod · 0.45
Phase_EngineResetMethod · 0.45
Map_Load_TileTracksMethod · 0.45
Sprite_Sort_DrawListMethod · 0.45
eventsProcessMethod · 0.45
Campaign_Select_SetupMethod · 0.45
Campaign_SelectionMethod · 0.45
Map_Destroy_TilesMethod · 0.45
Game_SaveMethod · 0.45
Game_LoadMethod · 0.45

Calls 1

getSeedsMethod · 0.80

Tested by 1

RunTestsMethod · 0.36