add race 0.5

OpenGL Racing Game
This commit is contained in:
Ying-Chieh Liao 2002-07-16 16:00:15 +00:00
parent 70bc85c4aa
commit a5ab53ad98
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=63089
12 changed files with 221 additions and 0 deletions

View file

@ -236,6 +236,7 @@
SUBDIR += qstat
SUBDIR += quakeforge
SUBDIR += quakeserver
SUBDIR += race
SUBDIR += robocode
SUBDIR += rocksndiamonds
SUBDIR += rollemup

39
games/race/Makefile Normal file
View file

@ -0,0 +1,39 @@
# ex:ts=8
# Ports collection makefile for: race
# Date created: Jul 16, 2002
# Whom: ijliao
#
# $FreeBSD$
#
PORTNAME= race
PORTVERSION= 0.5
CATEGORIES= games
MASTER_SITES= ftp://users.freebsd.org.uk/pub/foobar2k/
MAINTAINER= ports@FreeBSD.org
LIB_DEPENDS= SDL_mixer:${PORTSDIR}/audio/sdl_mixer \
SDL_image:${PORTSDIR}/graphics/sdl_image
USE_BZIP2= yes
USE_REINPLACE= yes
USE_MESA= yes
SDL_CONFIG?= ${LOCALBASE}/bin/sdl11-config
CFLAGS+= "-I${X11BASE}/include"
MAKE_ENV= CC="${CC} ${CFLAGS}" LDFLAGS="-L${X11BASE}/lib ${PTHREAD_LIBS}"
post-patch:
@${REINPLACE_CMD} -e "s|^CC|#CC|g" \
-e "s|sdl-config|${SDL_CONFIG}|g" ${WRKSRC}/Makefile
.for file in game.c main.c menu.c terrain.c textures.c
@${REINPLACE_CMD} -e "s|%%DATADIR%%|${DATADIR}|g" ${WRKSRC}/src/${file}
.endfor
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/race ${PREFIX}/bin
@${MKDIR} ${DATADIR}/data
${INSTALL_DATA} ${WRKSRC}/config ${DATADIR}
${CP} -R ${WRKSRC}/data/* ${DATADIR}/data
.include <bsd.port.mk>

1
games/race/distinfo Normal file
View file

@ -0,0 +1 @@
MD5 (race-0.5.tar.bz2) = 9f6efbe1b1a7969a9e8d718d691b4095

View file

@ -0,0 +1,11 @@
--- Makefile.orig Tue Jul 16 23:35:15 2002
+++ Makefile Tue Jul 16 23:38:31 2002
@@ -27,7 +27,7 @@
$(CC) main.o timing.o vector.o fifo.o ortho.o audio.o font.o \
init.o textures.o terrain.o menu.o game.o hud.o messages.o \
camera.o \
- -o $(BIN) -lGL -lGLU -lSDL_image -lSDL_mixer -lm `sdl-config --libs`
+ -o $(BIN) ${LDFLAGS} -lGL -lGLU -lSDL_image -lSDL_mixer -lm `sdl-config --libs`
@rm -f *.o

View file

@ -0,0 +1,11 @@
--- src/game.c.orig Tue Jul 16 23:47:16 2002
+++ src/game.c Tue Jul 16 23:48:22 2002
@@ -39,7 +39,7 @@
player.z = -1000;
debugf("Reset Player Variables");
- playmusic("data/music/fuck.xm");
+ playmusic("%%DATADIR%%/data/music/fuck.xm");
newgame = 0;
timestart = SDL_GetTicks();
printf("\nLoaded Map:\n %s (data/%s)\n %s\n\n",

View file

@ -0,0 +1,11 @@
--- src/main.c.orig Tue Jul 16 23:45:12 2002
+++ src/main.c Tue Jul 16 23:45:28 2002
@@ -75,7 +75,7 @@
printf("%s version %s\nCopyleft foobar and judeo (See COPYING for info)\n",TITLE,VERSION);
- loadconfig("config");
+ loadconfig("%%DATADIR%%/config");
if(!initsdl()) error("SDL Loading Failed");
else printf(" Loaded: SDL\n");

View file

@ -0,0 +1,59 @@
--- src/menu.c.orig Tue Jul 16 23:49:04 2002
+++ src/menu.c Tue Jul 16 23:49:31 2002
@@ -28,7 +28,7 @@
int initmenu(void){
- playmusic("data/music/lktheme.mod");
+ playmusic("%%DATADIR%%/data/music/lktheme.mod");
return 1;
}
@@ -114,13 +114,13 @@
loadc = COURSES-1;
else
loadc--;
- playsound("data/sounds/menu.wav",0);
+ playsound("%%DATADIR%%/data/sounds/menu.wav",0);
break;
case 2:
SDL_WM_ToggleFullScreen(surface);
fullscreen = 0;
- playsound("data/sounds/menu.wav",0);
+ playsound("%%DATADIR%%/data/sounds/menu.wav",0);
break;
default:
break;
@@ -133,12 +133,12 @@
loadc = 0;
else
loadc++;
- playsound("data/sounds/menu.wav",0);
+ playsound("%%DATADIR%%/data/sounds/menu.wav",0);
break;
case 2:
fullscreen = 0;
SDL_WM_ToggleFullScreen(surface);
- playsound("data/sounds/menu.wav",0);
+ playsound("%%DATADIR%%/data/sounds/menu.wav",0);
break;
default:
break;
@@ -149,14 +149,14 @@
menuitem = MENU_ITEMS-1;
else
menuitem--;
- playsound("data/sounds/menu.wav",0);
+ playsound("%%DATADIR%%/data/sounds/menu.wav",0);
break;
case SDLK_DOWN:
if(menuitem == MENU_ITEMS-1)
menuitem = 0;
else
menuitem++;
- playsound("data/sounds/menu.wav",0);
+ playsound("%%DATADIR%%/data/sounds/menu.wav",0);
break;
case SDLK_q:
killgame(1);

View file

@ -0,0 +1,11 @@
--- src/terrain.c.orig Tue Jul 16 23:49:58 2002
+++ src/terrain.c Tue Jul 16 23:50:11 2002
@@ -36,7 +36,7 @@
debugf("Started Loading Map (%s)",course->dir);
- sprintf(temp,"data/%s/%s",course->dir,"map.bmp");
+ sprintf(temp,"%%DATADIR%%/data/%s/%s",course->dir,"map.bmp");
if(!(mapimg = IMG_Load(temp)))
error("Missing Level Data");

View file

@ -0,0 +1,11 @@
--- src/textures.c.orig Tue Jul 16 23:50:37 2002
+++ src/textures.c Tue Jul 16 23:50:46 2002
@@ -35,7 +35,7 @@
SDL_Surface *image;
char location[6+strlen(dir)+strlen(file)];
- sprintf(location,"data/%s/%s",dir,file);
+ sprintf(location,"%%DATADIR%%/data/%s/%s",dir,file);
if((image = IMG_Load(location))){
glGenTextures(1, &texture[id]);

1
games/race/pkg-comment Normal file
View file

@ -0,0 +1 @@
OpenGL Racing Game

6
games/race/pkg-descr Normal file
View file

@ -0,0 +1,6 @@
OpenGL Racing Game is a Star Wars: Racer style game coded in pure C using
OpenGL. You can race round and round to your heart's desire. Features
include Heightfield map loading, texture mapping, a speedometer, a
translucent radar map, a timer, music, sound.
WWW: http://projectz.ath.cx/?id=70

59
games/race/pkg-plist Normal file
View file

@ -0,0 +1,59 @@
bin/race
share/race/config
share/race/data/all/.xvpics/font.jpg
share/race/data/all/.xvpics/font.png
share/race/data/all/.xvpics/fontoutline.png
share/race/data/all/.xvpics/loading.jpg
share/race/data/all/font.png
share/race/data/all/fontoutline.png
share/race/data/all/loading.jpg
share/race/data/all/menu.jpg
share/race/data/all/pz.jpg
share/race/data/all/speed.jpg
share/race/data/all/speed.png
share/race/data/desert/.xvpics/bk.jpg
share/race/data/desert/.xvpics/dn.jpg
share/race/data/desert/.xvpics/ft.jpg
share/race/data/desert/.xvpics/lf.jpg
share/race/data/desert/.xvpics/rt.jpg
share/race/data/desert/.xvpics/terrain.jpg
share/race/data/desert/.xvpics/up.jpg
share/race/data/desert/bk.jpg
share/race/data/desert/dn.jpg
share/race/data/desert/ft.jpg
share/race/data/desert/lf.jpg
share/race/data/desert/map.bmp
share/race/data/desert/rt.jpg
share/race/data/desert/terrain.jpg
share/race/data/desert/up.jpg
share/race/data/models/ship.mdl
share/race/data/music/fuck.xm
share/race/data/music/lktheme.mod
share/race/data/sea/.xvpics/bk.jpg
share/race/data/sea/.xvpics/dn.jpg
share/race/data/sea/.xvpics/ft.jpg
share/race/data/sea/.xvpics/lf.jpg
share/race/data/sea/.xvpics/map.bmp
share/race/data/sea/.xvpics/rt.jpg
share/race/data/sea/.xvpics/terrain.jpg
share/race/data/sea/.xvpics/up.jpg
share/race/data/sea/bk.jpg
share/race/data/sea/dn.jpg
share/race/data/sea/ft.jpg
share/race/data/sea/lf.jpg
share/race/data/sea/map.bmp
share/race/data/sea/rt.jpg
share/race/data/sea/terrain.jpg
share/race/data/sea/up.jpg
share/race/data/sounds/menu.wav
@dirrm share/race/data/all/.xvpics
@dirrm share/race/data/all
@dirrm share/race/data/desert/.xvpics
@dirrm share/race/data/desert
@dirrm share/race/data/models
@dirrm share/race/data/music
@dirrm share/race/data/sea/.xvpics
@dirrm share/race/data/sea
@dirrm share/race/data/sounds
@dirrm share/race/data
@dirrm share/race