summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-02-08 16:21:00 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2021-02-08 16:21:00 +0100
commitd460c3863e47728057e18ba21c04bbdd1c7a9ca6 (patch)
tree03f549ae12066f8fdf9a4640ff0adcbbb83e8f9d
parentMerge branch 'master' of https://github.com/GTAmodding/re3 (diff)
downloadre3-d460c3863e47728057e18ba21c04bbdd1c7a9ca6.tar
re3-d460c3863e47728057e18ba21c04bbdd1c7a9ca6.tar.gz
re3-d460c3863e47728057e18ba21c04bbdd1c7a9ca6.tar.bz2
re3-d460c3863e47728057e18ba21c04bbdd1c7a9ca6.tar.lz
re3-d460c3863e47728057e18ba21c04bbdd1c7a9ca6.tar.xz
re3-d460c3863e47728057e18ba21c04bbdd1c7a9ca6.tar.zst
re3-d460c3863e47728057e18ba21c04bbdd1c7a9ca6.zip
Diffstat (limited to '')
-rw-r--r--src/core/re3.cpp29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index 720aeb46..3584e226 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -120,9 +120,9 @@ void LangJapSelect(int8 action)
void
CustomFrontendOptionsPopulate(void)
{
- // Moved to an array in MenuScreensCustom.cpp, but APIs are still available. see frontendoption.h
+ // Most of custom options are done statically in MenuScreensCustom.cpp, we add them here only if they're dependent to extra files
- // These work only if we have neo folder, so they're dynamically added
+ // These work only if we have neo folder
int fd;
#ifdef EXTENDED_PIPELINES
const char *vehPipelineNames[] = { "FED_MFX", "FED_NEO" };
@@ -148,22 +148,29 @@ CustomFrontendOptionsPopulate(void)
// Add outsourced language translations, if files are found
#ifdef MORE_LANGUAGES
+ int fd2;
FrontendOptionSetCursor(MENUPAGE_LANGUAGE_SETTINGS, 5, false);
- fd = CFileMgr::OpenFile("text/polish.gxt","r");
- if (fd) {
- FrontendOptionAddDynamic("FEL_POL", nil, nil, LangPolSelect, nil, nil);
+ if (fd = CFileMgr::OpenFile("text/polish.gxt","r")) {
+ if (fd2 = CFileMgr::OpenFile("models/fonts_p.txd","r")) {
+ FrontendOptionAddDynamic("FEL_POL", nil, nil, LangPolSelect, nil, nil);
+ CFileMgr::CloseFile(fd2);
+ }
CFileMgr::CloseFile(fd);
}
- fd = CFileMgr::OpenFile("text/russian.gxt","r");
- if (fd) {
- FrontendOptionAddDynamic("FEL_RUS", nil, nil, LangRusSelect, nil, nil);
+ if (fd = CFileMgr::OpenFile("text/russian.gxt","r")) {
+ if (fd2 = CFileMgr::OpenFile("models/fonts_r.txd","r")) {
+ FrontendOptionAddDynamic("FEL_RUS", nil, nil, LangRusSelect, nil, nil);
+ CFileMgr::CloseFile(fd2);
+ }
CFileMgr::CloseFile(fd);
}
- fd = CFileMgr::OpenFile("text/japanese.gxt","r");
- if (fd) {
- FrontendOptionAddDynamic("FEL_JAP", nil, nil, LangJapSelect, nil, nil);
+ if (fd = CFileMgr::OpenFile("text/japanese.gxt","r")) {
+ if (fd2 = CFileMgr::OpenFile("models/fonts_j.txd","r")) {
+ FrontendOptionAddDynamic("FEL_JAP", nil, nil, LangJapSelect, nil, nil);
+ CFileMgr::CloseFile(fd2);
+ }
CFileMgr::CloseFile(fd);
}
#endif