Trackplayer rewrite; fixes several obscure bugs; SpliceTrack() still a mess
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3228 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
Changes towards version 0.7:
|
Changes towards version 0.7:
|
||||||
|
- Trackplayer rewrite; fixed many bugs - Alex
|
||||||
- Source tree reorg: libs/ moved out of sc2code/, msvc++/ moved to
|
- Source tree reorg: libs/ moved out of sc2code/, msvc++/ moved to
|
||||||
build/msvc6/, src/sc2code/ renamed to src/uqm/ - Coredev
|
build/msvc6/, src/sc2code/ renamed to src/uqm/ - Coredev
|
||||||
- Druuge no longer turn hostile after attempting a salvage (bug #1013) - Alex
|
- Druuge no longer turn hostile after attempting a salvage (bug #1013) - Alex
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ PLRPlaySong (MUSIC_REF MusicRef, BOOLEAN Continuous, BYTE Priority)
|
|||||||
if (pmus)
|
if (pmus)
|
||||||
{
|
{
|
||||||
LockMutex (soundSource[MUSIC_SOURCE].stream_mutex);
|
LockMutex (soundSource[MUSIC_SOURCE].stream_mutex);
|
||||||
PlayStream ((*pmus), MUSIC_SOURCE, Continuous,
|
// Always scope the music data, we may need it
|
||||||
speechVolumeScale == 0.0f, true);
|
PlayStream ((*pmus), MUSIC_SOURCE, Continuous, true, true);
|
||||||
UnlockMutex (soundSource[MUSIC_SOURCE].stream_mutex);
|
UnlockMutex (soundSource[MUSIC_SOURCE].stream_mutex);
|
||||||
|
|
||||||
curMusicRef = MusicRef;
|
curMusicRef = MusicRef;
|
||||||
@@ -104,6 +104,7 @@ snd_PlaySpeech (MUSIC_REF SpeechRef)
|
|||||||
if (pmus)
|
if (pmus)
|
||||||
{
|
{
|
||||||
LockMutex (soundSource[SPEECH_SOURCE].stream_mutex);
|
LockMutex (soundSource[SPEECH_SOURCE].stream_mutex);
|
||||||
|
// Do not need to scope the music-as-speech as of now
|
||||||
PlayStream (*pmus, SPEECH_SOURCE, false, false, true);
|
PlayStream (*pmus, SPEECH_SOURCE, false, false, true);
|
||||||
UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex);
|
UnlockMutex (soundSource[SPEECH_SOURCE].stream_mutex);
|
||||||
|
|
||||||
|
|||||||
+29
-10
@@ -102,7 +102,10 @@ PlayStream (TFB_SoundSample *sample, uint32 source, bool looping, bool scope,
|
|||||||
soundSource[source].sbuf_size = pos + PAD_SCOPE_BYTES;
|
soundSource[source].sbuf_size = pos + PAD_SCOPE_BYTES;
|
||||||
soundSource[source].sbuf_start = pos;
|
soundSource[source].sbuf_start = pos;
|
||||||
soundSource[source].sbuf_lasttime = GetTimeCounter ();
|
soundSource[source].sbuf_lasttime = GetTimeCounter ();
|
||||||
soundSource[source].start_time = (sint32)GetTimeCounter () - offset;
|
// Adjust the start time so it looks like the stream has been playing
|
||||||
|
// from the very beginning
|
||||||
|
soundSource[source].start_time = GetTimeCounter () - offset;
|
||||||
|
soundSource[source].pause_time = 0;
|
||||||
soundSource[source].stream_should_be_playing = TRUE;
|
soundSource[source].stream_should_be_playing = TRUE;
|
||||||
audio_SourcePlay (soundSource[source].handle);
|
audio_SourcePlay (soundSource[source].handle);
|
||||||
}
|
}
|
||||||
@@ -110,6 +113,8 @@ PlayStream (TFB_SoundSample *sample, uint32 source, bool looping, bool scope,
|
|||||||
void
|
void
|
||||||
StopStream (uint32 source)
|
StopStream (uint32 source)
|
||||||
{
|
{
|
||||||
|
StopSource (source);
|
||||||
|
|
||||||
soundSource[source].stream_should_be_playing = FALSE;
|
soundSource[source].stream_should_be_playing = FALSE;
|
||||||
soundSource[source].sample = NULL;
|
soundSource[source].sample = NULL;
|
||||||
|
|
||||||
@@ -122,20 +127,28 @@ StopStream (uint32 source)
|
|||||||
soundSource[source].sbuf_start = 0;
|
soundSource[source].sbuf_start = 0;
|
||||||
soundSource[source].sbuf_size = 0;
|
soundSource[source].sbuf_size = 0;
|
||||||
soundSource[source].sbuf_offset = 0;
|
soundSource[source].sbuf_offset = 0;
|
||||||
|
soundSource[source].pause_time = 0;
|
||||||
StopSource (source);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PauseStream (uint32 source)
|
PauseStream (uint32 source)
|
||||||
{
|
{
|
||||||
soundSource[source].stream_should_be_playing = FALSE;
|
soundSource[source].stream_should_be_playing = FALSE;
|
||||||
|
if (!soundSource[source].pause_time)
|
||||||
|
soundSource[source].pause_time = GetTimeCounter ();
|
||||||
audio_SourcePause (soundSource[source].handle);
|
audio_SourcePause (soundSource[source].handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ResumeStream (uint32 source)
|
ResumeStream (uint32 source)
|
||||||
{
|
{
|
||||||
|
if (soundSource[source].pause_time)
|
||||||
|
{ // Adjust the start time so it looks like the stream has
|
||||||
|
// been playing all this time non-stop
|
||||||
|
soundSource[source].start_time += GetTimeCounter ()
|
||||||
|
- soundSource[source].pause_time;
|
||||||
|
}
|
||||||
|
soundSource[source].pause_time = 0;
|
||||||
soundSource[source].stream_should_be_playing = TRUE;
|
soundSource[source].stream_should_be_playing = TRUE;
|
||||||
audio_SourcePlay (soundSource[source].handle);
|
audio_SourcePlay (soundSource[source].handle);
|
||||||
}
|
}
|
||||||
@@ -504,29 +517,35 @@ GraphForegroundStream (uint8 *data, sint32 width, sint32 height)
|
|||||||
long energy;
|
long energy;
|
||||||
|
|
||||||
|
|
||||||
if (speechVolumeScale != 0.0f)
|
// Prefer speech to music
|
||||||
{ // Use speech waveform when speech is enabled
|
|
||||||
source_num = SPEECH_SOURCE;
|
source_num = SPEECH_SOURCE;
|
||||||
|
source = &soundSource[source_num];
|
||||||
|
LockMutex (source->stream_mutex);
|
||||||
|
if (speechVolumeScale != 0.0f && (!source->sample ||
|
||||||
|
!source->sample->decoder || !source->sample->decoder->is_null))
|
||||||
|
{ // Use speech waveform, since it's available
|
||||||
// Step is picked experimentally. Using step of 1 sample at 11025Hz,
|
// Step is picked experimentally. Using step of 1 sample at 11025Hz,
|
||||||
// because human speech is mostly in the low frequencies, and it looks
|
// because human speech is mostly in the low frequencies, and it looks
|
||||||
// better this way.
|
// better this way.
|
||||||
step = 1;
|
step = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (musicVolumeScale != 0.0f)
|
else if (musicVolumeScale != 0.0f)
|
||||||
{ // Use music waveform when speech is disabled
|
{ // We do not have speech -- use music waveform
|
||||||
|
UnlockMutex (source->stream_mutex);
|
||||||
source_num = MUSIC_SOURCE;
|
source_num = MUSIC_SOURCE;
|
||||||
|
source = &soundSource[source_num];
|
||||||
|
LockMutex (source->stream_mutex);
|
||||||
|
|
||||||
// Step is picked experimentally. Using step of 4 samples at 11025Hz.
|
// Step is picked experimentally. Using step of 4 samples at 11025Hz.
|
||||||
// It looks better this way.
|
// It looks better this way.
|
||||||
step = 4;
|
step = 4;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{ // We do not have anything usable
|
||||||
|
UnlockMutex (source->stream_mutex);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
source = &soundSource[source_num];
|
|
||||||
LockMutex (source->stream_mutex);
|
|
||||||
if (!PlayingStream (source_num) || !source->sample
|
if (!PlayingStream (source_num) || !source->sample
|
||||||
|| !source->sample->decoder || !source->sbuffer
|
|| !source->sample->decoder || !source->sbuffer
|
||||||
|| source->sbuf_size == 0)
|
|| source->sbuf_size == 0)
|
||||||
|
|||||||
@@ -17,28 +17,23 @@
|
|||||||
#ifndef TRACKINT_H
|
#ifndef TRACKINT_H
|
||||||
#define TRACKINT_H
|
#define TRACKINT_H
|
||||||
|
|
||||||
typedef struct tfb_soundchain
|
struct tfb_soundchunk
|
||||||
{
|
{
|
||||||
TFB_SoundDecoder *decoder; // points at the decoder to read from
|
TFB_SoundDecoder *decoder; // decoder for this chunk
|
||||||
float start_time;
|
float start_time; // relative time from track start
|
||||||
int tag_me;
|
int tag_me; // set for chunks with subtitles
|
||||||
uint32 track_num;
|
uint32 track_num; // logical track #, comm code needs this
|
||||||
UNICODE *text;
|
UNICODE *text; // subtitle text
|
||||||
TFB_TrackCB callback;
|
TFB_TrackCB callback; // comm callback, executed on chunk start
|
||||||
struct tfb_soundchain *next;
|
struct tfb_soundchunk *next;
|
||||||
} TFB_SoundChain;
|
};
|
||||||
|
|
||||||
typedef struct tfb_soundchaindata
|
typedef struct tfb_soundchunk TFB_SoundChunk;
|
||||||
{
|
|
||||||
TFB_SoundChain *read_chain_ptr; // points to chain read poistion
|
|
||||||
TFB_SoundChain *play_chain_ptr; // points to chain playing position
|
|
||||||
|
|
||||||
} TFB_SoundChainData;
|
TFB_SoundChunk *create_SoundChunk (TFB_SoundDecoder *decoder, float start_time);
|
||||||
|
void destroy_SoundChunk_list (TFB_SoundChunk *chain);
|
||||||
|
TFB_SoundChunk *find_next_page (TFB_SoundChunk *cur);
|
||||||
|
TFB_SoundChunk *find_prev_page (TFB_SoundChunk *cur);
|
||||||
|
|
||||||
extern TFB_SoundChain *chain_head;
|
|
||||||
|
|
||||||
TFB_SoundChain *create_soundchain (TFB_SoundDecoder *decoder, float startTime);
|
|
||||||
void destroy_soundchain (TFB_SoundChain *chain);
|
|
||||||
TFB_SoundChain *get_chain_previous (TFB_SoundChain *head, TFB_SoundChain *current);
|
|
||||||
|
|
||||||
#endif // TRACKINT_H
|
#endif // TRACKINT_H
|
||||||
|
|||||||
+410
-395
File diff suppressed because it is too large
Load Diff
@@ -21,22 +21,33 @@
|
|||||||
|
|
||||||
#include "libs/compiler.h"
|
#include "libs/compiler.h"
|
||||||
|
|
||||||
|
|
||||||
typedef void (*TFB_TrackCB) (void);
|
typedef void (*TFB_TrackCB) (void);
|
||||||
|
|
||||||
#define ACCEL_SCROLL_SPEED 300
|
#define ACCEL_SCROLL_SPEED 300
|
||||||
|
|
||||||
void ResumeTrack(void);
|
extern void PlayTrack (void);
|
||||||
void PauseTrack(void);
|
extern void StopTrack (void);
|
||||||
COUNT PlayingTrack(void);
|
extern void JumpTrack (void);
|
||||||
void JumpTrack(void);
|
extern void PauseTrack (void);
|
||||||
void FastForward_Smooth(void);
|
extern void ResumeTrack (void);
|
||||||
int FastForward_Page(void);
|
extern COUNT PlayingTrack (void);
|
||||||
void FastReverse_Smooth(void);
|
|
||||||
void FastReverse_Page(void);
|
extern void FastReverse_Smooth (void);
|
||||||
void StopTrack(void);
|
extern void FastForward_Smooth (void);
|
||||||
void SpliceTrack(UNICODE *filespec, UNICODE *textspec, UNICODE *TimeStamp, TFB_TrackCB cb);
|
extern void FastReverse_Page (void);
|
||||||
void SpliceMultiTrack (UNICODE *TrackNames[], UNICODE *TrackText);
|
extern void FastForward_Page (void);
|
||||||
int GetSoundInfo (int max_len);
|
|
||||||
|
extern void SpliceTrack (UNICODE *filespec, UNICODE *textspec, UNICODE *TimeStamp, TFB_TrackCB cb);
|
||||||
|
extern void SpliceMultiTrack (UNICODE *TrackNames[], UNICODE *TrackText);
|
||||||
|
|
||||||
|
extern int GetTrackPosition (int in_units);
|
||||||
|
|
||||||
|
typedef struct tfb_soundchunk *SUBTITLE_REF;
|
||||||
|
|
||||||
|
extern SUBTITLE_REF GetFirstTrackSubtitle (void);
|
||||||
|
extern SUBTITLE_REF GetNextTrackSubtitle (SUBTITLE_REF LastRef);
|
||||||
|
extern const UNICODE *GetTrackSubtitleText (SUBTITLE_REF SubRef);
|
||||||
|
|
||||||
|
extern const UNICODE *GetTrackSubtitle (void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+4
-2
@@ -507,6 +507,7 @@ BOOLEAN
|
|||||||
loadAddon (const char *addon)
|
loadAddon (const char *addon)
|
||||||
{
|
{
|
||||||
uio_DirHandle *addonsDir, *addonDir;
|
uio_DirHandle *addonsDir, *addonDir;
|
||||||
|
int numLoaded;
|
||||||
|
|
||||||
addonsDir = uio_openDirRelative (contentDir, "addons", 0);
|
addonsDir = uio_openDirRelative (contentDir, "addons", 0);
|
||||||
if (addonsDir == NULL)
|
if (addonsDir == NULL)
|
||||||
@@ -525,11 +526,12 @@ loadAddon (const char *addon)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
loadIndices (addonDir);
|
numLoaded = loadIndices (addonDir);
|
||||||
|
|
||||||
uio_closeDir (addonDir);
|
uio_closeDir (addonDir);
|
||||||
uio_closeDir (addonsDir);
|
uio_closeDir (addonsDir);
|
||||||
return TRUE;
|
|
||||||
|
return (numLoaded > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
+112
-130
@@ -38,7 +38,7 @@
|
|||||||
#include "libs/graphics/gfx_common.h"
|
#include "libs/graphics/gfx_common.h"
|
||||||
#include "libs/inplib.h"
|
#include "libs/inplib.h"
|
||||||
#include "libs/sound/sound.h"
|
#include "libs/sound/sound.h"
|
||||||
#include "libs/sound/trackint.h"
|
#include "libs/sound/trackplayer.h"
|
||||||
#include "libs/log.h"
|
#include "libs/log.h"
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@@ -76,14 +76,18 @@ typedef struct encounter_state
|
|||||||
} ENCOUNTER_STATE;
|
} ENCOUNTER_STATE;
|
||||||
|
|
||||||
static ENCOUNTER_STATE *pCurInputState;
|
static ENCOUNTER_STATE *pCurInputState;
|
||||||
static SUBTITLE_STATE subtitle_state = DONE_SUBTITLE;
|
|
||||||
static Mutex subtitle_mutex;
|
|
||||||
|
|
||||||
TEXT SubtitleText;
|
// Mutex guards accesses to SubtitleText, last_subtitle and clear_subtitles.
|
||||||
|
static Mutex subtitle_mutex;
|
||||||
|
// These vars are indirectly accessed by the ambient_anim_task
|
||||||
|
static volatile BOOLEAN clear_subtitles;
|
||||||
|
static TEXT SubtitleText;
|
||||||
static const UNICODE * volatile last_subtitle;
|
static const UNICODE * volatile last_subtitle;
|
||||||
|
|
||||||
CONTEXT TextCacheContext;
|
static CONTEXT TextCacheContext;
|
||||||
FRAME TextCacheFrame;
|
static FRAME TextCacheFrame;
|
||||||
|
|
||||||
|
volatile BOOLEAN ClearSummary;
|
||||||
|
|
||||||
RECT CommWndRect = {
|
RECT CommWndRect = {
|
||||||
// default values; actually inited by HailAlien()
|
// default values; actually inited by HailAlien()
|
||||||
@@ -91,6 +95,10 @@ RECT CommWndRect = {
|
|||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void ClearSubtitles (void);
|
||||||
|
static void CheckSubtitles (void);
|
||||||
|
|
||||||
|
|
||||||
/* _count_lines - sees how many lines a given input string would take to
|
/* _count_lines - sees how many lines a given input string would take to
|
||||||
* display given the line wrapping information
|
* display given the line wrapping information
|
||||||
*/
|
*/
|
||||||
@@ -432,9 +440,6 @@ uninit_communication (void)
|
|||||||
DestroyMutex (subtitle_mutex);
|
DestroyMutex (subtitle_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
volatile BOOLEAN ClearSummary;
|
|
||||||
static volatile BOOLEAN ClearSubtitle;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
RefreshResponses (ENCOUNTER_STATE *pES)
|
RefreshResponses (ENCOUNTER_STATE *pES)
|
||||||
{
|
{
|
||||||
@@ -488,8 +493,6 @@ RefreshResponses (ENCOUNTER_STATE *pES)
|
|||||||
static void
|
static void
|
||||||
FeedbackPlayerPhrase (UNICODE *pStr)
|
FeedbackPlayerPhrase (UNICODE *pStr)
|
||||||
{
|
{
|
||||||
last_subtitle = NULL;
|
|
||||||
|
|
||||||
SetContext (SpaceContext);
|
SetContext (SpaceContext);
|
||||||
|
|
||||||
BatchGraphics ();
|
BatchGraphics ();
|
||||||
@@ -551,52 +554,54 @@ SpewPhrases (COUNT wait_track)
|
|||||||
DWORD TimeIn;
|
DWORD TimeIn;
|
||||||
COUNT which_track;
|
COUNT which_track;
|
||||||
FRAME F;
|
FRAME F;
|
||||||
BOOLEAN passed = TRUE;
|
BOOLEAN rewind = FALSE;
|
||||||
|
|
||||||
TimeIn = GetTimeCounter ();
|
TimeIn = GetTimeCounter ();
|
||||||
|
|
||||||
ContinuityBreak = FALSE;
|
ContinuityBreak = FALSE;
|
||||||
F = CommData.AlienFrame;
|
F = CommData.AlienFrame;
|
||||||
if (wait_track == 0)
|
if (wait_track == 0)
|
||||||
{
|
{ // Restarting with a rewind
|
||||||
wait_track = (COUNT)~0;
|
wait_track = (COUNT)~0;
|
||||||
which_track = (COUNT)~0;
|
which_track = (COUNT)~0;
|
||||||
goto Rewind;
|
rewind = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
which_track = PlayingTrack ();
|
which_track = PlayingTrack ();
|
||||||
if (which_track == 0)
|
if (which_track == 0 && !rewind)
|
||||||
{
|
{
|
||||||
// initial start of player
|
// initial start of player
|
||||||
if (wait_track == 1 || wait_track == (COUNT)~0)
|
if (wait_track == 1 || wait_track == (COUNT)~0)
|
||||||
{
|
{
|
||||||
ResumeTrack ();
|
|
||||||
UnlockMutex (GraphicsLock);
|
UnlockMutex (GraphicsLock);
|
||||||
|
PlayTrack ();
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
TaskSwitch ();
|
TaskSwitch ();
|
||||||
LockMutex (GraphicsLock);
|
|
||||||
which_track = PlayingTrack ();
|
which_track = PlayingTrack ();
|
||||||
UnlockMutex (GraphicsLock);
|
|
||||||
} while (!which_track);
|
} while (!which_track);
|
||||||
LockMutex (GraphicsLock);
|
LockMutex (GraphicsLock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (which_track <= wait_track)
|
else if (which_track <= wait_track)
|
||||||
|
{ // XXX: I don't know why this is here, but it is not harmful.
|
||||||
|
// We never actually pause in comm.
|
||||||
ResumeTrack ();
|
ResumeTrack ();
|
||||||
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
BOOLEAN left = FALSE;
|
||||||
|
BOOLEAN right = FALSE;
|
||||||
|
|
||||||
if (GLOBAL (CurrentActivity) & CHECK_ABORT)
|
if (GLOBAL (CurrentActivity) & CHECK_ABORT)
|
||||||
|
{
|
||||||
|
which_track = 0; // abort
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
UnlockMutex (GraphicsLock);
|
UnlockMutex (GraphicsLock);
|
||||||
/* FIXME: is this a remnant of 128-tick clock?
|
// XXX: Executing this loop 64 times a second is a bit extreme
|
||||||
* with 120-tick clock this will sleep for 1 tick --
|
|
||||||
* for 1/120th of a second; if ONE_SECOND is upgraded
|
|
||||||
* it will probably sleep for 2/120th of a second.
|
|
||||||
* Might need to be fixed.
|
|
||||||
*/
|
|
||||||
SleepThreadUntil (TimeIn + (ONE_SECOND / 64));
|
SleepThreadUntil (TimeIn + (ONE_SECOND / 64));
|
||||||
TimeIn = GetTimeCounter ();
|
TimeIn = GetTimeCounter ();
|
||||||
#if DEMO_MODE || CREATE_JOURNAL
|
#if DEMO_MODE || CREATE_JOURNAL
|
||||||
@@ -608,17 +613,13 @@ SpewPhrases (COUNT wait_track)
|
|||||||
LockMutex (GraphicsLock);
|
LockMutex (GraphicsLock);
|
||||||
if (PulsedInputState.menu[KEY_MENU_CANCEL])
|
if (PulsedInputState.menu[KEY_MENU_CANCEL])
|
||||||
{
|
{
|
||||||
SetSliderImage (SetAbsFrameIndex (ActivityFrame, 8));
|
|
||||||
JumpTrack ();
|
JumpTrack ();
|
||||||
CommData.AlienFrame = F;
|
which_track = 0; // player stopped
|
||||||
do_subtitles ((void *)~0);
|
break;
|
||||||
return (FALSE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (which_track)
|
CheckSubtitles ();
|
||||||
{
|
|
||||||
BOOLEAN left = FALSE;
|
|
||||||
BOOLEAN right = FALSE;
|
|
||||||
if (optSmoothScroll == OPT_PC)
|
if (optSmoothScroll == OPT_PC)
|
||||||
{
|
{
|
||||||
left = PulsedInputState.menu[KEY_MENU_LEFT];
|
left = PulsedInputState.menu[KEY_MENU_LEFT];
|
||||||
@@ -629,58 +630,57 @@ SpewPhrases (COUNT wait_track)
|
|||||||
left = ImmediateInputState.menu[KEY_MENU_LEFT];
|
left = ImmediateInputState.menu[KEY_MENU_LEFT];
|
||||||
right = ImmediateInputState.menu[KEY_MENU_RIGHT];
|
right = ImmediateInputState.menu[KEY_MENU_RIGHT];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (right)
|
if (right)
|
||||||
{
|
{
|
||||||
SetSliderImage (SetAbsFrameIndex (ActivityFrame, 3));
|
SetSliderImage (SetAbsFrameIndex (ActivityFrame, 3));
|
||||||
if (optSmoothScroll == OPT_PC && !FastForward_Page ())
|
if (optSmoothScroll == OPT_PC)
|
||||||
{
|
FastForward_Page ();
|
||||||
SetSliderImage (SetAbsFrameIndex (ActivityFrame, 8));
|
|
||||||
JumpTrack ();
|
|
||||||
CommData.AlienFrame = F;
|
|
||||||
do_subtitles ((void *)~0);
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
else if (optSmoothScroll == OPT_3DO)
|
else if (optSmoothScroll == OPT_3DO)
|
||||||
FastForward_Smooth ();
|
FastForward_Smooth ();
|
||||||
ContinuityBreak = TRUE;
|
ContinuityBreak = TRUE;
|
||||||
|
// XXX: Ugly hack: This causes all animations (talking and ambient)
|
||||||
|
// in ambient_anim_task to stop progressing. I see no reason why
|
||||||
|
// the animations cannot continue while seeking. This hack has
|
||||||
|
// spawned a multitude of workarounds in the comm code, and IMHO
|
||||||
|
// should be removed.
|
||||||
CommData.AlienFrame = 0;
|
CommData.AlienFrame = 0;
|
||||||
}
|
}
|
||||||
else if (left)
|
else if (left || rewind)
|
||||||
{
|
{
|
||||||
Rewind:
|
rewind = FALSE;
|
||||||
SetSliderImage (SetAbsFrameIndex (ActivityFrame, 4));
|
SetSliderImage (SetAbsFrameIndex (ActivityFrame, 4));
|
||||||
if (optSmoothScroll == OPT_PC)
|
if (optSmoothScroll == OPT_PC)
|
||||||
FastReverse_Page ();
|
FastReverse_Page ();
|
||||||
else if (optSmoothScroll == OPT_3DO)
|
else if (optSmoothScroll == OPT_3DO)
|
||||||
FastReverse_Smooth ();
|
FastReverse_Smooth ();
|
||||||
ContinuityBreak = TRUE;
|
ContinuityBreak = TRUE;
|
||||||
|
// XXX: See ugly hack discussion above
|
||||||
CommData.AlienFrame = 0;
|
CommData.AlienFrame = 0;
|
||||||
}
|
}
|
||||||
else if (ContinuityBreak)
|
else if (ContinuityBreak)
|
||||||
{
|
{
|
||||||
|
// This is only done once the seeking is over (in the smooth
|
||||||
|
// scroll case, once the user releases the seek button)
|
||||||
|
ContinuityBreak = FALSE;
|
||||||
SetSliderImage (SetAbsFrameIndex (ActivityFrame, 2));
|
SetSliderImage (SetAbsFrameIndex (ActivityFrame, 2));
|
||||||
which_track = PlayingTrack ();
|
|
||||||
if (which_track && which_track <= wait_track)
|
|
||||||
{
|
|
||||||
if (optSmoothScroll == OPT_3DO)
|
|
||||||
ResumeTrack ();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{ // XXX: See ugly hack discussion above
|
||||||
ContinuityBreak = FALSE;
|
// Additionally, this used to have a buggy guard condition, which
|
||||||
passed = (which_track != 0);
|
// would cause the animations to remain paused in a couple cases
|
||||||
break;
|
// after seeking back to the beginning.
|
||||||
}
|
// Broken cases were: Syreen "several hours later" and Starbase
|
||||||
ContinuityBreak = FALSE;
|
// VUX Beast analysis by the scientist.
|
||||||
}
|
|
||||||
else if (which_track == wait_track || wait_track == (COUNT)~0)
|
|
||||||
CommData.AlienFrame = F;
|
CommData.AlienFrame = F;
|
||||||
}
|
}
|
||||||
} while (ContinuityBreak
|
|
||||||
|| ((which_track = PlayingTrack ()) && which_track <= wait_track));
|
which_track = PlayingTrack ();
|
||||||
|
|
||||||
|
} while (ContinuityBreak || (which_track && which_track <= wait_track));
|
||||||
|
|
||||||
CommData.AlienFrame = F;
|
CommData.AlienFrame = F;
|
||||||
do_subtitles ((void *)~0);
|
ClearSubtitles ();
|
||||||
|
|
||||||
if (!which_track || wait_track == (COUNT)~0)
|
if (!which_track || wait_track == (COUNT)~0)
|
||||||
{ // reached the end
|
{ // reached the end
|
||||||
@@ -688,7 +688,9 @@ Rewind:
|
|||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (passed);
|
// We can only get here when we got to the requested track
|
||||||
|
// without ending or aborting
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOLEAN
|
static BOOLEAN
|
||||||
@@ -848,7 +850,7 @@ typedef struct summary_state
|
|||||||
// extended state
|
// extended state
|
||||||
BOOLEAN Initialized;
|
BOOLEAN Initialized;
|
||||||
BOOLEAN PrintNext;
|
BOOLEAN PrintNext;
|
||||||
const TFB_SoundChain *NextSub;
|
SUBTITLE_REF NextSub;
|
||||||
const UNICODE *LeftOver;
|
const UNICODE *LeftOver;
|
||||||
|
|
||||||
} SUMMARY_STATE;
|
} SUMMARY_STATE;
|
||||||
@@ -863,7 +865,7 @@ DoConvSummary (SUMMARY_STATE *pSS)
|
|||||||
if (!pSS->Initialized)
|
if (!pSS->Initialized)
|
||||||
{
|
{
|
||||||
pSS->PrintNext = TRUE;
|
pSS->PrintNext = TRUE;
|
||||||
pSS->NextSub = chain_head;
|
pSS->NextSub = GetFirstTrackSubtitle ();
|
||||||
pSS->LeftOver = NULL;
|
pSS->LeftOver = NULL;
|
||||||
pSS->MenuRepeatDelay = 0;
|
pSS->MenuRepeatDelay = 0;
|
||||||
pSS->InputFunc = DoConvSummary;
|
pSS->InputFunc = DoConvSummary;
|
||||||
@@ -912,7 +914,7 @@ DoConvSummary (SUMMARY_STATE *pSS)
|
|||||||
oldFont = SetContextFont (TinyFont);
|
oldFont = SetContextFont (TinyFont);
|
||||||
|
|
||||||
for (row = 0; row < MAX_SUMM_ROWS && pSS->NextSub;
|
for (row = 0; row < MAX_SUMM_ROWS && pSS->NextSub;
|
||||||
++row, pSS->NextSub = pSS->NextSub->next)
|
++row, pSS->NextSub = GetNextTrackSubtitle (pSS->NextSub))
|
||||||
{
|
{
|
||||||
const unsigned char *next;
|
const unsigned char *next;
|
||||||
|
|
||||||
@@ -923,7 +925,7 @@ DoConvSummary (SUMMARY_STATE *pSS)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
t.pStr = pSS->NextSub->text;
|
t.pStr = GetTrackSubtitleText (pSS->NextSub);
|
||||||
if (!t.pStr)
|
if (!t.pStr)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -995,6 +997,7 @@ SelectResponse (ENCOUNTER_STATE *pES)
|
|||||||
LockMutex (GraphicsLock);
|
LockMutex (GraphicsLock);
|
||||||
FeedbackPlayerPhrase (pES->phrase_buf);
|
FeedbackPlayerPhrase (pES->phrase_buf);
|
||||||
StopTrack ();
|
StopTrack ();
|
||||||
|
ClearSubtitles ();
|
||||||
SetSliderImage (SetAbsFrameIndex (ActivityFrame, 2));
|
SetSliderImage (SetAbsFrameIndex (ActivityFrame, 2));
|
||||||
UnlockMutex (GraphicsLock);
|
UnlockMutex (GraphicsLock);
|
||||||
|
|
||||||
@@ -1181,7 +1184,7 @@ DoCommunication (ENCOUNTER_STATE *pES)
|
|||||||
UnlockMutex (GraphicsLock);
|
UnlockMutex (GraphicsLock);
|
||||||
|
|
||||||
FlushColorXForms ();
|
FlushColorXForms ();
|
||||||
ClearSubtitle = FALSE;
|
ClearSubtitles ();
|
||||||
|
|
||||||
StopMusic ();
|
StopMusic ();
|
||||||
StopSound ();
|
StopSound ();
|
||||||
@@ -1378,8 +1381,6 @@ InitCommunication (CONVERSATION which_comm)
|
|||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
last_subtitle = NULL;
|
|
||||||
|
|
||||||
LockMutex (GraphicsLock);
|
LockMutex (GraphicsLock);
|
||||||
|
|
||||||
if (LastActivity & CHECK_LOAD)
|
if (LastActivity & CHECK_LOAD)
|
||||||
@@ -1654,62 +1655,6 @@ RaceCommunication (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SUBTITLE_STATE
|
|
||||||
do_subtitles (UNICODE *pStr)
|
|
||||||
{
|
|
||||||
static UNICODE *last_page = NULL;
|
|
||||||
LockMutex (subtitle_mutex);
|
|
||||||
if (pStr == 0)
|
|
||||||
{
|
|
||||||
subtitle_state = DONE_SUBTITLE;
|
|
||||||
UnlockMutex (subtitle_mutex);
|
|
||||||
return (subtitle_state);
|
|
||||||
}
|
|
||||||
else if (pStr == (void *)~0)
|
|
||||||
{
|
|
||||||
subtitle_state = WAIT_SUBTITLE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (last_page == pStr)
|
|
||||||
{
|
|
||||||
UnlockMutex (subtitle_mutex);
|
|
||||||
return (subtitle_state);
|
|
||||||
}
|
|
||||||
subtitle_state = READ_SUBTITLE;
|
|
||||||
ClearSubtitle = TRUE;
|
|
||||||
}
|
|
||||||
last_page = pStr;
|
|
||||||
|
|
||||||
switch (subtitle_state)
|
|
||||||
{
|
|
||||||
case READ_SUBTITLE:
|
|
||||||
{
|
|
||||||
/* Baseline may be updated by the ZFP */
|
|
||||||
SubtitleText.baseline = CommData.AlienTextBaseline;
|
|
||||||
SubtitleText.align = CommData.AlienTextAlign;
|
|
||||||
SubtitleText.pStr = pStr;
|
|
||||||
SubtitleText.CharCount = (COUNT)~0;
|
|
||||||
subtitle_state = WAIT_SUBTITLE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case WAIT_SUBTITLE:
|
|
||||||
{
|
|
||||||
subtitle_state = DONE_SUBTITLE;
|
|
||||||
ClearSubtitle = TRUE;
|
|
||||||
}
|
|
||||||
case DONE_SUBTITLE:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
// Should not happen
|
|
||||||
assert(false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
UnlockMutex (subtitle_mutex);
|
|
||||||
|
|
||||||
return (subtitle_state);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
RedrawSubtitles (void)
|
RedrawSubtitles (void)
|
||||||
{
|
{
|
||||||
@@ -1718,23 +1663,60 @@ RedrawSubtitles (void)
|
|||||||
if (!optSubtitles)
|
if (!optSubtitles)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
LockMutex (subtitle_mutex);
|
||||||
|
if (SubtitleText.pStr)
|
||||||
|
{
|
||||||
t = SubtitleText;
|
t = SubtitleText;
|
||||||
add_text (1, &t);
|
add_text (1, &t);
|
||||||
|
}
|
||||||
|
UnlockMutex (subtitle_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets ClearSubtitle, returning the old value. The current subtitle state
|
// Returns clear_subtitles and resets it
|
||||||
// is also returned, through sub_state
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
SetClearSubtitle (BOOLEAN flag, SUBTITLE_STATE *sub_state)
|
HaveSubtitlesChanged (void)
|
||||||
{
|
{
|
||||||
BOOLEAN oldClearSubtitle;
|
BOOLEAN ret;
|
||||||
|
|
||||||
LockMutex (subtitle_mutex);
|
LockMutex (subtitle_mutex);
|
||||||
oldClearSubtitle = ClearSubtitle;
|
ret = clear_subtitles;
|
||||||
*sub_state = subtitle_state;
|
clear_subtitles = FALSE;
|
||||||
ClearSubtitle = flag;
|
|
||||||
UnlockMutex (subtitle_mutex);
|
UnlockMutex (subtitle_mutex);
|
||||||
|
|
||||||
return oldClearSubtitle;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
ClearSubtitles (void)
|
||||||
|
{
|
||||||
|
LockMutex (subtitle_mutex);
|
||||||
|
clear_subtitles = TRUE;
|
||||||
|
last_subtitle = NULL;
|
||||||
|
SubtitleText.pStr = NULL;
|
||||||
|
SubtitleText.CharCount = 0;
|
||||||
|
UnlockMutex (subtitle_mutex);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
CheckSubtitles (void)
|
||||||
|
{
|
||||||
|
const UNICODE *pStr;
|
||||||
|
|
||||||
|
pStr = GetTrackSubtitle ();
|
||||||
|
|
||||||
|
LockMutex (subtitle_mutex);
|
||||||
|
if (pStr != SubtitleText.pStr)
|
||||||
|
{ // Subtitles changed
|
||||||
|
clear_subtitles = TRUE;
|
||||||
|
// Baseline may be updated by the ZFP
|
||||||
|
SubtitleText.baseline = CommData.AlienTextBaseline;
|
||||||
|
SubtitleText.align = CommData.AlienTextAlign;
|
||||||
|
SubtitleText.pStr = pStr;
|
||||||
|
// may have been cleared too
|
||||||
|
if (pStr)
|
||||||
|
SubtitleText.CharCount = (COUNT)~0;
|
||||||
|
else
|
||||||
|
SubtitleText.CharCount = 0;
|
||||||
|
}
|
||||||
|
UnlockMutex (subtitle_mutex);
|
||||||
|
}
|
||||||
|
|||||||
+3
-14
@@ -21,16 +21,6 @@
|
|||||||
#include "libs/compiler.h"
|
#include "libs/compiler.h"
|
||||||
#include "libs/gfxlib.h"
|
#include "libs/gfxlib.h"
|
||||||
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
DONE_SUBTITLE,
|
|
||||||
NEXT_SUBTITLE,
|
|
||||||
READ_SUBTITLE,
|
|
||||||
SPACE_SUBTITLE,
|
|
||||||
WAIT_SUBTITLE,
|
|
||||||
} SUBTITLE_STATE;
|
|
||||||
|
|
||||||
#ifdef COMM_INTERNAL
|
#ifdef COMM_INTERNAL
|
||||||
|
|
||||||
#define SLIDER_Y 107
|
#define SLIDER_Y 107
|
||||||
@@ -38,8 +28,7 @@ typedef enum
|
|||||||
|
|
||||||
#include "commanim.h"
|
#include "commanim.h"
|
||||||
|
|
||||||
void DrawAlienFrame (FRAME aframe, SEQUENCE *pSeq);
|
extern void DrawAlienFrame (FRAME aframe, SEQUENCE *pSeq);
|
||||||
BOOLEAN SetClearSubtitle (BOOLEAN flag, SUBTITLE_STATE *sub_state);
|
|
||||||
|
|
||||||
extern LOCDATA CommData;
|
extern LOCDATA CommData;
|
||||||
extern volatile BOOLEAN ClearSummary;
|
extern volatile BOOLEAN ClearSummary;
|
||||||
@@ -48,11 +37,11 @@ extern volatile BOOLEAN ClearSummary;
|
|||||||
|
|
||||||
extern void init_communication (void);
|
extern void init_communication (void);
|
||||||
extern void uninit_communication (void);
|
extern void uninit_communication (void);
|
||||||
extern SUBTITLE_STATE do_subtitles (UNICODE *pStr);
|
|
||||||
extern void AlienTalkSegue (COUNT wait_track);
|
extern void AlienTalkSegue (COUNT wait_track);
|
||||||
BOOLEAN getLineWithinWidth(TEXT *pText, const unsigned char **startNext,
|
BOOLEAN getLineWithinWidth(TEXT *pText, const unsigned char **startNext,
|
||||||
SIZE maxWidth, COUNT maxChars);
|
SIZE maxWidth, COUNT maxChars);
|
||||||
void RedrawSubtitles (void);
|
extern void RedrawSubtitles (void);
|
||||||
|
extern BOOLEAN HaveSubtitlesChanged (void);
|
||||||
|
|
||||||
extern RECT CommWndRect; /* comm window rect */
|
extern RECT CommWndRect; /* comm window rect */
|
||||||
|
|
||||||
|
|||||||
+11
-11
@@ -454,15 +454,15 @@ ambient_anim_task (void *data)
|
|||||||
{
|
{
|
||||||
CONTEXT OldContext;
|
CONTEXT OldContext;
|
||||||
BOOLEAN CheckSub = FALSE;
|
BOOLEAN CheckSub = FALSE;
|
||||||
BOOLEAN ClearSub;
|
BOOLEAN SubtitleChange;
|
||||||
SUBTITLE_STATE sub_state;
|
|
||||||
|
|
||||||
ClearSub = SetClearSubtitle (FALSE, &sub_state);
|
// Clearing any active subtitles counts as 'change'
|
||||||
|
SubtitleChange = HaveSubtitlesChanged ();
|
||||||
|
|
||||||
OldContext = SetContext (TaskContext);
|
OldContext = SetContext (TaskContext);
|
||||||
|
|
||||||
if (ColorChange || ClearSummary)
|
if (ColorChange || ClearSummary)
|
||||||
{
|
{ // Redraw the whole comm screen
|
||||||
FRAME F;
|
FRAME F;
|
||||||
F = CommData.AlienFrame;
|
F = CommData.AlienFrame;
|
||||||
CommData.AlienFrame = CommFrame;
|
CommData.AlienFrame = CommFrame;
|
||||||
@@ -470,16 +470,16 @@ ambient_anim_task (void *data)
|
|||||||
&Sequencer[CommData.NumAnimations - 1]);
|
&Sequencer[CommData.NumAnimations - 1]);
|
||||||
CommData.AlienFrame = F;
|
CommData.AlienFrame = F;
|
||||||
CheckSub = TRUE;
|
CheckSub = TRUE;
|
||||||
ClearSub = ClearSummary;
|
SubtitleChange = ClearSummary;
|
||||||
ColorChange = FALSE;
|
ColorChange = FALSE;
|
||||||
ClearSummary = FALSE;
|
ClearSummary = FALSE;
|
||||||
}
|
}
|
||||||
if (Change || ClearSub)
|
if (Change || SubtitleChange)
|
||||||
{
|
{
|
||||||
STAMP s;
|
STAMP s;
|
||||||
s.origin.x = -SAFE_X;
|
s.origin.x = -SAFE_X;
|
||||||
s.origin.y = 0;
|
s.origin.y = 0;
|
||||||
if (ClearSub)
|
if (SubtitleChange)
|
||||||
{
|
{
|
||||||
s.frame = CommFrame;
|
s.frame = CommFrame;
|
||||||
DrawStamp (&s);
|
DrawStamp (&s);
|
||||||
@@ -487,14 +487,14 @@ ambient_anim_task (void *data)
|
|||||||
i = CommData.NumAnimations;
|
i = CommData.NumAnimations;
|
||||||
while (i--)
|
while (i--)
|
||||||
{
|
{
|
||||||
if (ClearSub || FrameChanged[i])
|
if (SubtitleChange || FrameChanged[i])
|
||||||
{
|
{
|
||||||
s.frame = AnimFrame[i];
|
s.frame = AnimFrame[i];
|
||||||
DrawStamp (&s);
|
DrawStamp (&s);
|
||||||
FrameChanged[i] = 0;
|
FrameChanged[i] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ClearSub && TransitionFrame)
|
if (SubtitleChange && TransitionFrame)
|
||||||
{
|
{
|
||||||
s.frame = TransitionFrame;
|
s.frame = TransitionFrame;
|
||||||
DrawStamp (&s);
|
DrawStamp (&s);
|
||||||
@@ -515,7 +515,7 @@ ambient_anim_task (void *data)
|
|||||||
CheckSub = TRUE;
|
CheckSub = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CheckSub && sub_state >= SPACE_SUBTITLE)
|
if (CheckSub)
|
||||||
RedrawSubtitles ();
|
RedrawSubtitles ();
|
||||||
|
|
||||||
SetContext (OldContext);
|
SetContext (OldContext);
|
||||||
@@ -534,7 +534,7 @@ ambient_anim_task (void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Task
|
Task
|
||||||
StartCommAnimTask(void)
|
StartCommAnimTask (void)
|
||||||
{
|
{
|
||||||
return AssignTask (ambient_anim_task, 3072, "ambient animations");
|
return AssignTask (ambient_anim_task, 3072, "ambient animations");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#include "controls.h"
|
#include "controls.h"
|
||||||
#include "commglue.h"
|
#include "commglue.h"
|
||||||
#include "comm.h"
|
|
||||||
#include "colors.h"
|
#include "colors.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "setup.h"
|
#include "setup.h"
|
||||||
@@ -180,11 +179,7 @@ DoConfirmExit (void)
|
|||||||
!(LastActivity & CHECK_RESTART))
|
!(LastActivity & CHECK_RESTART))
|
||||||
ResumeGameClock ();
|
ResumeGameClock ();
|
||||||
if (CommData.ConversationPhrases && PlayingTrack ())
|
if (CommData.ConversationPhrases && PlayingTrack ())
|
||||||
{
|
|
||||||
ResumeTrack ();
|
ResumeTrack ();
|
||||||
if (CommData.AlienTransitionDesc.AnimFlags & TALK_DONE)
|
|
||||||
do_subtitles ((void *)~0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ Slider (void)
|
|||||||
if (sliderDisabled)
|
if (sliderDisabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
offs = GetSoundInfo (sliderSpace);
|
offs = GetTrackPosition (sliderSpace);
|
||||||
if (offs != last_offs || sliderChanged)
|
if (offs != last_offs || sliderChanged)
|
||||||
{
|
{
|
||||||
sliderChanged = FALSE;
|
sliderChanged = FALSE;
|
||||||
|
|||||||
+4
-1
@@ -33,6 +33,7 @@
|
|||||||
#include "libs/uio.h"
|
#include "libs/uio.h"
|
||||||
#include "libs/file.h"
|
#include "libs/file.h"
|
||||||
#include "libs/graphics/gfx_common.h"
|
#include "libs/graphics/gfx_common.h"
|
||||||
|
#include "libs/sound/sound.h"
|
||||||
#include "libs/threadlib.h"
|
#include "libs/threadlib.h"
|
||||||
#include "libs/vidlib.h"
|
#include "libs/vidlib.h"
|
||||||
#include "libs/log.h"
|
#include "libs/log.h"
|
||||||
@@ -120,7 +121,9 @@ LoadKernel (int argc, char *argv[])
|
|||||||
loadAddon ("3domusic");
|
loadAddon ("3domusic");
|
||||||
}
|
}
|
||||||
|
|
||||||
loadAddon ("3dovoice"); /* Always try to use voice data */
|
/* Always try to use voice data */
|
||||||
|
if (!loadAddon ("3dovoice"))
|
||||||
|
speechVolumeScale = 0.0f; // XXX: need better no-speech indicator
|
||||||
|
|
||||||
if (optPrecursorsMusic)
|
if (optPrecursorsMusic)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "commglue.h"
|
#include "commglue.h"
|
||||||
#include "comm.h"
|
|
||||||
#include "controls.h"
|
#include "controls.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "setup.h"
|
#include "setup.h"
|
||||||
@@ -224,11 +223,7 @@ PauseGame (void)
|
|||||||
LOBYTE (GLOBAL (CurrentActivity)) != WON_LAST_BATTLE)
|
LOBYTE (GLOBAL (CurrentActivity)) != WON_LAST_BATTLE)
|
||||||
ResumeGameClock ();
|
ResumeGameClock ();
|
||||||
if (CommData.ConversationPhrases && PlayingTrack ())
|
if (CommData.ConversationPhrases && PlayingTrack ())
|
||||||
{
|
|
||||||
ResumeTrack ();
|
ResumeTrack ();
|
||||||
if (CommData.AlienTransitionDesc.AnimFlags & TALK_DONE)
|
|
||||||
do_subtitles ((void *)~0);
|
|
||||||
}
|
|
||||||
|
|
||||||
UnlockMutex (GraphicsLock);
|
UnlockMutex (GraphicsLock);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user