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

Function SaveScript

editor/ObjCScript.cpp:246–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246void SaveScript(const char *filename, char *script) {
247 CFILE *file;
248 char file_path[256];
249
250 ddio_MakePath(file_path, LocalLevelsDir, filename, NULL);
251
252 file = cfopen(file_path, "wt");
253 cf_WriteString(file, script);
254 // mprintf(0,"Saving script to %s\n",file_path);
255 cfclose(file);
256}
257
258void FreeScript(char *script) { mem_free(script); }
259

Callers 5

OnOKMethod · 0.85
OnEditScriptMethod · 0.85
OnUnlockMethod · 0.85
OnScriptselAddMethod · 0.85
InvokeScriptStudioFunction · 0.85

Calls 4

cfopenFunction · 0.85
cf_WriteStringFunction · 0.85
cfcloseFunction · 0.85
ddio_MakePathFunction · 0.50

Tested by

no test coverage detected