#pragma once #include "common.h" struct T2TrafficUnit { int x0; unsigned int x4; short range; }; class AFX_EXT_CLASS T2TrafficInfo { public: T2TrafficInfo(RECT inArea, unsigned int inA, unsigned int inB, unsigned int inC, unsigned int inUnitSize); virtual ~T2TrafficInfo(); void Pass(POINT inPt1, POINT inPt2, short inCost); void HourChanged(T2TowerDoc* inDoc); short GetRange(POINT inPt) const; void Read(T2Archive& inArchive); void Write(T2Archive& inArchive) const; protected: unsigned int CalcRange(unsigned int inValue) const; void CalcUnitArea(unsigned int inIndex, RECT& outRect) const; T2TrafficUnit* GetUnit(POINT inPt) const; int CalcUnitIndex(POINT inPt) const; unsigned int mUnitSize; unsigned int m8; unsigned int mC; unsigned int m10; RECT mArea; unsigned int mHeight; unsigned int mWidth; T2TrafficUnit *mUnitData; };