Commit Graph
29 Commits
Author SHA1 Message Date
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01: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 e8a8150f8d NANCY: Fix The Vampire Diaries viewport edges and movement
The viewport edges in TVD now have the same behavior as the
original engine, and movement is now at the correct speed.
2021-04-26 19:42:17 +03:00
fracturehill 85f8bf294d NANCY: Includes cleanup
Reordered and cleaned up #includes in the engine.
2021-04-01 21:25:32 +03:00
fracturehill 97b4ef1301 NANCY: Fix console commands
Fixed the play_video and show_image console commands, which were using the wrong pixel format and drawing broken colors.
2021-04-01 21:25:31 +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 1907b5f741 NANCY: Remove static members of GraphicsManager
Made GraphicsManager's static members non-static.
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 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 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 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 f24cc5ee24 NANCY: Add method for loading a palette from external file
Added the loadSurfacePalette() method to GraphicsManager, which loads a palette from an external .bmp file.
2021-03-24 17:20:46 +01:00
fracturehill 8fccf950fe NANCY: Initialize additional surfaces with screen format
Changed surfaces in the textbox and inventory box so they are now initialized with the screen pixel format instead of the one used inside images. With this change The Vampire Diaries no longer fails a particular assert in the ManagedSurface blitting code, and can now boot successfully.
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 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 46ed7dce87 NANCY: Fix show_image and play_video debug commands
Added code to make the show_image and play_video debug commands play nice with the new graphics manager.
2021-03-24 17:20:46 +01:00
fracturehill 05ac9934c7 NANCY: Global main menu support
Added proper support for the GMM, so videos will not fast-forward on resume and timers will not include the time spent outside the game.
2021-03-24 17:20:46 +01:00
fracturehill 3aaf2a9bea NANCY: Major engine rewrite
Rewrote most of the engine using a much more object-oriented approach and using more of ScummVM's common classes. This design deviates quite a lot from the original engine's, but should be more maintainable and extensible in the future.
2021-03-24 17:20:46 +01:00
fracturehill 673bfec209 NANCY: Initial dialogue implementation
Implemented most of the PlayPrimaryVideoChan0 action record, which is used in all dialogue and the intro cutscene. For now the audio and video are out of sync, the scrollbar doesn't work, and the mouse isn't constrained.
2021-03-24 17:20:46 +01:00
fracturehill fb2a65a8e7 NANCY: Initial inventory implementation
Added an initial implementation of the inventory, letting the player pick up and hold items. Interaction between items and the viewport is still TODO.
2021-03-24 17:20:46 +01:00
fracturehill 6ce4390b93 NANCY: Add map location labels and button
Added the place names that appear when hovering a location on the map screen and the button to return to the last scene. Also made some minor improvements to the input manager.
2021-03-24 17:20:46 +01:00
fracturehill 9152deeac7 NANCY: Implement map
Implemented the map state, as well as the two main action record types that call it. Also made some minor related changes to the scene and graphics managers.
2021-03-24 17:20:46 +01:00
fracturehill b642ca3b4d NANCY: Implement secondary movie
Implemented the PlaySecondaryMovie action record, which is used in some death scenes. Also made some minor changes to a few other action records and the sound manager.
2021-03-24 17:20:46 +01:00
fracturehill 2a6555fe36 NANCY: Partially implement bitmap animations
Implemented PlayIntStaticBitmapAnimation, which allows the teacher's room PC screensaver to display properly. This impementation skips the sound component, which will be added later if needed.
2021-03-24 17:20:46 +01:00
fracturehill 46341dde11 NANCY: Implement secondary video
Implemented the two SecondaryVideo channels, allowing the game to display NPC animations outside of dialogue. The implementation repeats some frames and plays at the wrong speed so further work is needed.
2021-03-24 17:20:46 +01:00
fracturehill b79d9f1a32 NANCY: Rendering code refactor
Several small changes to the rendering code that reduce code complexity, most notably the removal of the game's dirty rectangle optimizations.
2021-03-24 17:20:46 +01:00
fracturehill 4a76623e67 NANCY: Fix compiler errors
Fix incorrect typedef for render function pointers; correct forward declarations of Graphics::Surface from class to struct.
2021-03-24 17:20:46 +01:00
fracturehill d97ca12d6c NANCY: Initial commit 2021-03-24 17:20:46 +01:00