mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 10:55:57 -04:00
Mark static stuff as such
This commit is contained in:
parent
6aded10f60
commit
5822e5fc61
@ -36,7 +36,7 @@ using namespace SDL2pp;
|
||||
|
||||
static const float pi = 3.14159265358979323846f;
|
||||
|
||||
int Run() {
|
||||
static int Run() {
|
||||
SDL sdl(SDL_INIT_VIDEO);
|
||||
SDLImage image(IMG_INIT_PNG); // optional
|
||||
Window window("libSDL2pp demo: fill", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_RESIZABLE);
|
||||
|
@ -31,7 +31,7 @@
|
||||
using namespace SDL2pp;
|
||||
|
||||
#define RGBA(r, g, b, a) r, g, b, a
|
||||
unsigned char pixels[4 * 4 * 4] = {
|
||||
static const unsigned char pixels[4 * 4 * 4] = {
|
||||
RGBA(0xff, 0x00, 0x00, 0xff), RGBA(0xff, 0x80, 0x00, 0xff), RGBA(0xff, 0xff, 0x00, 0xff), RGBA(0x80, 0xff, 0x00, 0xff),
|
||||
RGBA(0xff, 0x00, 0x80, 0xff), RGBA(0xff, 0xff, 0xff, 0xff), RGBA(0x00, 0x00, 0x00, 0x00), RGBA(0x00, 0xff, 0x00, 0xff),
|
||||
RGBA(0xff, 0x00, 0xff, 0xff), RGBA(0x00, 0x00, 0x00, 0x00), RGBA(0x00, 0x00, 0x00, 0xff), RGBA(0x00, 0xff, 0x80, 0xff),
|
||||
|
@ -31,7 +31,7 @@
|
||||
using namespace SDL2pp;
|
||||
|
||||
#define RGBA(r, g, b, a) r, g, b, a
|
||||
unsigned char pixels[4 * 4 * 4] = {
|
||||
static const unsigned char pixels[4 * 4 * 4] = {
|
||||
RGBA(0xff, 0x00, 0x00, 0xff), RGBA(0xff, 0x80, 0x00, 0xff), RGBA(0xff, 0xff, 0x00, 0xff), RGBA(0x80, 0xff, 0x00, 0xff),
|
||||
RGBA(0xff, 0x00, 0x80, 0xff), RGBA(0xff, 0xff, 0xff, 0xff), RGBA(0x00, 0x00, 0x00, 0x00), RGBA(0x00, 0xff, 0x00, 0xff),
|
||||
RGBA(0xff, 0x00, 0xff, 0xff), RGBA(0x00, 0x00, 0x00, 0x00), RGBA(0x00, 0x00, 0x00, 0xff), RGBA(0x00, 0xff, 0x80, 0xff),
|
||||
|
Loading…
x
Reference in New Issue
Block a user