|
|
@@ -1,6 +1,7 @@ |
|
|
|
#ifndef SDL_RENDER_MOCK_H |
|
|
|
#define SDL_RENDER_MOCK_H |
|
|
|
|
|
|
|
#include "../src/packages/game/IZ_common.h" |
|
|
|
#include "../src/packages/test/IZ_test.h" |
|
|
|
|
|
|
|
typedef struct SDL_Renderer SDL_Renderer; |
|
|
@@ -11,34 +12,34 @@ typedef struct SDL_FRect SDL_FRect; |
|
|
|
|
|
|
|
mock(SDL_CreateWindow) SDL_Window* SDL_CreateWindow( |
|
|
|
const char *title, |
|
|
|
int x, int y, int w, |
|
|
|
int h, unsigned int flags |
|
|
|
i32 x, i32 y, i32 w, |
|
|
|
i32 h, u32 flags |
|
|
|
) { |
|
|
|
static SDL_Window* window = (SDL_Window*) 1; |
|
|
|
mock_return(SDL_CreateWindow) window; |
|
|
|
} |
|
|
|
|
|
|
|
mock(SDL_CreateRenderer) SDL_Renderer* SDL_CreateRenderer(SDL_Window* window, int index, unsigned int flags) { |
|
|
|
mock(SDL_CreateRenderer) SDL_Renderer* SDL_CreateRenderer(SDL_Window* window, i32 index, u32 flags) { |
|
|
|
static SDL_Renderer* renderer = (SDL_Renderer*) 1; |
|
|
|
mock_return(SDL_CreateRenderer) renderer; |
|
|
|
} |
|
|
|
|
|
|
|
mock(SDL_SetRenderDrawColor) int SDL_SetRenderDrawColor( |
|
|
|
mock(SDL_SetRenderDrawColor) i32 SDL_SetRenderDrawColor( |
|
|
|
SDL_Renderer* renderer, |
|
|
|
unsigned char r, unsigned char g, unsigned char b, |
|
|
|
unsigned char a |
|
|
|
u8 r, u8 g, u8 b, |
|
|
|
u8 a |
|
|
|
) { |
|
|
|
mock_return(SDL_SetRenderDrawColor) 0; |
|
|
|
} |
|
|
|
|
|
|
|
mock(SDL_RenderFillRectF) int SDL_RenderFillRectF( |
|
|
|
mock(SDL_RenderFillRectF) i32 SDL_RenderFillRectF( |
|
|
|
SDL_Renderer* renderer, |
|
|
|
const SDL_FRect* rect |
|
|
|
) { |
|
|
|
mock_return(SDL_RenderFillRectF) 0; |
|
|
|
} |
|
|
|
|
|
|
|
mock(SDL_RenderClear) int SDL_RenderClear(SDL_Renderer* renderer) { |
|
|
|
mock(SDL_RenderClear) i32 SDL_RenderClear(SDL_Renderer* renderer) { |
|
|
|
mock_return(SDL_RenderClear) 0; |
|
|
|
} |
|
|
|
|
|
|
|