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 <SDL_keyboard.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 }
164 }
165 }
167 }
172 dword n;
187 }
188 }
189 }
194 }
227 }
231 }
237 {
250 }
251 }
252 }
253 }
264 }
267 /*
268 char s[140],str[140];
269 char *p;
270 FILE *h,*oh;
272 remove("CONFIG.ZZZ");
273 if(rename(cfg_file,"CONFIG.ZZZ")) return;
274 if(!(h=fopen("CONFIG.ZZZ","rt")))
275 {rename("CONFIG.ZZZ",cfg_file);return;}
276 if(!(oh=fopen(cfg_file,"wt")))
277 {fclose(h);rename("CONFIG.ZZZ",cfg_file);return;}
278 for(;;) {
279 if(!fgets(s,128,h)) break;
280 strcpy(str,s);
281 if(!(p=strtok(str,"\r\n\t =;"))) {fprintf(oh,"%s",s);continue;}
282 if(strcasecmp(p,"sound_volume")==0)
283 sprintf(s,"sound_volume=%d\n",snd_vol);
284 else if(strcasecmp(p,"music_volume")==0)
285 sprintf(s,"music_volume=%d\n",mus_vol);
286 else if(strcasecmp(p,"gamma")==0)
287 sprintf(s,"gamma=%d\n",gammaa);
288 else if(strcasecmp(p,"sound_interp")==0)
289 sprintf(s,"sound_interp=%s\n",s_interp?"on":"off");
290 fprintf(oh,"%s",s);
291 }
292 fclose(oh);fclose(h);
293 remove("CONFIG.ZZZ");
294 */
295 }