0 Members and 1 Guest are viewing this topic.
class Game{ public: sf::RenderWindow App(); vector <sf::Sprite> SpriteFiles; void Setup(); void MainMenu(); void GetEvents(); void LevelUp(string, int*);//Daemon name, pointer to Daemon stats array Game(); ~Game(); private: bool FilesExist; stringstream PictureName; char ImageNum; vector <sf::Image> ImageFiles;};
void Map::Display(){ Game.App.Clear(); for (int y=PosY; y<ScreenHeight; y++) { for (int x=PosX; x<ScreenWidth; x++) { if (y >= 0 && x >= 0) { if (MapData[x + (y * MapWidth)] == -1) continue; Game.SpriteFiles[MapData[x + (y * MapWidth)]].SetPosition(x * 64, y * 64); Game.App.Draw(Game.SpriteFiles[MapData[x + (y * MapWidth)]]); } } } Game.App.Display(); return;}