diff --git a/source/game/healthman.cpp b/source/game/healthman.cpp new file mode 100644 index 000000000..830ddcbfb --- /dev/null +++ b/source/game/healthman.cpp @@ -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 */ diff --git a/source/game/healthman.h b/source/game/healthman.h new file mode 100644 index 000000000..35e9e2d03 --- /dev/null +++ b/source/game/healthman.h @@ -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 */