Short: A compilation of utils for QuakeI v0.3 (sourcecode files) Author: Niels.Froehling@Informatik.Uni-Oldenburg.DE (Niels Froehling) Uploader: Niels Froehling Informatik Uni-Oldenburg DE (Niels Froehling) Type: dev/c Replaces: dev/c/qtools0.2-src.lha Requires: ixemul, gcc Architecture: m68k-amigaos ==================== --- README --------- ==================== this is a source-dump of my QuakeTools project. it is an entry to a greater project of documenting quakes ans quakeIIs file-internals and a library to create, modify and show all of their files. take a look in the doc-dir. NOTE: nearly 90% of the code is strict ANSI-C, the rest of 10% are 3 nested functions, and some trigraphs flowing around. people who wants to give their pennies to this project are welcome. current features in short: read/writes/displays picture formats: ppm/pgm/png/jpg read/writes 3d formats: tddd/3DS read/writes/displays/extract/list/delete/replace/update quake formats: wad/(bsp/vis/lit/prt/h?/map)/pak/(qc/dat)/mip/lmp read/display only quake formats: bsps of quakeII write only quake formats: mdl/spr others: can compress wads can do fs-dithering can do smoothing uses high quality mipmap-scaling build in script-system with recursion-capabilities can load pictures directly into bsps uses less memory error robust can parse entire directories and perform the default actions to every file and subdirectory can extract bsp/pak recursively can extract/display wads out of maps display: animateable lights possiblity to visualise the process of qbsp and light/rad transparent water mirrors splitted in system-independend and system-dependend parts rudimenal game-capabilities wire/flat/8bit/16bit/24bit/32bit graphics-driver multiple displays/cameras executables: qbsp (replacement, mid-level) light (replacement, mid-level) rad (replacement, mid-level) vis (replacement, mid-level) qview (replacement, mid-level) ppmdiff (low-level) qcc (replacement, mid-level) qtools (superior to all mid-level programs, high-level) NOTE: some of these features exists only rudimental and are not really functional (mdlgen, sprgen, texmake) NOTE: i really need feedback!! up to now i got only one bugreport (non-crashing) and one comment of a linux-user. the optimal case is if an amiga-clan (AmigaMercenaries, GoiGoi ...) or one of the unix-clans (linux and irix) adopt the whole project for excessive testing. REQUEST: if there is someone out there who can program the parts for a X-display you are welcome to put your creative minds into this project. CONFUSED: i've send a message to the authors of the linux/amiga-port of quest but didn't recieve an answer. i propose to join great parts of the quest- and qtools-project. ==================== --- CAPABILITIES --- ==================== same capabilities as -bspinfo (bspinfo, bspinfo3) -light (light, HexenII, Hipnotic, arghlite) -lightdis -mapread -mipidx -qbsp (nearly every derivate) -qcc (qcc, advqcc, unqcc, preqcc, proqcc) -qdtool -qeu -qmap (qmap, exdawn, squake, worldoffantasy) -qube -rad3 -readmap -vis (vis, HexenII, yavis, rvis) -vispatch coming soon -EarthQuake -pcx2wad -pcx2wal -qbsp (HexenII) -qcc (HexenII) coming late -modelgen -qmv -qname -sprgen -texmake maybe coming after 2000 -lmp2mpeg -lmpc -meddle -edquake/ice/qed/qstudio/quest ==================== --- CHANGES -------- ==================== 11.09.98 -fixed wait for completed window-refresh libqsys/m68k/amigaos/amigaos.c 19.10.98 -fixed NAME-chunk not written correct libqtools/TDDD.c 20.10.98 -fixed removed extra reallocation libqtools/TDDD.c -fixed removed "else" out of boundary compares libqtools/TDDD.c, libqbuild/brush.c, libqdisplay/cache.c -fixed realloc clears now libqtools/misc.c 19.11.98 -fixed handling of conchars./conback. to raw-files libqtools/graphics.c, libqtools/wad.c, libqtools/script.c *miscs completely re-structured TDDD libTDDD*, libqtools/TDDD.* 21.11.98 +added teleporter-transparency libqdisplay/surface.c, libqdisplay/tables.* 26.11.98 +added checks and compilation of liblists configure, liblists/Makefile* +added --wide-view parameter libqdisplay/display.c, include/libqdisplay.h *miscs moved parts needed by qsys from qtools to qsys libqtools/misc.*, libqsys/generic.* *miscs make the amigaos-driver handle unlimited displays, and implement resource-tracking with liblists libqsys/m68k/amigaos.* 28.11.98 -fixed SwapFoat to SwapFloat libqsys/generic.h -fixed m68k-dependend assembler-parts libTDDD/TDDD.h *miscs moved parts needed by qsys from qtools to qsys and make them replaceable by system-drivers libqtools/misc.*, libqsys/generic* 30.11.98 +added you can now save or view textures from maps to raw mipmaps or wads (test.map -o test.wad) libqtools/bsp.*, libqtools/scripts.c -fixed memory-eraser in qcc libqbuild/qcc.c *miscs remove most of the static variable in qc libqbuild/qcc.c *miscs completely rework of memorymanager * *miscs change indentation of unqcc libqbuild/qcc.c 01.12.98 -fixed additional handling of conchars./ conback. to raw-files and view libqtools/graphics.c, libqtools/wad.c, libqtools/script.c 23.12.98 +added Disastry's light modification libqbuild/light.c, libqtools/map.* -fixed some misbehaviours in/for Write/ExtractMiptex libqbuild/writebsp.c, libqtools/script.c, libqtools/bsp.c 29.12.98 +added model and sprite compiler libq*/mdl*, libq*/spr*, libqbuild/qcc*, libqtools/memory.* -fixed bug in unqcc with strings longer than 128/256 bytes, and a missing break resulting in extra- ordinary longer processtime libqbuild/qcc.c -fixed does compile on alpha/mips again * *miscs changed some of the defines and strings to support later configurability libq*/* *miscs speedup qcc a LOT libqbuild/qcc.c 30.12.98 +added animateable displayable textures, skies and warps ("+0...", "+0sky...", "+0*...") libqdisplay/surface.* libqdisplay/cache.* libqtools/bsp.* libqtools/mip.h -fixed some bugs, don't remember * *miscs added a hole lot statics *miscs removed some of the global variables libqbuild/* ?quest again corrupted display-code ?quest sometimes the bsp to map converter can't find the texture names and give "unknown" 01.01.99 +added first steps to implement mirrors libqtools/mip.h, libqdisplay/surface.* +added --complete-search libqbuild/writebsp.*, util/qtools.c +added animations from 0-9, A-Z are possible now you can make little films libqbuild/writebsp.c, libqdisplay/cache.c -fixed default texture if -1 found libqdisplay/cache.c -fixed optimized and fixed bsp-texture-loader libqtools/bsp.c -fixed nearly all compares are lowercase now, except some rare cases of importing 3d-party maps libq*/* *miscs HappyNewYear guys :^) *miscs new source version 0.3 released Version 0.3: ==================== --- TODO ----------- ==================== allready done: possibly use cpp as preprocessor for quakec (do not open the source-file directly, instead open a pipe, into that cpp pipes (alternativly use tempfile instead)) implement --wide-view, that displays the textures not only as is, but in all mipmap-states and simple lighting too. partially done: support for quake2 (some things have been done for this) loading/saving of models ilbm/gif/pcx/bmp-support (but, I'm not the man to programm that crap , some has been done, but not everything) alias-lists for texture-names: we expand an array of texturenames and its aliases "alias\0texturename\0texturepath", so life is easy if you change your texturenames on your harddrive or want to replace the standard-textures with your own. and it is faster than searching through all your directories all the time. rejected: an idea to patch a pre-processed pak-file that the bsp-files shares textures: first we create a wad, that contains all the textures that are in the bsps (not in one, in all). than we create the bsps without adding the textures and build the pak-file. now we post-process the bsps directly in the pak-file (the bsps offsets to the textures exists but are -1) that the offsets point into the location of the texture in the wad-file in the pak-file. -> Quake does not load the whole PAK, and the offsets are only valid for the mipmap area, not even for the bsp-area future ideas: use zlib instead of own compression algorithm? (already in, but only used for png) make-like timestamp-updating? lot of dokumentation (the whole source) support for the extensions of bsp/worldcraft/... like prefabs etc. if there are '/' in the mipmaps-name, we try to load wals instead of wads (minor change, based upon the dir-keyword) [so it is possible to compile quakeII-maps for quakeI redefine some of the unused fields in structs for fast viewers (eg. a fullcolor-field in miptexs, or a group-id in wads) specify "lightcolors" in map-files for colored lights (quakeI and quakeII), the lightmaps for colored light are saved after the normal lightmaps, so we get get red-lightmap at "lightdatasize/4", green at "lightdatasize/4 * 2", blue at "lightdatasize/4 * 3", that way it is completely comatible to quake (dont forget to add lightofs) a basic idea to enhance the bsp-format: after the bspheader we have room for everything we want. the standard-header has offsets into the file, so quake nor any other program that READ the file, expects that eg. the entity-lump lies after the header. now we build a crc-sum, or something other union like a magic number. we put that directly after the header. now if we look for an enhanced bsp-file we check that number and voila we put everything what we want into the bsp-file. some ideas for extensions: - write the texture-strings into a lump and save them, but don't load the textures, so we have the same capability as quakeII for quakeI, but it doesn't work for quakeI.exe, 'cause quakeI misses the texture-lump - we can save the precalculated values from qview into a special lump - we can save the colored light-tables into a special lump instead after the original lightmaps - ... make the subdivision configureable in libqdisplay, at 0 the results must be amazing implement hooks into light/rad that execute if new lightmap has been created (could be used for visualisation of lights/rads behaviour) maybe give light/rad the possibility to calculate only specific triangles or intervals of triangles (could be used for recalculating all triangles that are visible in a bsp-display, and render them again) make submodels to be displayed by DisplayBSP make anim-textures to be displayed by DisplayBSP try to replace all Error by eprintf and clean cleanup implement '$'-commands into qcc remove all map-specific stuff out of bspmemory and vice versa thats only texinfo, so go through mapmemory all the time, and save them to the bspmemory at FinishBSP, must be set before SubdivideFace! (->SolidBSP) and before vis/light/rad but they are no problem check for alloca in configure entities are the only map-resources in light/rad, maybe simplify them allow the "bsps", "_bsps" keyword in maps to load textures directly out of bsps in addition to wads and dirs ... (too much) suggestions are welcome!