No windows.h dependency in .h files

This commit is contained in:
kichikuou
2016-04-02 22:55:45 +09:00
parent c4b681c6ef
commit d1fd4bd3e3
5 changed files with 13 additions and 11 deletions
+1
View File
@@ -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
View File
@@ -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];
+9
View File
@@ -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); }
+1
View File
@@ -4,6 +4,7 @@
[ NACT ]
*/
#include <windows.h>
#include "nact.h"
#include "ags.h"
#include "mako.h"
+1
View File
@@ -4,6 +4,7 @@
[ NACT - command ]
*/
#include <windows.h>
#include "nact.h"
#include "ags.h"
#include "mako.h"