Added librarys and test application

This commit is contained in:
Gulum
2017-10-22 14:26:55 +02:00
parent 7e0c0d8a6c
commit ac45f1f944
206 changed files with 68009 additions and 13 deletions

View File

@@ -1,11 +1,50 @@
#include <iostream>
using namespace std;
#include <SDL2/SDL.h>
#include <Box2D/Box2D.h>
#include <entityx/entityx.h>
int main( int argc, char *argv[] )
{
cout << "Hello World!" << '\n';
cin.get();
const int WIDTH = 800, HEIGHT = 600;
return 0;
/*
* If 'main' is defined we clear that definition
* to get our default 'main' function back.
*/
int main( int argc, char *argv[] ) {
SDL_Init( SDL_INIT_EVERYTHING );
//Box2D world just testing
b2World *world = new b2World(b2Vec2(0.0f, 98.f));
//entityx testing
entityx::EntityX ex;
entityx::Entity entity = ex.entities.create();
SDL_Window *window = SDL_CreateWindow( "Hello SDL World", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, WIDTH, HEIGHT, SDL_WINDOW_ALLOW_HIGHDPI );
// Check that the window was successfully created
if ( NULL == window )
{
// In the case that the window could not be made...
std::cout << "Could not create window: " << SDL_GetError( ) << std::endl;
return 1;
}
SDL_Event windowEvent;
while ( true )
{
if ( SDL_PollEvent( &windowEvent ) )
{
if ( SDL_QUIT == windowEvent.type )
{
break;
}
}
}
SDL_DestroyWindow( window );
SDL_Quit( );
return EXIT_SUCCESS;
}