Remove weaponsSystem.h and added Events

main
Jerry Aldrich 11 years ago
parent bec35897c7
commit 676bf86e38
  1. 5
      events.c
  2. 6
      events.h
  3. 2
      gameLoop.c
  4. 3
      initializeWorld.c
  5. 1
      structs.h
  6. 9
      weaponsSystem.h
  7. 3
      world.h

@ -0,0 +1,5 @@
#include <events.h>
void addItem(){
}

@ -0,0 +1,6 @@
#ifndef _EVENTS
#define _EVENTS
void addItem();
#endif

@ -1,6 +1,7 @@
#include <world.h>
#include <screen.h>
#include <collisionDetection.h>
#include <events.h>
void gameLoop(){
int lastPressed;
@ -9,6 +10,7 @@ void gameLoop(){
drawViewport();
moveProjectiles();
moveZombies();
addItem();
doupdate();
int ch;

@ -7,7 +7,8 @@
void initializeWorld() {
struct Entity player = {.type="player",.symbol='@', .curYpos=1, .curXpos=1, .nextYpos=1, .nextXpos=1 ,.isAlive=1};
struct Weapon pistol = {.name="Pistol", .range=3, .maxCapacity=12, .curCapacity=12, .symbols="-\\|/-\\|/"};
struct Item pistolMag = {.name="Pistol Magazine", .symbol='=', .isAlive=0 };
srand(time(NULL));
initscr();
curs_set(0);

@ -6,6 +6,7 @@ struct Weapon{
int range;
int maxCapacity;
int curCapacity;
int curMags;
char projectileSymbol;
char symbols[8];
};

@ -1,9 +0,0 @@
#ifndef _WEAPONS_SYSTEM
#define _WEAPONS_SYSTEM
#include <structs.h>
#define MAX_PROJECTILES 2
struct Projectile projectiles[MAX_PROJECTILES];
#endif

@ -8,8 +8,9 @@
struct Entity allEntities[MAX_ALIVE];
#define MAX_PROJECTILES 2
struct Projectile projectiles[MAX_PROJECTILES];
#define INITIAL_SPAWN_NUM 10
void initializeWorld();
#endif

Loading…
Cancel
Save