Commit Graph
25 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 1876fd745a NANCY: Fix disabled input after state change
Fixed an edge case where input would stay disabled after changing the
game state, rendering the game unplayable.
2021-05-07 23:09:52 +03: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
Cameron Cawley ef0048fa77 COMMON: Add standard actions for mouse button clicks 2021-04-06 11:15:42 +03:00
fracturehill 85f8bf294d NANCY: Includes cleanup
Reordered and cleaned up #includes in the engine.
2021-04-01 21:25:32 +03:00
Cameron Cawley 4b5eefb731 NANCY: Update the console code 2021-03-28 21:36:15 +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 8d774ba1e3 NANCY: Add POTFILES and mark translatable strings
Added a POTFILES that was previously missing. Marked the ringing string in telephone.cpp and the keymapper descriptions in input.cpp as translatable.
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 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 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 0fdda6fbfc NANCY: Code formatting fixes
Fixed a lot of code formatting issues, including switch case statements being indented, some curly braces not being left hanging, if and for statements not being surrounded by newlines, some double spaces, and more.
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 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 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 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 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