1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
#include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <SFML/Graphics.hpp>
#include "PlayerStruct.h"
#include "VariableStruct.h"
#include "GameStruct.h"
#include "Prototypes.h"
#include "PlayerInputStruct.h"
using namespace std;
Game::Game(int WINDOWHEIGHT, int WINDOWWIDTH, const std::string WINDOWNAME, sf::RenderWindow& WINDOW, sf::VideoMode& VIDEOMODE): windowHeight(WINDOWHEIGHT),
windowWidth(WINDOWWIDTH),
windowName(WINDOWNAME),
window(WINDOW),
videoMode(VIDEOMODE)
{
}
GameVariables::GameVariables(string MAPNAME, string TILENAME, string LINE,
vector<vector<sf::Vector2i>> MAP, std::vector<sf::Vector2i> TEMPMAP,
sf::Texture TILETEXTURE, sf::Sprite TILES, int X, int Y, int I, int J): mapName(MAPNAME),
tileName(TILENAME),
line(LINE),
map(MAP),
tempMap(TEMPMAP),
tileTexture(TILETEXTURE),
tiles(TILES),
x(X),
y(Y),
i(I),
j(J)
{
}
int main()
{
string tempMapName = "Map";
string tempTileName = "Tiles";
string tempLine = "temp";
vector<vector<sf::Vector2i>> vMapTemp;
vector<sf::Vector2i> tempTempMap;
ifstream temp;
int setWinHeight = 600;
int setWinWidth = 800;
int x;
int y;
int i;
int j;
const string setWindowName = "Window";
sf::RenderWindow win;
sf::VideoMode vMode;
sf::Texture tempTexture;
sf::Sprite tempSprite;
Game game(setWinHeight, setWinWidth, setWindowName, win, vMode);
GameVariables gameVariables(tempMapName, tempTileName, tempLine, vMapTemp, tempTempMap, tempTexture, tempSprite, x, y, i, j);
MainGame(game, gameVariables, temp);
}
|