game-flow: reduce key naming differences

This commit is contained in:
Marcin Kurczewski 2025-01-24 13:20:34 +01:00
parent 6096153b99
commit c88972c7e5
11 changed files with 183 additions and 187 deletions

View file

@ -28,9 +28,9 @@
"levels": [ "levels": [
// Level 0: Lara's Home // Level 0: Lara's Home
{ {
"file": "data/gym.phd", "path": "data/gym.phd",
"type": "gym", "type": "gym",
"music": 0, "music_track": 0,
"inherit_injections": false, "inherit_injections": false,
"injections": [ "injections": [
"data/injections/lara_gym_guns.bin", "data/injections/lara_gym_guns.bin",
@ -42,8 +42,8 @@
"data/injections/font.bin", "data/injections/font.bin",
], ],
"sequence": [ "sequence": [
{"type": "play_fmv", "fmv_num": 3}, {"type": "play_fmv", "fmv_id": 3},
{"type": "loading_screen", "picture_path": "data/images/gym.webp", "display_time": 5}, {"type": "loading_screen", "path": "data/images/gym.webp"},
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_stats", "level_id": 0}, {"type": "level_stats", "level_id": 0},
@ -53,17 +53,17 @@
// Level 1: Caves // Level 1: Caves
{ {
"file": "data/level1.phd", "path": "data/level1.phd",
"type": "normal", "type": "normal",
"music": 57, "music_track": 57,
"injections": [ "injections": [
"data/injections/caves_fd.bin", "data/injections/caves_fd.bin",
"data/injections/caves_itemrots.bin", "data/injections/caves_itemrots.bin",
"data/injections/caves_textures.bin", "data/injections/caves_textures.bin",
], ],
"sequence": [ "sequence": [
{"type": "play_fmv", "fmv_num": 4}, {"type": "play_fmv", "fmv_id": 4},
{"type": "loading_screen", "picture_path": "data/images/peru.webp", "display_time": 5}, {"type": "loading_screen", "path": "data/images/peru.webp"},
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_stats", "level_id": 1}, {"type": "level_stats", "level_id": 1},
@ -73,15 +73,15 @@
// Level 2: City of Vilcabamba // Level 2: City of Vilcabamba
{ {
"file": "data/level2.phd", "path": "data/level2.phd",
"type": "normal", "type": "normal",
"music": 57, "music_track": 57,
"injections": [ "injections": [
"data/injections/vilcabamba_itemrots.bin", "data/injections/vilcabamba_itemrots.bin",
"data/injections/vilcabamba_textures.bin", "data/injections/vilcabamba_textures.bin",
], ],
"sequence": [ "sequence": [
{"type": "loading_screen", "picture_path": "data/images/peru.webp", "display_time": 5}, {"type": "loading_screen", "path": "data/images/peru.webp"},
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_stats", "level_id": 2}, {"type": "level_stats", "level_id": 2},
@ -92,9 +92,9 @@
// Level 3: Lost Valley // Level 3: Lost Valley
{ {
"file": "data/level3a.phd", "path": "data/level3a.phd",
"type": "normal", "type": "normal",
"music": 57, "music_track": 57,
"injections": [ "injections": [
"data/injections/braid_valley.bin", "data/injections/braid_valley.bin",
"data/injections/valley_itemrots.bin", "data/injections/valley_itemrots.bin",
@ -102,7 +102,7 @@
"data/injections/valley_textures.bin", "data/injections/valley_textures.bin",
], ],
"sequence": [ "sequence": [
{"type": "loading_screen", "picture_path": "data/images/peru.webp", "display_time": 5}, {"type": "loading_screen", "path": "data/images/peru.webp"},
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_stats", "level_id": 3}, {"type": "level_stats", "level_id": 3},
@ -113,9 +113,9 @@
// Level 4: Tomb of Qualopec // Level 4: Tomb of Qualopec
{ {
"file": "data/level3b.phd", "path": "data/level3b.phd",
"type": "normal", "type": "normal",
"music": 57, "music_track": 57,
"injections": [ "injections": [
"data/injections/larson_textures.bin", "data/injections/larson_textures.bin",
"data/injections/qualopec_fd.bin", "data/injections/qualopec_fd.bin",
@ -123,7 +123,7 @@
"data/injections/qualopec_textures.bin", "data/injections/qualopec_textures.bin",
], ],
"sequence": [ "sequence": [
{"type": "loading_screen", "picture_path": "data/images/peru.webp", "display_time": 5}, {"type": "loading_screen", "path": "data/images/peru.webp"},
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "exit_to_cine", "level_id": 16}, {"type": "exit_to_cine", "level_id": 16},
@ -132,17 +132,17 @@
// Level 5: St. Francis' Folly // Level 5: St. Francis' Folly
{ {
"file": "data/level4.phd", "path": "data/level4.phd",
"type": "normal", "type": "normal",
"music": 59, "music_track": 59,
"injections": [ "injections": [
"data/injections/folly_fd.bin", "data/injections/folly_fd.bin",
"data/injections/folly_itemrots.bin", "data/injections/folly_itemrots.bin",
"data/injections/folly_textures.bin", "data/injections/folly_textures.bin",
], ],
"sequence": [ "sequence": [
{"type": "play_fmv", "fmv_num": 5}, {"type": "play_fmv", "fmv_id": 5},
{"type": "loading_screen", "picture_path": "data/images/greece.webp", "display_time": 5}, {"type": "loading_screen", "path": "data/images/greece.webp"},
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_stats", "level_id": 5}, {"type": "level_stats", "level_id": 5},
@ -152,9 +152,9 @@
// Level 6: Colosseum // Level 6: Colosseum
{ {
"file": "data/level5.phd", "path": "data/level5.phd",
"type": "normal", "type": "normal",
"music": 59, "music_track": 59,
"injections": [ "injections": [
"data/injections/colosseum_door.bin", "data/injections/colosseum_door.bin",
"data/injections/colosseum_fd.bin", "data/injections/colosseum_fd.bin",
@ -163,7 +163,7 @@
"data/injections/colosseum_textures.bin", "data/injections/colosseum_textures.bin",
], ],
"sequence": [ "sequence": [
{"type": "loading_screen", "picture_path": "data/images/greece.webp", "display_time": 5}, {"type": "loading_screen", "path": "data/images/greece.webp"},
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_stats", "level_id": 6}, {"type": "level_stats", "level_id": 6},
@ -173,15 +173,15 @@
// Level 7: Palace Midas // Level 7: Palace Midas
{ {
"file": "data/level6.phd", "path": "data/level6.phd",
"type": "normal", "type": "normal",
"music": 59, "music_track": 59,
"injections": [ "injections": [
"data/injections/midas_itemrots.bin", "data/injections/midas_itemrots.bin",
"data/injections/midas_textures.bin", "data/injections/midas_textures.bin",
], ],
"sequence": [ "sequence": [
{"type": "loading_screen", "picture_path": "data/images/greece.webp", "display_time": 5}, {"type": "loading_screen", "path": "data/images/greece.webp"},
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_stats", "level_id": 7}, {"type": "level_stats", "level_id": 7},
@ -192,9 +192,9 @@
// Level 8: The Cistern // Level 8: The Cistern
{ {
"file": "data/level7a.phd", "path": "data/level7a.phd",
"type": "normal", "type": "normal",
"music": 58, "music_track": 58,
"injections": [ "injections": [
"data/injections/cistern_fd.bin", "data/injections/cistern_fd.bin",
"data/injections/cistern_itemrots.bin", "data/injections/cistern_itemrots.bin",
@ -202,7 +202,7 @@
"data/injections/cistern_textures.bin", "data/injections/cistern_textures.bin",
], ],
"sequence": [ "sequence": [
{"type": "loading_screen", "picture_path": "data/images/greece.webp", "display_time": 5}, {"type": "loading_screen", "path": "data/images/greece.webp"},
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_stats", "level_id": 8}, {"type": "level_stats", "level_id": 8},
@ -212,9 +212,9 @@
// Level 9: Tomb of Tihocan // Level 9: Tomb of Tihocan
{ {
"file": "data/level7b.phd", "path": "data/level7b.phd",
"type": "normal", "type": "normal",
"music": 58, "music_track": 58,
"injections": [ "injections": [
"data/injections/cistern_plants.bin", "data/injections/cistern_plants.bin",
"data/injections/tihocan_fd.bin", "data/injections/tihocan_fd.bin",
@ -225,7 +225,7 @@
{"enemy_num": 82, "object_ids": [86, 144, 129]}, {"enemy_num": 82, "object_ids": [86, 144, 129]},
], ],
"sequence": [ "sequence": [
{"type": "loading_screen", "picture_path": "data/images/greece.webp", "display_time": 5}, {"type": "loading_screen", "path": "data/images/greece.webp"},
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "exit_to_cine", "level_id": 17}, {"type": "exit_to_cine", "level_id": 17},
@ -234,17 +234,17 @@
// Level 10: City of Khamoon // Level 10: City of Khamoon
{ {
"file": "data/level8a.phd", "path": "data/level8a.phd",
"type": "normal", "type": "normal",
"music": 59, "music_track": 59,
"injections": [ "injections": [
"data/injections/khamoon_fd.bin", "data/injections/khamoon_fd.bin",
"data/injections/khamoon_mummy.bin", "data/injections/khamoon_mummy.bin",
"data/injections/khamoon_textures.bin", "data/injections/khamoon_textures.bin",
], ],
"sequence": [ "sequence": [
{"type": "play_fmv", "fmv_num": 6}, {"type": "play_fmv", "fmv_id": 6},
{"type": "loading_screen", "picture_path": "data/images/egypt.webp", "display_time": 5}, {"type": "loading_screen", "path": "data/images/egypt.webp"},
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_stats", "level_id": 10}, {"type": "level_stats", "level_id": 10},
@ -254,9 +254,9 @@
// Level 11: Obelisk of Khamoon // Level 11: Obelisk of Khamoon
{ {
"file": "data/level8b.phd", "path": "data/level8b.phd",
"type": "normal", "type": "normal",
"music": 59, "music_track": 59,
"injections": [ "injections": [
"data/injections/obelisk_fd.bin", "data/injections/obelisk_fd.bin",
"data/injections/obelisk_itemrots.bin", "data/injections/obelisk_itemrots.bin",
@ -265,7 +265,7 @@
"data/injections/obelisk_textures.bin", "data/injections/obelisk_textures.bin",
], ],
"sequence": [ "sequence": [
{"type": "loading_screen", "picture_path": "data/images/egypt.webp", "display_time": 5}, {"type": "loading_screen", "path": "data/images/egypt.webp"},
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_stats", "level_id": 11}, {"type": "level_stats", "level_id": 11},
@ -275,16 +275,16 @@
// Level 12: Sanctuary of the Scion // Level 12: Sanctuary of the Scion
{ {
"file": "data/level8c.phd", "path": "data/level8c.phd",
"type": "normal", "type": "normal",
"music": 59, "music_track": 59,
"injections": [ "injections": [
"data/injections/sanctuary_fd.bin", "data/injections/sanctuary_fd.bin",
"data/injections/sanctuary_itemrots.bin", "data/injections/sanctuary_itemrots.bin",
"data/injections/sanctuary_textures.bin", "data/injections/sanctuary_textures.bin",
], ],
"sequence": [ "sequence": [
{"type": "loading_screen", "picture_path": "data/images/egypt.webp", "display_time": 5}, {"type": "loading_screen", "path": "data/images/egypt.webp"},
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_stats", "level_id": 12}, {"type": "level_stats", "level_id": 12},
@ -294,9 +294,9 @@
// Level 13: Natla's Mines // Level 13: Natla's Mines
{ {
"file": "data/level10a.phd", "path": "data/level10a.phd",
"type": "normal", "type": "normal",
"music": 58, "music_track": 58,
"injections": [ "injections": [
"data/injections/cowboy_textures.bin", "data/injections/cowboy_textures.bin",
"data/injections/kold_textures.bin", "data/injections/kold_textures.bin",
@ -314,8 +314,8 @@
{"enemy_num": 75, "object_ids": [85]}, {"enemy_num": 75, "object_ids": [85]},
], ],
"sequence": [ "sequence": [
{"type": "play_fmv", "fmv_num": 7}, {"type": "play_fmv", "fmv_id": 7},
{"type": "loading_screen", "picture_path": "data/images/atlantis.webp", "display_time": 5}, {"type": "loading_screen", "path": "data/images/atlantis.webp"},
{"type": "remove_weapons"}, {"type": "remove_weapons"},
{"type": "remove_scions"}, {"type": "remove_scions"},
{"type": "load_level"}, {"type": "load_level"},
@ -327,21 +327,21 @@
// Level 14: Atlantis // Level 14: Atlantis
{ {
"file": "data/level10b.phd", "path": "data/level10b.phd",
"type": "normal", "type": "normal",
"music": 60, "music_track": 60,
"injections": [ "injections": [
"data/injections/atlantis_fd.bin", "data/injections/atlantis_fd.bin",
"data/injections/atlantis_textures.bin", "data/injections/atlantis_textures.bin",
], ],
"sequence": [ "sequence": [
{"type": "play_fmv", "fmv_num": 8}, {"type": "play_fmv", "fmv_id": 8},
{"type": "loading_screen", "picture_path": "data/images/atlantis.webp", "display_time": 5}, {"type": "loading_screen", "path": "data/images/atlantis.webp"},
{"type": "load_level"}, {"type": "load_level"},
{"type": "give_item", "object_id": 84, "quantity": 1}, {"type": "give_item", "object_id": 84, "quantity": 1},
{"type": "setup_bacon_lara", "anchor_room": 10}, {"type": "setup_bacon_lara", "anchor_room": 10},
{"type": "play_level"}, {"type": "play_level"},
{"type": "play_fmv", "fmv_num": 9}, {"type": "play_fmv", "fmv_id": 9},
{"type": "exit_to_cine", "level_id": 19}, {"type": "exit_to_cine", "level_id": 19},
], ],
"unobtainable_pickups": 3, "unobtainable_pickups": 3,
@ -349,35 +349,35 @@
// Level 15: The Great Pyramid // Level 15: The Great Pyramid
{ {
"file": "data/level10c.phd", "path": "data/level10c.phd",
"type": "normal", "type": "normal",
"music": 60, "music_track": 60,
"injections": [ "injections": [
"data/injections/pyramid_fd.bin", "data/injections/pyramid_fd.bin",
"data/injections/pyramid_textures.bin", "data/injections/pyramid_textures.bin",
"data/injections/scion_collision.bin", "data/injections/scion_collision.bin",
], ],
"sequence": [ "sequence": [
{"type": "loading_screen", "picture_path": "data/images/atlantis.webp", "display_time": 5}, {"type": "loading_screen", "path": "data/images/atlantis.webp"},
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_stats", "level_id": 15}, {"type": "level_stats", "level_id": 15},
{"type": "play_fmv", "fmv_num": 10}, {"type": "play_fmv", "fmv_id": 10},
{"type": "play_synced_audio", "audio_id": 19}, {"type": "play_synced_audio", "audio_id": 19},
{"type": "display_picture", "picture_path": "data/images/end.webp", "display_time": 7.5}, {"type": "display_picture", "path": "data/images/end.webp", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_1.webp", "display_time": 7.5}, {"type": "display_picture", "path": "data/images/credits_1.webp", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_2.webp", "display_time": 7.5}, {"type": "display_picture", "path": "data/images/credits_2.webp", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_3.webp", "display_time": 7.5}, {"type": "display_picture", "path": "data/images/credits_3.webp", "display_time": 7.5},
{"type": "total_stats", "picture_path": "data/images/install.webp"}, {"type": "total_stats", "background_path": "data/images/install.webp"},
{"type": "exit_to_title"}, {"type": "exit_to_title"},
], ],
}, },
// Level 16: Cut Scene 1 // Level 16: Cut Scene 1
{ {
"file": "data/cut1.phd", "path": "data/cut1.phd",
"type": "cutscene", "type": "cutscene",
"music": 0, "music_track": 0,
"lara_type": 77, "lara_type": 77,
"inherit_injections": false, "inherit_injections": false,
"injections": [ "injections": [
@ -398,9 +398,9 @@
// Level 17: Cut Scene 2 // Level 17: Cut Scene 2
{ {
"file": "data/cut2.phd", "path": "data/cut2.phd",
"type": "cutscene", "type": "cutscene",
"music": 0, "music_track": 0,
"lara_type": 77, "lara_type": 77,
"inherit_injections": false, "inherit_injections": false,
"injections": [ "injections": [
@ -423,9 +423,9 @@
// Level 18: Cut Scene 3 // Level 18: Cut Scene 3
{ {
"file": "data/cut3.phd", "path": "data/cut3.phd",
"type": "cutscene", "type": "cutscene",
"music": 0, "music_track": 0,
"inherit_injections": false, "inherit_injections": false,
"injections": [ "injections": [
"data/injections/cut3_textures.bin", "data/injections/cut3_textures.bin",
@ -444,9 +444,9 @@
// Level 19: Cut Scene 4 // Level 19: Cut Scene 4
{ {
"file": "data/cut4.phd", "path": "data/cut4.phd",
"type": "cutscene", "type": "cutscene",
"music": 0, "music_track": 0,
"draw_distance_fade": 12.0, "draw_distance_fade": 12.0,
"draw_distance_max": 18.0, "draw_distance_max": 18.0,
"lara_type": 77, "lara_type": 77,
@ -472,19 +472,19 @@
// Level 20: Title // Level 20: Title
{ {
"file": "data/title.phd", "path": "data/title.phd",
"type": "title", "type": "title",
"music": 2, "music_track": 2,
"inherit_injections": false, "inherit_injections": false,
"injections": [ "injections": [
"data/injections/pda_model.bin", "data/injections/pda_model.bin",
"data/injections/font.bin", "data/injections/font.bin",
], ],
"sequence": [ "sequence": [
{"type": "display_picture", "picture_path": "data/images/eidos.webp", "display_time": 1}, {"type": "display_picture", "path": "data/images/eidos.webp", "display_time": 1},
{"type": "play_fmv", "fmv_num": 0}, {"type": "play_fmv", "fmv_id": 0},
{"type": "play_fmv", "fmv_num": 1}, {"type": "play_fmv", "fmv_id": 1},
{"type": "play_fmv", "fmv_num": 2}, {"type": "play_fmv", "fmv_id": 2},
{"type": "exit_to_title"}, {"type": "exit_to_title"},
], ],
}, },
@ -496,9 +496,9 @@
// expect the level count to match, otherwise the game will crash. // expect the level count to match, otherwise the game will crash.
// Hence this dummy level. // Hence this dummy level.
{ {
"file": "data/current.phd", "path": "data/current.phd",
"type": "current", "type": "current",
"music": 0, "music_track": 0,
"inherit_injections": false, "inherit_injections": false,
"sequence": [ "sequence": [
{"type": "exit_to_title"}, {"type": "exit_to_title"},

View file

@ -28,15 +28,15 @@
"levels": [ "levels": [
// Level 2: City of Vilcabamba // Level 2: City of Vilcabamba
{ {
"file": "data_demo_pc/level2.phd", "path": "data_demo_pc/level2.phd",
"type": "level_demo_pc", "type": "level_demo_pc",
"music": 0, "music_track": 0,
"injections": [ "injections": [
"data/injections/vilcabamba_itemrots.bin", "data/injections/vilcabamba_itemrots.bin",
"data/injections/vilcabamba_textures.bin", "data/injections/vilcabamba_textures.bin",
], ],
"sequence": [ "sequence": [
{"type": "loading_screen", "picture_path": "data/images/peru.webp", "display_time": 5}, {"type": "loading_screen", "picture_path": "data/images/peru.webp"},
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_stats", "level_id": 0}, {"type": "level_stats", "level_id": 0},
@ -47,9 +47,9 @@
// Level 3: Title // Level 3: Title
{ {
"file": "data_demo_pc/title.phd", "path": "data_demo_pc/title.phd",
"type": "title_demo_pc", "type": "title_demo_pc",
"music": 0, "music_track": 0,
"inherit_injections": false, "inherit_injections": false,
"injections": [ "injections": [
"data/injections/pda_model.bin", "data/injections/pda_model.bin",
@ -61,9 +61,9 @@
// Level 4: Current Position // Level 4: Current Position
{ {
"file": "data/current.phd", "path": "data/current.phd",
"type": "current", "type": "current",
"music": 0, "music_track": 0,
"inherit_injections": false, "inherit_injections": false,
"sequence": [ "sequence": [
{"type": "exit_to_title"}, {"type": "exit_to_title"},

View file

@ -31,9 +31,9 @@
"levels": [ "levels": [
// Level 0: Return to Egypt // Level 0: Return to Egypt
{ {
"file": "data/egypt.phd", "path": "data/egypt.phd",
"type": "normal", "type": "normal",
"music": 59, "music_track": 59,
"injections": [ "injections": [
"data/injections/egypt_cameras.bin", "data/injections/egypt_cameras.bin",
"data/injections/egypt_fd.bin", "data/injections/egypt_fd.bin",
@ -52,9 +52,9 @@
// Level 1: Temple of the Cat // Level 1: Temple of the Cat
{ {
"file": "data/cat.phd", "path": "data/cat.phd",
"type": "normal", "type": "normal",
"music": 59, "music_track": 59,
"injections": [ "injections": [
"data/injections/cat_cameras.bin", "data/injections/cat_cameras.bin",
"data/injections/cat_fd.bin", "data/injections/cat_fd.bin",
@ -74,9 +74,9 @@
// Level 2: Atlantean Stronghold // Level 2: Atlantean Stronghold
{ {
"file": "data/end.phd", "path": "data/end.phd",
"type": "normal", "type": "normal",
"music": 60, "music_track": 60,
"injections": [ "injections": [
"data/injections/stronghold_fd.bin", "data/injections/stronghold_fd.bin",
"data/injections/stronghold_itemrots.bin", "data/injections/stronghold_itemrots.bin",
@ -93,9 +93,9 @@
// Level 3: The Hive // Level 3: The Hive
{ {
"file": "data/end2.phd", "path": "data/end2.phd",
"type": "normal", "type": "normal",
"music": 60, "music_track": 60,
"injections": [ "injections": [
"data/injections/hive_fd.bin", "data/injections/hive_fd.bin",
"data/injections/hive_itemrots.bin", "data/injections/hive_itemrots.bin",
@ -106,29 +106,29 @@
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_stats", "level_id": 3}, {"type": "level_stats", "level_id": 3},
{"type": "play_synced_audio", "audio_id": 19}, {"type": "play_synced_audio", "audio_id": 19},
{"type": "display_picture", "picture_path": "data/images/end.webp", "display_time": 7.5}, {"type": "display_picture", "path": "data/images/end.webp", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_ub.webp", "display_time": 7.5}, {"type": "display_picture", "path": "data/images/credits_ub.webp", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_1.webp", "display_time": 7.5}, {"type": "display_picture", "path": "data/images/credits_1.webp", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_2.webp", "display_time": 7.5}, {"type": "display_picture", "path": "data/images/credits_2.webp", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/images/credits_3.webp", "display_time": 7.5}, {"type": "display_picture", "path": "data/images/credits_3.webp", "display_time": 7.5},
{"type": "total_stats", "picture_path": "data/images/install.webp"}, {"type": "total_stats", "background_path": "data/images/install.webp"},
{"type": "exit_to_title"}, {"type": "exit_to_title"},
], ],
}, },
// Level 4: Title // Level 4: Title
{ {
"file": "data/title.phd", "path": "data/title.phd",
"type": "title", "type": "title",
"music": 2, "music_track": 2,
"inherit_injections": false, "inherit_injections": false,
"injections": [ "injections": [
"data/injections/pda_model.bin", "data/injections/pda_model.bin",
], ],
"sequence": [ "sequence": [
{"type": "display_picture", "picture_path": "data/images/eidos.webp", "display_time": 1}, {"type": "display_picture", "path": "data/images/eidos.webp", "display_time": 1},
{"type": "play_fmv", "fmv_num": 0}, {"type": "play_fmv", "fmv_id": 0},
{"type": "play_fmv", "fmv_num": 1}, {"type": "play_fmv", "fmv_id": 1},
{"type": "exit_to_title"}, {"type": "exit_to_title"},
], ],
}, },
@ -136,9 +136,9 @@
// Level 5: Current Position // Level 5: Current Position
{ {
"title": "Current Position", "title": "Current Position",
"file": "data/current.phd", "path": "data/current.phd",
"type": "current", "type": "current",
"music": 0, "music_track": 0,
"inherit_injections": false, "inherit_injections": false,
"sequence": [{"type": "exit_to_title"}], "sequence": [{"type": "exit_to_title"}],
}, },

View file

@ -27,8 +27,8 @@
"music_track": 64, "music_track": 64,
"sequence": [ "sequence": [
{"type": "display_picture", "path": "data/legal.pcx"}, {"type": "display_picture", "path": "data/legal.pcx"},
{"type": "play_fmv", "fmv_num": 0}, {"type": "play_fmv", "fmv_id": 0},
{"type": "play_fmv", "fmv_num": 1}, {"type": "play_fmv", "fmv_id": 1},
], ],
}, },
@ -48,12 +48,12 @@
"path": "data/wall.tr2", "path": "data/wall.tr2",
"music_track": 33, "music_track": 33,
"sequence": [ "sequence": [
{"type": "play_fmv", "fmv_num": 2}, {"type": "play_fmv", "fmv_id": 2},
{"type": "add_secret_reward", "item": "grenade_launcher"}, {"type": "add_secret_reward", "item": "grenade_launcher"},
{"type": "add_secret_reward", "item": "grenade_launcher_ammo", "qty": 2}, {"type": "add_secret_reward", "item": "grenade_launcher_ammo", "qty": 2},
{"type": "add_secret_reward", "item": "small_medipack"}, {"type": "add_secret_reward", "item": "small_medipack"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "play_cutscene", "cutscene_num": 0}, {"type": "play_cutscene", "cutscene_id": 0},
{"type": "level_complete"}, {"type": "level_complete"},
], ],
"injections": [ "injections": [
@ -92,7 +92,7 @@
{"type": "add_secret_reward", "item": "uzis"}, {"type": "add_secret_reward", "item": "uzis"},
{"type": "add_secret_reward", "item": "uzis_ammo", "qty": 4}, {"type": "add_secret_reward", "item": "uzis_ammo", "qty": 4},
{"type": "play_level"}, {"type": "play_level"},
{"type": "play_cutscene", "cutscene_num": 1}, {"type": "play_cutscene", "cutscene_id": 1},
{"type": "level_complete"}, {"type": "level_complete"},
], ],
"injections": [ "injections": [
@ -106,7 +106,7 @@
"path": "data/rig.tr2", "path": "data/rig.tr2",
"music_track": 58, "music_track": 58,
"sequence": [ "sequence": [
{"type": "play_fmv", "fmv_num": 3}, {"type": "play_fmv", "fmv_id": 3},
{"type": "set_lara_start_anim", "anim": 8}, {"type": "set_lara_start_anim", "anim": 8},
{"type": "remove_weapons"}, {"type": "remove_weapons"},
{"type": "add_secret_reward", "item": "uzis"}, {"type": "add_secret_reward", "item": "uzis"},
@ -126,7 +126,7 @@
"sequence": [ "sequence": [
{"type": "add_secret_reward", "item": "uzis_ammo", "qty": 4}, {"type": "add_secret_reward", "item": "uzis_ammo", "qty": 4},
{"type": "play_level"}, {"type": "play_level"},
{"type": "play_cutscene", "cutscene_num": 2}, {"type": "play_cutscene", "cutscene_id": 2},
{"type": "level_complete"}, {"type": "level_complete"},
], ],
"injections": [ "injections": [
@ -139,7 +139,7 @@
"path": "data/unwater.tr2", "path": "data/unwater.tr2",
"music_track": 34, "music_track": 34,
"sequence": [ "sequence": [
{"type": "play_fmv", "fmv_num": 4}, {"type": "play_fmv", "fmv_id": 4},
{"type": "add_secret_reward", "item": "harpoon_gun_ammo", "qty": 4}, {"type": "add_secret_reward", "item": "harpoon_gun_ammo", "qty": 4},
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_complete"}, {"type": "level_complete"},
@ -192,7 +192,7 @@
"path": "data/skidoo.tr2", "path": "data/skidoo.tr2",
"music_track": 33, "music_track": 33,
"sequence": [ "sequence": [
{"type": "play_fmv", "fmv_num": 5}, {"type": "play_fmv", "fmv_id": 5},
{"type": "give_item", "item": "puzzle_4"}, {"type": "give_item", "item": "puzzle_4"},
{"type": "add_secret_reward", "item": "uzis_ammo", "qty": 4}, {"type": "add_secret_reward", "item": "uzis_ammo", "qty": 4},
{"type": "play_level"}, {"type": "play_level"},
@ -255,10 +255,10 @@
"path": "data/emprtomb.tr2", "path": "data/emprtomb.tr2",
"music_track": 59, "music_track": 59,
"sequence": [ "sequence": [
{"type": "play_fmv", "fmv_num": 6}, {"type": "play_fmv", "fmv_id": 6},
{"type": "add_secret_reward", "item": "uzis_ammo", "qty": 8}, {"type": "add_secret_reward", "item": "uzis_ammo", "qty": 8},
{"type": "play_level"}, {"type": "play_level"},
{"type": "play_cutscene", "cutscene_num": 3}, {"type": "play_cutscene", "cutscene_id": 3},
{"type": "level_complete"}, {"type": "level_complete"},
], ],
"injections": [ "injections": [
@ -291,7 +291,7 @@
{"type": "set_secret_count", "count": 0}, {"type": "set_secret_count", "count": 0},
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_complete"}, {"type": "level_complete"},
{"type": "play_fmv", "fmv_num": 7}, {"type": "play_fmv", "fmv_id": 7},
], ],
}, },

View file

@ -38,7 +38,7 @@ various pieces of global behaviour.
}, },
"levels": [ "levels": [
{ {
"file": "data/gym.phd", "path": "data/gym.phd",
// etc // etc
}, },
], ],
@ -221,9 +221,9 @@ Following are each of the properties available within a level.
```json5 ```json5
{ {
"file": "data/example.phd", "path": "data/example.phd",
"type": "normal", "type": "normal",
"music": 57, "music_track": 57,
"lara_type": 0, "lara_type": 0,
"water_color": [0.7, 0.5, 0.85], "water_color": [0.7, 0.5, 0.85],
"draw_distance_fade": 34.0, "draw_distance_fade": 34.0,
@ -242,7 +242,7 @@ Following are each of the properties available within a level.
// etc // etc
], ],
"sequence": [ "sequence": [
{"type": "play_fmv", "fmv_num": 0}, {"type": "play_fmv", "fmv_id": 0},
{"type": "load_level"}, {"type": "load_level"},
// etc // etc
], ],
@ -345,7 +345,7 @@ Following are each of the properties available within a level.
</tr> </tr>
<tr valign="top"> <tr valign="top">
<td> <td>
<code>music</code> <code>music_track</code>
</td> </td>
<td>Integer</td> <td>Integer</td>
<td>Yes</td> <td>Yes</td>
@ -489,11 +489,11 @@ default gameflow for examples.
<code>display_picture</code> <code>display_picture</code>
</td> </td>
<td> <td>
<code>picture_path</code> <code>path</code>
</td> </td>
<td>String</td> <td>String</td>
<td rowspan="2"> <td rowspan="2">
Displays the specified picture for the given number of seconds. Displays the specified picture for the given number of seconds (default: 5).
</td> </td>
</tr> </tr>
<tr valign="top"> <tr valign="top">
@ -507,11 +507,11 @@ default gameflow for examples.
<code>loading_screen</code> <code>loading_screen</code>
</td> </td>
<td> <td>
<code>picture_path</code> <code>path</code>
</td> </td>
<td>String</td> <td>String</td>
<td rowspan="2"> <td rowspan="2">
Displays the specified picture for the given number of seconds. Functions identically to display_picture except these pictures can be enabled/disabled by the user with the loading screen option in the config tool. 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> </td>
</tr> </tr>
<tr valign="top"> <tr valign="top">
@ -618,11 +618,11 @@ default gameflow for examples.
<code>play_fmv</code> <code>play_fmv</code>
</td> </td>
<td> <td>
<code>fmv_num</code> <code>fmv_id</code>
</td> </td>
<td>String</td> <td>String</td>
<td> <td>
Plays the specified FMV. <code>fmv_num</code> must be a valid index into Plays the specified FMV. <code>fmv_id</code> must be a valid index into
the <code>fmvs</code> root key. the <code>fmvs</code> root key.
</td> </td>
</tr> </tr>
@ -746,7 +746,7 @@ default gameflow for examples.
<code>total_stats</code> <code>total_stats</code>
</td> </td>
<td> <td>
<code>picture_path</code> <code>path</code>
</td> </td>
<td>String</td> <td>String</td>
<td> <td>
@ -779,9 +779,9 @@ game will exit to title.
}, },
{ {
"file": "data/level1.phd", "path": "data/level1.phd",
"type": "normal", "type": "normal",
"music": 57, "music_track": 57,
"sequence": [ "sequence": [
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
@ -791,9 +791,9 @@ game will exit to title.
}, },
{ {
"file": "data/level2.phd", "path": "data/level2.phd",
"type": "normal", "type": "normal",
"music": 57, "music_track": 57,
"sequence": [ "sequence": [
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
@ -803,27 +803,27 @@ game will exit to title.
}, },
{ {
"file": "data/level3.phd", "path": "data/level3.phd",
"type": "normal", "type": "normal",
"music": 57, "music_track": 57,
"sequence": [ "sequence": [
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_stats", "level_id": 3}, {"type": "level_stats", "level_id": 3},
{"type": "play_synced_audio", "audio_id": 19}, {"type": "play_synced_audio", "audio_id": 19},
{"type": "display_picture", "picture_path": "data/end.pcx", "display_time": 7.5}, {"type": "display_picture", "path": "data/end.pcx", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/cred1.pcx", "display_time": 7.5}, {"type": "display_picture", "path": "data/cred1.pcx", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/cred2.pcx", "display_time": 7.5}, {"type": "display_picture", "path": "data/cred2.pcx", "display_time": 7.5},
{"type": "display_picture", "picture_path": "data/cred3.pcx", "display_time": 7.5}, {"type": "display_picture", "path": "data/cred3.pcx", "display_time": 7.5},
{"type": "total_stats", "picture_path": "data/install.pcx"}, {"type": "total_stats", "background_path": "data/install.pcx"},
{"type": "exit_to_level", "level_id": 4}, {"type": "exit_to_level", "level_id": 4},
], ],
}, },
{ {
"file": "data/bonus1.phd", "path": "data/bonus1.phd",
"type": "bonus", "type": "bonus",
"music": 57, "music_track": 57,
"sequence": [ "sequence": [
{"type": "play_fmv", "fmv_path": "fmv/snow.avi"}, {"type": "play_fmv", "fmv_path": "fmv/snow.avi"},
{"type": "load_level"}, {"type": "load_level"},
@ -833,23 +833,23 @@ game will exit to title.
}, },
{ {
"file": "data/bonus2.phd", "path": "data/bonus2.phd",
"type": "bonus", "type": "bonus",
"music": 57, "music_track": 57,
"sequence": [ "sequence": [
{"type": "load_level"}, {"type": "load_level"},
{"type": "play_level"}, {"type": "play_level"},
{"type": "level_stats", "level_id": 5}, {"type": "level_stats", "level_id": 5},
{"type": "play_synced_audio", "audio_id": 14}, {"type": "play_synced_audio", "audio_id": 14},
{"type": "total_stats", "picture_path": "data/install.pcx"}, {"type": "total_stats", "background_path": "data/install.pcx"},
{"type": "exit_to_title"}, {"type": "exit_to_title"},
], ],
}, },
{ {
"file": "data/bonuscut1.phd", "path": "data/bonuscut1.phd",
"type": "cutscene", "type": "cutscene",
"music": 0, "music_track": 0,
"sequence": [ "sequence": [
{"type": "load_level"}, {"type": "load_level"},
{"type": "set_cam_x", "value": 36668}, {"type": "set_cam_x", "value": 36668},
@ -887,9 +887,9 @@ the engine's overall item limit).
```json5 ```json5
{ {
"file": "data/example.phd", "path": "data/example.phd",
"type": "normal", "type": "normal",
"music": 57, "music_track": 57,
"item_drops": [ "item_drops": [
{"enemy_num": 17, "object_ids": [86]}, {"enemy_num": 17, "object_ids": [86]},
{"enemy_num": 50, "object_ids": [87]}, {"enemy_num": 50, "object_ids": [87]},

View file

@ -82,7 +82,7 @@ static M_SEQUENCE_EVENT_HANDLER m_SequenceEventHandlers[] = {
// Events with integer arguments // Events with integer arguments
{ GFS_LOAD_LEVEL, M_HandleIntEvent, "level_id" }, { GFS_LOAD_LEVEL, M_HandleIntEvent, "level_id" },
{ GFS_PLAY_LEVEL, M_HandleIntEvent, "level_id" }, { GFS_PLAY_LEVEL, M_HandleIntEvent, "level_id" },
{ GFS_PLAY_FMV, M_HandleIntEvent, "fmv_num" }, { GFS_PLAY_FMV, M_HandleIntEvent, "fmv_id" },
{ GFS_LEVEL_STATS, M_HandleIntEvent, "level_id" }, { GFS_LEVEL_STATS, M_HandleIntEvent, "level_id" },
{ GFS_EXIT_TO_LEVEL, M_HandleIntEvent, "level_id" }, { GFS_EXIT_TO_LEVEL, M_HandleIntEvent, "level_id" },
{ GFS_EXIT_TO_CINE, M_HandleIntEvent, "level_id" }, { GFS_EXIT_TO_CINE, M_HandleIntEvent, "level_id" },
@ -149,22 +149,17 @@ static int32_t M_HandlePictureEvent(
JSON_OBJECT *event_obj, GAME_FLOW_SEQUENCE_EVENT *event, void *extra_data, JSON_OBJECT *event_obj, GAME_FLOW_SEQUENCE_EVENT *event, void *extra_data,
void *user_arg) void *user_arg)
{ {
const char *const path = const char *const path = JSON_ObjectGetString(event_obj, "path", NULL);
JSON_ObjectGetString(event_obj, "picture_path", NULL);
if (path == NULL) { if (path == NULL) {
LOG_ERROR("Missing picture path"); LOG_ERROR("Missing picture path");
return -1; return -1;
} }
const float display_time =
JSON_ObjectGetDouble(event_obj, "display_time", -1.0);
if (display_time < 0.0) {
Shell_ExitSystemFmt("'display_time' must be a positive number");
}
if (event != NULL) { if (event != NULL) {
GAME_FLOW_DISPLAY_PICTURE_DATA *const event_data = extra_data; GAME_FLOW_DISPLAY_PICTURE_DATA *const event_data = extra_data;
event_data->path = event_data->path =
(char *)extra_data + sizeof(GAME_FLOW_DISPLAY_PICTURE_DATA); (char *)extra_data + sizeof(GAME_FLOW_DISPLAY_PICTURE_DATA);
event_data->display_time = display_time; event_data->display_time =
JSON_ObjectGetDouble(event_obj, "display_time", 5.0);
strcpy(event_data->path, path); strcpy(event_data->path, path);
event->data = event_data; event->data = event_data;
} }
@ -176,7 +171,7 @@ static int32_t M_HandleTotalStatsEvent(
void *user_arg) void *user_arg)
{ {
const char *const path = const char *const path =
JSON_ObjectGetString(event_obj, "picture_path", NULL); JSON_ObjectGetString(event_obj, "background_path", NULL);
if (path == NULL) { if (path == NULL) {
LOG_ERROR("Missing picture path"); LOG_ERROR("Missing picture path");
return -1; return -1;
@ -396,14 +391,14 @@ static void M_LoadLevels(JSON_OBJECT *const obj, GAME_FLOW *const gf)
int32_t tmp_i; int32_t tmp_i;
JSON_ARRAY *tmp_arr; JSON_ARRAY *tmp_arr;
tmp_i = JSON_ObjectGetInt(jlvl_obj, "music", JSON_INVALID_NUMBER); tmp_i = JSON_ObjectGetInt(jlvl_obj, "music_track", JSON_INVALID_NUMBER);
if (tmp_i == JSON_INVALID_NUMBER) { if (tmp_i == JSON_INVALID_NUMBER) {
Shell_ExitSystemFmt( Shell_ExitSystemFmt(
"level %d: 'music' must be a number", level_num); "level %d: 'music_track' must be a number", level_num);
} }
level->music_track = tmp_i; level->music_track = tmp_i;
tmp_s = JSON_ObjectGetString(jlvl_obj, "file", JSON_INVALID_STRING); tmp_s = JSON_ObjectGetString(jlvl_obj, "path", JSON_INVALID_STRING);
if (tmp_s == JSON_INVALID_STRING) { if (tmp_s == JSON_INVALID_STRING) {
Shell_ExitSystemFmt("level %d: 'file' must be a string", level_num); Shell_ExitSystemFmt("level %d: 'file' must be a string", level_num);
} }

View file

@ -102,12 +102,12 @@ GF_InterpretSequence(int32_t level_num, GAME_FLOW_LEVEL_TYPE level_type)
break; break;
case GFS_PLAY_FMV: { case GFS_PLAY_FMV: {
const int16_t fmv_num = (int16_t)(intptr_t)event->data; const int16_t fmv_id = (int16_t)(intptr_t)event->data;
if (level_type != GFL_SAVED) { if (level_type != GFL_SAVED) {
if (fmv_num < 0 || fmv_num >= g_GameFlow.fmv_count) { if (fmv_id < 0 || fmv_id >= g_GameFlow.fmv_count) {
LOG_ERROR("Invalid FMV number: %d", fmv_num); LOG_ERROR("Invalid FMV number: %d", fmv_id);
} else { } else {
FMV_Play(g_GameFlow.fmvs[fmv_num].path); FMV_Play(g_GameFlow.fmvs[fmv_id].path);
} }
} }
break; break;
@ -320,11 +320,11 @@ GF_StorySoFar(const GAME_FLOW_SEQUENCE *const sequence, int32_t savegame_level)
} }
case GFS_PLAY_FMV: { case GFS_PLAY_FMV: {
const int16_t fmv_num = (int16_t)(intptr_t)event->data; const int16_t fmv_id = (int16_t)(intptr_t)event->data;
if (fmv_num < 0 || fmv_num >= g_GameFlow.fmv_count) { if (fmv_id < 0 || fmv_id >= g_GameFlow.fmv_count) {
LOG_ERROR("Invalid FMV number: %d", fmv_num); LOG_ERROR("Invalid FMV number: %d", fmv_id);
} else { } else {
FMV_Play(g_GameFlow.fmvs[fmv_num].path); FMV_Play(g_GameFlow.fmvs[fmv_id].path);
} }
break; break;
} }

View file

@ -80,9 +80,9 @@ static M_SEQUENCE_EVENT_HANDLER m_SequenceEventHandlers[] = {
{ GFS_SET_NUM_SECRETS, M_HandleIntEvent, "count" }, { GFS_SET_NUM_SECRETS, M_HandleIntEvent, "count" },
{ GFS_SET_CAMERA_ANGLE, M_HandleIntEvent, "angle" }, { GFS_SET_CAMERA_ANGLE, M_HandleIntEvent, "angle" },
{ GFS_SET_START_ANIM, M_HandleIntEvent, "anim" }, { GFS_SET_START_ANIM, M_HandleIntEvent, "anim" },
{ GFS_PLAY_LEVEL, M_HandleIntEvent, "level_num" }, { GFS_PLAY_LEVEL, M_HandleIntEvent, "level_id" },
{ GFS_PLAY_CUTSCENE, M_HandleIntEvent, "cutscene_num" }, { GFS_PLAY_CUTSCENE, M_HandleIntEvent, "cutscene_id" },
{ GFS_PLAY_FMV, M_HandleIntEvent, "fmv_num" }, { GFS_PLAY_FMV, M_HandleIntEvent, "fmv_id" },
{ GFS_DISABLE_FLOOR, M_HandleIntEvent, "height" }, { GFS_DISABLE_FLOOR, M_HandleIntEvent, "height" },
// Special cases with custom handlers // Special cases with custom handlers
@ -142,9 +142,10 @@ static int32_t M_HandlePictureEvent(
} }
if (event != NULL) { if (event != NULL) {
GAME_FLOW_DISPLAY_PICTURE_DATA *const event_data = extra_data; GAME_FLOW_DISPLAY_PICTURE_DATA *const event_data = extra_data;
event_data->duration = JSON_ObjectGetDouble(event_obj, "duration", 6.0);
event_data->path = event_data->path =
(char *)extra_data + sizeof(GAME_FLOW_DISPLAY_PICTURE_DATA); (char *)extra_data + sizeof(GAME_FLOW_DISPLAY_PICTURE_DATA);
event_data->display_time =
JSON_ObjectGetDouble(event_obj, "display_time", 5.0);
strcpy(event_data->path, path); strcpy(event_data->path, path);
event->data = event_data; event->data = event_data;
} }

View file

@ -106,7 +106,7 @@ GAME_FLOW_COMMAND GF_InterpretSequence(
(GAME_FLOW_DISPLAY_PICTURE_DATA *)event->data; (GAME_FLOW_DISPLAY_PICTURE_DATA *)event->data;
PHASE *const phase = Phase_Picture_Create((PHASE_PICTURE_ARGS) { PHASE *const phase = Phase_Picture_Create((PHASE_PICTURE_ARGS) {
.file_name = data->path, .file_name = data->path,
.display_time = data->duration, .display_time = data->display_time,
.fade_in_time = 1.0, .fade_in_time = 1.0,
.fade_out_time = 1.0 / 3.0, .fade_out_time = 1.0 / 3.0,
.display_time_includes_fades = true, .display_time_includes_fades = true,
@ -146,12 +146,12 @@ GAME_FLOW_COMMAND GF_InterpretSequence(
} }
case GFS_PLAY_FMV: { case GFS_PLAY_FMV: {
const int16_t fmv_num = (int16_t)(intptr_t)event->data; const int16_t fmv_id = (int16_t)(intptr_t)event->data;
if (type != GFL_SAVED) { if (type != GFL_SAVED) {
if (fmv_num < 0 || fmv_num >= g_GameFlow.fmv_count) { if (fmv_id < 0 || fmv_id >= g_GameFlow.fmv_count) {
LOG_ERROR("Invalid FMV number: %d", fmv_num); LOG_ERROR("Invalid FMV number: %d", fmv_id);
} else { } else {
FMV_Play(g_GameFlow.fmvs[fmv_num].path); FMV_Play(g_GameFlow.fmvs[fmv_id].path);
} }
} }
break; break;

View file

@ -22,7 +22,7 @@ typedef struct {
typedef struct { typedef struct {
char *path; char *path;
float duration; float display_time;
} GAME_FLOW_DISPLAY_PICTURE_DATA; } GAME_FLOW_DISPLAY_PICTURE_DATA;
typedef enum { typedef enum {

View file

@ -219,23 +219,23 @@ def transform_script(script: list[int]):
pass pass
case GameFlowEvent.PLAY_FMV: case GameFlowEvent.PLAY_FMV:
fmv_num = script.pop(0) fmv_id = script.pop(0)
yield {"type": "play_fmv", "fmv_num": fmv_num} yield {"type": "play_fmv", "fmv_id": fmv_id}
case GameFlowEvent.START_LEVEL: case GameFlowEvent.START_LEVEL:
level_num = script.pop(0) level_id = script.pop(0)
yield {"type": "play_level", "level_num": level_num} yield {"type": "play_level", "level_id": level_id}
case GameFlowEvent.CUTSCENE: case GameFlowEvent.CUTSCENE:
cutscene_num = script.pop(0) cutscene_id = script.pop(0)
yield {"type": "play_level", "cutscene_num": cutscene_num} yield {"type": "play_level", "cutscene_id": cutscene_id}
case GameFlowEvent.LEVEL_COMPLETE: case GameFlowEvent.LEVEL_COMPLETE:
yield {"type": "level_complete"} yield {"type": "level_complete"}
case GameFlowEvent.DEMO_PLAY: case GameFlowEvent.DEMO_PLAY:
demo_num = script.pop(0) demo_num = script.pop(0)
yield {"type": "play_level", "level_num": demo_num} yield {"type": "play_level", "level_id": demo_num}
case GameFlowEvent.JUMP_TO_SEQ: case GameFlowEvent.JUMP_TO_SEQ:
seq_num = script.pop(0) seq_num = script.pop(0)