MCPcopy Create free account
hub / github.com/ZDoom/Raze / OpenFile

Method OpenFile

source/common/engine/sc_man.cpp:143–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141//==========================================================================
142
143bool FScanner::OpenFile (const char *name)
144{
145 Close ();
146
147 FileReader fr;
148 if (!fr.OpenFile(name)) return false;
149 auto filesize = fr.GetLength();
150 auto filebuff = fr.Read();
151 if (filebuff.size() == 0 && filesize > 0) return false;
152
153 ScriptBuffer = FString(filebuff.string(), filesize);
154 ScriptName = name; // This is used for error messages so the full file name is preferable
155 LumpNum = -1;
156 PrepareScript ();
157 return true;
158}
159
160//==========================================================================
161//

Callers 15

LoadCRCCacheFunction · 0.45
ParseAllGrpInfosFunction · 0.45
GetCRCFunction · 0.45
ParseStatisticsFunction · 0.45
CheckGameInfoFunction · 0.45
ParseSteamRegistryFunction · 0.45
C_ParseExecFileFunction · 0.45
CCMDFunction · 0.45
LoadConfigFileMethod · 0.45
ChangeListMethod · 0.45
LoadDiskFileFunction · 0.45

Calls 6

stringMethod · 0.80
CloseFunction · 0.50
FStringClass · 0.50
GetLengthMethod · 0.45
ReadMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected