X-Git-Url: http://deadsoftware.ru/gitweb?p=flatwaifu.git;a=blobdiff_plain;f=src%2Fitems.h;h=bf3bb8a1f6c5e6df034701a6bd68ad5d47c023e4;hp=37eace4393b149553f75db38286a3373c38a73c4;hb=2bb81ea2565c3627c954b5c37326db89b0048472;hpb=3d2215798aaab87db7ae5265d21e359864e1f1c2 diff --git a/src/items.h b/src/items.h index 37eace4..bf3bb8a 100644 --- a/src/items.h +++ b/src/items.h @@ -19,42 +19,39 @@ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -// Items +#ifndef ITEMS_H_INCLUDED +#define ITEMS_H_INCLUDED -#include +#include "view.h" // obj_t +#include // FILE #define MAXITEM 300 -enum{I_NONE,I_CLIP,I_SHEL,I_ROCKET,I_CELL,I_AMMO,I_SBOX,I_RBOX,I_CELP, - I_STIM,I_MEDI,I_BPACK,I_CSAW,I_SGUN,I_SGUN2,I_MGUN,I_LAUN,I_PLAS,I_BFG, - I_ARM1,I_ARM2,I_MEGA,I_INVL,I_AQUA,I_KEYR,I_KEYG,I_KEYB,I_SUIT,I_SUPER, - I_RTORCH,I_GTORCH,I_BTORCH,I_GOR1,I_FCAN,I_GUN2 +enum { + I_NONE, I_CLIP, I_SHEL, I_ROCKET, I_CELL, I_AMMO, I_SBOX, I_RBOX, I_CELP, + I_STIM, I_MEDI, I_BPACK, I_CSAW, I_SGUN, I_SGUN2, I_MGUN, I_LAUN, I_PLAS, I_BFG, + I_ARM1, I_ARM2, I_MEGA, I_INVL, I_AQUA, I_KEYR, I_KEYG, I_KEYB, I_SUIT, I_SUPER, + I_RTORCH, I_GTORCH, I_BTORCH, I_GOR1, I_FCAN, I_GUN2 }; #pragma pack(1) -typedef struct{ +typedef struct { obj_t o; int t; int s; -}item_t; +} item_t; #pragma pack() extern item_t it[MAXITEM]; +extern int itm_rtime; -void IT_init(void); -void IT_alloc(void); -int IT_load(FILE*); -void IT_act(void); -void IT_spawn(int x,int y,int i); -void IT_drop_ammo(int i,int n,int x,int y); +void IT_savegame (FILE *h); +void IT_loadgame (FILE *h); +void IT_alloc (void); +void IT_init (void); +int IT_load (FILE *h); +void IT_act (void); +void IT_spawn (int x, int y, int t); +void IT_drop_ammo (int t, int n, int x, int y); -#pragma pack(1) -typedef struct{ - short x; - short y; - short t; - word f; -}thing_t; -#pragma pack() - -extern int itm_rtime; +#endif /* ITEMS_H_INCLUDED */