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

Function configAbout

TheForceEngine/TFE_FrontEndUI/frontEndUi.cpp:1064–1090  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1062 }
1063
1064 void configAbout()
1065 {
1066 if (!s_aboutDisplayStr)
1067 {
1068 // The document has not been loaded yet.
1069 char path[TFE_MAX_PATH];
1070 char fileName[TFE_MAX_PATH];
1071 strcpy(fileName, "Documentation/markdown/TheForceEngine.md");
1072 if (!TFE_Paths::mapSystemPath(fileName))
1073 TFE_Paths::appendPath(PATH_PROGRAM, fileName, path);
1074 else
1075 strcpy(path, fileName);
1076
1077 FileStream file;
1078 if (file.open(path, Stream::MODE_READ))
1079 {
1080 const size_t len = file.getSize();
1081 s_aboutDisplayStr = new char[len + 1];
1082 file.readBuffer(s_aboutDisplayStr, (u32)len);
1083 s_aboutDisplayStr[len] = 0;
1084
1085 file.close();
1086 }
1087 }
1088
1089 if (s_aboutDisplayStr) { TFE_Markdown::draw(s_aboutDisplayStr); }
1090 }
1091
1092 void configGame()
1093 {

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