X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fsmoke.c;h=6ccb15a11511c6ad9297cd09d67cdd821ce3e927;hb=584adc9c1911a6941ef07443a6fc6ff922d7c8ea;hp=577e402b58c794f8356eca0871e44d22b9d1ad0a;hpb=a2115940e7643dcb1b87286f3d19fe95f7b79bd3;p=flatwaifu.git diff --git a/src/smoke.c b/src/smoke.c index 577e402..6ccb15a 100644 --- a/src/smoke.c +++ b/src/smoke.c @@ -22,54 +22,55 @@ #include "glob.h" #include -#include "files.h" -#include "memory.h" -#include "vga.h" -#include "error.h" -#include "sound.h" #include "view.h" #include "smoke.h" #include "fx.h" #include "misc.h" +#include "my.h" #define MAXSR 20 -#define SMSN 10 -#define FLSN 8 +smoke_t sm[MAXSMOK]; -#pragma pack(1) -typedef struct{ - int x,y,xv,yv; - byte t,s; - short o; -}smoke_t; -#pragma pack() - -static smoke_t sm[MAXSMOK]; static int sr_r,sxr[MAXSR],syr[MAXSR]; static int lsm; -static void *spr[SMSN],*fspr[FLSN]; static void *burnsnd; static int burntm=0; -byte flametab[16]={ -0xBC,0xBA,0xB8,0xB6,0xB4,0xB2,0xB0,0xD5,0xD6,0xD7,0xA1,0xA0,0xE3,0xE2,0xE1,0xE0 -}; - -void SMK_savegame(FILE* h) { - int i,n; - - for(i=n=0;i=(SMSN-1)*3) s=0; else s=SMSN-1-s/3; - V_sprf((sm[i].x>>8)-w_x+WD/2,(sm[i].y>>8)-w_y+HT/2+1+w_o,spr[s],&smoke_sprf);//V_sprf((sm[i].x>>8)-w_x+100,(sm[i].y>>8)-w_y+50+w_o,spr[s],&smoke_sprf); - break; - case 1: - if((s=sm[i].t)>=(FLSN-1)) s=0; else s=FLSN-1-s; - V_sprf((sm[i].x>>8)-w_x+WD/2,(sm[i].y>>8)-w_y+HT/2+1+w_o,fspr[s],&flame_sprf);//V_sprf((sm[i].x>>8)-w_x+100,(sm[i].y>>8)-w_y+50+w_o,fspr[s],&flame_sprf); - break; - } -} - void SMK_add(int x,int y,int xv,int yv,byte t,byte s,short o) { int i;