diff --git a/REDALERT/2KEYFRAM.CPP b/REDALERT/2KEYFRAM.CPP index bc6942b..1d9d511 100644 --- a/REDALERT/2KEYFRAM.CPP +++ b/REDALERT/2KEYFRAM.CPP @@ -53,7 +53,7 @@ typedef struct { short flags; } KeyFrameHeaderType; -#define INITIAL_BIG_SHAPE_BUFFER_SIZE 8000000 +#define INITIAL_BIG_SHAPE_BUFFER_SIZE (64 * 1024 * 1024) #define THEATER_BIG_SHAPE_BUFFER_SIZE 4000000 #define UNCOMPRESS_MAGIC_NUMBER 56789 @@ -62,7 +62,7 @@ unsigned TheaterShapeBufferLength = THEATER_BIG_SHAPE_BUFFER_SIZE; extern "C"{ char *BigShapeBufferStart = NULL; char *TheaterShapeBufferStart = NULL; - BOOL UseBigShapeBuffer = FALSE; + BOOL UseBigShapeBuffer = TRUE; bool IsTheaterShape = false; } #ifdef FIXIT_SCORE_CRASH diff --git a/REDALERT/AUDIO.CPP b/REDALERT/AUDIO.CPP index 1602c67..c6f4801 100644 --- a/REDALERT/AUDIO.CPP +++ b/REDALERT/AUDIO.CPP @@ -838,29 +838,3 @@ void Stop_Speaking(void) SpeakQueue = VOX_NONE; Stop_Sample_Playing(SpeechBuffer); } - - -/*********************************************************************************************** - * Is_Speaking -- Checks to see if the eva voice is still playing. * - * * - * Call this routine when the EVA voice being played needs to be checked. A typical use * - * of this would be when some action needs to be delayed until the voice has finished -- * - * say the end of the game. * - * * - * INPUT: none * - * * - * OUTPUT: bool; Is the EVA voice still playing? * - * * - * WARNINGS: none * - * * - * HISTORY: * - * 03/12/1995 JLB : Created. * - *=============================================================================================*/ -bool Is_Speaking(void) -{ - Speak_AI(); - if (!Debug_Quiet && SampleType != 0 && (SpeakQueue != VOX_NONE || Is_Sample_Playing(SpeechBuffer))) { - return(true); - } - return(false); -} diff --git a/REDALERT/AUDMIX.CPP b/REDALERT/AUDMIX.CPP index c3055b8..880c4f3 100644 --- a/REDALERT/AUDMIX.CPP +++ b/REDALERT/AUDMIX.CPP @@ -303,9 +303,10 @@ void AudMix_Init(void) { void PlayAudio(AudioBuffer_t& buffer, bool speech) { // Only one speech sound can play at once. if (speech) { - if (AudMix_IsSourcePlaying(SPEECH_AUDIO_SOURCE)) - return; + //if (AudMix_IsSourcePlaying(SPEECH_AUDIO_SOURCE)) + // return; + alSourceStop(audio_sources[SPEECH_AUDIO_SOURCE]); alSourcei(audio_sources[SPEECH_AUDIO_SOURCE], AL_BUFFER, buffer.buffer); alSourcePlay(audio_sources[SPEECH_AUDIO_SOURCE]); return; @@ -360,3 +361,26 @@ void On_Speech(int speech_index, HouseClass* house) // DLLExportClass::On_Speech(house, speech_index); //} } + + +/*********************************************************************************************** + * Is_Speaking -- Checks to see if the eva voice is still playing. * + * * + * Call this routine when the EVA voice being played needs to be checked. A typical use * + * of this would be when some action needs to be delayed until the voice has finished -- * + * say the end of the game. * + * * + * INPUT: none * + * * + * OUTPUT: bool; Is the EVA voice still playing? * + * * + * WARNINGS: none * + * * + * HISTORY: * + * 03/12/1995 JLB : Created. * + *=============================================================================================*/ +bool Is_Speaking(void) +{ + Speak_AI(); + return AudMix_IsSourcePlaying(SPEECH_AUDIO_SOURCE); +} diff --git a/REDALERT/GADGET.CPP b/REDALERT/GADGET.CPP index 1f2db0e..55842f6 100644 --- a/REDALERT/GADGET.CPP +++ b/REDALERT/GADGET.CPP @@ -566,6 +566,9 @@ KeyNumType GadgetClass::Input(void) flags = RIGHTRELEASE; } break; + case SDL_KEYDOWN: + Keyboard->Put_Element(event.key.keysym.sym); + break; } } // jmarshall end diff --git a/REDALERT/KEY.H b/REDALERT/KEY.H index 5f1ac73..ef1ed30 100644 --- a/REDALERT/KEY.H +++ b/REDALERT/KEY.H @@ -86,6 +86,7 @@ class WWKeyboardClass int MouseQX; int MouseQY; + bool Put_Element(unsigned short val); private: /* @@ -102,8 +103,7 @@ class WWKeyboardClass unsigned short Buff_Get(void); unsigned short Fetch_Element(void); - unsigned short Peek_Element(void) const; - bool Put_Element(unsigned short val); + unsigned short Peek_Element(void) const; bool Is_Buffer_Full(void) const; bool Is_Buffer_Empty(void) const; static bool Is_Mouse_Key(unsigned short key); @@ -120,7 +120,6 @@ class WWKeyboardClass int Tail; }; - #define VK_NONE 0x00 #define VK_LBUTTON 0x01 #define VK_RBUTTON 0x02 @@ -129,8 +128,8 @@ class WWKeyboardClass #define VK_NONE_05 0x05 #define VK_NONE_06 0x06 #define VK_NONE_07 0x07 -#define VK_BACK 0x08 -#define VK_TAB 0x09 +#define VK_BACK '\b' +#define VK_TAB '\t' #define VK_NONE_0A 0x0A #define VK_NONE_0B 0x0B #define VK_CLEAR 0x0C @@ -148,7 +147,7 @@ class WWKeyboardClass #define VK_NONE_18 0x18 #define VK_NONE_19 0x19 #define VK_NONE_1A 0x1A -#define VK_ESCAPE 0x1B +#define VK_ESCAPE '\033' #define VK_NONE_1C 0x1C #define VK_NONE_1D 0x1D #define VK_NONE_1E 0x1E @@ -192,7 +191,7 @@ class WWKeyboardClass #define VK_E 0x45 #define VK_F 0x46 #define VK_G 0x47 -#define VK_H 0x48 +#define VK_H 'h' #define VK_I 0x49 #define VK_J 0x4A #define VK_K 0x4B diff --git a/REDALERT/SIDEBAR.CPP b/REDALERT/SIDEBAR.CPP index 37e8435..2afe955 100644 --- a/REDALERT/SIDEBAR.CPP +++ b/REDALERT/SIDEBAR.CPP @@ -1340,6 +1340,11 @@ void SidebarClass::StripClass::Reload_LogoShapes(void) if(PlayerPtr) { houseloaded = PlayerPtr->ActLike; } +// jmarshall + if (houseloaded >= HOUSE_BAD) + return; +// jmarshall end + LogoShapes = (void*)MFCD::Retrieve(stripnames[houseloaded]); } diff --git a/REDALERT/WIN32LIB/KEYBOARD.H b/REDALERT/WIN32LIB/KEYBOARD.H index 38f7241..1be5316 100644 --- a/REDALERT/WIN32LIB/KEYBOARD.H +++ b/REDALERT/WIN32LIB/KEYBOARD.H @@ -111,7 +111,7 @@ class WWKeyboardClass long Tail; // the tail position in keyboard buffer int MState; int Conditional; - HANDLE CurrentCursor; + HANDLE CurrentCursor; };