-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
32 lines (25 loc) · 1.01 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
#include "runner.h"
//#include "ResourcePath.hpp" // For Macs; comment out if on Windows or Linux
int main() {
sf::Font inFont;
if(!inFont.loadFromFile("VeraMono.ttf")) // For Windows & Linux; comment out if on Mac
return -1;
//if(!inFont.loadFromFile(resourcePath() + "VeraMono.ttf")) // For Macs; comment out if on Windows or Linux
// return -1;
sf::RenderWindow window(sf::VideoMode(WIN_SIZE_X, WIN_SIZE_Y), "Draw M&J Revamped");
window.setPosition(sf::Vector2i(0, 0));
sf::RenderWindow jWindow(sf::VideoMode(500, 500), "Julia Set");
jWindow.setPosition(sf::Vector2i(window.getSize().x + 16, 0));
sf::RenderTexture pic;
if(!pic.create(window.getSize().x, window.getSize().y - HEIGHT_OFFSET))
return -2;
sf::RenderTexture jPic;
if(!jPic.create(jWindow.getSize().x, jWindow.getSize().y))
return -3;
Runner run(&window, &jWindow, &inFont, &pic, &jPic);
while(window.isOpen()) {
run.HandleEvents();
run.Draw();
}
return 0;
}