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

Method Step3

editor/ScriptMassCompile.cpp:493–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491}
492
493bool CScriptMassCompile::Step3(char *filename, bool islevel) {
494 tCompilerInfo ci;
495 ci.callback = masscompilercallback;
496 ci.script_type = (islevel) ? ST_LEVEL : ST_GAME;
497 strcpy(ci.source_filename, filename);
498 strcat(ci.source_filename, ".cpp");
499
500 char compiled_filename[_MAX_PATH], full_path[_MAX_PATH];
501 strcpy(compiled_filename, filename);
502 strcat(compiled_filename, ".dll");
503 ddio_MakePath(full_path, LocalScriptDir, compiled_filename, NULL);
504 if (cfexist(full_path)) {
505 ddio_DeleteFile(full_path);
506 }
507
508 writeline("===START COMPILE===");
509 ScriptCompile(&ci);
510 writeline("");
511 writeline("===END COMPILE===");
512
513 bool ret;
514 if (cfexist(full_path)) {
515 writeline("Step 3: DLL Created");
516 SetStepText(3, "DLL Created");
517 ret = true;
518 } else {
519 writeline("Step 3: DLL Not Created");
520 SetStepText(3, "DLL NOT Created");
521 ret = false;
522 }
523
524 return ret;
525}
526
527bool CheckInGamefile(char *tempbuffer, bool giveok);
528bool AddNewGameFile(char *fullpath, char *directory);

Callers

nothing calls this directly

Calls 5

cfexistFunction · 0.85
writelineFunction · 0.85
ScriptCompileFunction · 0.85
ddio_MakePathFunction · 0.50
ddio_DeleteFileFunction · 0.50

Tested by

no test coverage detected