diff --git a/src/items.c b/src/items.c
index 8918203274c4155ec9123ccd700ead1c0176ad05..b0f079a715fef9fcd7bb9f2375bfa63d4cb5ccbe 100644 (file)
--- a/src/items.c
+++ b/src/items.c
#include "misc.h"
#include "map.h"
#include "my.h"
-
-extern map_block_t blk;
-
+#include "files.h"
+#include "game.h"
item_t it[MAXITEM];
static void *snd[4];
-static int tsndtm,rsndtm;
+static int tsndtm, rsndtm;
-int itm_rtime=1092;
+int itm_rtime = 1092;
void IT_savegame (FILE *h) {
int i, n;
}
}
-void IT_init(void) {
+void IT_init (void) {
int i;
-
- for(i=0;i<MAXITEM;++i) {
- it[i].t=I_NONE;
- it[i].o.xv=it[i].o.yv=it[i].o.vx=it[i].o.vy=0;
+ for (i = 0; i < MAXITEM; ++i) {
+ it[i].t = I_NONE;
+ it[i].o.xv = 0;
+ it[i].o.yv = 0;
+ it[i].o.vx = 0;
+ it[i].o.vy = 0;
}
- tsndtm=rsndtm=0;
+ tsndtm = 0;
+ rsndtm = 0;
}
int IT_load (FILE *h) {
return 0;
}
-static void takesnd(int t) {
+static void takesnd (int t) {
if(tsndtm) return;
t&=0x7FFF;
if(t<=I_CELP || (t>=I_BPACK && t<=I_BFG) || t==I_GUN2)
{tsndtm=Z_sound(snd[1],128);return;}
if(t==I_MEGA || t==I_INVL || t==I_SUPER)
{tsndtm=Z_sound(snd[2],192);return;}
- tsndtm=Z_sound(snd[0],256);
+ tsndtm=Z_sound(snd[0], 255);
}
-void IT_act(void) {
+void IT_act (void) {
int i,j;
if(tsndtm) --tsndtm;
}
}
-void IT_spawn(int x,int y,int t) {
+void IT_spawn (int x,int y,int t) {
int i;
for(i=0;i<MAXITEM;++i) if(!it[i].t) {
}
}
-void IT_drop_ammo(int t,int n,int x,int y) {
+void IT_drop_ammo (int t, int n, int x, int y) {
static int an[8]={10,4,1,40,50,25,5,100};
int a;