Skip to content

Commit 2288b83

Browse files
committed
Merge branch 'master' into wip-xtconvert
2 parents bf9c80b + 6592476 commit 2288b83

97 files changed

Lines changed: 9076 additions & 559 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ else()
3636
endif()
3737

3838
option(PGE_STATIC_SDLMIXER "Prefer static assembly of SDL Mixer X and libraries" ${PGE_STATIC_SDLMIXER_PLATFORM_DEFAULT})
39+
option(ENABLE_ADDRESS_SANITIZER "Enable the Address Sanitizer GCC feature" OFF)
3940

4041
if(PGE_STATIC_SDLMIXER)
4142
set(PGE_SHARED_SDLMIXER OFF)
@@ -185,6 +186,12 @@ if(PGE_ENABLE_QT AND NOT ANDROID AND NOT EMSCRIPTEN)
185186
qtDeployAdd(pge_maintainer)
186187
endif()
187188

189+
option(PGE_BUILD_TRANSLATOR "Build the Translator utility component (Qt5 required)" ON)
190+
if(PGE_BUILD_TRANSLATOR)
191+
add_subdirectory(Translator)
192+
qtDeployAdd(pge_translator)
193+
endif()
194+
188195
pgeSetupQtDeploymet(${PGE_ENABLE_STATIC_QT} ${PGE_SHARED_SDLMIXER})
189196
endif()
190197

Editor/languages/editor_es.ts

Lines changed: 104 additions & 103 deletions
Large diffs are not rendered by default.

Editor/languages/editor_fr.ts

Lines changed: 154 additions & 130 deletions
Large diffs are not rendered by default.

Engine/android-project/moondust/src/main/java/org/libsdl/app/SDLActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
6161
private static final String TAG = "SDL";
6262
private static final int SDL_MAJOR_VERSION = 2;
6363
private static final int SDL_MINOR_VERSION = 32;
64-
private static final int SDL_MICRO_VERSION = 4;
64+
private static final int SDL_MICRO_VERSION = 8;
6565
/*
6666
// Display InputType.SOURCE/CLASS of events and devices
6767
//

Engine/scenes/level/base/lvl_base_physics.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class PGE_physBody
3838
public:
3939
PGE_physBody() = default;
4040
PGE_physBody(const PGE_physBody &o) = default;
41+
PGE_physBody &operator=(const PGE_physBody &o) = default;
4142

4243
// void processCollisions(PGE_RenderList &objs);
4344

Maintainer/languages/maintainer_es.ts

Lines changed: 86 additions & 85 deletions
Large diffs are not rendered by default.

Maintainer/languages/maintainer_fr.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ Mondes écrasés : %3
336336
<message>
337337
<location filename="../EpisodeCvt/case_fixer.cpp" line="341"/>
338338
<source>Error occouped while work process</source>
339-
<translation>Un erreur s&apos;est produite lors du traitement</translation>
339+
<translation>Une erreur s&apos;est produite lors du traitement</translation>
340340
</message>
341341
<message>
342342
<location filename="../EpisodeCvt/case_fixer.cpp" line="342"/>
@@ -426,7 +426,7 @@ Formats pris en charge :
426426
<message>
427427
<location filename="../EpisodeCvt/episode_converter.ui" line="54"/>
428428
<source>Simple</source>
429-
<translation type="unfinished"></translation>
429+
<translation>Simple</translation>
430430
</message>
431431
<message>
432432
<location filename="../EpisodeCvt/episode_converter.ui" line="63"/>
@@ -441,37 +441,37 @@ This option is only works if you convert episode for TheXTech.</source>
441441
<location filename="../EpisodeCvt/episode_converter.ui" line="69"/>
442442
<location filename="../EpisodeCvt/episode_converter.ui" line="140"/>
443443
<source>Apply Pre-1.3 NPC settings for TheXTech</source>
444-
<translation type="unfinished"></translation>
444+
<translation>Appliquer paramètres Pre-1.3 NPC à TheXTech</translation>
445445
</message>
446446
<message>
447447
<location filename="../EpisodeCvt/episode_converter.ui" line="82"/>
448448
<source>Select the engine for which you want to convert the episode:</source>
449-
<translation type="unfinished"></translation>
449+
<translation>Sélectionner le moteur pour lequel vous voulez convertir l&apos;épisode&#xa0;:</translation>
450450
</message>
451451
<message>
452452
<location filename="../EpisodeCvt/episode_converter.ui" line="106"/>
453453
<source>Advanced</source>
454-
<translation type="unfinished"></translation>
454+
<translation>Avancé</translation>
455455
</message>
456456
<message>
457457
<location filename="../EpisodeCvt/episode_converter.ui" line="153"/>
458458
<source>Target format for levels:</source>
459-
<translation type="unfinished"></translation>
459+
<translation type="unfinished">Format cible pour les niveaux&#xa0;:</translation>
460460
</message>
461461
<message>
462462
<location filename="../EpisodeCvt/episode_converter.ui" line="183"/>
463463
<source>Same as levels</source>
464-
<translation type="unfinished"></translation>
464+
<translation type="unfinished">Le même que les niveaux</translation>
465465
</message>
466466
<message>
467467
<location filename="../EpisodeCvt/episode_converter.ui" line="238"/>
468468
<source>Target format for worlds:</source>
469-
<translation type="unfinished"></translation>
469+
<translation type="unfinished">Format cible des mondes&#xa0;:</translation>
470470
</message>
471471
<message>
472472
<location filename="../EpisodeCvt/episode_converter.ui" line="264"/>
473473
<source>New config pack ID:</source>
474-
<translation type="unfinished"></translation>
474+
<translation type="unfinished">Nouveau ID de pack de config&#xa0;:</translation>
475475
</message>
476476
<message>
477477
<location filename="../EpisodeCvt/episode_converter.ui" line="284"/>
@@ -517,7 +517,7 @@ Important: There are only level and world map files gets being converted. Any in
517517
<message>
518518
<location filename="../EpisodeCvt/episode_converter.cpp" line="335"/>
519519
<source>[Select an engine]</source>
520-
<translation type="unfinished"></translation>
520+
<translation>[Sélectionnez un moteur]</translation>
521521
</message>
522522
<message>
523523
<location filename="../EpisodeCvt/episode_converter.cpp" line="678"/>
@@ -533,23 +533,23 @@ Important: There are only level and world map files gets being converted. Any in
533533
<message>
534534
<location filename="../EpisodeCvt/episode_converter.cpp" line="701"/>
535535
<source>World map(s) without an episode, format: %1</source>
536-
<translation type="unfinished"></translation>
536+
<translation type="unfinished">Carte(s) des mondes sans un épisode, format&#xa0;: %1</translation>
537537
</message>
538538
<message>
539539
<location filename="../EpisodeCvt/episode_converter.cpp" line="724"/>
540540
<source>Level(s) without an episode, format: %1</source>
541-
<translation type="unfinished"></translation>
541+
<translation type="unfinished">Niveau(x) sans épisodes, format&#xa0;: %1</translation>
542542
</message>
543543
<message>
544544
<location filename="../EpisodeCvt/episode_converter.cpp" line="881"/>
545545
<source>Unknown episode</source>
546546
<comment>Heuristicly detected episode format</comment>
547-
<translation type="unfinished"></translation>
547+
<translation>Épisode inconnu</translation>
548548
</message>
549549
<message>
550550
<location filename="../EpisodeCvt/episode_converter.cpp" line="885"/>
551551
<source>Guessed episode format: %1</source>
552-
<translation type="unfinished"></translation>
552+
<translation>Format d&apos;épisode estimé&#xa0;: %1</translation>
553553
</message>
554554
<message>
555555
<location filename="../EpisodeCvt/episode_converter.cpp" line="937"/>
@@ -646,7 +646,7 @@ Important: There are only level and world map files gets being converted. Any in
646646
<message>
647647
<location filename="../Graphics/gifs2png.ui" line="216"/>
648648
<source>Skip images with non-black-and-white masks</source>
649-
<translation type="unfinished"></translation>
649+
<translation type="unfinished">Passer les images avec des masques pas en noir et blanc</translation>
650650
</message>
651651
<message>
652652
<location filename="../Graphics/gifs2png.ui" line="156"/>

MusicPlayer/Effects/fx_common.hpp

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,201 @@
3636

3737
#define MAX_CHANNELS 10
3838

39+
#ifdef EFFECT_FX_COMMON_INT16DST // int16 output
40+
// Float32-LE
41+
static int16_t getFloatLSBSample(uint8_t *raw, int c)
42+
{
43+
union
44+
{
45+
float f;
46+
uint32_t r;
47+
} o;
48+
raw += (c * sizeof(float));
49+
o.r = (((uint32_t)raw[0] << 0) & 0x000000FF) |
50+
(((uint32_t)raw[1] << 8) & 0x0000FF00) |
51+
(((uint32_t)raw[2] << 16) & 0x00FF0000) |
52+
(((uint32_t)raw[3] << 24) & 0xFF000000);
53+
return o.f * INT16_MAX;
54+
}
55+
static void setFloatLSBSample(uint8_t **raw, int16_t ov)
56+
{
57+
float f = (float)ov / INT16_MAX;
58+
void *t = &f;
59+
uint32_t r = *(uint32_t*)t;
60+
*(*raw)++ = (uint8_t)((r >> 0) & 0xFF);
61+
*(*raw)++ = (uint8_t)((r >> 8) & 0xFF);
62+
*(*raw)++ = (uint8_t)((r >> 16) & 0xFF);
63+
*(*raw)++ = (uint8_t)((r >> 24) & 0xFF);
64+
}
65+
66+
// Float32-BE
67+
static int16_t getFloatMSBSample(uint8_t *raw, int c)
68+
{
69+
union
70+
{
71+
float f;
72+
uint32_t r;
73+
} o;
74+
raw += (c * sizeof(float));
75+
o.r = (((uint32_t)raw[3] << 0) & 0x000000FF) |
76+
(((uint32_t)raw[2] << 8) & 0x0000FF00) |
77+
(((uint32_t)raw[1] << 16) & 0x00FF0000) |
78+
(((uint32_t)raw[0] << 24) & 0xFF000000);
79+
return o.f * INT16_MAX;
80+
}
81+
static void setFloatMSBSample(uint8_t **raw, int16_t ov)
82+
{
83+
float f = (float)ov / INT16_MAX;
84+
void *t = &f;
85+
uint32_t r = *(uint32_t*)t;
86+
*(*raw)++ = (uint8_t)((r >> 24) & 0xFF);
87+
*(*raw)++ = (uint8_t)((r >> 16) & 0xFF);
88+
*(*raw)++ = (uint8_t)((r >> 8) & 0xFF);
89+
*(*raw)++ = (uint8_t)((r >> 0) & 0xFF);
90+
}
91+
92+
// int32_t-LE
93+
static int16_t getInt32LSB(uint8_t *raw, int c)
94+
{
95+
uint32_t r;
96+
int32_t f;
97+
raw += (c * sizeof(int32_t));
98+
r = (((uint32_t)raw[0] << 0) & 0x000000FF) |
99+
(((uint32_t)raw[1] << 8) & 0x0000FF00) |
100+
(((uint32_t)raw[2] << 16) & 0x00FF0000) |
101+
(((uint32_t)raw[3] << 24) & 0xFF000000);
102+
f = *(int32_t*)(&r);
103+
return f >> 16;
104+
}
105+
static void setInt32LSB(uint8_t **raw, int16_t ov)
106+
{
107+
int32_t f = ((int32_t)ov << 16);
108+
uint32_t r = *(uint32_t*)(&f);
109+
*(*raw)++ = (uint8_t)((r >> 0) & 0xFF);
110+
*(*raw)++ = (uint8_t)((r >> 8) & 0xFF);
111+
*(*raw)++ = (uint8_t)((r >> 16) & 0xFF);
112+
*(*raw)++ = (uint8_t)((r >> 24) & 0xFF);
113+
}
114+
115+
// int32_t-BE
116+
static int16_t getInt32MSB(uint8_t *raw, int c)
117+
{
118+
uint32_t r;
119+
int32_t f;
120+
raw += (c * sizeof(int32_t));
121+
r = (((uint32_t)raw[3] << 0) & 0x000000FF) |
122+
(((uint32_t)raw[2] << 8) & 0x0000FF00) |
123+
(((uint32_t)raw[1] << 16) & 0x00FF0000) |
124+
(((uint32_t)raw[0] << 24) & 0xFF000000);
125+
f = *(int32_t*)(&r);
126+
return f >> 16;
127+
}
128+
static void setInt32MSB(uint8_t **raw, int16_t ov)
129+
{
130+
int32_t f = ((int32_t)ov << 16);
131+
uint32_t r = *(uint32_t*)(&f);
132+
*(*raw)++ = (uint8_t)((r >> 24) & 0xFF);
133+
*(*raw)++ = (uint8_t)((r >> 16) & 0xFF);
134+
*(*raw)++ = (uint8_t)((r >> 8) & 0xFF);
135+
*(*raw)++ = (uint8_t)((r >> 0) & 0xFF);
136+
}
137+
138+
// int16_t-LE
139+
static int16_t getInt16LSB(uint8_t *raw, int c)
140+
{
141+
uint16_t r;
142+
int16_t f;
143+
raw += (c * sizeof(int16_t));
144+
r = (((uint16_t)raw[0] << 0) & 0x00FF) |
145+
(((uint16_t)raw[1] << 8) & 0xFF00);
146+
f = *(int16_t*)(&r);
147+
return f;
148+
}
149+
static void setInt16LSB(uint8_t **raw, int16_t f)
150+
{
151+
uint16_t r = *(uint16_t*)(&f);
152+
*(*raw)++ = (uint8_t)((r >> 0) & 0xFF);
153+
*(*raw)++ = (uint8_t)((r >> 8) & 0xFF);
154+
}
155+
156+
// int16_t-BE
157+
static int16_t getInt16MSB(uint8_t *raw, int c)
158+
{
159+
uint16_t r;
160+
int16_t f;
161+
raw += (c * sizeof(int16_t));
162+
r = (((uint16_t)raw[1] << 0) & 0x00FF) |
163+
(((uint16_t)raw[0] << 8) & 0xFF00);
164+
f = *(int16_t*)(&r);
165+
return f;
166+
}
167+
static void setInt16MSB(uint8_t **raw, int16_t f)
168+
{
169+
uint16_t r = *(uint16_t*)(&f);
170+
*(*raw)++ = (uint8_t)((r >> 8) & 0xFF);
171+
*(*raw)++ = (uint8_t)((r >> 0) & 0xFF);
172+
}
173+
174+
// uint16_t-LE
175+
static int16_t getuint16_tLSB(uint8_t *raw, int c)
176+
{
177+
uint16_t r;
178+
raw += (c * sizeof(uint16_t));
179+
r = (((uint16_t)raw[0] << 0) & 0x00FF) |
180+
(((uint16_t)raw[1] << 8) & 0xFF00);
181+
return (int16_t)r + INT16_MIN;
182+
}
183+
static void setuint16_tLSB(uint8_t **raw, int16_t ov)
184+
{
185+
int16_t f = ov - INT16_MIN;
186+
uint16_t r = *(uint16_t*)(&f);
187+
*(*raw)++ = (uint8_t)((r >> 0) & 0xFF);
188+
*(*raw)++ = (uint8_t)((r >> 8) & 0xFF);
189+
}
190+
191+
// uint16_t-BE
192+
static int16_t getuint16_tMSB(uint8_t *raw, int c)
193+
{
194+
uint16_t r;
195+
raw += (c * sizeof(uint16_t));
196+
r = (((uint16_t)raw[1] << 0) & 0x00FF) |
197+
(((uint16_t)raw[0] << 8) & 0xFF00);
198+
return (int16_t)r + INT16_MIN;
199+
}
200+
static void setuint16_tMSB(uint8_t **raw, int16_t ov)
201+
{
202+
int16_t f = ov - INT16_MIN;
203+
uint16_t r = *(uint16_t*)(&f);
204+
*(*raw)++ = (uint8_t)((r >> 8) & 0xFF);
205+
*(*raw)++ = (uint8_t)((r >> 0) & 0xFF);
206+
}
207+
208+
// int8_t
209+
static int16_t getInt8(uint8_t *raw, int c)
210+
{
211+
int16_t f;
212+
raw += (c * sizeof(int8_t));
213+
f = ((int16_t)(int8_t)(*raw)) << 8;
214+
return f;
215+
}
216+
static void setInt8(uint8_t **raw, int16_t ov)
217+
{
218+
*(*raw)++ = (uint8_t)(ov >> 8);
219+
}
220+
221+
// uint8_t
222+
static int16_t getuint8_t(uint8_t *raw, int c)
223+
{
224+
raw += (c * sizeof(int8_t));
225+
return (int16_t)((int)*raw + INT8_MIN) << 8;
226+
}
227+
static void setuint8_t(uint8_t **raw, int16_t ov)
228+
{
229+
*(*raw)++ = (uint8_t)((ov >> 8) - INT8_MAX);
230+
}
231+
232+
#else // int16 output end, Float32 output begin
233+
39234
// Float32-LE
40235
static float getFloatLSBSample(uint8_t *raw, int c)
41236
{
@@ -233,10 +428,17 @@ static void setuint8_t(uint8_t **raw, float ov)
233428
{
234429
*(*raw)++ = (uint8_t)((ov * INT8_MAX) - INT8_MIN);
235430
}
431+
#endif // Float32 output end
236432

237433

434+
#ifdef EFFECT_FX_COMMON_INT16DST
435+
typedef int16_t (*ReadSampleCB)(uint8_t* raw, int channel);
436+
typedef void (*WriteSampleCB)(uint8_t** raw, int16_t sample);
437+
#else
238438
typedef float (*ReadSampleCB)(uint8_t* raw, int channel);
239439
typedef void (*WriteSampleCB)(uint8_t** raw, float sample);
440+
#endif
441+
240442

241443
static bool initFormat(ReadSampleCB &readSample,
242444
WriteSampleCB &writeSample,

MusicPlayer/Effects/reverb.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* DEALINGS IN THE SOFTWARE.
2323
*/
2424

25+
#include <cstddef>
2526
#include <vector>
2627
#include <deque>
2728
#include <cmath>
@@ -551,7 +552,7 @@ class revmodel
551552
};
552553

553554

554-
struct FxReverb
555+
typedef struct FxReverb
555556
{
556557
int channels = 0;
557558
int sampleRate = 0;
@@ -741,7 +742,7 @@ struct FxReverb
741742
}
742743
}
743744
}
744-
};
745+
} FxReverb;
745746

746747

747748
FxReverb* reverbEffectInit(int rate, uint16_t format, int channels)

0 commit comments

Comments
 (0)