Working on game state
This commit is contained in:
1 parent
b01e970554
commit
2807d82d51
12 files changed
+501
-445
No files matched your search
@@ -0,0 +1,71 @@
|
||||
#pragma once
|
||||
#include "items/Item.h"
|
||||
#include "quest/QuestJournal.h"
|
||||
#include "Location.h"
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace ZL {
|
||||
|
||||
enum class TutorialStep {
|
||||
Step0, // Dialogue hint: "click to advance"
|
||||
Step1, // Camera rotation hint
|
||||
Step2, // Floor tap / walk hint
|
||||
Step3, // Pinch-zoom hint
|
||||
Step4, // Pick-up item hint
|
||||
Step5, // Post-pickup reaction
|
||||
Step6, // Tutorial complete
|
||||
};
|
||||
|
||||
enum class UniIntTutorialState {
|
||||
Step10,
|
||||
Step11,
|
||||
DarklandsActive,
|
||||
DarklandsStep13,
|
||||
DarklandsFull
|
||||
};
|
||||
|
||||
struct StoredChatMessage {
|
||||
std::string text;
|
||||
bool incoming;
|
||||
};
|
||||
|
||||
struct GameState {
|
||||
// --- World ---
|
||||
std::unordered_map<std::string, std::shared_ptr<Location>> locations;
|
||||
std::string currentLocationName;
|
||||
bool isDarklands = false;
|
||||
bool isNight = false;
|
||||
bool isDawn = false;
|
||||
|
||||
// --- Player resources ---
|
||||
Inventory inventory;
|
||||
float playerHp = 200.f;
|
||||
float playerMaxHp = 200.f;
|
||||
int money = 5500;
|
||||
|
||||
// --- Script globals ---
|
||||
std::unordered_map<std::string, int> globalInts;
|
||||
std::unordered_map<std::string, float> globalFloats;
|
||||
|
||||
// --- Quest system ---
|
||||
Quest::QuestJournal questJournal;
|
||||
|
||||
// --- Tutorial ---
|
||||
TutorialStep tutorialStep = TutorialStep::Step0;
|
||||
UniIntTutorialState uniIntTutorialState = UniIntTutorialState::Step10;
|
||||
bool tutorialPhonePickedUp = false;
|
||||
bool tutorialJournalPickedUp = false;
|
||||
bool tutorialPhoneChatScreenOpened = false;
|
||||
bool tutorialJournalScreenOpened = false;
|
||||
bool tutorialNeedOpenTaxiScreen = false;
|
||||
|
||||
// --- Phone / chat ---
|
||||
bool chatUnread[3] = { true, true, true };
|
||||
std::string chatPreviewMsg[3];
|
||||
std::vector<StoredChatMessage> chatHistory[3];
|
||||
};
|
||||
|
||||
} // namespace ZL
|
||||
Reference in new issue
Block a user