From 921bdbac48ce09faf10159295b3f25afcb80cf38 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 1 May 2001 21:33:51 +0000 Subject: [PATCH] --- source/triggers/tteleprt.cpp | 71 ++++++++++++++++++++++++++++++++++++ source/triggers/tteleprt.h | 57 +++++++++++++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 source/triggers/tteleprt.cpp create mode 100644 source/triggers/tteleprt.h diff --git a/source/triggers/tteleprt.cpp b/source/triggers/tteleprt.cpp new file mode 100644 index 000000000..67648c20e --- /dev/null +++ b/source/triggers/tteleprt.cpp @@ -0,0 +1,71 @@ +/*========================================================================= + + tteleprt.cpp + + Author: PKG + Created: + Project: Spongebob + Purpose: + + Copyright (c) 2001 Climax Development Ltd + +===========================================================================*/ + +/*---------------------------------------------------------------------- + Includes + -------- */ + +#include "triggers\tteleprt.h" + +#ifndef __PLAYER_PLAYER_H__ +#include "player\player.h" +#endif + + +/* Std Lib + ------- */ + +/* Data + ---- */ + +/*---------------------------------------------------------------------- + Tyepdefs && Defines + ------------------- */ + +/*---------------------------------------------------------------------- + Structure defintions + -------------------- */ + +/*---------------------------------------------------------------------- + Function Prototypes + ------------------- */ + +/*---------------------------------------------------------------------- + Vars + ---- */ + + +/*---------------------------------------------------------------------- + Function: + Purpose: + Params: + Returns: + ---------------------------------------------------------------------- */ +void CTeleportTrigger::collidedWith(CThing *_thisThing) +{ + /* + CRECT collisionArea; + DVECTOR respawnPos; + + ASSERT(_thisThing->getThingType()==TYPE_PLAYER); + + collisionArea=getCollisionArea(); + respawnPos.vx=collisionArea.x1+((collisionArea.x2-collisionArea.x1)/2); + respawnPos.vy=collisionArea.y2; + ((CPlayer*)_thisThing)->setRespawnPos(respawnPos); + */ + ASSERT(0); +} + +/*=========================================================================== +end */ diff --git a/source/triggers/tteleprt.h b/source/triggers/tteleprt.h new file mode 100644 index 000000000..7bae7651d --- /dev/null +++ b/source/triggers/tteleprt.h @@ -0,0 +1,57 @@ +/*========================================================================= + + tteleprt.h + + Author: PKG + Created: + Project: Spongebob + Purpose: + + Copyright (c) 2001 Climax Development Ltd + +===========================================================================*/ + +#ifndef __TRIGGERS_TTELEPRT_H__ +#define __TRIGGERS_TTELEPRT_H__ + +/*---------------------------------------------------------------------- + Includes + -------- */ + +#ifndef __THING_THING_H__ +#include "thing/thing.h" +#endif + + +/* Std Lib + ------- */ + +/*---------------------------------------------------------------------- + Tyepdefs && Defines + ------------------- */ + +/*---------------------------------------------------------------------- + Structure defintions + -------------------- */ + +class CTeleportTrigger : public CTriggerThing +{ +protected: + virtual void collidedWith(CThing *_thisThing); + +}; + +/*---------------------------------------------------------------------- + Globals + ------- */ + +/*---------------------------------------------------------------------- + Functions + --------- */ + +/*---------------------------------------------------------------------- */ + +#endif /* __TRIGGERS_TTELEPRT_H__ */ + +/*=========================================================================== + end */