Browse Source

🎨 Remove unnecessary 'typedef' on Options structs

pull/1287/head
Juliano Leal Goncalves 5 years ago committed by Anders Jenbo
parent
commit
a0d16b947b
  1. 36
      Source/options.h

36
Source/options.h

@ -2,19 +2,19 @@
DEVILUTION_BEGIN_NAMESPACE DEVILUTION_BEGIN_NAMESPACE
typedef struct DiabloOptions { struct DiabloOptions {
/** @brief Play game intro video on startup. */ /** @brief Play game intro video on startup. */
bool bInto; bool bInto;
} DiabloOptions; };
typedef struct HellfireOptions { struct HellfireOptions {
/** @brief Play game intro video on startup. */ /** @brief Play game intro video on startup. */
bool bInto; bool bInto;
/** @brief Corner stone of the world item. */ /** @brief Corner stone of the world item. */
char szItem[sizeof(PkItemStruct) * 2 + 1]; char szItem[sizeof(PkItemStruct) * 2 + 1];
} HellfireOptions; };
typedef struct AudioOptions { struct AudioOptions {
/** @brief Movie and SFX volume. */ /** @brief Movie and SFX volume. */
Sint32 nSoundVolume; Sint32 nSoundVolume;
/** @brief Music volume. */ /** @brief Music volume. */
@ -23,9 +23,9 @@ typedef struct AudioOptions {
bool bWalkingSound; bool bWalkingSound;
/** @brief Automatically equipping items on pickup emits the equipment sound. */ /** @brief Automatically equipping items on pickup emits the equipment sound. */
bool bAutoEquipSound; bool bAutoEquipSound;
} AudioOptions; };
typedef struct GraphicsOptions { struct GraphicsOptions {
/** @brief Render width. */ /** @brief Render width. */
Sint32 nWidth; Sint32 nWidth;
/** @brief Render height. */ /** @brief Render height. */
@ -50,9 +50,9 @@ typedef struct GraphicsOptions {
bool bColorCycling; bool bColorCycling;
/** @brief Enable FPS Limit. */ /** @brief Enable FPS Limit. */
bool bFPSLimit; bool bFPSLimit;
} GraphicsOptions; };
typedef struct GameplayOptions { struct GameplayOptions {
/** @brief Game play ticks per secound. */ /** @brief Game play ticks per secound. */
Sint32 nTickRate; Sint32 nTickRate;
/** @brief Enable double walk speed when in town. */ /** @brief Enable double walk speed when in town. */
@ -91,9 +91,9 @@ typedef struct GameplayOptions {
bool bRandomizeQuests; bool bRandomizeQuests;
/** @brief Indicates whether or not mosnter type (Animal, Demon, Undead) is shown along with other monster information. */ /** @brief Indicates whether or not mosnter type (Animal, Demon, Undead) is shown along with other monster information. */
bool bShowMonsterType; bool bShowMonsterType;
} GameplayOptions; };
typedef struct ControllerOptions { struct ControllerOptions {
/** @brief SDL Controller mapping, see SDL_GameControllerDB. */ /** @brief SDL Controller mapping, see SDL_GameControllerDB. */
char szMapping[1024]; char szMapping[1024];
/** @brief Use dpad for spell hotkeys without holding "start" */ /** @brief Use dpad for spell hotkeys without holding "start" */
@ -104,23 +104,23 @@ typedef struct ControllerOptions {
/** @brief Enable input via rear touchpad */ /** @brief Enable input via rear touchpad */
bool bRearTouch; bool bRearTouch;
#endif #endif
} ControllerOptions; };
typedef struct NetworkOptions { struct NetworkOptions {
/** @brief Optionally bind to a specific network interface. */ /** @brief Optionally bind to a specific network interface. */
char szBindAddress[129]; char szBindAddress[129];
/** @brief Most recently entered Hostname in join dialog. */ /** @brief Most recently entered Hostname in join dialog. */
char szPreviousHost[129]; char szPreviousHost[129];
/** @brief What network port to use. */ /** @brief What network port to use. */
Uint16 nPort; Uint16 nPort;
} NetworkOptions; };
typedef struct ChatOptions { struct ChatOptions {
/** @brief Quick chat messages. */ /** @brief Quick chat messages. */
char szHotKeyMsgs[4][MAX_SEND_STR_LEN]; char szHotKeyMsgs[4][MAX_SEND_STR_LEN];
} ChatOptions; };
typedef struct Options { struct Options {
DiabloOptions Diablo; DiabloOptions Diablo;
HellfireOptions Hellfire; HellfireOptions Hellfire;
AudioOptions Audio; AudioOptions Audio;
@ -129,7 +129,7 @@ typedef struct Options {
ControllerOptions Controller; ControllerOptions Controller;
NetworkOptions Network; NetworkOptions Network;
ChatOptions Chat; ChatOptions Chat;
} Options; };
extern Options sgOptions; extern Options sgOptions;

Loading…
Cancel
Save