173 Commits

Author SHA1 Message Date
Ben Castricum
8957bf4d7f SCUMM: reset ShakePos on loading, fixes one part of bug #7141 2016-07-01 08:25:28 +02:00
Ori Avtalion
3564032330 JANITORIAL: Reduce audio header dependencies 2016-04-14 16:10:21 +03:00
Eugene Sandulenko
aa6ae7ac35 SCUMM: Fix warning 2016-02-14 17:51:30 +01:00
Torbjörn Andersson
f74ba29753 SCUMM: Enable Day of the Tentacle easter egg
Instead of returning to the launcher, a game may now specify a list
of "chained" games and optional save slots. The first game is popped
from the list and started. Quitting still quits the entire ScummVM.
It seemed like the sensible thing to do.
2014-12-30 03:45:14 +01:00
Filippos Karapetis
40b224fc74 SCUMM: Disallow saving while a room 'prequel' is shown in v0-v3 games
These are cases where the screen is completely blank, showing text.
In such cases, no room is set, thus no room resources are available.
An example is the screen shown after the credits in the Zak FM-TOWNS
intro ("The next day..."). Thanks to segrax for finding this case.
This commit is based off pull request 522, but completely disallows
saving in such scenes, instead of adding explicit checks for them
2014-10-29 11:23:59 +02:00
Filippos Karapetis
53d3ee07df SCUMM: Add support for CD audio tracks in the Steam versions of Loom
Many Thanks to Ben Castricum for the original patch
2014-07-04 23:33:43 +03:00
Max Horn
8638b29b89 SCUMM: Avoid potential issues casting invalid values to enum
A compiler could in principle decide that a ResType enum can
never equal 0xFF or 0xFFFF, and thus incorrectly optimize
the ScummEngine::saveOrLoad code. So check the value
*before* casting it.
2014-03-30 19:48:08 +02:00
Max Horn
4d02f67bd1 ALL: Resolve multiple clang warnings 2014-03-30 14:38:02 +02:00
D G Turner
f4e7b593dc SCUMM: Fix bug #6009 "DC: FT/Dig - Sound disappears when VMU save fails"
This was introduced by fd3970aa52a0c7f411afdddfebad208f783281c8:
Apply patch #2984508 - "GSoC: SCUMM stopped audio from playing while
saving"

This was not quite correct as if the save fails, the function exits
without unpausing the engine, which resulted in sound and music
remaining muted. This corrects the logic to unpause in all cases.
2014-03-18 22:49:36 +00:00
Johannes Schickel
3847465163 SCUMM: Make GPL headers consistent in themselves. 2014-02-18 02:39:38 +01:00
clone2727
9d9ced0734 Merge pull request #366 from clone2727/he-saves-target-name
RFC: Make HE games use the target name in all save files
2014-01-17 15:59:44 -08:00
Johannes Schickel
10def6a435 SCUMM: Small formatting fix. 2013-11-27 19:32:08 +01:00
Johannes Schickel
fdcb6a6b1a SCUMM: Cleanup querySaveMetaInfos implementation.
This results in less code and also less I/O operations (including seeking).
2013-11-27 19:29:21 +01:00
Johannes Schickel
d8d6faff01 SCUMM: Slight cleanup in savegame code. 2013-11-27 19:01:30 +01:00
Filippos Karapetis
4f807ee53e SCUMM: More renaming for players
Rename "player" directory to "players", and reintroduce the "player_"
file prefix. This has been done after sev's request.
"players/player_foo.*" is more descriptive, and avoids potential name
clashes in libraries
2013-11-01 19:26:51 +02:00
Filippos Karapetis
651bf89939 SCUMM: Move all players to a separate "player" directory
There are 34 player .cpp/.h player files, so they have been placed in
their own directory, to logically separate them from the rest of the
engine
2013-11-01 06:57:53 +02:00
Matthew Hoops
3bfd422205 SCUMM: Make all HE saves prepend the target name
This makes HE follow the ScummVM convention of using the target name everywhere. It also fixes having more than one team in both soccer and football.

Loading old saves will still work and they will be tried if the newer save names are not found.
2013-10-05 15:45:36 -04:00
Torbjörn Andersson
f784d683e0 SCUMM: Save/load Mac music engine state for Loom and MI1
Note that while this removes _townsPlayer->saveLoadWithSerializer(s)
it really shouldn't break anything because _musicEngine also points
to the FM Towns player. Famous last words...
2012-11-15 22:23:44 +01:00
Johannes Schickel
89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Tarek Soliman
a4798602d7 JANITORIAL: Fix missing whitespace in pointer cast
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'

This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-15 10:07:10 -06:00
Willem Jan Palenstijn
784472a669 Revert "SCUMM: revert savegame version to 89"
This reverts commit 65fc7225bb31e72120dcdf16e91ae377c657548d.

Increasing the savegame version on a branch and then decreasing it again
leads to problems with loading current savegames in old commits during
a bisect.
2012-02-11 10:55:55 +01:00
Tobias Gunkel
65fc7225bb SCUMM: revert savegame version to 89
Previous versions 89-92 are merged into version 89.
2012-02-11 08:36:38 +01:00
Tobias Gunkel
8d3b272939 SCUMM: save complete v0 state and initialize actors correctly 2012-02-11 08:30:07 +01:00
Tobias Gunkel
124e8926ba SCUMM: do not convert a savegame twice 2012-02-11 08:29:07 +01:00
Tobias Gunkel
347035385e SCUMM: merge object v0 id and type into one object var 2012-02-11 08:28:49 +01:00
Tobias Gunkel
a79f224c23 SCUMM: changed handling of _activeInventory/_activeActor to _activeObject(2)/_activeObject(2)Type
Note: the transition is not completed yet. The code compiles but is probably not runnable as not every occurrence of _activeInventory has been properly replaced.
The usage of _v0ObjectIndex and _v0ObjectInInventory should be revised too and both variables should be replaced by another mechanism (maybe by using a single variable "obj = (type << 8) | id").

- moved v0 only vars _activeInventory, _activeObject, _activeVerb from  ScummEngine_v2 to ScummEngine_v0
- removed _activeActor, _activeInvExecute, _activeObject2Inv and _activeInventory. They are handled by _activeObject/_activeObjectType and _activeObject2/_activeObject2Type now.
- removed _activeObject(2)Index as they only bloat the code without any benefit (?)
- merge prep-name tables from ScummEngine_v2::drawPreposition() and ScummEngine_v0::drawSentenceWord() by introducing ScummEngine_v2::drawPreposition()
- rename ObjectData.flags -> obj_type (quick-fix only, needs review! Maybe obj_nr and obj_type can be merged into one var: obj_nr = (obj_type << 8) | obj_nr)
- o_unknown2 is negation of o_ifActiveObject (o_ifNotEqualActiveObject2)
- renamed o_ifActiveObject -> o_ifEqualActiveObject2 as it acts only on _activeObject2
- renamed ScummEngine_v0::drawSentenceWord() -> ScummEngine_v0::getObjectName()
2012-02-11 08:02:32 +01:00
athrxx
fe21e5b0a9 SCUMM: paranoia "fix" for ae5192c5d396b6ab3caf57adabeb03a832966dd3
(change sizeof check to use int16 instead of Common::Rect)
2011-11-24 22:00:09 +01:00
athrxx
ae5192c5d3 SCUMM: make FM-Towns save files compatible between DS and other platforms
(only applies to new save files)
2011-11-24 21:29:14 +01:00
Willem Jan Palenstijn
1d8960ccde SCUMM: Minor clean up 2011-11-02 01:34:52 +01:00
athrxx
de5d3fc8e1 SCUMM: add comment to last commit 2011-11-01 17:38:49 +01:00
athrxx
8315d5d2c8 SCUMM: fix save file incompatibility between DS and other ports for non FM-TOWNS games 2011-11-01 17:04:31 +01:00
Johannes Schickel
d0e64ce4a3 SCUMM: Properly prefix player_towns.h include with scumm/. 2011-08-27 19:58:36 +02:00
Johannes Schickel
003c16920c SCUMM: Also save first used color beyond 80 in Indy4 Amiga palette. 2011-08-27 19:57:45 +02:00
Johannes Schickel
f77fc07b6b SCUMM: Save Indy4 Amiga specific palettes like the original did.
For older saves I added a warning and a fallback which tries to setup
everything correctly. This might cause some issues, but should hopefully be
just fine.
2011-08-26 18:43:28 +02:00
Johannes Schickel
4ea4172cba SCUMM: Implement proper Indy4 Amiga palette handling.
This should fix incorrect text colors in some scenes.
2011-08-26 05:54:47 +02:00
Christoph Mallon
e35b4f20c1 GRAPHICS: Simplify the interface of Graphics::loadThumbnail().
Now it returns the Surface, so the caller does not need to create one and pass it.
2011-08-07 15:19:09 +02:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
athrxx
81e0dd1444 SCUMM: regenerate 16bit palette after loading a savegame in LOOM PCE
(this avoids isssues when using savegames from different ports with different 16bit color modes)
2011-06-18 19:45:39 +02:00
athrxx
0a42a7d625 SCUMM: hopefully fix 16bit mode support for SCUMM FM-TOWNS games and LOOM PCE on Android
This mostly reverts 5b7754e3f095eb8a469dd4b7de5a6379f8e13c27. Instead, we try to use other 16bit modes  after 555 fails.
2011-06-15 22:30:04 +02:00
Max Horn
477d6233c3 ENGINES: Change 2nd param of Engine::saveGameState to Common::String 2011-06-02 18:31:59 +02:00
Max Horn
9ec64a66fe SCUMM: Turned ResTypeData into a Common::Array<Resource>, subsuming its _resource member 2011-05-13 14:48:01 +02:00
Max Horn
45207a52d4 SCUMM: Remove ResTypeData::_num 2011-05-13 14:12:00 +02:00
Max Horn
649f8e0a84 SCUMM: Rename ResTypes->ResType, introduce ResId typedef, change code to use both 2011-05-13 14:02:53 +02:00
Max Horn
c02420df43 SCUMM: Add a Resource class, refactor res code around it 2011-05-13 11:47:13 +02:00
Max Horn
abaaf0cad9 SCUMM: Tweak sound res syncing 2011-05-13 11:47:12 +02:00
Max Horn
0342ab3f1b SCUMM: Rename ResTypeData::num to _num 2011-05-13 11:47:11 +02:00
Max Horn
75b9deb185 SCUMM: Get rid of the MemBlkHeader hack
This uncovered at least one potentially serious bug in the inventory
code, which still needs to be investigated and fixed.
2011-05-13 11:47:10 +02:00
Max Horn
7be0305da9 SCUMM: Rename saveLoadResource to loadResourceOLD, remove unused save code in it 2011-05-13 11:47:09 +02:00
Max Horn
26efa39d2c SCUMM: Document and cleanup resource type mode 2011-05-13 11:47:09 +02:00
Max Horn
45e65d7ea0 SCUMM: Refactor how resource (types) are srepresented
Previously, we had a couple of arrays of size N (where N = number of
resource types), one for each attribute of a resource type (such as as
the number of resources of that type.

Now, we have one array of size N, whose elements are a record
aggregating all the attributes of each resource type.
2011-05-13 11:47:08 +02:00