Files
oboe/osx/tools/soundtool.h
Celtic Minstrel b02902770c Well, at present the Windows code for the actual game almost compiles. The current goal is to undo all the things that Ormus did to make this job difficult.
Basically, remove as many as possible of the dependencies of the source files in the tools and classes folders on source files not in those folders.
(With the exception that files in the classes folder may depend on files in the tools folder.)

In this commit, several changes were made.
- Project file modified, may need further modification.
- Many files renamed to match the Mac version.
- #include statements for system headers changed to use <> instead of "" (some already did, but many didn't).
- xxx.h headers replaced with cxxx headers where appropriate.
- Most sound-related variables moved from globvars.cpp to soundvars.cpp.
- The files originally named graphutil and gutils have been merged.
- Changed TRUE/FALSE to true/false.
- Changed exlsound to soundtool and mostly removed dependencies on the main game files; the exception is that it still uses mainPtr (which probably can't be helped)
  and print_nums (which should probably be incorporated into the MessageBox string).
- Possibly other things that were forgotten.

For some reason this commit also includes changes recently committed into the branch for osx.

git-svn-id: http://openexile.googlecode.com/svn/trunk@121 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-08-03 19:00:23 +00:00

49 lines
996 B
C

/*
* soundtool.h
* BoE
*
* Created by Celtic Minstrel on 16/04/09.
*
*/
#ifndef _SOUNDTOOL_H
#define _SOUNDTOOL_H
const int NUM_SOUNDS = 100;
typedef unsigned short snd_num_t;
void init_snd_tool();
void play_sound(short which, short how_many_times = 1);
void one_sound(short which);
#if defined(__APPLE__)
void clear_sound_memory();
void flip_sound();
extern Handle sound_handles[NUM_SOUNDS];
extern SndChannelPtr chan[4];
extern char numchannel;
extern char channel;
extern short snd_played[4];
#elif defined(WIN32)
#include <windows.h> // for HMODULE
void load_sounds (HMODULE handle);
void sound_pause(long len);
void kill_sound();
extern short can_ignore[100];
extern bool sounds_missing;
HGLOBAL sound_handles[NUM_SOUNDS];
char* snds[NUM_SOUNDS];
#else
#error Invalid platform
#endif
extern bool play_sounds;
extern short last_played;
extern bool always_async[100];
extern bool load_when_play[100];
extern short sound_delay[100];
extern short store_last_sound_played;
#endif