aboutsummaryrefslogtreecommitdiff
path: root/utils/gen_adldata/file_formats
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2017-10-21 14:37:45 +0300
committerWohlstand <admin@wohlnet.ru>2017-10-21 14:37:45 +0300
commit490bac7421b5345e5b9035f1430520c751935534 (patch)
tree727b1e6fb54439de92a3339cdb02a387cb80a47b /utils/gen_adldata/file_formats
parent352660262dfd05cc75b5f2099507c9f29953a270 (diff)
downloadlibADLMIDI-490bac7421b5345e5b9035f1430520c751935534.tar.gz
libADLMIDI-490bac7421b5345e5b9035f1430520c751935534.tar.bz2
libADLMIDI-490bac7421b5345e5b9035f1430520c751935534.zip
Fixed MSVC2015 build
Diffstat (limited to 'utils/gen_adldata/file_formats')
-rw-r--r--utils/gen_adldata/file_formats/load_op2.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/utils/gen_adldata/file_formats/load_op2.h b/utils/gen_adldata/file_formats/load_op2.h
index 30a118f..58d6988 100644
--- a/utils/gen_adldata/file_formats/load_op2.h
+++ b/utils/gen_adldata/file_formats/load_op2.h
@@ -3,7 +3,16 @@
#include "../progs_cache.h"
-#pragma pack(push, 1)
+#ifndef _MSC_VER
+#define PACKED_STRUCT __attribute__((packed))
+#else
+#define PACKED_STRUCT
+#endif
+
+#ifdef _MSC_VER
+#pragma pack(push,1)
+#endif
+
struct Doom_OPL2instrument
{
unsigned char trem_vibr_1; /* OP 1: tremolo/vibrato/sustain/KSR/multi */
@@ -21,8 +30,7 @@ struct Doom_OPL2instrument
unsigned char level_2; /* OP 2: output level */
unsigned char unused;
short basenote; /* base note offset */
-} __attribute__((packed));
-#pragma pack(pop)
+} PACKED_STRUCT;
struct Doom_opl_instr
{
@@ -34,7 +42,11 @@ struct Doom_opl_instr
unsigned char finetune;
unsigned char note;
struct Doom_OPL2instrument patchdata[2];
-} __attribute__((packed));
+} PACKED_STRUCT;
+
+#ifdef _MSC_VER
+#pragma pack(pop)
+#endif
static bool LoadDoom(const char *fn, unsigned bank, const char *prefix)