This commit is contained in:
parent
6bd6a949e5
commit
3a10910187
8 changed files with 412 additions and 0 deletions
39
source/triggers/tadripemit.cpp
Normal file
39
source/triggers/tadripemit.cpp
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/*=========================================================================
|
||||||
|
|
||||||
|
tadripemit.cpp
|
||||||
|
|
||||||
|
Author: CRB
|
||||||
|
Created:
|
||||||
|
Project: Spongebob
|
||||||
|
Purpose:
|
||||||
|
|
||||||
|
Copyright (c) 2001 Climax Development Ltd
|
||||||
|
|
||||||
|
===========================================================================*/
|
||||||
|
|
||||||
|
#ifndef __TRIGGERS_TADRIPEMIT_H__
|
||||||
|
#include "triggers\tadripemit.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GAME_GAME_H__
|
||||||
|
#include "game\game.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void CAcidDripEmitterTrigger::think(int _frames)
|
||||||
|
{
|
||||||
|
CTrigger::think( _frames );
|
||||||
|
|
||||||
|
if ( m_timer <= 0 )
|
||||||
|
{
|
||||||
|
CFX::Create( CFX::FX_TYPE_DROP_ACID, Pos );
|
||||||
|
|
||||||
|
m_timer = GameState::getOneSecondInFrames();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_timer -= _frames;
|
||||||
|
}
|
||||||
|
}
|
61
source/triggers/tadripemit.h
Normal file
61
source/triggers/tadripemit.h
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
/*=========================================================================
|
||||||
|
|
||||||
|
tadripemit.h
|
||||||
|
|
||||||
|
Author: CRB
|
||||||
|
Created:
|
||||||
|
Project: Spongebob
|
||||||
|
Purpose:
|
||||||
|
|
||||||
|
Copyright (c) 2001 Climax Development Ltd
|
||||||
|
|
||||||
|
===========================================================================*/
|
||||||
|
|
||||||
|
#ifndef __TRIGGERS_TADRIPEMIT_H__
|
||||||
|
#define __TRIGGERS_TADRIPEMIT_H__
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Includes
|
||||||
|
-------- */
|
||||||
|
|
||||||
|
#ifndef __THING_THING_H__
|
||||||
|
#include "thing/thing.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __TRIGGERS_TWDRIPEMIT_H__
|
||||||
|
#include "triggers\twdripemit.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "fx\fx.h"
|
||||||
|
|
||||||
|
/* Std Lib
|
||||||
|
------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Tyepdefs && Defines
|
||||||
|
------------------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Structure defintions
|
||||||
|
-------------------- */
|
||||||
|
|
||||||
|
class CAcidDripEmitterTrigger : public CWaterDripEmitterTrigger
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void think(int _frames);
|
||||||
|
};
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Globals
|
||||||
|
------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Functions
|
||||||
|
--------- */
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================
|
||||||
|
end */
|
39
source/triggers/tldripemit.cpp
Normal file
39
source/triggers/tldripemit.cpp
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/*=========================================================================
|
||||||
|
|
||||||
|
tldripemit.cpp
|
||||||
|
|
||||||
|
Author: CRB
|
||||||
|
Created:
|
||||||
|
Project: Spongebob
|
||||||
|
Purpose:
|
||||||
|
|
||||||
|
Copyright (c) 2001 Climax Development Ltd
|
||||||
|
|
||||||
|
===========================================================================*/
|
||||||
|
|
||||||
|
#ifndef __TRIGGERS_TLDRIPEMIT_H__
|
||||||
|
#include "triggers\tldripemit.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GAME_GAME_H__
|
||||||
|
#include "game\game.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void CLavaDripEmitterTrigger::think(int _frames)
|
||||||
|
{
|
||||||
|
CTrigger::think( _frames );
|
||||||
|
|
||||||
|
if ( m_timer <= 0 )
|
||||||
|
{
|
||||||
|
CFX::Create( CFX::FX_TYPE_DROP_LAVA, Pos );
|
||||||
|
|
||||||
|
m_timer = GameState::getOneSecondInFrames();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_timer -= _frames;
|
||||||
|
}
|
||||||
|
}
|
61
source/triggers/tldripemit.h
Normal file
61
source/triggers/tldripemit.h
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
/*=========================================================================
|
||||||
|
|
||||||
|
tldripemit.h
|
||||||
|
|
||||||
|
Author: CRB
|
||||||
|
Created:
|
||||||
|
Project: Spongebob
|
||||||
|
Purpose:
|
||||||
|
|
||||||
|
Copyright (c) 2001 Climax Development Ltd
|
||||||
|
|
||||||
|
===========================================================================*/
|
||||||
|
|
||||||
|
#ifndef __TRIGGERS_TLDRIPEMIT_H__
|
||||||
|
#define __TRIGGERS_TLDRIPEMIT_H__
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Includes
|
||||||
|
-------- */
|
||||||
|
|
||||||
|
#ifndef __THING_THING_H__
|
||||||
|
#include "thing/thing.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __TRIGGERS_TWDRIPEMIT_H__
|
||||||
|
#include "triggers\twdripemit.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "fx\fx.h"
|
||||||
|
|
||||||
|
/* Std Lib
|
||||||
|
------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Tyepdefs && Defines
|
||||||
|
------------------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Structure defintions
|
||||||
|
-------------------- */
|
||||||
|
|
||||||
|
class CLavaDripEmitterTrigger : public CWaterDripEmitterTrigger
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void think(int _frames);
|
||||||
|
};
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Globals
|
||||||
|
------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Functions
|
||||||
|
--------- */
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================
|
||||||
|
end */
|
39
source/triggers/todripemit.cpp
Normal file
39
source/triggers/todripemit.cpp
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/*=========================================================================
|
||||||
|
|
||||||
|
todripemit.cpp
|
||||||
|
|
||||||
|
Author: CRB
|
||||||
|
Created:
|
||||||
|
Project: Spongebob
|
||||||
|
Purpose:
|
||||||
|
|
||||||
|
Copyright (c) 2001 Climax Development Ltd
|
||||||
|
|
||||||
|
===========================================================================*/
|
||||||
|
|
||||||
|
#ifndef __TRIGGERS_TODRIPEMIT_H__
|
||||||
|
#include "triggers\todripemit.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GAME_GAME_H__
|
||||||
|
#include "game\game.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void COilDripEmitterTrigger::think(int _frames)
|
||||||
|
{
|
||||||
|
CTrigger::think( _frames );
|
||||||
|
|
||||||
|
if ( m_timer <= 0 )
|
||||||
|
{
|
||||||
|
CFX::Create( CFX::FX_TYPE_DROP_OIL, Pos );
|
||||||
|
|
||||||
|
m_timer = GameState::getOneSecondInFrames();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_timer -= _frames;
|
||||||
|
}
|
||||||
|
}
|
61
source/triggers/todripemit.h
Normal file
61
source/triggers/todripemit.h
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
/*=========================================================================
|
||||||
|
|
||||||
|
todripemit.h
|
||||||
|
|
||||||
|
Author: CRB
|
||||||
|
Created:
|
||||||
|
Project: Spongebob
|
||||||
|
Purpose:
|
||||||
|
|
||||||
|
Copyright (c) 2001 Climax Development Ltd
|
||||||
|
|
||||||
|
===========================================================================*/
|
||||||
|
|
||||||
|
#ifndef __TRIGGERS_TODRIPEMIT_H__
|
||||||
|
#define __TRIGGERS_TODRIPEMIT_H__
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Includes
|
||||||
|
-------- */
|
||||||
|
|
||||||
|
#ifndef __THING_THING_H__
|
||||||
|
#include "thing/thing.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __TRIGGERS_TWDRIPEMIT_H__
|
||||||
|
#include "triggers\twdripemit.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "fx\fx.h"
|
||||||
|
|
||||||
|
/* Std Lib
|
||||||
|
------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Tyepdefs && Defines
|
||||||
|
------------------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Structure defintions
|
||||||
|
-------------------- */
|
||||||
|
|
||||||
|
class COilDripEmitterTrigger : public CWaterDripEmitterTrigger
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void think(int _frames);
|
||||||
|
};
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Globals
|
||||||
|
------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Functions
|
||||||
|
--------- */
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================
|
||||||
|
end */
|
48
source/triggers/twdripemit.cpp
Normal file
48
source/triggers/twdripemit.cpp
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
/*=========================================================================
|
||||||
|
|
||||||
|
twdripemit.cpp
|
||||||
|
|
||||||
|
Author: CRB
|
||||||
|
Created:
|
||||||
|
Project: Spongebob
|
||||||
|
Purpose:
|
||||||
|
|
||||||
|
Copyright (c) 2001 Climax Development Ltd
|
||||||
|
|
||||||
|
===========================================================================*/
|
||||||
|
|
||||||
|
#ifndef __TRIGGERS_TWDRIPEMIT_H__
|
||||||
|
#include "triggers\twdripemit.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GAME_GAME_H__
|
||||||
|
#include "game\game.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void CWaterDripEmitterTrigger::think(int _frames)
|
||||||
|
{
|
||||||
|
CTrigger::think( _frames );
|
||||||
|
|
||||||
|
if ( m_timer <= 0 )
|
||||||
|
{
|
||||||
|
CFX::Create( CFX::FX_TYPE_DROP_WATER, Pos );
|
||||||
|
|
||||||
|
m_timer = GameState::getOneSecondInFrames() >> 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_timer -= _frames;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void CWaterDripEmitterTrigger::setPositionAndSize(int _x,int _y,int _w,int _h)
|
||||||
|
{
|
||||||
|
CTrigger::setPositionAndSize( _x, _y, _w, _h );
|
||||||
|
|
||||||
|
m_timer = 0;
|
||||||
|
}
|
64
source/triggers/twdripemit.h
Normal file
64
source/triggers/twdripemit.h
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
/*=========================================================================
|
||||||
|
|
||||||
|
twdripemit.h
|
||||||
|
|
||||||
|
Author: CRB
|
||||||
|
Created:
|
||||||
|
Project: Spongebob
|
||||||
|
Purpose:
|
||||||
|
|
||||||
|
Copyright (c) 2001 Climax Development Ltd
|
||||||
|
|
||||||
|
===========================================================================*/
|
||||||
|
|
||||||
|
#ifndef __TRIGGERS_TWDRIPEMIT_H__
|
||||||
|
#define __TRIGGERS_TWDRIPEMIT_H__
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Includes
|
||||||
|
-------- */
|
||||||
|
|
||||||
|
#ifndef __THING_THING_H__
|
||||||
|
#include "thing/thing.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __TRIGGER_TRIGGER_HEADER__
|
||||||
|
#include "triggers\trigger.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "fx\fx.h"
|
||||||
|
|
||||||
|
/* Std Lib
|
||||||
|
------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Tyepdefs && Defines
|
||||||
|
------------------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Structure defintions
|
||||||
|
-------------------- */
|
||||||
|
|
||||||
|
class CWaterDripEmitterTrigger : public CTrigger
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void think(int _frames);
|
||||||
|
virtual void setPositionAndSize(int _x,int _y,int _w,int _h);
|
||||||
|
protected:
|
||||||
|
s32 m_timer;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Globals
|
||||||
|
------- */
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------
|
||||||
|
Functions
|
||||||
|
--------- */
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================
|
||||||
|
end */
|
Loading…
Add table
Add a link
Reference in a new issue