Commit graph

950 commits

Author SHA1 Message Date
Kaloyan Chehlarski
fae332c394 NANCY: Remove unstable flag from compressed nancy3 variant 2025-03-23 20:12:51 +01:00
Filippos Karapetis
bc9f8a0679 NANCY: Fix check for minor version of nancy.dat
This makes sure that the added field will be properly read when the
minor version of nancy.dat is updated
2025-03-18 22:28:27 +02:00
Filippos Karapetis
ff79b4ab8d NANCY: Fix warning 2025-03-01 22:12:37 +02:00
Eugene Sandulenko
949027a01e
ENGINES: [l-w]: Turn debug enums from bitfield into plain enums 2025-02-22 21:55:59 +01:00
Cameron Cawley
645f5d2e36 GRAPHICS: Remove overrideColor from ManagedSurface::transBlitFrom 2024-12-30 10:59:16 +02:00
Eugene Sandulenko
fdecb6afca ENGINES: Add components to configure.engine's explanatory comment 2024-12-25 00:34:39 +01:00
tunnelsociety
e877ebc170 NANCY: Fixup RippedLetterPuzzle fix
If a piece is swapped with another piece, the LastPos is forgotten too soon;
after viewing an inventory item with the new piece in hand, that piece can't be
put down.
2024-12-06 11:48:37 +01:00
Kaloyan Chehlarski
211815a566 NANCY: Fix language support
The data in nancy.dat was reliant on the ordering of
the Common::Language enum, which this broke Russian
game variants. This commit adds support for a new
chunk type that defines a custom enumeration instead.
2024-11-27 11:04:29 +01:00
Kaloyan Chehlarski
809bd16cb1 NANCY: Fix console command in The Vampire Diaries
The scan_ar_type command didn't take into account loose
.iff files
2024-11-27 11:04:29 +01:00
Kaloyan Chehlarski
f4099d1f87 NANCY: Fix OrderingPuzzle in The Vampire Diaries
Reading of the data was wrong after a refactoring and
rendered the game unfinishable.
2024-11-26 11:32:24 +01:00
Kaloyan Chehlarski
29aba2c259 NANCY: Fix startup crash in The Vampire Diaries
It seems AVIDecoder::decodeNextFrame() may return a
nullptr instead of a surface.
2024-11-26 11:32:23 +01:00
Kaloyan Chehlarski
ab7495ebf9 NANCY: Move numLoops adjustment for sounds
In a previous commit, a code path that would adjust
the number of loops for a sound was forgotten and
rendered useless. This commit moves it earlier in
the call chain, where it could still have an effect.
2024-11-13 15:05:00 +01:00
D G Turner
5fa1800f46 NANCY: Fix Set But Unused Variable GCC Compiler Warning 2024-11-12 22:08:54 +00:00
Hubert Maier
830ed3c53b JANITORIAL: NANCY: Fix typos 2024-09-16 01:51:50 +03:00
scummvmuser
319fcb7c97 NANCY: Fix leak in scene.cpp
`buf` wasn't freed.
The assignment to `description` copies the string; no need for heap here.
2024-08-05 22:11:53 +03:00
scummvmuser
282ad5a719 NANCY: Fix an alloc-dealloc mismatch in cif.cpp
CifFile::createReadStream's `buf` is free()d by way of
Common::DisposablePtr<unsigned char const,
    Common::MemoryReadStream::CastFreeDeleter>::~DisposablePtr()
2024-07-29 21:59:48 +02:00
scummvmuser
de4f8ca634 NANCY: Fix an alloc-dealloc mismatch in iff.cpp
IFF::getChunkStream's `dup` is free()d by way of
Common::DisposablePtr<unsigned char const,
    Common::MemoryReadStream::CastFreeDeleter>::~DisposablePtr()
2024-07-29 21:59:48 +02:00
scummvmuser
bf61247bc5 NANCY: Fix an alloc-dealloc mismatch in commontypes.cpp
StaticData::readData's `patchBuf` is free()d by way of
Common::DisposablePtr<unsigned char const,
    Common::MemoryReadStream::CastFreeDeleter>::~DisposablePtr()
2024-07-29 21:59:48 +02:00
scummvmuser
10f5465991 NANCY: Fix an alloc-dealloc mismatch in cif.cpp
CifTree::createReadStreamForMember's `buf` is free()d by way of
Common::DisposablePtr<unsigned char const,
    Common::MemoryReadStream::CastFreeDeleter>::~DisposablePtr()
2024-07-29 21:59:48 +02:00
Kaloyan Chehlarski
dd6e641f9c NANCY: Fix crash loading scene with PuzzleData
A scene that contains one of the puzzles that have an
associated PuzzleData struct would previously crash on load,
because loading from a save would clear the PuzzleData
struct after the pointer to it was acquired by the puzzle.
This commit adds second calls to getPuzzleData() in
those puzzles, ensuring the pointer will be correct.
2024-07-21 23:05:55 +02:00
Kaloyan Chehlarski
c07720c1c0 NANCY: Fix RippedLetterPuzzle breakage on exit
The puzzle may be left in a broken state when a save is
initiated or when clicking a scene item while holding a
puzzle piece. The held piece is now tracked inside the
puzzle state object, and put in its place whenever the
game is saved/the puzzle is reopened.
2024-07-21 21:51:28 +02:00
Kaloyan Chehlarski
0dd0e487e9 NANCY: Fix memory leak in SoundManager
The LoopingAudioStream object that was being created
on the spot and passed to the Mixer when calling playSound was not being tracked anywhere, and was
getting leaked (though the underlying stream was
properly deleted). This commit adds a pointer to that
(maybe) looped stream and makes sure the underlying
data is getting deleted through it.
2024-07-21 21:10:01 +02:00
Cameron Cawley
ff530edcb1 GRAPHICS: Deprecate ManagedSurface methods that implicitly copy pixel data 2024-07-02 13:31:18 +01:00
Le Philousophe
7e0048b4a3 ENGINES: Add ADDynamicGameDescription class
This class manages a buffer where all data usually stored in detection
plugin will get copied before unloading the plugin and starting the
game.

This class expects that two functions are present in every
GameDescription: sizeBuffer which calculates how many bytes we will need
to store the entry in RAM and toBuffer which copies the data in the
buffer and fix the pointers in the class.
At the end, it is expected that an ADDynamicGameDescription doesn't
depend anymore on data stored in the detection plugin.

The AD_GAME_DESCRIPTION_HELPERS macro allow to implement these functions
in all GameDescription which don't have any pointer except those in
ADGameDescription.
2024-06-30 18:39:06 +02:00
Le Philousophe
b61bd3ff85 ENGINES: Create a type aware advanced meta engine 2024-06-30 18:39:06 +02:00
Le Philousophe
90b886097f ENGINES: Create a type aware advanced detector 2024-06-30 18:39:06 +02:00
scummvmuser
3f9b256552 NANCY: Highlight Done button in Game Setup 2024-06-30 14:08:20 +02:00
scummvmuser
acc5d24fa3 NANCY: Add sound to toggles in Game Setup 2024-06-29 18:59:37 +02:00
Kaloyan Chehlarski
02722def86 NANCY: Fix Vorbis sound reading
Vorbis-encoded .his sounds were being read incorrectly.
Specifically, the size property inside the headers was
assumed to refer to the size of the file's body; instead, it
appears to refer to the uncompressed size of the sound.
This would then cause an assertion in
MemorySubReadStream when extracting those files
from a compressed game variant, since the code was
attempting to seek to the "end" of a stream with a size
larger than the file it's coming from.
2024-06-22 21:30:39 +02:00
Cameron Cawley
1357bfe672 COMMON: Avoid including engine headers in common code for DebugChannelDef 2024-06-20 20:15:57 +01:00
Kaloyan Chehlarski
4a6cd7f0be NANCY: Add nancy7 detection entry
Provided by user ModiTorsen on the bugtracker.
Fixes #15088
2024-05-07 18:23:41 +02:00
Kaloyan Chehlarski
8854f6e872 NANCY: Add nancy6 detection entry
Provided by user ModiTorsen on the bugtracker.
Fixes #15087
2024-05-06 12:03:14 +02:00
Kaloyan Chehlarski
1781a1e140 NANCY: Fix SliderPuzzle for pre-nancy9 games
The last changes to the class broke older titles
which use the SPUZ chunk.
Fixes #15097
2024-05-05 21:03:05 +02:00
Kaloyan Chehlarski
b9aa46c4df NANCY: Merge LOAD structs 2024-05-05 21:03:05 +02:00
Matthew Jimenez
ee5ebec7ca IMAGE: Remove palette start from image decoder.
The palette start value was always zero, adding complexity without benefit.
2024-03-31 23:16:59 +03:00
Kaloyan Chehlarski
b1a861b50d NANCY: JANITORIAL: Fix trailing whitespace/tabs 2024-02-19 20:46:17 +01:00
Kaloyan Chehlarski
f89967c979 NANCY: Implement NewPhone
Added support for the new Telephone AR type, which
adds a cellphone display with a phone number directory,
a dial button, and conditional phone numbers.
2024-02-18 22:31:13 +01:00
Kaloyan Chehlarski
18eea6d464 NANCY: Add support for nancy9 RippedLetterPuzzle
In nancy9 this record got an upgrade allowing for an
extra solution, as well as duplicated elements.
2024-02-18 22:31:13 +01:00
Kaloyan Chehlarski
2e22962909 NANCY: Add support for TextBoxWrite with no string
Somewhere around nancy9 (may happen earlier, too),
the TextBoxWrite record added support for reading its
string from the Autotext chunk.
2024-02-11 22:53:22 +01:00
Kaloyan Chehlarski
f85277f82a NANCY: Add support for nancy9 SliderPuzzle
The record works identically to the one in nancy1, with
the exception that the start positions are no longer pulled
from a SPUZ chunk.
2024-02-11 22:53:22 +01:00
Kaloyan Chehlarski
88574bd47c NANCY: Fix crash in Conversation 2024-02-11 22:53:22 +01:00
Kaloyan Chehlarski
b2231ac3cd NANCY: Implement Autotext with hotspots
Added support for hotspots that link to a new scene,
as introduced in nancy9.
2024-02-11 22:53:22 +01:00
Kaloyan Chehlarski
e25018f892 NANCY: Allow later games to have 999 saves
Added a hidden ConfMan property that controls how many
saves are allowed, and added code that sets it to 8 at
startup, provided the game is nancy7 or earlier. This makes
sure that later games, which had infinite saves, can have
their save menus supported correctly.
2024-02-11 22:53:22 +01:00
Kaloyan Chehlarski
4541d085ca NANCY: Disable buttons/save when a Movie is active
The original engine specifically disables exiting the Scene
when a SecondaryMovie is playing.
2024-02-11 00:41:30 +01:00
Kaloyan Chehlarski
5695018cd3 NANCY: Implement InteractiveVideo
Implemented an action record type that adds hotspots
on top of a SecondaryMovie.
2024-02-11 00:41:30 +01:00
Kaloyan Chehlarski
01eefffad6 NANCY: Fix memory leak in ResourceManager 2024-02-11 00:41:30 +01:00
Kaloyan Chehlarski
758db1bfb1 NANCY: Fix memory leak when reading .dat file 2024-02-11 00:41:30 +01:00
Kaloyan Chehlarski
3d9a61f904 NANCY: Fix memory leak in Conversation 2024-02-11 00:41:30 +01:00
Kaloyan Chehlarski
0c2e54416e NANCY: Update engine status comment 2024-02-11 00:41:30 +01:00
Kaloyan Chehlarski
ad21d8b566 NANCY: Fix ResourceManager memory leak
The ResourceManager was never getting deleted on
engine exit. Also, it is now instantiated in the engine
constructor, just like the other managers.
2024-02-11 00:41:30 +01:00