system:: applyBoxEnum
This commit is contained in:
parent
44265f6d61
commit
4ddccfed8e
14
system.cpp
14
system.cpp
|
@ -560,6 +560,12 @@ void applyBoxM(eMonster m, bool f = false) {
|
||||||
|
|
||||||
EX modecode_t saved_modecode;
|
EX modecode_t saved_modecode;
|
||||||
|
|
||||||
|
template<class T> void applyBoxEnum(T& i, string name IS("")) {
|
||||||
|
int ii = (int) i;
|
||||||
|
applyBoxNum(ii, name);
|
||||||
|
i = (T) ii;
|
||||||
|
}
|
||||||
|
|
||||||
/** \brief Call applyBox for all the required values. This will save the values if hr::scores::saving==true, load if hr::scores::loading==true, load into highscores if hr::scores::loadingHi==true */
|
/** \brief Call applyBox for all the required values. This will save the values if hr::scores::saving==true, load if hr::scores::loading==true, load into highscores if hr::scores::loadingHi==true */
|
||||||
EX void applyBoxes() {
|
EX void applyBoxes() {
|
||||||
invorb.clear();
|
invorb.clear();
|
||||||
|
@ -741,9 +747,7 @@ EX void applyBoxes() {
|
||||||
if(loadingHi) applyBoxI(itLotus);
|
if(loadingHi) applyBoxI(itLotus);
|
||||||
else applyBoxNum(truelotus, "lotus/escape");
|
else applyBoxNum(truelotus, "lotus/escape");
|
||||||
|
|
||||||
int v = int(variation);
|
applyBoxEnum(variation, "variation");
|
||||||
applyBoxNum(v, "variation");
|
|
||||||
variation = eVariation(v);
|
|
||||||
applyBoxI(itRose);
|
applyBoxI(itRose);
|
||||||
applyBoxOrb(itOrbBeauty);
|
applyBoxOrb(itOrbBeauty);
|
||||||
applyBoxI(itCoral);
|
applyBoxI(itCoral);
|
||||||
|
@ -753,9 +757,7 @@ EX void applyBoxes() {
|
||||||
applyBoxM(moFalsePrincess);
|
applyBoxM(moFalsePrincess);
|
||||||
applyBoxM(moRoseLady);
|
applyBoxM(moRoseLady);
|
||||||
applyBoxM(moRoseBeauty);
|
applyBoxM(moRoseBeauty);
|
||||||
int ls = (int) land_structure;
|
applyBoxEnum(land_structure, "land structure");
|
||||||
applyBoxNum(ls, "land structure");
|
|
||||||
land_structure = (eLandStructure) ls;
|
|
||||||
applyBoxNum(multi::players, "shmup players");
|
applyBoxNum(multi::players, "shmup players");
|
||||||
if(multi::players < 1 || multi::players > MAXPLAYER)
|
if(multi::players < 1 || multi::players > MAXPLAYER)
|
||||||
multi::players = 1;
|
multi::players = 1;
|
||||||
|
|
Loading…
Reference in New Issue