2D Run-and-gun shooter inspired by One Man's Doomsday, Counter-Strike, and Metal Slug.
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

SDL_render.mock.h 1.3 KiB

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