1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
|
diff -Naur SDL_kitchensink-1.0.4-o/CMakeLists.txt SDL_kitchensink-1.0.4/CMakeLists.txt
--- SDL_kitchensink-1.0.4-o/CMakeLists.txt 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/CMakeLists.txt 2018-07-23 10:05:19.626764361 +0200
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.7)
+cmake_minimum_required(VERSION 3.5)
project(SDL_kitchensink C)
include(GNUInstallDirs)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
diff -Naur SDL_kitchensink-1.0.4-o/examples/example_audio.c SDL_kitchensink-1.0.4/examples/example_audio.c
--- SDL_kitchensink-1.0.4-o/examples/example_audio.c 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/examples/example_audio.c 2018-07-23 10:05:19.626764361 +0200
@@ -1,5 +1,5 @@
#include <kitchensink/kitchensink.h>
-#include <SDL.h>
+#include <SDL2/SDL.h>
#include <stdio.h>
#include <stdbool.h>
diff -Naur SDL_kitchensink-1.0.4-o/examples/example_complex.c SDL_kitchensink-1.0.4/examples/example_complex.c
--- SDL_kitchensink-1.0.4-o/examples/example_complex.c 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/examples/example_complex.c 2018-07-23 10:05:19.626764361 +0200
@@ -1,5 +1,5 @@
#include <kitchensink/kitchensink.h>
-#include <SDL.h>
+#include <SDL2/SDL.h>
#include <stdio.h>
#include <stdbool.h>
diff -Naur SDL_kitchensink-1.0.4-o/examples/example_custom.c SDL_kitchensink-1.0.4/examples/example_custom.c
--- SDL_kitchensink-1.0.4-o/examples/example_custom.c 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/examples/example_custom.c 2018-07-23 10:05:19.626764361 +0200
@@ -1,5 +1,5 @@
#include <kitchensink/kitchensink.h>
-#include <SDL.h>
+#include <SDL2/SDL.h>
#include <stdio.h>
#include <stdbool.h>
diff -Naur SDL_kitchensink-1.0.4-o/examples/example_rwops.c SDL_kitchensink-1.0.4/examples/example_rwops.c
--- SDL_kitchensink-1.0.4-o/examples/example_rwops.c 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/examples/example_rwops.c 2018-07-23 10:07:54.411755394 +0200
@@ -1,5 +1,5 @@
#include <kitchensink/kitchensink.h>
-#include <SDL.h>
+#include <SDL2/SDL.h>
#include <stdio.h>
#include <stdbool.h>
diff -Naur SDL_kitchensink-1.0.4-o/examples/example_simple.c SDL_kitchensink-1.0.4/examples/example_simple.c
--- SDL_kitchensink-1.0.4-o/examples/example_simple.c 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/examples/example_simple.c 2018-07-23 10:05:19.627764361 +0200
@@ -1,5 +1,5 @@
#include <kitchensink/kitchensink.h>
-#include <SDL.h>
+#include <SDL2/SDL.h>
#include <stdio.h>
#include <stdbool.h>
diff -Naur SDL_kitchensink-1.0.4-o/include/kitchensink/internal/kitdecoder.h SDL_kitchensink-1.0.4/include/kitchensink/internal/kitdecoder.h
--- SDL_kitchensink-1.0.4-o/include/kitchensink/internal/kitdecoder.h 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/include/kitchensink/internal/kitdecoder.h 2018-07-23 10:05:19.627764361 +0200
@@ -3,7 +3,7 @@
#include <stdbool.h>
-#include <SDL_mutex.h>
+#include <SDL2/SDL_mutex.h>
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
diff -Naur SDL_kitchensink-1.0.4-o/include/kitchensink/internal/subtitle/kitatlas.h SDL_kitchensink-1.0.4/include/kitchensink/internal/subtitle/kitatlas.h
--- SDL_kitchensink-1.0.4-o/include/kitchensink/internal/subtitle/kitatlas.h 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/include/kitchensink/internal/subtitle/kitatlas.h 2018-07-23 10:05:19.627764361 +0200
@@ -2,8 +2,8 @@
#define KITATLAS_H
#include <stdbool.h>
-#include <SDL_rect.h>
-#include <SDL_render.h>
+#include <SDL2/SDL_rect.h>
+#include <SDL2/SDL_render.h>
#include "kitchensink/kitconfig.h"
diff -Naur SDL_kitchensink-1.0.4-o/include/kitchensink/internal/subtitle/kitatlas.h~ SDL_kitchensink-1.0.4/include/kitchensink/internal/subtitle/kitatlas.h~
--- SDL_kitchensink-1.0.4-o/include/kitchensink/internal/subtitle/kitatlas.h~ 1970-01-01 01:00:00.000000000 +0100
+++ SDL_kitchensink-1.0.4/include/kitchensink/internal/subtitle/kitatlas.h~ 2018-07-23 10:05:19.627764361 +0200
@@ -0,0 +1,40 @@
+#ifndef KITATLAS_H
+#define KITATLAS_H
+
+#include <stdbool.h>
+#include <SDL2/SDL2/SDL_rect.h>
+#include <SDL2/SDL2/SDL_render.h>
+
+#include "kitchensink/kitconfig.h"
+
+typedef struct Kit_TextureAtlasItem {
+ int cur_shelf; //< Current shelf number in cache
+ int cur_slot; //< Current slot on shelf in cache
+ SDL_Rect source; //< Source coordinates on cache surface
+ SDL_Rect target; //< Target coordinates on output surface
+} Kit_TextureAtlasItem;
+
+typedef struct Kit_Shelf {
+ uint16_t width;
+ uint16_t height;
+ uint16_t count;
+} Kit_Shelf;
+
+typedef struct Kit_TextureAtlas {
+ int cur_items; //< Current items count
+ int max_items; //< Maximum items count
+ int max_shelves; //< Maximum shelf count
+ int w; //< Current atlas width
+ int h; //< Current atlas height
+ Kit_TextureAtlasItem *items; //< Cached items
+ Kit_Shelf *shelves; //< Atlas shelves
+} Kit_TextureAtlas;
+
+KIT_LOCAL Kit_TextureAtlas* Kit_CreateAtlas();
+KIT_LOCAL void Kit_FreeAtlas(Kit_TextureAtlas *atlas);
+KIT_LOCAL void Kit_ClearAtlasContent(Kit_TextureAtlas *atlas);
+KIT_LOCAL void Kit_CheckAtlasTextureSize(Kit_TextureAtlas *atlas, SDL_Texture *texture);
+KIT_LOCAL int Kit_GetAtlasItems(const Kit_TextureAtlas *atlas, SDL_Rect *sources, SDL_Rect *targets, int limit);
+KIT_LOCAL int Kit_AddAtlasItem(Kit_TextureAtlas *atlas, SDL_Texture *texture, SDL_Surface *surface, const SDL_Rect *target);
+
+#endif // KITATLAS_H
diff -Naur SDL_kitchensink-1.0.4-o/include/kitchensink/internal/subtitle/kitsubtitle.h SDL_kitchensink-1.0.4/include/kitchensink/internal/subtitle/kitsubtitle.h
--- SDL_kitchensink-1.0.4-o/include/kitchensink/internal/subtitle/kitsubtitle.h 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/include/kitchensink/internal/subtitle/kitsubtitle.h 2018-07-23 10:05:19.627764361 +0200
@@ -1,7 +1,7 @@
#ifndef KITSUBTITLE_H
#define KITSUBTITLE_H
-#include <SDL_render.h>
+#include <SDL2/SDL_render.h>
#include "kitchensink/kitconfig.h"
#include "kitchensink/kitsource.h"
diff -Naur SDL_kitchensink-1.0.4-o/include/kitchensink/internal/subtitle/kitsubtitlepacket.h SDL_kitchensink-1.0.4/include/kitchensink/internal/subtitle/kitsubtitlepacket.h
--- SDL_kitchensink-1.0.4-o/include/kitchensink/internal/subtitle/kitsubtitlepacket.h 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/include/kitchensink/internal/subtitle/kitsubtitlepacket.h 2018-07-23 10:05:19.628764361 +0200
@@ -2,7 +2,7 @@
#define KITSUBTITLEPACKET_H
#include <stdbool.h>
-#include <SDL_surface.h>
+#include <SDL2/SDL_surface.h>
#include "kitchensink/kitconfig.h"
diff -Naur SDL_kitchensink-1.0.4-o/include/kitchensink/internal/subtitle/renderers/kitsubrenderer.h SDL_kitchensink-1.0.4/include/kitchensink/internal/subtitle/renderers/kitsubrenderer.h
--- SDL_kitchensink-1.0.4-o/include/kitchensink/internal/subtitle/renderers/kitsubrenderer.h 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/include/kitchensink/internal/subtitle/renderers/kitsubrenderer.h 2018-07-23 10:05:19.628764361 +0200
@@ -1,7 +1,7 @@
#ifndef KITSUBRENDERER_H
#define KITSUBRENDERER_H
-#include <SDL_render.h>
+#include <SDL2/SDL_render.h>
#include "kitchensink/kitsource.h"
diff -Naur SDL_kitchensink-1.0.4-o/include/kitchensink/internal/video/kitvideo.h SDL_kitchensink-1.0.4/include/kitchensink/internal/video/kitvideo.h
--- SDL_kitchensink-1.0.4-o/include/kitchensink/internal/video/kitvideo.h 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/include/kitchensink/internal/video/kitvideo.h 2018-07-23 10:05:19.628764361 +0200
@@ -1,7 +1,7 @@
#ifndef KITVIDEO_H
#define KITVIDEO_H
-#include <SDL_render.h>
+#include <SDL2/SDL_render.h>
#include "kitchensink/kitconfig.h"
#include "kitchensink/kitsource.h"
diff -Naur SDL_kitchensink-1.0.4-o/include/kitchensink/kitplayer.h SDL_kitchensink-1.0.4/include/kitchensink/kitplayer.h
--- SDL_kitchensink-1.0.4-o/include/kitchensink/kitplayer.h 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/include/kitchensink/kitplayer.h 2018-07-23 10:05:19.628764361 +0200
@@ -14,7 +14,7 @@
#include "kitchensink/kitformat.h"
#include "kitchensink/kitcodec.h"
-#include <SDL_render.h>
+#include <SDL2/SDL_render.h>
#ifdef __cplusplus
extern "C" {
diff -Naur SDL_kitchensink-1.0.4-o/include/kitchensink/kitsource.h SDL_kitchensink-1.0.4/include/kitchensink/kitsource.h
--- SDL_kitchensink-1.0.4-o/include/kitchensink/kitsource.h 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/include/kitchensink/kitsource.h 2018-07-23 10:07:42.507756084 +0200
@@ -10,7 +10,7 @@
*/
#include <inttypes.h>
-#include <SDL_rwops.h>
+#include <SDL2/SDL_rwops.h>
#include "kitchensink/kitconfig.h"
#ifdef __cplusplus
diff -Naur SDL_kitchensink-1.0.4-o/src/internal/audio/kitaudio.c SDL_kitchensink-1.0.4/src/internal/audio/kitaudio.c
--- SDL_kitchensink-1.0.4-o/src/internal/audio/kitaudio.c 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/src/internal/audio/kitaudio.c 2018-07-23 10:05:19.628764361 +0200
@@ -5,7 +5,7 @@
#include <libavformat/avformat.h>
#include <libavutil/samplefmt.h>
#include <libswresample/swresample.h>
-#include <SDL.h>
+#include <SDL2/SDL.h>
#include "kitchensink/kiterror.h"
#include "kitchensink/internal/kitlibstate.h"
diff -Naur SDL_kitchensink-1.0.4-o/src/internal/libass.c SDL_kitchensink-1.0.4/src/internal/libass.c
--- SDL_kitchensink-1.0.4-o/src/internal/libass.c 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/src/internal/libass.c 2018-07-23 10:05:19.629764361 +0200
@@ -1,6 +1,6 @@
#ifdef USE_DYNAMIC_LIBASS
-#include <SDL_loadso.h>
+#include <SDL2/SDL_loadso.h>
#include "kitchensink/internal/libass.h"
int load_libass(void *handle) {
diff -Naur SDL_kitchensink-1.0.4-o/src/internal/subtitle/kitsubtitle.c SDL_kitchensink-1.0.4/src/internal/subtitle/kitsubtitle.c
--- SDL_kitchensink-1.0.4-o/src/internal/subtitle/kitsubtitle.c 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/src/internal/subtitle/kitsubtitle.c 2018-07-23 10:05:19.629764361 +0200
@@ -1,6 +1,6 @@
#include <assert.h>
-#include <SDL.h>
+#include <SDL2/SDL.h>
#include <libavformat/avformat.h>
#include "kitchensink/internal/utils/kitlog.h"
diff -Naur SDL_kitchensink-1.0.4-o/src/internal/subtitle/renderers/kitsubass.c SDL_kitchensink-1.0.4/src/internal/subtitle/renderers/kitsubass.c
--- SDL_kitchensink-1.0.4-o/src/internal/subtitle/renderers/kitsubass.c 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/src/internal/subtitle/renderers/kitsubass.c 2018-07-23 10:05:19.629764361 +0200
@@ -1,7 +1,7 @@
#include <assert.h>
#include <stdlib.h>
-#include <SDL_surface.h>
+#include <SDL2/SDL_surface.h>
#include "kitchensink/kiterror.h"
#include "kitchensink/internal/utils/kitlog.h"
diff -Naur SDL_kitchensink-1.0.4-o/src/internal/subtitle/renderers/kitsubimage.c SDL_kitchensink-1.0.4/src/internal/subtitle/renderers/kitsubimage.c
--- SDL_kitchensink-1.0.4-o/src/internal/subtitle/renderers/kitsubimage.c 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/src/internal/subtitle/renderers/kitsubimage.c 2018-07-23 10:05:19.629764361 +0200
@@ -1,7 +1,7 @@
#include <assert.h>
#include <stdlib.h>
-#include <SDL_surface.h>
+#include <SDL2/SDL_surface.h>
#include "kitchensink/kiterror.h"
#include "kitchensink/internal/utils/kitlog.h"
diff -Naur SDL_kitchensink-1.0.4-o/src/kitlib.c SDL_kitchensink-1.0.4/src/kitlib.c
--- SDL_kitchensink-1.0.4-o/src/kitlib.c 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/src/kitlib.c 2018-07-23 10:05:19.629764361 +0200
@@ -1,5 +1,5 @@
#include <assert.h>
-#include <SDL_loadso.h>
+#include <SDL2/SDL_loadso.h>
#include <libavformat/avformat.h>
diff -Naur SDL_kitchensink-1.0.4-o/src/kitplayer.c SDL_kitchensink-1.0.4/src/kitplayer.c
--- SDL_kitchensink-1.0.4-o/src/kitplayer.c 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/src/kitplayer.c 2018-07-23 10:05:19.630764361 +0200
@@ -1,6 +1,6 @@
#include <assert.h>
-#include <SDL.h>
+#include <SDL2/SDL.h>
#include "kitchensink/kitplayer.h"
#include "kitchensink/kiterror.h"
diff -Naur SDL_kitchensink-1.0.4-o/src/kitutils.c SDL_kitchensink-1.0.4/src/kitutils.c
--- SDL_kitchensink-1.0.4-o/src/kitutils.c 2018-07-13 17:18:32.000000000 +0200
+++ SDL_kitchensink-1.0.4/src/kitutils.c 2018-07-23 10:05:19.630764361 +0200
@@ -1,4 +1,4 @@
-#include <SDL.h>
+#include <SDL2/SDL.h>
#include "kitchensink/kitutils.h"
#include "kitchensink/kitsource.h"
|