*Finished cleaning the Win32 code so that the game compiles again.
*Fixed the SDF[0][0] being set to 1 when killing wandering or summoned monsters. Chokboyz git-svn-id: http://openexile.googlecode.com/svn/trunk@132 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
#include <windows.h>
|
||||
#include <cstring>
|
||||
#include "global.h"
|
||||
#include "boe.graphutil.h"
|
||||
#include "../global.h"
|
||||
#include "../boe.graphutil.h"
|
||||
#include <cstdio>
|
||||
#include "exlsound.h"
|
||||
#include "soundtool.h"
|
||||
#include "dlogtool.h"
|
||||
#include "boe.text.h"
|
||||
#include "boe.locutils.h"
|
||||
#include "boe.dlgutil.h"
|
||||
#include "boe.infodlg.h"
|
||||
#include "../boe.text.h"
|
||||
#include "../boe.locutils.h"
|
||||
#include "../boe.dlgutil.h"
|
||||
#include "../boe.infodlg.h"
|
||||
|
||||
#include "globvar.h"
|
||||
#include "../globvar.h"
|
||||
|
||||
/*
|
||||
struct Dialog
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#ifndef _DLOGTOOL_H
|
||||
#define _DLOGTOOL_H
|
||||
|
||||
#include "globvar.h"
|
||||
#include "../globvar.h"
|
||||
//#include "boe.graphutil.h"
|
||||
|
||||
void cd_set_flag(short dlog_num,short item_num,short flag);
|
||||
|
@@ -17,8 +17,8 @@ using std::abs;
|
||||
#undef min
|
||||
#endif
|
||||
|
||||
short get_ran (short times,short min,short max);
|
||||
short s_pow(short x,short y);
|
||||
extern short get_ran (short times,short min,short max);
|
||||
extern short s_pow(short x,short y);
|
||||
short s_sqrt(short val);
|
||||
short max(short a,short b);
|
||||
short min(short a,short b);
|
||||
|
@@ -17,6 +17,14 @@
|
||||
#include <cstdio>
|
||||
|
||||
#include "soundtool.h"
|
||||
#include "../classes/consts.h"
|
||||
#include "../globvar.h"
|
||||
#include "../boe.text.h"
|
||||
|
||||
char* snds[NUM_SOUNDS];
|
||||
#if defined(WIN32)
|
||||
HGLOBAL sound_handles[NUM_SOUNDS];
|
||||
#endif
|
||||
|
||||
bool sound_going(short which_s) {
|
||||
short i;
|
||||
@@ -156,7 +164,7 @@ void play_sound(short which, short how_many_times) { // if < 0, play asynch
|
||||
if (which >= 100)
|
||||
return;
|
||||
|
||||
if ((always_async[which] == true) &&
|
||||
if ((always_asynch[which] == true) &&
|
||||
((can_ignore[which] == 1) || (can_ignore[which] >= 3)))
|
||||
asyn = true;
|
||||
if ((can_ignore[which] > 0) && (can_ignore[which] < 5) && (party.stuff_done[305][5] == 1))
|
||||
@@ -348,4 +356,44 @@ void load_sounds(HMODULE handle)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void move_sound(unsigned char ter,short step)
|
||||
{
|
||||
short spec;
|
||||
|
||||
spec = scenario.ter_types[ter].special;
|
||||
|
||||
if ((monsters_going == false) && (overall_mode < 10) && (party.in_boat >= 0)) {
|
||||
if (spec == 21)
|
||||
return;
|
||||
play_sound(48);
|
||||
}
|
||||
else if ((monsters_going == false) && (overall_mode < 10) && (party.in_horse >= 0)) {////
|
||||
play_sound(85);
|
||||
}
|
||||
else if(spec == 5) //if poisoned land don't play squish sound : BoE legacy behavior, can be removed safely
|
||||
return;
|
||||
// else if(spec == 6) //if diseased land do the same
|
||||
// return;
|
||||
else switch(scenario.ter_types[ter].step_sound){
|
||||
case 0:
|
||||
if (step % 2 == 0) //footsteps alternate sound
|
||||
play_sound(49);
|
||||
else play_sound(50);
|
||||
break;
|
||||
case 1:
|
||||
play_sound(55); //squish
|
||||
break;
|
||||
case 2:
|
||||
play_sound(47); //crunch
|
||||
break;
|
||||
case 3:
|
||||
break; //silence : do nothing
|
||||
default:
|
||||
if (step % 2 == 0) //safety footsteps valve
|
||||
play_sound(49);
|
||||
else play_sound(50);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -8,7 +8,8 @@
|
||||
|
||||
#ifndef _SOUNDTOOL_H
|
||||
#define _SOUNDTOOL_H
|
||||
const int NUM_SOUNDS = 100;
|
||||
|
||||
#define NUM_SOUNDS 100
|
||||
|
||||
typedef unsigned short snd_num_t;
|
||||
void init_snd_tool();
|
||||
@@ -32,8 +33,8 @@ void kill_sound();
|
||||
extern HMODULE hModule;
|
||||
extern short can_ignore[100];
|
||||
extern bool sounds_missing;
|
||||
HGLOBAL sound_handles[NUM_SOUNDS];
|
||||
char* snds[NUM_SOUNDS];
|
||||
extern HGLOBAL sound_handles[NUM_SOUNDS];
|
||||
extern char* snds[NUM_SOUNDS];
|
||||
#else
|
||||
#error Invalid platform
|
||||
#endif
|
||||
@@ -41,9 +42,11 @@ char* snds[NUM_SOUNDS];
|
||||
extern short snd_played[4];
|
||||
extern bool play_sounds;
|
||||
extern short last_played;
|
||||
extern bool always_async[100];
|
||||
extern bool always_asynch[100];
|
||||
extern bool load_when_play[100];
|
||||
extern short sound_delay[100];
|
||||
extern short store_last_sound_played;
|
||||
|
||||
void move_sound(unsigned char ter,short step);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user