diff --git a/src/fx.c b/src/fx.c
index 35777aca9371d9abf7ba57965722bcc8181e046b..01e58a4e68fee1d7771776416636458be7294cd3 100644 (file)
--- a/src/fx.c
+++ b/src/fx.c
-/*
- 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 <http://www.gnu.org/licenses/> 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 <http://www.gnu.org/licenses/>.
+ */
#include "glob.h"
#include <stdio.h>
#include "view.h"
#include "fx.h"
#include "misc.h"
-#include "my.h"
enum{NONE,TFOG,IFOG,BUBL};
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)
for(i=0;i<SINP;++i) sintab[i]=stdsin[i]*a;
}
-void FX_trans1(int t) {
/*
+void FX_trans1 (int t) {
int x,y,u,v;
static unsigned char k;
unsigned p;
else scra[p]=fx_scr1[v*320+u];
}else scra[p]=fx_scr2[p];
}
-*/
}
+*/
static void init_fx1sin(void) {
int j,r,l,rr;
}
}
-void FX_savegame (FILE *h) {
- int i, n;
- for (i = n = 0; i < MAXFX; ++i) {
- if (fx[i].t) {
- ++n;
- }
- }
- myfwrite32(n, h);
- for (i = 0; i < MAXFX; ++i) {
- if (fx[i].t) {
- myfwrite32(fx[i].x, h);
- myfwrite32(fx[i].y, h);
- myfwrite32(fx[i].xv, h);
- myfwrite32(fx[i].yv, h);
- myfwrite8(fx[i].t, h);
- myfwrite8(fx[i].s, h);
- }
- }
-}
-
-void FX_loadgame (FILE *h) {
- int i, n;
- n = myfread32(h);
- for (i = 0; i < n; i++) {
- fx[i].x = myfread32(h);
- fx[i].y = myfread32(h);
- fx[i].xv = myfread32(h);
- fx[i].yv = myfread32(h);
- fx[i].t = myfread8(h);
- fx[i].s = myfread8(h);
- }
-}
-
-void FX_alloc(void) {
+void FX_alloc (void) {
bsnd[0]=Z_getsnd("BUBL1");
bsnd[1]=Z_getsnd("BUBL2");
init_fx1sin();
}
-void FX_init(void) {
+void FX_init (void) {
int i;
for(i=0;i<MAXFX;++i) fx[i].t=0;
last=0;
}
-void FX_act(void) {
+void FX_act (void) {
int i;
byte b;
}
}
-static int findfree(void) {
+static int findfree (void) {
int i;
for(i=0;i<MAXFX;++i) if(!fx[i].t) return i;
return last;
}
-void FX_tfog(int x,int y) {
+void FX_tfog (int x, int y) {
int i;
i=findfree();
fx[i].x=x;fx[i].y=y;
}
-void FX_ifog(int x,int y) {
+void FX_ifog (int x, int y) {
int i;
i=findfree();
fx[i].x=x;fx[i].y=y;
}
-void FX_bubble(int x,int y,int xv,int yv,int n) {
+void FX_bubble (int x, int y, int xv, int yv, int n) {
int i;
if(!bubsn) {Z_sound(bsnd[rand()&1],128);bubsn=1;}
fx[i].xv=xv;fx[i].yv=yv-myrand(256)-768;
}
}
-