You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
371 B
15 lines
371 B
#include <events.h>
|
|
#include <structs.h>
|
|
#include <world.h>
|
|
void addItem(char *name, int yPos, int xPos){
|
|
if(!strcmp(name,"Pistol Magazine")){
|
|
struct Item pistolMag = {.name="Pistol Magazine", .symbol='=', .isAlive=1, .curXpos=xPos, .curYpos=yPos};
|
|
int i;
|
|
for (i=0;i<MAX_ITEMS;i++){
|
|
if(!allItems[i].isAlive){
|
|
allItems[i]=pistolMag;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|