diff options
author | jfitz <jfitz@FreeBSD.org> | 1996-10-27 13:18:55 +0800 |
---|---|---|
committer | jfitz <jfitz@FreeBSD.org> | 1996-10-27 13:18:55 +0800 |
commit | 71fb312b5a55278c6212efa3cd41ac2c5231a197 (patch) | |
tree | 03e5ad3d78a873fce347d28da9de5e8701190207 | |
parent | f2f95068c597e18b32b6289fc449e4466cc5e317 (diff) | |
download | freebsd-ports-gnome-71fb312b5a55278c6212efa3cd41ac2c5231a197.tar.gz freebsd-ports-gnome-71fb312b5a55278c6212efa3cd41ac2c5231a197.tar.zst freebsd-ports-gnome-71fb312b5a55278c6212efa3cd41ac2c5231a197.zip |
Import of qcc, the QuakeC compiler for building custom games of Quake.
-rw-r--r-- | games/qcc/Makefile | 25 | ||||
-rw-r--r-- | games/qcc/distinfo | 1 | ||||
-rw-r--r-- | games/qcc/pkg-comment | 1 | ||||
-rw-r--r-- | games/qcc/pkg-descr | 68 | ||||
-rw-r--r-- | games/qcc/pkg-plist | 40 |
5 files changed, 135 insertions, 0 deletions
diff --git a/games/qcc/Makefile b/games/qcc/Makefile new file mode 100644 index 000000000000..c694c13afea6 --- /dev/null +++ b/games/qcc/Makefile @@ -0,0 +1,25 @@ +# New ports collection makefile for: qcc +# Version required: 1.01 +# Date created: October 25th 1996 +# Whom: jfitz@FreeBSD.ORG +# +# $Id$ +# + +DISTNAME= qcc +PKGNAME= qcc-1.01 +CATEGORIES+= games +MASTER_SITES= ftp://ftp.stomped.com/pub/idgames2/quakec/ + +MAINTAINER= jfitz@freebsd.org + +WRKSRC= ${WRKDIR}/send +MAKEFILE= makefile + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/qcc ${PREFIX}/bin + @ ${MKDIR} -p ${PREFIX}/share/qcc/v101qc + ${INSTALL_DATA} ${WRKSRC}/readme.txt ${PREFIX}/share/qcc + ${INSTALL_DATA} ${WRKSRC}/v101qc/* ${PREFIX}/share/qcc/v101qc + +.include <bsd.port.mk> diff --git a/games/qcc/distinfo b/games/qcc/distinfo new file mode 100644 index 000000000000..2bdc7cd1d259 --- /dev/null +++ b/games/qcc/distinfo @@ -0,0 +1 @@ +MD5 (qcc.tar.gz) = 7c5ef5180fd5e13bfe75a79efc61e5f9 diff --git a/games/qcc/pkg-comment b/games/qcc/pkg-comment new file mode 100644 index 000000000000..5c1b7cebf4f8 --- /dev/null +++ b/games/qcc/pkg-comment @@ -0,0 +1 @@ +The QuakeC compiler, for building custom games of Quake. diff --git a/games/qcc/pkg-descr b/games/qcc/pkg-descr new file mode 100644 index 000000000000..e9a4023e520c --- /dev/null +++ b/games/qcc/pkg-descr @@ -0,0 +1,68 @@ + +This is the last major component of the quake utilities to be released. To +be honest, I have been a little reticent to release this because most of the +actual qc code is basically rather embarassing crap. The time never became +available to even give it a good top to bottom going over. I never spent +any quality engineering time on my parts, American wrote a lot of qc code, +and even Romero has a bit of work in there. It is a mess. If you look +through the code and occasionally think "This is stupid!", you are probably +right... + +The compiler itself can be drastically sped up by just replacing the symbol +searches with binary trees or hashing. We remotely compile on our alpha, so +it hasn't been a big enough issue for me to do it, but as the code size +grows and grows it will be done sooner or later. + +The resulting code is horribly nieve and space ineficient (twleve bytes / +instruction). If common subexpression removal was added, the instruction +count could probably be cut nearly in half. I would have liked to have done +a better job at this, but this was my first compiler front end, and I had a +ton of other things fighting for my time. The next one will turn out +better. (wow, I'm making a lot of excuses here, aren't I?) + +Qcc also performs some other maintenence functions for us, like rebuildinng +all the brush models and making pak files, but those functions are only +usefull if you have created all new data for everything. models.qc and +sprites.qc don't actually generate any code, they are just parsed by +modelgen and spritegen and included for completeness. + + +To modify the quake program code, set up a new game directory parallel with +id1, and containing a "progs" subdirectory. Copy all the .qc files and +progs.src into that, and just run qcc from that directory. That will +compile all of the files listed in progs.src and (if there aren't any +errors) generate a new progs.dat file in the parent directory. + +As a simple test, open the client.qc file, go to the ClientObituary function +at the end, and change some of the messages. + +The directory structure will look something like: + +/quake/quake.exe +/quake/id1/ +/quake/mygame/progs.dat +/quake/mygame/progs/progs.src +/quake/mygame/progs/world.qc +/quake/mygame/progs/client.qc +/quake/mygame/progs/... etc ... + +Run quake with "-game mygame", which will cause quake to look for data in +the mygame directory before falling back to id1. In this example, it will +find the new progs.dat from mygame, and take everything else from id1. You +can type "path" at the quake console to verify the current search order of +directories and pak files. THIS WILL ONLY WORK WITH A REGISTERED VERSION OF +QUAKE. + +The header qcc.h has the language spec and some documentation, but I'm not +positive if it is all current. + +The only documentation for the various builtin functions I can offer is the +source code used by quake. See builtin.c. Some of them are required to do +things outside the scope of the qc world, and some are just there for speed +reasons. + +PLEASE don't ask me questions about all this! + + +John Carmack + diff --git a/games/qcc/pkg-plist b/games/qcc/pkg-plist new file mode 100644 index 000000000000..74f2fa090d87 --- /dev/null +++ b/games/qcc/pkg-plist @@ -0,0 +1,40 @@ +bin/qcc +share/qcc/readme.txt +share/qcc/v101qc/ai.qc +share/qcc/v101qc/amtest.qc +share/qcc/v101qc/boss.qc +share/qcc/v101qc/buttons.qc +share/qcc/v101qc/client.qc +share/qcc/v101qc/combat.qc +share/qcc/v101qc/defs.qc +share/qcc/v101qc/demon.qc +share/qcc/v101qc/dog.qc +share/qcc/v101qc/doors.qc +share/qcc/v101qc/enforcer.qc +share/qcc/v101qc/fight.qc +share/qcc/v101qc/fish.qc +share/qcc/v101qc/hknight.qc +share/qcc/v101qc/items.qc +share/qcc/v101qc/jctest.qc +share/qcc/v101qc/knight.qc +share/qcc/v101qc/misc.qc +share/qcc/v101qc/models.qc +share/qcc/v101qc/monsters.qc +share/qcc/v101qc/ogre.qc +share/qcc/v101qc/oldone.qc +share/qcc/v101qc/plats.qc +share/qcc/v101qc/player.qc +share/qcc/v101qc/progs.src +share/qcc/v101qc/subs.qc +share/qcc/v101qc/shalrath.qc +share/qcc/v101qc/shambler.qc +share/qcc/v101qc/soldier.qc +share/qcc/v101qc/sprites.qc +share/qcc/v101qc/tarbaby.qc +share/qcc/v101qc/triggers.qc +share/qcc/v101qc/weapons.qc +share/qcc/v101qc/wizard.qc +share/qcc/v101qc/world.qc +share/qcc/v101qc/zombie.qc +@dirrm share/qcc/v101qc +@dirrm share/qcc |