Commit Graph

529 Commits

Author SHA1 Message Date
Alexander Reim
e6262b3d4b NEVERHOOD: Graceful shutdown of the engine 2018-01-02 09:03:31 +01:00
Colin Snover
d087c9605f BASE: Remove bad casts between incompatible Plugin types
Previously, a C-style cast was used to convert a
Common::Array<Plugin *>, populated with pointers to StaticPlugin
and DynamicPlugin instances, to a
Common::Array<PluginSubclass<T> *>, but PluginSubclass<T> is a
*sibling* class to StaticPlugin/DynamicPlugin, so this cast was
invalid and the results undefined. The methods for retrieving
subclasses of plugins can't be easily changed to just generate an
array of temporary wrapper objects that expose an identical API
which dereferences to the preferred PluginObject subclass because
pointers to these objects are retained by other parts of ScummVM,
so the wrappers would needed to be persisted or they would need to
just re-expose the underlying Plugin object again. This indicated
that a way to solve this problem is to have the callers receive
Plugin objects and get the PluginObject from the Plugin by
explicitly stating their desired type, in a similar manner to
std::get(std::variant), so that the pattern used by this patch to
solve the problem.

Closes gh-1051.
2017-12-03 20:26:38 -06:00
Ivan Avdeev
81defa7496 NEVERHOOD: fix late game notes crash in DR
After player gets to the castle using a robot, Willie's notes
become red "Windows'" (in DR Russian version) notes. One of the notes
requires patching.
2017-11-26 11:24:17 +01:00
Ivan Avdeev
11d28abaa0 NEVERHOOD: fix musical hut crash in DR, bug #7085 2017-11-18 10:33:22 +01: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
Torbjörn Andersson
70a2ca8b7d JANITORIAL: Silence more GCC 7 warnings
All these fall through were marked as deliberate, so again I've only
changed the comment to silence GCC.
2017-08-06 13:30:51 +02:00
Ben Castricum
b041618a42 ALL: Remove comma before the word 'instead' 2016-11-29 20:22:19 +01:00
Alexander Tkachev
b665fc933d ALL: Make simpleSaveNames() a MetaEngineFeature
Added it into hasFeature() of all engines which returned `true` in
simpleSaveNames() before.

As mentioned in #788, SCI is not always using simple names, so it
doesn't have such feature now.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ab1d160ec8 ALL: Add MetaEngine::simpleSaveNames()
Engines with "simple" savenames would support "Run in background" in
save/load dialog and gradual save slots unlocking. Other engines
save/load feature would be locked until save sync is over.
2016-08-24 16:07:55 +06:00
Filippos Karapetis
7ab7063ad8 Merge pull request #751 from einstein95/patch-1
NEVERHOOD: Add earlier English demo of Neverhood
2016-05-29 18:14:53 +03:00
Ori Avtalion
21753098e1 NEVERHOOD: Reduce audio header dependencies 2016-05-21 13:44:27 +03:00
Eugene Sandulenko
33abb6118f ALL: Change main engine header guard defines to <directory>_<engine>_H
Recently we started to use this as new semantics, although in the past
we used simly <engine>_H. Now these guard defines are consistent with
rest of the files which are used in the engines.
2016-05-17 18:21:30 +02:00
Logan B
865eff9c2c NEVERHOOD: Add earlier English demo of Neverhood
Apparently contains a placeholder song or soundtrack. Download link in the sourceforge issue tracker.
https://sourceforge.net/p/scummvm/bugs/7117/
2016-04-15 21:33:07 +12:00
Torbjörn Andersson
1f06e3f557 NEVERHOOD: Avoid crash in original load/delete game dialogs
The original game would display a message if you tried to load or
delete a game without actually selecting one. At least for now,
let's just avoid crashing.
2016-04-15 07:29:43 +02:00
Torbjörn Andersson
fc55a8fb1a NEVERHOOD: Fix bug #7116 ("Crash upon clicking ...")
Don't crash when clicking a read-only text widget. In the original,
the load game dialog's text widget isn't read-only, but since we
allow multiple games to have the same name it's probably for the
best that we don't quite match the original behavior here.
2016-04-15 07:29:43 +02:00
Torbjörn Andersson
53e02c4770 NEVERHOOD: Tiny whitespace fix
It's bugging me, ok?
2016-04-15 07:29:43 +02:00
Ori Avtalion
3564032330 JANITORIAL: Reduce audio header dependencies 2016-04-14 16:10:21 +03:00
Johannes Schickel
3aecd8ef2a ENGINES: Make variable names of ADGameDescription conform to our guidelines.
gameid     -> gameId
guioptions -> guiOptions
2016-03-08 19:01:38 +01:00
Johannes Schickel
0b6befdcc5 ENGINES: Make variable names of AdvancedMetaEngine conform to our guidelines.
_singleid   -> _singleId
_gameids    -> _gameIds
_guioptions -> _guiOptions
2016-03-08 19:01:13 +01:00
Eugene Sandulenko
23d74fddb4 CONFIGURE: Introduced new engine dependency: highres
Some backends like GCW0 do no support graphics >320x240 due to
the hardware limitation (downscaling is possible but it will ruin
the pixel hunting which is often part of the gameplay).

Instead of manually updating the list of engines, we now introduce
a new dependency.

I marked all relevant engines, but some, like tinsel, require more
work with putting their relevant high-res games under USE_HIGHRES
define.
2016-03-05 14:25:56 +01:00
Johannes Schickel
37c1a06df9 NEVERHOOD: Let listSaves return list sorted on slot numbers. 2016-02-25 21:39:45 +01:00
Johannes Schickel
31f8405e6e NEVERHOOD: Only request actual save slots in listSaves. 2016-01-26 16:35:30 +01:00
Eugene Sandulenko
8cd5091068 NEVERHOOD: Fix another crash in Russian version 2016-01-12 23:58:15 +01:00
Johannes Schickel
cadb779821 NEVERHOOD: Remove superflous default value registration for extra GUI options. 2015-12-28 00:14:11 +01:00
Filippos Karapetis
d80c39bb29 NEVERHOOD: Update resource patches for the DR version - fixes bug #6913
Some of the resource patches needed to be modified to work with the
latest changes to the DCL decoder
2015-12-15 03:20:03 +02:00
Filippos Karapetis
4a38e2618d Merge pull request #621 from eriktorbjorn/neverhood-car
NEVERHOOD: Possible fix for bad car behaviour
2015-10-22 11:10:42 +03:00
Torbjörn Andersson
42bf369d68 NEVERHOOD: Pass NPoint as position instead of X in two more cases
According to johndoe it's correct to pass the entire coordinate,
rather than just X, to the car in these cases as well. I can't
tell any difference at all in the behavior, but I guess it doesn't
hurt either. After all, we can easily zero the Y coordinate, if we
ever want to.
2015-10-18 11:37:40 +02:00
Torbjörn Andersson
0f3e7531c1 NEVERHOOD: Possible fix for bad car behaviour
This is something I found when trying the savegame from bug #6932,
but I still don't know if it actually is that bug.

From what I understand, there are two different cases in the
moveCarToPoint() method: One where you click on a different
section on a track than you're on, and one where you click on the
same section on the track that you're on.

In the latter case, it sends message 0x2004 to the car, which is
then handled by AsCommonCar::handleMessage(). That one will assume
that the parameter is a point, but this can also be encoded as an
integer with 16 bits for the X coordinate and 16 bits for the Y
coordinate. See MessageParam::asPoint().

If we only pass an X coordinate to the message, the Y coordinate
is assumed to be 0, and we do this in a couple of places. I do not
know the exact implications of that, but in the two cases I've
changed here, it meant that clicking on the track below the car
would still make it go up, because it thought you were travelling
towards the top of the screen.

So I think this is the appropriate fix, but even if it is, I do
not know if it's enough or if it should be changed in other places
as well.
2015-10-11 08:00:23 +02:00
Ori Avtalion
923ee223d8 NEVERHOOD: Don't crash when loading savegames with a high slot ID 2015-10-05 18:51:15 +03:00
Torbjörn Andersson
dfe04491c1 JANITORIAL: Remove unnecessary semicolons 2015-01-21 01:29:22 +01:00
Filippos Karapetis
0e763f6aa2 NEVERHOOD: Remove duplicate file hash definition 2014-12-07 15:46:08 +02:00
Filippos Karapetis
2325183751 NEVERHOOD: Remove duplicate defines
These have been left behind after the split of the scenes and the scene
sprites. Thanks to fingolfin for pointing out the duplicate defines
2014-12-07 15:45:43 +02:00
Filippos Karapetis
e0c281b9b2 NEVERHOOD: Remove trailing whitespace 2014-10-28 16:18:11 +02:00
Filippos Karapetis
4207fbd2d6 NEVERHOOD: Play a single sound when losing the memory puzzle (bug #6672)
When the memory puzzle is reset, each revealed tile gets hidden again.
When a lot of tiles were hidden, the multiple clicking sounds would
fill the available sound slots. To avoid this, only a single click is
sounded when losing
2014-07-07 02:00:58 +03:00
johndoe123
b7884f2fba NEVERHOOD: Fix uninitialized variables in Sprite (bug #6663) 2014-06-30 13:09:59 +02:00
D G Turner
a1b80bb536 NEVERHOOD: Fix for uninitialized variables for car ride logic.
This fixes bug #6661 NEVERHOOD: Uninitialized variable during car ride.
2014-06-28 19:08:50 +01:00
Torbjörn Andersson
95ba430d11 NEVERHOOD: Initialize _newMoveDirection. Valgrind complained. 2014-06-28 08:11:54 +02:00
johndoe123
bdee71f279 NEVERHOOD: Implement clipping in BaseSurface::copyFrom
This should hopefully fix the crashes in the Hall of Records as mentioned in bug #6513.
2014-06-26 19:19:28 +02:00
Torbjörn Andersson
639a2dfd2e NEVERHOOD: Fix radio part of bug #6513 ("Some nasty bugs")
This clears the radio music variable when leaving the room. I've
discussed with johndoe123 and he says this is what the original
does. (You could also get the same effect by clearing it when
entering the room.)
2014-06-05 19:51:28 +02:00
Johannes Schickel
ae4ffe01f0 ALL: Rename Debugger::DCmd_Register to Debugger::registerCmd. 2014-05-27 02:04:08 +02:00
Johannes Schickel
daa8d57a86 ALL: Rename Debugger::DebugPrintf to Debugger::debugPrintf. 2014-05-27 02:04:07 +02:00
D G Turner
f0a0537095 NEVERHOOD: Fix memory leak from static data loading.
This is occurring due to duplicate entry ids, which should probably not
be present.
2014-05-05 11:29:41 +01:00
Torbjörn Andersson
b565d0bf24 NEVERHOOD: Fix memory leak in BaseSurface
I hope this will help the memory leak reported as part of bug #6513
but my computer isn't quite up to the task of doing any extensive
Valgrind testing.
2014-05-05 07:20:49 +02:00
Torbjörn Andersson
9f4c221a22 NEVERHOOD: Fixed off-by-one error in getTextIndex3()
This is the same fix that was applied to getKloggsTextIndex() some
time ago. It restores a missing Willie nonsense letter. While I
haven't actually verified for myself that this letter appears in
the original game, it is referenced in Wikipedia's article about
Absalom.
2014-05-04 22:27:48 +02:00
Torbjörn Andersson
cfa0c839c3 NEVERHOOD: Fixed one of the issues in #6513
The getKloggsTextIndex() function would return 40 twice in a row
when wrapping around. This caused one of Willie's nonsense letters
to appear instead, since they're supposed to trigger when
getTextIndex1() returns the same result more than once.

The same bug also appeared (and has been fixed) in getTextIndex3(),
but there it just caused the same nonsense letter to appear twice.
2014-05-04 22:27:47 +02:00
johndoe123
13507d1858 NEVERHOOD: Fix bug #6540: 'NEVERHOOD: lightswitch graphical glitch' 2014-04-17 23:20:47 +02:00
johndoe123
191b258593 NEVERHOOD: Fix compilation 2014-04-17 23:17:39 +02:00
johndoe123
c0d83b0b29 NEVERHOOD: Fix bug #6520: 'NEVERHOOD: buggy sound of the waterfall' 2014-04-17 23:02:25 +02:00
Strangerke
1a18d1a50e NEVERHOOD: Fix some uninitialized variables 2014-03-19 19:45:51 +01:00
Filippos Karapetis
3536271633 NEVERHOOD: Fix an off-by-one error in Klogg's letters
This fixes the buggy Willie letter appearing among the ones from Klogg
(bug #6513)
2014-02-20 12:28:35 +02:00