SDL_test_common.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #ifndef _SDL_test_common_h
  2. #define _SDL_test_common_h
  3. #include "SDL.h"
  4. #if defined(__PSP__)
  5. #define DEFAULT_WINDOW_WIDTH 480
  6. #define DEFAULT_WINDOW_HEIGHT 272
  7. #else
  8. #define DEFAULT_WINDOW_WIDTH 640
  9. #define DEFAULT_WINDOW_HEIGHT 480
  10. #endif
  11. #define VERBOSE_VIDEO 0x00000001
  12. #define VERBOSE_MODES 0x00000002
  13. #define VERBOSE_RENDER 0x00000004
  14. #define VERBOSE_EVENT 0x00000008
  15. #define VERBOSE_AUDIO 0x00000010
  16. typedef struct
  17. {
  18. char **argv;
  19. Uint32 flags;
  20. Uint32 verbose;
  21. const char *videodriver;
  22. int display;
  23. const char *window_title;
  24. const char *window_icon;
  25. Uint32 window_flags;
  26. int window_x;
  27. int window_y;
  28. int window_w;
  29. int window_h;
  30. int window_minW;
  31. int window_minH;
  32. int window_maxW;
  33. int window_maxH;
  34. int logical_w;
  35. int logical_h;
  36. float scale;
  37. int depth;
  38. int refresh_rate;
  39. int num_windows;
  40. SDL_Window **windows;
  41. const char *renderdriver;
  42. Uint32 render_flags;
  43. SDL_bool skip_renderer;
  44. SDL_Renderer **renderers;
  45. const char *audiodriver;
  46. SDL_AudioSpec audiospec;
  47. int gl_red_size;
  48. int gl_green_size;
  49. int gl_blue_size;
  50. int gl_alpha_size;
  51. int gl_buffer_size;
  52. int gl_depth_size;
  53. int gl_stencil_size;
  54. int gl_double_buffer;
  55. int gl_accum_red_size;
  56. int gl_accum_green_size;
  57. int gl_accum_blue_size;
  58. int gl_accum_alpha_size;
  59. int gl_stereo;
  60. int gl_multisamplebuffers;
  61. int gl_multisamplesamples;
  62. int gl_retained_backing;
  63. int gl_accelerated;
  64. int gl_major_version;
  65. int gl_minor_version;
  66. int gl_debug;
  67. } SDLTest_CommonState;
  68. #include "begin_code.h"
  69. #ifdef __cplusplus
  70. extern "C" {
  71. #endif
  72. SDLTest_CommonState *SDLTest_CommonCreateState(char **argv, Uint32 flags);
  73. int SDLTest_CommonArg(SDLTest_CommonState * state, int index);
  74. const char *SDLTest_CommonUsage(SDLTest_CommonState * state);
  75. SDL_bool SDLTest_CommonInit(SDLTest_CommonState * state);
  76. void SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done);
  77. void SDLTest_CommonQuit(SDLTest_CommonState * state);
  78. #ifdef __cplusplus
  79. }
  80. #endif
  81. #include "close_code.h"
  82. #endif