Added Teeka, LaserBlob, LaserDroid, PlasmaBlob, PlasmaDroid, SpreadGunBlob, and SpreadGunDroid.
This commit is contained in:
parent
0197bcd5fa
commit
bab333d492
|
@ -41,12 +41,12 @@ _OBJS += heart.o horizontalDoor.o horizontalLaserTrap.o hub.o hud.o
|
|||
_OBJS += i18n.o init.o infoPoint.o input.o io.o item.o items.o itemPad.o
|
||||
_OBJS += cJSON.o
|
||||
_OBJS += key.o keycard.o
|
||||
_OBJS += laser.o laserTrap.o lift.o lookup.o
|
||||
_OBJS += laser.o laserBlob.o laserDroid.o laserTrap.o lift.o lookup.o
|
||||
_OBJS += machineGunBlob.o machineGunDroid.o main.o map.o maths.o mia.o missile.o
|
||||
_OBJS += objectives.o
|
||||
_OBJS += particles.o player.o pistolBlob.o pistolDroid.o powerPoint.o powerPool.o pressurePlate.o pushBlock.o
|
||||
_OBJS += particles.o player.o plasmaBlob.o plasmaDroid.o pistolBlob.o pistolDroid.o powerPoint.o powerPool.o pressurePlate.o pushBlock.o
|
||||
_OBJS += quadtree.o
|
||||
_OBJS += shotgunBlob.o shotgunDroid.o sound.o sprites.o structures.o
|
||||
_OBJS += shotgunBlob.o shotgunDroid.o sound.o spreadGunBlob.o spreadGunDroid.o sprites.o structures.o
|
||||
_OBJS += tankCommander.o tankTrack.o teeka.o teleporter.o text.o textures.o title.o triggers.o
|
||||
_OBJS += unit.o util.o
|
||||
_OBJS += weapons.o weaponPickup.o widgets.o world.o worldLoader.o
|
||||
|
|
|
@ -30,7 +30,7 @@ static Entity *target;
|
|||
static Sprite *aimedSprite;
|
||||
static int exitMission;
|
||||
|
||||
void initTeeka(void)
|
||||
Entity *initTeeka(void)
|
||||
{
|
||||
Unit *u;
|
||||
|
||||
|
@ -55,6 +55,8 @@ void initTeeka(void)
|
|||
u->tick = tick;
|
||||
|
||||
aimedSprite = getSprite("AimedShot");
|
||||
|
||||
return (Entity*)u;
|
||||
}
|
||||
|
||||
static void tick(void)
|
||||
|
|
|
@ -43,9 +43,16 @@ void initEntityFactory(void)
|
|||
addEntityDef("GrenadeEyeDroid", initGrenadeDroid);
|
||||
addEntityDef("ShotgunBlob", initShotgunBlob);
|
||||
addEntityDef("ShotgunEyeDroid", initShotgunDroid);
|
||||
addEntityDef("LaserBlob", initLaserBlob);
|
||||
addEntityDef("LaserEyeDroid", initLaserDroid);
|
||||
addEntityDef("SpreadGunBlob", initSpreadGunBlob);
|
||||
addEntityDef("SpreadGunEyeDroid", initSpreadGunDroid);
|
||||
addEntityDef("PlasmaEyeDroid", initPlasmaDroid);
|
||||
addEntityDef("PlasmaBlob", initPlasmaBlob);
|
||||
|
||||
addEntityDef("Bob", initBob);
|
||||
addEntityDef("MIA", initMIA);
|
||||
addEntityDef("Teeka", initTeeka);
|
||||
|
||||
addEntityDef("Item", initItem);
|
||||
addEntityDef("BronzeKey", initBronzeKey);
|
||||
|
@ -55,6 +62,7 @@ void initEntityFactory(void)
|
|||
addEntityDef("BlueKeycard", initBlueKeycard);
|
||||
addEntityDef("RedKeycard", initRedKeycard);
|
||||
addEntityDef("YellowKeycard", initYellowKeycard);
|
||||
addEntityDef("WhiteKeycard", initWhiteKeycard);
|
||||
|
||||
addEntityDef("Cell", initCell);
|
||||
addEntityDef("Heart", initHeart);
|
||||
|
|
|
@ -54,8 +54,16 @@ extern Entity *initCardReader(void);
|
|||
extern Entity *initBlueKeycard(void);
|
||||
extern Entity *initRedKeycard(void);
|
||||
extern Entity *initYellowKeycard(void);
|
||||
extern Entity *initWhiteKeycard(void);
|
||||
extern Entity *initLaserTrap(void);
|
||||
extern Entity *initHorizontalLaserTrap(void);
|
||||
extern Entity *initMachineGunDroid(void);
|
||||
extern Entity *initLaserDroid(void);
|
||||
extern Entity *initLaserBlob(void);
|
||||
extern Entity *initSpreadGunBlob(void);
|
||||
extern Entity *initSpreadGunDroid(void);
|
||||
extern Entity *initPlasmaDroid(void);
|
||||
extern Entity *initPlasmaBlob(void);
|
||||
extern Entity *initTeeka(void);
|
||||
|
||||
extern World world;
|
||||
|
|
|
@ -22,9 +22,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
static int canFire(Entity *target);
|
||||
|
||||
void initLaserBlob(Unit *u)
|
||||
Entity *initLaserBlob(void)
|
||||
{
|
||||
Unit *u;
|
||||
|
||||
u = createUnit();
|
||||
|
||||
initEvilBlob(u);
|
||||
|
||||
u->unitType = "LaserBlob";
|
||||
|
||||
u->sprite[FACING_LEFT] = getSprite("LaserBlobLeft");
|
||||
u->sprite[FACING_RIGHT] = getSprite("LaserBlobRight");
|
||||
|
@ -35,6 +41,8 @@ void initLaserBlob(Unit *u)
|
|||
u->maxShotsToFire = 1;
|
||||
|
||||
u->canFire = canFire;
|
||||
|
||||
return (Entity*)u;
|
||||
}
|
||||
|
||||
static int canFire(Entity *target)
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
Copyright (C) 2018 Parallel Realities
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include "../../common.h"
|
||||
|
||||
extern Unit *createUnit(void);
|
||||
extern void initEvilBlob(Unit *u);
|
||||
extern Sprite *getSprite(char *name);
|
||||
|
||||
extern Entity *self;
|
|
@ -22,10 +22,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
static int canFire(Entity *target);
|
||||
|
||||
void initPlasmaBlob(Unit *u)
|
||||
Entity *initPlasmaBlob(void)
|
||||
{
|
||||
Unit *u;
|
||||
|
||||
u = createUnit();
|
||||
|
||||
initEvilBlob(u);
|
||||
|
||||
u->unitType = "PlasmaBlob";
|
||||
|
||||
u->sprite[FACING_LEFT] = getSprite("PlasmaBlobLeft");
|
||||
u->sprite[FACING_RIGHT] = getSprite("PlasmaBlobRight");
|
||||
u->sprite[FACING_DIE] = getSprite("PlasmaBlobSpin");
|
||||
|
@ -35,6 +41,8 @@ void initPlasmaBlob(Unit *u)
|
|||
u->maxShotsToFire = 6;
|
||||
|
||||
u->canFire = canFire;
|
||||
|
||||
return (Entity*)u;
|
||||
}
|
||||
|
||||
static int canFire(Entity *target)
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
Copyright (C) 2018 Parallel Realities
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include "../../common.h"
|
||||
|
||||
extern Unit *createUnit(void);
|
||||
extern void initEvilBlob(Unit *u);
|
||||
extern Sprite *getSprite(char *name);
|
||||
|
||||
extern Entity *self;
|
|
@ -22,9 +22,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
static int canFire(Entity *target);
|
||||
|
||||
void initSpreadGunBlob(Unit *u)
|
||||
Entity *initSpreadGunBlob(void)
|
||||
{
|
||||
Unit *u;
|
||||
|
||||
u = createUnit();
|
||||
|
||||
initEvilBlob(u);
|
||||
|
||||
u->unitType = "SpreadGunBlob";
|
||||
|
||||
u->sprite[FACING_LEFT] = getSprite("SpreadGunBlobLeft");
|
||||
u->sprite[FACING_RIGHT] = getSprite("SpreadGunBlobRight");
|
||||
|
@ -35,9 +41,11 @@ void initSpreadGunBlob(Unit *u)
|
|||
u->maxShotsToFire = 3;
|
||||
|
||||
u->canFire = canFire;
|
||||
|
||||
return (Entity*)u;
|
||||
}
|
||||
|
||||
static int canFire(Entity *target)
|
||||
{
|
||||
return abs(target->y - u->y) <= MAP_TILE_SIZE * 5;
|
||||
return abs(target->y - self->y) <= MAP_TILE_SIZE * 5;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
Copyright (C) 2018 Parallel Realities
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include "../../common.h"
|
||||
|
||||
extern Unit *createUnit(void);
|
||||
extern void initEvilBlob(Unit *u);
|
||||
extern Sprite *getSprite(char *name);
|
||||
|
||||
extern Entity *self;
|
|
@ -22,9 +22,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
static int canFire(Entity *target);
|
||||
|
||||
void initLaserDroid(Unit *u)
|
||||
Entity *initLaserDroid(void)
|
||||
{
|
||||
Unit *u;
|
||||
|
||||
u = createUnit();
|
||||
|
||||
initEyeDroid(u);
|
||||
|
||||
u->unitType = "LaserEyeDroid";
|
||||
|
||||
u->sprite[FACING_LEFT] = getSprite("LaserDroidLeft");
|
||||
u->sprite[FACING_RIGHT] = getSprite("LaserDroidRight");
|
||||
|
@ -35,6 +41,8 @@ void initLaserDroid(Unit *u)
|
|||
u->maxShotsToFire = 1;
|
||||
|
||||
u->canFire = canFire;
|
||||
|
||||
return (Entity*)u;
|
||||
}
|
||||
|
||||
static int canFire(Entity *target)
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
Copyright (C) 2018 Parallel Realities
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include "../../common.h"
|
||||
|
||||
extern Unit *createUnit(void);
|
||||
extern void initEyeDroid(Unit *u);
|
||||
extern Sprite *getSprite(char *name);
|
||||
|
||||
extern Entity *self;
|
|
@ -22,9 +22,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
static int canFire(Entity *target);
|
||||
|
||||
void initPlasmaDroid(Unit *u)
|
||||
Entity *initPlasmaDroid(void)
|
||||
{
|
||||
Unit *u;
|
||||
|
||||
u = createUnit();
|
||||
|
||||
initEyeDroid(u);
|
||||
|
||||
u->unitType = "PlasmaEyeDroid";
|
||||
|
||||
u->sprite[FACING_LEFT] = getSprite("PlasmaDroidLeft");
|
||||
u->sprite[FACING_RIGHT] = getSprite("PlasmaDroidRight");
|
||||
|
@ -35,6 +41,8 @@ void initPlasmaDroid(Unit *u)
|
|||
u->maxShotsToFire = 6;
|
||||
|
||||
u->canFire = canFire;
|
||||
|
||||
return (Entity*)u;
|
||||
}
|
||||
|
||||
static int canFire(Entity *target)
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
Copyright (C) 2018 Parallel Realities
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include "../../common.h"
|
||||
|
||||
extern Unit *createUnit(void);
|
||||
extern void initEyeDroid(Unit *u);
|
||||
extern Sprite *getSprite(char *name);
|
||||
|
||||
extern Entity *self;
|
|
@ -22,9 +22,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
static int canFire(Entity *target);
|
||||
|
||||
void initSpreadGunDroid(Unit *u)
|
||||
Entity *initSpreadGunDroid(void)
|
||||
{
|
||||
Unit *u;
|
||||
|
||||
u = createUnit();
|
||||
|
||||
initEyeDroid(u);
|
||||
|
||||
u->unitType = "SpreadGunEyeDroid";
|
||||
|
||||
u->sprite[FACING_LEFT] = getSprite("SpreadGunDroidLeft");
|
||||
u->sprite[FACING_RIGHT] = getSprite("SpreadGunDroidRight");
|
||||
|
@ -35,6 +41,8 @@ void initSpreadGunDroid(Unit *u)
|
|||
u->maxShotsToFire = 3;
|
||||
|
||||
u->canFire = canFire;
|
||||
|
||||
return (Entity*)u;
|
||||
}
|
||||
|
||||
static int canFire(Entity *target)
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
Copyright (C) 2018 Parallel Realities
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include "../../common.h"
|
||||
|
||||
extern Unit *createUnit(void);
|
||||
extern void initEyeDroid(Unit *u);
|
||||
extern Sprite *getSprite(char *name);
|
||||
|
||||
extern Entity *self;
|
Loading…
Reference in New Issue