summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dgnevent.h
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-19 08:55:18 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-19 08:55:18 +0000
commitae6c83ec9f0273d13ad57f1382528d7715189a2b (patch)
tree2a09386686dc53e703cf1a6ce4b25acd069b3017 /crawl-ref/source/dgnevent.h
parent4958b84b497fe729eaf14bc90b8d01874722c33d (diff)
downloadcrawl-ref-ae6c83ec9f0273d13ad57f1382528d7715189a2b.tar.gz
crawl-ref-ae6c83ec9f0273d13ad57f1382528d7715189a2b.zip
This change moves the logic for when a level or branch prohibits
teleport control from the C++ code into the vault .des files. This is done with the additions of two things: * Changeable, persistent per-level and per-branch flags which affect game play. * Dungeon events for the killing of monsters, picking up of objects and changing of features. The current level and branch flags are for teleport control prevention, making a level unmappable (like the Abyss or a Labyrinth), and preventing magic mapping from working (like the Abyss or a Labyrinth). Some related changes: * The new .des header KMASK allows for dungeon grid masks like no_monster_gen to be applied to specific symbols rather than the entire vault. * If the wizard mapping command (&{) is used in a place which is unmappable, it will ask if you wish to force the area to be mappable (so you can see what an entire Labyrinth or Abyss level looks like without having to hack the source). * A new wizard-mode level-map command, 'T', will teleport the player to wherever the cursor is pointing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2146 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dgnevent.h')
-rw-r--r--crawl-ref/source/dgnevent.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/crawl-ref/source/dgnevent.h b/crawl-ref/source/dgnevent.h
index 61134966b7..77791528b4 100644
--- a/crawl-ref/source/dgnevent.h
+++ b/crawl-ref/source/dgnevent.h
@@ -15,15 +15,18 @@
// Keep event names in luadgn.cc in sync.
enum dgn_event_type
{
- DET_NONE = 0x0000,
+ DET_NONE = 0x0000,
- DET_TURN_ELAPSED = 0x0001,
- DET_MONSTER_MOVED = 0x0002,
- DET_PLAYER_MOVED = 0x0004,
- DET_LEAVING_LEVEL = 0x0008,
- DET_ENTERING_LEVEL = 0x0010,
- DET_PLAYER_IN_LOS = 0x0020, // Player just entered LOS.
- DET_PLAYER_CLIMBS = 0x0040 // Player climbing stairs.
+ DET_TURN_ELAPSED = 0x0001,
+ DET_MONSTER_MOVED = 0x0002,
+ DET_PLAYER_MOVED = 0x0004,
+ DET_LEAVING_LEVEL = 0x0008,
+ DET_ENTERING_LEVEL = 0x0010,
+ DET_PLAYER_IN_LOS = 0x0020, // Player just entered LOS.
+ DET_PLAYER_CLIMBS = 0x0040, // Player climbing stairs.
+ DET_MONSTER_DIED = 0x0080,
+ DET_ITEM_PICKUP = 0x0100,
+ DET_FEAT_CHANGE = 0x0200
};
class dgn_event
@@ -32,11 +35,12 @@ public:
dgn_event_type type;
coord_def place;
int elapsed_ticks;
+ long arg1, arg2;
public:
dgn_event(dgn_event_type t, const coord_def &p = coord_def(),
- int ticks = you.time_taken)
- : type(t), place(p), elapsed_ticks(ticks)
+ int ticks = you.time_taken, long a1 = 0, long a2 = 0)
+ : type(t), place(p), elapsed_ticks(ticks), arg1(a1), arg2(a2)
{
}
};
@@ -88,6 +92,7 @@ public:
void move_listeners(const coord_def &from, const coord_def &to);
void fire_position_event(dgn_event_type et, const coord_def &pos);
+ void fire_position_event(const dgn_event &e, const coord_def &pos);
void fire_event(dgn_event_type et);
void fire_event(const dgn_event &e);