diff --git a/data/tr1/ship/cfg/TR1X_gameflow.json5 b/data/tr1/ship/cfg/TR1X_gameflow.json5 index e86372fc4..0e6ad2a08 100644 --- a/data/tr1/ship/cfg/TR1X_gameflow.json5 +++ b/data/tr1/ship/cfg/TR1X_gameflow.json5 @@ -28,7 +28,7 @@ "music_track": 2, "inherit_injections": false, "sequence": [ - {"type": "display_picture", "path": "data/images/eidos.webp", "display_time": 1, "fade_in_time": 1.0, "fade_out_time": 1.0}, + {"type": "display_picture", "path": "data/images/eidos.webp", "legal": true, "display_time": 1, "fade_in_time": 1.0, "fade_out_time": 1.0}, {"type": "play_fmv", "fmv_id": 0}, {"type": "play_fmv", "fmv_id": 1}, {"type": "play_fmv", "fmv_id": 2}, @@ -502,8 +502,8 @@ // FMVs "fmvs": [ - {"path": "fmv/core.avi"}, - {"path": "fmv/escape.avi"}, + {"path": "fmv/core.avi", "legal": true}, + {"path": "fmv/escape.avi", "legal": true}, {"path": "fmv/cafe.avi"}, {"path": "fmv/mansion.avi"}, {"path": "fmv/snow.avi"}, diff --git a/data/tr1/ship/cfg/TR1X_gameflow_ub.json5 b/data/tr1/ship/cfg/TR1X_gameflow_ub.json5 index f52b4f876..4b2ba8a28 100644 --- a/data/tr1/ship/cfg/TR1X_gameflow_ub.json5 +++ b/data/tr1/ship/cfg/TR1X_gameflow_ub.json5 @@ -34,7 +34,7 @@ "data/injections/pda_model.bin", ], "sequence": [ - {"type": "display_picture", "path": "data/images/eidos.webp", "display_time": 1, "fade_in_time": 1.0, "fade_out_time": 1.0}, + {"type": "display_picture", "path": "data/images/eidos.webp", "legal": true, "display_time": 1, "fade_in_time": 1.0, "fade_out_time": 1.0}, {"type": "play_fmv", "fmv_id": 0}, {"type": "play_fmv", "fmv_id": 1}, {"type": "exit_to_title"}, @@ -132,7 +132,7 @@ ], "fmvs": [ - {"path": "fmv/core.avi"}, - {"path": "fmv/escape.avi"}, + {"path": "fmv/core.avi", "legal": true}, + {"path": "fmv/escape.avi", "legal": true}, ], } diff --git a/data/tr2/ship/cfg/TR2X_gameflow.json5 b/data/tr2/ship/cfg/TR2X_gameflow.json5 index a196316f7..5c6bd0da2 100644 --- a/data/tr2/ship/cfg/TR2X_gameflow.json5 +++ b/data/tr2/ship/cfg/TR2X_gameflow.json5 @@ -28,7 +28,7 @@ "path": "data/title.tr2", "music_track": 64, "sequence": [ - {"type": "display_picture", "path": "data/images/legal.png"}, + {"type": "display_picture", "path": "data/images/legal.png", "legal": true}, {"type": "play_fmv", "fmv_id": 0}, {"type": "play_fmv", "fmv_id": 1}, {"type": "exit_to_title"}, @@ -493,7 +493,7 @@ ], "fmvs": [ - {"path": "fmv/LOGO.RPL"}, + {"path": "fmv/LOGO.RPL", "legal": true}, {"path": "fmv/ANCIENT.RPL"}, {"path": "fmv/MODERN.RPL"}, {"path": "fmv/LANDING.RPL"}, diff --git a/data/tr2/ship/cfg/TR2X_gameflow_gm.json5 b/data/tr2/ship/cfg/TR2X_gameflow_gm.json5 index 0a7b490f3..66095f0d6 100644 --- a/data/tr2/ship/cfg/TR2X_gameflow_gm.json5 +++ b/data/tr2/ship/cfg/TR2X_gameflow_gm.json5 @@ -28,7 +28,7 @@ "path": "data/title_gm.tr2", "music_track": 64, "sequence": [ - {"type": "display_picture", "path": "data/images/legal.png"}, + {"type": "display_picture", "path": "data/images/legal.png", "legal": true}, {"type": "exit_to_title"}, ], }, diff --git a/docs/tr1/CHANGELOG.md b/docs/tr1/CHANGELOG.md index fbe582638..5d07c95c5 100644 --- a/docs/tr1/CHANGELOG.md +++ b/docs/tr1/CHANGELOG.md @@ -11,6 +11,7 @@ - changed the `draw_distance_min` and `draw_distance_max` to `fog_start` and `fog_end` - changed `Select Detail` dialog title to `Graphic Options` - changed the number of static mesh slots from 50 to 256 (#2734) +- changed the "enable EIDOS logo" option to disable the Core Design and Bink Video Codec FMVs as well; renamed to "enable legal" (#2741) - fixed the bilinear filter to not readjust the UVs (#2258) - fixed anisotropy filter causing black lines on certain GPUs (#902) - fixed mesh faces not being drawn under some circumstances (#2452, #2438) diff --git a/docs/tr2/CHANGELOG.md b/docs/tr2/CHANGELOG.md index ada204d3f..9debee528 100644 --- a/docs/tr2/CHANGELOG.md +++ b/docs/tr2/CHANGELOG.md @@ -1,5 +1,6 @@ ## [Unreleased](https://github.com/LostArtefacts/TRX/compare/tr2-0.10...develop) - ××××-××-×× - added support for The Golden Mask (#1621) +- added ability to turn off legal screen and FMVs (#2740) - added sunglasses for graphic options (#1615) - added control over the fog distances for players and level builders (#1622) - added control over the water color for players and level builders (#1619) diff --git a/src/libtrx/config/map_tr1.def b/src/libtrx/config/map_tr1.def index 2f51d98d3..7fe2f8f3e 100644 --- a/src/libtrx/config/map_tr1.def +++ b/src/libtrx/config/map_tr1.def @@ -42,7 +42,7 @@ CFG_INT32(g_Config, rendering.resolution_width, -1) CFG_INT32(g_Config, rendering.resolution_height, -1) CFG_BOOL(g_Config, gameplay.enable_demo, true) CFG_BOOL(g_Config, gameplay.enable_fmv, true) -CFG_BOOL(g_Config, gameplay.enable_eidos_logo, true) +CFG_BOOL(g_Config, gameplay.enable_legal, true) CFG_BOOL(g_Config, gameplay.enable_loading_screens, false) CFG_BOOL(g_Config, gameplay.enable_cine, true) CFG_BOOL(g_Config, audio.enable_music_in_menu, true) diff --git a/src/libtrx/config/map_tr2.def b/src/libtrx/config/map_tr2.def index 677a5f4ca..ca79af273 100644 --- a/src/libtrx/config/map_tr2.def +++ b/src/libtrx/config/map_tr2.def @@ -11,6 +11,7 @@ CFG_BOOL(g_Config, gameplay.fix_bear_ai, true) CFG_BOOL(g_Config, gameplay.enable_cheats, false) CFG_BOOL(g_Config, gameplay.enable_console, true) CFG_BOOL(g_Config, gameplay.enable_fmv, true) +CFG_BOOL(g_Config, gameplay.enable_legal, true) CFG_BOOL(g_Config, input.enable_tr3_sidesteps, true) CFG_BOOL(g_Config, input.enable_responsive_passport, true) CFG_BOOL(g_Config, gameplay.enable_auto_item_selection, true) diff --git a/src/libtrx/config/priv_tr1.c b/src/libtrx/config/priv_tr1.c index a4d2b16c4..d5c53bf38 100644 --- a/src/libtrx/config/priv_tr1.c +++ b/src/libtrx/config/priv_tr1.c @@ -117,6 +117,9 @@ static void M_LoadLegacyOptions(JSON_OBJECT *const parent_obj) READ_FALLBACK_INT(g_Config.window.height, "window_height"); READ_FALLBACK_INT(g_Config.input.keyboard_layout, "layout"); READ_FALLBACK_INT(g_Config.input.controller_layout, "cntlr_layout"); + + // ..4.9 + READ_FALLBACK_BOOL(g_Config.gameplay.enable_legal, "enable_eidos_logo"); } static void M_DumpKeyboardLayout( diff --git a/src/libtrx/game/game_flow/reader.c b/src/libtrx/game/game_flow/reader.c index 75928b13a..26f096e74 100644 --- a/src/libtrx/game/game_flow/reader.c +++ b/src/libtrx/game/game_flow/reader.c @@ -173,6 +173,7 @@ static DECLARE_SEQUENCE_EVENT_HANDLER_FUNC(M_HandlePictureEvent) if (event != nullptr) { GF_DISPLAY_PICTURE_DATA *const event_data = extra_data; event_data->path = (char *)extra_data + sizeof(GF_DISPLAY_PICTURE_DATA); + event_data->is_legal = JSON_ObjectGetBool(event_obj, "legal", false); event_data->display_time = JSON_ObjectGetDouble(event_obj, "display_time", 5.0); event_data->fade_in_time = @@ -527,6 +528,7 @@ static void M_LoadFMV( Shell_ExitSystemFmt("Missing FMV path"); } fmv->path = Memory_DupStr(path); + fmv->is_legal = JSON_ObjectGetBool(obj, "legal", false); } static void M_LoadFMVs(JSON_OBJECT *const obj, GAME_FLOW *const gf) diff --git a/src/libtrx/game/game_flow/sequencer_events.c b/src/libtrx/game/game_flow/sequencer_events.c index 9e4e68f65..731202a25 100644 --- a/src/libtrx/game/game_flow/sequencer_events.c +++ b/src/libtrx/game/game_flow/sequencer_events.c @@ -50,13 +50,18 @@ static DECLARE_GF_EVENT_HANDLER(M_HandlePlayFMV) { GF_COMMAND gf_cmd = { .action = GF_NOOP }; const int16_t fmv_id = (int16_t)(intptr_t)event->data; - if (seq_ctx != GFSC_SAVED) { - if (fmv_id < 0 || fmv_id >= g_GameFlow.fmv_count) { - LOG_ERROR("Invalid FMV number: %d", fmv_id); - } else { - FMV_Play(g_GameFlow.fmvs[fmv_id].path); - } + if (seq_ctx == GFSC_SAVED) { + return gf_cmd; } + if (fmv_id < 0 || fmv_id >= g_GameFlow.fmv_count) { + LOG_ERROR("Invalid FMV number: %d", fmv_id); + return gf_cmd; + } + const GF_FMV *const fmv = &g_GameFlow.fmvs[fmv_id]; + if (fmv->is_legal && !g_Config.gameplay.enable_legal) { + return gf_cmd; + } + FMV_Play(fmv->path); return gf_cmd; } @@ -73,14 +78,11 @@ static DECLARE_GF_EVENT_HANDLER(M_HandlePicture) return gf_cmd; } -#if TR_VERSION == 1 - if (Game_GetCurrentLevel() == nullptr - && !g_Config.gameplay.enable_eidos_logo) { + GF_DISPLAY_PICTURE_DATA *data = event->data; + if (data->is_legal && !g_Config.gameplay.enable_legal) { return gf_cmd; } -#endif - GF_DISPLAY_PICTURE_DATA *data = event->data; PHASE *const phase = Phase_Picture_Create((PHASE_PICTURE_ARGS) { .file_name = data->path, .display_time = data->display_time, diff --git a/src/libtrx/include/libtrx/config/types_tr1.h b/src/libtrx/include/libtrx/config/types_tr1.h index 5a8218795..5282ad38c 100644 --- a/src/libtrx/include/libtrx/config/types_tr1.h +++ b/src/libtrx/include/libtrx/config/types_tr1.h @@ -152,11 +152,11 @@ typedef struct { bool enable_cheats; bool enable_console; bool enable_fmv; + bool enable_legal; bool enable_compass_stats; bool enable_total_stats; bool enable_timer_in_inventory; bool enable_demo; - bool enable_eidos_logo; bool enable_loading_screens; bool enable_cine; STAT_DETAIL_MODE stat_detail_mode; diff --git a/src/libtrx/include/libtrx/config/types_tr2.h b/src/libtrx/include/libtrx/config/types_tr2.h index 2a3da9e55..b1332ff6e 100644 --- a/src/libtrx/include/libtrx/config/types_tr2.h +++ b/src/libtrx/include/libtrx/config/types_tr2.h @@ -84,6 +84,7 @@ typedef struct { bool enable_cheats; bool enable_console; bool enable_fmv; + bool enable_legal; bool enable_auto_item_selection; int32_t turbo_speed; bool enable_game_modes; diff --git a/src/libtrx/include/libtrx/game/game_flow/types.h b/src/libtrx/include/libtrx/game/game_flow/types.h index c624683b1..cb4412b1b 100644 --- a/src/libtrx/include/libtrx/game/game_flow/types.h +++ b/src/libtrx/include/libtrx/game/game_flow/types.h @@ -29,6 +29,7 @@ typedef struct { typedef struct { char *path; + bool is_legal; float display_time; float fade_in_time; float fade_out_time; @@ -75,6 +76,7 @@ typedef struct { typedef struct { const char *path; + bool is_legal; } GF_FMV; typedef struct { diff --git a/tools/config/TR1X_ConfigTool/Resources/Lang/en.json b/tools/config/TR1X_ConfigTool/Resources/Lang/en.json index 3524a8fc7..6d2c2d577 100644 --- a/tools/config/TR1X_ConfigTool/Resources/Lang/en.json +++ b/tools/config/TR1X_ConfigTool/Resources/Lang/en.json @@ -250,9 +250,9 @@ "Title": "Enable FMVs", "Description": "Enables FMVs playing." }, - "enable_eidos_logo": { - "Title": "Enable EIDOS logo", - "Description": "Enables EIDOS logo at the game start." + "enable_legal": { + "Title": "Enable legal", + "Description": "Enables EIDOS logo, Core Design FMV and bink video codec FMV at the game start." }, "enable_loading_screens": { "Title": "Enable loading screens", diff --git a/tools/config/TR1X_ConfigTool/Resources/Lang/es.json b/tools/config/TR1X_ConfigTool/Resources/Lang/es.json index a947d52f2..664dbfcd7 100644 --- a/tools/config/TR1X_ConfigTool/Resources/Lang/es.json +++ b/tools/config/TR1X_ConfigTool/Resources/Lang/es.json @@ -197,9 +197,9 @@ "Title": "Habilitar FMV", "Description": "Habilita la reproducción de vídeos FMV." }, - "enable_eidos_logo": { - "Title": "Habilitar el logo de EIDOS", - "Description": "Habilita el logo de EIDOS al comienzo del juego." + "enable_legal": { + "Title": "Habilitar el contenido legal", + "Description": "Habilita el logo de EIDOS, el FMV de Core Design y el FMV de códec de video bink al inicio del juego." }, "enable_loading_screens": { "Title": "Habilitar pantallas de carga", diff --git a/tools/config/TR1X_ConfigTool/Resources/Lang/fr.json b/tools/config/TR1X_ConfigTool/Resources/Lang/fr.json index d2729b6cf..8de60a5b8 100644 --- a/tools/config/TR1X_ConfigTool/Resources/Lang/fr.json +++ b/tools/config/TR1X_ConfigTool/Resources/Lang/fr.json @@ -261,9 +261,9 @@ "Title": "Activer les FMV", "Description": "Active les FMV en jeu." }, - "enable_eidos_logo": { - "Title": "Activer le logo EIDOS", - "Description": "Active le logo EIDOS au début du jeu." + "enable_legal": { + "Title": "Activer le contenu légal", + "Description": "Active le logo EIDOS, la vidéo FMV de Core Design et la vidéo FMV avec le codec Bink au début du jeu." }, "enable_loading_screens": { "Title": "Activer les écrans de chargement", diff --git a/tools/config/TR1X_ConfigTool/Resources/Lang/it.json b/tools/config/TR1X_ConfigTool/Resources/Lang/it.json index 4a48970c8..2ec908224 100644 --- a/tools/config/TR1X_ConfigTool/Resources/Lang/it.json +++ b/tools/config/TR1X_ConfigTool/Resources/Lang/it.json @@ -261,9 +261,9 @@ "Title": "Abilita gli FMV", "Description": "Abilita la riproduzione dei filmati." }, - "enable_eidos_logo": { - "Title": "Abilita il logo EIDOS", - "Description": "Abilita il logo EIDOS all'avvio del gioco." + "enable_legal": { + "Title": "Abilita il contenuto legale", + "Description": "Abilita il logo EIDOS, il FMV di Core Design e il FMV del codec video Bink all'avvio del gioco." }, "enable_loading_screens": { "Title": "Abilita le schermate di caricamento", diff --git a/tools/config/TR1X_ConfigTool/Resources/specification.json b/tools/config/TR1X_ConfigTool/Resources/specification.json index 89ea2cb1c..aeaa97be6 100644 --- a/tools/config/TR1X_ConfigTool/Resources/specification.json +++ b/tools/config/TR1X_ConfigTool/Resources/specification.json @@ -329,7 +329,7 @@ "DefaultValue": true }, { - "Field": "enable_eidos_logo", + "Field": "enable_legal", "DataType": "Bool", "DefaultValue": true },