diff --git a/data/tr2/ship/cfg/TR2X_gameflow.json5 b/data/tr2/ship/cfg/TR2X_gameflow.json5 index d0ae911ee..780e7d8b9 100644 --- a/data/tr2/ship/cfg/TR2X_gameflow.json5 +++ b/data/tr2/ship/cfg/TR2X_gameflow.json5 @@ -7,7 +7,11 @@ {}, // 1. The Great Wall - {}, + { + "injections": [ + "data/injections/wall_itemrots.bin", + ], + }, // 2. Venice {}, @@ -19,14 +23,23 @@ { "injections": [ "data/injections/opera_fd.bin", + "data/injections/opera_itemrots.bin", ], }, // 5. Offshore Rig - {}, + { + "injections": [ + "data/injections/rig_itemrots.bin", + ], + }, // 6. Diving Area - {}, + { + "injections": [ + "data/injections/diving_itemrots.bin", + ], + }, // 7. 40 Fathoms {}, @@ -35,6 +48,7 @@ { "injections": [ "data/injections/wreck_fd.bin", + "data/injections/wreck_itemrots.bin", ], }, @@ -42,12 +56,17 @@ {}, // 10. The Deck - {}, + { + "injections": [ + "data/injections/deck_itemrots.bin", + ], + }, // 11. Tibetan Foothills { "injections": [ "data/injections/tibet_fd.bin", + "data/injections/tibet_itemrots.bin", ], "object_strings": { "O_TIGER": "Snow Leopard", @@ -55,12 +74,17 @@ }, // 12. Barkhang Monastery - {}, + { + "injections": [ + "data/injections/barkhang_itemrots.bin", + ], + }, // 13. Catacombs of the Talion { "injections": [ "data/injections/catacombs_fd.bin", + "data/injections/catacombs_itemrots.bin", ], "object_strings": { "O_TIGER": "Snow Leopard", @@ -71,6 +95,7 @@ { "injections": [ "data/injections/palace_fd.bin", + "data/injections/palace_itemrots.bin", ], "object_strings": { "O_TIGER": "Snow Leopard", @@ -81,6 +106,7 @@ { "injections": [ "data/injections/xian_fd.bin", + "data/injections/xian_itemrots.bin", ], }, @@ -88,6 +114,7 @@ { "injections": [ "data/injections/floating_fd.bin", + "data/injections/floating_itemrots.bin", ], }, @@ -95,7 +122,11 @@ {}, // 18. Home Sweet Home - {}, + { + "injections": [ + "data/injections/house_itemrots.bin", + ], + }, // 19. Demo 1 {}, diff --git a/data/tr2/ship/data/injections/barkhang_itemrots.bin b/data/tr2/ship/data/injections/barkhang_itemrots.bin new file mode 100644 index 000000000..262ef7b52 Binary files /dev/null and b/data/tr2/ship/data/injections/barkhang_itemrots.bin differ diff --git a/data/tr2/ship/data/injections/catacombs_itemrots.bin b/data/tr2/ship/data/injections/catacombs_itemrots.bin new file mode 100644 index 000000000..3921df0c8 Binary files /dev/null and b/data/tr2/ship/data/injections/catacombs_itemrots.bin differ diff --git a/data/tr2/ship/data/injections/deck_itemrots.bin b/data/tr2/ship/data/injections/deck_itemrots.bin new file mode 100644 index 000000000..5780386b8 Binary files /dev/null and b/data/tr2/ship/data/injections/deck_itemrots.bin differ diff --git a/data/tr2/ship/data/injections/diving_itemrots.bin b/data/tr2/ship/data/injections/diving_itemrots.bin new file mode 100644 index 000000000..abf48974f Binary files /dev/null and b/data/tr2/ship/data/injections/diving_itemrots.bin differ diff --git a/data/tr2/ship/data/injections/floating_itemrots.bin b/data/tr2/ship/data/injections/floating_itemrots.bin new file mode 100644 index 000000000..e9bdb3607 Binary files /dev/null and b/data/tr2/ship/data/injections/floating_itemrots.bin differ diff --git a/data/tr2/ship/data/injections/house_itemrots.bin b/data/tr2/ship/data/injections/house_itemrots.bin new file mode 100644 index 000000000..05fc3bfc8 Binary files /dev/null and b/data/tr2/ship/data/injections/house_itemrots.bin differ diff --git a/data/tr2/ship/data/injections/opera_itemrots.bin b/data/tr2/ship/data/injections/opera_itemrots.bin new file mode 100644 index 000000000..73ddb6395 Binary files /dev/null and b/data/tr2/ship/data/injections/opera_itemrots.bin differ diff --git a/data/tr2/ship/data/injections/palace_itemrots.bin b/data/tr2/ship/data/injections/palace_itemrots.bin new file mode 100644 index 000000000..204f68b98 Binary files /dev/null and b/data/tr2/ship/data/injections/palace_itemrots.bin differ diff --git a/data/tr2/ship/data/injections/rig_itemrots.bin b/data/tr2/ship/data/injections/rig_itemrots.bin new file mode 100644 index 000000000..ca967a144 Binary files /dev/null and b/data/tr2/ship/data/injections/rig_itemrots.bin differ diff --git a/data/tr2/ship/data/injections/tibet_itemrots.bin b/data/tr2/ship/data/injections/tibet_itemrots.bin new file mode 100644 index 000000000..e401fcb5d Binary files /dev/null and b/data/tr2/ship/data/injections/tibet_itemrots.bin differ diff --git a/data/tr2/ship/data/injections/wall_itemrots.bin b/data/tr2/ship/data/injections/wall_itemrots.bin new file mode 100644 index 000000000..49cf00f5f Binary files /dev/null and b/data/tr2/ship/data/injections/wall_itemrots.bin differ diff --git a/data/tr2/ship/data/injections/wreck_itemrots.bin b/data/tr2/ship/data/injections/wreck_itemrots.bin new file mode 100644 index 000000000..a29637893 Binary files /dev/null and b/data/tr2/ship/data/injections/wreck_itemrots.bin differ diff --git a/data/tr2/ship/data/injections/xian_itemrots.bin b/data/tr2/ship/data/injections/xian_itemrots.bin new file mode 100644 index 000000000..a7dd4dc4d Binary files /dev/null and b/data/tr2/ship/data/injections/xian_itemrots.bin differ diff --git a/docs/tr2/CHANGELOG.md b/docs/tr2/CHANGELOG.md index 51c074a5e..d4eac3f41 100644 --- a/docs/tr2/CHANGELOG.md +++ b/docs/tr2/CHANGELOG.md @@ -3,6 +3,7 @@ - added an option to fix inventory item usage duplication (#1586) - added optional automatic key/puzzle inventory item pre-selection (#1884) - added a search feature to the config tool (#1889) +- added an option to fix rotation on some pickup items to better suit 3D pickup mode (#1613) - fixed a crash relating to audio decoding (#1895) - fixed depth problems when drawing certain rooms (#1853, regression from 0.6) - fixed Lara getting stuck in her hit animation if she is hit while mounting the boat or skidoo (#1606) diff --git a/src/tr2/config.h b/src/tr2/config.h index 12020e1b1..decef0d95 100644 --- a/src/tr2/config.h +++ b/src/tr2/config.h @@ -15,6 +15,7 @@ typedef struct { struct { bool enable_3d_pickups; + bool fix_item_rots; } visuals; struct { diff --git a/src/tr2/config_map.def b/src/tr2/config_map.def index f3397d068..8839a6d13 100644 --- a/src/tr2/config_map.def +++ b/src/tr2/config_map.def @@ -4,6 +4,7 @@ CFG_BOOL(g_Config, gameplay.fix_item_duplication_glitch, false) CFG_BOOL(g_Config, gameplay.enable_auto_item_selection, true) CFG_BOOL(g_Config, gameplay.fix_floor_data_issues, true) CFG_BOOL(g_Config, visuals.enable_3d_pickups, true) +CFG_BOOL(g_Config, visuals.fix_item_rots, true) CFG_ENUM(g_Config, rendering.screenshot_format, SCREENSHOT_FORMAT_JPEG, SCREENSHOT_FORMAT) CFG_INT32(g_Config, rendering.turbo_speed, 0) CFG_INT32(g_Config, input.keyboard_layout, INPUT_LAYOUT_DEFAULT) diff --git a/src/tr2/game/inject.c b/src/tr2/game/inject.c index 02a5cb712..2ba305462 100644 --- a/src/tr2/game/inject.c +++ b/src/tr2/game/inject.c @@ -21,6 +21,7 @@ typedef enum { typedef enum { INJ_GENERAL = 0, INJ_FLOOR_DATA = 4, + INJ_ITEM_POSITION = 7, } INJECTION_TYPE; typedef enum { @@ -89,6 +90,9 @@ static void M_LoadFromFile(INJECTION *const injection, const char *filename) case INJ_FLOOR_DATA: injection->relevant = g_Config.gameplay.fix_floor_data_issues; break; + case INJ_ITEM_POSITION: + injection->relevant = g_Config.visuals.fix_item_rots; + break; default: LOG_WARNING("%s is of unknown type %d", filename, injection->type); break; diff --git a/tools/tr2/config/TR2X_ConfigTool/Resources/Lang/en.json b/tools/tr2/config/TR2X_ConfigTool/Resources/Lang/en.json index 01b5ff41b..a567aa392 100644 --- a/tools/tr2/config/TR2X_ConfigTool/Resources/Lang/en.json +++ b/tools/tr2/config/TR2X_ConfigTool/Resources/Lang/en.json @@ -33,6 +33,10 @@ "Title": "Fix floor data issues", "Description": "Fixes original issues with floor data/triggers." }, + "fix_item_rots": { + "Title": "Fix item rotation issues", + "Description": "Fixes original issues with some incorrectly rotated pickups when using the 3D pickups option." + }, "enable_auto_item_selection": { "Title": "Key item pre-selection", "Description": "When Lara presses action against a keyhole or puzzle slot, and she has the corresponding item in the inventory, that item will be pre-selected." diff --git a/tools/tr2/config/TR2X_ConfigTool/Resources/specification.json b/tools/tr2/config/TR2X_ConfigTool/Resources/specification.json index d20cacc5a..53c991675 100644 --- a/tools/tr2/config/TR2X_ConfigTool/Resources/specification.json +++ b/tools/tr2/config/TR2X_ConfigTool/Resources/specification.json @@ -31,6 +31,11 @@ "Field": "fix_floor_data_issues", "DataType": "Bool", "DefaultValue": true + }, + { + "Field": "fix_item_rots", + "DataType": "Bool", + "DefaultValue": true } ] },