SBSPSS/source/triggers/trigger.h

106 lines
2.3 KiB
C
Raw Normal View History

2001-05-29 21:25:37 +02:00
/*=========================================================================
trigger.h
Author: dave
2001-05-29 22:31:02 +02:00
Created: cos paul was too lazy
2001-05-29 21:25:37 +02:00
Project: Spongebob
2001-05-29 22:31:02 +02:00
Purpose: Oh, cos I like the sound of my own typing
2001-05-29 21:25:37 +02:00
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
#ifndef __TRIGGER_TRIGGER_HEADER__
#define __TRIGGER_TRIGGER_HEADER__
#ifndef __THING_THING_H__
#include "thing/thing.h"
#endif
class CTrigger : public CTriggerThing
{
public:
enum TRIGGER_TYPE
{
TRIGGER_EXIT=0,
TRIGGER_RESPAWN,
TRIGGER_TELEPORT,
TRIGGER_CAMLOCK,
2001-05-29 22:31:02 +02:00
TRIGGER_INWATER,
TRIGGER_OUTWATER,
2001-06-05 16:38:11 +02:00
TRIGGER_GARY_START,
TRIGGER_FLAME_EMITTER,
TRIGGER_INTERMITTENT_FLAME_EMITTER,
TRIGGER_GARY_STOP,
TRIGGER_GARY_GO_LEFT,
TRIGGER_GARY_GO_RIGHT,
TRIGGER_BUBBLE_EMITTER,
TRIGGER_INTERMITTENT_LEFT_FLAME_EMITTER,
TRIGGER_INTERMITTENT_DOWN_FLAME_EMITTER,
TRIGGER_BUBBLE_GEYSER_EMITTER,
2001-06-05 22:21:11 +02:00
TRIGGER_STEAM_EMITTER,
2001-06-06 20:40:34 +02:00
TRIGGER_GARY_BOWL,
2001-06-07 18:33:19 +02:00
TRIGGER_WATER_DRIP_EMITTER,
TRIGGER_ACID_DRIP_EMITTER,
TRIGGER_OIL_DRIP_EMITTER,
TRIGGER_LAVA_DRIP_EMITTER,
2001-06-07 20:41:59 +02:00
TRIGGER_ACID_BUBBLE_EMITTER,
TRIGGER_OIL_BUBBLE_EMITTER,
TRIGGER_LAVA_BUBBLE_EMITTER,
2001-06-08 15:35:08 +02:00
TRIGGER_STEAM_DOWN_EMITTER,
TRIGGER_STEAM_LEFT_EMITTER,
TRIGGER_STEAM_RIGHT_EMITTER,
2001-06-15 23:24:14 +02:00
TRIGGER_WIND_UP,
TRIGGER_WIND_DOWN,
TRIGGER_WIND_LEFT,
TRIGGER_WIND_RIGHT,
2001-06-19 23:35:02 +02:00
TRIGGER_OIL_GEYSER,
2001-06-25 23:47:22 +02:00
TRIGGER_BOSS_ARENA,
2001-07-04 20:37:17 +02:00
TRIGGER_SECRET_AREA,
2001-07-13 20:27:56 +02:00
TRIGGER_SPEECH_FIRST_NET,
TRIGGER_SPEECH_FIRST_CORAL,
TRIGGER_SPEECH_GARY_CH2L1,
TRIGGER_SPEECH_BREAK_FLOOR,
TRIGGER_SPEECH_BUBBLE_GEYSER,
TRIGGER_SPEECH_RISING_PLATFORM,
TRIGGER_SPEECH_FIRST_BUBBLE,
TRIGGER_SPEECH_USE_BUBBLE,
TRIGGER_SPEECH_WEIGHT,
2001-07-26 22:00:55 +02:00
TRIGGER_CAMERAYPOSITIONTRIGGER,
2001-05-30 18:52:52 +02:00
// Code based triggers
TRIGGER_PLATFORM,
2001-06-04 21:01:17 +02:00
TRIGGER_HAZARD,
2001-06-05 18:01:22 +02:00
TRIGGER_HAZARD_WALK,
2001-06-06 15:27:46 +02:00
TRIGGER_STEAM_SWITCH_EMITTER,
2001-05-29 21:25:37 +02:00
TRIGGER_MAX,
};
enum
{ // For Dynamic ThingCache
MAX_SUBTYPE =TRIGGER_MAX,
};
virtual void init();
virtual void shutdown();
2001-05-29 22:31:02 +02:00
virtual void think(int _frames);
virtual void render();
2001-05-29 21:25:37 +02:00
static CTrigger *Create(int Type);
static CTrigger *Create(sThingTrigger *ThisTrigger);
2001-05-29 22:31:02 +02:00
virtual void setPositionAndSize(int _x,int _y,int _w,int _h);
virtual void setTargetBox(int _x,int _y,int _w,int _h);
2001-07-26 22:00:55 +02:00
void setVal(int _val);
2001-05-29 21:25:37 +02:00
protected:
virtual void collidedWith(CThing *_thisThing){};
2001-05-29 22:31:02 +02:00
int m_boxX1,m_boxY1,m_boxX2,m_boxY2;
2001-07-26 22:00:55 +02:00
int m_val0;
2001-05-29 22:31:02 +02:00
2001-05-29 21:25:37 +02:00
};
#endif