30 lines
650 B
C++
30 lines
650 B
C++
#pragma once
|
|
|
|
#include <SDL3/SDL.h>
|
|
|
|
namespace Palette
|
|
{
|
|
typedef struct SurfaceData *Surface;
|
|
|
|
Surface newSurface(int w, int h);
|
|
void deleteSurface(Surface surf);
|
|
void setDst(Surface surf);
|
|
void setSrc(Surface surf);
|
|
|
|
Surface loadSurface(const char *filename);
|
|
|
|
void putPixel(int x, int y, Uint8 color);
|
|
Uint8 getPixel(int x, int y);
|
|
|
|
void blit(int dx, int dy, int sx, int sy, int w, int h);
|
|
|
|
void init(const char *titol, int w, int h, int z);
|
|
|
|
void setPalette(int index, Uint32 color);
|
|
void loadPalette(const char *filename);
|
|
|
|
void clear(Uint8 color);
|
|
|
|
void flip();
|
|
void switchPalette();
|
|
} |