1 /**
2  * @file quests.cpp
3  *
4  * Interface of functionality for handling quests.
5  */
6 #ifndef __QUESTS_H__
7 #define __QUESTS_H__
8 
9 #include "engine.h"
10 
11 DEVILUTION_BEGIN_NAMESPACE
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 typedef struct QuestStruct {
18 	Uint8 _qlevel;
19 	Uint8 _qtype;
20 	Uint8 _qactive;
21 	dungeon_type _qlvltype;
22 	Sint32 _qtx;
23 	Sint32 _qty;
24 	Uint8 _qslvl;
25 	Uint8 _qidx;
26 	Sint32 _qmsg;
27 	Uint8 _qvar1;
28 	Uint8 _qvar2;
29 	bool _qlog;
30 } QuestStruct;
31 
32 typedef struct QuestData {
33 	Uint8 _qdlvl;
34 	Sint8 _qdmultlvl;
35 	dungeon_type _qlvlt;
36 	Uint8 _qdtype;
37 	Uint8 _qdrnd;
38 	Uint8 _qslvl;
39 	Uint32 _qflags; /* unsigned char */
40 	Sint32 _qdmsg;
41 	const char *_qlstr;
42 } QuestData;
43 
44 extern bool questlog;
45 extern BYTE *pQLogCel;
46 extern QuestStruct quests[MAXQUESTS];
47 extern int ReturnLvlX;
48 extern int ReturnLvlY;
49 extern dungeon_type ReturnLvlT;
50 extern int ReturnLvl;
51 
52 void InitQuests();
53 void CheckQuests();
54 BOOL ForceQuests();
55 BOOL QuestStatus(int i);
56 void CheckQuestKill(int m, BOOL sendmsg);
57 void DRLG_CheckQuests(int x, int y);
58 void SetReturnLvlPos();
59 void GetReturnLvlPos();
60 void LoadPWaterPalette();
61 void ResyncMPQuests();
62 void ResyncQuests();
63 void DrawQuestLog(CelOutputBuffer out);
64 void StartQuestlog();
65 void QuestlogUp();
66 void QuestlogDown();
67 void QuestlogEnter();
68 void QuestlogESC();
69 void SetMultiQuest(int q, int s, int l, int v1);
70 
71 /* rdata */
72 extern QuestData questlist[];
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 DEVILUTION_END_NAMESPACE
79 
80 #endif /* __QUESTS_H__ */
81