Commit graph

14 commits

Author SHA1 Message Date
fracturehill
54d6de7b57 NANCY: Make text rendering pixel-perfect
Made changes to the Textbox and Font classes so the text rendering in nancy1 looks exactly the same as it does in the original engine.
2021-04-17 15:09:18 +03:00
fracturehill
a29cdd43c0 NANCY: Make RenderObject non-abstract
Made RenderObject non-abstract so it can be used in some simple cases without the need for subclassing.
2021-04-15 15:12:00 +03:00
fracturehill
f255542672 NANCY: Scrollbar fixes
Changed the UI::Scrollbar class so it doesn't require subclassing and added functionality for horizontal scrollbars. Fixed the textbox and inventory box scrollbars so their lowest point is consistent with the original engine's.
2021-04-15 15:11:59 +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
0d8d31ffd0 NANCY: Formatting fixes
Added spaces after the = operator in every declaration of a pure virtual or defaulted function.
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
6be4617e26 NANCY: Make Textbox::getInnerHeight() const
Textbox::getInnerHeight() makes no changes to its class so it has now been properly marked as const.
2021-03-24 17:20:46 +01:00
fracturehill
7220797ca4 NANCY: Remove redundancy in transparency handling
Removed the BlitType enum and getBlitType() method from RenderObject, and replaced them with setTransparent(). This was done to reduce redundant code, since ManagedSurface can already pick between a transparent and regular blit depending on whether the provided source surface has a transparent color set. Also added the correct transparent color for The Vampire Diaries, and the transparent color for nancy1 now gets calculated on the fly.
2021-03-24 17:20:46 +01:00
fracturehill
a17e45537c NANCY: Change textbox text tokens type
Changed all textbox tokens from Common::String to char[] to avoid potential issues with global constructor calling order.
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
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
Renamed from engines/nancy/textbox.h (Browse further)