MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / CompileFile

Method CompileFile

neo/game/script/Script_Program.cpp:1894–1913  ·  view source on GitHub ↗

================ idProgram::CompileFile ================ */

Source from the content-addressed store, hash-verified

1892================
1893*/
1894void idProgram::CompileFile( const char *filename ) {
1895 char *src;
1896 bool result;
1897
1898 if ( fileSystem->ReadFile( filename, ( void ** )&src, NULL ) < 0 ) {
1899 gameLocal.Error( "Couldn't load %s\n", filename );
1900 }
1901
1902 result = CompileText( filename, src, false );
1903
1904 fileSystem->FreeFile( src );
1905
1906 if ( g_disasm.GetBool() ) {
1907 Disassemble();
1908 }
1909
1910 if ( !result ) {
1911 gameLocal.Error( "Compile failed in file %s.", filename );
1912 }
1913}
1914
1915/*
1916================

Callers 3

NextMapMethod · 0.45
SpawnMethod · 0.45
CompileTextMethod · 0.45

Calls 4

ReadFileMethod · 0.80
FreeFileMethod · 0.80
ErrorMethod · 0.45
GetBoolMethod · 0.45

Tested by

no test coverage detected