summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2XEvent.h
blob: b61a5458f32249891e2ae5435f8c3b8d11c07f68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once
#include "common.h"
#include "LArray.h"
#include "T2EventItem.h"

class AFX_CLASS_EXPORT T2XEvent : public T2EventItem {
public:
	T2XEvent(T2TowerEvent* inTowerEvent, CResFile* inResFile, DWORD inID, int inSubID);
	T2XEvent(T2XEvent* inXEvent, int inSubID);
	virtual ~T2XEvent();
	virtual DWORD GetID();
	virtual void Init(CResFile* inResFile);
	virtual BOOL IsBeginTime(unsigned int inTime);
	virtual BOOL IsBeginDay(int inDay);
	virtual BOOL Start(T2TowerDoc* inDoc);
	virtual int Exec(T2TowerDoc* inDoc);
	virtual void StopEvent(T2TowerDoc* inDoc);
	virtual void Write(T2Archive& inArchive);
	virtual void Read(T2Archive& inArchive);
	virtual BOOL IsXEvent() { return true; }
	virtual unsigned int DialogHook(T2EventDialog* inDialog, unsigned int inResult, T2TowerDoc* inDoc);
	virtual BOOL IsBeginTime(T2TowerDoc* inDoc, unsigned int inTime);
	virtual BOOL IsBeginDay(T2TowerDoc* inDoc, int inDay);

	unsigned int GetRefCon();
	void SetRefCon(unsigned int inRefCon);
	void SetDialogItems(int inItem1, int inItem2, int* const inItemArray, int inItem4, CString& inText);

protected:
	DWORD mID;
	unsigned int mRefCon;
	int mDlgItem1;
	int mDlgItem2;
	LArray mDlgItemArray;
	int mDlgItem4;
	CString mDlgText;
};