Commit graph

102 commits

Author SHA1 Message Date
Filippos Karapetis
bc45372332 STARTREK: Rewrite more room texts with the new format 2021-02-19 23:19:00 +02:00
Filippos Karapetis
31f2fc675c STARTREK: Convert more rooms to the new text resource format 2021-02-15 03:26:59 +02:00
Filippos Karapetis
e9300f33d5 STARTREK: Fix the text scanner and convert 3 rooms to the new format 2021-02-08 03:11:46 +02:00
Filippos Karapetis
748aec5783 STARTREK: Refactor room text handling to use offsets (first part)
This is a major change, which allows us to read room texts directly
from RDF files in a deterministic way. The previous attempt to read
texts on the fly failed with some texts at runtime, which made it
unreliable. Additionally, the scope of all room text IDs has been
reduced to each room.

With this change, it's now possible to support text in CD and floppy
versions and support multiple game languages, without hardcoding all
of the game texts in the engine source.

This is 50% done (29 out of 55 rooms), with the following left to be
done:
- MUDD mission rooms (need to improve the text reader for these)
- TRIAL mission rooms (need to improve the text reader for these)
- SINS mission rooms (need to improve the text reader for these)
- The rest of VENG mission rooms

The DEMON, TUG, LOVE, FEATHER and part of the VENG mission rooms have
been converted.
2021-02-08 03:11:46 +02:00
Filippos Karapetis
9327e5a381 STARTREK: More bridge sequences functionality 2021-01-24 23:13:09 +02:00
Filippos Karapetis
49395f2a8a STARTREK: Rename sound IDs and remove calls to blank sounds 2020-12-29 16:14:02 +02:00
Filippos Karapetis
c6d3f1df65 STARTREK: Ensure that we're not reading past the end of RDF files 2020-12-29 16:14:01 +02:00
Filippos Karapetis
a333cf4490 STARTREK: More bridge sequences functionality 2020-12-22 21:08:50 +02:00
Filippos Karapetis
e46e7e022b STARTREK: Fix action type 2020-12-20 16:53:53 +02:00
Filippos Karapetis
8947282344 STARTREK: More bridge sequence functions. Start implementing beaming up 2020-12-19 22:06:09 +02:00
Filippos Karapetis
7d454f2221 STARTREK: Change action type to signed
We now use an action array terminator with a negative value
2020-12-19 01:50:39 +02:00
Filippos Karapetis
5e7b556310 STARTREK: Move room action arrays to their respective room
All action arrays now end with a terminator entry. The array count has been removed.
Also, fixed a regression when changing missions in endMission().
2020-12-19 01:50:38 +02:00
Filippos Karapetis
2b8ea5c7e3 STARTREK: Some work on supporting the demo and floppy versions of st25 2020-12-14 03:48:52 +02:00
Filippos Karapetis
bc1d661cf8 STARTREK: Further work on the ST 25th demo 2020-11-17 21:24:12 +02:00
Filippos Karapetis
fe542f2dd7 STARTREK: Started implementing bridge functions. Some cleanup 2020-11-16 23:14:59 +02:00
Filippos Karapetis
ffb0b2b743 STARTREK: Fix typo 2020-09-09 22:36:11 +03:00
Filippos Karapetis
ed24377900 STARTREK: Move resource-related functions into a separate class 2020-09-09 22:36:11 +03:00
Filippos Karapetis
2e65886f65 STARTREK: Fix infinite loop while reading some RDF files 2020-08-30 13:37:20 +03:00
Filippos Karapetis
0ae3cbc2e8 STARTREK: Reduce usage of SharedPtr, and simplify bitmap related calls 2019-12-28 13:22:18 +02:00
Filippos Karapetis
14a07a4871 STARTREK: Use a 32-bit integer for the file offset 2019-12-27 16:54:56 +02:00
Filippos Karapetis
f7a5c21d4d STARTREK: Move isPointInPolygon() inside the Room class
This accesses the room data, so it's better to move it inside the Room
class, to reduce direct visibility of the room vertex data
2019-12-27 01:33:28 +02:00
Filippos Karapetis
26fcce1e41 STARTREK: Fix texts in the MUDD mission 2019-12-27 01:33:27 +02:00
Filippos Karapetis
0c1a04a23c STARTREK: Remove sound function wrappers out of StarTrekEngine 2019-11-03 13:21:41 +02:00
Filippos Karapetis
78958a01f8 STARTREK: Load more messages from RDF files 2019-10-30 01:42:47 +02:00
Filippos Karapetis
8dca2bf30a STARTREK: Load the text for the VENG mission from RDF files 2019-10-30 01:42:46 +02:00
Filippos Karapetis
9a7f2c8374 STARTREK: Load the text of the TRIAL missions from RDF files 2019-10-29 17:46:13 +02:00
Filippos Karapetis
a0fb6deb29 STARTREK: Read the text for the SINS mission from RDF files 2019-10-29 17:46:13 +02:00
Filippos Karapetis
efb51d8fb5 STARTREK: Read the text of the FEATHER mission from RDF files 2019-10-29 02:58:36 +02:00
Filippos Karapetis
b2d1cfa126 STARTREK: Refactored mouse cursor and bitmap handling
- Reduced usage of SharedPtr
- Simplified the mouse cursor code (normal, locked, stack handling)
- Simplified the background handling code
- Initialize the mouse cursor after the graphics are initialized
2019-10-29 02:58:36 +02:00
Filippos Karapetis
6a316498b5 STARTREK: Unify the text patching code 2019-10-20 21:46:31 +03:00
Filippos Karapetis
71346d15eb STARTREK: Read the text of the MUDD mission rooms from RDF files
Also, add a central mechanism to fix text typos
2019-10-20 15:23:44 +03:00
Filippos Karapetis
95f8cfff16 STARTREK: Handle shared messages
Also, start moving message patches inside patchRoomMessage(), and
remove some redundant state variables
2019-10-07 01:08:51 +03:00
D G Turner
5035c81857 STARTREK: Fix GCC Compiler Warning 2019-08-26 03:38:45 +01:00
Filippos Karapetis
cb3030508e STARTREK: Read most strings for the LOV mission from its RDF files 2019-08-26 02:45:33 +03:00
Filippos Karapetis
6a9969ed25 STARTREK: Fix loading of some texts, and add the "text" console command 2019-08-19 00:18:00 +03:00
D G Turner
ef00f1d053 STARTREK: Fix introduced bug in mission chain loading code
This needs to avoid loading when the mission is "VENG" i.e. the last
mission, since there is no next mission to load and this would have
loaded an invalid memory string.
2019-08-17 22:29:15 +01:00
Filippos Karapetis
62d1dbac65 STARTREK: More explicit definition of text types 2019-08-17 21:56:13 +03:00
Filippos Karapetis
d74060e17a STARTREK: Load all kinds of messages, and remove redundant variables 2019-08-17 21:56:12 +03:00
Filippos Karapetis
878675cbd0 STARTREK: Simplify screen name code and add the "actions" debug command
- The screen name and map name code have been merged and simplified
- Some usage of SharedPtr has been adapted
- Duplicate code for loading the room map has been merged
- The "actions" command has been imported from the tools code
- Cleanup
2019-08-16 14:16:43 +03:00
Filippos Karapetis
089c04f6f7 STARTREK: Cleanup away mission chain loading code 2019-08-15 11:58:16 +03:00
Filippos Karapetis
e8f0e9e998 STARTREK: Rename the different showText() functions for disambiguation
Hopefully, this will fix the AmigaOS and DS builds
2019-06-11 01:28:12 +03:00
Filippos Karapetis
05301c240b STARTREK: Load more messages from RDF files
The whole Demon chapter has been converted to the new logic.
The offsets for the extra room messages have been hardcoded, for now,
inside loadOtherRoomMessages(), until we figure out how they are
referenced.
2019-06-11 00:48:16 +03:00
Filippos Karapetis
709d606e01 STARTREK: Adapt many usages of Common::SharedPtr() to regular pointers 2019-06-11 00:48:16 +03:00
Filippos Karapetis
3f7f1a2410 STARTREK: Remove the FileStream wrapper class 2019-06-11 00:48:15 +03:00
Filippos Karapetis
42ac19e804 STARTREK: Start reading text from RDF files, instead of hardcoding it
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
2019-05-28 21:41:58 +03:00
Filippos Karapetis
daf2f07e6b STARTREK: Use Common::String for animation strings 2019-05-27 19:39:29 +03:00
D G Turner
42a1b579cb STARTREK: Even More Compilation Fixes. 2018-08-09 14:17:39 +01:00
Matthew Stewart
bd1b9f66cb STARTREK: Implement republic map screen 2018-08-09 08:37:30 +02:00
Matthew Stewart
08ef636a98 STARTREK: VENG0 2018-08-09 08:37:30 +02:00
Matthew Stewart
ba05b5539b STARTREK: Various code cleanup 2018-08-09 08:37:30 +02:00