xormod/picture.h

25 lines
501 B
C
Raw Normal View History

2021-04-12 19:15:41 +00:00
#pragma once
#include <stdint.h>
2024-10-05 21:19:26 +00:00
#include <SDL3/SDL.h>
2021-04-12 19:15:41 +00:00
typedef struct {
2025-01-07 16:04:48 +00:00
int x;
int y;
2021-04-12 19:15:41 +00:00
int w;
int h;
int s;
SDL_Surface *surface;
SDL_Texture *texture;
uint32_t *pixels;
uint32_t color;
2025-01-07 16:47:17 +00:00
int dirty;
2021-04-12 19:15:41 +00:00
} Picture;
void Picture_render(Picture *p, SDL_Renderer *rend);
2025-01-07 16:47:17 +00:00
Picture *Picture_new(int x, int y, int w, int h, uint32_t color);
void Picture_delete(Picture *p);
2021-04-12 19:15:41 +00:00
void Picture_render(Picture *p, SDL_Renderer *rend);
void Picture_move(Picture *p, int x, int y);