2001-04-03 23:00:00 +02:00
|
|
|
/*=========================================================================
|
|
|
|
|
|
|
|
pmjelly.h
|
|
|
|
|
|
|
|
Author: PKG
|
|
|
|
Created:
|
|
|
|
Project: Spongebob
|
|
|
|
Purpose:
|
|
|
|
|
|
|
|
Copyright (c) 2001 Climax Development Ltd
|
|
|
|
|
|
|
|
===========================================================================*/
|
|
|
|
|
|
|
|
#ifndef __PLAYER_PMJELLY_H__
|
|
|
|
#define __PLAYER_PMJELLY_H__
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Includes
|
|
|
|
-------- */
|
|
|
|
|
|
|
|
#ifndef __PLAYER_PMODES_H__
|
|
|
|
#include "player\pmodes.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/* Std Lib
|
|
|
|
------- */
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Tyepdefs && Defines
|
|
|
|
------------------- */
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Structure defintions
|
|
|
|
-------------------- */
|
|
|
|
|
2001-04-03 23:36:35 +02:00
|
|
|
class CPlayerModeJellyLauncher : public CPlayerModeBase
|
2001-04-03 23:00:00 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void enter();
|
|
|
|
virtual void think();
|
|
|
|
virtual void renderModeUi();
|
2001-07-10 21:56:51 +02:00
|
|
|
virtual int canConverse() {return m_firingState==FIRING_STATE__NONE;}
|
2001-04-03 23:00:00 +02:00
|
|
|
|
2001-07-17 17:19:20 +02:00
|
|
|
virtual void setAnimNo(int _animNo);
|
|
|
|
virtual void setAnimFrame(int _animFrame);
|
2001-04-03 23:00:00 +02:00
|
|
|
|
|
|
|
private:
|
2001-04-08 20:57:16 +02:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
TIMEOUT_FOR_BIG_SHOT=60*4,
|
|
|
|
AMMO_AMOUNT_FOR_BIG_SHOT=3,
|
2001-07-17 17:19:20 +02:00
|
|
|
|
2001-08-13 23:14:10 +02:00
|
|
|
POWER_UP_SHOT_ANGLE=128,
|
|
|
|
|
2001-07-17 17:19:20 +02:00
|
|
|
// Gun in the UI flashes when powered up..
|
|
|
|
FLASHSPEED=25,
|
|
|
|
FLASHSCALE=75,
|
2001-04-08 20:57:16 +02:00
|
|
|
};
|
|
|
|
|
2001-04-03 23:00:00 +02:00
|
|
|
typedef enum
|
|
|
|
{
|
2001-04-08 20:57:16 +02:00
|
|
|
FIRING_STATE__NONE,
|
|
|
|
FIRING_STATE__POWERINGUP,
|
|
|
|
FIRING_STATE__FIRING,
|
2001-07-17 17:19:20 +02:00
|
|
|
FIRING_STATE__RECOILING,
|
2001-04-08 20:57:16 +02:00
|
|
|
}FIRING_STATE;
|
2001-04-03 23:00:00 +02:00
|
|
|
|
2001-04-08 20:57:16 +02:00
|
|
|
int canFireFromThisState();
|
2001-04-03 23:00:00 +02:00
|
|
|
|
2001-04-10 21:04:20 +02:00
|
|
|
void launchProjectile();
|
|
|
|
|
|
|
|
|
2001-04-08 20:57:16 +02:00
|
|
|
int m_firingFrame;
|
|
|
|
FIRING_STATE m_firingState;
|
|
|
|
int m_firingTime;
|
2001-07-17 17:19:20 +02:00
|
|
|
int m_colourFlash;
|
|
|
|
int m_savedAnimNo,m_savedAnimFrame;
|
2001-04-03 23:00:00 +02:00
|
|
|
|
2001-06-25 22:25:28 +02:00
|
|
|
protected:
|
|
|
|
virtual class CPlayerState **getStateTable();
|
|
|
|
|
2001-04-03 23:00:00 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Globals
|
|
|
|
------- */
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
|
|
Functions
|
|
|
|
--------- */
|
|
|
|
|
|
|
|
/*---------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
#endif /* __PLAYER_PMJELLY_H__ */
|
|
|
|
|
|
|
|
/*===========================================================================
|
|
|
|
end */
|
|
|
|
|
|
|
|
|
|
|
|
|