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>
61 // {"fullscr","fullscreen",&fullscreen,SW_ON,0},
62 // {"window",NULL,&fullscreen,SW_OFF,0},
65 // {"gamma","gamma",&gammaa,DWORD,0},
92 };
96 dword n;
107 pbuf++;
108 }
110 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")) {
111 next:
143 #ifdef DEMO
145 #else
147 #endif
151 }
153 }
154 }
155 }
160 dword n;
175 }
176 }
177 }
182 }
215 }
219 }
225 {
235 }
236 }
237 }
248 }
251 /*
252 char s[140],str[140];
253 char *p;
254 FILE *h,*oh;
256 remove("CONFIG.ZZZ");
257 if(rename(cfg_file,"CONFIG.ZZZ")) return;
258 if(!(h=fopen("CONFIG.ZZZ","rt")))
259 {rename("CONFIG.ZZZ",cfg_file);return;}
260 if(!(oh=fopen(cfg_file,"wt")))
261 {fclose(h);rename("CONFIG.ZZZ",cfg_file);return;}
262 for(;;) {
263 if(!fgets(s,128,h)) break;
264 strcpy(str,s);
265 if(!(p=strtok(str,"\r\n\t =;"))) {fprintf(oh,"%s",s);continue;}
266 if(strcasecmp(p,"sound_volume")==0)
267 sprintf(s,"sound_volume=%d\n",snd_vol);
268 else if(strcasecmp(p,"music_volume")==0)
269 sprintf(s,"music_volume=%d\n",mus_vol);
270 else if(strcasecmp(p,"gamma")==0)
271 sprintf(s,"gamma=%d\n",gammaa);
272 else if(strcasecmp(p,"sound_interp")==0)
273 sprintf(s,"sound_interp=%s\n",s_interp?"on":"off");
274 fprintf(oh,"%s",s);
275 }
276 fclose(oh);fclose(h);
277 remove("CONFIG.ZZZ");
278 */
279 }