migrat a SDL3

This commit is contained in:
2025-03-23 22:56:10 +01:00
parent 57db69d2a4
commit 45b763791a
10 changed files with 186 additions and 152 deletions

View File

@@ -1,19 +1,21 @@
#pragma once
#include "SDL2/SDL.h"
#include <stdlib.h> /* srand, rand */
constexpr Uint64 DEMO_SPEED = 1000/60;
#define SCREEN_WIDTH 480
#define SCREEN_HEIGHT 360
#define NUM_BALLS 100
#define BALL_SIZE 36
#define NUM_FRAMES 4
#define BG_R 96
#define BG_G 96
#define BG_B 96
#define TEXTURE_FILE "resources/soccer_ball.png"
constexpr int DEMO_WIDTH = 480;
constexpr int DEMO_HEIGHT = 360;
constexpr int WINDOW_ZOOM = 2;
constexpr int NUM_BALLS = 100;
constexpr int BALL_SIZE = 36;
constexpr int NUM_FRAMES = 4;
struct color_t
constexpr int BG_R = 96;
constexpr int BG_G = 96;
constexpr int BG_B = 96;
constexpr char TEXTURE_FILE[] = "resources/soccer_ball.png";
struct Color
{
int r, g, b;
};