summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2Object.h
blob: a7ca87e7a6d17d5f86015a275b7ab0da99fbd356 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#pragma once
#include "common.h"
#include "CLink.h"

enum {
    kStatus0,
    // "out of the tower"
    kStatus1,
    // "just on the floor"
    kStatus2,
    // "on the floor"
    kStatus3,
    // "looking for the route"
    kStatus4,
    // "going to the mover"
    kStatus5,
    // "waiting the mover"
    kStatus6,
    // "on the mover"
    kStatus7,
    // "just taking the mover"
    kStatus8,
    // "just getting off the mover"
    kStatus9,
    // "going to the tenant"
    kStatus10,
    // "in the tenant"
    kStatus11,
    // "going out the tower"
    kStatus12,
    // "goint to the emergency stair"
    kStatus13,
    // "going to the point"
    kStatus14,
    // "stopping"
    kStatus15,
    // "on the transporter"
    kStatus16,
};

class AFX_CLASS_EXPORT T2Object {
public:
	T2Object();
	virtual ~T2Object() {}

    BOOL IsUsed() const { return mUsed; }
	virtual void SetUsed(BOOL u) { mUsed = u; }

    int GetStatus() const { return mStatus; }
    void SetStatus(int s) { mStatus = s; }

	virtual BOOL Enter(CLink*) { return false; }
	virtual BOOL Leave(CLink*) { return false; }
	virtual unsigned int Idle(T2TowerDoc*) { return 0; }

    BOOL IsFavorite() const { return mFavorite; }
	virtual void SetFavorite(BOOL v);

	virtual void Load(T2Archive& archive, T2TowerDoc* towerDoc);
	virtual void Save(T2Archive& archive);
	virtual void LoadSelf(T2Archive& archive, T2TowerDoc* towerDoc);
	virtual void SaveSelf(T2Archive& archive);

protected:
	virtual void InitLoaded();

	BOOL mUsed;
	int mStatus;
	BOOL mFavorite;
};