]> git.localhorst.tv Git - l2e.git/blobdiff - src/main.cpp
added party menu state stub
[l2e.git] / src / main.cpp
index f70103a0dd411da6755c9cd85240f320855a5ee8..73b42740180cc7f5727fe506da1847bdc3a5422f 100644 (file)
@@ -30,6 +30,7 @@
 #include "graphics/Menu.h"
 #include "graphics/SimpleAnimation.h"
 #include "graphics/Sprite.h"
+#include "graphics/Texture.h"
 #include "loader/Caster.h"
 #include "loader/Interpreter.h"
 #include "loader/ParsedSource.h"
@@ -41,6 +42,7 @@
 #include "map/MapState.h"
 #include "map/Tile.h"
 #include "map/Trigger.h"
+#include "menu/Resources.h"
 #include "sdl/InitImage.h"
 #include "sdl/InitScreen.h"
 #include "sdl/InitSDL.h"
@@ -64,6 +66,7 @@ using common::GameConfig;
 using common::GameState;
 using common::Spell;
 using geometry::Vector;
+using graphics::Texture;
 using loader::Caster;
 using loader::Interpreter;
 using loader::ParsedSource;
@@ -268,6 +271,14 @@ int main(int argc, char **argv) {
                gameState.heroes[3].MapEntity().SetFlags(Entity::FLAG_NONBLOCKING);
                gameState.heroes[2].MapEntity().AddFollower(&gameState.heroes[3].MapEntity());
 
+               menu::Resources menuResources;
+               gameConfig.menuResources = &menuResources;
+
+               Texture menubg;
+               menubg.SetSurface(IMG_Load("test-data/menubg.png"));
+               menubg.SetSize(Vector<int>(64, 64));
+               menuResources.menubg = &menubg;
+
                InitScreen screen(width, height);
 
                app::State *state(0);