Skip to content

Commit

Permalink
game-flow: move common bits to libtrx
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Jan 29, 2025
1 parent 898d118 commit 0ef4254
Show file tree
Hide file tree
Showing 23 changed files with 404 additions and 416 deletions.
46 changes: 23 additions & 23 deletions data/tr1/ship/cfg/TR1X_gameflow.json5
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"music_track": 2,
"inherit_injections": false,
"sequence": [
{"type": "display_picture", "path": "data/images/eidos.webp", "display_time": 1},
{"type": "display_picture", "path": "data/images/eidos.webp", "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},
Expand All @@ -51,7 +51,7 @@
"inherit_injections": false,
"sequence": [
{"type": "play_fmv", "fmv_id": 3},
{"type": "loading_screen", "path": "data/images/gym.webp"},
{"type": "loading_screen", "path": "data/images/gym.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats"},
Expand All @@ -74,7 +74,7 @@
"music_track": 57,
"sequence": [
{"type": "play_fmv", "fmv_id": 4},
{"type": "loading_screen", "path": "data/images/peru.webp"},
{"type": "loading_screen", "path": "data/images/peru.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats"},
Expand All @@ -92,7 +92,7 @@
"path": "data/level2.phd",
"music_track": 57,
"sequence": [
{"type": "loading_screen", "path": "data/images/peru.webp"},
{"type": "loading_screen", "path": "data/images/peru.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats"},
Expand All @@ -109,7 +109,7 @@
"path": "data/level3a.phd",
"music_track": 57,
"sequence": [
{"type": "loading_screen", "path": "data/images/peru.webp"},
{"type": "loading_screen", "path": "data/images/peru.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats"},
Expand All @@ -128,7 +128,7 @@
"path": "data/level3b.phd",
"music_track": 57,
"sequence": [
{"type": "loading_screen", "path": "data/images/peru.webp"},
{"type": "loading_screen", "path": "data/images/peru.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "load_level"},
{"type": "play_level"},
{"type": "play_cutscene", "cutscene_id": 0},
Expand All @@ -149,7 +149,7 @@
"music_track": 59,
"sequence": [
{"type": "play_fmv", "fmv_id": 5},
{"type": "loading_screen", "path": "data/images/greece.webp"},
{"type": "loading_screen", "path": "data/images/greece.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats"},
Expand All @@ -167,7 +167,7 @@
"path": "data/level5.phd",
"music_track": 59,
"sequence": [
{"type": "loading_screen", "path": "data/images/greece.webp"},
{"type": "loading_screen", "path": "data/images/greece.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats"},
Expand All @@ -187,7 +187,7 @@
"path": "data/level6.phd",
"music_track": 59,
"sequence": [
{"type": "loading_screen", "path": "data/images/greece.webp"},
{"type": "loading_screen", "path": "data/images/greece.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats"},
Expand All @@ -205,7 +205,7 @@
"path": "data/level7a.phd",
"music_track": 58,
"sequence": [
{"type": "loading_screen", "path": "data/images/greece.webp"},
{"type": "loading_screen", "path": "data/images/greece.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats"},
Expand All @@ -224,7 +224,7 @@
"path": "data/level7b.phd",
"music_track": 58,
"sequence": [
{"type": "loading_screen", "path": "data/images/greece.webp"},
{"type": "loading_screen", "path": "data/images/greece.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "load_level"},
{"type": "play_level"},
{"type": "play_cutscene", "cutscene_id": 1},
Expand All @@ -248,7 +248,7 @@
"music_track": 59,
"sequence": [
{"type": "play_fmv", "fmv_id": 6},
{"type": "loading_screen", "path": "data/images/egypt.webp"},
{"type": "loading_screen", "path": "data/images/egypt.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats"},
Expand All @@ -266,7 +266,7 @@
"path": "data/level8b.phd",
"music_track": 59,
"sequence": [
{"type": "loading_screen", "path": "data/images/egypt.webp"},
{"type": "loading_screen", "path": "data/images/egypt.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats"},
Expand All @@ -286,7 +286,7 @@
"path": "data/level8c.phd",
"music_track": 59,
"sequence": [
{"type": "loading_screen", "path": "data/images/egypt.webp"},
{"type": "loading_screen", "path": "data/images/egypt.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats"},
Expand All @@ -305,7 +305,7 @@
"music_track": 58,
"sequence": [
{"type": "play_fmv", "fmv_id": 7},
{"type": "loading_screen", "path": "data/images/atlantis.webp"},
{"type": "loading_screen", "path": "data/images/atlantis.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "remove_weapons"},
{"type": "remove_scions"},
{"type": "load_level"},
Expand Down Expand Up @@ -338,7 +338,7 @@
"music_track": 60,
"sequence": [
{"type": "play_fmv", "fmv_id": 8},
{"type": "loading_screen", "path": "data/images/atlantis.webp"},
{"type": "loading_screen", "path": "data/images/atlantis.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "load_level"},
{"type": "give_item", "object_id": "pistols", "quantity": 1},
{"type": "setup_bacon_lara", "anchor_room": 10},
Expand All @@ -360,16 +360,16 @@
"path": "data/level10c.phd",
"music_track": 60,
"sequence": [
{"type": "loading_screen", "path": "data/images/atlantis.webp"},
{"type": "loading_screen", "path": "data/images/atlantis.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats"},
{"type": "play_fmv", "fmv_id": 10},
{"type": "play_music", "music_track": 19},
{"type": "display_picture", "path": "data/images/end.webp", "display_time": 7.5},
{"type": "display_picture", "path": "data/images/credits_1.webp", "display_time": 7.5},
{"type": "display_picture", "path": "data/images/credits_2.webp", "display_time": 7.5},
{"type": "display_picture", "path": "data/images/credits_3.webp", "display_time": 7.5},
{"type": "display_picture", "path": "data/images/end.webp", "display_time": 7.5, "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "display_picture", "path": "data/images/credits_1.webp", "display_time": 7.5, "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "display_picture", "path": "data/images/credits_2.webp", "display_time": 7.5, "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "display_picture", "path": "data/images/credits_3.webp", "display_time": 7.5, "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "total_stats", "background_path": "data/images/install.webp"},
{"type": "exit_to_title"},
],
Expand Down Expand Up @@ -414,7 +414,7 @@
"data/injections/vilcabamba_textures.bin",
],
"sequence": [
{"type": "loading_screen", "path": "data/images/peru.webp"},
{"type": "loading_screen", "path": "data/images/peru.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats"},
Expand All @@ -433,7 +433,7 @@
"data/injections/valley_textures.bin",
],
"sequence": [
{"type": "loading_screen", "path": "data/images/peru.webp"},
{"type": "loading_screen", "path": "data/images/peru.webp", "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats"},
Expand Down
12 changes: 6 additions & 6 deletions data/tr1/ship/cfg/TR1X_gameflow_ub.json5
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"data/injections/pda_model.bin",
],
"sequence": [
{"type": "display_picture", "path": "data/images/eidos.webp", "display_time": 1},
{"type": "display_picture", "path": "data/images/eidos.webp", "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"},
Expand Down Expand Up @@ -110,11 +110,11 @@
{"type": "play_level"},
{"type": "level_stats"},
{"type": "play_music", "music_track": 19},
{"type": "display_picture", "path": "data/images/end.webp", "display_time": 7.5},
{"type": "display_picture", "path": "data/images/credits_ub.webp", "display_time": 7.5},
{"type": "display_picture", "path": "data/images/credits_1.webp", "display_time": 7.5},
{"type": "display_picture", "path": "data/images/credits_2.webp", "display_time": 7.5},
{"type": "display_picture", "path": "data/images/credits_3.webp", "display_time": 7.5},
{"type": "display_picture", "path": "data/images/end.webp", "display_time": 7.5, "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "display_picture", "path": "data/images/credits_ub.webp", "display_time": 7.5, "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "display_picture", "path": "data/images/credits_1.webp", "display_time": 7.5, "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "display_picture", "path": "data/images/credits_2.webp", "display_time": 7.5, "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "display_picture", "path": "data/images/credits_3.webp", "display_time": 7.5, "fade_in_time": 1.0, "fade_out_time": 1.0},
{"type": "total_stats", "background_path": "data/images/install.webp"},
{"type": "exit_to_title"},
],
Expand Down
48 changes: 42 additions & 6 deletions docs/tr1/GAMEFLOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -530,33 +530,57 @@ default gameflow for examples.
</td>
</tr>
<tr valign="top">
<td rowspan="2">
<td rowspan="4">
<code>display_picture</code>
</td>
<td>
<code>path</code>
</td>
<td>String</td>
<td rowspan="2">
Displays the specified picture for the given number of seconds (default: 5).
<td>
Displays the specified picture for a fixed time.
</td>
</tr>
<tr valign="top">
<td>
<code>display_time</code>
</td>
<td>Double</td>
<td>
Number of seconds to display the picture for (default: 5).
</td>
</tr>
<tr valign="top">
<td rowspan="2">
<td>
<code>fade_in_time</code>
</td>
<td>Double</td>
<td>
Number of seconds to do the fade-in animation, if enabled (default: 1).
</td>
</tr>
<tr valign="top">
<td>
<code>fade_out_time</code>
</td>
<td>Double</td>
<td>
Number of seconds to do the fade-out animation, if enabled (default: 0.33).
</td>
</tr>
<tr valign="top">
<td rowspan="4">
<code>loading_screen</code>
</td>
<td>
<code>path</code>
</td>
<td>String</td>
<td rowspan="2">
Displays the specified picture for the given number of seconds (default: 5). Functions identically to display_picture except these pictures can be enabled/disabled by the user with the loading screen option in the config tool.
<td rowspan="4">
Shows a picture prior to loading a level. Functions identically to
<code>display_picture</code>, except these pictures can be
enabled/disabled by the user with the loading screen option in the config
tool.
</td>
</tr>
<tr valign="top">
Expand All @@ -565,6 +589,18 @@ default gameflow for examples.
</td>
<td>Double</td>
</tr>
<tr valign="top">
<td>
<code>fade_in_time</code>
</td>
<td>Double</td>
</tr>
<tr valign="top">
<td>
<code>fade_out_time</code>
</td>
<td>Double</td>
</tr>
<tr valign="top">
<td>
<code>play_cutscene</code>
Expand Down
Loading

0 comments on commit 0ef4254

Please sign in to comment.