-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
40 lines (38 loc) · 1.78 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
#include <windows.h>
#include "Engine.hpp"
#include "globals.hpp"
int t::Tree::pocetInstanciStromu = 0; // inicializace staticke promenne tridy Tree, slouzi k uchovani poctu strukturovych stromu. Inicializace statickych promennych je nutne provest vzdy mimo tridu.
int t3::Tree3::pocetInstanciStromu = 0; // inicializace staticke promenne tridy Tree3, slouzi k uchovani poctu 3D stromu
int se::Svetlo::pocetInstanciSvetla = 0; // inicializace staticke promenne tridy Svetlo, slouzi k uchovani poctu svetel sceny
int WINAPI main (HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
int nCmdShow)
{
sk::Konzole iKonzole;
// sw::Pozice iPozice {screenX, screenY};
sw::Pozice iPozice {0, 0};
sw::Rozmery iRozmery {windowWidth, windowHeight};
// sw::Okno iOkno(iPozice, iRozmery, "Tree", hThisInstance); //vytvor okno
sw::Okno iOkno(iPozice, "Tree", hThisInstance); //vytvor okno
// sw::Okno iOkno(sw::Pozice(0.f, screenY), sw::Rozmery(230, 480), "Tree", hThisInstance); //vytvor okno pro acer
se::Engine iEngine(&iOkno);
iEngine.dejKonzoli(iKonzole);
iEngine.priprav(); //vytvori si d3d a z nej g_pd3dDevice a pak geometrii
iOkno.ukaz();
while ( iOkno.jeOtevrene() ) { // main loop
iEngine.prectiVstupAUpravKameru();
if(!iOkno.postarejSeOZpravy()){ // krizek
std::cout << "want to quit by X" << std::endl;
iEngine.releaseD3d();
break;
}
else if(iEngine.prikaz == "odejdi" ){ // prikaz/mys
std::cout << "want to quit by command or mouse" << std::endl;
break;
}
iEngine.render3d();
}
// system("pause");
return 0;
}