Skip to content

Commit

Permalink
tr1/game-flow: move cutscenes to own level sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Jan 25, 2025
1 parent 5e4ae99 commit 3e013d1
Show file tree
Hide file tree
Showing 16 changed files with 316 additions and 258 deletions.
190 changes: 99 additions & 91 deletions data/tr1/ship/cfg/TR1X_gameflow.json5
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@
{"type": "loading_screen", "path": "data/images/peru.webp"},
{"type": "load_level"},
{"type": "play_level"},
{"type": "exit_to_cine", "level_id": 16},
{"type": "play_cutscene", "cutscene_id": 0},
{"type": "level_stats", "level_id": 4},
{"type": "exit_to_level", "level_id": 5},
],
},

Expand Down Expand Up @@ -226,7 +228,9 @@
{"type": "loading_screen", "path": "data/images/greece.webp"},
{"type": "load_level"},
{"type": "play_level"},
{"type": "exit_to_cine", "level_id": 17},
{"type": "play_cutscene", "cutscene_id": 1},
{"type": "level_stats", "level_id": 9},
{"type": "exit_to_level", "level_id": 10},
],
},

Expand Down Expand Up @@ -319,7 +323,8 @@
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats", "level_id": 13},
{"type": "exit_to_cine", "level_id": 18},
{"type": "play_cutscene", "cutscene_id": 2},
{"type": "exit_to_level", "level_id": 14},
],
},

Expand All @@ -340,7 +345,9 @@
{"type": "setup_bacon_lara", "anchor_room": 10},
{"type": "play_level"},
{"type": "play_fmv", "fmv_id": 9},
{"type": "exit_to_cine", "level_id": 19},
{"type": "play_cutscene", "cutscene_id": 3},
{"type": "level_stats", "level_id": 14},
{"type": "exit_to_level", "level_id": 15},
],
"unobtainable_pickups": 3,
},
Expand Down Expand Up @@ -371,7 +378,91 @@
],
},

// Level 16: Cut Scene 1
// Level 16-19: Legacy savegame placeholders
{"type": "dummy"},
{"type": "dummy"},
{"type": "dummy"},
{"type": "dummy"},

// Level 20: Title
{
"path": "data/title.phd",
"type": "title",
"music_track": 2,
"inherit_injections": false,
"injections": [
"data/injections/pda_model.bin",
"data/injections/font.bin",
],
"sequence": [
{"type": "display_picture", "path": "data/images/eidos.webp", "display_time": 1},
{"type": "play_fmv", "fmv_id": 0},
{"type": "play_fmv", "fmv_id": 1},
{"type": "play_fmv", "fmv_id": 2},
{"type": "exit_to_title"},
],
},

// Level 21: Current Position
// This level is necessary to read TombATI's save files!
// OG has a special level called LV_CURRENT to handle save/load logic.
// TR1X does away without this hack. However, the existing save games
// expect the level count to match, otherwise the game will crash.
// Hence this dummy level.
{
"path": "data/current.phd",
"type": "current",
"music_track": 0,
"inherit_injections": false,
"sequence": [
{"type": "exit_to_title"},
],
},
],

"demos": [
// Demo 1: City of Vilcabamba
{
"path": "data/level2.phd",
"type": "normal",
"music_track": 57,
"injections": [
"data/injections/vilcabamba_itemrots.bin",
"data/injections/vilcabamba_textures.bin",
],
"sequence": [
{"type": "loading_screen", "path": "data/images/peru.webp"},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats", "level_id": 2},
{"type": "exit_to_level", "level_id": 3},
],
},

// Demo 2: Lost Valley
{
"path": "data/level3a.phd",
"type": "normal",
"music_track": 57,
"injections": [
"data/injections/braid_valley.bin",
"data/injections/valley_itemrots.bin",
"data/injections/valley_skybox.bin",
"data/injections/valley_textures.bin",
],
"sequence": [
{"type": "loading_screen", "path": "data/images/peru.webp"},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats", "level_id": 3},
{"type": "exit_to_level", "level_id": 4},
],
},

],

"cutscenes": [
// Cut Scene 1
{
"path": "data/cut1.phd",
"type": "cutscene",
Expand All @@ -389,12 +480,10 @@
{"type": "set_cutscene_angle", "value": -23312},
{"type": "play_synced_audio", "audio_id": 23},
{"type": "play_level"},
{"type": "level_stats", "level_id": 4},
{"type": "exit_to_level", "level_id": 5},
],
},

// Level 17: Cut Scene 2
// Cut Scene 2
{
"path": "data/cut2.phd",
"type": "cutscene",
Expand All @@ -414,12 +503,10 @@
{"type": "mesh_swap", "object1_id": "player_1", "object2_id": "pistol_anim", "mesh_id": 1},
{"type": "mesh_swap", "object1_id": "player_1", "object2_id": "pistol_anim", "mesh_id": 4},
{"type": "play_level"},
{"type": "level_stats", "level_id": 9},
{"type": "exit_to_level", "level_id": 10},
],
},

// Level 18: Cut Scene 3
// Cut Scene 3
{
"path": "data/cut3.phd",
"type": "cutscene",
Expand All @@ -436,11 +523,10 @@
{"type": "set_cutscene_angle", "value": 16384},
{"type": "play_synced_audio", "audio_id": 24},
{"type": "play_level"},
{"type": "exit_to_level", "level_id": 14},
],
},

// Level 19: Cut Scene 4
// Cut Scene 4
{
"path": "data/cut4.phd",
"type": "cutscene",
Expand All @@ -463,86 +549,8 @@
{"type": "mesh_swap", "object1_id": "player_1", "object2_id": "pistol_anim", "mesh_id": 1},
{"type": "mesh_swap", "object1_id": "player_1", "object2_id": "pistol_anim", "mesh_id": 4},
{"type": "play_level"},
{"type": "level_stats", "level_id": 14},
{"type": "exit_to_level", "level_id": 15},
],
},

// Level 20: Title
{
"path": "data/title.phd",
"type": "title",
"music_track": 2,
"inherit_injections": false,
"injections": [
"data/injections/pda_model.bin",
"data/injections/font.bin",
],
"sequence": [
{"type": "display_picture", "path": "data/images/eidos.webp", "display_time": 1},
{"type": "play_fmv", "fmv_id": 0},
{"type": "play_fmv", "fmv_id": 1},
{"type": "play_fmv", "fmv_id": 2},
{"type": "exit_to_title"},
],
},

// Level 21: Current Position
// This level is necessary to read TombATI's save files!
// OG has a special level called LV_CURRENT to handle save/load logic.
// TR1X does away without this hack. However, the existing save games
// expect the level count to match, otherwise the game will crash.
// Hence this dummy level.
{
"path": "data/current.phd",
"type": "current",
"music_track": 0,
"inherit_injections": false,
"sequence": [
{"type": "exit_to_title"},
],
},
],

"demos": [
// Demo 1: City of Vilcabamba
{
"path": "data/level2.phd",
"type": "normal",
"music_track": 57,
"injections": [
"data/injections/vilcabamba_itemrots.bin",
"data/injections/vilcabamba_textures.bin",
],
"sequence": [
{"type": "loading_screen", "path": "data/images/peru.webp"},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats", "level_id": 2},
{"type": "exit_to_level", "level_id": 3},
],
},

// Demo 2: Lost Valley
{
"path": "data/level3a.phd",
"type": "normal",
"music_track": 57,
"injections": [
"data/injections/braid_valley.bin",
"data/injections/valley_itemrots.bin",
"data/injections/valley_skybox.bin",
"data/injections/valley_textures.bin",
],
"sequence": [
{"type": "loading_screen", "path": "data/images/peru.webp"},
{"type": "load_level"},
{"type": "play_level"},
{"type": "level_stats", "level_id": 3},
{"type": "exit_to_level", "level_id": 4},
],
},

],

// FMVs
Expand Down
31 changes: 12 additions & 19 deletions data/tr1/ship/cfg/TR1X_strings.json5
Original file line number Diff line number Diff line change
Expand Up @@ -131,25 +131,11 @@
"title": "The Great Pyramid",
},

// Level 16: Cut Scene 1
{
"title": "Cut Scene 1",
},

// Level 17: Cut Scene 2
{
"title": "Cut Scene 2",
},

// Level 18: Cut Scene 3
{
"title": "Cut Scene 3",
},

// Level 19: Cut Scene 4
{
"title": "Cut Scene 4",
},
// Level 16-19: Legacy savegame placeholders
{"title": "Dummy"},
{"title": "Dummy"},
{"title": "Dummy"},
{"title": "Dummy"},

// Level 20: Title
{
Expand All @@ -162,6 +148,13 @@
},
],

"cutscenes": [
{"title": "Cut Scene 1"},
{"title": "Cut Scene 2"},
{"title": "Cut Scene 3"},
{"title": "Cut Scene 4"},
],

"demos": [
{
"title": "City of Vilcabamba",
Expand Down
Loading

0 comments on commit 3e013d1

Please sign in to comment.