Commit Graph
22 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 3a51911db2 NANCY: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Kaloyan Chehlarski 0bab0e8160 NANCY: Clean up sound code 2021-05-18 00:44:18 +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 4b48535395 NANCY: Add support for DiamondWare v1.1 sound files
Bumped up the supported version of DWD files to 1.1 so a couple of
special cases in The Vampire Diaries can play.
2021-04-29 15:58:59 +03:00
Kaloyan Chehlarski cf43a600f5 NANCY: Implement sound in The Vampire Diaries
Unlike all later games using the engine, TVD sounds are stored in
an obscure file format (.dwd, DiamondWare Digitized). This commit adds support for uncompressed .dwd files and thus enables audio
in the game.
2021-04-28 17:02:59 +03:00
fracturehill 90c4f0c4dc NANCY: Move hardcoded data
Moved all hardcoded engine data that changes between games (e.g. number
of items, number of event flags) to a dedicated file and added a function for
accessing it in NancyEngine.
2021-04-24 23:59:03 +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 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 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 89fd430243 NANCY: Fix wrong sound channel id checks
Fixed an incorrect check for maximum channelID inside SoundManager.
2021-03-25 19:52:50 +02:00
fracturehill 0d4516c897 NANCY: Initialize sound channel types from a table
Added a static table of all nancy1 sound channel types, and changed initSoundChannels() so that it reads from the table instead of manually initializing channels one by one.
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 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 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 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
fracturehill f5ec222c95 NANCY: Fix sound channel clashes
Added functions that directly take a SoundDescription object and only execute if its name isn't NO SOUND. This fixes the elevator in nancy1 taking too long to start.
2021-03-24 17:20:46 +01:00
fracturehill d64a309fb3 NANCY: Small code refactor
Renamed and moved a few struct definitions to commontypes.h, added some convenience functions to Scene and removed a couple of unused variables.
2021-03-24 17:20:46 +01:00
fracturehill a96f6fdebd NANCY: Move NO SOUND keyword check
Some action records have fields for sound that can be left unused by putting "NO SOUND" in the filename string. This commit moves the check for that keyword inside sound.cpp so it isn't repeated everywhere.
2021-03-24 17:20:46 +01:00
fracturehill e4890a18fc NANCY: Sound manager improvements
The original engine stores sound information in at least four different types of structs, all of which can now be loaded and played back. Also implemented sound types, which will be configurable from the ScummVM interface, added the correct number of sound channels, and implemented sound fx in a couple of action record types.
2021-03-24 17:20:46 +01:00