mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-10-08 06:48:05 +03:00
No windows.h dependency in .h files
This commit is contained in:
@@ -177,6 +177,7 @@ void MAKO::notify_mci(int status)
|
||||
|
||||
void MAKO::play_pcm(int page, bool loop)
|
||||
{
|
||||
assert(false);
|
||||
#if defined(_USE_PCM)
|
||||
static char header[44] = {
|
||||
'R' , 'I' , 'F' , 'F' , 0x00, 0x00, 0x00, 0x00, 'W' , 'A' , 'V' , 'E' , 'f' , 'm' , 't' , ' ' ,
|
||||
|
||||
+1
-11
@@ -7,8 +7,6 @@
|
||||
#ifndef _MAKO_H_
|
||||
#define _MAKO_H_
|
||||
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
@@ -19,7 +17,7 @@
|
||||
#define MAX_MMLS (128 * 1024)
|
||||
|
||||
#define _USE_REAL_MIDI
|
||||
#define _USE_PCM
|
||||
//#define _USE_PCM
|
||||
|
||||
class MAKO
|
||||
{
|
||||
@@ -49,14 +47,6 @@ private:
|
||||
static int thread(void* pvoid);
|
||||
SDL_Thread* hThread;
|
||||
|
||||
// MIDI音源
|
||||
union UNION_MIDI_DATA {
|
||||
DWORD msg;
|
||||
BYTE data[4];
|
||||
};
|
||||
UNION_MIDI_DATA midi;
|
||||
HMIDIOUT hMidi;
|
||||
|
||||
// MML
|
||||
typedef struct {
|
||||
uint8 data[MAX_MMLS];
|
||||
|
||||
@@ -4,12 +4,21 @@
|
||||
[ MAKO - midi ]
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
#include "mako.h"
|
||||
#include "dri.h"
|
||||
|
||||
#define next_mml(p) mml[p].data[mml[p].addr++]
|
||||
|
||||
// MIDI音源
|
||||
union UNION_MIDI_DATA {
|
||||
DWORD msg;
|
||||
BYTE data[4];
|
||||
};
|
||||
static UNION_MIDI_DATA midi;
|
||||
static HMIDIOUT hMidi;
|
||||
|
||||
#define send_2bytes(d1, d2) { midi.data[0] = (BYTE)d1; midi.data[1] = (BYTE)d2; midiOutShortMsg(hMidi,midi.msg); }
|
||||
#define send_3bytes(d1, d2, d3) { midi.data[0] = (BYTE)d1; midi.data[1] = (BYTE)d2; midi.data[2] = (BYTE)d3 ;midiOutShortMsg(hMidi, midi.msg); }
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
[ NACT ]
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include "nact.h"
|
||||
#include "ags.h"
|
||||
#include "mako.h"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
[ NACT - command ]
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include "nact.h"
|
||||
#include "ags.h"
|
||||
#include "mako.h"
|
||||
|
||||
Reference in New Issue
Block a user