mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
Import of qcc, the QuakeC compiler for building custom games of Quake.
This commit is contained in:
parent
0ed2a12734
commit
e1ab5d8574
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=4168
25
games/qcc/Makefile
Normal file
25
games/qcc/Makefile
Normal file
@ -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>
|
1
games/qcc/distinfo
Normal file
1
games/qcc/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (qcc.tar.gz) = 7c5ef5180fd5e13bfe75a79efc61e5f9
|
1
games/qcc/pkg-comment
Normal file
1
games/qcc/pkg-comment
Normal file
@ -0,0 +1 @@
|
||||
The QuakeC compiler, for building custom games of Quake.
|
68
games/qcc/pkg-descr
Normal file
68
games/qcc/pkg-descr
Normal file
@ -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
|
||||
|
40
games/qcc/pkg-plist
Normal file
40
games/qcc/pkg-plist
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user