Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 82564
Collapse All | Expand All

(-)configuration.cpp.orig (-3 / +8 lines)
Lines 18-25 Link Here
18
{
18
{
19
	int a,b,c;
19
	int a,b,c;
20
	FILE *fp;
20
	FILE *fp;
21
21
	char rcfile[256];
22
	fp=fopen("RoadFighter.cfg","r");
22
	
23
	snprintf(rcfile,255,"%s/.roadfighterrc",getenv("HOME"));
24
	
25
	fp=fopen(rcfile,"r");
23
	if (fp==0) {
26
	if (fp==0) {
24
		default_configuration();
27
		default_configuration();
25
		save_configuration();
28
		save_configuration();
Lines 58-65 Link Here
58
void CRoadFighter::save_configuration(void)
61
void CRoadFighter::save_configuration(void)
59
{
62
{
60
	FILE *fp;
63
	FILE *fp;
64
	char rcfile[256];
61
65
62
	fp=fopen("RoadFighter.cfg","w");
66
	snprintf(rcfile,255,"%s/.roadfighterrc",getenv("HOME"));
67
	fp=fopen(rcfile,"w");
63
	if (fp==0) return;
68
	if (fp==0) return;
64
	fprintf(fp,"%i %i %i\n",left_key,right_key,fire_key);
69
	fprintf(fp,"%i %i %i\n",left_key,right_key,fire_key);
65
	fprintf(fp,"%i %i %i\n",left2_key,right2_key,fire2_key);
70
	fprintf(fp,"%i %i %i\n",left2_key,right2_key,fire2_key);
(-)playing_state.cpp.orig (-2 / +6 lines)
Lines 27-40 Link Here
27
		Resume_playback();
27
		Resume_playback();
28
		if (record_replay) {
28
		if (record_replay) {
29
			unsigned int seed;
29
			unsigned int seed;
30
			replay_fp=fopen("replay.txt","w+");
30
			char replayfile[256];
31
			snprintf(replayfile,255,"%s/.roadfighterreplay",getenv("HOME"));
32
		       	replay_fp=fopen(replayfile,"w+");
31
			seed=(unsigned int)time(NULL);
33
			seed=(unsigned int)time(NULL);
32
			fprintf(replay_fp,"%u\n",seed);
34
			fprintf(replay_fp,"%u\n",seed);
33
			srand(seed);
35
			srand(seed);
34
		} else {
36
		} else {
35
			if (load_replay) {
37
			if (load_replay) {
36
				unsigned int seed;
38
				unsigned int seed;
37
				replay_fp=fopen("replay.txt","r+");
39
				char replayfile[256];
40
				snprintf(replayfile,255,"%s/.roadfighterreplay",getenv("HOME"));
41
				replay_fp=fopen(replayfile,"r+");
38
				fscanf(replay_fp,"%u",&seed);
42
				fscanf(replay_fp,"%u",&seed);
39
				srand(seed);
43
				srand(seed);
40
			} /* if */ 
44
			} /* if */ 
(-)loadmg2.cpp.orig (-1 / +1 lines)
Lines 26-32 Link Here
26
	TILE_SOURCE *source;
26
	TILE_SOURCE *source;
27
	char tmp[256];
27
	char tmp[256];
28
28
29
	fp=fopen(mapname,"r+");
29
	fp=fopen(mapname,"r");
30
	if (fp==0) return false;
30
	if (fp==0) return false;
31
31
32
	/* Load map: */ 
32
	/* Load map: */ 

Return to bug 82564