From 7c1e7b2ab7edc48a439f41d4b63690575bdfcacd Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 8 May 2001 15:34:15 +0000 Subject: [PATCH] --- source/triggers/twater.cpp | 77 ++++++++++++++++++++++++++++++++++++++ source/triggers/twater.h | 64 +++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 source/triggers/twater.cpp create mode 100644 source/triggers/twater.h diff --git a/source/triggers/twater.cpp b/source/triggers/twater.cpp new file mode 100644 index 000000000..01c32d6a7 --- /dev/null +++ b/source/triggers/twater.cpp @@ -0,0 +1,77 @@ +/*========================================================================= + + twater.cpp + + Author: PKG + Created: + Project: Spongebob + Purpose: + + Copyright (c) 2001 Climax Development Ltd + +===========================================================================*/ + +/*---------------------------------------------------------------------- + Includes + -------- */ + +#include "triggers\twater.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 CInWaterTrigger::collidedWith(CThing *_thisThing) +{ + if(_thisThing->getThingType()==TYPE_PLAYER) + { +// ((CPlayer*)_thisThing)->setCameraBox(camBox); + } +} + +/*---------------------------------------------------------------------- + Function: + Purpose: + Params: + Returns: + ---------------------------------------------------------------------- */ +void COutOfWaterTrigger::collidedWith(CThing *_thisThing) +{ + if(_thisThing->getThingType()==TYPE_PLAYER) + { +// ((CPlayer*)_thisThing)->setCameraBox(camBox); + } +} + +/*=========================================================================== +end */ diff --git a/source/triggers/twater.h b/source/triggers/twater.h new file mode 100644 index 000000000..ee5d4da81 --- /dev/null +++ b/source/triggers/twater.h @@ -0,0 +1,64 @@ +/*========================================================================= + + twater.h + + Author: PKG + Created: + Project: Spongebob + Purpose: + + Copyright (c) 2001 Climax Development Ltd + +===========================================================================*/ + +#ifndef __TRIGGERS_TWATER_H__ +#define __TRIGGERS_TWATER_H__ + +/*---------------------------------------------------------------------- + Includes + -------- */ + +#ifndef __THING_THING_H__ +#include "thing/thing.h" +#endif + + +/* Std Lib + ------- */ + +/*---------------------------------------------------------------------- + Tyepdefs && Defines + ------------------- */ + +/*---------------------------------------------------------------------- + Structure defintions + -------------------- */ + +class CInWaterTrigger : public CTriggerThing +{ +protected: + virtual void collidedWith(CThing *_thisThing); + +}; + +class COutOfWaterTrigger : public CTriggerThing +{ +protected: + virtual void collidedWith(CThing *_thisThing); + +}; + +/*---------------------------------------------------------------------- + Globals + ------- */ + +/*---------------------------------------------------------------------- + Functions + --------- */ + +/*---------------------------------------------------------------------- */ + +#endif /* __TRIGGERS_TWATER_H__ */ + +/*=========================================================================== + end */