pequeños retoques
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#define WINDOW_CAPTION "demo_pelotas2"
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
#define BALL_SIZE 8
|
||||
|
||||
@@ -10,7 +10,7 @@ SDL_Renderer *renderer = NULL;
|
||||
SDL_Event *event;
|
||||
Texture *texture = nullptr;
|
||||
std::vector<Ball *> balls;
|
||||
int test[7] = {1, 10, 100, 500, 1000, 10000, 100000};
|
||||
int test[8] = {1, 10, 100, 500, 1000, 10000, 50000, 100000};
|
||||
|
||||
bool shouldExit = false;
|
||||
Uint32 ticks = 0;
|
||||
@@ -77,7 +77,7 @@ bool init()
|
||||
}
|
||||
|
||||
// Create window
|
||||
window = SDL_CreateWindow("Demo Pelotas 2", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH * 2, SCREEN_HEIGHT * 2, SDL_WINDOW_SHOWN);
|
||||
window = SDL_CreateWindow(WINDOW_CAPTION, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH * 2, SCREEN_HEIGHT * 2, SDL_WINDOW_SHOWN);
|
||||
if (window == NULL)
|
||||
{
|
||||
printf("Window could not be created! SDL Error: %s\n", SDL_GetError());
|
||||
@@ -192,6 +192,11 @@ void checkEvents()
|
||||
{
|
||||
initBalls(6);
|
||||
}
|
||||
|
||||
if (event->key.keysym.sym == SDLK_8)
|
||||
{
|
||||
initBalls(7);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user