X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmain.cpp;h=4e5fb471543cf5378bfddd98c77c9e14533e3a92;hb=95bfa881f3fa427b67d9ce21e6a10f80f7be5439;hp=2040663eba42195dd402a2aa0f5034d127ba5c1c;hpb=5ceb9e51fd6768946c4a2d72aac13fa6bc78fa88;p=l2e.git diff --git a/src/main.cpp b/src/main.cpp index 2040663..4e5fb47 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,12 +5,20 @@ * Author: holy */ +#include "app/Application.h" +#include "battle/BattleState.h" +#include "battle/PartyLayout.h" +#include "geometry/Point.h" #include "sdl/InitScreen.h" #include "sdl/InitSDL.h" #include #include +using app::Application; +using battle::BattleState; +using battle::PartyLayout; +using geometry::Point; using sdl::InitScreen; using sdl::InitSDL; @@ -23,10 +31,22 @@ 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)); + PartyLayout monstersLayout; + monstersLayout.AddPosition(Point(50, 50)); + monstersLayout.AddPosition(Point(100, 50)); + monstersLayout.AddPosition(Point(150, 50)); + monstersLayout.AddPosition(Point(200, 50)); + try { InitSDL sdl; InitScreen screen(width, height); + Application app(screen.Screen(), new BattleState(bg, monstersLayout)); + app.Run(); + return 0; } catch (exception &e) { cerr << "exception in main(): " << e.what() << endl;