mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
tr2: add support for The Golden Mask
This implements support for the Golden Mask by providing relevant game flow files, command line handling, and object alias setup on launch. Resolves #1554. Resolves #1604. Resolves #1621. Resolves #2667.
This commit is contained in:
parent
ae5a7fe208
commit
f396ef4514
7 changed files with 225 additions and 2 deletions
137
data/tr2/ship/cfg/TR2X_gameflow_gm.json5
Normal file
137
data/tr2/ship/cfg/TR2X_gameflow_gm.json5
Normal file
|
@ -0,0 +1,137 @@
|
||||||
|
{
|
||||||
|
// NOTE: bad changes to this file may result in crashes.
|
||||||
|
// Lines starting with double slashes are comments and are ignored.
|
||||||
|
|
||||||
|
"main_menu_picture": "data/title_eu_gm.pcx",
|
||||||
|
"savegame_fmt_legacy": "savegame_gm.%d",
|
||||||
|
|
||||||
|
"cmd_init": {"action": "exit_to_title"},
|
||||||
|
"cmd_title": {"action": "noop"},
|
||||||
|
"cmd_death_in_demo": {"action": "exit_to_title"},
|
||||||
|
"cmd_death_in_game": {"action": "noop"},
|
||||||
|
"cmd_demo_interrupt": {"action": "exit_to_title"},
|
||||||
|
"cmd_demo_end": {"action": "exit_to_title"},
|
||||||
|
|
||||||
|
"cheat_keys": true,
|
||||||
|
"load_save_disabled": false,
|
||||||
|
"play_any_level": false,
|
||||||
|
"lockout_option_ring": false,
|
||||||
|
"gym_enabled": false,
|
||||||
|
"demo_version": false,
|
||||||
|
"single_level": -1,
|
||||||
|
|
||||||
|
"demo_delay": 30,
|
||||||
|
"secret_track": 47,
|
||||||
|
|
||||||
|
"title": {
|
||||||
|
"path": "data/title_gm.tr2",
|
||||||
|
"music_track": 64,
|
||||||
|
"sequence": [
|
||||||
|
{"type": "display_picture", "path": "data/legal.pcx"},
|
||||||
|
{"type": "exit_to_title"},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
"sfx_path": "data/main_gm.sfx",
|
||||||
|
"injections": [
|
||||||
|
"data/injections/font.bin",
|
||||||
|
],
|
||||||
|
|
||||||
|
"levels": [
|
||||||
|
// 0. Lara's Home
|
||||||
|
{
|
||||||
|
"type": "gym",
|
||||||
|
"path": "data/assault.tr2",
|
||||||
|
"music_track": -1,
|
||||||
|
"sequence": [
|
||||||
|
{"type": "loop_game"},
|
||||||
|
{"type": "level_stats"},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
// 1. The Cold War
|
||||||
|
{
|
||||||
|
"path": "data/level1.tr2",
|
||||||
|
"music_track": 33,
|
||||||
|
"sequence": [
|
||||||
|
{"type": "loop_game"},
|
||||||
|
{"type": "play_music", "music_track": 41},
|
||||||
|
{"type": "level_stats"},
|
||||||
|
{"type": "level_complete"},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
// 2. Fool's Gold
|
||||||
|
{
|
||||||
|
"path": "data/level2.tr2",
|
||||||
|
"music_track": 58,
|
||||||
|
"sequence": [
|
||||||
|
{"type": "loop_game"},
|
||||||
|
{"type": "play_music", "music_track": 41},
|
||||||
|
{"type": "level_stats"},
|
||||||
|
{"type": "level_complete"},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
// 3. Furnace of the Gods
|
||||||
|
{
|
||||||
|
"path": "data/level3.tr2",
|
||||||
|
"music_track": 59,
|
||||||
|
"sequence": [
|
||||||
|
{"type": "loop_game"},
|
||||||
|
{"type": "play_music", "music_track": 41},
|
||||||
|
{"type": "level_stats"},
|
||||||
|
{"type": "level_complete"},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
// 4. Kingdom
|
||||||
|
{
|
||||||
|
"path": "data/level4.tr2",
|
||||||
|
"music_track": 31,
|
||||||
|
"sequence": [
|
||||||
|
{"type": "give_item", "object_id": "puzzle_1"},
|
||||||
|
{"type": "loop_game"},
|
||||||
|
{"type": "play_music", "music_track": 52},
|
||||||
|
{"type": "display_picture", "path": "data/credit00_gm.pcx", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
|
||||||
|
{"type": "display_picture", "path": "data/credit01.pcx", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
|
||||||
|
{"type": "display_picture", "path": "data/credit02.pcx", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
|
||||||
|
{"type": "display_picture", "path": "data/credit03.pcx", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
|
||||||
|
{"type": "display_picture", "path": "data/credit04.pcx", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
|
||||||
|
{"type": "display_picture", "path": "data/credit05.pcx", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
|
||||||
|
{"type": "display_picture", "path": "data/credit06.pcx", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
|
||||||
|
{"type": "display_picture", "path": "data/credit07_gm.pcx", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
|
||||||
|
{"type": "display_picture", "path": "data/credit08.pcx", "display_time": 15, "fade_in_time": 0.5, "fade_out_time": 0.5},
|
||||||
|
{"type": "total_stats", "background_path": "data/end.pcx"},
|
||||||
|
{"type": "level_complete"},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
// 5. Nightmare in Vegas
|
||||||
|
{
|
||||||
|
"path": "data/level5.tr2",
|
||||||
|
"type": "bonus",
|
||||||
|
"music_track": 34,
|
||||||
|
"sequence": [
|
||||||
|
{"type": "remove_weapons"},
|
||||||
|
{"type": "remove_ammo"},
|
||||||
|
{"type": "remove_flares"},
|
||||||
|
{"type": "remove_medipacks"},
|
||||||
|
{"type": "give_item", "object_id": "pistols"},
|
||||||
|
{"type": "loop_game"},
|
||||||
|
{"type": "play_music", "music_track": 41},
|
||||||
|
{"type": "level_stats"},
|
||||||
|
{"type": "level_complete"},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
"demos": [
|
||||||
|
],
|
||||||
|
|
||||||
|
"cutscenes": [
|
||||||
|
],
|
||||||
|
|
||||||
|
"fmvs": [
|
||||||
|
],
|
||||||
|
}
|
|
@ -141,7 +141,7 @@
|
||||||
{
|
{
|
||||||
"title": "Ice Palace",
|
"title": "Ice Palace",
|
||||||
"objects": {
|
"objects": {
|
||||||
"tiger": {"name": "Snow Leopard"},
|
"tiger": {"name": "White Tiger"},
|
||||||
"key_2": {"name": "Gong Hammer"},
|
"key_2": {"name": "Gong Hammer"},
|
||||||
"pickup_2": {"name": "Talion"},
|
"pickup_2": {"name": "Talion"},
|
||||||
"puzzle_1": {"name": "Tibetan Mask"},
|
"puzzle_1": {"name": "Tibetan Mask"},
|
||||||
|
|
61
data/tr2/ship/cfg/TR2X_strings_gm.json5
Normal file
61
data/tr2/ship/cfg/TR2X_strings_gm.json5
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
{
|
||||||
|
// For usage, refer to the documentation here:
|
||||||
|
// https://github.com/LostArtefacts/TRX/blob/stable/docs/GAME_STRINGS.md
|
||||||
|
|
||||||
|
"levels": [
|
||||||
|
// 0. Lara's Home
|
||||||
|
{
|
||||||
|
"title": "Lara's Home",
|
||||||
|
},
|
||||||
|
|
||||||
|
// 1. The Cold War
|
||||||
|
{
|
||||||
|
"title": "The Cold War",
|
||||||
|
"objects": {
|
||||||
|
"tiger": {"name": "Snow Leopard"},
|
||||||
|
"key_1": {"name": "Guardroom Key"},
|
||||||
|
"key_2": {"name": "Shaft 'B' Key"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
// 2. Fool's Gold
|
||||||
|
{
|
||||||
|
"title": "Fool's Gold",
|
||||||
|
"objects": {
|
||||||
|
"key_1": {"name": "CardKey 1"},
|
||||||
|
"key_4": {"name": "CardKey 2"},
|
||||||
|
"puzzle_1": {"name": "Circuit Board"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
// 3. Furnace of the Gods
|
||||||
|
{
|
||||||
|
"title": "Furnace of the Gods",
|
||||||
|
"objects": {
|
||||||
|
"big_spider": {"name": "Polar Bear"},
|
||||||
|
"spider": {"name": "Wolf"},
|
||||||
|
"puzzle_1": {"name": "Mask of Tornarsuk"},
|
||||||
|
"puzzle_2": {"name": "Gold Nugget"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
// 4. Kingdom
|
||||||
|
{
|
||||||
|
"title": "Kingdom",
|
||||||
|
"objects": {
|
||||||
|
"tiger": {"name": "Snow Leopard"},
|
||||||
|
"puzzle_1": {"name": "Mask of Tornarsuk"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
// 5. Nightmare in Vegas
|
||||||
|
{
|
||||||
|
"title": "Nightmare in Vegas",
|
||||||
|
"objects": {
|
||||||
|
"key_1": {"name": "Hotel Key"},
|
||||||
|
"puzzle_1": {"name": "Elevator Junction"},
|
||||||
|
"puzzle_2": {"name": "Door Circuit"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
## [Unreleased](https://github.com/LostArtefacts/TRX/compare/tr2-0.10...develop) - ××××-××-××
|
## [Unreleased](https://github.com/LostArtefacts/TRX/compare/tr2-0.10...develop) - ××××-××-××
|
||||||
|
- added support for The Golden Mask (#1621)
|
||||||
- added the bonus level game flow type, which allows for levels to be unlocked if all main game secrets are found (#2668)
|
- added the bonus level game flow type, which allows for levels to be unlocked if all main game secrets are found (#2668)
|
||||||
- added the ability for custom levels to have up to two of each secret type per level (#2674)
|
- added the ability for custom levels to have up to two of each secret type per level (#2674)
|
||||||
- fixed the final two levels not allowing for secrets to be counted in the statistics (#1582)
|
- fixed the final two levels not allowing for secrets to be counted in the statistics (#1582)
|
||||||
|
|
|
@ -48,6 +48,7 @@ game with new enhancements and features.
|
||||||
- added support for 60 FPS rendering
|
- added support for 60 FPS rendering
|
||||||
- added a pause screen
|
- added a pause screen
|
||||||
- added a photo mode feature
|
- added a photo mode feature
|
||||||
|
- added combined support for The Golden Mask
|
||||||
- changed inventory to pause the music rather than muting it
|
- changed inventory to pause the music rather than muting it
|
||||||
- fixed killing the T-Rex with a grenade launcher crashing the game
|
- fixed killing the T-Rex with a grenade launcher crashing the game
|
||||||
- fixed secret rewards not displaying shotgun ammo
|
- fixed secret rewards not displaying shotgun ammo
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
#include "game/input.h"
|
#include "game/input.h"
|
||||||
#include "game/level.h"
|
#include "game/level.h"
|
||||||
#include "game/music.h"
|
#include "game/music.h"
|
||||||
|
#include "game/objects/creatures/big_spider.h"
|
||||||
|
#include "game/objects/creatures/monk.h"
|
||||||
|
#include "game/objects/creatures/spider.h"
|
||||||
#include "game/output.h"
|
#include "game/output.h"
|
||||||
#include "game/phase.h"
|
#include "game/phase.h"
|
||||||
#include "game/random.h"
|
#include "game/random.h"
|
||||||
|
@ -26,6 +29,8 @@
|
||||||
#include <libtrx/enum_map.h>
|
#include <libtrx/enum_map.h>
|
||||||
#include <libtrx/game/game_buf.h>
|
#include <libtrx/game/game_buf.h>
|
||||||
#include <libtrx/game/game_string_table.h>
|
#include <libtrx/game/game_string_table.h>
|
||||||
|
#include <libtrx/game/objects/creatures/bear.h>
|
||||||
|
#include <libtrx/game/objects/creatures/wolf.h>
|
||||||
#include <libtrx/game/shell.h>
|
#include <libtrx/game/shell.h>
|
||||||
#include <libtrx/game/ui/common.h>
|
#include <libtrx/game/ui/common.h>
|
||||||
#include <libtrx/memory.h>
|
#include <libtrx/memory.h>
|
||||||
|
@ -38,6 +43,7 @@
|
||||||
typedef enum {
|
typedef enum {
|
||||||
M_MOD_UNKNOWN,
|
M_MOD_UNKNOWN,
|
||||||
M_MOD_OG,
|
M_MOD_OG,
|
||||||
|
M_MOD_GM,
|
||||||
M_MOD_CUSTOM_LEVEL,
|
M_MOD_CUSTOM_LEVEL,
|
||||||
} M_MOD;
|
} M_MOD;
|
||||||
|
|
||||||
|
@ -55,6 +61,10 @@ static struct {
|
||||||
.game_flow_path = "cfg/TR2X_gameflow.json5",
|
.game_flow_path = "cfg/TR2X_gameflow.json5",
|
||||||
.game_strings_path = "cfg/TR2X_strings.json5",
|
.game_strings_path = "cfg/TR2X_strings.json5",
|
||||||
},
|
},
|
||||||
|
[M_MOD_GM] = {
|
||||||
|
.game_flow_path = "cfg/TR2X_gameflow_gm.json5",
|
||||||
|
.game_strings_path = "cfg/TR2X_strings_gm.json5",
|
||||||
|
},
|
||||||
[M_MOD_CUSTOM_LEVEL] = {
|
[M_MOD_CUSTOM_LEVEL] = {
|
||||||
.game_flow_path = "cfg/TR2X_gameflow_level.json5",
|
.game_flow_path = "cfg/TR2X_gameflow_level.json5",
|
||||||
.game_strings_path = "cfg/TR2X_strings_level.json5",
|
.game_strings_path = "cfg/TR2X_strings_level.json5",
|
||||||
|
@ -308,6 +318,9 @@ static void M_ParseArgs(SHELL_ARGS *const out_args)
|
||||||
out_args->mod = M_MOD_OG;
|
out_args->mod = M_MOD_OG;
|
||||||
|
|
||||||
for (int32_t i = 0; i < arg_count; i++) {
|
for (int32_t i = 0; i < arg_count; i++) {
|
||||||
|
if (!strcmp(args[i], "-gold")) {
|
||||||
|
out_args->mod = M_MOD_GM;
|
||||||
|
}
|
||||||
if ((!strcmp(args[i], "-l") || !strcmp(args[i], "--level"))
|
if ((!strcmp(args[i], "-l") || !strcmp(args[i], "--level"))
|
||||||
&& i + 1 < arg_count) {
|
&& i + 1 < arg_count) {
|
||||||
out_args->level_to_play = args[i + 1];
|
out_args->level_to_play = args[i + 1];
|
||||||
|
@ -378,6 +391,16 @@ void Shell_Main(void)
|
||||||
{
|
{
|
||||||
M_ParseArgs(&m_Args);
|
M_ParseArgs(&m_Args);
|
||||||
|
|
||||||
|
if (m_Args.mod == M_MOD_GM) {
|
||||||
|
Object_Get(O_MONK_3)->setup_func = Monk3_Setup;
|
||||||
|
Object_Get(O_BEAR)->setup_func = Bear_Setup;
|
||||||
|
Object_Get(O_WOLF)->setup_func = Wolf_Setup;
|
||||||
|
} else {
|
||||||
|
Object_Get(O_MONK_1)->setup_func = Monk1_Setup;
|
||||||
|
Object_Get(O_SPIDER)->setup_func = Spider_Setup;
|
||||||
|
Object_Get(O_BIG_SPIDER)->setup_func = BigSpider_Setup;
|
||||||
|
}
|
||||||
|
|
||||||
GameString_Init();
|
GameString_Init();
|
||||||
EnumMap_Init();
|
EnumMap_Init();
|
||||||
Config_Init();
|
Config_Init();
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
"ConfigPath": "cfg\\TR2X.json5",
|
"ConfigPath": "cfg\\TR2X.json5",
|
||||||
"GameFlowName": "TR2X_gameflow.json5",
|
"GameFlowName": "TR2X_gameflow.json5",
|
||||||
"ExecutableName": "TR2X.exe",
|
"ExecutableName": "TR2X.exe",
|
||||||
"GoldSupported": false,
|
"GoldSupported": true,
|
||||||
"GitHubURL": "https://github.com/LostArtefacts/TRX"
|
"GitHubURL": "https://github.com/LostArtefacts/TRX"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue