Commit graph

33 commits

Author SHA1 Message Date
fracturehill
36118700b9 NANCY: Fix state changing
Fixed the state system so it supports changing between two states that both get destroyed after exiting.
2021-04-08 21:42:51 +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
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
b6df945ae1 NANCY: Formatting fixes
Fixed a couple of poorly indented lines and a missing newline at the end of a file.
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
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
fracturehill
a752f1a4f2 NANCY: Initial save/load support
Added initial support for savestates. The format will most likely change with future commits, but I will only start versioning once the engine supports more than a single game. To support proper serialization the Scene state has had its kInit state split into kInit and kInitStatic, InventoryBox had some of its code reordered, and members of several classes have had their types changed.
2021-03-24 17:20:46 +01:00
fracturehill
5c1843f871 NANCY: Rename state functions in nancy.h
Renamed all functions relating to the engine's internal state so they only mention the word State instead of GameState. This is to avoid confusion between them and functions relating to savegames, whose names already include GameState.
2021-03-24 17:20:46 +01:00
fracturehill
7d93c7996e NANCY: Clear input after exiting console
Fixed an issue where the input manager would still think the player was pressing ctrl even after closing the debug console.
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
20d226fc10 NANCY: Fix load_scene and scene_id console commands
Fixed an issue where load_scene and scene_id would incorrectly complain about being in the wrong game state.
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
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
b9dc249d53 NANCY: Add debug commands
Added debug functions to display the current scene and to teleport to a new one. Also removed old command declarations that were never defined.
2021-03-24 17:20:46 +01:00
fracturehill
d97ca12d6c NANCY: Initial commit 2021-03-24 17:20:46 +01:00
Walter van Niftrik
e89c01713b NANCY: Add getting chunks with the same name by index 2021-03-24 17:20:46 +01:00
Walter van Niftrik
b393b234be NANCY: Add debugger command for listing chunks inside an IFF 2021-03-24 17:20:46 +01:00
Walter van Niftrik
369ab0136a NANCY: Add debug command for hexdumping chunks 2021-03-24 17:20:46 +01:00
Walter van Niftrik
0503e651e5 NANCY: Add event polling and timing to play_video debug command 2021-03-24 17:20:46 +01:00
Walter van Niftrik
d5ea0c840a NANCY: Rename debug commands 2021-03-24 17:20:46 +01:00
Walter van Niftrik
ef8daa9f3f NANCY: Add exporting to .cif 2021-03-24 17:20:46 +01:00
Walter van Niftrik
6381b36643 NANCY: Add support for .his audio files 2021-03-24 17:20:46 +01:00
Walter van Niftrik
3efe6a6f76 NANCY: Add partial .avf video support 2021-03-24 17:20:46 +01:00
Walter van Niftrik
dd91f7e4f5 NANCY: Add support for multiple CifTrees loaded simultaneously 2021-03-24 17:20:46 +01:00
Walter van Niftrik
e989b0e1c8 NANCY: Add debug commands for dumping a resource and loading a new CifTree 2021-03-24 17:20:46 +01:00
Walter van Niftrik
ba12d04986 NANCY: Add heuristic for long filenames in CifTree 2021-03-24 17:20:46 +01:00
Walter van Niftrik
13024420cb NANCY: Load more data from info blocks 2021-03-24 17:20:46 +01:00
Walter van Niftrik
fd1f0767f8 NANCY: Add resource decompressor 2021-03-24 17:20:46 +01:00
Strangerke
fd11c41a8d NANCY: Add skeleton engine 2021-03-24 17:20:46 +01:00