Fixes
This commit is contained in:
parent
135035bb1a
commit
cdd69496c4
3 changed files with 9 additions and 9 deletions
|
@ -42,7 +42,7 @@ static void RectToSDLRect(const RECT *rect, SDL_Rect *sdl_rect)
|
|||
sdl_rect->h = 0;
|
||||
}
|
||||
|
||||
Backend_Surface* RenderBackend_Init(const char *window_title, int screen_width, int screen_height, BOOL fullscreen)
|
||||
RenderBackend_Surface* RenderBackend_Init(const char *window_title, int screen_width, int screen_height, BOOL fullscreen)
|
||||
{
|
||||
window = SDL_CreateWindow(window_title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, screen_width, screen_height, 0);
|
||||
|
||||
|
@ -88,7 +88,7 @@ void RenderBackend_DrawScreen(void)
|
|||
SDL_UpdateWindowSurface(window);
|
||||
}
|
||||
|
||||
Backend_Surface* RenderBackend_CreateSurface(unsigned int width, unsigned int height)
|
||||
RenderBackend_Surface* RenderBackend_CreateSurface(unsigned int width, unsigned int height)
|
||||
{
|
||||
RenderBackend_Surface *surface = (RenderBackend_Surface*)malloc(sizeof(RenderBackend_Surface));
|
||||
|
||||
|
@ -176,7 +176,7 @@ void RenderBackend_ColourFill(RenderBackend_Surface *surface, const RECT *rect,
|
|||
SDL_FillRect(surface->sdlsurface, &destination_rect, SDL_MapRGB(surface->sdlsurface->format, red, green, blue));
|
||||
}
|
||||
|
||||
Backend_Glyph* RenderBackend_LoadGlyph(const unsigned char *pixels, unsigned int width, unsigned int height, int pitch)
|
||||
RenderBackend_Glyph* RenderBackend_LoadGlyph(const unsigned char *pixels, unsigned int width, unsigned int height, int pitch)
|
||||
{
|
||||
RenderBackend_Glyph *glyph = (RenderBackend_Glyph*)malloc(sizeof(RenderBackend_Glyph));
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ static void GlyphBatch_DestroyTexture(SPRITEBATCH_U64 texture_id, void *udata)
|
|||
SDL_DestroyTexture((SDL_Texture*)texture_id);
|
||||
}
|
||||
|
||||
Backend_Surface* RenderBackend_Init(const char *window_title, int screen_width, int screen_height, BOOL fullscreen)
|
||||
RenderBackend_Surface* RenderBackend_Init(const char *window_title, int screen_width, int screen_height, BOOL fullscreen)
|
||||
{
|
||||
puts("Available SDL2 render drivers:");
|
||||
|
||||
|
@ -209,7 +209,7 @@ void RenderBackend_DrawScreen(void)
|
|||
SDL_RenderPresent(renderer);
|
||||
}
|
||||
|
||||
Backend_Surface* RenderBackend_CreateSurface(unsigned int width, unsigned int height)
|
||||
RenderBackend_Surface* RenderBackend_CreateSurface(unsigned int width, unsigned int height)
|
||||
{
|
||||
RenderBackend_Surface *surface = (RenderBackend_Surface*)malloc(sizeof(RenderBackend_Surface));
|
||||
|
||||
|
@ -349,7 +349,7 @@ void RenderBackend_ColourFill(RenderBackend_Surface *surface, const RECT *rect,
|
|||
SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND);
|
||||
}
|
||||
|
||||
Backend_Glyph* RenderBackend_LoadGlyph(const unsigned char *pixels, unsigned int width, unsigned int height, int pitch)
|
||||
RenderBackend_Glyph* RenderBackend_LoadGlyph(const unsigned char *pixels, unsigned int width, unsigned int height, int pitch)
|
||||
{
|
||||
RenderBackend_Glyph *glyph = (RenderBackend_Glyph*)malloc(sizeof(RenderBackend_Glyph));
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ static RenderBackend_Surface framebuffer;
|
|||
static unsigned char glyph_colour_channels[3];
|
||||
static RenderBackend_Surface *glyph_destination_surface;
|
||||
|
||||
Backend_Surface* RenderBackend_Init(const char *window_title, int screen_width, int screen_height, BOOL fullscreen)
|
||||
RenderBackend_Surface* RenderBackend_Init(const char *window_title, int screen_width, int screen_height, BOOL fullscreen)
|
||||
{
|
||||
window = SDL_CreateWindow(window_title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, screen_width, screen_height, 0);
|
||||
|
||||
|
@ -87,7 +87,7 @@ void RenderBackend_DrawScreen(void)
|
|||
SDL_UpdateWindowSurface(window);
|
||||
}
|
||||
|
||||
Backend_Surface* RenderBackend_CreateSurface(unsigned int width, unsigned int height)
|
||||
RenderBackend_Surface* RenderBackend_CreateSurface(unsigned int width, unsigned int height)
|
||||
{
|
||||
RenderBackend_Surface *surface = (RenderBackend_Surface*)malloc(sizeof(RenderBackend_Surface));
|
||||
|
||||
|
@ -290,7 +290,7 @@ void RenderBackend_ColourFill(RenderBackend_Surface *surface, const RECT *rect,
|
|||
}
|
||||
}
|
||||
|
||||
Backend_Glyph* RenderBackend_LoadGlyph(const unsigned char *pixels, unsigned int width, unsigned int height, int pitch)
|
||||
RenderBackend_Glyph* RenderBackend_LoadGlyph(const unsigned char *pixels, unsigned int width, unsigned int height, int pitch)
|
||||
{
|
||||
RenderBackend_Glyph *glyph = (RenderBackend_Glyph*)malloc(sizeof(RenderBackend_Glyph));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue