Procházet zdrojové kódy

Added a font in the archive and loading a font to test.

Eiyeron Fulmincendii před 9 roky
rodič
revize
d7132ed477
3 změnil soubory, kde provedl 7 přidání a 4 odebrání
  1. binární
      data/out.wrf
  2. 3 2
      src/map/StateMap.cpp
  3. 4 2
      src/map/StateMap.h

binární
data/out.wrf


+ 3 - 2
src/map/StateMap.cpp

@@ -316,9 +316,10 @@ void StateMap::print_haeccity(const char *str, unsigned x, unsigned y,
     }
 }
 
+// TODO : We definitely need a Resource Manager
 StateMap::StateMap(int x, int y, Map &map)
-    : camera(x, y), map(map), arc_haeccity("data/haeccity.wrf"),
-      tex_haeccity(arc_haeccity.get("haeccity"))
+    : camera(x, y), map(map), data("data/out.wrf"),
+      tex_haeccity(data.get("t_haecci")), txt(tex_haeccity, data.get("f_haecci"))
 {
 }
 

+ 4 - 2
src/map/StateMap.h

@@ -4,6 +4,7 @@
 #include "engine/State.h"
 #include "piaf/Archive.h"
 #include "Map.h"
+#include "render/Font.h"
 
 namespace WalrusRPG
 {
@@ -12,10 +13,11 @@ namespace WalrusRPG
         class StateMap : public State
         {
           protected:
-            WalrusRPG::PIAF::Archive arc_haeccity;
-            WalrusRPG::Graphics::Texture tex_haeccity;
             Camera camera;
             Map ↦
+            WalrusRPG::PIAF::Archive data;
+            WalrusRPG::Graphics::Texture tex_haeccity;
+            WalrusRPG::Font::Font txt;
 
           public:
             StateMap(int x, int y, Map &map);