X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Ffx.c;h=d3ffdb474fa9d3202e1366882d39937b4d5d893e;hb=ef16dea09f87b15fc6d58fae0aa0832e0648c00e;hp=2b81fd652610230a8331ca015dc1e86be90ccc92;hpb=c46b82f5794be555af272740e67ead316b9b1f90;p=flatwaifu.git diff --git a/src/fx.c b/src/fx.c index 2b81fd6..d3ffdb4 100644 --- a/src/fx.c +++ b/src/fx.c @@ -1,29 +1,24 @@ -/* - Copyright (C) Prikol Software 1996-1997 - Copyright (C) Aleksey Volynskov 1996-1997 - - This file is part of the Doom2D:Rembo project. - - Doom2D:Rembo is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License version 2 as - published by the Free Software Foundation. - - Doom2D:Rembo is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see or - write to the Free Software Foundation, Inc., - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ +/* Copyright (C) 1996-1997 Aleksey Volynskov + * Copyright (C) 2011 Rambo + * Copyright (C) 2020 SovietPony + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 3 of the License ONLY. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include "glob.h" #include #include #include -#include "vga.h" #include "view.h" #include "fx.h" #include "misc.h" @@ -31,20 +26,13 @@ enum{NONE,TFOG,IFOG,BUBL}; -#pragma pack(1) -typedef struct{ - int x,y,xv,yv; - char t,s; -}fx_t; -#pragma pack() +fx_t fx[MAXFX]; -static void *spr[15],*bsnd[2]; -static char sprd[15]; -static fx_t fx[MAXFX]; +static void *bsnd[2]; static char bubsn; static int last; -unsigned char fx_scr1[64000],fx_scr2[64000]; +//unsigned char fx_scr1[64000],fx_scr2[64000]; #define SINP 256 #define SINPM (SINP-1) @@ -67,8 +55,8 @@ static void setamp(int a) { for(i=0;i>8)-w_x+WD/2,(fx[i].y>>8)-w_y+HT/2+1+w_o,0xC0+fx[i].s);//V_dot((fx[i].x>>8)-w_x+100,(fx[i].y>>8)-w_y+50+w_o,0xC0+fx[i].s); - continue; - } - if(s>=0) Z_drawspr(fx[i].x,fx[i].y,spr[s],sprd[s]); - } -} - -static int findfree(void) { +static int findfree (void) { int i; for(i=0;i