gosu 1.4.1 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dependencies/SDL_sound/SDL_sound.c +21 -63
- data/dependencies/SDL_sound/SDL_sound.h +2 -2
- data/dependencies/SDL_sound/SDL_sound_aiff.c +26 -23
- data/dependencies/SDL_sound/SDL_sound_au.c +8 -8
- data/dependencies/SDL_sound/SDL_sound_coreaudio.c +4 -5
- data/dependencies/SDL_sound/SDL_sound_flac.c +28 -30
- data/dependencies/SDL_sound/SDL_sound_internal.h +4 -4
- data/dependencies/SDL_sound/SDL_sound_modplug.c +1 -1
- data/dependencies/SDL_sound/SDL_sound_mp3.c +19 -23
- data/dependencies/SDL_sound/SDL_sound_raw.c +5 -6
- data/dependencies/SDL_sound/SDL_sound_shn.c +4 -4
- data/dependencies/SDL_sound/SDL_sound_voc.c +15 -15
- data/dependencies/SDL_sound/SDL_sound_vorbis.c +14 -7
- data/dependencies/SDL_sound/SDL_sound_wav.c +17 -17
- data/dependencies/SDL_sound/dr_flac.h +10840 -4779
- data/dependencies/SDL_sound/dr_mp3.h +2793 -1004
- data/dependencies/SDL_sound/libmodplug/fastmix.c +5 -0
- data/dependencies/SDL_sound/libmodplug/load_669.c +1 -1
- data/dependencies/SDL_sound/libmodplug/load_amf.c +1 -0
- data/dependencies/SDL_sound/libmodplug/load_ams.c +38 -22
- data/dependencies/SDL_sound/libmodplug/load_it.c +18 -14
- data/dependencies/SDL_sound/libmodplug/load_mdl.c +18 -9
- data/dependencies/SDL_sound/libmodplug/load_med.c +7 -6
- data/dependencies/SDL_sound/libmodplug/load_mt2.c +36 -17
- data/dependencies/SDL_sound/libmodplug/load_okt.c +51 -24
- data/dependencies/SDL_sound/libmodplug/load_psm.c +4 -2
- data/dependencies/SDL_sound/libmodplug/load_s3m.c +4 -4
- data/dependencies/SDL_sound/libmodplug/load_ult.c +4 -3
- data/dependencies/SDL_sound/libmodplug/load_xm.c +5 -5
- data/dependencies/SDL_sound/libmodplug/snd_fx.c +8 -1
- data/dependencies/SDL_sound/libmodplug/sndfile.c +21 -4
- data/dependencies/SDL_sound/stb_vorbis.h +10 -18
- data/dependencies/mojoAL/mojoal.c +260 -6
- data/dependencies/stb/stb_image.h +208 -73
- data/dependencies/stb/stb_image_write.h +57 -23
- data/dependencies/stb/stb_truetype.h +345 -279
- data/dependencies/utf8proc/utf8proc.c +37 -18
- data/dependencies/utf8proc/utf8proc.h +17 -5
- data/dependencies/utf8proc/utf8proc_data.h +12012 -10089
- data/include/Gosu/Buttons.hpp +103 -103
- data/include/Gosu/Directories.hpp +31 -24
- data/include/Gosu/Font.hpp +4 -2
- data/include/Gosu/Gosu.hpp +5 -8
- data/include/Gosu/IO.hpp +0 -3
- data/include/Gosu/Math.hpp +0 -3
- data/include/Gosu/Timing.hpp +2 -8
- data/include/Gosu/Version.hpp +1 -1
- data/src/AudioImpl.cpp +0 -7
- data/src/AudioImpl.hpp +1 -3
- data/src/BitmapIO.cpp +23 -2
- data/src/DirectoriesApple.cpp +25 -24
- data/src/DirectoriesUnix.cpp +14 -12
- data/src/DirectoriesWin.cpp +26 -30
- data/src/Font.cpp +12 -2
- data/src/Image.cpp +10 -15
- data/src/RubyGosu.cxx +6 -34
- data/src/TimingApple.cpp +1 -7
- data/src/TimingUnix.cpp +0 -6
- data/src/TimingWin.cpp +0 -6
- data/src/Window.cpp +4 -3
- metadata +2 -2
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- mode: c; c-basic-offset: 2; tab-width: 2; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
* Copyright (c)
|
3
|
+
* Copyright (c) 2014-2021 Steven G. Johnson, Jiahao Chen, Peter Colberg, Tony Kelman, Scott P. Jones, and other contributors.
|
4
4
|
* Copyright (c) 2009 Public Software Group e. V., Berlin, Germany
|
5
5
|
*
|
6
6
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
@@ -27,7 +27,7 @@
|
|
27
27
|
* Unicode data files.
|
28
28
|
*
|
29
29
|
* The original data files are available at
|
30
|
-
*
|
30
|
+
* https://www.unicode.org/Public/UNIDATA/
|
31
31
|
*
|
32
32
|
* Please notice the copyright statement in the file "utf8proc_data.c".
|
33
33
|
*/
|
@@ -101,7 +101,7 @@ UTF8PROC_DLLEXPORT const char *utf8proc_version(void) {
|
|
101
101
|
}
|
102
102
|
|
103
103
|
UTF8PROC_DLLEXPORT const char *utf8proc_unicode_version(void) {
|
104
|
-
return "
|
104
|
+
return "14.0.0";
|
105
105
|
}
|
106
106
|
|
107
107
|
UTF8PROC_DLLEXPORT const char *utf8proc_errmsg(utf8proc_ssize_t errcode) {
|
@@ -125,7 +125,7 @@ UTF8PROC_DLLEXPORT const char *utf8proc_errmsg(utf8proc_ssize_t errcode) {
|
|
125
125
|
UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_iterate(
|
126
126
|
const utf8proc_uint8_t *str, utf8proc_ssize_t strlen, utf8proc_int32_t *dst
|
127
127
|
) {
|
128
|
-
|
128
|
+
utf8proc_int32_t uc;
|
129
129
|
const utf8proc_uint8_t *end;
|
130
130
|
|
131
131
|
*dst = -1;
|
@@ -137,7 +137,7 @@ UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_iterate(
|
|
137
137
|
return 1;
|
138
138
|
}
|
139
139
|
// Must be between 0xc2 and 0xf4 inclusive to be valid
|
140
|
-
if ((uc - 0xc2) > (0xf4-0xc2)) return UTF8PROC_ERROR_INVALIDUTF8;
|
140
|
+
if ((utf8proc_uint32_t)(uc - 0xc2) > (0xf4-0xc2)) return UTF8PROC_ERROR_INVALIDUTF8;
|
141
141
|
if (uc < 0xe0) { // 2-byte sequence
|
142
142
|
// Must have valid continuation character
|
143
143
|
if (str >= end || !utf_cont(*str)) return UTF8PROC_ERROR_INVALIDUTF8;
|
@@ -290,10 +290,14 @@ static utf8proc_bool grapheme_break_simple(int lbc, int tbc) {
|
|
290
290
|
|
291
291
|
static utf8proc_bool grapheme_break_extended(int lbc, int tbc, utf8proc_int32_t *state)
|
292
292
|
{
|
293
|
-
int lbc_override = ((state && *state != UTF8PROC_BOUNDCLASS_START)
|
294
|
-
? *state : lbc);
|
295
|
-
utf8proc_bool break_permitted = grapheme_break_simple(lbc_override, tbc);
|
296
293
|
if (state) {
|
294
|
+
int lbc_override;
|
295
|
+
if (*state == UTF8PROC_BOUNDCLASS_START)
|
296
|
+
*state = lbc_override = lbc;
|
297
|
+
else
|
298
|
+
lbc_override = *state;
|
299
|
+
utf8proc_bool break_permitted = grapheme_break_simple(lbc_override, tbc);
|
300
|
+
|
297
301
|
// Special support for GB 12/13 made possible by GB999. After two RI
|
298
302
|
// class codepoints we want to force a break. Do this by resetting the
|
299
303
|
// second RI's bound class to UTF8PROC_BOUNDCLASS_OTHER, to force a break
|
@@ -312,8 +316,11 @@ static utf8proc_bool grapheme_break_extended(int lbc, int tbc, utf8proc_int32_t
|
|
312
316
|
}
|
313
317
|
else
|
314
318
|
*state = tbc;
|
319
|
+
|
320
|
+
return break_permitted;
|
315
321
|
}
|
316
|
-
|
322
|
+
else
|
323
|
+
return grapheme_break_simple(lbc, tbc);
|
317
324
|
}
|
318
325
|
|
319
326
|
UTF8PROC_DLLEXPORT utf8proc_bool utf8proc_grapheme_break_stateful(
|
@@ -349,9 +356,9 @@ static utf8proc_int32_t seqindex_decode_index(const utf8proc_uint32_t seqindex)
|
|
349
356
|
|
350
357
|
static utf8proc_ssize_t seqindex_write_char_decomposed(utf8proc_uint16_t seqindex, utf8proc_int32_t *dst, utf8proc_ssize_t bufsize, utf8proc_option_t options, int *last_boundclass) {
|
351
358
|
utf8proc_ssize_t written = 0;
|
352
|
-
const utf8proc_uint16_t *entry = &utf8proc_sequences[seqindex &
|
353
|
-
int len = seqindex >>
|
354
|
-
if (len >=
|
359
|
+
const utf8proc_uint16_t *entry = &utf8proc_sequences[seqindex & 0x3FFF];
|
360
|
+
int len = seqindex >> 14;
|
361
|
+
if (len >= 3) {
|
355
362
|
len = *entry;
|
356
363
|
entry++;
|
357
364
|
}
|
@@ -369,19 +376,31 @@ static utf8proc_ssize_t seqindex_write_char_decomposed(utf8proc_uint16_t seqinde
|
|
369
376
|
UTF8PROC_DLLEXPORT utf8proc_int32_t utf8proc_tolower(utf8proc_int32_t c)
|
370
377
|
{
|
371
378
|
utf8proc_int32_t cl = utf8proc_get_property(c)->lowercase_seqindex;
|
372
|
-
return cl != UINT16_MAX ? seqindex_decode_index(cl) : c;
|
379
|
+
return cl != UINT16_MAX ? seqindex_decode_index((utf8proc_uint32_t)cl) : c;
|
373
380
|
}
|
374
381
|
|
375
382
|
UTF8PROC_DLLEXPORT utf8proc_int32_t utf8proc_toupper(utf8proc_int32_t c)
|
376
383
|
{
|
377
384
|
utf8proc_int32_t cu = utf8proc_get_property(c)->uppercase_seqindex;
|
378
|
-
return cu != UINT16_MAX ? seqindex_decode_index(cu) : c;
|
385
|
+
return cu != UINT16_MAX ? seqindex_decode_index((utf8proc_uint32_t)cu) : c;
|
379
386
|
}
|
380
387
|
|
381
388
|
UTF8PROC_DLLEXPORT utf8proc_int32_t utf8proc_totitle(utf8proc_int32_t c)
|
382
389
|
{
|
383
390
|
utf8proc_int32_t cu = utf8proc_get_property(c)->titlecase_seqindex;
|
384
|
-
return cu != UINT16_MAX ? seqindex_decode_index(cu) : c;
|
391
|
+
return cu != UINT16_MAX ? seqindex_decode_index((utf8proc_uint32_t)cu) : c;
|
392
|
+
}
|
393
|
+
|
394
|
+
UTF8PROC_DLLEXPORT int utf8proc_islower(utf8proc_int32_t c)
|
395
|
+
{
|
396
|
+
const utf8proc_property_t *p = utf8proc_get_property(c);
|
397
|
+
return p->lowercase_seqindex != p->uppercase_seqindex && p->lowercase_seqindex == UINT16_MAX;
|
398
|
+
}
|
399
|
+
|
400
|
+
UTF8PROC_DLLEXPORT int utf8proc_isupper(utf8proc_int32_t c)
|
401
|
+
{
|
402
|
+
const utf8proc_property_t *p = utf8proc_get_property(c);
|
403
|
+
return p->lowercase_seqindex != p->uppercase_seqindex && p->uppercase_seqindex == UINT16_MAX && p->category != UTF8PROC_CATEGORY_LT;
|
385
404
|
}
|
386
405
|
|
387
406
|
/* return a character width analogous to wcwidth (except portable and
|
@@ -391,7 +410,7 @@ UTF8PROC_DLLEXPORT int utf8proc_charwidth(utf8proc_int32_t c) {
|
|
391
410
|
}
|
392
411
|
|
393
412
|
UTF8PROC_DLLEXPORT utf8proc_category_t utf8proc_category(utf8proc_int32_t c) {
|
394
|
-
return utf8proc_get_property(c)->category;
|
413
|
+
return (utf8proc_category_t) utf8proc_get_property(c)->category;
|
395
414
|
}
|
396
415
|
|
397
416
|
UTF8PROC_DLLEXPORT const char *utf8proc_category_string(utf8proc_int32_t c) {
|
@@ -401,7 +420,7 @@ UTF8PROC_DLLEXPORT const char *utf8proc_category_string(utf8proc_int32_t c) {
|
|
401
420
|
|
402
421
|
#define utf8proc_decompose_lump(replacement_uc) \
|
403
422
|
return utf8proc_decompose_char((replacement_uc), dst, bufsize, \
|
404
|
-
options & ~UTF8PROC_LUMP, last_boundclass)
|
423
|
+
options & ~(unsigned int)UTF8PROC_LUMP, last_boundclass)
|
405
424
|
|
406
425
|
UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_decompose_char(utf8proc_int32_t uc, utf8proc_int32_t *dst, utf8proc_ssize_t bufsize, utf8proc_option_t options, int *last_boundclass) {
|
407
426
|
const utf8proc_property_t *property;
|
@@ -716,7 +735,7 @@ UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_map_custom(
|
|
716
735
|
*dstptr = NULL;
|
717
736
|
result = utf8proc_decompose_custom(str, strlen, NULL, 0, options, custom_func, custom_data);
|
718
737
|
if (result < 0) return result;
|
719
|
-
buffer = (utf8proc_int32_t *) malloc(result * sizeof(utf8proc_int32_t) + 1);
|
738
|
+
buffer = (utf8proc_int32_t *) malloc(((utf8proc_size_t)result) * sizeof(utf8proc_int32_t) + 1);
|
720
739
|
if (!buffer) return UTF8PROC_ERROR_NOMEM;
|
721
740
|
result = utf8proc_decompose_custom(str, strlen, buffer, result, options, custom_func, custom_data);
|
722
741
|
if (result < 0) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* Copyright (c)
|
2
|
+
* Copyright (c) 2014-2021 Steven G. Johnson, Jiahao Chen, Peter Colberg, Tony Kelman, Scott P. Jones, and other contributors.
|
3
3
|
* Copyright (c) 2009 Public Software Group e. V., Berlin, Germany
|
4
4
|
*
|
5
5
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
@@ -27,8 +27,8 @@
|
|
27
27
|
*
|
28
28
|
* utf8proc is a free/open-source (MIT/expat licensed) C library
|
29
29
|
* providing Unicode normalization, case-folding, and other operations
|
30
|
-
* for strings in the UTF-8 encoding, supporting Unicode
|
31
|
-
*
|
30
|
+
* for strings in the UTF-8 encoding, supporting up-to-date Unicode versions.
|
31
|
+
* See the utf8proc home page (http://julialang.org/utf8proc/)
|
32
32
|
* for downloads and other information, or the source code on github
|
33
33
|
* (https://github.com/JuliaLang/utf8proc).
|
34
34
|
*
|
@@ -71,7 +71,7 @@
|
|
71
71
|
/** The MAJOR version number (increased when backwards API compatibility is broken). */
|
72
72
|
#define UTF8PROC_VERSION_MAJOR 2
|
73
73
|
/** The MINOR version number (increased when new functionality is added in a backwards-compatible manner). */
|
74
|
-
#define UTF8PROC_VERSION_MINOR
|
74
|
+
#define UTF8PROC_VERSION_MINOR 7
|
75
75
|
/** The PATCH version (increased for fixes that do not change the API). */
|
76
76
|
#define UTF8PROC_VERSION_PATCH 0
|
77
77
|
/** @} */
|
@@ -502,7 +502,7 @@ UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_decompose_char(
|
|
502
502
|
* string and orders the decomposed sequences correctly.
|
503
503
|
*
|
504
504
|
* If the @ref UTF8PROC_NULLTERM flag in `options` is set, processing
|
505
|
-
* will be stopped, when a NULL byte is
|
505
|
+
* will be stopped, when a NULL byte is encountered, otherwise `strlen`
|
506
506
|
* bytes are processed. The result (in the form of 32-bit unicode
|
507
507
|
* codepoints) is written into the buffer being pointed to by
|
508
508
|
* `buffer` (which must contain at least `bufsize` entries). In case of
|
@@ -635,6 +635,18 @@ UTF8PROC_DLLEXPORT utf8proc_int32_t utf8proc_toupper(utf8proc_int32_t c);
|
|
635
635
|
*/
|
636
636
|
UTF8PROC_DLLEXPORT utf8proc_int32_t utf8proc_totitle(utf8proc_int32_t c);
|
637
637
|
|
638
|
+
/**
|
639
|
+
* Given a codepoint `c`, return `1` if the codepoint corresponds to a lower-case character
|
640
|
+
* and `0` otherwise.
|
641
|
+
*/
|
642
|
+
UTF8PROC_DLLEXPORT int utf8proc_islower(utf8proc_int32_t c);
|
643
|
+
|
644
|
+
/**
|
645
|
+
* Given a codepoint `c`, return `1` if the codepoint corresponds to an upper-case character
|
646
|
+
* and `0` otherwise.
|
647
|
+
*/
|
648
|
+
UTF8PROC_DLLEXPORT int utf8proc_isupper(utf8proc_int32_t c);
|
649
|
+
|
638
650
|
/**
|
639
651
|
* Given a codepoint, return a character width analogous to `wcwidth(codepoint)`,
|
640
652
|
* except that a width of 0 is returned for non-printable codepoints
|