You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.1 KiB
51 lines
1.1 KiB
|
6 years ago
|
/**
|
||
|
|
* @file trigs.h
|
||
|
|
*
|
||
|
|
* Interface of functionality for triggering events when the player enters an area.
|
||
|
|
*/
|
||
|
5 years ago
|
#pragma once
|
||
|
8 years ago
|
|
||
|
5 years ago
|
#include "engine/point.hpp"
|
||
|
5 years ago
|
#include "interfac.h"
|
||
|
4 years ago
|
#include "levels/gendung.h"
|
||
|
5 years ago
|
|
||
|
5 years ago
|
namespace devilution {
|
||
|
6 years ago
|
|
||
|
5 years ago
|
#define MAXTRIGGERS 7
|
||
|
|
|
||
|
5 years ago
|
struct TriggerStruct {
|
||
|
5 years ago
|
Point position;
|
||
|
5 years ago
|
interface_mode _tmsg;
|
||
|
5 years ago
|
int _tlvl;
|
||
|
5 years ago
|
};
|
||
|
5 years ago
|
|
||
|
5 years ago
|
extern bool trigflag;
|
||
|
7 years ago
|
extern int numtrigs;
|
||
|
8 years ago
|
extern TriggerStruct trigs[MAXTRIGGERS];
|
||
|
7 years ago
|
extern int TWarpFrom;
|
||
|
8 years ago
|
|
||
|
7 years ago
|
void InitNoTriggers();
|
||
|
5 years ago
|
bool IsWarpOpen(dungeon_type type);
|
||
|
7 years ago
|
void InitTownTriggers();
|
||
|
|
void InitL1Triggers();
|
||
|
|
void InitL2Triggers();
|
||
|
|
void InitL3Triggers();
|
||
|
|
void InitL4Triggers();
|
||
|
4 years ago
|
void InitHiveTriggers();
|
||
|
|
void InitCryptTriggers();
|
||
|
7 years ago
|
void InitSKingTriggers();
|
||
|
|
void InitSChambTriggers();
|
||
|
|
void InitPWaterTriggers();
|
||
|
|
void InitVPTriggers();
|
||
|
|
void Freeupstairs();
|
||
|
|
void CheckTrigForce();
|
||
|
|
void CheckTriggers();
|
||
|
8 years ago
|
|
||
|
5 years ago
|
/**
|
||
|
|
* @brief Check if the provided position is in the entrance boundary of the entrance.
|
||
|
|
* @param position The position to check against the entrance boundary.
|
||
|
|
*/
|
||
|
|
bool EntranceBoundaryContains(Point entrance, Point position);
|
||
|
|
|
||
|
5 years ago
|
} // namespace devilution
|