Commit Graph
137148 Commits
Author SHA1 Message Date
fracturehill d64a309fb3 NANCY: Small code refactor
Renamed and moved a few struct definitions to commontypes.h, added some convenience functions to Scene and removed a couple of unused variables.
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 5d215d46b4 NANCY: Secondary video fixes
Fixed a couple of visual glitches in secondary video where NPCs would get drawn as a black rectangle, or not drawn at all.
2021-03-24 17:20:46 +01:00
fracturehill 5d00c8d195 NANCY: Fix two primary video instances being active simultaneously
Added a better check for cases where two or more primary videos are in the same scene and one sets event flags that activate the other.
2021-03-24 17:20:46 +01:00
fracturehill 197b055881 NANCY: Implement lever puzzle
Implemented the LeverPuzzle action record, which is used in the boiler room in nancy1.
2021-03-24 17:20:46 +01:00
fracturehill c0ff749821 NANCY: Add event flag to PlayDIGISoundAndDie
Added a missing event flag member of the PlayDIGISoundAndDie action record. This allows the player to cut off the chains on nancy1's boiler room lever puzzle.
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 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 67f11d9c91 NANCY: Scene improvements and fixes
Added functionality for the hint system, and added const qualifiers to functions that don't change the scene's state
2021-03-24 17:20:46 +01:00
fracturehill b7c2b5a6e8 NANCY: Textbox improvements
The textbox's token parser no longer makes a distinction between captions and responses, and also supports telephone-specific tokens. The code still makes a couple of assumptions about the input text, but those can be fixed in the future if needed.
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 725ff2f95d NANCY: Implement inventory scrollbar
Implemented scrolling of the inventory through the scrollbar.
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 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 3611184261 NANCY: Fix leaked surfaces
Fixed a few instances of surfaces not getting freed after use.
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 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 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 c73ea1b0cb NANCY: Viewport movement fixes
Added code so viewport edges do not get highlighted in directions the player can't go in.
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 ebe99bc271 NANCY: Fix adding items to inventory
Fixed items not being marked as owned even when they're in the inventory.
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 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 d5b7053dbe NANCY: Add scrollbar movement and inventory contents
Added code to move the two scrollbars and implemented renderFrameInvBox(), which displays the inventory. Actually populating the inventory and interacting with it are 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 b4315872b5 NANCY: Fix sigtraps when closing
Fixed two issues that caused a sigtrap when closing ScummVM.
2021-03-24 17:20:46 +01:00
fracturehill cd66fa975d NANCY: Correct video timing
Added a potentially hacky fix for the wrong timings in video playback.
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 75ba5e6528 NANCY: Add reverse video playback
Implemented reverse video playback for AVF video. Just like last commit, this is not tested on video type 2 and will almost definitely break.
2021-03-24 17:20:46 +01:00
fracturehill da461f1d6e NANCY: Upgrade video code
Added code to make AVF videos seekable. Not tested on video type 2, but will almost definitely break it. Also updated class definitions to properly mark virtual methods.
2021-03-24 17:20:46 +01:00
fracturehill f683d414f9 NANCY: Fix scene change sound behavior
Replaced the hacky code that kept the backgound music alive between scene changes with the proper behavior from the engine.
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 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 7d04efad37 NANCY: Fix event flags issues
Corrected the number of event flags and added code to reset some of them on a scene change. This fixes a game crash and some repeating animations.
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 2fb0dabcbb NANCY: Fix vertical scroll
Small fix to properly display vertical scrolling in the viewport.
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