Commit Graph
100 Commits
Author SHA1 Message Date
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh ee57380de7 ENGINES: JANITORIAL: Remove 'virtual' when override is specified 2021-11-14 14:32:04 +02:00
Kaloyan Chehlarski 913f4502a6 NANCY: Implement palette change action record types
Implemented the PaletteThisScene and PaletteNextScene action record
types, which change the viewport video's palette in TVD.
2021-05-07 23:09:52 +03:00
Kaloyan Chehlarski 7ac4cb807a NANCY: Fix PlayDigiSoundAndDie action record in The Vampire Diaries
PlayDigiSoundAndDie now loads correctly in The Vampire Diaries.
2021-05-07 23:09:51 +03:00
Kaloyan Chehlarski 3013d07e81 NANCY: Implement PlaySoundPanFrameAnchorAndDie action record
Implemented the PlaySoundPanFrameAnchorAndDie action record
type and added support for panning audio to the sound manager.
2021-05-07 23:09:51 +03:00
Orgad Shaneh a05e54f00c JANITORIAL: Remove trailing whitespaces 2021-05-04 11:46:30 +03:00
Kaloyan Chehlarski 6efcbebef5 NANCY: Fix primary video in The Vampire Diaries
Primary videos in The Vampire Diaries now load and display correctly.
2021-04-29 15:58:59 +03:00
Kaloyan Chehlarski 7819ef1c17 NANCY: Fix PlaySoundMultiHS action record in The Vampire Diaries
Action record type PlaySoundMultiHS no longer crashes the game
when playing The Vampire Diaries.
2021-04-28 17:02:58 +03:00
Kaloyan Chehlarski 090b909631 NANCY: Secondary video fixes
Fixed the logic in PlaySecondaryVideo so it properly displays TVD's
character portraits.
2021-04-28 17:02:58 +03:00
fracturehill 5b4b78123b NANCY: Primary video fixes
Primary video now affects the mouse the same way it does in the original game: the cursor gets moved to a set location when starting a conversation, and is blocked from moving above a certain threshold. Also removed the static pointer from PlayPrimaryVideoChan0.
2021-04-17 15:21:55 +03:00
fracturehill 43c4c62f40 NANCY: Cursor fixes
When exiting a scene while holding an item, the cursor shown is now the fourth version of the item cursor, just as it is in the original engine. When entering a scene through the map while holding an item, the cursor no longer gets reset to the default one.
2021-04-17 15:20:59 +03:00
fracturehill a29cdd43c0 NANCY: Make RenderObject non-abstract
Made RenderObject non-abstract so it can be used in some simple cases without the need for subclassing.
2021-04-15 15:12:00 +03:00
fracturehill 7e50ecd0ac NANCY: Add stubs for The Vampire Diaries action record types
Added declarations for all action record types unique to The Vampire Diaries. Made all unimplemented action record types output a debug message when encountered.
2021-04-15 15:11:58 +03:00
fracturehill 60a17e75b7 NANCY: Fix action record graphics after state change
Fixed all instances where an action record would incorrectly register its graphics when exiting the Scene state instead of when entering it.
2021-04-13 23:21:17 +03:00
fracturehill 864db52a09 NANCY: Implement Second Chance
Implemented Second Chance, which is the original engine's autosave system. This is disabled by default, since it replaces ScummVM's built-in autosaves.
2021-04-13 23:21:16 +03:00
Thierry Crozat 5dde667371 NANCY: Silence variable shadowing warnings 2021-04-13 20:49:46 +03:00
fracturehill 9f35d133ca NANCY: Implement sound options, add options dialog
Hooked the engine into ScummVM's speech/subtitle settings, and added two extra options for player and character speech. Added a custom settings dialog which gets shown both inside the Edit Game window and the in-game Settings.
2021-04-08 21:42:53 +03:00
fracturehill 9bb543a69e NANCY: Common sound handling changes
SoundManager is now responsible for loading and storing all common sounds (sounds with their own BOOT chunk). All playSound() calls with a hardcoded channel ID now use the chunk name instead. Also fixed some sound inaccuracies when switching between states.
2021-04-08 21:42:52 +03:00
fracturehill a8a7f0ee57 NANCY: Fix MapCallHot1Fr action record
Fixed the MapCallHot1Fr action record, which accidentally got broken during a previous refactoring.
2021-04-08 21:42:52 +03:00
fracturehill 85f8bf294d NANCY: Includes cleanup
Reordered and cleaned up #includes in the engine.
2021-04-01 21:25:32 +03:00
fracturehill ff078328bc NANCY: Includes cleanup
Cleaned up the engine's #includes. Also moved the NancyEngine::GameState enum to commontypes.h and renamed it to NancyState.
2021-03-26 01:17:07 +02:00
fracturehill b175c5fd10 NANCY: Initialize class members
Class members that get properly initialized after the constructor now also get default values during construction to silence warnings. Also fixed a couple of broken entries in response.cpp that were uncovered by these changes.
2021-03-25 19:52:53 +02:00
fracturehill cd7f9be183 NANCY: Add video load checks
Added checks after calling loadFile() on a video decoder.
2021-03-25 19:52:51 +02:00
fracturehill 0656e2473c NANCY: Initialize local variables
Initialize local variables in a couple of functions to silence warnings.
2021-03-25 19:52:51 +02:00
fracturehill 2f77d27bf6 NANCY: Translation fixes
Unmarked the string inside telephone.cpp as being translatable since it's an in-game string, and removed the file from POTFILES. Also added a comment explaining one of the strings inside cheat.cpp.
2021-03-25 19:52:50 +02:00
fracturehill 1907b5f741 NANCY: Remove static members of GraphicsManager
Made GraphicsManager's static members non-static.
2021-03-24 17:20:46 +01:00
fracturehill 16c083d015 NANCY: Add warnings for unknown dependency types
Added the two unknown dependency types to the ActionRecord::DependencyType enum and added warnings for when they get used.
2021-03-24 17:20:46 +01:00
fracturehill eb2fe847d7 NANCY: Improve code readability in actionmanager.cpp
Added a local variable to the debug output section of ActionManager::addNewActionRecord() to improve code readability.
2021-03-24 17:20:46 +01:00
fracturehill cb63f50f71 NANCY: Remove underscore from struct member names
Removed the underscores from the names of a couple of struct members that were erroneously added a few commits back.
2021-03-24 17:20:46 +01:00
fracturehill 0d8d31ffd0 NANCY: Formatting fixes
Added spaces after the = operator in every declaration of a pure virtual or defaulted function.
2021-03-24 17:20:46 +01:00
fracturehill 56c005ef2c NANCY: Mark functions and iterators as const
Added the const keyword to several auto & iterators inside for loops, as well as to a number of class member functions.
2021-03-24 17:20:46 +01:00
fracturehill bfc6586f78 NANCY: Add reserve() calls before initializing arrays
Added calls to reserve() before initializing most arrays in the engine to reduce unnecessary allocations when pushing back elements one by one.
2021-03-24 17:20:46 +01:00
fracturehill 0c5b6a0244 NANCY: Formatting fixes
Fixed a couple of else statements that were not following the formatting conventions and a double semicolon in recordtypes.cpp.
2021-03-24 17:20:46 +01:00
fracturehill 86e656f709 NANCY: Remove static members of SliderPuzzle
Moved the static members of SliderPuzzle that were used to save the puzzle's state to a struct inside Scene. Removed the SliderPuzzle::synchronize() function and incorporated its logic into Scene::synchronize(). Also fixed a possible use of uninitialized variables inside the synchronization code.
2021-03-24 17:20:46 +01:00
fracturehill a2efd6e867 NANCY: Formatting fixes
Added a missing newline at the end of telephone.cpp, removed an unnecessary newline in nancy.cpp, and corrected a couple of end of namespace comments.
2021-03-24 17:20:46 +01:00
fracturehill 8d774ba1e3 NANCY: Add POTFILES and mark translatable strings
Added a POTFILES that was previously missing. Marked the ringing string in telephone.cpp and the keymapper descriptions in input.cpp as translatable.
2021-03-24 17:20:46 +01:00
fracturehill 36883885f0 NANCY: Move ActionRecord::finishExecution() outside header file
Added an actionrecord.cpp file and moved the definition of ActionRecord::finishExecution() inside it.
2021-03-24 17:20:46 +01:00
fracturehill e9adea4c4e NANCY: Formatting fixes
Almost every file in the engine code was using spaces instead of tabs, which is now fixed. Also added some missing spaces in a couple of files.
2021-03-24 17:20:46 +01:00
fracturehill 54bdb420b0 NANCY: String reading fixes
Added a \0 to every instance of a char buffer being loaded into a Common::String. Fixed an instance of a large buffer getting repeatedly allocated and deleted inside a for loop. Fixed an instance of a small char buffer being unnecessarily allocated on the heap. Also added a readFilename() convenience function to util.h for reading 8-character filenames found in the data.
2021-03-24 17:20:46 +01:00
fracturehill 6728c96e68 NANCY: Add underscore to class member names
Fixed many instances of class member names not beginning with an underscore.
2021-03-24 17:20:46 +01:00
fracturehill a286a287f2 NANCY: Replace NanEngine macro
Replaced the nonstandard NanEngine macro with a proper pointer to the current NancyEngine instance.
2021-03-24 17:20:46 +01:00
fracturehill e324adf05f NANCY: Code cleanup
Did some cleanup of the engine, mostly focusing on the NancyEngine class. Reordered several classes' members, removed unused functions, edited comments, and renamed arfactory_v1.cpp to arfactory.cpp.
2021-03-24 17:20:46 +01:00
fracturehill a42de3037f NANCY: Wait for video end during dialogue
Primary video now waits for the NPC video to end before changing scenes/playing a response sound. This usually adds a small delay at the end of a dialogue line, making the conversation sound more natural.
2021-03-24 17:20:46 +01:00
fracturehill da559b5fe0 NANCY: Display The Vampire Diaries video correctly
The Vampire Diaries' videos are all upside down after decompression, need a palette to be loaded from a separate bitmap file, and background videos are also quarter size (1/2 width and height). This commit adds a GraphicsManager function for loading a Surface or a raw buffer into a ManagedSurface, applying all transformations needed to display it correctly.
2021-03-24 17:20:46 +01:00
fracturehill 3922a3dc30 NANCY: Load The Vampire Diaries secondary video
Added code to load The Vampire Diaries' secondary video format, which includes a palette file field and some unknown extra data.
2021-03-24 17:20:46 +01:00
fracturehill 7220797ca4 NANCY: Remove redundancy in transparency handling
Removed the BlitType enum and getBlitType() method from RenderObject, and replaced them with setTransparent(). This was done to reduce redundant code, since ManagedSurface can already pick between a transparent and regular blit depending on whether the provided source surface has a transparent color set. Also added the correct transparent color for The Vampire Diaries, and the transparent color for nancy1 now gets calculated on the fly.
2021-03-24 17:20:46 +01:00
fracturehill 6eb5be2c51 NANCY: Action record reading changes
Action records are no longer expected to return how much data they've read, which will be helpful with supporting different versions in the same class. Also added a much more helpful error message on a bad read.
2021-03-24 17:20:46 +01:00
fracturehill 5440559918 NANCY: Add support for 8-bit color
Added generic methods for getting the pixel format and transparent color. Also added a method for loading an image directly into a ManagedSurface, which also loads the palette and lets The Vampire Diaries logo display properly.
2021-03-24 17:20:46 +01:00
fracturehill b3222b7439 NANCY: Resource manager improvements
The resource manager now keeps track of its cif trees and calls to loadImage() and loadData() don't need to specify a cif tree. In order to support The Vampire Diaries, IFFs can now be loaded from their own dedicated .iff file, and the engine doesn't require a cif tree to be loaded on boot.
2021-03-24 17:20:46 +01:00
fracturehill 20f432f8d3 NANCY: Engine refactor
Made all states (Scene, Credits, Help, etc.) singletons, as well as subclasses of a common State parent with a proper state switching API. Moved the OnPause virtual function from RenderObject to ActionRecord and hooked it into the state switching code. Also got rid of the NancyEngine pointer that got passed around between most classes, and replaced it with several convenience macros. As a result of these changes action records that render to the viewport no longer disappear after opening the menu, and state changes feel snappier.
2021-03-24 17:20:46 +01:00