Commit graph

430 commits

Author SHA1 Message Date
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
cc7d69dd10 NANCY: Fix wrong type reads for event flags
Fixed event flags' labels being read as unsigned ints when they should be read as signed instead.
2021-03-24 17:20:46 +01:00
fracturehill
e0e18b0ebf NANCY: Static bitmap animation fixes
The PlayIntStaticBitmapAnimation action record is now modeled after the original engine's implementation, and supports reverse playback and getting triggered by an event flag.
2021-03-24 17:20:46 +01:00
fracturehill
1cd406b5af NANCY: Implement slider puzzle
Implemented the SliderPuzzle action record, which is used for the jewel box in the safe in nancy1.
2021-03-24 17:20:46 +01:00
fracturehill
d83edfdca3 NANCY: Implement telephone/hint system
Implemented the Telephone and HintSystem action records, which together make up the functionality of nancy1's in-game hint system.
2021-03-24 17:20:46 +01:00
fracturehill
c7e1c95803 NANCY: Implement rotating lock puzzle
Implemented the RotatingLockPuzzle action record.
2021-03-24 17:20:46 +01:00
fracturehill
a7619575ac NANCY: Bitmap animation fixes
Added support for sound in PlayIntStaticBitmapAnimation and fixed a surface not getting freed after use.
2021-03-24 17:20:46 +01:00
fracturehill
0ff64ca11a NANCY: Implement ordering puzzle
Implemented the OrderingPuzzle action record, which is used for the safe in nancy1.
2021-03-24 17:20:46 +01:00
fracturehill
a96f6fdebd NANCY: Move NO SOUND keyword check
Some action records have fields for sound that can be left unused by putting "NO SOUND" in the filename string. This commit moves the check for that keyword inside sound.cpp so it isn't repeated everywhere.
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
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
1de1f568d7 NANCY: Fix secondary movie
Fix playback of secondary movies, which was overlooked during the engine rewrite.
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
188ee86d2f NANCY: Implement item interaction
Items can now interact with the viewport, allowing the player to open the living room chest, fix the gas leak in the kitchen, etc.
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
9184dd01bd NANCY: Rename enum value
Rename ActionRecord::ExecutionState::kRun to kActionTrigger to better match original engine's naming convention.
2021-03-24 17:20:46 +01:00
fracturehill
b2af943ad0 NANCY: Fix game crash
Fixed a game crash in PlayDigiSoundAndDie.
2021-03-24 17:20:46 +01:00
fracturehill
f4d8368bd4 NANCY: Add initial sound support
Added a sound manager and hooked the Logo and Scene classes to it; also implemented the PlayDigiSoundAndDie action record. As a result the first part of the intro and some of the sounds in the first area can now play properly.
2021-03-24 17:20:46 +01:00
fracturehill
e12f6b6753 NANCY: Add more scene change types
Implemented every scene change type except HotMultiframeMultisceneChange, allowing the player to walk around the starting area.
2021-03-24 17:20:46 +01:00
fracturehill
4ab6de6c23 NANCY: Implement skipping of intro
Implemented the Hot1FrSceneChange action record, which lets the player skip the intro and enter the first room of the game.
2021-03-24 17:20:46 +01:00
fracturehill
cd0301af92 NANCY: Implement scene switching
Added just enough code to allow the player to pick the difficulty and go to the intro scene.
2021-03-24 17:20:46 +01:00
fracturehill
95c7d5031f NANCY: Implement EventFlagsMultiHS action record
Implemented the EventFlagsMultiHS action record, which gets triggered by clickable hotspots on screen.
2021-03-24 17:20:46 +01:00
fracturehill
0a4ed23f51 NANCY: Add action event processing
Implemented (almost) all of processActionRecords(), which is the primary logic processing function of the engine. Moved the playState structure from Scene to NancyEngine.
2021-03-24 17:20:46 +01:00
fracturehill
d97ca12d6c NANCY: Initial commit 2021-03-24 17:20:46 +01:00