This commit is contained in:
Charles 2001-06-19 20:07:57 +00:00
parent c574dd3894
commit adee4b97be
64 changed files with 313 additions and 62 deletions

View File

@ -133,6 +133,16 @@ void CNpcJumpingClamEnemy::setupWaypoints( sThingActor *ThisActor )
m_maxExtension = isqrt2( ( xDist * xDist ) + ( yDist * yDist ) ); m_maxExtension = isqrt2( ( xDist * xDist ) + ( yDist * yDist ) );
} }
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -137,6 +137,16 @@ void CNpcMotherJellyfishEnemy::setupWaypoints( sThingActor *ThisActor )
} }
} }
} }
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -519,6 +519,16 @@ void CNpcEnemy::setupWaypoints( sThingActor *ThisActor )
setHeading( newXPos, newYPos ); setHeading( newXPos, newYPos );
} }
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -125,6 +125,7 @@ public:
virtual void setupWaypoints( sThingActor *ThisActor ); virtual void setupWaypoints( sThingActor *ThisActor );
virtual int canCollide(); virtual int canCollide();
virtual CRECT const *getThinkBBox() {return &m_thinkArea;}
bool canBeSuckedUp(); bool canBeSuckedUp();
bool suckUp( DVECTOR *suckPos, int _frames ); bool suckUp( DVECTOR *suckPos, int _frames );
@ -313,6 +314,7 @@ protected:
u8 m_isDying; u8 m_isDying;
u32 m_RGB; u32 m_RGB;
int m_soundId; int m_soundId;
CRECT m_thinkArea;
s32 m_frame; s32 m_frame;
int m_animNo; int m_animNo;

View File

@ -29,6 +29,7 @@ public:
virtual void render(); virtual void render();
virtual int getFrameCount() {return( FRM_JELLYFISH1_SWIM7 - FRM_JELLYFISH1_SWIM1 + 1 );} virtual int getFrameCount() {return( FRM_JELLYFISH1_SWIM7 - FRM_JELLYFISH1_SWIM1 + 1 );}
virtual u8 canCollideWithEnemy() {return( false );} virtual u8 canCollideWithEnemy() {return( false );}
virtual CRECT const *getThinkBBox() {return( &getCollisionArea() );}
protected: protected:
virtual bool processSensor(); virtual bool processSensor();
virtual void processClose( int _frames ); virtual void processClose( int _frames );

View File

@ -721,7 +721,7 @@ void CNpcSeaSnakeEnemy::processShot( int _frames )
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcSeaSnakeEnemy::getThinkBBox() /*const CRECT *CNpcSeaSnakeEnemy::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -732,7 +732,7 @@ const CRECT *CNpcSeaSnakeEnemy::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -53,7 +53,7 @@ public:
virtual void shutdown(); virtual void shutdown();
virtual void render(); virtual void render();
virtual int checkCollisionAgainst(CThing *_thisThing, int _frames); virtual int checkCollisionAgainst(CThing *_thisThing, int _frames);
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
virtual bool processSensor(); virtual bool processSensor();
virtual void processClose( int _frames ); virtual void processClose( int _frames );

View File

@ -158,7 +158,7 @@ void CNpcSkullStomperEnemy::processClose( int _frames )
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcSkullStomperEnemy::getThinkBBox() /*const CRECT *CNpcSkullStomperEnemy::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -169,7 +169,7 @@ const CRECT *CNpcSkullStomperEnemy::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -18,7 +18,7 @@ class CNpcSkullStomperEnemy : public CNpcEnemy
{ {
public: public:
virtual void postInit(); virtual void postInit();
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
virtual void processEnemyCollision( CThing *thisThing ); virtual void processEnemyCollision( CThing *thisThing );
virtual bool processSensor(); virtual bool processSensor();

View File

@ -375,6 +375,16 @@ void CNpcHazard::setWaypoints( sThingHazard *ThisHazard )
Pos = startPos; Pos = startPos;
m_base = Pos; m_base = Pos;
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -83,6 +83,7 @@ public:
virtual void setRespawnRate( s16 newRespawnRate ) {m_respawnRate=newRespawnRate;} virtual void setRespawnRate( s16 newRespawnRate ) {m_respawnRate=newRespawnRate;}
virtual void trigger() {} virtual void trigger() {}
virtual void leftThinkZone(int _frames); virtual void leftThinkZone(int _frames);
virtual CRECT const *getThinkBBox() {return &m_thinkArea;}
static NPC_HAZARD_UNIT_TYPE getTypeFromMapEdit( u16 newType ); static NPC_HAZARD_UNIT_TYPE getTypeFromMapEdit( u16 newType );
static CNpcHazard *Create(int Type); static CNpcHazard *Create(int Type);
@ -118,6 +119,7 @@ protected:
CModelGfx *m_modelGfx; CModelGfx *m_modelGfx;
s16 m_respawnRate; s16 m_respawnRate;
int m_soundId; int m_soundId;
CRECT m_thinkArea;
CThing *m_platform; CThing *m_platform;

View File

@ -155,7 +155,7 @@ void CNpcBarrelHazard::render()
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcBarrelHazard::getThinkBBox() /*const CRECT *CNpcBarrelHazard::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -166,4 +166,4 @@ const CRECT *CNpcBarrelHazard::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/

View File

@ -23,7 +23,7 @@ class CNpcBarrelHazard : public CNpcHazard
public: public:
void init(); void init();
void render(); void render();
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
void processMovement( int _frames ); void processMovement( int _frames );

View File

@ -198,7 +198,7 @@ void CNpcBouncingBarrelHazard::render()
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcBouncingBarrelHazard::getThinkBBox() /*const CRECT *CNpcBouncingBarrelHazard::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -209,7 +209,7 @@ const CRECT *CNpcBouncingBarrelHazard::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -23,7 +23,7 @@ class CNpcBouncingBarrelHazard : public CNpcHazard
public: public:
void init(); void init();
void render(); void render();
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
void processMovement( int _frames ); void processMovement( int _frames );
virtual void collidedWith(CThing *_thisThing); virtual void collidedWith(CThing *_thisThing);

View File

@ -77,6 +77,16 @@ void CNpcBouncingRockHazard::setWaypoints( sThingHazard *ThisHazard )
trigger=(CHazardTrigger*)CTrigger::Create(CTrigger::TRIGGER_HAZARD_WALK); trigger=(CHazardTrigger*)CTrigger::Create(CTrigger::TRIGGER_HAZARD_WALK);
trigger->setPositionAndSize( ( newXPos << 4 ) + 8, ( newYPos << 4 ) + 16, 100, 0 ); trigger->setPositionAndSize( ( newXPos << 4 ) + 8, ( newYPos << 4 ) + 16, 100, 0 );
trigger->setHazard( this ); trigger->setHazard( this );
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -79,7 +79,7 @@ void CNpcBigWheelHazard::collidedWith( CThing *_thisThing )
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcBigWheelHazard::getThinkBBox() /*const CRECT *CNpcBigWheelHazard::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -90,4 +90,4 @@ const CRECT *CNpcBigWheelHazard::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/

View File

@ -23,7 +23,7 @@ class CNpcBigWheelHazard : public CNpcHazard
public: public:
void init(); void init();
virtual void render(); virtual void render();
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
void processMovement( int _frames ); void processMovement( int _frames );
virtual void collidedWith(CThing *_thisThing); virtual void collidedWith(CThing *_thisThing);

View File

@ -105,6 +105,16 @@ void CNpcConveyorSwitchHazard::setWaypoints( sThingHazard *ThisHazard )
PntList++; PntList++;
m_conveyorPos.vx = ( newXPos << 4 ) + 8; m_conveyorPos.vx = ( newXPos << 4 ) + 8;
m_conveyorPos.vy = ( newYPos << 4 ) + 8; m_conveyorPos.vy = ( newYPos << 4 ) + 8;
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -181,7 +181,7 @@ void CNpcDualPlatformBarrelHazard::render()
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcDualPlatformBarrelHazard::getThinkBBox() /*const CRECT *CNpcDualPlatformBarrelHazard::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -192,4 +192,4 @@ const CRECT *CNpcDualPlatformBarrelHazard::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/

View File

@ -23,7 +23,7 @@ class CNpcDualPlatformBarrelHazard : public CNpcHazard
public: public:
void init(); void init();
void render(); void render();
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
void processMovement( int _frames ); void processMovement( int _frames );

View File

@ -259,6 +259,16 @@ void CNpcFallingHazard::setWaypoints( sThingHazard *ThisHazard )
Pos = startPos; Pos = startPos;
m_base = Pos; m_base = Pos;
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -78,6 +78,11 @@ void CNpcFireballHazard::setWaypoints( sThingHazard *ThisHazard )
m_width = -m_width; m_width = -m_width;
} }
} }
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -63,6 +63,15 @@ void CNpcLogHazard::setWaypoints( sThingHazard *ThisHazard )
Pos = startPos; Pos = startPos;
Pos.vy = minY; Pos.vy = minY;
m_base = Pos; m_base = Pos;
s32 minX, maxX;
m_npcPath.getPathXExtents( &minX, &maxX );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -84,7 +84,10 @@ void CNpcPendulumHazard::setWaypoints( sThingHazard *ThisHazard )
Pos = startPos; Pos = startPos;
} }
m_base = Pos; m_thinkArea.x1 = Pos.vx - m_length;
m_thinkArea.x2 = Pos.vx + m_length;
m_thinkArea.y1 = Pos.vy - m_length;
m_thinkArea.y2 = Pos.vy + m_length;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -57,6 +57,16 @@ void CNpcPressureSwitchHazard::setWaypoints( sThingHazard *ThisHazard )
Pos = startPos; Pos = startPos;
m_base = Pos; m_base = Pos;
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -202,7 +202,7 @@ void CNpcRollingRockHazard::render()
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcRollingRockHazard::getThinkBBox() /*const CRECT *CNpcRollingRockHazard::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -213,4 +213,4 @@ const CRECT *CNpcRollingRockHazard::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/

View File

@ -23,7 +23,7 @@ class CNpcRollingRockHazard : public CNpcHazard
public: public:
void init(); void init();
void render(); void render();
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
void processMovement( int _frames ); void processMovement( int _frames );

View File

@ -95,6 +95,16 @@ void CNpcRisingWeightHazard::setWaypoints( sThingHazard *ThisHazard )
m_pulleyPos.vx = startPos.vx; m_pulleyPos.vx = startPos.vx;
m_pulleyPos.vy = startPos.vy - ( m_maxExtension >> 8 ); m_pulleyPos.vy = startPos.vy - ( m_maxExtension >> 8 );
} }
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -57,6 +57,16 @@ void CNpcRisingWeightWheelHazard::setWaypoints( sThingHazard *ThisHazard )
m_wheelPos.vx = newXPos; m_wheelPos.vx = newXPos;
m_wheelPos.vy = newYPos; m_wheelPos.vy = newYPos;
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -95,7 +95,7 @@ void CNpcSpikesHazard::processMovement( int _frames )
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcSpikesHazard::getThinkBBox() /*const CRECT *CNpcSpikesHazard::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -106,7 +106,7 @@ const CRECT *CNpcSpikesHazard::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -22,7 +22,7 @@ class CNpcSpikesHazard : public CNpcHazard
{ {
public: public:
void init(); void init();
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
virtual void processTimer( int _frames ); virtual void processTimer( int _frames );
void processMovement( int _frames ); void processMovement( int _frames );

View File

@ -93,4 +93,9 @@ void CNpcSwordfishHazard::setWaypoints( sThingHazard *ThisHazard )
m_heading = 2048; m_heading = 2048;
} }
} }
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }

View File

@ -153,6 +153,16 @@ void CNpcBalloonBridgePlatform::setWaypoints( sThingPlatform *ThisPlatform )
PntList++; PntList++;
m_maxExtension = abs( ( ( newYPos << 4 ) + 16 ) - startPos.vy ); m_maxExtension = abs( ( ( newYPos << 4 ) + 16 ) - startPos.vy );
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -92,7 +92,7 @@ void CNpcGeyserPlatformGenerator::think( int _frames )
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcGeyserPlatformGenerator::getThinkBBox() /*const CRECT *CNpcGeyserPlatformGenerator::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -103,4 +103,4 @@ const CRECT *CNpcGeyserPlatformGenerator::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/

View File

@ -23,7 +23,7 @@ class CNpcGeyserPlatformGenerator : public CNpcPlatform
public: public:
void setTargetType( NPC_PLATFORM_UNIT_TYPE targetType ) {m_targetType = targetType;} void setTargetType( NPC_PLATFORM_UNIT_TYPE targetType ) {m_targetType = targetType;}
virtual void render(); virtual void render();
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
virtual void think( int _frames ); virtual void think( int _frames );
virtual void collidedWith(CThing *_thisThing); virtual void collidedWith(CThing *_thisThing);

View File

@ -95,6 +95,16 @@ void CNpcBranchPlatform::setWaypoints( sThingPlatform *ThisPlatform )
{ {
m_reversed = false; m_reversed = false;
} }
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -31,6 +31,16 @@ void CNpcBubblePlatform::postInit()
CNpcPlatform::postInit(); CNpcPlatform::postInit();
m_pop = false; m_pop = false;
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -109,7 +119,7 @@ void CNpcBubblePlatform::processLifetime( int _frames )
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcBubblePlatform::getThinkBBox() /*const CRECT *CNpcBubblePlatform::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -120,4 +130,4 @@ const CRECT *CNpcBubblePlatform::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/

View File

@ -23,7 +23,7 @@ class CNpcBubblePlatform : public CNpcPlatform
public: public:
virtual void render(); virtual void render();
virtual void postInit(); virtual void postInit();
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
virtual void processLifetime( int _frames ); virtual void processLifetime( int _frames );
virtual void processMovement( int _frames ); virtual void processMovement( int _frames );

View File

@ -65,6 +65,16 @@ void CNpcBubbleTubePlatform::setWaypoints( sThingPlatform *ThisPlatform )
PntList++; PntList++;
m_maxExtension = ( ( newYPos << 4 ) + 16 ) - startPos.vy; m_maxExtension = ( ( newYPos << 4 ) + 16 ) - startPos.vy;
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -89,11 +89,16 @@ void CNpcBigWheelPlatform::setWaypoints( sThingPlatform *ThisPlatform )
{ {
init( startPos ); init( startPos );
} }
m_thinkArea.x1 = Pos.vx - m_extension;
m_thinkArea.x2 = Pos.vx + m_extension;
m_thinkArea.y1 = Pos.vy - m_extension;
m_thinkArea.y2 = Pos.vy + m_extension;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcBigWheelPlatform::getThinkBBox() /*const CRECT *CNpcBigWheelPlatform::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -104,7 +109,7 @@ const CRECT *CNpcBigWheelPlatform::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -21,7 +21,7 @@
class CNpcBigWheelPlatform : public CNpcPlatform class CNpcBigWheelPlatform : public CNpcPlatform
{ {
public: public:
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
virtual void postInit(); virtual void postInit();
virtual int getHeightFromPlatformAtPosition(int _x,int _y, int offsetX = 0, int offsetY = 0); virtual int getHeightFromPlatformAtPosition(int _x,int _y, int offsetX = 0, int offsetY = 0);
protected: protected:

View File

@ -87,7 +87,7 @@ void CNpcConveyorPlatformGenerator::think( int _frames )
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcConveyorPlatformGenerator::getThinkBBox() /*const CRECT *CNpcConveyorPlatformGenerator::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -98,7 +98,7 @@ const CRECT *CNpcConveyorPlatformGenerator::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -183,7 +183,7 @@ void CNpcConveyorPlatform::processMovement( int _frames )
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcConveyorPlatform::getThinkBBox() /*const CRECT *CNpcConveyorPlatform::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -194,7 +194,7 @@ const CRECT *CNpcConveyorPlatform::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -22,7 +22,7 @@ class CNpcConveyorPlatform : public CNpcPlatform
{ {
public: public:
virtual void postInit(); virtual void postInit();
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
virtual void render(); virtual void render();
virtual int checkCollisionAgainst(CThing *_thisThing, int _frames); virtual int checkCollisionAgainst(CThing *_thisThing, int _frames);
protected: protected:
@ -37,7 +37,7 @@ class CNpcConveyorPlatformGenerator : public CNpcPlatform
{ {
public: public:
virtual void render(); virtual void render();
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
virtual void think( int _frames ); virtual void think( int _frames );
virtual void collidedWith(CThing *_thisThing); virtual void collidedWith(CThing *_thisThing);

View File

@ -38,7 +38,7 @@ void CNpcDropPlatform::processMovement( int _frames )
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcDropPlatform::getThinkBBox() /*const CRECT *CNpcDropPlatform::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -49,4 +49,4 @@ const CRECT *CNpcDropPlatform::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/

View File

@ -20,8 +20,8 @@
class CNpcDropPlatform : public CNpcPlatform class CNpcDropPlatform : public CNpcPlatform
{ {
public: //public:
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
virtual void processMovement( int _frames ); virtual void processMovement( int _frames );
}; };

View File

@ -127,6 +127,16 @@ void CNpcDualPlatform::setWaypoints( sThingPlatform *ThisPlatform )
setLineBase( Pos ); setLineBase( Pos );
m_otherPlatform->setLineBase( slavePos ); m_otherPlatform->setLineBase( slavePos );
} }
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -311,7 +321,7 @@ void CNpcDualPlatform::render()
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcDualPlatform::getThinkBBox() /*const CRECT *CNpcDualPlatform::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -322,7 +332,7 @@ const CRECT *CNpcDualPlatform::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -28,7 +28,7 @@ public:
void setLineBase( DVECTOR base ) {m_lineBase = base;} void setLineBase( DVECTOR base ) {m_lineBase = base;}
DVECTOR getLineBase() {return( m_lineBase );} DVECTOR getLineBase() {return( m_lineBase );}
virtual void render(); virtual void render();
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
virtual void setWaypoints( sThingPlatform *ThisPlatform ); virtual void setWaypoints( sThingPlatform *ThisPlatform );
virtual void processMovement( int _frames ); virtual void processMovement( int _frames );

View File

@ -150,7 +150,7 @@ void CNpcJellyfishPlatform::think( int _frames )
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcJellyfishPlatform::getThinkBBox() /*const CRECT *CNpcJellyfishPlatform::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -161,4 +161,4 @@ const CRECT *CNpcJellyfishPlatform::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/

View File

@ -23,7 +23,7 @@ class CNpcJellyfishPlatform : public CNpcLinearPlatform
public: public:
virtual void postInit(); virtual void postInit();
virtual void think( int _frames ); virtual void think( int _frames );
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
virtual void collidedWith(CThing *_thisThing); virtual void collidedWith(CThing *_thisThing);

View File

@ -81,6 +81,16 @@ void CNpcLanternPlatform::setWaypoints( sThingPlatform *ThisPlatform )
{ {
init( startPos ); init( startPos );
} }
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -116,7 +126,7 @@ void CNpcLanternPlatform::processMovement( int _frames )
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcLanternPlatform::getThinkBBox() /*const CRECT *CNpcLanternPlatform::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -127,4 +137,4 @@ const CRECT *CNpcLanternPlatform::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/

View File

@ -22,7 +22,7 @@ class CNpcLanternPlatform : public CNpcPlatform
{ {
public: public:
virtual void postInit(); virtual void postInit();
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
virtual void setWaypoints( sThingPlatform *ThisPlatform ); virtual void setWaypoints( sThingPlatform *ThisPlatform );
virtual void processMovement( int _frames ); virtual void processMovement( int _frames );

View File

@ -555,6 +555,16 @@ void CNpcPlatform::setWaypoints( sThingPlatform *ThisPlatform )
setWaypointCount( ThisPlatform->PointCount - 1 ); setWaypointCount( ThisPlatform->PointCount - 1 );
setWaypointPtr( waypoints ); setWaypointPtr( waypoints );
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -125,6 +125,7 @@ public:
virtual void jump() {;} virtual void jump() {;}
virtual void leftThinkZone(int _frames); virtual void leftThinkZone(int _frames);
s16 getCollisionAngle() {return m_collisionAngle;} s16 getCollisionAngle() {return m_collisionAngle;}
virtual CRECT const *getThinkBBox() {return &m_thinkArea;}
static NPC_PLATFORM_UNIT_TYPE getTypeFromMapEdit( u16 newType ); static NPC_PLATFORM_UNIT_TYPE getTypeFromMapEdit( u16 newType );
static CNpcPlatform *Create(int Type); static CNpcPlatform *Create(int Type);
@ -246,6 +247,7 @@ protected:
virtual void setCollisionAngle(int newAngle); // Actually.. this probly doesn't need to be in the base calss anymore.. :/ virtual void setCollisionAngle(int newAngle); // Actually.. this probly doesn't need to be in the base calss anymore.. :/
s16 m_collisionAngle; s16 m_collisionAngle;
CRECT m_thinkArea;
}; };

View File

@ -65,6 +65,16 @@ void CNpcLiftPlatform::setWaypoints( sThingPlatform *ThisPlatform )
PntList++; PntList++;
m_maxExtension = ( ( newYPos << 4 ) + 16 ) - startPos.vy; m_maxExtension = ( ( newYPos << 4 ) + 16 ) - startPos.vy;
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -139,7 +139,7 @@ void CNpcLinearPlatform::processMovement( int _frames )
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcLinearPlatform::getThinkBBox() /*const CRECT *CNpcLinearPlatform::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -150,4 +150,4 @@ const CRECT *CNpcLinearPlatform::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/

View File

@ -22,7 +22,7 @@ class CNpcLinearPlatform : public CNpcPlatform
{ {
public: public:
virtual void postInit(); virtual void postInit();
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
virtual void processMovement( int _frames ); virtual void processMovement( int _frames );
}; };

View File

@ -88,7 +88,14 @@ void CNpcPendulumPlatform::setWaypoints( sThingPlatform *ThisPlatform )
else else
{ {
init( startPos ); init( startPos );
m_length = 200;
} }
m_thinkArea.x1 = Pos.vx - m_length;
m_thinkArea.x2 = Pos.vx + m_length;
m_thinkArea.y1 = Pos.vy - m_length;
m_thinkArea.y2 = Pos.vy + m_length;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -192,7 +199,7 @@ void CNpcPendulumPlatform::render()
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcPendulumPlatform::getThinkBBox() /*const CRECT *CNpcPendulumPlatform::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -200,4 +207,4 @@ const CRECT *CNpcPendulumPlatform::getThinkBBox()
objThinkBox.y1 = thinkBBox.YMax - 1; objThinkBox.y1 = thinkBBox.YMax - 1;
return &objThinkBox; return &objThinkBox;
} }*/

View File

@ -23,7 +23,7 @@ class CNpcPendulumPlatform : public CNpcPlatform
public: public:
virtual void postInit(); virtual void postInit();
virtual void render(); virtual void render();
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
virtual void setWaypoints( sThingPlatform *ThisPlatform ); virtual void setWaypoints( sThingPlatform *ThisPlatform );
virtual void processMovement( int _frames ); virtual void processMovement( int _frames );

View File

@ -214,7 +214,7 @@ void CNpcRaftPlatform::render()
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
const CRECT *CNpcRaftPlatform::getThinkBBox() /*const CRECT *CNpcRaftPlatform::getThinkBBox()
{ {
CRECT objThinkBox = getCollisionArea(); CRECT objThinkBox = getCollisionArea();
@ -225,4 +225,4 @@ const CRECT *CNpcRaftPlatform::getThinkBBox()
objThinkBox.y2 = thinkBBox.YMax; objThinkBox.y2 = thinkBBox.YMax;
return &objThinkBox; return &objThinkBox;
} }*/

View File

@ -23,7 +23,7 @@ class CNpcRaftPlatform : public CNpcPlatform
public: public:
virtual void postInit(); virtual void postInit();
virtual void render(); virtual void render();
virtual CRECT const *getThinkBBox(); //virtual CRECT const *getThinkBBox();
protected: protected:
virtual void processMovement( int _frames ); virtual void processMovement( int _frames );

View File

@ -90,6 +90,16 @@ void CNpcRisingBridgePlatform::setWaypoints( sThingPlatform *ThisPlatform )
trigger->setPositionAndSize( ( newXPos << 4 ) + 8, ( newYPos << 4 ) + 16, 100, 0 ); trigger->setPositionAndSize( ( newXPos << 4 ) + 8, ( newYPos << 4 ) + 16, 100, 0 );
//trigger->setTargetBox(TriggerList->TargetPos.X<<4,TriggerList->TargetPos.Y<<4,TriggerList->TargetSize.X<<4,TriggerList->TargetSize.Y<<4); //trigger->setTargetBox(TriggerList->TargetPos.X<<4,TriggerList->TargetPos.Y<<4,TriggerList->TargetSize.X<<4,TriggerList->TargetSize.Y<<4);
trigger->setPlatform( this ); trigger->setPlatform( this );
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -168,6 +168,16 @@ void CNpcSteamSwitchPlatform::setWaypoints( sThingPlatform *ThisPlatform )
trigger=(CSteamSwitchEmitterTrigger*)CTrigger::Create(CTrigger::TRIGGER_STEAM_SWITCH_EMITTER); trigger=(CSteamSwitchEmitterTrigger*)CTrigger::Create(CTrigger::TRIGGER_STEAM_SWITCH_EMITTER);
trigger->setPositionAndSize( ( newXPos << 4 ) + 8, ( newYPos << 4 ) + 16 - 50, 100, 100 ); trigger->setPositionAndSize( ( newXPos << 4 ) + 8, ( newYPos << 4 ) + 16 - 50, 100, 100 );
trigger->toggleVisible(); trigger->toggleVisible();
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -89,6 +89,16 @@ void CNpcTrapdoorPlatform::setWaypoints( sThingPlatform *ThisPlatform )
m_triggerPos.vx = newXPos; m_triggerPos.vx = newXPos;
m_triggerPos.vy = newYPos; m_triggerPos.vy = newYPos;
s32 minX, maxX, minY, maxY;
m_npcPath.getPathXExtents( &minX, &maxX );
m_npcPath.getPathYExtents( &minY, &maxY );
m_thinkArea.x1 = minX;
m_thinkArea.x2 = maxX;
m_thinkArea.y1 = minY;
m_thinkArea.y2 = maxY;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////