GCC Code Coverage Report
Directory: src/ Exec Total Coverage
File: src/unittests/resources/sdlimagehelper.cc Lines: 339 339 100.0 %
Date: 2020-06-04 Branches: 578 1458 39.6 %

Line Branch Exec Source
1
/*
2
 *  The ManaPlus Client
3
 *  Copyright (C) 2014-2019  The ManaPlus Developers
4
 *
5
 *  This file is part of The ManaPlus Client.
6
 *
7
 *  This program is free software; you can redistribute it and/or modify
8
 *  it under the terms of the GNU General Public License as published by
9
 *  the Free Software Foundation; either version 2 of the License, or
10
 *  any later version.
11
 *
12
 *  This program is distributed in the hope that it will be useful,
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *  GNU General Public License for more details.
16
 *
17
 *  You should have received a copy of the GNU General Public License
18
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
 */
20
21
#ifndef USE_SDL2
22
#include "localconsts.h"
23
PRAGMA48(GCC diagnostic push)
24
PRAGMA48(GCC diagnostic ignored "-Wshadow")
25
#include <SDL_endian.h>
26
PRAGMA48(GCC diagnostic pop)
27
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
28
29
#include "unittests/unittests.h"
30
31
#include "client.h"
32
#include "configmanager.h"
33
#include "configuration.h"
34
#include "dirs.h"
35
#include "graphicsmanager.h"
36
37
#include "being/actorsprite.h"
38
39
#include "fs/virtfs/fs.h"
40
41
#include "gui/userpalette.h"
42
#include "gui/theme.h"
43
44
#include "utils/delete2.h"
45
#include "utils/env.h"
46
47
#include "render/sdlgraphics.h"
48
49
#include "resources/sdlimagehelper.h"
50
51
#include "debug.h"
52
53
static SDL_Surface *createSoftware32BitSurface(int width,
54
                                               int height)
55
{
56
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
57
    const int rmask = 0xff000000;
58
    const int gmask = 0x00ff0000;
59
    const int bmask = 0x0000ff00;
60
    const int amask = 0x000000ff;
61
#else  // SDL_BYTEORDER == SDL_BIG_ENDIAN
62
63
22
    const int rmask = 0x000000ff;
64
22
    const int gmask = 0x0000ff00;
65
22
    const int bmask = 0x00ff0000;
66
22
    const int amask = 0xff000000;
67
#endif  // SDL_BYTEORDER == SDL_BIG_ENDIAN
68
69











22
    return MSDL_CreateRGBSurface(SDL_SWSURFACE,
70
        width, height, 32, rmask, gmask, bmask, amask);
71
}
72
73
13
TEST_CASE("sdlimagehelper combineSurface", "")
74
{
75
11
    setEnv("SDL_VIDEODRIVER", "dummy");
76
77
11
    client = new Client;
78
33
    VirtFs::mountDirSilent("data", Append_false);
79
33
    VirtFs::mountDirSilent("../data", Append_false);
80
81
11
    mainGraphics = new SDLGraphics;
82
22
    imageHelper = new SDLImageHelper;
83
84
11
    Dirs::initRootDir();
85
11
    Dirs::initHomeDir();
86
87
11
    setBrandingDefaults(branding);
88
11
    ConfigManager::initConfiguration();
89
90
11
    GraphicsManager::createWindow(640, 480, 0, SDL_ANYFORMAT | SDL_SWSURFACE);
91
92
11
    userPalette = new UserPalette;
93
94
11
    theme = new Theme;
95
11
    Theme::selectSkin();
96
97
11
    ActorSprite::load();
98
99



77
    SECTION("empty copy1")
100
    {
101
1
        SDL_Surface *surface1 = createSoftware32BitSurface(2, 2);
102
1
        uint32_t *ptr1 = static_cast<uint32_t*>(surface1->pixels);
103
5
        for (int f = 0; f < 2 * 2; f ++)
104
4
            ptr1[f] = 0xff000000;
105
1
        SDL_Surface *surface2 = createSoftware32BitSurface(2, 2);
106
1
        uint32_t *ptr2 = static_cast<uint32_t*>(surface2->pixels);
107
108
1
        ptr2[0] = 0xff000000;
109
1
        ptr2[1] = 0x00ff0000;
110
1
        ptr2[2] = 0x0000ff00;
111
1
        ptr2[3] = 0x000000ff;
112
113
        SDLImageHelper::combineSurface(surface2,
114
            nullptr,
115
            surface1,
116
1
            nullptr);
117
118
        // src image test
119



4
        REQUIRE(ptr2[0] == 0xff000000);
120



4
        REQUIRE(ptr2[1] == 0x00ff0000);
121



4
        REQUIRE(ptr2[2] == 0x0000ff00);
122



4
        REQUIRE(ptr2[3] == 0x000000ff);
123
124



4
        REQUIRE(ptr1[0] == 0xff000000);
125



4
        REQUIRE(ptr1[1] == 0xff000000);
126



4
        REQUIRE(ptr1[2] == 0xff000000);
127



4
        REQUIRE(ptr1[3] == 0xff000000);
128
1
        MSDL_FreeSurface(surface1);
129
1
        MSDL_FreeSurface(surface2);
130
    }
131
132



77
    SECTION("empty copy2")
133
    {
134
1
        SDL_Surface *surface1 = createSoftware32BitSurface(2, 2);
135
1
        uint32_t *ptr1 = static_cast<uint32_t*>(surface1->pixels);
136
5
        for (int f = 0; f < 2 * 2; f ++)
137
4
            ptr1[f] = 0xff000000;
138
1
        SDL_Surface *surface2 = createSoftware32BitSurface(2, 2);
139
1
        uint32_t *ptr2 = static_cast<uint32_t*>(surface2->pixels);
140
141
1
        ptr2[0] = 0xff112233;
142
1
        ptr2[1] = 0xff003344;
143
1
        ptr2[2] = 0xff330055;
144
1
        ptr2[3] = 0xff445500;
145
146
        SDLImageHelper::combineSurface(surface2,
147
            nullptr,
148
            surface1,
149
1
            nullptr);
150
151



4
        REQUIRE(ptr1[0] == 0xff112233);
152



4
        REQUIRE(ptr1[1] == 0xff003344);
153



4
        REQUIRE(ptr1[2] == 0xff330055);
154



4
        REQUIRE(ptr1[3] == 0xff445500);
155
1
        MSDL_FreeSurface(surface1);
156
1
        MSDL_FreeSurface(surface2);
157
    }
158
159



77
    SECTION("empty copy3")
160
    {
161
1
        SDL_Surface *surface1 = createSoftware32BitSurface(2, 2);
162
1
        uint32_t *ptr1 = static_cast<uint32_t*>(surface1->pixels);
163
5
        for (int f = 0; f < 2 * 2; f ++)
164
4
            ptr1[f] = 0x00000000;
165
1
        SDL_Surface *surface2 = createSoftware32BitSurface(2, 2);
166
1
        uint32_t *ptr2 = static_cast<uint32_t*>(surface2->pixels);
167
168
1
        ptr2[0] = 0xff112233;
169
1
        ptr2[1] = 0xff003344;
170
1
        ptr2[2] = 0xff330055;
171
1
        ptr2[3] = 0xff445500;
172
173
        SDLImageHelper::combineSurface(surface2,
174
            nullptr,
175
            surface1,
176
1
            nullptr);
177
178



4
        REQUIRE(ptr1[0] == 0xff112233);
179



4
        REQUIRE(ptr1[1] == 0xff003344);
180



4
        REQUIRE(ptr1[2] == 0xff330055);
181



4
        REQUIRE(ptr1[3] == 0xff445500);
182
1
        MSDL_FreeSurface(surface1);
183
1
        MSDL_FreeSurface(surface2);
184
    }
185
186



77
    SECTION("empty copy4")
187
    {
188
1
        SDL_Surface *surface1 = createSoftware32BitSurface(2, 2);
189
1
        uint32_t *ptr1 = static_cast<uint32_t*>(surface1->pixels);
190
5
        for (int f = 0; f < 2 * 2; f ++)
191
4
            ptr1[f] = 0xff000000;
192
1
        SDL_Surface *surface2 = createSoftware32BitSurface(2, 2);
193
1
        uint32_t *ptr2 = static_cast<uint32_t*>(surface2->pixels);
194
195
1
        ptr2[0] = 0x50112233;
196
1
        ptr2[1] = 0x50003344;
197
1
        ptr2[2] = 0x50330055;
198
1
        ptr2[3] = 0x50445500;
199
200
        SDLImageHelper::combineSurface(surface2,
201
            nullptr,
202
            surface1,
203
1
            nullptr);
204
205



4
        REQUIRE(ptr1[0] == 0xff09121c);
206



4
        REQUIRE(ptr1[1] == 0xff001c25);
207



4
        REQUIRE(ptr1[2] == 0xff1c002f);
208



4
        REQUIRE(ptr1[3] == 0xff252f00);
209
1
        MSDL_FreeSurface(surface1);
210
1
        MSDL_FreeSurface(surface2);
211
    }
212
213



77
    SECTION("empty copy5")
214
    {
215
1
        SDL_Surface *surface1 = createSoftware32BitSurface(2, 2);
216
1
        uint32_t *ptr1 = static_cast<uint32_t*>(surface1->pixels);
217
5
        for (int f = 0; f < 2 * 2; f ++)
218
4
            ptr1[f] = 0x00000000;
219
1
        SDL_Surface *surface2 = createSoftware32BitSurface(2, 2);
220
1
        uint32_t *ptr2 = static_cast<uint32_t*>(surface2->pixels);
221
222
1
        ptr2[0] = 0x50112233;
223
1
        ptr2[1] = 0x50003344;
224
1
        ptr2[2] = 0x50330055;
225
1
        ptr2[3] = 0x50445500;
226
227
        SDLImageHelper::combineSurface(surface2,
228
            nullptr,
229
            surface1,
230
1
            nullptr);
231
232



4
        REQUIRE(ptr1[0] == 0x8e09121c);
233



4
        REQUIRE(ptr1[1] == 0x8e001c25);
234



4
        REQUIRE(ptr1[2] == 0x8e1c002f);
235



4
        REQUIRE(ptr1[3] == 0x8e252f00);
236
1
        MSDL_FreeSurface(surface1);
237
1
        MSDL_FreeSurface(surface2);
238
    }
239
240



77
    SECTION("empty copy6")
241
    {
242
1
        SDL_Surface *surface1 = createSoftware32BitSurface(2, 2);
243
1
        uint32_t *ptr1 = static_cast<uint32_t*>(surface1->pixels);
244
1
        ptr1[0] = 0x50112233;
245
1
        ptr1[1] = 0x50003344;
246
1
        ptr1[2] = 0x50330055;
247
1
        ptr1[3] = 0x50445500;
248
1
        SDL_Surface *surface2 = createSoftware32BitSurface(2, 2);
249
1
        uint32_t *ptr2 = static_cast<uint32_t*>(surface2->pixels);
250
251
5
        for (int f = 0; f < 2 * 2; f ++)
252
4
            ptr2[f] = 0x00000000;
253
254
        SDLImageHelper::combineSurface(surface2,
255
            nullptr,
256
            surface1,
257
1
            nullptr);
258
259



4
        REQUIRE(ptr1[0] == 0x50112233);
260



4
        REQUIRE(ptr1[1] == 0x50003344);
261



4
        REQUIRE(ptr1[2] == 0x50330055);
262



4
        REQUIRE(ptr1[3] == 0x50445500);
263
1
        MSDL_FreeSurface(surface1);
264
1
        MSDL_FreeSurface(surface2);
265
    }
266
267



77
    SECTION("mix 1")
268
    {
269
1
        SDL_Surface *surface1 = createSoftware32BitSurface(2, 2);
270
1
        uint32_t *ptr1 = static_cast<uint32_t*>(surface1->pixels);
271
1
        ptr1[0] = 0x50112233;
272
1
        ptr1[1] = 0x50003344;
273
1
        ptr1[2] = 0x50330055;
274
1
        ptr1[3] = 0x50445500;
275
1
        SDL_Surface *surface2 = createSoftware32BitSurface(2, 2);
276
1
        uint32_t *ptr2 = static_cast<uint32_t*>(surface2->pixels);
277
278
1
        ptr2[0] = 0x50003344;
279
1
        ptr2[1] = 0x50330055;
280
1
        ptr2[2] = 0x50445500;
281
1
        ptr2[3] = 0x50112233;
282
283
        SDLImageHelper::combineSurface(surface2,
284
            nullptr,
285
            surface1,
286
1
            nullptr);
287
288



4
        REQUIRE(ptr1[0] == 0xdf082b3c);
289



4
        REQUIRE(ptr1[1] == 0xdf1d174d);
290



4
        REQUIRE(ptr1[2] == 0xdf3d2f26);
291



4
        REQUIRE(ptr1[3] == 0xdf29391c);
292
1
        MSDL_FreeSurface(surface1);
293
1
        MSDL_FreeSurface(surface2);
294
    }
295
296



77
    SECTION("mix 2")
297
    {
298
1
        SDL_Surface *surface1 = createSoftware32BitSurface(2, 2);
299
1
        uint32_t *ptr1 = static_cast<uint32_t*>(surface1->pixels);
300
1
        ptr1[0] = 0x10112233;
301
1
        ptr1[1] = 0x20003344;
302
1
        ptr1[2] = 0x30330055;
303
1
        ptr1[3] = 0x40445500;
304
1
        SDL_Surface *surface2 = createSoftware32BitSurface(2, 2);
305
1
        uint32_t *ptr2 = static_cast<uint32_t*>(surface2->pixels);
306
307
1
        ptr2[0] = 0x50003344;
308
1
        ptr2[1] = 0x60330055;
309
1
        ptr2[2] = 0x70445500;
310
1
        ptr2[3] = 0x80112233;
311
312
        SDLImageHelper::combineSurface(surface2,
313
            nullptr,
314
            surface1,
315
1
            nullptr);
316
317



4
        REQUIRE(ptr1[0] == 0x9f082b3c);
318



4
        REQUIRE(ptr1[1] == 0xbd1f144e);
319



4
        REQUIRE(ptr1[2] == 0xb93f391e);
320



4
        REQUIRE(ptr1[3] == 0xf5213224);
321
1
        MSDL_FreeSurface(surface1);
322
1
        MSDL_FreeSurface(surface2);
323
    }
324
325



77
    SECTION("part mix 1")
326
    {
327
// 11 11 00 00
328
// 11 11 00 00
329
// 00 00 00 00
330
// 00 00 00 00
331
332
1
        SDL_Surface *surface1 = createSoftware32BitSurface(4, 4);
333
1
        uint32_t *ptr1 = static_cast<uint32_t*>(surface1->pixels);
334
1
        ptr1[0] = 0x10112233;
335
1
        ptr1[1] = 0x20003344;
336
1
        ptr1[2] = 0x10203040;
337
1
        ptr1[3] = 0x20304050;
338
1
        ptr1[4] = 0x30330055;
339
1
        ptr1[5] = 0x40445500;
340
1
        ptr1[6] = 0x30405060;
341
1
        ptr1[7] = 0x708090a0;
342
343
1
        ptr1[8] = 0x8090a0b0;
344
1
        ptr1[9] = 0x90a0b0c0;
345
1
        ptr1[10] = 0xa0b0c0d0;
346
1
        ptr1[11] = 0xb0c0d0e0;
347
1
        ptr1[12] = 0xc0d0e0f0;
348
1
        ptr1[13] = 0xd0e0f000;
349
1
        ptr1[14] = 0xe0f00010;
350
1
        ptr1[15] = 0xf0001020;
351
352
1
        SDL_Surface *surface2 = createSoftware32BitSurface(2, 2);
353
1
        uint32_t *ptr2 = static_cast<uint32_t*>(surface2->pixels);
354
355
1
        ptr2[0] = 0x50003344;
356
1
        ptr2[1] = 0x60330055;
357
1
        ptr2[2] = 0x70445500;
358
1
        ptr2[3] = 0x80112233;
359
360
        SDLImageHelper::combineSurface(surface2,
361
            nullptr,
362
            surface1,
363
1
            nullptr);
364
365



4
        REQUIRE(ptr1[0] == 0x9f082b3c);
366



4
        REQUIRE(ptr1[1] == 0xbd1f144e);
367



4
        REQUIRE(ptr1[2] == 0x10203040);
368



4
        REQUIRE(ptr1[3] == 0x20304050);
369



4
        REQUIRE(ptr1[4] == 0xb93f391e);
370



4
        REQUIRE(ptr1[5] == 0xf5213224);
371



4
        REQUIRE(ptr1[6] == 0x30405060);
372



4
        REQUIRE(ptr1[7] == 0x708090a0);
373
374



4
        REQUIRE(ptr1[8] == 0x8090a0b0);
375



4
        REQUIRE(ptr1[9] == 0x90a0b0c0);
376



4
        REQUIRE(ptr1[10] == 0xa0b0c0d0);
377



4
        REQUIRE(ptr1[11] == 0xb0c0d0e0);
378



4
        REQUIRE(ptr1[12] == 0xc0d0e0f0);
379



4
        REQUIRE(ptr1[13] == 0xd0e0f000);
380



4
        REQUIRE(ptr1[14] == 0xe0f00010);
381



4
        REQUIRE(ptr1[15] == 0xf0001020);
382
383
1
        MSDL_FreeSurface(surface1);
384
1
        MSDL_FreeSurface(surface2);
385
    }
386
387



77
    SECTION("part mix 2")
388
    {
389
// 00 00 00 00
390
// 00 11 11 00
391
// 00 11 11 00
392
// 00 00 00 00
393
394
1
        SDL_Surface *surface1 = createSoftware32BitSurface(4, 4);
395
1
        uint32_t *ptr1 = static_cast<uint32_t*>(surface1->pixels);
396
397
1
        ptr1[0] = 0x10203040;
398
1
        ptr1[1] = 0x20304050;
399
1
        ptr1[2] = 0x30405060;
400
1
        ptr1[3] = 0x708090a0;
401
1
        ptr1[4] = 0x8090a0b0;
402
403
1
        ptr1[5] = 0x10112233;  // +
404
1
        ptr1[6] = 0x20003344;  // +
405
406
1
        ptr1[7] = 0x90a0b0c0;
407
1
        ptr1[8] = 0xa0b0c0d0;
408
409
1
        ptr1[9] = 0x30330055;  // +
410
1
        ptr1[10] = 0x40445500;  // +
411
412
1
        ptr1[11] = 0xb0c0d0e0;
413
1
        ptr1[12] = 0xc0d0e0f0;
414
1
        ptr1[13] = 0xd0e0f000;
415
1
        ptr1[14] = 0xe0f00010;
416
1
        ptr1[15] = 0xf0001020;
417
418
1
        SDL_Surface *surface2 = createSoftware32BitSurface(2, 2);
419
1
        uint32_t *ptr2 = static_cast<uint32_t*>(surface2->pixels);
420
421
1
        ptr2[0] = 0x50003344;
422
1
        ptr2[1] = 0x60330055;
423
1
        ptr2[2] = 0x70445500;
424
1
        ptr2[3] = 0x80112233;
425
426
        SDL_Rect rect1;
427
        SDL_Rect rect2;
428
1
        rect1.x = 1;
429
1
        rect1.y = 1;
430
1
        rect1.w = 2;
431
1
        rect1.h = 2;
432
1
        rect2.x = 0;
433
1
        rect2.y = 0;
434
1
        rect2.w = 2;
435
1
        rect2.h = 2;
436
        SDLImageHelper::combineSurface(surface2,
437
            &rect2,
438
            surface1,
439
1
            &rect1);
440
441



4
        REQUIRE(ptr1[0] == 0x10203040);
442



4
        REQUIRE(ptr1[1] == 0x20304050);
443



4
        REQUIRE(ptr1[2] == 0x30405060);
444



4
        REQUIRE(ptr1[3] == 0x708090a0);
445



4
        REQUIRE(ptr1[4] == 0x8090a0b0);
446
447



4
        REQUIRE(ptr1[5] == 0x9f082b3c);  // +
448



4
        REQUIRE(ptr1[6] == 0xbd1f144e);  // +
449
450



4
        REQUIRE(ptr1[7] == 0x90a0b0c0);
451



4
        REQUIRE(ptr1[8] == 0xa0b0c0d0);
452
453



4
        REQUIRE(ptr1[9] == 0xb93f391e);  // +
454



4
        REQUIRE(ptr1[10] == 0xf5213224);  // +
455
456



4
        REQUIRE(ptr1[11] == 0xb0c0d0e0);
457



4
        REQUIRE(ptr1[12] == 0xc0d0e0f0);
458



4
        REQUIRE(ptr1[13] == 0xd0e0f000);
459



4
        REQUIRE(ptr1[14] == 0xe0f00010);
460



4
        REQUIRE(ptr1[15] == 0xf0001020);
461
462
1
        MSDL_FreeSurface(surface1);
463
1
        MSDL_FreeSurface(surface2);
464
    }
465
466



77
    SECTION("part mix 3")
467
    {
468
1
        SDL_Surface *surface1 = createSoftware32BitSurface(4, 4);
469
1
        uint32_t *ptr1 = static_cast<uint32_t*>(surface1->pixels);
470
471
1
        ptr1[0] = 0x10203040;
472
1
        ptr1[1] = 0x20304050;
473
1
        ptr1[2] = 0x30405060;
474
1
        ptr1[3] = 0x708090a0;
475
1
        ptr1[4] = 0x8090a0b0;
476
1
        ptr1[5] = 0x10112233;
477
1
        ptr1[6] = 0x20003344;
478
1
        ptr1[7] = 0x90a0b0c0;
479
1
        ptr1[8] = 0xa0b0c0d0;
480
1
        ptr1[9] = 0x30330055;
481
1
        ptr1[10] = 0x40445500;
482
1
        ptr1[11] = 0xb0c0d0e0;
483
1
        ptr1[12] = 0xc0d0e0f0;
484
1
        ptr1[13] = 0xd0e0f000;
485
1
        ptr1[14] = 0xe0f00010;
486
1
        ptr1[15] = 0xf0001020;
487
488
1
        SDL_Surface *surface2 = createSoftware32BitSurface(4, 4);
489
1
        uint32_t *ptr2 = static_cast<uint32_t*>(surface2->pixels);
490
491
1
        ptr2[0] = 0x50003344;
492
1
        ptr2[1] = 0x60330055;
493
1
        ptr2[2] = 0x70445500;
494
1
        ptr2[3] = 0x80112233;
495
1
        ptr2[4] = 0x90111111;
496
1
        ptr2[5] = 0x90111111;
497
1
        ptr2[6] = 0xff000000;
498
1
        ptr2[7] = 0xff000000;
499
1
        ptr2[8] = 0xff000000;
500
1
        ptr2[9] = 0xff000000;
501
1
        ptr2[10] = 0xff000000;
502
1
        ptr2[11] = 0xff000000;
503
1
        ptr2[12] = 0xff000000;
504
1
        ptr2[13] = 0xff000000;
505
1
        ptr2[14] = 0xff000000;
506
1
        ptr2[15] = 0xff000000;
507
508
        SDL_Rect rect1;
509
        SDL_Rect rect2;
510
1
        rect1.x = 1;
511
1
        rect1.y = 1;
512
1
        rect1.w = 2;
513
1
        rect1.h = 2;
514
1
        rect2.x = 0;
515
1
        rect2.y = 0;
516
1
        rect2.w = 2;
517
1
        rect2.h = 2;
518
        SDLImageHelper::combineSurface(surface2,
519
            &rect2,
520
            surface1,
521
1
            &rect1);
522
523



4
        REQUIRE(ptr1[0] == 0x10203040);
524



4
        REQUIRE(ptr1[1] == 0x20304050);
525



4
        REQUIRE(ptr1[2] == 0x30405060);
526



4
        REQUIRE(ptr1[3] == 0x708090a0);
527



4
        REQUIRE(ptr1[4] == 0x8090a0b0);
528



4
        REQUIRE(ptr1[5] == 0x9f082b3c);
529



4
        REQUIRE(ptr1[6] == 0xbd1f144e);
530



4
        REQUIRE(ptr1[7] == 0x90a0b0c0);
531



4
        REQUIRE(ptr1[8] == 0xa0b0c0d0);
532



4
        REQUIRE(ptr1[9] == 0xbf1b0d23);
533



4
        REQUIRE(ptr1[10] == 0xff1f230c);
534



4
        REQUIRE(ptr1[11] == 0xb0c0d0e0);
535



4
        REQUIRE(ptr1[12] == 0xc0d0e0f0);
536



4
        REQUIRE(ptr1[13] == 0xd0e0f000);
537



4
        REQUIRE(ptr1[14] == 0xe0f00010);
538



4
        REQUIRE(ptr1[15] == 0xf0001020);
539
540
1
        MSDL_FreeSurface(surface1);
541
1
        MSDL_FreeSurface(surface2);
542
    }
543
544
11
    delete2(userPalette)
545
11
    delete2(theme)
546
11
    delete2(client)
547
33
    VirtFs::unmountDirSilent("data");
548
33
    VirtFs::unmountDirSilent("../data");
549

14
}
550
551
#endif  // SDL_BYTEORDER == SDL_LIL_ENDIAN
552
#endif  // USE_SDL2