| 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 | { |
no test coverage detected