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>
35 //unsigned char fx_scr1[64000],fx_scr2[64000];
37 #define SINP 256
38 #define SINPM (SINP-1)
39 #define W (SINP/100)
43 };
50 }
56 }
58 /*
59 void FX_trans1 (int t) {
60 int x,y,u,v;
61 static unsigned char k;
62 unsigned p;
64 setamp(t);
65 k=t;
66 t*=W;
67 for(y=0,p=0;y<200;++y)
68 for(x=0;x<320;++x,++p) {
69 if(dmap[(y&31)*32+(x&31)]>=k) {
70 u=x+((isin(y+t))>>16);
71 v=y+((isin(u+t))>>16);
72 if(u<0 || u>=320 || v<0 || v>=200) scra[p]=0;
73 else scra[p]=fx_scr1[v*320+u];
74 }else scra[p]=fx_scr2[p];
75 }
76 }
77 */
89 }
92 }
93 }
94 }
100 }
108 }
112 byte b;
129 }
130 }
139 }
147 }
155 }
166 }
167 }