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>
36 #include <SDL_keyboard.h>
94 };
103 dword n;
114 pbuf++;
115 }
117 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")) {
118 next:
150 #ifdef DEMO
152 #else
154 #endif
158 }
160 }
161 }
162 }
165 {
172 }
173 }
175 }
180 dword n;
195 }
196 }
197 }
202 }
235 }
239 }
245 {
258 }
259 }
260 }
261 }
272 }
275 /*
276 char s[140],str[140];
277 char *p;
278 FILE *h,*oh;
280 remove("CONFIG.ZZZ");
281 if(rename(cfg_file,"CONFIG.ZZZ")) return;
282 if(!(h=fopen("CONFIG.ZZZ","rt")))
283 {rename("CONFIG.ZZZ",cfg_file);return;}
284 if(!(oh=fopen(cfg_file,"wt")))
285 {fclose(h);rename("CONFIG.ZZZ",cfg_file);return;}
286 for(;;) {
287 if(!fgets(s,128,h)) break;
288 strcpy(str,s);
289 if(!(p=strtok(str,"\r\n\t =;"))) {fprintf(oh,"%s",s);continue;}
290 if(strcasecmp(p,"sound_volume")==0)
291 sprintf(s,"sound_volume=%d\n",snd_vol);
292 else if(strcasecmp(p,"music_volume")==0)
293 sprintf(s,"music_volume=%d\n",mus_vol);
294 else if(strcasecmp(p,"gamma")==0)
295 sprintf(s,"gamma=%d\n",gammaa);
296 else if(strcasecmp(p,"sound_interp")==0)
297 sprintf(s,"sound_interp=%s\n",s_interp?"on":"off");
298 fprintf(oh,"%s",s);
299 }
300 fclose(oh);fclose(h);
301 remove("CONFIG.ZZZ");
302 */
303 }