Added Machine Gun Blob. Load Cells and Hearts.
This commit is contained in:
parent
9bda46bb9b
commit
14b503eff2
|
@ -42,7 +42,7 @@ OBJS += i18n.o init.o infoPoint.o input.o io.o item.o items.o itemPad.o
|
||||||
OBJS += cJSON.o
|
OBJS += cJSON.o
|
||||||
OBJS += key.o keycard.o
|
OBJS += key.o keycard.o
|
||||||
OBJS += laser.o laserTrap.o lift.o lookup.o
|
OBJS += laser.o laserTrap.o lift.o lookup.o
|
||||||
OBJS += main.o map.o maths.o mia.o missile.o
|
OBJS += machineGunBlob.o main.o map.o maths.o mia.o missile.o
|
||||||
OBJS += objectives.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 pistolBlob.o pistolDroid.o powerPoint.o powerPool.o pressurePlate.o pushBlock.o
|
||||||
OBJS += quadtree.o
|
OBJS += quadtree.o
|
||||||
|
|
|
@ -37,6 +37,7 @@ void initEntityFactory(void)
|
||||||
addEntityDef("PistolEyeDroid", initPistolDroid);
|
addEntityDef("PistolEyeDroid", initPistolDroid);
|
||||||
addEntityDef("GenericEvilBlob", initGenericEvilBlob);
|
addEntityDef("GenericEvilBlob", initGenericEvilBlob);
|
||||||
addEntityDef("GenericEyeDroid", initGenericEyeDroid);
|
addEntityDef("GenericEyeDroid", initGenericEyeDroid);
|
||||||
|
addEntityDef("MachineGunBlob", initMachineGunBlob);
|
||||||
|
|
||||||
addEntityDef("Bob", initBob);
|
addEntityDef("Bob", initBob);
|
||||||
addEntityDef("MIA", initMIA);
|
addEntityDef("MIA", initMIA);
|
||||||
|
@ -45,6 +46,10 @@ void initEntityFactory(void)
|
||||||
addEntityDef("BronzeKey", initBronzeKey);
|
addEntityDef("BronzeKey", initBronzeKey);
|
||||||
addEntityDef("SilverKey", initSilverKey);
|
addEntityDef("SilverKey", initSilverKey);
|
||||||
addEntityDef("GoldKey", initGoldKey);
|
addEntityDef("GoldKey", initGoldKey);
|
||||||
|
addEntityDef("GreenKeycard", initGreenKeycard);
|
||||||
|
|
||||||
|
addEntityDef("Cell", initCell);
|
||||||
|
addEntityDef("Heart", initHeart);
|
||||||
|
|
||||||
addEntityDef("Exit", initExit);
|
addEntityDef("Exit", initExit);
|
||||||
addEntityDef("PowerPool", initPowerPool);
|
addEntityDef("PowerPool", initPowerPool);
|
||||||
|
|
|
@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
|
|
||||||
extern Entity *initAquaBlob(void);
|
extern Entity *initAquaBlob(void);
|
||||||
|
extern Entity *initMachineGunBlob(void);
|
||||||
extern Entity *initPistolBlob(void);
|
extern Entity *initPistolBlob(void);
|
||||||
extern Entity *initPistolDroid(void);
|
extern Entity *initPistolDroid(void);
|
||||||
extern Entity *initBob(void);
|
extern Entity *initBob(void);
|
||||||
|
@ -42,5 +43,8 @@ extern Entity *initItem(void);
|
||||||
extern Entity *initBronzeKey(void);
|
extern Entity *initBronzeKey(void);
|
||||||
extern Entity *initSilverKey(void);
|
extern Entity *initSilverKey(void);
|
||||||
extern Entity *initGoldKey(void);
|
extern Entity *initGoldKey(void);
|
||||||
|
extern Entity *initCell(void);
|
||||||
|
extern Entity *initHeart(void);
|
||||||
|
extern Entity *initGreenKeycard(void);
|
||||||
|
|
||||||
extern World world;
|
extern World world;
|
||||||
|
|
|
@ -22,10 +22,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
static int canFire(Entity *target);
|
static int canFire(Entity *target);
|
||||||
|
|
||||||
void initMachineGunBlob(Unit *u)
|
Entity *initMachineGunBlob(void)
|
||||||
{
|
{
|
||||||
|
Unit *u;
|
||||||
|
|
||||||
|
u = createUnit();
|
||||||
|
|
||||||
initEvilBlob(u);
|
initEvilBlob(u);
|
||||||
|
|
||||||
|
u->unitType = "MachineGunBlob";
|
||||||
|
|
||||||
u->sprite[FACING_LEFT] = getSprite("MachineGunBlobLeft");
|
u->sprite[FACING_LEFT] = getSprite("MachineGunBlobLeft");
|
||||||
u->sprite[FACING_RIGHT] = getSprite("MachineGunBlobRight");
|
u->sprite[FACING_RIGHT] = getSprite("MachineGunBlobRight");
|
||||||
u->sprite[FACING_DIE] = getSprite("MachineGunBlobSpin");
|
u->sprite[FACING_DIE] = getSprite("MachineGunBlobSpin");
|
||||||
|
@ -35,6 +41,8 @@ void initMachineGunBlob(Unit *u)
|
||||||
u->maxShotsToFire = 5;
|
u->maxShotsToFire = 5;
|
||||||
|
|
||||||
u->canFire = canFire;
|
u->canFire = canFire;
|
||||||
|
|
||||||
|
return (Entity*)u;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int canFire(Entity *target)
|
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;
|
|
@ -26,7 +26,7 @@ void initAtlasTest(void)
|
||||||
|
|
||||||
initHub();
|
initHub();
|
||||||
|
|
||||||
loadWorld("data/maps/beachApproach.json");
|
loadWorld("data/maps/beachFront1.json");
|
||||||
|
|
||||||
initWorld();
|
initWorld();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue