Added Machine Gun Blob. Load Cells and Hearts.

This commit is contained in:
Steve 2018-02-08 08:35:09 +00:00
parent 9bda46bb9b
commit 14b503eff2
6 changed files with 47 additions and 3 deletions

View File

@ -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 += key.o keycard.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 += particles.o player.o pistolBlob.o pistolDroid.o powerPoint.o powerPool.o pressurePlate.o pushBlock.o
OBJS += quadtree.o

View File

@ -37,6 +37,7 @@ void initEntityFactory(void)
addEntityDef("PistolEyeDroid", initPistolDroid);
addEntityDef("GenericEvilBlob", initGenericEvilBlob);
addEntityDef("GenericEyeDroid", initGenericEyeDroid);
addEntityDef("MachineGunBlob", initMachineGunBlob);
addEntityDef("Bob", initBob);
addEntityDef("MIA", initMIA);
@ -45,6 +46,10 @@ void initEntityFactory(void)
addEntityDef("BronzeKey", initBronzeKey);
addEntityDef("SilverKey", initSilverKey);
addEntityDef("GoldKey", initGoldKey);
addEntityDef("GreenKeycard", initGreenKeycard);
addEntityDef("Cell", initCell);
addEntityDef("Heart", initHeart);
addEntityDef("Exit", initExit);
addEntityDef("PowerPool", initPowerPool);

View File

@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../common.h"
extern Entity *initAquaBlob(void);
extern Entity *initMachineGunBlob(void);
extern Entity *initPistolBlob(void);
extern Entity *initPistolDroid(void);
extern Entity *initBob(void);
@ -42,5 +43,8 @@ extern Entity *initItem(void);
extern Entity *initBronzeKey(void);
extern Entity *initSilverKey(void);
extern Entity *initGoldKey(void);
extern Entity *initCell(void);
extern Entity *initHeart(void);
extern Entity *initGreenKeycard(void);
extern World world;

View File

@ -22,10 +22,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
static int canFire(Entity *target);
void initMachineGunBlob(Unit *u)
Entity *initMachineGunBlob(void)
{
Unit *u;
u = createUnit();
initEvilBlob(u);
u->unitType = "MachineGunBlob";
u->sprite[FACING_LEFT] = getSprite("MachineGunBlobLeft");
u->sprite[FACING_RIGHT] = getSprite("MachineGunBlobRight");
u->sprite[FACING_DIE] = getSprite("MachineGunBlobSpin");
@ -35,6 +41,8 @@ void initMachineGunBlob(Unit *u)
u->maxShotsToFire = 5;
u->canFire = canFire;
return (Entity*)u;
}
static int canFire(Entity *target)

View File

@ -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;

View File

@ -26,7 +26,7 @@ void initAtlasTest(void)
initHub();
loadWorld("data/maps/beachApproach.json");
loadWorld("data/maps/beachFront1.json");
initWorld();