diff options
author | Wohlstand <admin@wohlnet.ru> | 2017-11-12 07:32:11 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2017-11-12 07:32:11 +0300 |
commit | b043032a89f38e2b3191a65dab9ae4e8202d48f3 (patch) | |
tree | fa43cf8e88087b84aff825e8eaac40ff4587f2c3 /src/adlmidi_private.hpp | |
parent | cc2d7237cce71482c04895e5550609534e41413b (diff) | |
download | libADLMIDI-b043032a89f38e2b3191a65dab9ae4e8202d48f3.tar.gz libADLMIDI-b043032a89f38e2b3191a65dab9ae4e8202d48f3.tar.bz2 libADLMIDI-b043032a89f38e2b3191a65dab9ae4e8202d48f3.zip |
libADLMIDI now is buildable under OpenWatcom except of some workarounds
- Need a different way to create a static library, otherwise it don't wanna be built.
- Needed a different custom STL containers (std::vector and std::set) implementation that will work and will don't glitch with a crashes
Diffstat (limited to 'src/adlmidi_private.hpp')
-rw-r--r-- | src/adlmidi_private.hpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp index c860a88..408fede 100644 --- a/src/adlmidi_private.hpp +++ b/src/adlmidi_private.hpp @@ -53,9 +53,10 @@ typedef __int32 ssize_t; # include <windows.h> #endif -#ifdef __DJGPP__ +#if defined(__DJGPP__) || (defined(__WATCOMC__) && (defined(__DOS__) || defined(__DOS4G__) || defined(__DOS4GNZ__))) #define ADLMIDI_HW_OPL #include <conio.h> +#ifdef __DJGPP__ #include <pc.h> #include <dpmi.h> #include <go32.h> @@ -63,6 +64,8 @@ typedef __int32 ssize_t; #include <dos.h> #endif +#endif + #include <vector> #include <list> #include <string> @@ -72,6 +75,7 @@ typedef __int32 ssize_t; #include <cstdlib> #include <cstring> #include <cmath> +#include <cstdarg> #include <cstdio> #include <vector> // vector #include <deque> // deque @@ -89,11 +93,13 @@ typedef __int32 ssize_t; #include "fraction.hpp" +#ifndef ADLMIDI_HW_OPL #ifdef ADLMIDI_USE_DOSBOX_OPL #include "dbopl.h" #else #include "nukedopl3.h" #endif +#endif #include "adldata.hh" #include "adlmidi.h" //Main API @@ -529,7 +535,7 @@ public: users_t users; // If the channel is keyoff'd - long koff_time_until_neglible; + int64_t koff_time_until_neglible; // For channel allocation: AdlChannel(): users(), koff_time_until_neglible(0) { } void AddAge(int64_t ms); @@ -695,7 +701,7 @@ public: { std::string label; double pos_time; - unsigned long pos_ticks; + uint64_t pos_ticks; }; std::vector<MIDIchannel> Ch; @@ -893,7 +899,7 @@ private: // Determine how good a candidate this adlchannel // would be for playing a note from this instrument. - long CalculateAdlChannelGoodness(unsigned c, const MIDIchannel::NoteInfo::Phys &ins, uint16_t /*MidCh*/) const; + long CalculateAdlChannelGoodness(unsigned c, const MIDIchannel::NoteInfo::Phys &ins, uint16_t /*MidCh*/); // A new note will be played on this channel using this instrument. // Kill existing notes on this channel (or don't, if we do arpeggio) |