xormod/picture.h

26 lines
498 B
C

#pragma once
#include <stdint.h>
#include <SDL.h>
typedef struct {
int x1;
int y1;
int x2;
int y2;
int w;
int h;
int s;
SDL_Surface *surface;
SDL_Texture *texture;
uint32_t *pixels;
uint32_t color;
} Picture;
void Picture_render(Picture *p, SDL_Renderer *rend);
Picture *Picture_new(SDL_Renderer *rend,
int x, int y, int w, int h, uint32_t color);
void Picture_render(Picture *p, SDL_Renderer *rend);
void Picture_move(Picture *p, int x, int y);