X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FApplication.hpp;h=ea7421161b9031e45aa9f54d78bff38c5be6db73;hb=46b18a88fdda816f3c2c547aba68b0a5ea7970f7;hp=c8236ffbf27a72281364c87a69454103845a358a;hpb=b7d09e1e35ef90282c97509e0020b20db3c7ea9f;p=blank.git diff --git a/src/app/Application.hpp b/src/app/Application.hpp index c8236ff..ea74211 100644 --- a/src/app/Application.hpp +++ b/src/app/Application.hpp @@ -1,14 +1,18 @@ #ifndef BLANK_APP_APPLICATION_HPP_ #define BLANK_APP_APPLICATION_HPP_ +#include "Assets.hpp" #include "init.hpp" #include "RandomWalk.hpp" +#include "../graphics/BlendedSprite.hpp" #include "../graphics/BlockLighting.hpp" #include "../graphics/Camera.hpp" #include "../graphics/DirectionalLighting.hpp" #include "../ui/Interface.hpp" #include "../world/World.hpp" +#include + namespace blank { @@ -31,6 +35,7 @@ public: /// run until user quits void Run(); + /// evaluate a single frame of dt milliseconds void Loop(int dt); /// run for n frames @@ -40,8 +45,12 @@ public: /// run for n frames, assuming t milliseconds for each void RunS(size_t n, size_t t); + /// process all events in SDL's queue void HandleEvents(); + void Handle(const SDL_WindowEvent &); + /// integrate to the next step with dt milliseconds passed void Update(int dt); + /// push the current state to display void Render(); static Entity &MakeTestEntity(World &); @@ -49,12 +58,16 @@ public: private: InitSDL init_sdl; InitIMG init_img; + InitTTF init_ttf; InitGL init_gl; Window window; GLContext ctx; InitGLEW init_glew; + Assets assets; + BlockLighting chunk_prog; DirectionalLighting entity_prog; + BlendedSprite sprite_prog; Camera cam; World world;