Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tr2/data: add pickup item rotation injections #1972

Merged
merged 1 commit into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 37 additions & 6 deletions data/tr2/ship/cfg/TR2X_gameflow.json5
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
{},

// 1. The Great Wall
{},
{
"injections": [
"data/injections/wall_itemrots.bin",
],
},

// 2. Venice
{},
Expand All @@ -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
{},
Expand All @@ -35,32 +48,43 @@
{
"injections": [
"data/injections/wreck_fd.bin",
"data/injections/wreck_itemrots.bin",
],
},

// 9. Living Quarters
{},

// 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",
},
},

// 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",
Expand All @@ -71,6 +95,7 @@
{
"injections": [
"data/injections/palace_fd.bin",
"data/injections/palace_itemrots.bin",
],
"object_strings": {
"O_TIGER": "Snow Leopard",
Expand All @@ -81,21 +106,27 @@
{
"injections": [
"data/injections/xian_fd.bin",
"data/injections/xian_itemrots.bin",
],
},

// 16. Floating Islands
{
"injections": [
"data/injections/floating_fd.bin",
"data/injections/floating_itemrots.bin",
],
},

// 17. The Dragon's Lair
{},

// 18. Home Sweet Home
{},
{
"injections": [
"data/injections/house_itemrots.bin",
],
},

// 19. Demo 1
{},
Expand Down
Binary file not shown.
Binary file not shown.
Binary file added data/tr2/ship/data/injections/deck_itemrots.bin
Binary file not shown.
Binary file added data/tr2/ship/data/injections/diving_itemrots.bin
Binary file not shown.
Binary file not shown.
Binary file added data/tr2/ship/data/injections/house_itemrots.bin
Binary file not shown.
Binary file added data/tr2/ship/data/injections/opera_itemrots.bin
Binary file not shown.
Binary file not shown.
Binary file added data/tr2/ship/data/injections/rig_itemrots.bin
Binary file not shown.
Binary file added data/tr2/ship/data/injections/tibet_itemrots.bin
Binary file not shown.
Binary file added data/tr2/ship/data/injections/wall_itemrots.bin
Binary file not shown.
Binary file added data/tr2/ship/data/injections/wreck_itemrots.bin
Binary file not shown.
Binary file added data/tr2/ship/data/injections/xian_itemrots.bin
Binary file not shown.
1 change: 1 addition & 0 deletions docs/tr2/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/tr2/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ typedef struct {

struct {
bool enable_3d_pickups;
bool fix_item_rots;
} visuals;

struct {
Expand Down
1 change: 1 addition & 0 deletions src/tr2/config_map.def
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions src/tr2/game/inject.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ typedef enum {
typedef enum {
INJ_GENERAL = 0,
INJ_FLOOR_DATA = 4,
INJ_ITEM_POSITION = 7,
} INJECTION_TYPE;

typedef enum {
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions tools/tr2/config/TR2X_ConfigTool/Resources/Lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
"Field": "fix_floor_data_issues",
"DataType": "Bool",
"DefaultValue": true
},
{
"Field": "fix_item_rots",
"DataType": "Bool",
"DefaultValue": true
}
]
},
Expand Down