ruby2d 0.9.5 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/assets/include/SDL2/SDL.h +4 -1
  3. data/assets/include/SDL2/SDL_assert.h +3 -1
  4. data/assets/include/SDL2/SDL_atomic.h +1 -1
  5. data/assets/include/SDL2/SDL_audio.h +1 -1
  6. data/assets/include/SDL2/SDL_bits.h +1 -1
  7. data/assets/include/SDL2/SDL_blendmode.h +4 -1
  8. data/assets/include/SDL2/SDL_clipboard.h +1 -1
  9. data/assets/include/SDL2/SDL_config.h +1 -1
  10. data/assets/include/SDL2/SDL_config_android.h +7 -3
  11. data/assets/include/SDL2/SDL_config_iphoneos.h +16 -10
  12. data/assets/include/SDL2/SDL_config_macosx.h +40 -14
  13. data/assets/include/SDL2/SDL_config_minimal.h +1 -1
  14. data/assets/include/SDL2/SDL_config_os2.h +26 -8
  15. data/assets/include/SDL2/SDL_config_pandora.h +4 -2
  16. data/assets/include/SDL2/SDL_config_psp.h +2 -1
  17. data/assets/include/SDL2/SDL_config_windows.h +40 -9
  18. data/assets/include/SDL2/SDL_config_winrt.h +5 -2
  19. data/assets/include/SDL2/SDL_config_wiz.h +5 -2
  20. data/assets/include/SDL2/SDL_copying.h +1 -1
  21. data/assets/include/SDL2/SDL_cpuinfo.h +32 -3
  22. data/assets/include/SDL2/SDL_egl.h +4 -1
  23. data/assets/include/SDL2/SDL_endian.h +6 -3
  24. data/assets/include/SDL2/SDL_error.h +38 -2
  25. data/assets/include/SDL2/SDL_events.h +64 -28
  26. data/assets/include/SDL2/SDL_filesystem.h +1 -1
  27. data/assets/include/SDL2/SDL_gamecontroller.h +160 -9
  28. data/assets/include/SDL2/SDL_gesture.h +1 -1
  29. data/assets/include/SDL2/SDL_haptic.h +10 -1
  30. data/assets/include/SDL2/SDL_hints.h +316 -4
  31. data/assets/include/SDL2/SDL_joystick.h +115 -24
  32. data/assets/include/SDL2/SDL_keyboard.h +1 -1
  33. data/assets/include/SDL2/SDL_keycode.h +11 -9
  34. data/assets/include/SDL2/SDL_loadso.h +1 -1
  35. data/assets/include/SDL2/SDL_locale.h +101 -0
  36. data/assets/include/SDL2/SDL_log.h +3 -3
  37. data/assets/include/SDL2/SDL_main.h +1 -1
  38. data/assets/include/SDL2/SDL_messagebox.h +6 -4
  39. data/assets/include/SDL2/SDL_metal.h +117 -0
  40. data/assets/include/SDL2/SDL_misc.h +75 -0
  41. data/assets/include/SDL2/SDL_mouse.h +1 -1
  42. data/assets/include/SDL2/SDL_mutex.h +1 -1
  43. data/assets/include/SDL2/SDL_name.h +1 -1
  44. data/assets/include/SDL2/SDL_opengl.h +1 -1
  45. data/assets/include/SDL2/SDL_opengl_glext.h +3 -0
  46. data/assets/include/SDL2/SDL_opengles.h +1 -1
  47. data/assets/include/SDL2/SDL_opengles2.h +1 -1
  48. data/assets/include/SDL2/SDL_pixels.h +25 -16
  49. data/assets/include/SDL2/SDL_platform.h +1 -1
  50. data/assets/include/SDL2/SDL_power.h +1 -1
  51. data/assets/include/SDL2/SDL_quit.h +1 -1
  52. data/assets/include/SDL2/SDL_rect.h +1 -1
  53. data/assets/include/SDL2/SDL_render.h +63 -3
  54. data/assets/include/SDL2/SDL_revision.h +2 -2
  55. data/assets/include/SDL2/SDL_rwops.h +2 -10
  56. data/assets/include/SDL2/SDL_scancode.h +1 -1
  57. data/assets/include/SDL2/SDL_sensor.h +25 -9
  58. data/assets/include/SDL2/SDL_shape.h +1 -1
  59. data/assets/include/SDL2/SDL_stdinc.h +44 -4
  60. data/assets/include/SDL2/SDL_surface.h +11 -2
  61. data/assets/include/SDL2/SDL_system.h +50 -4
  62. data/assets/include/SDL2/SDL_syswm.h +29 -2
  63. data/assets/include/SDL2/SDL_test.h +1 -1
  64. data/assets/include/SDL2/SDL_test_assert.h +1 -1
  65. data/assets/include/SDL2/SDL_test_common.h +14 -1
  66. data/assets/include/SDL2/SDL_test_compare.h +1 -1
  67. data/assets/include/SDL2/SDL_test_crc32.h +1 -1
  68. data/assets/include/SDL2/SDL_test_font.h +1 -1
  69. data/assets/include/SDL2/SDL_test_fuzzer.h +1 -1
  70. data/assets/include/SDL2/SDL_test_harness.h +1 -1
  71. data/assets/include/SDL2/SDL_test_images.h +1 -1
  72. data/assets/include/SDL2/SDL_test_log.h +1 -1
  73. data/assets/include/SDL2/SDL_test_md5.h +1 -1
  74. data/assets/include/SDL2/SDL_test_memory.h +1 -1
  75. data/assets/include/SDL2/SDL_test_random.h +1 -1
  76. data/assets/include/SDL2/SDL_thread.h +34 -11
  77. data/assets/include/SDL2/SDL_timer.h +1 -1
  78. data/assets/include/SDL2/SDL_touch.h +1 -1
  79. data/assets/include/SDL2/SDL_types.h +1 -1
  80. data/assets/include/SDL2/SDL_version.h +2 -2
  81. data/assets/include/SDL2/SDL_video.h +11 -5
  82. data/assets/include/SDL2/SDL_vulkan.h +6 -8
  83. data/assets/include/SDL2/begin_code.h +5 -9
  84. data/assets/include/SDL2/close_code.h +1 -1
  85. data/assets/macos/lib/libFLAC.a +0 -0
  86. data/assets/macos/lib/libSDL2.a +0 -0
  87. data/assets/macos/lib/libSDL2_image.a +0 -0
  88. data/assets/macos/lib/libSDL2_mixer.a +0 -0
  89. data/assets/macos/lib/libSDL2_ttf.a +0 -0
  90. data/assets/macos/lib/libfreetype.a +0 -0
  91. data/assets/macos/lib/libjpeg.a +0 -0
  92. data/assets/macos/lib/libmpg123.a +0 -0
  93. data/assets/macos/lib/libogg.a +0 -0
  94. data/assets/macos/lib/libpng16.a +0 -0
  95. data/assets/macos/lib/libtiff.a +0 -0
  96. data/assets/macos/lib/libvorbis.a +0 -0
  97. data/assets/macos/lib/libvorbisfile.a +0 -0
  98. data/assets/macos/lib/libwebp.a +0 -0
  99. data/assets/mingw/bin/SDL2.dll +0 -0
  100. data/assets/mingw/lib/libSDL2.a +0 -0
  101. data/assets/mingw/lib/libSDL2.dll.a +0 -0
  102. data/assets/mingw/lib/libSDL2_test.a +0 -0
  103. data/assets/mingw/lib/libSDL2main.a +0 -0
  104. data/ext/ruby2d/extconf.rb +1 -1
  105. data/ext/ruby2d/gl.c +17 -0
  106. data/ext/ruby2d/gl2.c +15 -0
  107. data/ext/ruby2d/gl3.c +15 -0
  108. data/ext/ruby2d/gles.c +15 -0
  109. data/ext/ruby2d/music.c +13 -0
  110. data/ext/ruby2d/ruby2d.c +306 -168
  111. data/ext/ruby2d/ruby2d.h +32 -0
  112. data/ext/ruby2d/sound.c +25 -0
  113. data/ext/ruby2d/tileset.c +30 -0
  114. data/lib/ruby2d.rb +4 -1
  115. data/lib/ruby2d/circle.rb +18 -2
  116. data/lib/ruby2d/dsl.rb +16 -9
  117. data/lib/ruby2d/entity.rb +17 -0
  118. data/lib/ruby2d/font.rb +4 -3
  119. data/lib/ruby2d/image.rb +24 -1
  120. data/lib/ruby2d/line.rb +20 -0
  121. data/lib/ruby2d/music.rb +5 -0
  122. data/lib/ruby2d/pixel.rb +17 -0
  123. data/lib/ruby2d/quad.rb +18 -0
  124. data/lib/ruby2d/rectangle.rb +11 -2
  125. data/lib/ruby2d/renderable.rb +4 -8
  126. data/lib/ruby2d/sound.rb +5 -0
  127. data/lib/ruby2d/sprite.rb +35 -3
  128. data/lib/ruby2d/square.rb +9 -0
  129. data/lib/ruby2d/text.rb +22 -1
  130. data/lib/ruby2d/tileset.rb +69 -0
  131. data/lib/ruby2d/triangle.rb +16 -0
  132. data/lib/ruby2d/version.rb +1 -1
  133. data/lib/ruby2d/window.rb +249 -22
  134. metadata +10 -3
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -36,9 +36,11 @@ extern "C" {
36
36
  */
37
37
  typedef enum
38
38
  {
39
- SDL_MESSAGEBOX_ERROR = 0x00000010, /**< error dialog */
40
- SDL_MESSAGEBOX_WARNING = 0x00000020, /**< warning dialog */
41
- SDL_MESSAGEBOX_INFORMATION = 0x00000040 /**< informational dialog */
39
+ SDL_MESSAGEBOX_ERROR = 0x00000010, /**< error dialog */
40
+ SDL_MESSAGEBOX_WARNING = 0x00000020, /**< warning dialog */
41
+ SDL_MESSAGEBOX_INFORMATION = 0x00000040, /**< informational dialog */
42
+ SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT = 0x00000080, /**< buttons placed left to right */
43
+ SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT = 0x00000100 /**< buttons placed right to left */
42
44
  } SDL_MessageBoxFlags;
43
45
 
44
46
  /**
@@ -0,0 +1,117 @@
1
+ /*
2
+ Simple DirectMedia Layer
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
+
5
+ This software is provided 'as-is', without any express or implied
6
+ warranty. In no event will the authors be held liable for any damages
7
+ arising from the use of this software.
8
+
9
+ Permission is granted to anyone to use this software for any purpose,
10
+ including commercial applications, and to alter it and redistribute it
11
+ freely, subject to the following restrictions:
12
+
13
+ 1. The origin of this software must not be misrepresented; you must not
14
+ claim that you wrote the original software. If you use this software
15
+ in a product, an acknowledgment in the product documentation would be
16
+ appreciated but is not required.
17
+ 2. Altered source versions must be plainly marked as such, and must not be
18
+ misrepresented as being the original software.
19
+ 3. This notice may not be removed or altered from any source distribution.
20
+ */
21
+
22
+ /**
23
+ * \file SDL_metal.h
24
+ *
25
+ * Header file for functions to creating Metal layers and views on SDL windows.
26
+ */
27
+
28
+ #ifndef SDL_metal_h_
29
+ #define SDL_metal_h_
30
+
31
+ #include "SDL_video.h"
32
+
33
+ #include "begin_code.h"
34
+ /* Set up for C function definitions, even when using C++ */
35
+ #ifdef __cplusplus
36
+ extern "C" {
37
+ #endif
38
+
39
+ /**
40
+ * \brief A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS).
41
+ *
42
+ * \note This can be cast directly to an NSView or UIView.
43
+ */
44
+ typedef void *SDL_MetalView;
45
+
46
+ /**
47
+ * \name Metal support functions
48
+ */
49
+ /* @{ */
50
+
51
+ /**
52
+ * \brief Create a CAMetalLayer-backed NSView/UIView and attach it to the
53
+ * specified window.
54
+ *
55
+ * On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on its
56
+ * own. It is up to user code to do that.
57
+ *
58
+ * The returned handle can be casted directly to a NSView or UIView.
59
+ * To access the backing CAMetalLayer, call SDL_Metal_GetLayer().
60
+ *
61
+ * \note \a window must be created with the SDL_WINDOW_METAL flag.
62
+ *
63
+ * \sa SDL_Metal_DestroyView
64
+ * \sa SDL_Metal_GetLayer
65
+ */
66
+ extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window);
67
+
68
+ /**
69
+ * \brief Destroy an existing SDL_MetalView object.
70
+ *
71
+ * This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was
72
+ * called after SDL_CreateWindow.
73
+ *
74
+ * \sa SDL_Metal_CreateView
75
+ */
76
+ extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view);
77
+
78
+ /**
79
+ * \brief Get a pointer to the backing CAMetalLayer for the given view.
80
+ *
81
+ * \sa SDL_MetalCreateView
82
+ */
83
+ extern DECLSPEC void *SDLCALL SDL_Metal_GetLayer(SDL_MetalView view);
84
+
85
+ /**
86
+ * \brief Get the size of a window's underlying drawable in pixels (for use
87
+ * with setting viewport, scissor & etc).
88
+ *
89
+ * \param window SDL_Window from which the drawable size should be queried
90
+ * \param w Pointer to variable for storing the width in pixels,
91
+ * may be NULL
92
+ * \param h Pointer to variable for storing the height in pixels,
93
+ * may be NULL
94
+ *
95
+ * This may differ from SDL_GetWindowSize() if we're rendering to a high-DPI
96
+ * drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a
97
+ * platform with high-DPI support (Apple calls this "Retina"), and not disabled
98
+ * by the \c SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.
99
+ *
100
+ * \note On macOS high-DPI support must be enabled for an application by
101
+ * setting NSHighResolutionCapable to true in its Info.plist.
102
+ *
103
+ * \sa SDL_GetWindowSize()
104
+ * \sa SDL_CreateWindow()
105
+ */
106
+ extern DECLSPEC void SDLCALL SDL_Metal_GetDrawableSize(SDL_Window* window, int *w,
107
+ int *h);
108
+
109
+ /* @} *//* Metal support functions */
110
+
111
+ /* Ends C function definitions when using C++ */
112
+ #ifdef __cplusplus
113
+ }
114
+ #endif
115
+ #include "close_code.h"
116
+
117
+ #endif /* SDL_metal_h_ */
@@ -0,0 +1,75 @@
1
+ /*
2
+ Simple DirectMedia Layer
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
+
5
+ This software is provided 'as-is', without any express or implied
6
+ warranty. In no event will the authors be held liable for any damages
7
+ arising from the use of this software.
8
+
9
+ Permission is granted to anyone to use this software for any purpose,
10
+ including commercial applications, and to alter it and redistribute it
11
+ freely, subject to the following restrictions:
12
+
13
+ 1. The origin of this software must not be misrepresented; you must not
14
+ claim that you wrote the original software. If you use this software
15
+ in a product, an acknowledgment in the product documentation would be
16
+ appreciated but is not required.
17
+ 2. Altered source versions must be plainly marked as such, and must not be
18
+ misrepresented as being the original software.
19
+ 3. This notice may not be removed or altered from any source distribution.
20
+ */
21
+
22
+ /**
23
+ * \file SDL_misc.h
24
+ *
25
+ * \brief Include file for SDL API functions that don't fit elsewhere.
26
+ */
27
+
28
+ #ifndef SDL_misc_h_
29
+ #define SDL_misc_h_
30
+
31
+ #include "SDL_stdinc.h"
32
+
33
+ #include "begin_code.h"
34
+
35
+ /* Set up for C function definitions, even when using C++ */
36
+ #ifdef __cplusplus
37
+ extern "C" {
38
+ #endif
39
+
40
+ /**
41
+ * \brief Open an URL / URI in the browser or other
42
+ *
43
+ * Open a URL in a separate, system-provided application. How this works will
44
+ * vary wildly depending on the platform. This will likely launch what
45
+ * makes sense to handle a specific URL's protocol (a web browser for http://,
46
+ * etc), but it might also be able to launch file managers for directories
47
+ * and other things.
48
+ *
49
+ * What happens when you open a URL varies wildly as well: your game window
50
+ * may lose focus (and may or may not lose focus if your game was fullscreen
51
+ * or grabbing input at the time). On mobile devices, your app will likely
52
+ * move to the background or your process might be paused. Any given platform
53
+ * may or may not handle a given URL.
54
+ *
55
+ * If this is unimplemented (or simply unavailable) for a platform, this will
56
+ * fail with an error. A successful result does not mean the URL loaded, just
57
+ * that we launched something to handle it (or at least believe we did).
58
+ *
59
+ * All this to say: this function can be useful, but you should definitely
60
+ * test it on every platform you target.
61
+ *
62
+ * \param url A valid URL to open.
63
+ * \return 0 on success, or -1 on error.
64
+ */
65
+ extern DECLSPEC int SDLCALL SDL_OpenURL(const char *url);
66
+
67
+ /* Ends C function definitions when using C++ */
68
+ #ifdef __cplusplus
69
+ }
70
+ #endif
71
+ #include "close_code.h"
72
+
73
+ #endif /* SDL_misc_h_ */
74
+
75
+ /* vi: set ts=4 sw=4 expandtab: */
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -40,6 +40,9 @@ extern "C" {
40
40
  #ifndef WIN32_LEAN_AND_MEAN
41
41
  #define WIN32_LEAN_AND_MEAN 1
42
42
  #endif
43
+ #ifndef NOMINMAX /* don't define min() and max(). */
44
+ #define NOMINMAX
45
+ #endif
43
46
  #include <windows.h>
44
47
  #endif
45
48
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -48,7 +48,7 @@ extern "C" {
48
48
  /* @} */
49
49
 
50
50
  /** Pixel type. */
51
- enum
51
+ typedef enum
52
52
  {
53
53
  SDL_PIXELTYPE_UNKNOWN,
54
54
  SDL_PIXELTYPE_INDEX1,
@@ -62,18 +62,18 @@ enum
62
62
  SDL_PIXELTYPE_ARRAYU32,
63
63
  SDL_PIXELTYPE_ARRAYF16,
64
64
  SDL_PIXELTYPE_ARRAYF32
65
- };
65
+ } SDL_PixelType;
66
66
 
67
67
  /** Bitmap pixel order, high bit -> low bit. */
68
- enum
68
+ typedef enum
69
69
  {
70
70
  SDL_BITMAPORDER_NONE,
71
71
  SDL_BITMAPORDER_4321,
72
72
  SDL_BITMAPORDER_1234
73
- };
73
+ } SDL_BitmapOrder;
74
74
 
75
75
  /** Packed component order, high bit -> low bit. */
76
- enum
76
+ typedef enum
77
77
  {
78
78
  SDL_PACKEDORDER_NONE,
79
79
  SDL_PACKEDORDER_XRGB,
@@ -84,12 +84,12 @@ enum
84
84
  SDL_PACKEDORDER_BGRX,
85
85
  SDL_PACKEDORDER_ABGR,
86
86
  SDL_PACKEDORDER_BGRA
87
- };
87
+ } SDL_PackedOrder;
88
88
 
89
89
  /** Array component order, low byte -> high byte. */
90
90
  /* !!! FIXME: in 2.1, make these not overlap differently with
91
91
  !!! FIXME: SDL_PACKEDORDER_*, so we can simplify SDL_ISPIXELFORMAT_ALPHA */
92
- enum
92
+ typedef enum
93
93
  {
94
94
  SDL_ARRAYORDER_NONE,
95
95
  SDL_ARRAYORDER_RGB,
@@ -98,10 +98,10 @@ enum
98
98
  SDL_ARRAYORDER_BGR,
99
99
  SDL_ARRAYORDER_BGRA,
100
100
  SDL_ARRAYORDER_ABGR
101
- };
101
+ } SDL_ArrayOrder;
102
102
 
103
103
  /** Packed component layout. */
104
- enum
104
+ typedef enum
105
105
  {
106
106
  SDL_PACKEDLAYOUT_NONE,
107
107
  SDL_PACKEDLAYOUT_332,
@@ -112,7 +112,7 @@ enum
112
112
  SDL_PACKEDLAYOUT_8888,
113
113
  SDL_PACKEDLAYOUT_2101010,
114
114
  SDL_PACKEDLAYOUT_1010102
115
- };
115
+ } SDL_PackedLayout;
116
116
 
117
117
  #define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D)
118
118
 
@@ -188,15 +188,22 @@ typedef enum
188
188
  SDL_PIXELFORMAT_RGB332 =
189
189
  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED8, SDL_PACKEDORDER_XRGB,
190
190
  SDL_PACKEDLAYOUT_332, 8, 1),
191
- SDL_PIXELFORMAT_RGB444 =
191
+ SDL_PIXELFORMAT_XRGB4444 =
192
192
  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
193
193
  SDL_PACKEDLAYOUT_4444, 12, 2),
194
- SDL_PIXELFORMAT_RGB555 =
194
+ SDL_PIXELFORMAT_RGB444 = SDL_PIXELFORMAT_XRGB4444,
195
+ SDL_PIXELFORMAT_XBGR4444 =
196
+ SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
197
+ SDL_PACKEDLAYOUT_4444, 12, 2),
198
+ SDL_PIXELFORMAT_BGR444 = SDL_PIXELFORMAT_XBGR4444,
199
+ SDL_PIXELFORMAT_XRGB1555 =
195
200
  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
196
201
  SDL_PACKEDLAYOUT_1555, 15, 2),
197
- SDL_PIXELFORMAT_BGR555 =
202
+ SDL_PIXELFORMAT_RGB555 = SDL_PIXELFORMAT_XRGB1555,
203
+ SDL_PIXELFORMAT_XBGR1555 =
198
204
  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
199
205
  SDL_PACKEDLAYOUT_1555, 15, 2),
206
+ SDL_PIXELFORMAT_BGR555 = SDL_PIXELFORMAT_XBGR1555,
200
207
  SDL_PIXELFORMAT_ARGB4444 =
201
208
  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_ARGB,
202
209
  SDL_PACKEDLAYOUT_4444, 16, 2),
@@ -233,15 +240,17 @@ typedef enum
233
240
  SDL_PIXELFORMAT_BGR24 =
234
241
  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_ARRAYU8, SDL_ARRAYORDER_BGR, 0,
235
242
  24, 3),
236
- SDL_PIXELFORMAT_RGB888 =
243
+ SDL_PIXELFORMAT_XRGB8888 =
237
244
  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XRGB,
238
245
  SDL_PACKEDLAYOUT_8888, 24, 4),
246
+ SDL_PIXELFORMAT_RGB888 = SDL_PIXELFORMAT_XRGB8888,
239
247
  SDL_PIXELFORMAT_RGBX8888 =
240
248
  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_RGBX,
241
249
  SDL_PACKEDLAYOUT_8888, 24, 4),
242
- SDL_PIXELFORMAT_BGR888 =
250
+ SDL_PIXELFORMAT_XBGR8888 =
243
251
  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_XBGR,
244
252
  SDL_PACKEDLAYOUT_8888, 24, 4),
253
+ SDL_PIXELFORMAT_BGR888 = SDL_PIXELFORMAT_XBGR8888,
245
254
  SDL_PIXELFORMAT_BGRX8888 =
246
255
  SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED32, SDL_PACKEDORDER_BGRX,
247
256
  SDL_PACKEDLAYOUT_8888, 24, 4),
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages