summaryrefslogtreecommitdiffstats
path: root/Game.hpp
blob: 68be9ab06085641ae64ee76706297299727e6059 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#pragma once

#include "PositionI.hpp"
#include "NetworkClient.hpp"
#include "World.hpp"
#include "Display.hpp"

class Game {
public:
    Game();

    ~Game();

    void MainLoop();

private:
    //utility variables
    NetworkClient *m_nc;
    bool m_exit = false;
    ConnectionState m_networkState = ConnectionState::Handshaking;
    Display *m_display;

    //utility methods
    void ParsePackets();

    //game state variables
    World m_world;

    std::string g_PlayerUuid;
    std::string g_PlayerName;
    int g_PlayerEid;
    byte g_Gamemode;
    byte g_Difficulty;
    int g_Dimension;
    byte g_MaxPlayers;
    std::string g_LevelType;
    bool g_ReducedDebugInfo;
    PositionI g_SpawnPosition;
    bool g_PlayerInvulnerable;
    bool g_PlayerFlying;
    bool g_PlayerAllowFlying;
    bool g_PlayerCreativeMode;
    int g_PlayerFlyingSpeed;
    int g_PlayerFovModifier;
    bool g_IsGameStarted = false;
    float g_PlayerPitch;
    float g_PlayerYaw;
    double g_PlayerX;
    double g_PlayerY;
    double g_PlayerZ;
};