From 09128132c712d183875f62290f4683b1d3342791 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 27 Oct 2013 23:12:25 +0100 Subject: TSAGE: Fix CID 1003781, 1002422, 1003171 --- engines/tsage/blue_force/blueforce_logic.cpp | 7 +++++-- engines/tsage/blue_force/blueforce_scenes0.cpp | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp index 63f84d25e1..867bd4d7ae 100644 --- a/engines/tsage/blue_force/blueforce_logic.cpp +++ b/engines/tsage/blue_force/blueforce_logic.cpp @@ -454,9 +454,10 @@ void Timer::dispatch() { if (_endFrame) { uint32 frameNumber = BF_GLOBALS._events.getFrameNumber(); - if (frameNumber > _endFrame) + if (frameNumber > _endFrame) { // Timer has expired signal(); + } } } @@ -472,7 +473,8 @@ void Timer::set(uint32 delay, EventHandler *endHandler) { /*--------------------------------------------------------------------------*/ TimerExt::TimerExt(): Timer() { - _action = NULL; + _action = nullptr; + _newAction = nullptr; } void TimerExt::set(uint32 delay, EventHandler *endHandler, Action *newAction) { @@ -909,6 +911,7 @@ void PalettedScene::add2Faders(const byte *arrBufferRGB, int step, int paletteNu void PalettedScene::transition(const byte *arrBufferRGB, int percent, int paletteNum, Action *action, int fromColor1, int fromColor2, int toColor1, int toColor2, bool flag) { byte tmpPalette[768]; + memset(tmpPalette, 0, 768); _palette.loadPalette(paletteNum); _palette.loadPalette(2); diff --git a/engines/tsage/blue_force/blueforce_scenes0.cpp b/engines/tsage/blue_force/blueforce_scenes0.cpp index 478504308d..7c52d67f80 100644 --- a/engines/tsage/blue_force/blueforce_scenes0.cpp +++ b/engines/tsage/blue_force/blueforce_scenes0.cpp @@ -419,6 +419,8 @@ void Scene50::postInit(SceneObjectList *OwnerList) { tooltip = &_location8; xp = 75; break; + default: + error("Unexpected tooltip value %d", selectedTooltip); } _timer.set(240, this); -- cgit v1.2.3