Files
oboe/Blades of Exile/tools/soundvars.cpp
Chokboyz 821d7609a2 Classic Blades of Exile :
- Various aesthetics fixes (no more buttons cut in half, justified some buttons, etc)
- Clicking the help icon next to the (unused) job button now correctly displays help.
- Redid the implementation of the (new) "check statistic node" (replaces "has enough mage lore") to prevent potential compatibility breaking with legacy scenarios.
- Small change to the (new) "Set town status" (replaces "Make Town Hostile") for the same reason.
- To clarify, renamed the "Dispel spirit" item ability to "Ravage spirit" (as it is, in fact, the spell called by the ability).
- For the same reason, renamed the monster spell "Heal All" to "Full Heal", as it isn't a mass spell but a powerful (and reliable) self-healing spell for monsters.
- Aligned the sleep immunity on the mac version : Slimes (regardless of the monster number), Stone and Undead types monsters are immuned to sleep.
- Dart throwing now only takes 2 ap for monsters (corrected from invisibility ability).
- Field generating monsters are now immuned to the type of field they generate (corrected from an Exile 3 incomplete transition).
- Rewrote the pending special queue for better events handling (no more potential overflow, entering/exiting town events are now sure to happens)
- Implemented the "No Terrain Animation" option.
- Un/Equipping something while in combat now correctly updates the ap display.
- MOnsters missile abilities now show their correct damage range in description (game and editor).
- Bashing weapons charges (if any) are now correctly shown (as usual, next to the name).

Codewise :

- The game shouldn't check if the item to be equipped is food anymore.
- Replaced lots of number checks by "human-readable" constants (some new).
- Removed some false checks about awaken spell supposed to work as dispel field.
- Fleeing and winning an outdoor battle now call the run_special function with the correct parameter (was reversed, with no consequences, since it's never checked)
- AI doesn't check the monster number, when deciding if the monster should cast a mage spell, anymore.

Chokboyz

git-svn-id: http://openexile.googlecode.com/svn/trunk@159 4ebdad44-0ea0-11de-aab3-ff745001d230
2010-11-26 21:27:18 +00:00

131 lines
3.8 KiB
C++

#ifdef __APPLE__
#include <Carbon/Carbon.h>
Handle sound_handles[NUM_SOUNDS];
#else
#include <windows.h>
#endif
bool play_sounds = true;
short last_played = 10000;
short store_last_sound_played = 0;
#ifdef __APPLE__ // TODO: should go over these to decide how to merge them
bool always_asynch[100] = {
false,false,false,false,false,
false,true,false,false,false,
false,false,false,false,false, // 10
false,false,false,false,false,
false,false,false,false,true, // 20
true,false,false,false,false,
false,false,false,false,true, // 30
false,false,true,false,true,
false,true,true,true,true, // 40
true,true,true,true,true,
true,false,false,false,false, // 50
true,false,false,false,false,
false,true,false,false,false, // 60
false,false,false,false,false,
false,false,false,false,false, // 70
false,true,true,true,true,
true,true,true,true,false, // 80
true,false,false,false,false,
false,true,false,false,false, // 90
false,false,false,false,false
};
bool load_when_play[100] = {
0,0,1,1,1,1,0,1,1,1,
0,0,0,1,0,1,1,1,1,1,
1,1,1,1,1,1,1,0,1,1,
1,1,1,1,0,1,1,0,1,1,
1,1,1,1,1,1,1,0,0,0,
0,1,1,1,1,0,1,1,1,1,
1,0,1,1,1,1,1,1,1,0,
0,0,0,0,0,0,1,1,1,1,
1,1,1,1,1,0,0,0,0,0,
1,1,1,1,1,1,1,1,1,0
};
#else
bool always_asynch[100] = {
false,false,false,false,false,
true,true,false,false,false,
true,false,false,false,false, // 10
false,false,false,false,false,
false,false,true,false,true, // 20
true,false,false,false,false,
false,false,false,false,true, // 30
false,false,true,false,true,
false,true,true,true,true, // 40
true,true,true,true,true,
true,false,false,true,false, // 50
true,false,false,false,false,
false,true,false,false,false, // 60
false,false,false,false,false,
false,false,false,false,false, // 70
false,true,true,true,true,
true,true,true,true,false, // 80
true,false,false,false,false,
false,true,false,false,false, // 90
false,false,false,false,false};
bool load_when_play[100] = {
0,0,1,1,1,0,0,1,1,1,
0,0,0,1,0,1,1,1,1,1,
1,1,0,1,1,1,1,0,1,1,
1,1,1,1,0,1,1,0,1,1,
1,1,1,1,1,1,1,0,0,0,
0,1,1,0,1,0,1,1,1,1, // 50
1,0,1,1,1,1,1,1,1,0,
0,0,0,0,0,0,0,0,0,0, // 70
1,1,1,1,1,0,0,0,0,0,
1,0,1,1,1,1,1,1,1,0
};
#endif
short sound_delay[100] = {
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,25,25,0,0,0,0,
0,0,0,0,8,0,0,8,0,0,
0,0,0,10,20,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,13,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0
};
bool sounds_missing = false;
short can_ignore[100] = {
0,0,0,0,0,5,3,0,0,0,
5,5,5,0,5,0,0,0,0,0,
0,0,5,0,0,0,0,0,0,2,
2,2,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,1,1,
1,0,0,5,0,1,0,0,0,0, // 50
0,0,0,0,5,0,0,0,0,0,
0,0,0,0,0, 0,5,5,5,5, // 70
4,4,4,4,0,0,0,0,0,0,
0,5,5,0,0,0,0,0,0,0
}; // currently windows-only?
// 1 - polite asych, 1 or 2 or 3- lose easily when pref is set for fewer snds
// 3 can be async
// 4 - nostop asynch ... when 4, this sound is NOSTOP, i.e. when played, is played
// asynch, and refuses all other sounds. Sounds that come in are ignored, and
// disappear into the ether
// 5 - finally, bold asynch ... when 5, this sound is NOSTOP, i.e. when played, is played
// asynch, and refuses all other sounds. When a sound is played on top of this, game
// hangs on until sound is done, and then and only then plays later sound.
//Allocate SndChannelPtr chan[4] as a global variable.
//Allocate char numchannel = 3; (This gives 4 channels, = 2 gives 3 etc...
//Allocate char channel; This is just used as a counter so each sound is played by the next
//channel in line. You can have up to 4 sounds playing at once.
#ifdef __APPLE__
SndChannelPtr chan[4];
char numchannel = 3;
char channel;
#else
HMODULE hModule;
#endif
short snd_played[4] = {-1,-1,-1,-1};