-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
49 lines (35 loc) · 1.06 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
43
44
45
46
47
48
49
/*** main.cpp ***/
#include "Source\Rendering\Renderer.h"
#include "Source\Rendering\WindowHandler.h"
//*** Game ***
void Game()
{
Renderer_Init( 800, 600, "Bahamuto" );
/*bitmap_handle_t bitmap = renderer_create_bitmap( "white.png" );
entity_t player = entity_create();
component_player_create( player, 0 );
component_locomotion_create( player, float3( 320, 0, 240 ) );
component_sprite_create( player, bitmap );
*/
bool running = true;
while( running && Window_GetMessage() )
{
float delta_time = 1.0f/60.0f;
// Run systems
Renderer_Draw();
}
Renderer_Terminate();
}
/* include so we can use leak detection */
#include <crtdbg.h>
/*** WinMain ***/
int CALLBACK WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
{
#ifndef NDEBUG
int flag = _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG ); /* Get current flag */
flag ^= _CRTDBG_LEAK_CHECK_DF; /* Turn on leak-checking bit */
_CrtSetDbgFlag( flag ); /* Set flag to the new value */
#endif
Game();
return 0;
}