From e33e19d0587146859d48a134ec9fd94e7b7ba5cd Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 8 Dec 2011 14:53:40 +0000 Subject: Initial upload --- Stars45/ModConfig.h | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 Stars45/ModConfig.h (limited to 'Stars45/ModConfig.h') diff --git a/Stars45/ModConfig.h b/Stars45/ModConfig.h new file mode 100644 index 0000000..9e1f703 --- /dev/null +++ b/Stars45/ModConfig.h @@ -0,0 +1,75 @@ +/* Project Starshatter 4.5 + Destroyer Studios LLC + Copyright © 1997-2004. All Rights Reserved. + + SUBSYSTEM: Stars.exe + FILE: ModConfig.h + AUTHOR: John DiCamillo + + + OVERVIEW + ======== + Mod file deployment configuration and manager +*/ + + +#ifndef ModConfig_h +#define ModConfig_h + +#include "Types.h" +#include "Bitmap.h" +#include "Text.h" +#include "List.h" + +// +-------------------------------------------------------------------+ + +class ModConfig; +class ModInfo; +class ModCampaign; + +// +-------------------------------------------------------------------+ + +class ModConfig +{ +public: + static const char* TYPENAME() { return "ModConfig"; } + + ModConfig(); + ~ModConfig(); + + int operator == (const ModConfig& cfg) const { return this == &cfg; } + + static void Initialize(); + static void Close(); + static ModConfig* GetInstance(); + + void Load(); + void Save(); + void FindMods(); + + bool IsDeployed(const char* name); + void Deploy(); + void Undeploy(); + void Redeploy(); + + // these methods change the configuration only + // you must Redeploy() to have them take effect: + + void EnableMod(const char* name); + void DisableMod(const char* name); + void IncreaseModPriority(int mod_index); + void DecreaseModPriority(int mod_index); + + List& EnabledMods() { return enabled; } + List& DisabledMods() { return disabled; } + List& GetModInfoList() { return mods; } + + ModInfo* GetModInfo(const char* filename); + +private: + List enabled; + List disabled; + List mods; +}; + +#endif ModConfig_h \ No newline at end of file -- cgit v1.1