#pragma once #include #if defined (_WIN32) #include #else #include #endif #include #include "entity.h" #include "hexlib.h" #include "mesh.h" #include "util.h" // TODO: should move this to renderer.h struct SDL_Handles { SDL_Window *window; SDL_GLContext glContext; SDL_DisplayMode currentDisplayMode; std::vector texSurfaces; }; struct hex_info { int32 hexID = 0; Hex hex = {}; real64 XPos = 0; real64 YPos = 0; uint32 current_color = 0; // RGBA uint32 stored_color = 0; // RGBA bool selected = false; std::vector vertices; }; enum HexDrawMode { NONE, FILL, LINE, CONE_FILL, PATHFINDING }; struct render_state { v2i viewport_dims; bool is_debug_draw; uint32 fill_color; uint32 selected_fill_color; }; struct game_state { std::vector *hex_array; hex_info *start_hex; hex_info *current_hex; vector selected_hexes; HexDrawMode draw_mode; const Layout hex_layout; // TODO: WiP uint32 entity_count = 0; Entity* entities = nullptr; // camera movement controls bool is_selecting = false; bool is_camera_rotate = false; bool is_moveforward = false; bool is_movebackward = false; bool is_moveup = false; bool is_movedown = false; bool is_moveleft = false; bool is_moveright = false; bool is_rotateCW = false; bool is_rotateCCW = false; game_state(Layout &l) : hex_layout(l) {} };