diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-18 21:59:16 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-18 21:59:16 +0100 |
commit | ef59c623fd3ab492ccc8826d21d93fc4be825257 (patch) | |
tree | b68bb54324eaef4bbb14868413cde00245576859 /src/extras | |
parent | fix (diff) | |
parent | wrong ifdef (diff) | |
download | re3-ef59c623fd3ab492ccc8826d21d93fc4be825257.tar re3-ef59c623fd3ab492ccc8826d21d93fc4be825257.tar.gz re3-ef59c623fd3ab492ccc8826d21d93fc4be825257.tar.bz2 re3-ef59c623fd3ab492ccc8826d21d93fc4be825257.tar.lz re3-ef59c623fd3ab492ccc8826d21d93fc4be825257.tar.xz re3-ef59c623fd3ab492ccc8826d21d93fc4be825257.tar.zst re3-ef59c623fd3ab492ccc8826d21d93fc4be825257.zip |
Diffstat (limited to 'src/extras')
-rw-r--r-- | src/extras/custompipes.cpp | 2 | ||||
-rw-r--r-- | src/extras/custompipes.h | 2 | ||||
-rw-r--r-- | src/extras/custompipes_d3d9.cpp | 2 | ||||
-rw-r--r-- | src/extras/frontendoption.cpp | 10 | ||||
-rw-r--r-- | src/extras/frontendoption.h | 6 | ||||
-rw-r--r-- | src/extras/ini_parser.hpp | 19 | ||||
-rw-r--r-- | src/extras/postfx.cpp | 3 | ||||
-rw-r--r-- | src/extras/screendroplets.cpp | 2 |
8 files changed, 33 insertions, 13 deletions
diff --git a/src/extras/custompipes.cpp b/src/extras/custompipes.cpp index e6dff12a..092b3e23 100644 --- a/src/extras/custompipes.cpp +++ b/src/extras/custompipes.cpp @@ -1,4 +1,4 @@ -#define WITH_D3D +#define WITHD3D #include "common.h" #ifdef EXTENDED_PIPELINES diff --git a/src/extras/custompipes.h b/src/extras/custompipes.h index 183b85da..7ad239f0 100644 --- a/src/extras/custompipes.h +++ b/src/extras/custompipes.h @@ -1,7 +1,7 @@ #pragma once -#ifdef EXTENDED_PIPELINES #ifdef LIBRW +#ifdef EXTENDED_PIPELINES namespace CustomPipes { diff --git a/src/extras/custompipes_d3d9.cpp b/src/extras/custompipes_d3d9.cpp index 1f4ee07d..4242c630 100644 --- a/src/extras/custompipes_d3d9.cpp +++ b/src/extras/custompipes_d3d9.cpp @@ -1,4 +1,4 @@ -#define WITH_D3D +#define WITHD3D #include "common.h" #ifdef RW_D3D9 diff --git a/src/extras/frontendoption.cpp b/src/extras/frontendoption.cpp index a966de97..5d388bfd 100644 --- a/src/extras/frontendoption.cpp +++ b/src/extras/frontendoption.cpp @@ -123,7 +123,7 @@ void FrontendOptionAddBuiltinAction(const char* gxtKey, int action, int targetMe option.m_TargetMenu = targetMenu; } -void FrontendOptionAddSelect(const char* gxtKey, const char** rightTexts, int8 numRightTexts, int8 *var, bool onlyApplyOnEnter, ChangeFunc changeFunc, const char* saveName, bool disableIfGameLoaded) +void FrontendOptionAddSelect(const char* gxtKey, const char** rightTexts, int8 numRightTexts, int8 *var, bool onlyApplyOnEnter, ChangeFunc changeFunc, const char* saveCat, const char* saveKey, bool disableIfGameLoaded) { int8 screenOptionOrder = RegisterNewOption(); @@ -139,13 +139,14 @@ void FrontendOptionAddSelect(const char* gxtKey, const char** rightTexts, int8 n option.m_CFOSelect->displayedValue = *var; option.m_CFOSelect->lastSavedValue = *var; } - option.m_CFOSelect->save = saveName; + option.m_CFOSelect->saveCat = saveCat; + option.m_CFOSelect->save = saveKey; option.m_CFOSelect->onlyApplyOnEnter = onlyApplyOnEnter; option.m_CFOSelect->changeFunc = changeFunc; option.m_CFOSelect->disableIfGameLoaded = disableIfGameLoaded; } -void FrontendOptionAddDynamic(const char* gxtKey, DrawFunc drawFunc, int8 *var, ButtonPressFunc buttonPressFunc, const char* saveName) +void FrontendOptionAddDynamic(const char* gxtKey, DrawFunc drawFunc, int8 *var, ButtonPressFunc buttonPressFunc, const char* saveCat, const char* saveKey) { int8 screenOptionOrder = RegisterNewOption(); @@ -156,7 +157,8 @@ void FrontendOptionAddDynamic(const char* gxtKey, DrawFunc drawFunc, int8 *var, option.m_CFODynamic->drawFunc = drawFunc; option.m_CFODynamic->buttonPressFunc = buttonPressFunc; option.m_CFODynamic->value = var; - option.m_CFODynamic->save = saveName; + option.m_CFODynamic->saveCat = saveCat; + option.m_CFODynamic->save = saveKey; } uint8 FrontendScreenAdd(const char* gxtKey, eMenuSprites sprite, int prevPage, int columnWidth, int headerHeight, int lineHeight, diff --git a/src/extras/frontendoption.h b/src/extras/frontendoption.h index dbd1a300..8b64335a 100644 --- a/src/extras/frontendoption.h +++ b/src/extras/frontendoption.h @@ -82,10 +82,10 @@ uint8 GetNumberOfMenuOptions(int screen); void FrontendOptionSetCursor(int screen, int8 option, bool overwrite = false); -// var is optional in AddDynamic, enables you to save them in an INI file(also needs passing char array to saveName param. obv), otherwise pass nil/0 +// var is optional in AddDynamic, enables you to save them in an INI file(also needs passing char array to and saveCat saveKey param. obv), otherwise pass nil/0 void FrontendOptionAddBuiltinAction(const char* gxtKey, int action, int targetMenu = MENUPAGE_NONE, int saveSlot = SAVESLOT_NONE); -void FrontendOptionAddSelect(const char* gxtKey, const char** rightTexts, int8 numRightTexts, int8 *var, bool onlyApplyOnEnter, ChangeFunc changeFunc, const char* saveName = nil, bool disableIfGameLoaded = false); -void FrontendOptionAddDynamic(const char* gxtKey, DrawFunc rightTextDrawFunc, int8 *var, ButtonPressFunc buttonPressFunc, const char* saveName = nil); +void FrontendOptionAddSelect(const char* gxtKey, const char** rightTexts, int8 numRightTexts, int8 *var, bool onlyApplyOnEnter, ChangeFunc changeFunc, const char* saveCat = nil, const char* saveKey = nil, bool disableIfGameLoaded = false); +void FrontendOptionAddDynamic(const char* gxtKey, DrawFunc rightTextDrawFunc, int8 *var, ButtonPressFunc buttonPressFunc, const char* saveCat = nil, const char* saveKey = nil); uint8 FrontendScreenAdd(const char* gxtKey, eMenuSprites sprite, int prevPage, int columnWidth, int headerHeight, int lineHeight, int8 font, float fontScaleX, float fontScaleY, int8 alignment, bool showLeftRightHelper, ReturnPrevPageFunc returnPrevPageFunc = nil); #endif diff --git a/src/extras/ini_parser.hpp b/src/extras/ini_parser.hpp index 8e88bc29..7bea024c 100644 --- a/src/extras/ini_parser.hpp +++ b/src/extras/ini_parser.hpp @@ -158,6 +158,25 @@ namespace linb /* Too lazy to continue this container... If you need more methods, just add it */ + // re3 + void remove(const string_type& sect, const key_type& key) + { + auto it = this->find(sect); + if(it != this->end()) + { + it->second.erase(key); + } + } + + int category_size(const string_type& sect) + { + auto it = this->find(sect); + if(it != this->end()) + { + return it->second.size(); + } + return 0; + } #if 1 bool read_file(const char_type* filename) diff --git a/src/extras/postfx.cpp b/src/extras/postfx.cpp index d3b8b8ac..51b91060 100644 --- a/src/extras/postfx.cpp +++ b/src/extras/postfx.cpp @@ -1,5 +1,4 @@ -#define WITHWINDOWS -#define WITH_D3D +#define WITHD3D #include "common.h" #ifdef EXTENDED_COLOURFILTER diff --git a/src/extras/screendroplets.cpp b/src/extras/screendroplets.cpp index ac3a17b2..74c44da0 100644 --- a/src/extras/screendroplets.cpp +++ b/src/extras/screendroplets.cpp @@ -1,4 +1,4 @@ -#define WITH_D3D +#define WITHD3D #include "common.h" #ifdef SCREEN_DROPLETS |