4989e29f153e251f6d6e757b84f5ac67a6c46c33
1 /*
2 Copyright (C) Prikol Software 1996-1997
3 Copyright (C) Aleksey Volynskov 1996-1997
4 Copyright (C) <ARembo@gmail.com> 2011
6 This file is part of the Doom2D:Rembo project.
8 Doom2D:Rembo is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License version 2 as
10 published by the Free Software Foundation.
12 Doom2D:Rembo is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, see <http://www.gnu.org/licenses/> or
19 write to the Free Software Foundation, Inc.,
20 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 */
24 #include <stdio.h>
25 #include <stdlib.h>
26 #include <string.h>
27 //#include <process.h>
28 //#include <dos.h>
39 #include <SDL_keyboard.h>
97 };
106 dword n;
117 pbuf++;
118 }
120 for(s=strtok(buf," \r\n\t");s;s=strtok(NULL," \r\n\t")) {//for(s=strtok(getcmd(buf)," \r\n\t");s;s=strtok(NULL," \r\n\t")) {
121 next:
153 #ifdef DEMO
155 #else
157 #endif
161 }
163 }
164 }
165 }
168 {
175 }
176 }
178 }
183 dword n;
190 }
224 {
228 }
238 }
239 }
240 }
241 }
246 }
248 }
249 }
251 }
254 /*
255 char s[140],str[140];
256 char *p;
257 FILE *h,*oh;
259 remove("CONFIG.ZZZ");
260 if(rename(cfg_file,"CONFIG.ZZZ")) return;
261 if(!(h=fopen("CONFIG.ZZZ","rt")))
262 {rename("CONFIG.ZZZ",cfg_file);return;}
263 if(!(oh=fopen(cfg_file,"wt")))
264 {fclose(h);rename("CONFIG.ZZZ",cfg_file);return;}
265 for(;;) {
266 if(!fgets(s,128,h)) break;
267 strcpy(str,s);
268 if(!(p=strtok(str,"\r\n\t =;"))) {fprintf(oh,"%s",s);continue;}
269 if(strcasecmp(p,"sound_volume")==0)
270 sprintf(s,"sound_volume=%d\n",snd_vol);
271 else if(strcasecmp(p,"music_volume")==0)
272 sprintf(s,"music_volume=%d\n",mus_vol);
273 else if(strcasecmp(p,"gamma")==0)
274 sprintf(s,"gamma=%d\n",gammaa);
275 else if(strcasecmp(p,"sound_interp")==0)
276 sprintf(s,"sound_interp=%s\n",s_interp?"on":"off");
277 fprintf(oh,"%s",s);
278 }
279 fclose(oh);fclose(h);
280 remove("CONFIG.ZZZ");
281 */
282 }