Commit Graph
671 Commits
Author SHA1 Message Date
Torbjörn Andersson 1e23d43006 SCUMM: Silence GCC memset() warnings
Recent GCC versions complain if you memset() a class or struct that
contain non-POD data types. Get around that by either initializing
the object when created, or by adding a reset() method.
2019-07-14 14:58:19 +03:00
Filippos Karapetis 174721e911 SCUMM: Fix MSVC warnings
- Change float suffix to uppercase
- Initialize potentially uninitialized variables
- Fix default cases in switch statements
2019-05-27 14:53:42 +03:00
Eugene Sandulenko eac0b16750 SCUMM: HE: Added some names to basketball U32 commands 2019-05-25 20:54:56 +02:00
Cameron Cawley 8c2b09d919 COMMON: Replace NEResourceType and PEResourceType with a shared enum 2019-05-01 23:52:56 +03:00
Zhiqi Yin efa9717c69 SCUMM HE: Bug fix for moonbase stack memory corruption
What:
The bug is reproducible in the following ways:
1. quiting the game
2. enter challenge mode state 2, when the game starts move mouse around
the menu buttons (choose building or weapons)
Observed behavior: In he/wiz_he.cpp:2839, the function failed to return since
the stack around variable 'color' was corrupted. The game will crash then.

Analysis:
Since other function will modify memory area around local variable 'color',
the bug shoud be caused by memory overwritten. The memory write happens
in this modified file. From the code, it only wants to write a certain amount
of pixels. So I found 2 places where more pixels are written. This causes
stack memory corruption.

Fix:
Add checking. If we have written enough pixels then break.

Testing:
The game UI looks correct. Single player mode game is tested.
Bug no longer observable. Tested for both cases mentioned above.
2019-03-12 00:25:25 +01:00
Adrian Frühwirth 9bee9e1ba6 JANITORIAL: Fix whitespace 2018-04-19 12:08:31 +02:00
nukeykt e5bfead345 SCUMM HE: Use Miles AdLib driver 2018-02-04 12:56:06 +01:00
Colin Snover 2e061d95c5 COMMON: Move VER macro for serializer into common code 2018-01-31 17:58:01 +01:00
Colin Snover 9916b26383 SCUMM: Replace UB-triggering serialization code with Common::Serializer
Fixes Trac#10342.
2018-01-31 17:58:01 +01:00
Colin Snover 9a36870e78 SCUMM HE: Fix UB shifting negative integers 2017-12-01 19:22:19 -06:00
Eugene Sandulenko b840320c5b SCUMM: Moonbase: Mark original bug as fall through to silence GCC 7 warning 2017-08-11 20:53:21 +02:00
Torbjörn Andersson e17fa6216b SCUMM HE: Silence GCC indentation warning 2016-12-06 21:01:06 +01:00
Eugene Sandulenko 83c74d68a1 SCUMM HE: Fix crash in Moonbase distrotion 2016-11-27 14:02:52 +01:00
Eugene Sandulenko a9566997aa SCUMM HE: More class initializations 2016-11-27 14:02:52 +01:00
Eugene Sandulenko 2fd5490de4 SCUMM HE: Fix Football logic initialization 2016-11-24 11:34:13 +01:00
Eugene Sandulenko cce8885b39 SCUMM HE: Hid noisy Moonbase AI warnings under debug channel 2016-11-20 23:38:33 +01:00
Eugene Sandulenko dead4aa014 JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
Ori Avtalion 70ff8d6232 SCUMM HE: Constify string parameter 2016-09-03 11:45:43 +03:00
Eugene Sandulenko d4f9c0e361 Merge pull request #821 from BenCastricum/bugfixes
SCUMM: Bugfixes
2016-09-02 23:38:39 +02:00
Alexander Tkachev dd68bf0f18 SCUMM HE: Add remote scripts-related kludges
Those are the last ones. Now Net stubs must be handled.
2016-08-30 23:26:29 +02:00
Alexander Tkachev 45947f6ccc SCUMM HE: Add init-related kludges 2016-08-30 23:26:29 +02:00
Alexander Tkachev 5d9a3e17b2 SCUMM HE: Add provider-related kludges 2016-08-30 23:26:29 +02:00
Alexander Tkachev e33c401f78 SCUMM HE: Add session quering-related kludges 2016-08-30 23:26:29 +02:00
Alexander Tkachev e70522e506 SCUMM HE: Add session-related kludges 2016-08-30 23:26:29 +02:00
Alexander Tkachev c997612bfc SCUMM HE: Add a few more logic kludges 2016-08-30 23:26:29 +02:00
Alexander Tkachev 0f82e2acdc SCUMM HE: Add two more kludges 2016-08-30 23:26:29 +02:00
Alexander Tkachev da35b451d6 SCUMM HE: Add more LogicHEmoonbase kludges
Less stubs there, more stubs in Net.
2016-08-30 23:26:29 +02:00
Alexander Tkachev 0ffca9c03a SCUMM HE: Fix some variable naming 2016-08-30 23:26:29 +02:00
Alexander Tkachev 9de6746814 SCUMM HE: Replace strcpy with strlcpy in array setup
setupStringArrayFromString() now uses Common::strlcpy().
2016-08-30 23:26:29 +02:00
Alexander Tkachev 3c64e4958d SCUMM HE: Add some Moonbase logic
Logic for getting host name and IP from name. Net gets more stubs.
2016-08-30 23:26:29 +02:00
Alexander Tkachev 6cfcf1f179 HE: Add setupStringArrayFromString()
It's based on PUI_ScummStringArrayFromCString(), which is used as
SPUTM_ScummStringArrayFromCString() in Moonbase networking code.
2016-08-30 23:26:29 +02:00
Alexander Tkachev 75c48fd195 HE: Replacing some Logic stubs with Net stubs
Slowly moving kludge switch case contents into ScummVM Logic methods and
thus adding more Net stubs.
2016-08-30 23:26:29 +02:00
Alexander Tkachev d7377c43ed HE: Add getStringFromArray()
It's ARRAY_GetStringFromArray(), which was used in Moonbase networking
code as SPUTM_CStringArrayFromScummString().
2016-08-30 23:26:29 +02:00
Alexander Tkachev aafc1ba145 HE: Add net_defines.h and a few stubs updates
SPUTM_CStringArrayFromScummString is still has to be implemented to
finish those stubs.

Net now has joinGame() and hostGame(), which are not implemented yet.
2016-08-30 23:26:29 +02:00
Alexander Tkachev 4df16d6e12 HE: Add Moonbase logic ops stubs
Most of them return int, yet there are a few which don't return
anything. Stubs print a warning and return 1 (or nothing).
2016-08-30 23:26:29 +02:00
Alexander Tkachev 7ac4bddfa9 HE: Add Moonbase Net dummy 2016-08-30 23:26:29 +02:00
Ben Castricum 940bb41526 SCUMM HE: Compensate timers for pauses, fixes bug #6352 2016-08-30 09:09:21 +02:00
Kirben 87c5540c2a SCUMM HE: Update sound flags and queue, for new settings. 2016-06-22 11:45:44 +10:00
Kirben 6b07163600 SCUMM HE: Document sound opcodes. 2016-06-22 11:01:02 +10:00
Eugene Sandulenko f2f04b5edd SCUMM HE: Removed unneeded warning 2016-06-15 22:08:08 +02:00
Eugene Sandulenko bb43f5c0f4 SCUMM HE: Fix Moonbase distortion codec 2016-06-15 22:02:55 +02:00
Eugene Sandulenko 0211c0b27c SCUMM HE: Plugged Moonbase distortion in 2016-06-15 07:33:52 +02:00
Torbjörn Andersson 2b81401368 SCUMM HE: Silence GCC "suggest parentheses" warnings
Thanks to sev for confirming that this is the intended expressions.
2016-06-15 06:09:48 +02:00
Torbjörn Andersson 5188a954a6 SCUMM HE: Fix GCC warnings about casting away [const] qualifiers
I hope this is correct. I don't know when the function is used.
2016-06-15 06:05:49 +02:00
Eugene Sandulenko 3028d9202d SCUMM HE: Simplify Moonbase distortion code 2016-06-14 19:43:08 +02:00
Eugene Sandulenko 6928ddba15 SCUMM HE: Initial Moonbase distortion code 2016-06-14 19:28:29 +02:00
Torbjörn Andersson 245ae4011b SCUMM HE: Fix Moonbase delete vs delete[] Valgrind warning 2016-06-08 06:35:29 +02:00
Eugene Sandulenko ffdb0d5665 SCUMM HE: Remove not more needed debug output 2016-06-08 06:10:19 +02:00
Eugene Sandulenko 0887199400 SCUMM HE: Fix crashes in Moonbase replay 2016-06-07 22:23:42 +02:00
Eugene Sandulenko 060fafd656 JANITORIAL: Fix warning spelling 2016-06-07 22:23:23 +02:00