From 4b6e5eb5d3e0733c239a7a231da91a9977c38246 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 12 Mar 2022 14:12:42 -0500 Subject: dynamic wall and floor textures --- src/game.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/game.h') diff --git a/src/game.h b/src/game.h index 2fd0f05..c91a001 100644 --- a/src/game.h +++ b/src/game.h @@ -9,6 +9,7 @@ #include "muxer.h" #include "timer.h" #include "animation.h" +#include "interpolation.h" const int GAME_WIDTH = 640*2; const int GAME_HEIGHT = 480*2; @@ -19,6 +20,10 @@ const int ZOOM_X_FACTOR = 8; const int ZOOM_Y_FACTOR = 6; const int RADIUS = 8; +constexpr int TilesetIndex(int x, int y) { + return x + y * 24; +} + enum class Tile { Floor, Wall, @@ -75,6 +80,8 @@ struct MapData { Source lightType = Source::None; int lightRadius = 0; std::set litTiles; + int renderId = -1; + bool dirtyRender = true; }; class Game { @@ -97,11 +104,14 @@ public: std::list kickups; int litSpots = 0; bool dirtyLighting = true; + bool dirtyRender = true; size_t numLamps = 0; size_t numDust = 0; int player_x = 0; int player_y = 0; + int player_oldx = 0; + int player_oldy = 0; bool renderPlayer = true; Animation playerAnim {"../res/player_anim.txt"}; @@ -123,6 +133,9 @@ public: Input lastInput; bool alreadyBumped = false; Timer bumpCooldown = {500}; + Interpolation moveProgress; + bool moving = false; + bool queueDash = false; }; -- cgit 1.4.1