This commit is contained in:
Daveo 2001-06-14 15:28:07 +00:00
parent e13115c14c
commit f75c8ac5eb
2 changed files with 258 additions and 0 deletions

187
source/game/healthman.cpp Normal file
View File

@ -0,0 +1,187 @@
/*=========================================================================
gamebubs.cpp
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
/*----------------------------------------------------------------------
Includes
-------- */
#include "game\gamebubs.h"
/* Std Lib
------- */
/* Data
---- */
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
/*----------------------------------------------------------------------
Function Prototypes
------------------- */
/*----------------------------------------------------------------------
Vars
---- */
BubicleEmitterData CGameBubicleFactory::s_emitters[CGameBubicleFactory::NUM_TYPES]=
{
// TYPE_SMALL
{
0,0,0,0, // m_x,m_y,m_w,m_h
2,3, // m_birthRate,m_birthAmount
5, // m_life
true, // m_applyMapOffsets
{ // m_bubicleBase
10, // m_life
0,0,0, // m_vx,m_vdx,m_vxmax
-100,0,0, // m_vy,m_vdy,m_vymax
5,3, // m_w,m_h
0, // m_dvSizeChange
0,0, // m_theta,m_vtheta
0,0,0, // m_wobbleWidth,m_vwobbleWidth,m_vdwobbleWidth
0, // m_ot
{200,200,200} // m_colour
},
{ // m_bubicleRange
50, // m_life
0,0,0, // m_vx,m_vdx,m_vxmax
50,0,0, // m_vy,m_vdy,m_vymax
3,3, // m_w,m_h
0, // m_dvSizeChange
0,100, // m_theta,m_vtheta
10,0,0, // m_wobbleWidth,m_vwobbleWidth,m_vdwobbleWidth
0, // m_ot
{0,0,0} // m_colour
}
},
// TYPE_MEDIUM
{
0,0,0,0, // m_x,m_y,m_w,m_h
2,10, // m_birthRate,m_birthAmount
5, // m_life
true, // m_applyMapOffsets
{ // m_bubicleBase
10, // m_life
0,0,0, // m_vx,m_vdx,m_vxmax
-100,0,0, // m_vy,m_vdy,m_vymax
5,3, // m_w,m_h
0, // m_dvSizeChange
0,0, // m_theta,m_vtheta
0,0,0, // m_wobbleWidth,m_vwobbleWidth,m_vdwobbleWidth
0, // m_ot
{200,200,200} // m_colour
},
{ // m_bubicleRange
50, // m_life
0,0,0, // m_vx,m_vdx,m_vxmax
50,0,0, // m_vy,m_vdy,m_vymax
3,3, // m_w,m_h
0, // m_dvSizeChange
0,100, // m_theta,m_vtheta
10,0,0, // m_wobbleWidth,m_vwobbleWidth,m_vdwobbleWidth
0, // m_ot
{0,0,0} // m_colour
}
},
// TYPE_LARGE
{
0,0,0,0, // m_x,m_y,m_w,m_h
1,10, // m_birthRate,m_birthAmount
15, // m_life
true, // m_applyMapOffsets
{ // m_bubicleBase
10, // m_life
0,0,0, // m_vx,m_vdx,m_vxmax
-100,0,0, // m_vy,m_vdy,m_vymax
5,3, // m_w,m_h
0, // m_dvSizeChange
0,0, // m_theta,m_vtheta
0,0,0, // m_wobbleWidth,m_vwobbleWidth,m_vdwobbleWidth
0, // m_ot
{200,200,200} // m_colour
},
{ // m_bubicleRange
50, // m_life
0,0,0, // m_vx,m_vdx,m_vxmax
50,0,0, // m_vy,m_vdy,m_vymax
3,3, // m_w,m_h
0, // m_dvSizeChange
0,100, // m_theta,m_vtheta
10,0,0, // m_wobbleWidth,m_vwobbleWidth,m_vdwobbleWidth
0, // m_ot
{0,0,0} // m_colour
}
},
// TYPE_SPONGEBOBSOAKUP
{
0,0,0,0, // m_x,m_y,m_w,m_h
1,1, // m_birthRate,m_birthAmount
15, // m_life
true, // m_applyMapOffsets
{ // m_bubicleBase
10, // m_life
0,0,0, // m_vx,m_vdx,m_vxmax
-100,0,0, // m_vy,m_vdy,m_vymax
10,7, // m_w,m_h
0, // m_dvSizeChange
0,0, // m_theta,m_vtheta
0,0,0, // m_wobbleWidth,m_vwobbleWidth,m_vdwobbleWidth
0, // m_ot
{200,200,200} // m_colour
},
{ // m_bubicleRange
50, // m_life
0,0,0, // m_vx,m_vdx,m_vxmax
50,0,0, // m_vy,m_vdy,m_vymax
3,3, // m_w,m_h
0, // m_dvSizeChange
0,100, // m_theta,m_vtheta
10,0,0, // m_wobbleWidth,m_vwobbleWidth,m_vdwobbleWidth
0, // m_ot
{0,0,0} // m_colour
}
},
};
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CGameBubicleFactory::spawnBubicles(int _x,int _y,int _w,int _h,GAMEBUBICLETYPE _type)
{
BubicleEmitterData *emt;
emt=&s_emitters[_type];
emt->m_x=_x;
emt->m_y=_y;
emt->m_w=_w;
emt->m_h=_h;
CBubicleFactory::spawnEmitter(emt);
}
/*===========================================================================
end */

71
source/game/healthman.h Normal file
View File

@ -0,0 +1,71 @@
/*=========================================================================
gamebubs.h
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
#ifndef __GAME_GAMEBUBS_H__
#define __GAME_GAMEBUBS_H__
/*----------------------------------------------------------------------
Includes
-------- */
#ifndef __GFX_BUBICLES_H__
#include "gfx\bubicles.h"
#endif
/* Std Lib
------- */
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
class CGameBubicleFactory
{
public:
typedef enum
{
TYPE_SMALL,
TYPE_MEDIUM,
TYPE_LARGE,
TYPE_SPONGEBOBSOAKUP,
NUM_TYPES
}GAMEBUBICLETYPE;
static void spawnBubicles(int _x,int _y,int _w,int _h,GAMEBUBICLETYPE _type);
private:
static struct BubicleEmitterData s_emitters[NUM_TYPES];
};
/*----------------------------------------------------------------------
Globals
------- */
/*----------------------------------------------------------------------
Functions
--------- */
/*---------------------------------------------------------------------- */
#endif /* __GAME_GAMEBUBS_H__ */
/*===========================================================================
end */