This reverts commit 33fb9809c3.
The engine/startrek/console.h and engine/startrek/console.cpp
files were missing from that commit, which break compilation.
Previously the fade level was only reset in locations with a Camera
entity. Now we do it in all cases. This fixes accessing the book of
secrets immediately after winning the game (the fade level would still
be zero from the fade to black right before the end game credits).
Rooms DEMON0 and DEMON5 have been partially adapted to the new logic.
This isn't yet fully functional, for the following reasons:
- We only read the main text block. There are also some others which
are not handled yet. The unhandled blocks have been kept in text.cpp
- We load text in dictionaries, splitting the strings in look and talk.
However, there's a third category (look with a talker), which isn't
handled yet
- Text is loaded per-room, but there are enhancements where text and
samples are loaded from other rooms. These need to be refactored
It doesn't serve a purpose anymore. The parameter was used to keep
waiting for key input if it was a 'non text editing' event, like
pressing the shift modifier key. The only place it was used was for text
input when interacting with the computer in ShipSleepCabin.
- Add a delay after screen updates
- Do not update the screen when drawing the background - this is unnecessary
- Fix memory leak when drawing the background
- Disable duplicate if block
- Fix potentially uninitialized variables
- Change _activeMenu to be a regular pointer, instead of a SharedPtr - it was not
initialized correctly
- Fix struct packing in structs with pointers to complex objects
- Fix sound initialization
- Fix memory leaks (handles to files which were never deleted)
- Added a CHECKME for a code which is never used at the moment
- Add default cases to switch statements
- Remove unused variables
- Fix integer variable assignments from booleans
- Add missing default switch cases
- Specify packing for structs with pointers to complex objects
- Change literal suffixes to uppercase
- Replace uses of malloc() with new []
- Change APPLECHAR to APPLEBYTE, when its output is used as a byte
- Replace uses of strncpy with Common::strlcpy
- Merge redundant switch and if statements
- Remove redundant semicolons