MCPcopy Create free account
hub / github.com/ZDoom/Raze / Mus_Serialize

Function Mus_Serialize

source/core/raze_music.cpp:188–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186}
187
188void Mus_Serialize(FSerializer &arc)
189{
190 if (arc.BeginObject("music"))
191 {
192 if (arc.isWriting())
193 {
194 FString music = mus_playing.name;
195 if (music.IsEmpty()) music = mus_playing.LastSong;
196
197 arc.AddString("music", music.GetChars());
198 }
199 else arc("music", mus_playing.LastSong);
200
201 arc("baseorder", mus_playing.baseorder)
202 ("loop", mus_playing.loop)
203 .EndObject();
204
205 // this is to prevent scripts from resetting the music after it has been loaded from the savegame.
206 if (arc.isReading()) mus_blocked = true;
207 // Actual music resuming cannot be performed here, it must be done in the game code.
208 }
209}
210
211void Mus_ResumeSaved()
212{

Callers 1

SerializeSessionFunction · 0.85

Calls 7

isWritingMethod · 0.80
isReadingMethod · 0.80
BeginObjectMethod · 0.45
IsEmptyMethod · 0.45
AddStringMethod · 0.45
GetCharsMethod · 0.45
EndObjectMethod · 0.45

Tested by

no test coverage detected