mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
tr1/room: add support for antitriggers
This allows antitriggers to be used like in TR2+. Resolves #2580.
This commit is contained in:
parent
7895617006
commit
9b073d69f3
4 changed files with 11 additions and 8 deletions
|
@ -2,6 +2,7 @@
|
|||
- added an ability to customize the fog distances (#634)
|
||||
- added an ability to customize the water color [see the reference](/docs/GAME_FLOW.md#water-color-table) (#1532)
|
||||
- added support for a hex water color notation (eg. `#80FFFF`) in the game flow file
|
||||
- added support for antitriggers, like TR2+ (#2580)
|
||||
- changed the `draw_distance_min` and `draw_distance_max` to `fog_start` and `fog_end`
|
||||
- changed `Select Detail` dialog title to `Graphic Options`
|
||||
- changed the number of static mesh slots from 50 to 256 (#2734)
|
||||
|
|
|
@ -620,6 +620,7 @@ Not all options are turned on by default. Refer to `TR1X_ConfigTool.exe` for det
|
|||
- added per-level customizable water color (with customizable blue component)
|
||||
- added per-level customizable fog distance
|
||||
- added deadly water feature from TR2+
|
||||
- added support for antitriggers, like TR2+
|
||||
|
||||
#### Miscellaneous
|
||||
- added Linux builds
|
||||
|
|
|
@ -67,9 +67,7 @@ typedef enum {
|
|||
TT_ANTIPAD = 6,
|
||||
TT_COMBAT = 7,
|
||||
TT_DUMMY = 8,
|
||||
#if TR_VERSION == 2
|
||||
TT_ANTITRIGGER = 9,
|
||||
#endif
|
||||
} TRIGGER_TYPE;
|
||||
|
||||
#if TR_VERSION == 2
|
||||
|
|
|
@ -26,7 +26,8 @@ static bool M_TestLava(const ITEM *const item);
|
|||
|
||||
static void M_TriggerMusicTrack(int16_t track, const TRIGGER *const trigger)
|
||||
{
|
||||
if (track == MX_UNUSED_0 && trigger->type == TT_ANTIPAD) {
|
||||
if (track == MX_UNUSED_0
|
||||
&& (trigger->type == TT_ANTIPAD || trigger->type == TT_ANTITRIGGER)) {
|
||||
Music_Stop();
|
||||
return;
|
||||
}
|
||||
|
@ -92,7 +93,7 @@ static void M_TriggerMusicTrack(int16_t track, const TRIGGER *const trigger)
|
|||
|
||||
if (trigger->type == TT_SWITCH) {
|
||||
flags ^= trigger->mask;
|
||||
} else if (trigger->type == TT_ANTIPAD) {
|
||||
} else if (trigger->type == TT_ANTIPAD || trigger->type == TT_ANTITRIGGER) {
|
||||
flags &= -1 - trigger->mask;
|
||||
} else if (trigger->mask) {
|
||||
flags |= trigger->mask;
|
||||
|
@ -404,9 +405,6 @@ void Room_TestSectorTrigger(const ITEM *const item, const SECTOR *const sector)
|
|||
}
|
||||
} else {
|
||||
switch (trigger->type) {
|
||||
case TT_TRIGGER:
|
||||
break;
|
||||
|
||||
case TT_SWITCH: {
|
||||
if (!Switch_Trigger(trigger->item_index, trigger->timer)) {
|
||||
return;
|
||||
|
@ -446,6 +444,9 @@ void Room_TestSectorTrigger(const ITEM *const item, const SECTOR *const sector)
|
|||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -466,7 +467,9 @@ void Room_TestSectorTrigger(const ITEM *const item, const SECTOR *const sector)
|
|||
|
||||
if (trigger->type == TT_SWITCH) {
|
||||
item->flags ^= trigger->mask;
|
||||
} else if (trigger->type == TT_ANTIPAD) {
|
||||
} else if (
|
||||
trigger->type == TT_ANTIPAD
|
||||
|| trigger->type == TT_ANTITRIGGER) {
|
||||
item->flags &= -1 - trigger->mask;
|
||||
} else if (trigger->mask) {
|
||||
item->flags |= trigger->mask;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue