App now has a window handle
This commit is contained in:
parent
334dbb2740
commit
7c75e10d62
2
app.h
2
app.h
@ -15,6 +15,8 @@ extern "C" {
|
|||||||
|
|
||||||
|
|
||||||
typedef struct _App {
|
typedef struct _App {
|
||||||
|
void *window; // HWND pointer; window handle set by main()
|
||||||
|
|
||||||
System_Physics *physics;
|
System_Physics *physics;
|
||||||
System_Player *player;
|
System_Player *player;
|
||||||
System_Input *input;
|
System_Input *input;
|
||||||
|
3
main.cpp
3
main.cpp
@ -29,7 +29,8 @@ int main() {
|
|||||||
vector_Vector *debugText = vector_Create(1);
|
vector_Vector *debugText = vector_Create(1);
|
||||||
bool debugPressed = false;
|
bool debugPressed = false;
|
||||||
|
|
||||||
App *app = app_NewApp();
|
App *app = app_NewApp();
|
||||||
|
app->window = win;
|
||||||
while (!app->wantQuit) {
|
while (!app->wantQuit) {
|
||||||
if (time_Since(frameCounter).microseconds >= 1000000) { // 1 sec
|
if (time_Since(frameCounter).microseconds >= 1000000) { // 1 sec
|
||||||
/* Duration d = */ time_Reset(&frameCounter);
|
/* Duration d = */ time_Reset(&frameCounter);
|
||||||
|
Loading…
Reference in New Issue
Block a user