// Constructor(s) // Constructor 1 Puzzle::Puzzle(int tilesInRow, sf::IntRect windowBounds) : mTiles(tilesInRow * tilesInRow) , mGrid(tilesInRow, windowBounds) { createSprites(); loadRandomTexture(); setupTiles(); jumbleTilePositions(); }
int main() { srand ( time(NULL) ); game_graphics = new SDLGraphics(SCREEN_WIDTH + 150, SCREEN_HEIGHT, "Min Wage", 0,0,0); //game_timer = new Timer(); game_input = new Input(); gameMenu = new menuClass(); gameIndoors = new IndoorHandler(); playerStuff.gameStart(); //There's got to be a better way to do this (generating random tiles for the grass)... //This is probably a better idea: generate the entire backdrop as an SDL_Surface that can be drawn // each time it is needed? int randTiles[(SCREEN_HEIGHT / 32) * (SCREEN_WIDTH / 32)]; int i = 0; for (i = 0; i < (SCREEN_HEIGHT / 32) * (SCREEN_WIDTH / 32); i++) { randTiles[i] = rand() % 4; } //makeMap(); //loadMapFile("datfile.dat"); setupTiles(); showTitle(); gameloop(randTiles); exitGame(); return 0; }