2D Run-and-gun shooter inspired by One Man's Doomsday, Counter-Strike, and Metal Slug.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

SDL_render.mock.h 1.3 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef SDL_RENDER_MOCK_H
  2. #define SDL_RENDER_MOCK_H
  3. #include "../src/packages/test/IZ_test.h"
  4. typedef struct SDL_Renderer SDL_Renderer;
  5. typedef struct SDL_Window SDL_Window;
  6. typedef struct SDL_FRect SDL_FRect;
  7. mock(SDL_CreateWindow) SDL_Window* SDL_CreateWindow(
  8. const char *title,
  9. int x, int y, int w,
  10. int h, unsigned int flags
  11. ) {
  12. static SDL_Window* window = (SDL_Window*) 1;
  13. mock_return(SDL_CreateWindow) window;
  14. }
  15. mock(SDL_CreateRenderer) SDL_Renderer* SDL_CreateRenderer(SDL_Window* window, int index, unsigned int flags) {
  16. static SDL_Renderer* renderer = (SDL_Renderer*) 1;
  17. mock_return(SDL_CreateRenderer) renderer;
  18. }
  19. mock(SDL_SetRenderDrawColor) int SDL_SetRenderDrawColor(
  20. SDL_Renderer* renderer,
  21. unsigned char r, unsigned char g, unsigned char b,
  22. unsigned char a
  23. ) {
  24. mock_return(SDL_SetRenderDrawColor) 0;
  25. }
  26. mock(SDL_RenderFillRectF) int SDL_RenderFillRectF(
  27. SDL_Renderer* renderer,
  28. const SDL_FRect* rect
  29. ) {
  30. mock_return(SDL_RenderFillRectF) 0;
  31. }
  32. mock(SDL_RenderClear) int SDL_RenderClear(SDL_Renderer* renderer) {
  33. mock_return(SDL_RenderClear) 0;
  34. }
  35. mock(SDL_RenderPresent) void SDL_RenderPresent(SDL_Renderer* renderer) {
  36. mock_return(SDL_RenderPresent);
  37. }
  38. mock(SDL_DestroyWindow) void SDL_DestroyWindow(SDL_Window* window) {
  39. mock_return(SDL_DestroyWindow);
  40. }
  41. #endif