21 Commits

Author SHA1 Message Date
Kaloyan Chehlarski
8b13bc1f4b NANCY: Remove handwritten list of boot chunks
Removed the manually typed out list of chunk names to load during
boot, and replaced it with code that simply loads all BOOT chunks.
2023-03-30 20:21:33 +03:00
Kaloyan Chehlarski
0de0026d9c NANCY: Don't look for FORM chunks in Nancy games
Changed the IFF loading function to only look for the FORM string
when The Vampire Diaries is running. This prevents a chunk read error
in at least one file in nancy2.
2023-03-05 16:31:24 +02:00
Cameron Cawley
28d7b361ea COMMON: Move more file format code into common/formats 2022-12-11 22:33:23 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01: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
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
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
8cfd4dba23 NANCY: Replace malloc with new
Replace an malloc used in iff.cpp with a new operator, fixing a warning about a potential nullptr return.
2021-03-24 17:20:46 +01:00
fracturehill
a7373264f2 NANCY: Pass string arguments by reference
Fixed a couple instances of string function arguments not being passed by reference.
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
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
d97ca12d6c NANCY: Initial commit 2021-03-24 17:20:46 +01:00
Walter van Niftrik
3655241864 NANCY: Add loading of BOOT/FR* and BOOT/LG* 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
d73103df45 NANCY: Add support for PCAL chunk 2021-03-24 17:20:46 +01:00
Walter van Niftrik
c0fe9e83a0 NANCY: Add IFF parsing 2021-03-24 17:20:46 +01:00