summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2OutsideInfo.h
blob: abb7cf7e2a3b042fe08f1f55ba23a3b1ea4e4d22 (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
#pragma once
#include "common.h"

class AFX_CLASS_EXPORT T2OutsideInfo {
public:
	T2OutsideInfo(const T2FloorInfo& inFloorInfo);
	virtual ~T2OutsideInfo();
	void SetArea(const RECT& inRect);
	void FillOutObjID(const RECT& inRect, unsigned int inID);
	unsigned int GetOutObjID(int inV, int inH) const;
	BOOL NextOutObj(T2OutObj*& outOutObj);
	void Read(T2Archive& inArchive);
	void Write(T2Archive& inArchive);

protected:
	void Reset();
	POINT CurrentPt() const;
	unsigned int GetUnitInfo(int inV, int inH) const;
	T2OutObj* GetOutObj(int inV, int inH) const;
	BOOL CalcNextUnitInfo();
	BOOL NextValue(unsigned int& outValue);
	BOOL NextIndex(int& outIndex);

	LArray *mUnitInfo;
	RECT mArea;
	POINT mCurrentPt;
	int mNextUnitInfo;
	unsigned int mCurrentOutObjID;
	const T2FloorInfo &mFloorInfo;
};