#ifndef RAGB_SDL_H #define RAGB_SDL_H #include #include typedef struct gb_pixel_buffer_t { SDL_Renderer *renderer; SDL_Texture *texture; ut8 *buf; //buffer containing pixeldata ut32 color[4]; //rgb colors ut16 w; //x size in pixel ut16 h; //y size in pixel // ut16 xsf; //x scale factor for projecting onto the texture // ut16 ysf; //y scale factor for projecting onto the texture } GBPixBuf; GBPixBuf *gb_pix_buf_new(SDL_Renderer *renderer, ut16 w, ut16 h); void gb_pix_buf_free(GBPixBuf *pb); void gb_pix_buf_set_pixel(GBPixBuf *pb, ut16 x, ut16 y, ut8 pixval); void gb_pix_buf_set_color(GBPixBuf *pb, ut8 color_idx, ut32 rgb); #endif