1 /* Copyright (C) 1996-1997 Aleksey Volynskov
2 * Copyright (C) 2011 Rambo
3 * Copyright (C) 2020 SovietPony
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, version 3 of the License ONLY.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
19 #include <stdio.h>
20 #include <stdlib.h>
21 #include <string.h>
34 //unsigned char fx_scr1[64000],fx_scr2[64000];
36 #define SINP 256
37 #define SINPM (SINP-1)
38 #define W (SINP/100)
42 };
49 }
55 }
57 /*
58 void FX_trans1 (int t) {
59 int x,y,u,v;
60 static unsigned char k;
61 unsigned p;
63 setamp(t);
64 k=t;
65 t*=W;
66 for(y=0,p=0;y<200;++y)
67 for(x=0;x<320;++x,++p) {
68 if(dmap[(y&31)*32+(x&31)]>=k) {
69 u=x+((isin(y+t))>>16);
70 v=y+((isin(u+t))>>16);
71 if(u<0 || u>=320 || v<0 || v>=200) scra[p]=0;
72 else scra[p]=fx_scr1[v*320+u];
73 }else scra[p]=fx_scr2[p];
74 }
75 }
76 */
88 }
91 }
92 }
93 }
99 }
107 }
111 byte b;
128 }
129 }
138 }
146 }
154 }
165 }
166 }