4 * Created on: Aug 1, 2012
8 #include "app/Application.h"
9 #include "battle/BattleState.h"
10 #include "battle/PartyLayout.h"
11 #include "geometry/Point.h"
12 #include "sdl/InitScreen.h"
13 #include "sdl/InitSDL.h"
18 using app::Application;
19 using battle::BattleState;
20 using battle::PartyLayout;
21 using geometry::Point;
22 using sdl::InitScreen;
30 int main(int argc, char **argv) {
31 const int width = 800;
32 const int height = 480;
35 SDL_Surface *bg(SDL_CreateRGBSurface(0, width, height, 32, 0xFF000000, 0xFF0000, 0xFF00, 0xFF));
36 SDL_FillRect(bg, 0, SDL_MapRGB(bg->format, 0, 0, 0));
37 PartyLayout monstersLayout;
38 monstersLayout.AddPosition(Point<Uint8>(50, 50));
39 monstersLayout.AddPosition(Point<Uint8>(100, 50));
40 monstersLayout.AddPosition(Point<Uint8>(150, 50));
41 monstersLayout.AddPosition(Point<Uint8>(200, 50));
45 InitScreen screen(width, height);
47 Application app(screen.Screen(), new BattleState(bg, monstersLayout));
51 } catch (exception &e) {
52 cerr << "exception in main(): " << e.what() << endl;