- Canvi de idea
This commit is contained in:
32
old_source/draw.h
Normal file
32
old_source/draw.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include <SDL3/SDL.h>
|
||||
#include <string>
|
||||
|
||||
namespace draw
|
||||
{
|
||||
struct texture_t
|
||||
{
|
||||
std::string name;
|
||||
SDL_Texture *texture {nullptr};
|
||||
uint8_t *pixels {nullptr};
|
||||
int w;
|
||||
int h;
|
||||
bool target {false};
|
||||
};
|
||||
|
||||
void init();
|
||||
void fillRect(int x, int y, int w, int h, uint8_t r, uint8_t g, uint8_t b, uint8_t a);
|
||||
void setSource(SDL_Texture *texture);
|
||||
void setDest(SDL_Texture *texture);
|
||||
|
||||
int loadPalette(const char *filename);
|
||||
void regenerateTextures();
|
||||
texture_t getTexture(const char *name);
|
||||
texture_t createTexture(const char* name, int w, int h, SDL_TextureAccess access);
|
||||
void deleteTexture(const char *name);
|
||||
|
||||
void draw(int dx, int dy, int dw, int dh, int sx, int sy, int sw, int sh);
|
||||
|
||||
void present();
|
||||
}
|
||||
Reference in New Issue
Block a user