Mejorar aspecto visual y configurar filtro nearest neighbor
- Cambiar tamaño de pelota de 8x8 a 10x10 píxeles - Aclarar color de fondo de (32,32,32) a (64,64,64) - Redibujar textura ball.png con mejor definición - Implementar filtro nearest neighbor para texturas píxel-perfect - Actualizar README.md con documentación completa del proyecto 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 162 B |
@@ -5,7 +5,7 @@ constexpr char WINDOW_CAPTION[] = "vibe1_delta";
|
||||
constexpr int SCREEN_WIDTH = 320;
|
||||
constexpr int SCREEN_HEIGHT = 240;
|
||||
constexpr int WINDOW_SIZE = 3;
|
||||
constexpr int BALL_SIZE = 8;
|
||||
constexpr int BALL_SIZE = 10;
|
||||
constexpr float GRAVITY_FORCE = 0.2f;
|
||||
|
||||
constexpr Uint64 DEMO_SPEED = 1000 / 60;
|
||||
|
||||
@@ -235,7 +235,7 @@ void update()
|
||||
// Renderiza el contenido en la pantalla
|
||||
void render()
|
||||
{
|
||||
SDL_SetRenderDrawColor(renderer, 32, 32, 32, 255);
|
||||
SDL_SetRenderDrawColor(renderer, 64, 64, 64, 255);
|
||||
SDL_RenderClear(renderer);
|
||||
|
||||
for (auto &ball : balls)
|
||||
|
||||
@@ -79,6 +79,9 @@ bool Texture::loadFromFile(const std::string &file_path)
|
||||
// Obtiene las dimensiones de la imagen
|
||||
width_ = loaded_surface->w;
|
||||
height_ = loaded_surface->h;
|
||||
|
||||
// Configurar filtro nearest neighbor para píxel perfect
|
||||
SDL_SetTextureScaleMode(new_texture, SDL_SCALEMODE_NEAREST);
|
||||
}
|
||||
|
||||
// Destruye la superficie cargada
|
||||
|
||||
Reference in New Issue
Block a user