Skip to content

Commit

Permalink
2008-08-28 Krzysztof Kosciuszkiewicz <[email protected]>
Browse files Browse the repository at this point in the history
	* V220
	* future.c, mis_c.c: change logging from DEBUG to TRACE
	* gametada.h: improve documentation layout
	* fs.c: cleanup paths, warn when changing file access mode
	* Doxygen.quick, Doxyfile.extended: cleanup
	* README, AUTHORS: minor editing
  • Loading branch information
drvee committed Aug 28, 2008
1 parent ce59901 commit ac3bdeb
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 137 deletions.
4 changes: 2 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
* \section original Original game
* The original game was computer version of the Liftoff! board game by
* Fritz Bronner. It was developed by Fritz and Michael McCarty at
* Strategic Visions and published by Interplay in as a disk based game in
* Strategic Visions and published by Interplay as a disk based game in
* 1992 and a CD-ROM in 1994.
*
* \section The open-source version
* People who have contributed to the open-source version:
*
* \li Michael K McCarty <[email protected]>
* \li Pace Willisson <[email protected]>
* \li Krzysztof Kosciuszkiewicz <[email protected]>
* \li Krzysztof Kosciuszkiewicz <[email protected]>
* \li Will Glynn <[email protected]>
*
*/
14 changes: 14 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
2008-08-28 Krzysztof Kosciuszkiewicz <[email protected]>

* V220

* future.c, mis_c.c: change logging from DEBUG to TRACE

* gametada.h: improve documentation layout

* fs.c: cleanup paths, warn when changing file access mode

* Doxygen.quick, Doxyfile.extended: cleanup

* README, AUTHORS: minor editing

2008-08-27 Krzysztof Kosciuszkiewicz <[email protected]>

* V219
Expand Down
39 changes: 0 additions & 39 deletions Doxyfile.extended
Original file line number Diff line number Diff line change
Expand Up @@ -84,46 +84,7 @@ WARN_LOGFILE =
#---------------------------------------------------------------------------
INPUT = ./
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.d \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.idl \
*.odl \
*.cs \
*.php \
*.php3 \
*.inc \
*.m \
*.mm \
*.dox \
*.py \
*.C \
*.CC \
*.C++ \
*.II \
*.I++ \
*.H \
*.HH \
*.H++ \
*.CS \
*.PHP \
*.PHP3 \
*.M \
*.MM \
*.PY \
DEVELOPER \
AUTHORS \
QUESTIONS \
Expand Down
39 changes: 0 additions & 39 deletions Doxyfile.quick
Original file line number Diff line number Diff line change
Expand Up @@ -84,46 +84,7 @@ WARN_LOGFILE =
#---------------------------------------------------------------------------
INPUT = ./
FILE_PATTERNS = *.c \
*.cc \
*.cxx \
*.cpp \
*.c++ \
*.d \
*.java \
*.ii \
*.ixx \
*.ipp \
*.i++ \
*.inl \
*.h \
*.hh \
*.hxx \
*.hpp \
*.h++ \
*.idl \
*.odl \
*.cs \
*.php \
*.php3 \
*.inc \
*.m \
*.mm \
*.dox \
*.py \
*.C \
*.CC \
*.C++ \
*.II \
*.I++ \
*.H \
*.HH \
*.H++ \
*.CS \
*.PHP \
*.PHP3 \
*.M \
*.MM \
*.PY \
DEVELOPER \
AUTHORS \
QUESTIONS \
Expand Down
6 changes: 5 additions & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
/**
\mainpage Race into Space

Race into Space is the free software version of Interplay's Buzz Aldrin's Race into Space. This is the reworked version following the source release for the computer version of the Liftoff! board game by Fritz Bronner. This was developed by Strategic Visions and published by Interplay in as a disk based game in 1992 and a cd-rom in 1994.
Race into Space is the free software version of Interplay's Buzz
Aldrin's Race into Space. This is the reworked version following the
source release for the computer version of the Liftoff! board game by
Fritz Bronner. This was developed by Strategic Visions and published by
Interplay as a disk-based game in 1992 and a cd-rom in 1994.

\page readme README

Expand Down
36 changes: 24 additions & 12 deletions fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ s_open_helper(const char *base, const char *name, const char *mode, ...)
if (len2 > len)
cooked = xrealloc(cooked, (len = len2));

sprintf(cooked, "%s/%s/%s", base, p, name);
if (strlen(p))
sprintf(cooked, "%s/%s/%s", base, p, name);
else
sprintf(cooked, "%s/%s", base, name);

fix_pathsep(cooked);

fh = try_fopen(cooked, mode);
Expand Down Expand Up @@ -201,34 +205,42 @@ try_find_file(const char *name, const char *mode, int type)
char *gd = options.dir_gamedata;
char *sd = options.dir_savegame;
char *where = "";
const char *newmode = mode;

DEBUG2("looking for file `%s'", name);

/** \note allows write access only to savegame files */
if (type != FT_SAVE)
{
if (strchr(mode, 'b'))
mode = "rb";
else
mode = "r";
if (strchr(mode, 'w')
|| strchr(mode, 'a')
|| strncmp(mode, "r+", 2) == 0)
{
char *newmode;
if (strchr(mode, 'b'))
newmode = "rb";
else
newmode = "r";
DEBUG3("access mode changed from `%s' to `%s'", mode, newmode);
}
}

switch (type)
{
case FT_DATA:
f = s_open_helper(gd, name, mode,
f = s_open_helper(gd, name, newmode,
"gamedata",
NULL);
where = "game data";
break;
case FT_SAVE:
f = s_open_helper(sd, name, mode,
".",
f = s_open_helper(sd, name, newmode,
"",
NULL);
where = "savegame";
break;
case FT_AUDIO:
f = s_open_helper(gd, name, mode,
f = s_open_helper(gd, name, newmode,
"audio/mission",
"audio/music",
"audio/news",
Expand All @@ -237,21 +249,21 @@ try_find_file(const char *name, const char *mode, int type)
where = "audio";
break;
case FT_VIDEO:
f = s_open_helper(gd, name, mode,
f = s_open_helper(gd, name, newmode,
"video/mission",
"video/news",
"video/training",
NULL);
where = "video";
break;
case FT_IMAGE:
f = s_open_helper(gd, name, mode,
f = s_open_helper(gd, name, newmode,
"images",
NULL);
where = "image";
break;
case FT_MIDI:
f = s_open_helper(gd, name, mode,
f = s_open_helper(gd, name, newmode,
"audio/midi",
"midi",
"audio/music",
Expand Down
26 changes: 13 additions & 13 deletions future.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void DrawFuture(char plr,int mis,char pad)
}

i=Data->Year;j=Data->Season;
DEBUG3("--- Setting i=Year (%d), j=Season (%d)", i, j);
TRACE3("--- Setting i=Year (%d), j=Season (%d)", i, j);
if ((i==60 && j==0) || (i==62 && j==0) || (i==64 && j==0) ||
(i==66 && j==0) || (i==69 && j==1) || (i==71 && j==1) ||
(i==73 && j==1)) {
Expand Down Expand Up @@ -244,7 +244,7 @@ void DrawLocks(void)
*/
void Toggle(int wh,int i)
{
DEBUG3("->Toggle(wh %d, i %d)", wh, i);
TRACE3("->Toggle(wh %d, i %d)", wh, i);
switch(wh)
{
case 1:if (i==1) gxVirtualDisplay(&vh,1,21,55,49,89,81,0);else
Expand All @@ -264,13 +264,13 @@ void Toggle(int wh,int i)

default:break;
}
DEBUG1("<-Toggle()");
TRACE1("<-Toggle()");
return;
}

void TogBox(int x,int y,int st)
{
DEBUG4("->TogBox(x %d, y %d, st %d)", x, y, st);
TRACE4("->TogBox(x %d, y %d, st %d)", x, y, st);
char sta[2][2]={{2,4},{4,2}};

grSetColor(sta[st][0]);
Expand All @@ -279,13 +279,13 @@ void TogBox(int x,int y,int st)
grMoveTo(x+0,y+33);grLineTo(23+x,y+33);grLineTo(23+x,y+23);
grLineTo(x+35,y+23);grLineTo(x+35,y+0);

DEBUG1("<-TogBox()");
TRACE1("<-TogBox()");
return;
}

void PianoKey(int X)
{
DEBUG2("->PianoKey(X %d)", X);
TRACE2("->PianoKey(X %d)", X);
int t;
if (F1==0) {
if (V[X].A==1) {Toggle(1,1);status[1]=1;}
Expand Down Expand Up @@ -315,7 +315,7 @@ void PianoKey(int X)
}

DrawLocks();
DEBUG1("<-PianoKey()");
TRACE1("<-PianoKey()");
return;
}

Expand Down Expand Up @@ -461,7 +461,7 @@ void
Future(char plr)
{
/** \todo the whole Future()-function is 500 >lines and unreadable */
DEBUG1("->Future(plr)");
TRACE1("->Future(plr)");
int MisNum = 0, DuraType = 0, MaxDur = 6, i, ii;
int setting = -1, prev_setting = -1;
int Ok, NewType;
Expand Down Expand Up @@ -984,7 +984,7 @@ Future(char plr)

};
} // while
DEBUG1("<-Future()");
TRACE1("<-Future()");
}

/** draws the bubble on the screen,
Expand Down Expand Up @@ -1035,7 +1035,7 @@ void DurPri(int x)

void MissionName(int val,int xx,int yy,int len)
{
DEBUG5("->MissionName(val %d, xx %d, yy %d, len %d)", val, xx, yy, len);
TRACE5("->MissionName(val %d, xx %d, yy %d, len %d)", val, xx, yy, len);
int i,j=0;

GetMisType(val);
Expand All @@ -1046,7 +1046,7 @@ void MissionName(int val,int xx,int yy,int len)
else DispChr(Mis.Name[i]);
j++;if (Mis.Name[i]=='\0') break;
};
DEBUG1("<-MissionName");
TRACE1("<-MissionName");
return;
}

Expand All @@ -1060,7 +1060,7 @@ void MissionName(int val,int xx,int yy,int len)
*/
void Missions(char plr,int X,int Y,int val,char bub)
{
DEBUG5("->Missions(plr, X %d, Y %d, val %d, bub %c)", X, Y, val, bub);
TRACE5("->Missions(plr, X %d, Y %d, val %d, bub %c)", X, Y, val, bub);

if (bub==1 || bub==3) {
PianoKey(val);
Expand Down Expand Up @@ -1265,7 +1265,7 @@ void Missions(char plr,int X,int Y,int val,char bub)
} // end switch
gr_sync ();
MissionCodes(plr,MisType,Pad);
DEBUG1("<-Missions()");
TRACE1("<-Missions()");
} // end function missions

#ifdef DEAD_CODE
Expand Down
Loading

0 comments on commit ac3bdeb

Please sign in to comment.