|
@@ -19,7 +19,9 @@ void application::parseParameters(int argc, char *argv[])
|
|
|
|
|
|
void application::setup()
|
|
|
{
|
|
|
- running = graphics::openWindow();
|
|
|
+ this->running = graphics::openWindow();
|
|
|
+
|
|
|
+ this->part = new particle(50, 100, 1.0);
|
|
|
}
|
|
|
|
|
|
void application::input()
|
|
@@ -33,13 +35,13 @@ void application::input()
|
|
|
switch(event.type)
|
|
|
{
|
|
|
case SDL_QUIT:
|
|
|
- running = false;
|
|
|
+ this->running = false;
|
|
|
break;
|
|
|
|
|
|
case SDL_KEYDOWN:
|
|
|
if (event.key.keysym.sym == SDLK_ESCAPE)
|
|
|
{
|
|
|
- running = false;
|
|
|
+ this->running = false;
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
@@ -54,8 +56,7 @@ void application::update()
|
|
|
void application::render()
|
|
|
{
|
|
|
graphics::clearScreen(0xFF056263);
|
|
|
- graphics::draw::fillCircle(200, 200, 40, 0xFFFFFFFF);
|
|
|
- graphics::draw::text(10, 10, graphics::makeColour(255, 12, 98), "Hello world!");
|
|
|
+ graphics::draw::fillCircle(this->part->position.x, this->part->position.y, 4, 0xFFFFFFFF);
|
|
|
|
|
|
graphics::renderFrame();
|
|
|
}
|
|
@@ -65,4 +66,6 @@ void application::destroy()
|
|
|
// Nothing for now.
|
|
|
|
|
|
graphics::closeWindow();
|
|
|
+
|
|
|
+ delete this->part;
|
|
|
}
|