MCPcopy Create free account
hub / github.com/Meridian59/Meridian59 / SaveLevel

Method SaveLevel

roomedit/source/editcli.cpp:2664–2682  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////// TEditorClient ------------- Save level data to .WAD file. Return FALSE if the level hasn't starting position, or if the user couldn't choose a correct file name for the level.

Source from the content-addressed store, hash-verified

2662// couldn't choose a correct file name for the level.
2663//
2664BOOL TEditorClient::SaveLevel ()
2665{
2666 char filename[MAX_PATH];
2667
2668 if (Registered == FALSE ||
2669 CheckStartingPos() == FALSE ||
2670 GetWadSaveFileName (filename, LevelName) == FALSE )
2671 return FALSE;
2672
2673 if ((0 == RoomID) && NumThings > 2)
2674 {
2675 MessageBox("Please set Room ID from File menu before saving","Error Saving",MB_OK);
2676 return FALSE;
2677 }
2678 SaveLevelData(filename);
2679 strcpy(LevelName, filename);
2680
2681 return TRUE;
2682}
2683
2684
2685/////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 1

SaveLevelDataFunction · 0.85

Tested by

no test coverage detected