5751a16173198a2ae43ec26ebb6d3c57470fa344
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>
40 #include <SDL_keyboard.h>
98 };
107 dword n;
118 pbuf++;
119 }
121 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")) {
122 next:
154 #ifdef DEMO
156 #else
158 #endif
162 }
164 }
165 }
166 }
169 {
176 }
177 }
179 }
184 dword n;
199 }
200 }
201 }
206 }
240 {
244 }
254 }
255 }
256 }
257 }
262 }
264 }
265 }
267 }
270 /*
271 char s[140],str[140];
272 char *p;
273 FILE *h,*oh;
275 remove("CONFIG.ZZZ");
276 if(rename(cfg_file,"CONFIG.ZZZ")) return;
277 if(!(h=fopen("CONFIG.ZZZ","rt")))
278 {rename("CONFIG.ZZZ",cfg_file);return;}
279 if(!(oh=fopen(cfg_file,"wt")))
280 {fclose(h);rename("CONFIG.ZZZ",cfg_file);return;}
281 for(;;) {
282 if(!fgets(s,128,h)) break;
283 strcpy(str,s);
284 if(!(p=strtok(str,"\r\n\t =;"))) {fprintf(oh,"%s",s);continue;}
285 if(strcasecmp(p,"sound_volume")==0)
286 sprintf(s,"sound_volume=%d\n",snd_vol);
287 else if(strcasecmp(p,"music_volume")==0)
288 sprintf(s,"music_volume=%d\n",mus_vol);
289 else if(strcasecmp(p,"gamma")==0)
290 sprintf(s,"gamma=%d\n",gammaa);
291 else if(strcasecmp(p,"sound_interp")==0)
292 sprintf(s,"sound_interp=%s\n",s_interp?"on":"off");
293 fprintf(oh,"%s",s);
294 }
295 fclose(oh);fclose(h);
296 remove("CONFIG.ZZZ");
297 */
298 }