MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / manual

Function manual

TheForceEngine/TFE_FrontEndUI/frontEndUi.cpp:1008–1034  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1006 }
1007
1008 void manual()
1009 {
1010 if (!s_manualDisplayStr)
1011 {
1012 // The document has not been loaded yet.
1013 char path[TFE_MAX_PATH];
1014 char fileName[TFE_MAX_PATH];
1015 strcpy(fileName, "Documentation/markdown/TheForceEngineManual.md");
1016 if (!TFE_Paths::mapSystemPath(fileName))
1017 TFE_Paths::appendPath(PATH_PROGRAM, fileName, path);
1018 else
1019 strcpy(path, fileName);
1020
1021 FileStream file;
1022 if (file.open(path, Stream::MODE_READ))
1023 {
1024 const size_t len = file.getSize();
1025 s_manualDisplayStr = new char[len + 1];
1026 file.readBuffer(s_manualDisplayStr, (u32)len);
1027 s_manualDisplayStr[len] = 0;
1028
1029 file.close();
1030 }
1031 }
1032
1033 if (s_manualDisplayStr) { TFE_Markdown::draw(s_manualDisplayStr); }
1034 }
1035
1036 void credits()
1037 {

Callers 1

drawFunction · 0.85

Calls 7

drawFunction · 0.70
mapSystemPathFunction · 0.50
appendPathFunction · 0.50
openMethod · 0.45
getSizeMethod · 0.45
readBufferMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected