-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
42 lines (33 loc) · 1.07 KB
/
main.cpp
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
/*
Copyright © 2013 Alexander Kumenko <[email protected]>
This work is free. You can redistribute it and/or modify it under the terms of
the Do What The Fuck You Want To Public License, Version 2, as published by Sam
Hocevar. See the COPYING file for more details.
*/
#include <iostream>
#include <SFML/Graphics.hpp>
#include "Game.h"
int main(int argc, char* argv[]) {
/* Code adapted from the SFML 2 "Window" example */
sf::RenderWindow wnd(sf::VideoMode(800*1.5, 600*1.5), "myproject");
Game game(&wnd);
//sf::Texture brick;
//brick.loadFromFile("Sprites/brick.bmp");
//sf::Sprite brickSprite;
//brickSprite.setTexture(brick);
//brickSprite.setPosition(sf::Vector2f(10, 50));
while (wnd.isOpen()) {
sf::Event Event;
while (wnd.pollEvent(Event)) {
if (Event.type == sf::Event::Closed)
wnd.close();
}
//if (sf::Keyboard::isKeyPressed(sf::Keyboard::Numpad2))
//brickSprite.move(sf::Vector2f(0, 1));
game.update();
wnd.clear(sf::Color::Black);
game.draw();
//wnd.draw(brickSprite);
wnd.display();
}
}