Commit Graph

3587 Commits

Author SHA1 Message Date
athrxx
923b8ea312 SCUMM: (iMUSE/Amiga) - improve sound driver destructor 2020-01-02 14:42:47 +01:00
BLooperZ
fdeffa1a32 SCUMM: fix loop counter type 2020-01-01 20:28:56 +02:00
BLooperZ
b7275be051 SCUMM: use reliable types in fake bidi 2020-01-01 20:28:56 +02:00
BLooperZ
f13c76fec9 SCUMM: move comment to more appropriate location 2020-01-01 00:31:21 +01:00
BLooperZ
cbcb36ac61 SCUMM: add more comments 2020-01-01 00:31:21 +01:00
BLooperZ
c10ed91c3e SCUMM: avoid allocating large buffers on stack 2020-01-01 00:31:21 +01:00
BLooperZ
7f8b584aa3 SCUMM: remove commented out code 2020-01-01 00:31:21 +01:00
BLooperZ
a96b82203b SCUMM: add comments and fix formatting 2020-01-01 00:31:21 +01:00
BLooperZ
e411a539cb SCUMM: use memset for initialization 2020-01-01 00:31:21 +01:00
BLooperZ
2105313d8b SCUMM: remove forced right-to-left mode 2020-01-01 00:31:21 +01:00
BLooperZ
800ea6fb15 SCUMM: fix formatting 2020-01-01 00:31:21 +01:00
BLooperZ
0af04124c8 SCUMM: export fakeBidi to function 2020-01-01 00:31:21 +01:00
BLooperZ
b75b5cb6b6 SCUMM: consider code 2 in reversal 2020-01-01 00:31:21 +01:00
BLooperZ
390a0abfed SCUMM: flip dialogue selection symbol in indy4 2020-01-01 00:31:21 +01:00
BLooperZ
43bdbdf3fa SCUMM: fix missing dialogue in indy4 2020-01-01 00:31:21 +01:00
BLooperZ
f411135ef6 SCUMM: remove condition for aligning verb lines 2020-01-01 00:31:21 +01:00
BLooperZ
9b2ee566e4 SCUMM: remove condition for aligning verb lines 2020-01-01 00:31:21 +01:00
BLooperZ
8bcdaa6e45 SCUMM: minimize changes required for rtl 2020-01-01 00:31:21 +01:00
BLooperZ
0625518e9f SCUMM: in-place verb strings reversal 2020-01-01 00:31:21 +01:00
BLooperZ
80218a5203 SCUMM7: reverse in single place 2020-01-01 00:31:21 +01:00
BLooperZ
12c86f2bc1 SCUMM: exclude digits from fake rtl support + no align in samnmax 2020-01-01 00:31:21 +01:00
BLooperZ
8bef2a9b36 SCUMM: add check for hebrew version for position 2020-01-01 00:31:21 +01:00
BLooperZ
cd4ce42b46 SCUMM: fix title screen positioning 2020-01-01 00:31:21 +01:00
BLooperZ
7b0e50cdce SCUMM: conditional alignment 2020-01-01 00:31:21 +01:00
BLooperZ
5e26fbdf9a SCUMM: special cases for indy4 2020-01-01 00:31:21 +01:00
BLooperZ
f6e859800d SCUMM: disable debug messages 2020-01-01 00:31:21 +01:00
BLooperZ
b67d954351 SCUMM: disable warnings 2020-01-01 00:31:21 +01:00
BLooperZ
d11c6b655c SCUMM: eliminate shadowing 2020-01-01 00:31:21 +01:00
BLooperZ
e4d70141f0 SCUMM: better locale check 2020-01-01 00:31:21 +01:00
BLooperZ
68c6038e9c SCUMM: add RTL support for scumm v4 to v6 2020-01-01 00:31:21 +01:00
ניב באר
72471ec431 SCUMM: rtl support for scumm-7-8 2020-01-01 00:31:21 +01:00
D G Turner
59b639ed4d SCUMM: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-12-23 11:56:16 +00:00
athrxx
1f42999a7c GRAPHICS: implement left sided shadowing for SJIS font
The current shadow mode draws a shadow on the right side of the character. This allows drawing one on the left.
Adapt LOOM/PCE accordingly.
2019-12-18 20:50:44 +01:00
athrxx
21b5f9262c AUDIO: (FM-TOWNS/PC-98) - fix regression from 0e734722
My commit 0e734722 causes lockups in SCUMM (sometimes) and SCI (very often). I didn't like the way I had fixed this before, but in the end I now had to do it in a similar way.
2019-12-18 20:50:39 +01:00
sluicebox
b8390fa161 GRAPHICS: Add interface for horizontal shake 2019-11-19 00:20:40 +01:00
Cameron Cawley
f2b9f7bb76 BACKENDS: Remove the Windows CE port 2019-11-17 22:33:56 +01:00
Eugene Sandulenko
1b4842f852 SCUMM HE: MBC: Hid noisy debug output 2019-11-17 00:28:59 +01:00
D G Turner
1cc669a317 SCUMM HE: Fix Signed vs. Unsigned Compiler Warning 2019-11-08 00:04:06 +00:00
Eugene Sandulenko
ccab85ffb2 SCUMM HE: MBC: Remove empty callbacks 2019-11-07 17:08:11 +01:00
Eugene Sandulenko
17e6fa82c7 SCUMM HE: MBC: Implement Net::removeUser() 2019-11-07 16:02:15 +01:00
Eugene Sandulenko
c17bf778e2 SCUMM HE: MBC: Store generated player key 2019-11-07 14:43:37 +01:00
Eugene Sandulenko
7b92e4372c SCUMM HE: MBC: Pass userid for the endsession request 2019-11-06 00:54:23 +01:00
Eugene Sandulenko
11a72ca928 SCUMM HE: MBC: Implement Net::destroyPlayer() 2019-11-05 16:38:25 +01:00
Eugene Sandulenko
8c063e95c2 SCUMM HE: MBC: Fix debug output 2019-11-05 00:37:35 +01:00
Eugene Sandulenko
77ee206cd7 SCUMM HE: MBC: Implement Net::disableSessionJoining() 2019-11-05 00:31:46 +01:00
Eugene Sandulenko
5268e582bf SCUMM HE: MBC: Properly thread async requests 2019-11-05 00:31:46 +01:00
Eugene Sandulenko
e94e85a1ed SCUMM HE: MBC: Implemented function return from remote client 2019-11-05 00:31:46 +01:00
Eugene Sandulenko
e6b2615f34 SCUMM HE: MBC: Implement Net::endSession() 2019-11-04 10:40:20 +01:00
Eugene Sandulenko
2721dd2fef SCUMM HE: MBC: Query sessions asynchronously 2019-11-04 10:13:07 +01:00
Eugene Sandulenko
4d4e8d3a25 SCUMM HE: MBC: Cleanup 2019-11-04 10:05:53 +01:00
Eugene Sandulenko
c493ac84d7 SCUMM HE: MBC: Do not block execution when sending packets 2019-11-04 00:28:42 +01:00
Bastien Bouclet
bb813719b5 ENGINES: Change targets to have an 'engine ID'
The engine ID identifies which engine should be used to launch the target.
Also remove the 'single ID' system. Different games from engines that used
that system now have different game IDs.

Also-By: Matthew Hoops <clone2727@gmail.com>
2019-11-03 11:43:00 +01:00
Bastien Bouclet
4b42112721 ENGINES: Add an engine ID to all the engines 2019-11-03 11:43:00 +01:00
Eugene Sandulenko
c7da2f38c3 SCUMM HE: MBC: Properly create arrays on receiving. We now can join the game! 2019-11-03 01:16:19 +01:00
Eugene Sandulenko
b6132fec03 SCUMM HE: MBC: Fix passing arrays to the server 2019-11-02 23:49:21 +01:00
Eugene Sandulenko
f7c7ca7ac9 SCUMM HE: MBC: Implement array receiving as JSON 2019-11-01 18:32:48 +01:00
Eugene Sandulenko
0348aa72fd SCUMM HE: MBC: Take array type into account when sending 2019-11-01 18:07:19 +01:00
Eugene Sandulenko
5d0206b9c2 SCUMM HE: MBC: Read arrays from JSON upon receiving 2019-11-01 10:06:04 +01:00
Eugene Sandulenko
53db8dc5ff SCUMM HE: MBC: Read script params from the JSON packets 2019-11-01 00:29:11 +01:00
Eugene Sandulenko
530798f629 SCUMM HE: MBC: Switch all packets to json-only, no binary 2019-10-31 00:38:27 +01:00
Eugene Sandulenko
a3c65b1a15 SCUMM HE: MBC: Fix unpackageArray() parameters 2019-10-30 10:19:58 +01:00
Eugene Sandulenko
f8272de0ed SCUMM HE: MBC: Implement whoSentThis() 2019-10-30 10:19:58 +01:00
Eugene Sandulenko
dcab6674f1 SCUMM HE: MBC: Fix package sending 2019-10-30 10:19:58 +01:00
Eugene Sandulenko
1adbc2feb7 SCUMM HE: MBC: Hid noisy warning 2019-10-29 23:25:56 +00:00
Eugene Sandulenko
f93bbfd7ca SCUMM HE: MBC: Fixed empty packet check 2019-10-29 00:08:19 +00:00
Eugene Sandulenko
f55a22e127 SCUMM HE: MBC: Read Json packet data 2019-10-28 10:45:42 +00:00
Eugene Sandulenko
e2c7434aa8 SCUMM HE: Replace binary packet with JSON 2019-10-27 21:46:30 +00:00
Eugene Sandulenko
a43381cf99 SCUMM HE: Fix network start at the game start 2019-10-27 21:42:07 +00:00
Eugene Sandulenko
e6d9148061 SCUMM HE: Moonbase Commander: simplify looping over network packets 2019-10-27 19:52:26 +00:00
Eugene Sandulenko
d3cdcf05c7 SCUMM HE: Read packets from the server 2019-10-27 19:52:26 +00:00
Eugene Sandulenko
ed5901c36d SCUMM HE: Implement data packet sending in Moonbase Commander 2019-10-26 21:05:46 +01:00
D G Turner
ea52a99692 SCUMM HE: Fix Compiler Warnings
These are flagged by GCC -Wsign-compare.
2019-10-26 02:55:07 +01:00
Lothar Serra Mari
aaed15d308 SCUMM HE: Fix call to strlcpy 2019-10-25 18:52:26 +02:00
Eugene Sandulenko
bedb0793a4 SCUMM HE: Switched packet manipulation to Stream code 2019-10-25 12:30:26 +01:00
Eugene Sandulenko
2b70d695d0 SCUMM HE: Unstubbed smaller Moonbase Commander networking functions 2019-10-25 12:30:26 +01:00
Eugene Sandulenko
ccf6960aff SCUMM HE: Implement joinSession() for Moonbase Commander 2019-10-25 12:30:26 +01:00
Eugene Sandulenko
a6273269f1 SCUMM HE: Implement getSessionPlayerCount() for Moonbase Commander 2019-10-25 12:30:26 +01:00
Eugene Sandulenko
6c259f4fd0 SCUMM HE: Implemented startQuerySessions() for Moonbase Commander 2019-10-25 12:30:26 +01:00
Eugene Sandulenko
d8a6c5678b SCUMM HE: Hid unneeded warning 2019-10-25 00:43:12 +02:00
Eugene Sandulenko
49b83925a0 SCUMM HE: Fix double free 2019-10-25 00:16:37 +02:00
Eugene Sandulenko
9904732517 SCUMM HE: Initial code for add user functionality 2019-10-24 18:38:49 +02:00
Eugene Sandulenko
ec121da075 SCUMM HE: Set server prefix as variable 2019-10-24 18:08:54 +02:00
Eugene Sandulenko
45d9824c49 SCUMM HE: Create sessions on the server 2019-10-24 17:41:28 +02:00
D G Turner
4d97f7581a SCUMM HE: Fix Compilation When HE is Disabled 2019-10-24 01:28:07 +01:00
Eugene Sandulenko
e15428c43f SCUMM HE: Fix libcurl compilation checks 2019-10-24 00:15:33 +02:00
Eugene Sandulenko
2c5ae96356 SCUMM HE: Hook in PostRequest to Moonbase Commander 2019-10-24 00:15:33 +02:00
Eugene Sandulenko
22ba110e82 SCUMM HE: Set up networking variable later during execution 2019-10-24 00:15:33 +02:00
Ben Castricum
e620372d87 SCUMM: Bump HE version of Pajama2 GB to 99, Fixes bug #10933 2019-10-23 07:31:55 +03:00
D G Turner
349e721847 SCUMM HE: Fix GCC Compiler Warnings 2019-10-23 00:55:41 +01:00
D G Turner
cda5fda164 SCUMM HE: Really Fix Compilation 2019-10-23 00:40:53 +01:00
D G Turner
0ee25207f1 SCUMM HE: Fix Compilation 2019-10-23 00:34:25 +01:00
Eugene Sandulenko
614858eb4b SCUMM HE: Work on receiving part of Moonbase Commander networking 2019-10-22 21:13:54 +02:00
Eugene Sandulenko
41f81bf02e SCUMM HE: Hid several noisy debug messages 2019-10-22 21:13:54 +02:00
Eugene Sandulenko
378ab7c642 SCUMM HE: More code for Moonbase Commander networking 2019-10-22 21:13:54 +02:00
Eugene Sandulenko
f0037adb55 SCUMM: Made displayMessage() public 2019-10-22 21:13:54 +02:00
Eugene Sandulenko
4ba4884c37 SCUMM HE: More work on the Moonbase networking. Getting in-game 2019-10-22 21:13:54 +02:00
Eugene Sandulenko
4f54a3361a SCUMM HE: Initial (hard)code for Moonbase networking 2019-10-22 21:13:54 +02:00
Eugene Sandulenko
58ae990e3b SCUMM: Made getResourceSize() public 2019-10-22 21:13:54 +02:00
D G Turner
ee79aba82d SCUMM: Fix GCC Duplicated Condition Warning
These are flagged by GCC if -Wduplicated-cond is enabled.
2019-10-04 07:58:10 +01:00
Ben Castricum
f10afb8d16 SCUMM: Detect language file of Steam version of DIG, fixes bug #10697 2019-09-30 07:46:12 +03:00
Ben Castricum
1fe75a631b SCUMM: Don't limit Steam MD5 of DIG to english
Steam also allows other languages to be downloaded. Those have the same MD5.
2019-09-30 07:46:12 +03:00
D G Turner
971b16fdac SCUMM: HE: Fix MSVC Warning
This was reported by Henke37 on IRC.
2019-09-15 22:47:43 +01:00
D G Turner
84d0a294af SCUMM: Replace Various String Functions with Common String Usage
This removes the dependency on the unsafe strcpy and strcat string
functions with usage of Common::String instead.
2019-09-15 20:20:03 +01:00
athrxx
0e73472207 AUDIO: (FM-Towns/PC98) - cleanup mutex handling 2019-08-07 16:43:06 +02:00
athrxx
aecf194880 SCUMM: (iMUSE/Amiga) - minor fixes
- At at least one place in INDY4 the game attempts to send a Roland MT-32 patch to the Amiga driver. This will fail and thus not cause any harm, but I have added a check nonetheless. The original Amiga driver ignores sysex messages that don't have the iMuse manufacturer id 7D.
- In INDY4 the iMuse player thinks it has a percussion channel due to the fact that it plays ROL resources. This should also be irrelevant for the actual playback, but I have added a check for that, too.
2019-07-22 20:17:38 +02:00
jepael
afb9ff0048 SCUMM: (iMUSE/Amiga) - Fix compiler warning (#1751) 2019-07-17 21:10:39 +02:00
athrxx
4c45f9f39f SCUMM: (iMUSE/Amiga) - fix INDY4 instruments handling
FOA Amiga uses 'ROL ' resources (unlike MI2 which has 'AMI ' resources). So our imuse player treated those as MT32 tracks playing on a non-MT32 device and applied GM mapping. Which of course messed up the instruments.
2019-07-17 17:26:52 +02:00
athrxx
4c6ff7843f SCUMM: remove unused declarations
(several function declarations in imuse_internal.h)
2019-07-17 17:26:52 +02:00
athrxx
7478cffd88 SCUMM: (iMUSE/Amiga) - cleanup 2019-07-17 17:26:51 +02:00
athrxx
19643175a8 SCUMM: limit 'Unrecognized base tag' warning to valid cases
This warning will not only show up if a tag is actually unrecognized but also in cases where the tag is recognized, but the resource size is 0. This happens quite a lot in the Amiga version of MI2 with 'SOU ' tags.
2019-07-14 21:45:52 +02:00
athrxx
4ee4d2d9af SCUMM: (FM-Towns Audio) remove TODO
The audio track is not broken. LEC simply didn't make good  euphony music tracks for the FM-Towns. There is nothing we can do about that.

The TODO implies that someone should mess around with the audio data (change the composition?).
2019-07-14 21:45:48 +02:00
athrxx
01f99f1a0a SCUMM: imuse driver directory cleanup
- move mac, pc speaker and fm-towns ims sound drivers into separate directory

(AdLib and MT32/GM drivers are still too entangled with common code to be moved so easily, especially MT32/GM. It would require lots of changes to the common code and possibly to all engines using the MidiDriver class. So I leave that for now.)
2019-07-14 21:45:43 +02:00
athrxx
d1b64aab0c SCUMM: (iMuse/Amiga) - improve accuracy
This fixes the issue that some rhythm instruments didn't receive correct notes. The changes have been limited to the Amiga versions.
2019-07-14 21:45:29 +02:00
athrxx
0899ecc987 SCUMM: hook up Amiga MI2 + INDY4 to new sound driver 2019-07-14 20:56:27 +02:00
athrxx
9afdde2601 SCUMM: add Amiga iMuse sound driver
(applies to MI2 and INDY4)
2019-07-14 20:56:27 +02:00
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
Robert Crossfield
71172add9c SCUMM: Original V0-V2 flashlight shape and size for MM/Zak (#10947, #10951) 2019-05-05 15:41:20 +03:00
Cameron Cawley
8c2b09d919 COMMON: Replace NEResourceType and PEResourceType with a shared enum 2019-05-01 23:52:56 +03:00
Cameron Cawley
bcef809e61 WINCE: Fix compilation 2019-04-15 08:06:39 +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
Ben Castricum
9b56d7c6bc SCUMM: MONKEY2: Skip extra code on FMTOWNS, fixes bug #2223 2018-10-02 19:32:32 +01:00
Colin Snover
072a52a9d2 SCUMM: Replace use of strdup with Common::String 2018-08-18 16:30:05 +02:00
Ben Castricum
91b17af1cf SCUMM : Add support for European Wii Pajama Sam (EAN3546430138939) 2018-08-18 13:51:54 +02:00
Paul Gilbert
11e33ba3fc JANITORIAL: Removing trailing spaces after int casts 2018-08-17 20:30:20 -07:00
Adrian Frühwirth
f99977255c SCUMM: Add another German Mac version of DOTT
Fixes Trac#10616.
2018-07-19 20:50:08 +02:00
Adrian Frühwirth
7df014ea6d SCUMM: Clarify workaround for Venice music in Indy 3 FMTOWNS 2018-07-02 14:45:54 +02:00
Sven Meier
64c54591c3 SCUMM: Workaround erroneous AKC_JUMP in German SPY Fox 3
Fixes Trac#3813 and makes this version of the game completable.
2018-06-23 13:50:57 +02:00
Adrian Frühwirth
48db9f04ea SCUMM: Fix recent commit to compile under all circumstances 2018-06-06 20:53:14 +02:00
Adrian Frühwirth
788d85d6b8 SCUMM: Work around distorted speech on submarine in Indy4
The speech sample at VCTL offset 0x76ccbca ("Hey you!") which is used
when Indy gets caught on the German submarine seems to not be a VOC
but raw PCM s16be at (this is a guess) 44.1 kHz with a bogus VOC header.
To work around this we skip the VOC header and decode the raw PCM data.

Fixes Trac#10559
2018-06-06 18:20:20 +00:00
Torbjörn Andersson
fba0afefa5 SCUMM: Remove unnecessary space. 2018-06-04 06:41:51 +02:00
Adrian Frühwirth
d433aedf37 SCUMM: Improve 'imuse play' debugger command error handling
This commit introduces the following (seemingly non-invasive) changes
to make the 'imuse play' debugger command more useful (i.e. don't crash
when trying to load the wrong kind of (sound) resource.

* ScummEngine::readSoundResource()
  Instead of fatally error()'ing upon hitting a non-sound resource type,
  e.g. a room header (0x524d4844 aka RMHD), we now only issue a warning().
  This enables the already existing dead code which properly returns 0
  (aka no resource loaded).

* ResourceManager::validateResource()
  Instead of fatally error()'ing upon hitting an illegal glob type we now
  only issue a warning() and return false (also existing dead code).
  All methods calling validateResource() check its return value so this
  seems like the right thing to do anyway.

* ScummDebugger::Cmd_IMuse()
  Instead of directly calling ensureResourceLoaded() we now call
  getResourceAddress() instead (which in turn calls ensureResourceLoaded()
  and handles other edge cases) and only attempt to play a sound if the
  returned pointer actually is valid.

Fixes Trac#10527.
2018-06-03 19:38:52 +01:00
Adrian Frühwirth
56d2bf77ba SCUMM: Ensure pointer returned by getResourceAddress() is usable
In some cases the pointer returned is used directly without further
error checking.
As most instances already assert() in this case this commit simply
adds asserts where missing and deemed appropriate.
2018-06-01 17:08:39 +00:00
Eugene Sandulenko
1e1ed29704 SCUMM: HE: Mark Bink as engine dependency 2018-05-30 09:26:17 +02:00
Bastien Bouclet
61f9398b04
Merge pull request #1187 from bgK/detection-refactor-unknown
ENGINES: Return unknown game variants with the list of detected games
2018-05-28 18:43:15 +02:00
Adrian Frühwirth
07efcfd458 SCUMM: Fix wrong comment about iMUSE digital variable 2018-05-21 11:24:40 +02:00
Adrian Frühwirth
c7f3416daa JANITORIAL: Remove trailing whitespace 2018-05-20 23:40:20 +02:00
Adrian Frühwirth
8cb0109b40 SCUMM: Improve autosave handling
v5+ scripts can request saving/loading of savegames, this type of
savegame is internally called a "temporary" savegame
(_saveStateTemporary == true) which is invisible to the user (I'm not
sure whether this is by design or not).

Currently the savegame handling in scummLoop_handleSaveLoad() doesn't
distinguish between such temporary savegames and normal autosaves and
unconditionally resets _lastSaveTime (even after loading).
This has the unwanted side effect of potentially delaying the creation
of normal autosaves which are supposed to be created in accordance with
the autosave period setting in the GUI.

This commit makes sure that _lastSaveTime only gets updated if and only
if saving a (non-temporary) autosave.
2018-05-10 17:51:30 +00:00
Bastien Bouclet
90b78c5446 ENGINES: Merge GameDescriptor and DetectedGame 2018-05-10 09:04:23 +02:00
Bastien Bouclet
1de5aca585 ENGINES: Set the GameDescriptor decription in the constructor 2018-05-10 09:04:23 +02:00
Bastien Bouclet
5aff87dc15 ENGINES: Turn GameDescriptor into a simple struct 2018-05-10 09:04:23 +02:00
Bastien Bouclet
643c24db75 ENGINES: Change MetaEngine::listSupportedGames to return plain game descriptors 2018-05-10 09:04:23 +02:00
Bastien Bouclet
8fb149e3c7 ENGINES: Change MetaEngine::findGame to return a plain game descriptor 2018-05-10 09:04:23 +02:00
Bastien Bouclet
cf1ebf2951 ENGINES: Add unknown game variants to the game detector results 2018-05-10 09:04:23 +02:00
Adrian Frühwirth
7ebbb12dfb SCUMM: Remove superfluous 'else' in IMuseInternal::ImSetTrigger()
Both means to calculate `diff` are essentially equal because
wraparound of unsigned integers is well-defined and does what
the 'else' branch is simulating manually. Because of this,
gcc complains when compiling with -Wduplicated-branches.
2018-05-07 22:21:42 +02:00
Adrian Frühwirth
48406bbd41 SCUMM: Simplify clampCameraPos() using CLIP 2018-05-07 19:54:45 +02:00
Adrian Frühwirth
49116b4ae7 ALL: Use CLIP to clip volumes 2018-05-05 17:57:31 +02:00
Adrian Frühwirth
7b48934598 SCUMM: Protect autosave (slot 0) from deletion/overwriting 2018-05-01 22:34:00 +02:00
Lothar Serra Mari
451cf2304f ENGINES: Show the unknown Game dialog only when the detector is launched by the Add Game feature 2018-04-29 21:47:10 +01:00
Adrian Frühwirth
9bee9e1ba6 JANITORIAL: Fix whitespace 2018-04-19 12:08:31 +02:00
Adrian Frühwirth
00e59a3122 ALL: Load savegame thumbnail only when necessary
This commit introduces the following changes:

1. Graphics::loadThumbnail()

   Now returns a boolean and takes a new argument skipThumbnail which
   defaults to false. In case of true, loadThumbnail() reads past the
   thumbnail data in the input stream instead of actually loading the
   thumbnail. This simplifies savegame handling where, up until now,
   many engines always read the whole savegame metadata (including
   the thumbnail) and then threw away the thumbnail when not needed
   (which is in almost all cases, the most common exception being
   MetaEngine::querySaveMetaInfos() which is responsible for loading
   savegame metadata for displaying it in the GUI launcher.

2. readSavegameHeader()

   Engines which already implement such a method (name varies) now take
   a new argument skipThumbnail (default: true) which is passed
   through to loadThumbnail(). This means that the default case for
   readSavegameHeader() is now _not_ loading the thumbnail from a
   savegame and just reading past it. In those cases, e.g.
   querySaveMetaInfos(), where we actually are interested in loading
   the thumbnail readSavegameHeader() needs to explicitely be called
   with skipThumbnail == false.

   Engines whose readSavegameHeader() (name varies) already takes an
   argument loadThumbnail have been adapted to have a similar
   prototype and semantics.
   I.e. readSaveHeader(in, loadThumbnail, header) now is
   readSaveHeader(in, header, skipThumbnail).

3. Error handling

   Engines which previously did not check the return value of
   readSavegameHeader() (name varies) now do so ensuring that possibly
   broken savegames (be it a broken thumbnail or something else) don't
   make it into the GUI launcher list in the first place.
2018-04-07 09:26:20 +02:00
Eugene Sandulenko
511457818d SCUMM: Mark methods as override 2018-03-28 12:01:38 +02:00
Thierry Crozat
7cbf5a9289 SCUMM: Fix interrupting speech not working with AZERTY keyboard
On my AZERTY keyboard the period is obtained using SHIFT + ; and
the code checking the PERIOD keycode and no modifier was failing
on both account. The manual for my French DOTT mentions the period
key, but I have not actually checked how it worked with the original
executable and if using the semicolon key without shift or using the
colon key (which would be the period key on a English-US layout)
works.
2018-03-24 18:17:24 +00:00
Bastien Bouclet
4d0bb753e4 GUI: Remove the ThemeItem draw queues
Drawing nows happens directly when the Dialog or Widget draw methods are
called. This makes it easy to debug why a particular low level draw
method was called, by inspecting the call stack.

This replaces the notion of "buffering" by two independant ways to
control what is drawn and where:
- The active layer is used to select whether the foreground or
  background part of the dialogs are rendered by the draw calls.
- The active surface is used to select if the draw calls affect the back
  buffer or the screen.

The foreground layer of the active dialog is drawn directly to the
screen. Its background layer is drawn to the back buffer. This way
widgets can restore the back buffer in order to update without having to
redraw the dialog's background.

Dialogs lower in the dialog stack are drawn entirely to the back buffer.
2018-03-12 11:46:04 +01:00
Robert Crossfield
b1bce3ec37 SCUMM: MM V0: Fix regression from 038b3b1789 and comment/cleanup 2018-03-12 11:36:04 +01:00
Eugene Sandulenko
e7eaff13bf JANITORIAL: Fix code formatting 2018-02-04 12:59:57 +01:00
nukeykt
e5bfead345 SCUMM HE: Use Miles AdLib driver 2018-02-04 12:56:06 +01:00
Eugene Sandulenko
c8975f9ba7 Revert "SCUMM: Check for and flag demos correctly"
There are too many regressions.
2018-02-01 08:03:39 +01:00
Colin Snover
ffdb5a8ebc SCUMM: Fix compilation failure when DISABLE_TOWNS_DUAL_LAYER_MODE is defined 2018-01-31 21:24:09 -06:00
Colin Snover
08186aeec6 SCUMM: Rename iMUSE save/load function to avoid confusing function hiding 2018-01-31 21:24:09 -06:00
Henrik "Henke37" Andersson
f71dc0d8ab SCUMM: Check for and flag demos correctly
Rewrote the detection matching to use the extra field like the other
two.

This requires extensive testing due to touching code shared for a lot of
games and being sensitive to individual versions of games.
2018-01-31 21:01:28 +01:00
Colin Snover
4e6b60948d SCUMM: Remove variable shadowing 2018-01-31 12:24:32 -06:00
Colin Snover
979ae76ec1 SCUMM: Fix compilation failure 2018-01-31 12:08:17 -06:00
Eugene Sandulenko
52ecf7f5b2 SCUMM: Fix warning (it generates another one in common/ though) 2018-01-31 18:02:04 +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
9d10a998ae SCUMM: Fix stack overflow initializing locals
This happens when clicking on the triangular button in room 27 in
The Dig.

There are probably several other places where this overflow
happens, since there are several different `int args[16]` in
the code (and many more `int args[` of various sizes, not all of
which are at least NUM_SCRIPT_LOCAL).
2018-01-31 17:56:33 +01:00
Colin Snover
b166746b9c SCUMM: Fix stack overflow initializing locals
This happens at least when trying to right click on the motorcycle
at the start of Full Throttle.
2018-01-31 17:56:33 +01:00
Adrian Frühwirth
16eac57834 SCUMM: implement lipsync for v7 games 2018-01-31 16:38:07 +01:00
Giovanni Bajo
3a60637d77 SCUMM: really implement lipsync
It looks like the code was there, but it was never fully implemented
because _curSoundPos was never being incremented. Experimentally,
it looks like it works if it is a 60FPS counter.
2018-01-31 16:36:24 +01:00
Bastien Bouclet
5878c618c9 GUI: Remove Dialog::markAsDirty to expose full GUI redraws 2018-01-27 18:12:34 +01:00
Kirben
f383f00274 SCUMM HE: Add early version of Let's Explore the Farm with Buzzy. 2017-12-22 15:46:22 +11:00
Colin Snover
4d3f05ae79 SCUMM: Fix array overflow writing var when no current script is set
This situation is triggered normally when _currentScript is 0xFF,
but it could potentially also happen if _currentScript is some
other number >= NUM_SCRIPT_SLOT, so the check is a bit more
conservative than it might appear to need to be.
2017-12-01 19:39:30 -06:00
Colin Snover
2b5605362a SCUMM: Fix signed integer overflow reading default v70HE cursor 2017-12-01 19:23:00 -06:00
Colin Snover
c7989bb333 SCUMM: Fix buffer overflow reading default v70HE cursor 2017-12-01 19:22:56 -06:00
Colin Snover
5cd2c9a387 SCUMM: Fix possible return of garbage values 2017-12-01 19:22:52 -06:00
Colin Snover
57084b4a1b SCUMM: Fix UB shifting negative integers in Actor 2017-12-01 19:22:35 -06:00
Colin Snover
9a36870e78 SCUMM HE: Fix UB shifting negative integers 2017-12-01 19:22:19 -06:00
Eugene Sandulenko
89a782466a SCUMM: Revert skipping of MM C64 demo original save screen display attempt
As per discussion in bug #10116.
2017-11-27 20:50:28 +01:00
Eugene Sandulenko
5183b2024c SCUMM: Do not do anything for real with original save screen in MM C64 demo 2017-11-26 05:15:42 +01:00
Eugene Sandulenko
a7182e2a6a SCUMM: Do not try to show original save/load screen in C64 demo
Fixes bug #10116
2017-11-25 23:35:28 +01:00
Colin Snover
0eda63bed1 SCUMM: Fix race condition in MOD player
Fixes Trac#6272.
2017-11-12 23:15:05 -06:00
Colin Snover
51329c0dc6 ALL: Fix misuse of comma operator 2017-11-10 09:57:03 -06:00
Ben Castricum
a8faf239a1 SCUMM: Prevent false detection of Steam games 2017-10-31 11:03:53 +01:00
Colin Snover
64191781b5 SCUMM: Fix compilation on systems without USE_RGB_COLOR 2017-10-07 13:09:07 -05:00
Colin Snover
432fd522d2 ENGINES: Remove default1x scaler flag
This flag is removed for a few reasons:

* Engines universally set this flag to true for widths > 320,
  which made it redundant everywhere;
* This flag functioned primarily as a "force 1x scaler" flag,
  since its behaviour was almost completely undocumented and users
  would need to figure out that they'd need an explicit non-default
  scaler set to get a scaler to operate at widths > 320;
* (Most importantly) engines should not be in the business of
  deciding how the backend may choose to render its virtual screen.
  The choice of rendering behaviour belongs to the user, and the
  backend, in that order.

A nearby future commit restores the default1x scaler behaviour in
the SDL backend code for the moment, but in the future it is my
hope that there will be a better configuration UI to allow users
to specify how they want scaling to work for high resolutions.
2017-10-07 12:30:29 -05:00
Bastien Bouclet
3eb82462e7 ALL: Specify the DisposeAfterUse constructor argument for dynamic memory write streams 2017-09-22 07:06:21 +02:00
Ben Castricum
203b5138fa SCUMM: Update MD5 include file 2017-08-21 16:04:31 +02:00
Ben Castricum
f26e36c2e4 SCUMM: Add detection for German version of Spy Fox 1, fixes bug #9732 2017-08-21 16:04:31 +02:00
Ben Castricum
ae8f6397eb SCUMM: Prevent darkenPallete() in Room 0 in FT, fixes bug #9871 2017-08-17 09:47:03 +01: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
Eugene Sandulenko
e0b3001218 SCUMM: Add missing return statement 2017-08-11 20:20:25 +02:00
Eugene Sandulenko
41d8441ea8 SCUMM: Add missing break to INSANE code. Thanks to eriktorbjorn and GCC7 2017-08-11 20:13:24 +02:00
Kirben
2fe8931907 SCUMM: Don't list Amiga version of The Secret of Monkey Island as VGA, as it leads to confusion. 2017-08-10 09:35:33 +10:00
Torbjörn Andersson
0bde79b2b8 JANITORIAL: Silence some more GCC 7 fall through warnings 2017-08-06 16:35:25 +02:00
Torbjörn Andersson
4fb0d1e56f JANITORIAL: Increase buffer size to fix potential overflow
Caught by GCC 7 (though the warning seemed misleading to me). Since
SoundDesc->name can potentially be 14 characters "%s_reg%03d.fla"
can be 25 characters, plus the terminating \0.
2017-08-06 12:00:32 +02:00
Torbjörn Andersson
b4c1e86d9f JANITORIAL: Silence GCC warning
Since case 64 was added for "MM C64 Costume Animation", and
considering the way it's written to only affect game version 0,
it is clearly an intentional fall through.
2017-08-06 11:51:57 +02:00
D G Turner
5c85230443 SCUMM: Fix Typo in Detection Table Comment.
No functional change.
2017-08-04 04:27:09 +01:00
Ben Castricum
d58f594755 SCUMM: MI2 kill tune 113 on start of next, Fixes bug #1410 / Booty Island
Fix the "MI2: Two soundtracks playing at once" bug from the bug tracker.
It's triggered when the player enters the kiosk for the second time and
leaves before tune 113 is started.
2017-07-30 22:10:54 +02:00
Ben Castricum
392d8b44ff SCUMM: MI2 kill tune 107 on start of next, Fixes bug #1410 / Scabb Island
Fix the "MI2: Two soundtracks playing at once" bug from the forum.  It's
triggered when the player is moving faster then the scripts expect causing
the "stop tune 117" command be executed before the start of the tune.
Effectily creating a hanging tune 107.
This patch kills the tune when this sitation is detected.
2017-07-30 22:10:54 +02:00
Eugene Sandulenko
085332a3dc Merge pull request #902 from segrax/Fix_4556
SCUMM: Fix bug #4556 (Maniac: Purple Tentacle appears in Lab after being chased out)
2017-02-21 23:33:17 +01:00
Eugene Sandulenko
b44b297a84 Merge pull request #903 from segrax/Fix_4112
SCUMM: Fix bug #4112 (MANIAC: Power never returns)
2017-02-21 23:32:10 +01:00
Robert Crossfield
038b3b1789 SCUMM: MM V0: Fix actors skipping between certain walk-boxes 2017-02-21 06:17:32 +11:00
Robert Crossfield
02ac724c66 SCUMM: MM V0: Fix an issue with Sandy appearing to slide across a walkbox 2017-02-15 17:05:28 +11:00
Robert Crossfield
56caa6f0a7 SCUMM: Cleanup Maniac Mansion workarounds 2017-02-14 19:26:11 +11:00
Robert Crossfield
9e07738b52 SCUMM: Fix bug #4112. If you enter the lab while Dr. Fred has the power off, the power won't be turned back on as the script is killed 2017-02-14 18:28:58 +11:00
Robert Crossfield
165a1bb070 SCUMM: Fix bug #4556 (Maniac C64/V1/V2: Purple Tentacle appears in Lab Entry after being chased out) 2017-02-13 17:51:00 +11:00
Eugene Sandulenko
e5ebc903ea Merge pull request #877 from segrax/Fix_2285
SCUMM: Fix bug #2285 (ZAK C64/V1/V2 Caponians dont disguise after using crystal)
2017-01-13 23:15:35 +01:00
Robert Crossfield
a3ca4412fa SCUMM: Fix bug #2285 (ZAK C64/V1/V2 Caponians don't disguise after using blue crystal) 2016-12-28 09:23:54 +11:00
Robert Crossfield
c95b6a9f8d SCUMM: Fix bug #6817 (V1 Actors drawn 1 line too high) 2016-12-27 10:21:23 +11:00
Robert Crossfield
485f26e4d6 SCUMM: Fix bug #4515 (Dr. Fred facing wrong way in lab cutscene) 2016-12-27 10:21:09 +11:00
Torbjörn Andersson
e17fa6216b SCUMM HE: Silence GCC indentation warning 2016-12-06 21:01:06 +01:00
Ben Castricum
6f38c1e55d ALL: game state => saved game 2016-11-29 20:15:20 +01:00
Ben Castricum
d3cd42e1d4 ALL: Fix usage of 'etc.' 2016-11-29 20:14:41 +01:00
Eugene Sandulenko
83c74d68a1 SCUMM HE: Fix crash in Moonbase distrotion 2016-11-27 14:02:52 +01:00
Eugene Sandulenko
0ebe534771 SCUMM: Fix dialog initialization 2016-11-27 14:02:52 +01:00
Eugene Sandulenko
cf5c6beb3a SCUMM: Set initial EOS state in Scumm::File class 2016-11-27 14:02:52 +01:00
Eugene Sandulenko
3f2fce5691 SCUMM: Properly inint FM-TOWNS gfx code 2016-11-27 14:02:52 +01:00
Eugene Sandulenko
a9566997aa SCUMM HE: More class initializations 2016-11-27 14:02:52 +01:00
rootfather
70a990f6ab SCUMM: Enable translation for the unknown game warning
We have translations enabled for the warning created
by advancedDetector.cpp, so I think it would be neat
to have translations enabled here too.

This also enables the message about the "Lite" version
of Putt-Putt Saves the Zoo being unsupported to the
translation database.
2016-11-26 11:22:17 +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
f2134a0dc2 SCUMM: Fix IMUSE initialization 2016-11-19 17:39:43 +01:00
Eugene Sandulenko
f7a551dab2 SCUMM: Fix class initalization 2016-11-19 17:37:44 +01:00
Eugene Sandulenko
92353cf88b SCUMM: Fix more initialization 2016-11-19 17:33:45 +01:00
Eugene Sandulenko
cead687df0 SCUMM: Fix CMS player initialization 2016-11-19 17:32:00 +01:00
Eugene Sandulenko
6ad8df4873 SCUMM: Fix some class initializations 2016-11-19 17:30:16 +01:00
Alexandre Detiste
f8388db32b JANITORIAL: Typos
I've not fixed this one, maybe it's on purpose:

RELASE -> RELEASE

engines/mads/staticres.cpp:const char *const kGameReleaseTitleStr =
"GAME RELASE VERSION INFO";
2016-10-31 09:56:43 +01:00
Eugene Sandulenko
ee324a07cf SCUMM: Fix crash on exit in FT demo 2016-10-09 15:26:48 +02:00
Eugene Sandulenko
dead4aa014 JANITORIAL: Remove trailing spaces 2016-10-09 14:59:58 +02:00
Thierry Crozat
d1d44eba6f SCUMM: Move detection entries for Steam versions to end of list
For some games the Steam Mac version and Mac CD version have the
same executable name and since we use the executable name to
detect the Steam version it becomes a candidate for the CD version
as well. Moving it at the end of the list ensures that the CD version
entry takes precedence. This fixes bug #7060.
2016-10-01 01:55:02 +01:00
Thierry Crozat
c70701d07b SCUMM: Use platform from candidate to generate unknown version message
If we don't provide the platform and the candidate is a Steam version
it errors out with 'Unable to find Steam executable from detection
pattern!' message.
2016-10-01 01:55:01 +01:00
Eugene Sandulenko
cad834a69c JANITORIAL: Fix include statements 2016-09-03 15:19:37 +02:00
Eugene Sandulenko
fab199d37e JANITORIAL: Make GPL headers uniform 2016-09-03 12:46:38 +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