415 Commits

Author SHA1 Message Date
David Fioramonti
771be9e3a9 TITANIC: Address readSavegameHeader compiler warning
A function had a bool return that was not being used
now it is checked and an error is issued if the call fails.
2018-06-30 14:30:35 -07:00
Adrian Frühwirth
8885b37abb TITANIC: Enforce code formatting guidelines 2018-05-07 20:06:29 +02:00
Adrian Frühwirth
10abb0c646 TITANIC: Fix discrepancy between readSavegameHeader() declaration and definition
This should have been part of commit 00e59a3122.
2018-04-22 22:45:54 +02:00
Adrian Frühwirth
b1b83ac954 Revert "TITANIC: Fix memory leak due to save thumbnail changes"
This was a miss in commit 00e59a3122. The new parameter was supposed
to be called skipThumbnail and default to true instead.
For consistency's sake (the rest of the tree uses skipThumbnail, not
loadThumbnail) I'm reverting this and will separately update the
declaration to how it should have been from the beginning.

Thanks dreammaster!
2018-04-22 22:42:40 +02:00
Paul Gilbert
ab3f397e2d TITANIC: Fix memory leak due to save thumbnail changes 2018-04-22 11:44:15 -04: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
Torbjörn Andersson
5e94e8ab42 TITANIC: Fix small memory leak 2018-03-19 07:33:23 +01:00
Paul Gilbert
c339e3261d TITANIC: Renamed GlobalSound methods to AmbientSound 2017-10-13 18:03:30 -04:00
Paul Gilbert
5ab826f135 TITANIC: Add some guards against using the game manager during game exit 2017-09-24 12:46:32 -04:00
Paul Gilbert
47f6c2e9b9 Merge pull request #1010 from dreammaster/debugger_params
GUI: Support double quoted debugger parameters
2017-09-24 12:18:15 -04:00
Paul Gilbert
af99606db8 TITANIC: Fix identified redundant tests & assignments 2017-09-18 22:25:54 -04:00
Paul Gilbert
0c6b15d8d0 TITANIC: Fix regenerating CGameObject _movieRangeInfoList during saving 2017-09-18 21:26:04 -04:00
Paul Gilbert
f6ef3cbc9e TITANIC: Fix memory leak on thumbnails when loading savegames 2017-09-18 21:00:39 -04:00
Paul Gilbert
c8c83145a8 TITANIC: The hasAudioTiming code was just an isActive flag 2017-09-11 19:35:21 -04:00
Paul Gilbert
aa3adfb4b1 TITANIC: Allow GMM loading from the copyright and continue dialog 2017-09-05 23:01:12 -04:00
Paul Gilbert
f9bec828de TITANIC: Support full view specification in debugger room command 2017-09-04 10:15:53 -04:00
David Fioramonti
c96b01b82e TITANIC: Reduce header includes for titanic.h
I reduced the header includes a lot in Titanic.h and forward
declared when I could. Titanic.h was including a lot and
a lot of functions that were including it were not using its
API. This will help make it more clear which implementation
files are using which class since they will just need to include
which ones they need.

I also moved the debug related items in Titanic.h into the debugger
header.

I also reordered several of the the header includes to be local to
global.
2017-08-24 04:06:54 -07:00
Paul Gilbert
0411e1cdc5 TITANIC: Fix incorrect cursor after getting nose 2017-08-23 21:56:33 -04:00
Paul Gilbert
ee458e557e TITANIC: Fix magazine being winnable multiple times 2017-08-17 19:57:42 -04:00
Paul Gilbert
e846a103f4 TITANIC: Fix receiving any SuccUBus mail in the Bomb room SuccUBus 2017-08-13 15:00:41 -04:00
Paul Gilbert
8fe7187060 TITANIC: Fix resuming well music after looking down well 2017-08-12 15:50:52 -04:00
Paul Gilbert
eaab1f0472 TITANIC: Fix duplication of RealLife icons when passenger class changes 2017-08-12 11:07:25 -04:00
Paul Gilbert
660f7bf114 TITANIC: Further improvements to arrow key movement
The movement code, when deciding on an item or link that matches the
desired direction, will check five points on the object/links area..
center, left edge, right edge, top edge, and bottom edge. For each
of these, it makes sure that at that point, clicking will actually
get passed to it. Otherwise, it moves onto one of the other edges.
This helps avoid issues where links weren't working because standard
scene objects were partially obscuring them.
2017-08-08 22:24:22 -04:00
Paul Gilbert
aef786fcc3 TITANIC: Hook in the original game's secret cheat room
You can either use a special Ctrl-C key combination, or use the
'cheat' command in the debugger
2017-08-07 21:10:24 -04:00
Paul Gilbert
c55e83e776 TITANIC: Remove development link left in computer screen view 2017-08-06 17:45:27 -04:00
Paul Gilbert
89457af33e TITANIC: Don't allow movement link to be used in Starfield Puzlze
The scene has an unused right turn link that wasn't used, and is
covered by the starview. Since movement now uses simulated mouse
clicks, the worst result of clicking right arrow is simply that
a star may be accidentally selected. But for cleanliness, it was
best to fix it. It also allowed the creation of code that other
objects in the view can use to override default movement logic,
just in case it's needed.
2017-08-06 15:25:28 -04:00
Paul Gilbert
a14bc53ba5 TITANIC: Fix arrow key movement in front of Parrot cage 2017-08-06 14:40:44 -04:00
Paul Gilbert
380a9da4c9 TITANIC: Changing arrow movement to be done via simulated mouse clicks 2017-08-06 12:30:27 -04:00
Paul Gilbert
07e70d9896 TITANIC: Create new CMovementMsg for new movement functionality
This also moves logic for detecting which movement is associated
with given keycodes and cursors to CMovementMsg and CLinkItem,
which are better suited to contain the logic
2017-08-06 11:58:06 -04:00
Paul Gilbert
bbd9247eb8 TITANIC: Maintain static movie frames on objects across saves 2017-08-05 22:38:00 -04:00
Paul Gilbert
e29b2fc731 TITANIC: Fix original savegames from the bar not loading 2017-08-05 19:06:35 -04:00
Paul Gilbert
503b9c16d2 TITANIC: Don't show invalid meta info for original game saves 2017-08-05 18:34:50 -04:00
Paul Gilbert
5984111a26 TITANIC: Cleanup and fix for multi drop targets
The fix deals with a bug in the original that if an item was used
that the drop target didn't handle, the item wouldn't be returned
to the player's inventory
2017-08-05 15:49:17 -04:00
Paul Gilbert
1e3a6be863 TITANIC: Fix arrow keys allow getting to bridge before Titania is fixed 2017-08-05 11:26:41 -04:00
Paul Gilbert
3a798b09be TITANIC: Fix arrow movements ignoring restricted moves 2017-08-04 22:20:25 -04:00
Paul Gilbert
e44c5bdcc6 TITANIC: Introduce movement via arrow keys
This also fixes a bug with Page Up, Down, Home, & End not working for
the Conversation tab. Additionally, code for scrolling individual
lines in the conversation and glyphs via the arrow keys has been
removed in favor of this centrallised movement, since they were
somewhat redundant, and the mouse wheel can be used for scrolling.
2017-08-04 22:00:49 -04:00
Paul Gilbert
f9c370d942 TITANIC: Fixes for names in the CursorId enum 2017-08-04 21:08:35 -04:00
David Fioramonti
eb05082617 TITANIC: Allow last saved game to be loaded 2017-08-03 16:14:20 -07:00
David Fioramonti
293df6a68f TITANIC: Max saved games const centralized
Before the const specifying the max number of save/load games was
in titanic.h, core/project_item.cpp, main_game_window, and detection.cpp.

Since they all inherit from titanic.h they should just use the const there.

Also the saved game const in core/project_item.cpp was named differently
so I also changed that.
2017-08-03 16:13:34 -07:00
Paul Gilbert
bc29ee474a TITANIC: Handle brief freeze if prologue credits are skipped 2017-07-31 22:20:50 -04:00
Paul Gilbert
06566151f9 TITANIC: Update cursor after transitioning to new views 2017-07-30 15:58:22 -04:00
Paul Gilbert
7e74c575da TITANIC: Fix conversation with Liftbot not working after twirling around 2017-07-24 21:02:50 -04:00
Bastien Bouclet
bc952807ec TITANIC: Adjust the switch/case fall-through comments
This way, GCC 7 does not generate a warning for those cases when
-Wimplicit-fallthrough=3 is enabled, which is now the default.
2017-07-23 11:12:12 +02:00
Paul Gilbert
3525d5d4c9 TITANIC: Fix crash trying to restart game after returning to launcher 2017-07-18 22:09:57 -04:00
Paul Gilbert
850dcdbdf8 TITANIC: Add a VolumeMode enum 2017-07-16 16:18:16 -04:00
Paul Gilbert
8a7dba17b7 TITANIC: Fixes for correctly display of drop targets 2017-07-09 18:50:11 -04:00
Paul Gilbert
f513194d1b TITANIC: Rename CDropTarget _showItem to _hideItem 2017-07-08 21:15:28 -04:00
Paul Gilbert
fbb4cb9b31 TITANIC: Don't allow saving during the Doorbot prologue
This works around a bug in the original where if you saved immediately
after getting the PET, the savegame would put in in an invalid state
2017-07-02 22:02:24 -04:00
Paul Gilbert
a1b4b017f8 TITANIC: Further fix for tracking total play time 2017-06-17 16:43:44 -04:00
Paul Gilbert
9dbd9c567e TITANIC: Fix maintaining total playtime for savegames 2017-06-17 13:39:13 -04:00