-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
45 lines (39 loc) · 808 Bytes
/
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
43
44
45
#include <Gosu/Gosu.hpp>
#include "lib/galaxy.cpp"
// #include <iostream>
class GameWindow : public Gosu::Window
{
Galaxy* galaxy;
// int counter;
// int mili;
public:
GameWindow() : Window(1000, 1000, false)
{
// counter = 0;
// mili = Gosu::milliseconds();
galaxy = new Galaxy();
setCaption(L"Gosu Tutorial Game");
}
void update()
{
galaxy->calculate_forces();
galaxy->move();
// counter++;
// if(counter == 30){
// std::cout << Gosu::milliseconds() - mili << "\n";
// exit(1);
// }
}
void draw()
{
graphics().pushTransform(Gosu::translate(400, 400));
graphics().pushTransform(Gosu::scale(0.2));
galaxy->draw(graphics());
graphics().popTransform();
}
};
int main()
{
GameWindow window;
window.show();
}