112 Commits

Author SHA1 Message Date
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01: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
e46e7e022b STARTREK: Fix action type 2020-12-20 16:53:53 +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
61bf089cb6 STARTREK: Remove the remaining goto's 2020-11-17 23:55:58 +02:00
Filippos Karapetis
ed24377900 STARTREK: Move resource-related functions into a separate class 2020-09-09 22:36:11 +03: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
78958a01f8 STARTREK: Load more messages from RDF files 2019-10-30 01:42:47 +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
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
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
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
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
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
Matthew Stewart
add9b3e699 STARTREK: Saving for VENG mission 2019-05-28 08:08:52 +03:00
Matthew Stewart
c9918c3064 STARTREK: Common code for VENG mission 2019-05-28 08:08:52 +03:00
Matthew Stewart
0715c64b38 STARTREK: VENG8 2019-05-28 08:08:52 +03:00
Filippos Karapetis
81294feb70 STARTREK: Refactor code so that gotos are not used in DEMON6 2019-05-27 18:25:10 +03:00
Filippos Karapetis
f6af273fca STARTREK: Fix MSVC warnings
- 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)
2019-05-27 14:53:44 +03:00
Matthew Stewart
5f1f19be50 STARTREK: VENG7 2018-08-09 08:37:30 +02:00
Matthew Stewart
20cc6ae56d STARTREK: VENG6 2018-08-09 08:37:30 +02:00
Matthew Stewart
5fae11b871 STARTREK: Move VENG function into common code 2018-08-09 08:37:30 +02:00
Matthew Stewart
6db428f006 STARTREK: VENG5 2018-08-09 08:37:30 +02:00
Matthew Stewart
1a12a25b54 STARTREK: VENG4 2018-08-09 08:37:30 +02:00
Matthew Stewart
ebc6f194c2 STARTREK: VENG3 2018-08-09 08:37:30 +02:00
Matthew Stewart
a089dc23f7 STARTREK: VENG2 2018-08-09 08:37:30 +02:00
Matthew Stewart
a5d7b86206 STARTREK: VENG1 2018-08-09 08:37:30 +02: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
f33f548884 STARTREK: Saving/loading for SINS mission 2018-08-09 08:37:30 +02:00
Matthew Stewart
1c89c06508 STARTREK: SINS5 2018-08-09 08:37:30 +02:00
Strangerke
be4174dc3d STARTREK: Janitorial: Add end of namespace comments 2018-08-09 08:37:30 +02:00
Matthew Stewart
fe805de2ef STARTREK: SINS3 2018-08-09 08:37:30 +02:00
Matthew Stewart
012b9ec47c STARTREK: SINS4 2018-08-09 08:37:30 +02:00
Matthew Stewart
93ca6a7b48 STARTREK: SINS2 2018-08-09 08:37:30 +02:00
Matthew Stewart
8970909318 STARTREK: Reorganize includes in room.h
This should avoid the costly rebuild of everything in the 'rooms/'
folder, at least sometimes...
2018-08-09 08:37:30 +02:00
Matthew Stewart
f412328181 STARTREK: Implement text input boxes
Needed for SINS mission with the keypads
2018-08-09 08:37:30 +02:00
Matthew Stewart
b2213cac9b STARTREK: SINS1 2018-08-09 08:37:30 +02:00
Matthew Stewart
23b3782b52 STARTREK: SINS0 2018-08-09 08:37:30 +02:00
Matthew Stewart
2090417612 STARTREK: Move save/load code for rooms to structs 2018-08-09 08:37:30 +02:00
Matthew Stewart
e3f00320ad STARTREK: Fix elasi guard not shooting Kirk in TUG 2018-08-09 08:37:30 +02:00
Matthew Stewart
919db23841 STARTREK: Implement "BAN" files.
These are background animations in various rooms, purely visual.
2018-08-09 08:37:30 +02:00
Matthew Stewart
5572525791 STARTREK: Save mission-specific variables 2018-08-09 08:37:30 +02:00
Matthew Stewart
d23965e274 STARTREK: Rename tug2 room-specific vars 2018-08-09 08:37:30 +02:00