diff --git a/bin/windows/zmusic/include/zmusic.h b/bin/windows/zmusic/include/zmusic.h index 7de05c5fa3b..7422b58da26 100644 --- a/bin/windows/zmusic/include/zmusic.h +++ b/bin/windows/zmusic/include/zmusic.h @@ -67,7 +67,8 @@ typedef struct SoundStreamInfo_ typedef enum SampleType_ { SampleType_UInt8, - SampleType_Int16 + SampleType_Int16, + SampleType_Float32 } SampleType; typedef enum ChannelConfig_ @@ -76,6 +77,15 @@ typedef enum ChannelConfig_ ChannelConfig_Stereo } ChannelConfig; +typedef struct SoundStreamInfoEx_ +{ + int mBufferSize; // If mBufferSize is 0, the song doesn't use streaming but plays through a different interface. + int mSampleRate; + SampleType mSampleType; + ChannelConfig mChannelConfig; +} SoundStreamInfoEx; + + typedef enum EIntConfigKey_ { zmusic_adl_chips_count, @@ -264,14 +274,14 @@ typedef struct ZMusicConfigurationSetting_ #ifndef ZMUSIC_INTERNAL -#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(ZMUSIC_STATIC) #define DLL_IMPORT _declspec(dllimport) -#else // !_MSC_VER +#else #define DLL_IMPORT -#endif // _MSC_VER +#endif // Note that the internal 'class' definitions are not C compatible! -typedef struct { int zm1; } *ZMusic_MidiSource; -typedef struct { int zm2; } *ZMusic_MusicStream; +typedef struct _ZMusic_MidiSource_Struct { int zm1; } *ZMusic_MidiSource; +typedef struct _ZMusic_MusicStream_Struct { int zm2; } *ZMusic_MusicStream; struct SoundDecoder; #endif @@ -319,6 +329,7 @@ extern "C" DLL_IMPORT void ZMusic_VolumeChanged(ZMusic_MusicStream song); DLL_IMPORT zmusic_bool ZMusic_WriteSMF(ZMusic_MidiSource source, const char* fn, int looplimit); DLL_IMPORT void ZMusic_GetStreamInfo(ZMusic_MusicStream song, SoundStreamInfo *info); + DLL_IMPORT void ZMusic_GetStreamInfoEx(ZMusic_MusicStream song, SoundStreamInfoEx *info); // Configuration interface. The return value specifies if a music restart is needed. // RealValue should be written back to the CVAR or whatever other method the client uses to store configuration state. DLL_IMPORT zmusic_bool ChangeMusicSettingInt(EIntConfigKey key, ZMusic_MusicStream song, int value, int* pRealValue); @@ -406,6 +417,7 @@ typedef zmusic_bool (*pfn_ZMusic_IsMIDI)(ZMusic_MusicStream song); typedef void (*pfn_ZMusic_VolumeChanged)(ZMusic_MusicStream song); typedef zmusic_bool (*pfn_ZMusic_WriteSMF)(ZMusic_MidiSource source, const char* fn, int looplimit); typedef void (*pfn_ZMusic_GetStreamInfo)(ZMusic_MusicStream song, SoundStreamInfo *info); +typedef void (*pfn_ZMusic_GetStreamInfoEx)(ZMusic_MusicStream song, SoundStreamInfoEx *info); typedef zmusic_bool (*pfn_ChangeMusicSettingInt)(EIntConfigKey key, ZMusic_MusicStream song, int value, int* pRealValue); typedef zmusic_bool (*pfn_ChangeMusicSettingFloat)(EFloatConfigKey key, ZMusic_MusicStream song, float value, float* pRealValue); typedef zmusic_bool (*pfn_ChangeMusicSettingString)(EStringConfigKey key, ZMusic_MusicStream song, const char* value); @@ -419,4 +431,4 @@ typedef const ZMusicMidiOutDevice *(*pfn_ZMusic_GetMidiDevices)(int *pAmount); -#endif \ No newline at end of file +#endif diff --git a/src/common/engine/i_net.cpp b/src/common/engine/i_net.cpp index df25c90ab66..07dc7fdd9b4 100644 --- a/src/common/engine/i_net.cpp +++ b/src/common/engine/i_net.cpp @@ -1040,7 +1040,7 @@ void I_NetMessage(const char* text, ...) va_list argptr; va_start(argptr, text); - str.VFormat(format, argptr); + str.VFormat(text, argptr); va_end(argptr); fprintf(stderr, "\r%-40s\n", str.GetChars()); #endif diff --git a/src/gamedata/d_dehacked.cpp b/src/gamedata/d_dehacked.cpp index e41e1a3360f..b79cc8977cc 100644 --- a/src/gamedata/d_dehacked.cpp +++ b/src/gamedata/d_dehacked.cpp @@ -1227,25 +1227,14 @@ static int PatchThing (int thingy) } else if (linelen == 16 && stricmp(Line1, "infighting group") == 0) { - if (val < 0) - { - Printf("Infighting groups must be >= 0 (check your dehacked)\n"); - val = 0; - } type->ActorInfo()->infighting_group = val; } else if (linelen == 16 && stricmp(Line1, "projectile group") == 0) { - if (val < 0) val = -1; type->ActorInfo()->projectile_group = val; } else if (linelen == 12 && stricmp(Line1, "splash group") == 0) { - if (val < 0) - { - Printf("Splash groups must be >= 0 (check your dehacked)\n"); - val = 0; - } type->ActorInfo()->splash_group = val; } else if (linelen == 10 && stricmp(Line1, "fast speed") == 0) @@ -1289,7 +1278,7 @@ static int PatchThing (int thingy) 0xffff8000, // 8 - Orange }; - if (val < 0 || val > 8) val = 0; + if (val > 8) val = 0; unsigned color = bloodcolor[val]; info->BloodColor = color; info->BloodTranslation = val == 0? 0 : TRANSLATION(TRANSLATION_Blood, CreateBloodTranslation(color)); diff --git a/src/playsim/d_player.h b/src/playsim/d_player.h index 3dc3acc1626..5f5c8866e3a 100644 --- a/src/playsim/d_player.h +++ b/src/playsim/d_player.h @@ -161,7 +161,7 @@ class FPlayerClass { public: FPlayerClass (); - FPlayerClass (const FPlayerClass &other); + FPlayerClass (const FPlayerClass &other) = default; ~FPlayerClass (); bool CheckSkin (int skin); diff --git a/src/playsim/p_user.cpp b/src/playsim/p_user.cpp index d1a0b42a411..3337a1d10a3 100644 --- a/src/playsim/p_user.cpp +++ b/src/playsim/p_user.cpp @@ -159,13 +159,6 @@ FPlayerClass::FPlayerClass () Flags = 0; } -FPlayerClass::FPlayerClass (const FPlayerClass &other) -{ - Type = other.Type; - Flags = other.Flags; - Skins = other.Skins; -} - FPlayerClass::~FPlayerClass () { }