summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2OutObjArray.h
blob: 95dc8192606cde1935a5da0adc074be1a1cebe15 (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
#ifndef T2DLL_T2OUTOBJARRAY_H
#define T2DLL_T2OUTOBJARRAY_H
#include "../common.h"
#include "T2ObjectArray.h"
#include "T2OutObj.h"

class AFX_CLASS_EXPORT T2OutObjArray : public T2ObjectArray {
public:
	enum { kGroupSize = 64 };

	T2OutObjArray(unsigned int inStartID = 1000);
	virtual ~T2OutObjArray();
	virtual void DispatchIdle(T2TowerDoc* inDoc, int);
	T2OutObj* FindUnusedOutObj() const;
	int CalcMentenanceCost(T2TowerDoc* inDoc) const;
	void Read(T2Archive& inArchive, T2TowerDoc* inDoc);
	void Write(T2Archive& inArchive);

	T2OutObj* GetIndexOutObj(int i) { return &mOutObj[i]; }

protected:
	friend class T2OutObjArrayList;
    friend class T2TowerDoc;

	T2OutObj mOutObj[kGroupSize];
};
#endif