MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / if

Function if

Descent3/LoadLevel.cpp:3914–3932  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3912 }
3913#if (defined(EDITOR) || defined(NEWEDITOR))
3914 else if (ISCHUNK(CHUNK_SCRIPT)) {
3915#if (defined(EDITOR) || defined(NEWEDITOR))
3916 if (FindArg("-savescript")) {
3917 char path[_MAX_PATH], name[_MAX_PATH];
3918 ddio_SplitPath(filename, path, name, NULL);
3919 strcat(path, name);
3920 strcat(path, ".scr");
3921 CFILE *ofile = cfopen(path, "wb");
3922 uint8_t buf[1000];
3923 int n = chunk_size, r;
3924 while (n) {
3925 r = cf_ReadBytes(buf, std::min(n, static_cast<int>(sizeof(buf))), ifile);
3926 cf_WriteBytes(buf, r, ofile);
3927 n -= r;
3928 }
3929 cfclose(ofile);
3930 }
3931#endif // ifdef EDITOR
3932 }
3933#endif
3934 else if (ISCHUNK(CHUNK_SCRIPT_CODE)) {
3935 // Level_script = D3XLoadProgram(ifile); -- ripped out

Callers

nothing calls this directly

Calls 13

cfopenFunction · 0.85
cf_ReadBytesFunction · 0.85
cf_WriteBytesFunction · 0.85
cfcloseFunction · 0.85
ReadTerrainChunksFunction · 0.85
cf_ReadStringFunction · 0.85
LocalizeLevelNameFunction · 0.85
cf_ReadFloatFunction · 0.85
cf_ReadIntFunction · 0.85
AppendToLevelChecksumFunction · 0.85
cf_ReadShortFunction · 0.85
FindArgFunction · 0.70

Tested by

no test coverage detected