X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmain.cpp;h=780b8c27b70c85e004d77d45e0a1a3b6e8358971;hb=5ef75aee810e5a687fae24e3f95886241e36efda;hp=2040663eba42195dd402a2aa0f5034d127ba5c1c;hpb=ef384cccd0e23a5de0a82f35ef3367754a8c3719;p=l2e.git diff --git a/src/main.cpp b/src/main.cpp index 2040663..780b8c2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,12 +5,16 @@ * Author: holy */ +#include "app/Application.h" +#include "battle/BattleState.h" #include "sdl/InitScreen.h" #include "sdl/InitSDL.h" #include #include +using app::Application; +using battle::BattleState; using sdl::InitScreen; using sdl::InitSDL; @@ -23,10 +27,17 @@ int main(int argc, char **argv) { const int width = 800; const int height = 480; + // temporary + SDL_Surface *bg(SDL_CreateRGBSurface(0, width, height, 32, 0xFF000000, 0xFF0000, 0xFF00, 0xFF)); + SDL_FillRect(bg, 0, SDL_MapRGB(bg->format, 0, 0, 0)); + try { InitSDL sdl; InitScreen screen(width, height); + Application app(screen.Screen(), new BattleState(bg)); + app.Run(); + return 0; } catch (exception &e) { cerr << "exception in main(): " << e.what() << endl;