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;
198 }
199 }
200 }
205 }
239 {
243 }
253 }
254 }
255 }
256 }
261 }
263 }
264 }
266 }
269 /*
270 char s[140],str[140];
271 char *p;
272 FILE *h,*oh;
274 remove("CONFIG.ZZZ");
275 if(rename(cfg_file,"CONFIG.ZZZ")) return;
276 if(!(h=fopen("CONFIG.ZZZ","rt")))
277 {rename("CONFIG.ZZZ",cfg_file);return;}
278 if(!(oh=fopen(cfg_file,"wt")))
279 {fclose(h);rename("CONFIG.ZZZ",cfg_file);return;}
280 for(;;) {
281 if(!fgets(s,128,h)) break;
282 strcpy(str,s);
283 if(!(p=strtok(str,"\r\n\t =;"))) {fprintf(oh,"%s",s);continue;}
284 if(strcasecmp(p,"sound_volume")==0)
285 sprintf(s,"sound_volume=%d\n",snd_vol);
286 else if(strcasecmp(p,"music_volume")==0)
287 sprintf(s,"music_volume=%d\n",mus_vol);
288 else if(strcasecmp(p,"gamma")==0)
289 sprintf(s,"gamma=%d\n",gammaa);
290 else if(strcasecmp(p,"sound_interp")==0)
291 sprintf(s,"sound_interp=%s\n",s_interp?"on":"off");
292 fprintf(oh,"%s",s);
293 }
294 fclose(oh);fclose(h);
295 remove("CONFIG.ZZZ");
296 */
297 }