diff --git a/src/gmenu2x.h b/src/gmenu2x.h index 7fc5538..01db7ea 100644 --- a/src/gmenu2x.h +++ b/src/gmenu2x.h @@ -32,6 +32,8 @@ #include "utilities.h" #include "touchscreen.h" #include "inputmanager.h" +#include "asfont.h" +#include "surface.h" const int MAX_VOLUME_SCALE_FACTOR = 200; // Default values - going to add settings adjustment, saving, loading and such diff --git a/src/surfacecollection.cpp b/src/surfacecollection.cpp index 06c7ac5..47825fa 100644 --- a/src/surfacecollection.cpp +++ b/src/surfacecollection.cpp @@ -19,8 +19,12 @@ ***************************************************************************/ #include "surfacecollection.h" +#include "surface.h" +#include "utilities.h" -using namespace std; +using std::cout; +using std::endl; +using std::string; SurfaceCollection::SurfaceCollection(bool defaultAlpha, const string &skin) { surfaces.set_empty_key(" "); diff --git a/src/surfacecollection.h b/src/surfacecollection.h index 4b55df6..307dc5d 100644 --- a/src/surfacecollection.h +++ b/src/surfacecollection.h @@ -21,12 +21,11 @@ #define SURFACECOLLECTION_H #include +#include -#include "surface.h" -#include "utilities.h" +class Surface; -using google::dense_hash_map; -typedef dense_hash_map SurfaceHash; +typedef google::dense_hash_map SurfaceHash; /** Hash Map of surfaces that loads surfaces not already loaded and reuses already loaded ones. @@ -36,28 +35,29 @@ Hash Map of surfaces that loads surfaces not already loaded and reuses already l class SurfaceCollection { private: SurfaceHash surfaces; - string skin; + std::string skin; public: - SurfaceCollection(bool defaultAlpha=true, const string &skin="default"); + SurfaceCollection( + bool defaultAlpha = true, const std::string &skin = "default"); ~SurfaceCollection(); - void setSkin(const string &skin); - string getSkinFilePath(const string &file); + void setSkin(const std::string &skin); + std::string getSkinFilePath(const std::string &file); bool defaultAlpha; void debug(); - Surface *add(Surface *s, const string &path); - Surface *add(const string &path, bool alpha=true); - Surface *addSkinRes(const string &path, bool alpha=true); - void del(const string &path); + Surface *add(Surface *s, const std::string &path); + Surface *add(const std::string &path, bool alpha=true); + Surface *addSkinRes(const std::string &path, bool alpha=true); + void del(const std::string &path); void clear(); - void move(const string &from, const string &to); - bool exists(const string &path); + void move(const std::string &from, const std::string &to); + bool exists(const std::string &path); - Surface *operator[](const string &); - Surface *skinRes(const string &); + Surface *operator[](const std::string &); + Surface *skinRes(const std::string &); }; #endif