summaryrefslogtreecommitdiff
path: root/music/os2_m.c
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-01-02 19:19:48 +0000
committerrubidium <rubidium@openttd.org>2007-01-02 19:19:48 +0000
commit66bbf336c6af7353ef0aeed58002c46543b30635 (patch)
treead4a63860df2626b22f77e7dac712e958bea54cb /music/os2_m.c
parentccc0a3f4dbf58c005b22341ac8874252924690cd (diff)
downloadopenttd-66bbf336c6af7353ef0aeed58002c46543b30635.tar.xz
(svn r7759) -Merge: makefile rewrite. This merge features:
- A proper ./configure, so everything needs to be configured only once, not for every make. - Usage of makedepend when available. This greatly reduces the time needed for generating the dependencies. - A generator for all project files. There is a single file with sources, which is used to generate Makefiles and the project files for MSVC. - Proper support for OSX universal binaries. - Object files for non-MSVC compiles are also placed in separate directories, making is faster to switch between debug and release compiles and it does not touch the directory with the source files. - Functionality to make a bundle of all needed files for for example a nightly or distribution of a binary with all needed GRFs and language files. Note: as this merge moves almost all files, it is recommended to make a backup of your working copy before updating your working copy.
Diffstat (limited to 'music/os2_m.c')
-rw-r--r--music/os2_m.c77
1 files changed, 0 insertions, 77 deletions
diff --git a/music/os2_m.c b/music/os2_m.c
deleted file mode 100644
index 75df60c8d..000000000
--- a/music/os2_m.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* $Id$ */
-
-#include "../stdafx.h"
-#include "../openttd.h"
-#include "os2_m.h"
-
-#define INCL_DOS
-#define INCL_OS2MM
-#define INCL_WIN
-
-#include <stdarg.h>
-#include <os2.h>
-#include <os2me.h>
-
-/**********************
- * OS/2 MIDI PLAYER
- **********************/
-
-/* Interesting how similar the MCI API in OS/2 is to the Win32 MCI API,
- * eh? Anyone would think they both came from the same place originally! ;)
- */
-
-static long CDECL MidiSendCommand(const char *cmd, ...)
-{
- va_list va;
- char buf[512];
- va_start(va, cmd);
- vsprintf(buf, cmd, va);
- va_end(va);
- return mciSendString(buf, NULL, 0, NULL, 0);
-}
-
-static void OS2MidiPlaySong(const char *filename)
-{
- MidiSendCommand("close all");
-
- if (MidiSendCommand("open %s type sequencer alias song", filename) != 0)
- return;
-
- MidiSendCommand("play song from 0");
-}
-
-static void OS2MidiStopSong(void)
-{
- MidiSendCommand("close all");
-}
-
-static void OS2MidiSetVolume(byte vol)
-{
- MidiSendCommand("set song audio volume %d", ((vol/127)*100));
-}
-
-static bool OS2MidiIsSongPlaying(void)
-{
- char buf[16];
- mciSendString("status song mode", buf, sizeof(buf), NULL, 0);
- return strcmp(buf, "playing") == 0 || strcmp(buf, "seeking") == 0;
-}
-
-static const char *OS2MidiStart(const char * const *parm)
-{
- return 0;
-}
-
-static void OS2MidiStop(void)
-{
- MidiSendCommand("close all");
-}
-
-const HalMusicDriver _os2_music_driver = {
- OS2MidiStart,
- OS2MidiStop,
- OS2MidiPlaySong,
- OS2MidiStopSong,
- OS2MidiIsSongPlaying,
- OS2MidiSetVolume,
-};