31 #include "gui/viewport.h"
43 #include "resources/map/map.h"
52 #define addModifier(name1, name2, sz, ...) \
53 const unsigned GameModifiers::m##name1##Size = sz; \
54 const char *const GameModifiers::m##name1##Strings[] = \
56 std::string GameModifiers::get##name1##String() \
58 return gettext(getVarItem(&m##name1##Strings[0], \
59 CAST_U32(settings.name2), m##name1##Size)); \
62 #define addModifier2(name1, name2, str, sz, ...) \
63 const unsigned GameModifiers::m##name1##Size = sz; \
64 const char *const GameModifiers::m##name1##Strings[] = \
66 void GameModifiers::change##name1(const bool forward) \
68 changeMode(&settings.name2, m##name1##Size, str, \
69 &GameModifiers::get##name1##String, 0, true, forward); \
71 std::string GameModifiers::get##name1##String() \
73 return gettext(getVarItem(&m##name1##Strings[0], \
74 settings.name2, m##name1##Size)); \
77 #define changeMethod(name1, name2, str) \
78 void GameModifiers::change##name1(const bool forward) \
80 changeMode(&settings.name2, m##name1##Size, str, \
81 &GameModifiers::get##name1##String, 0, true, forward); \
98 "disableGameModifiers");
105 const unsigned limit,
107 std::string (*
const func)(),
133 const std::string str = (*func)();
139 const unsigned index,
150 N_(
"(D) default moves"),
152 N_(
"(I) invert moves"),
154 N_(
"(c) moves with some crazy moves"),
156 N_(
"(C) moves with crazy moves"),
158 N_(
"(d) double normal + crazy"),
160 N_(
"(?) unknown move")
185 return strprintf(
_(
"(%u) crazy move number %u"),
186 crazyMoveType, crazyMoveType);
191 return _(
"(a) custom crazy move");
196 return _(
"(?) crazy move");
200 addModifier2(MoveToTargetType, moveToTargetType,
"moveToTargetType", 13,
203 N_(
"(0) default moves to target"),
205 N_(
"(1) moves to target in distance 1"),
207 N_(
"(2) moves to target in distance 2"),
209 N_(
"(3) moves to target in distance 3"),
211 N_(
"(4) moves to target in distance 4"),
213 N_(
"(5) moves to target in distance 5"),
215 N_(
"(6) moves to target in distance 6"),
217 N_(
"(7) moves to target in distance 7"),
219 N_(
"(8) moves to target in distance 8"),
221 N_(
"(9) moves to target in distance 9"),
223 N_(
"(A) moves to target in attack range"),
225 N_(
"(a) archer attack range"),
227 N_(
"(B) moves to target in attack range - 1"),
229 N_(
"(?) move to target")
235 N_(
"(D) default follow"),
237 N_(
"(R) relative follow"),
239 N_(
"(M) mirror follow"),
241 N_(
"(P) pet follow"),
243 N_(
"(?) unknown follow")
246 addModifier2(AttackWeaponType, attackWeaponType,
"attackWeaponType", 4,
251 N_(
"(D) default attack"),
253 N_(
"(s) switch attack without shield"),
255 N_(
"(S) switch attack with shield"),
263 N_(
"(D) default attack"),
265 N_(
"(G) go and attack"),
267 N_(
"(A) go, attack, pickup"),
269 N_(
"(d) without auto attack"),
274 addModifier2(TargetingType, targetingType,
"targetingType", 2,
277 N_(
"(D) don't switch target"),
279 N_(
"(C) always attack closest"),
294 'a' + cnt - 10), cnt);
296 return strprintf(
"(%u) drop counter %u", cnt, cnt);
312 N_(
"(S) small pick up 1x1 cells"),
314 N_(
"(D) default pick up 2x1 cells"),
316 N_(
"(F) forward pick up 2x3 cells"),
318 N_(
"(3) pick up 3x3 cells"),
320 N_(
"(g) go and pick up in distance 4"),
322 N_(
"(G) go and pick up in distance 8"),
324 N_(
"(A) go and pick up in max distance"),
329 addModifier2(MagicAttackType, magicAttackType,
"magicAttackType", 5,
332 N_(
"(f) use #flar for magic attack"),
334 N_(
"(c) use #chiza for magic attack"),
336 N_(
"(I) use #ingrav for magic attack"),
338 N_(
"(F) use #frillyar for magic attack"),
340 N_(
"(U) use #upmarmu for magic attack"),
342 N_(
"(?) magic attack")
345 addModifier2(PvpAttackType, pvpAttackType,
"pvpAttackType", 4,
348 N_(
"(a) attack all players"),
350 N_(
"(f) attack all except friends"),
352 N_(
"(b) attack bad relations"),
354 N_(
"(d) don't attack players"),
359 addModifier2(ImitationMode, imitationMode,
"imitationMode", 2,
362 N_(
"(D) default imitation"),
364 N_(
"(O) outfits imitation"),
372 N_(
"Game modifiers are enabled"),
374 N_(
"Game modifiers are disabled"),
376 N_(
"Game modifiers are unknown")
390 N_(
"(N) normal map view"),
392 N_(
"(D) debug map view"),
394 N_(
"(u) ultra map view"),
396 N_(
"(U) ultra map view 2"),
398 N_(
"(e) empty map view with collision"),
400 N_(
"(E) empty map view"),
402 N_(
"(b) black & white map view"),
416 N_(
"(O) on keyboard"),
476 N_(
"(G) game camera mode"),
478 N_(
"(F) free camera mode"),
514 "disableGameModifiers");
void displayAwayLog() const
std::string getValue(const std::string &key, const std::string &deflt) const
bool getBoolValue(const std::string &key) const
void setValue(const std::string &key, const std::string &value)
bool resetBoolValue(const std::string &key)
int resetIntValue(const std::string &key)
int getIntValue(const std::string &key) const
static void distributeEvent()
static const char * getVarItem(const char *const *const arr, const unsigned index, const unsigned sz)
static void resetModifiers()
static void changeCameraMode(const bool forward)
static std::string getMoveTypeString()
static void setQuickDropCounter(const int n)
static void changeMode(unsigned *const var, const unsigned limit, const char *const conf, std::string(*const func)(), const unsigned def, const bool save, const bool forward)
static std::string getCrazyMoveTypeString()
static void changeMoveType(const bool forward)
static const unsigned mQuickDropCounterSize
static void changeCrazyMoveType(const bool forward)
static void changeAwayMode(const bool forward)
static void changeMapDrawType(const bool forward)
static void changeGameModifiers(const bool forward)
static const unsigned mCrazyMoveTypeSize
void updateFrameRate(int fpsLimit)
AwayListener * getAwayListener() const
void setHalfAway(const bool n)
void setMoveState(const unsigned int n)
void setAfkTime(const int v)
void setAwayDialog(OkDialog *const dialog)
void setDrawLayersFlags(const MapTypeT &n)
unsigned int crazyMoveState
unsigned int crazyMoveType
bool disableGameModifiers
unsigned int imitationMode
unsigned int magicAttackType
unsigned int quickDropCounter
unsigned int attackWeaponType
unsigned int pvpAttackType
unsigned int targetingType
unsigned int moveToTargetType
void volumeRestore() const
static void distributeEvent()
Configuration serverConfig
#define addModifier(name1, name2, sz,...)
#define addModifier2(name1, name2, str, sz,...)
#define changeMethod(name1, name2, str)
LocalPlayer * localPlayer
OutfitWindow * outfitWindow
const bool ShowCenter_false
SoundManager soundManager
std::string strprintf(const char *const format,...)