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
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 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 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 15153a5533 NANCY: Filter input between states
Added code to filter out inputs that began in a different state; e.g. if the mouse was pushed and held down in a previous state, the button up event won't fire. This fixes the issue where dismissing the intro logo would accidentally trigger a click inside the scene viewport.
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 9626437921 NANCY: Implement cheat dialogs
The original engine has two secret debug/cheat dialogs: one for general data (timers, current scene, inventory), and one for event flags. I decided to implement them as I find them much more useful than just using debug commands, particularly since they contain descriptions of every event flag and inventory item (this data is pulled directly from the executable's embedded resources, albeit in a slightly hacky way). Also, I've decided not to implement the slider puzzle tab present in nancy1 since I have no use for it.
2021-03-24 17:20:46 +01:00
fracturehill 51ba19dc70 NANCY: Secondary movie fixes
Secondary movies now actually reach the kActionTrigger state, and now also supports reverse playback. The PlaySecondaryMovie class was moved to its own header file, the SecondaryVideoDescription struct was moved to commontypes.h, and new methods for disabling mouse input were added to NancyEngine and Scene.
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 628a4bd2b1 NANCY: Implement password puzzle
Added support for the PasswordPuzzle action record, which is used in the computer in the teacher's lounge in nancy1. To enable typing the password in, also added support for all keyboard down events in the Input class.
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 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 cd36df63fc NANCY: Add textbox scrolling
Added code for scrolling the textbox during dialogue scenes.
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 abb1583252 NANCY: Add hotspot detection
Added detection of hovered hotspots (clickable areas on screen). Added detection of mouse release events in preparation for the handling of clicking on said hotspots.
2021-03-24 17:20:46 +01:00
fracturehill c18e0b171d NANCY: Add initial mouse support
Implemented a simple mouse with the ability to change the cursor bitmap. Also changed the View struct to use Rects instead of separate properties for every coordinate.
2021-03-24 17:20:46 +01:00
fracturehill c1a6f38271 NANCY: Add Cursors structure
Implement the struct stored in the CURS chunk. Contains the coordinates of every cursor bitmap and an X and Y coordinate used when playing a primary video sequence.
2021-03-24 17:20:46 +01:00
fracturehill f60ccc38b9 NANCY: runScene() improvemens
Implemented a bit more of runScene(), but a large part of it is still TODO.
2021-03-24 17:20:46 +01:00
fracturehill 11f89b5b97 NANCY: Add initial input support
Added an Input class with support for every nancy1 key combo (that I know of). Added code for skipping the Logo state with a left click. Proper mouse handling is still TODO.
2021-03-24 17:20:46 +01:00