initial import of Cube 2: Sauerbraten source code r4052

master
lsalzman 2012-03-19 13:13:07 +02:00
commit d58b228f57
386 changed files with 191333 additions and 0 deletions

375
README.html Normal file
View File

@ -0,0 +1,375 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Cube 2: Sauerbraten</title>
<link rel="stylesheet" type="text/css" href="docs/style.css" />
<link rel="shortcut icon" href="docs/favicon.ico" />
</head>
<body>
<div align="center"><a href="http://sauerbraten.org/"><img src="docs/cube2logo.png" alt="Cube 2: Sauerbraten" style="border: none" /></a></div>
<h1>Cube 2: Sauerbraten</h1>
<div class="contents">
<ul class="contents">
<li>
<a href="#links"><b>Links</b></a>
</li>
<li>
<a href="#documentation"><b>Documentation</b></a>
</li>
<li>
<a href="#the_wiki"><b>The Wiki</b></a>
</li>
<li>
<a href="#current_features"><b>Current Features</b></a>
<ul class="contents2">
<li>
<a href="#game_features">Game Features</a>
</li>
<li>
<a href="#engine_features">Engine Features</a>
</li>
</ul>
</li>
<li>
<a href="#credits_slash_authors"><b>Credits / Authors</b></a>
</li>
<li>
<a href="#license"><b>License</b></a>
</li>
</ul>
</div>
<h2 id="links">Links</h2>
<p>
First of all, welcome to Cube 2: Sauerbraten! To start off, if you are looking for help with the game itself, refer to the
<a href="#documentation"><b>Documentation</b></a> below. Here are some places of interest on the internet, which are related to
<i>Cube / Cube 2: Sauerbraten</i>.
</p>
<ul>
<li>
<a href="http://cubeengine.com/">Cube and Cube 2 Engines</a>: Start Page for the Cube Engine series.
</li>
<li>
<a href="http://sauerbraten.org/">Cube 2: Sauerbraten</a>: The Sauerbraten FPS (First Person Shooter) Homepage.
</li>
<li>
<a href="http://quadropolis.us/">Quadropolis</a>: Online Cube Engine community, with user made maps, mods, and scripts.
</li>
<li>
<a href="irc://irc.quakenet.org/sauerbraten">Sauerbraten IRC Channel</a>: Online public chat with Cube developers, supporters and fans, via the <a href="http://www.quakenet.org/">QuakeNet IRC Network</a>.
</li>
<li>
<a href="http://cubeengine.com/forum.php4">Cube Forums</a>: If after reading the documentation and wiki you
still have any questions, you can try <i>searching</i> the forums. If your question isn't answered there,
you can try posting to a relevant thread, or creating your own, being sure to supply a good description
of your problem, and your operating system/hardware/software setup, while refraining from wild accusations.
</li>
</ul>
<h2 id="documentation">Documentation</h2>
<p>
Cube 2: Sauerbraten is a multiplayer/singleplayer FPS freeware game project.
The source code for the engine used in these games is Open Source (ZLIB licence, read the &quot;License&quot;
section below carefully before starting ANY kind of project based on this engine).
</p>
<p>
You will want to read (roughly this order):
</p>
<ul>
<li>
<a href="docs/game.html">Game</a>: Information on gameplay.
</li>
<li>
<a href="docs/config.html">Config</a>: How to run the game, configure it for your machine, and extend it with scripts.
</li>
<li>
<a href="docs/editing.html">Editing Tutorial</a>: A guide to making maps.
</li>
<li>
<a href="docs/editref.html">Editing Reference</a>: Map making reference.
</li>
<li>
<a href="docs/models.html">Models</a>: How to put models into the game.
</li>
<li>
<a href="docs/history.html">History</a>: For seeing latest changes.
</li>
<li>
<a href="docs/rpg.html">Example RPG Game Information</a>: Information on running, building, or scripting the example RPG game.
</li>
</ul>
<h2 id="the_wiki">The Wiki</h2>
<p>
In addition to the documentation provided, the wiki has a lot of useful information for working
with the game and engine, contributed by the community which elaborates and breaks alot of the information
down into more digestable chunks. This is just provided a short rundown of the most useful topics to new players,
and those looking for quick readable information. For more go visit the
<a href="http://cube.wikispaces.com/">Cube Wiki</a>.
</p>
<ul>
<li>
<a href="http://cube.wikispaces.com/Beginners+Guide">Beginners Guide</a>: Go through the steps to get up and running.
</li>
<li>
<a href="http://cube.wikispaces.com/FAQ">Frequently Asked Questions</a>: Get the answers to some commonly asked
questions, like; &quot;<i>The game runs very slowly, how can I fix it?</i>&quot;,
&quot;<i>Why is the game behaving strangely?</i>&quot;, and &quot;<i>How do I fix the 'Hall of Mirrors' effect?</i>&quot;.
</li>
<li>
<a href="http://cube.wikispaces.com/Performance+Guide">Performance Guide</a>: Things you can try to make the game
either run faster or look better on your machine.
</li>
<li>
<a href="http://quadropolis.us/taxonomy/term/21">Older Stuff</a>: From Quadropolis.
</li>
<li>
Some <a href="docs/dev/wikistuff.html">old</a> random documentation bits from our previous wiki that don't
have a place yet.
</li>
</ul>
<h2 id="current_features">Current Features</h2>
<p>
Cube 2: Sauerbraten is an open source project, and maintains constant development, yet it is very feature-rich and playable as a game. What follows is a list of the most prominent features.
</p>
<h3 id="game_features">Game Features</h3>
<ul>
<li>
Oldskool fast &amp; intense gameplay (read: similar to Doom 2 / Quake 1).
</li>
<li>Many multiplayer gameplay modes, most in teamplay variants as well: deathmatch, instagib, efficiency,
tactics, capture (domination/battlefield style), CTF (capture the flag), coop edit (!).
</li>
<li>
Masterserver &amp; ingame server browser.
</li>
<li>
Lag-free gameplay experience.
</li>
<li>
Two singleplayer modes: DMSP (fight a monster invasion on any DM map), classic SP
(progression driven SP like other games)
</li>
<li>
7 weapons tuned for maximum satisfaction: double barrelled shogun, rocket launcher,
machine gun, rifle, grenade launcher, pistol, fist.
</li>
</ul>
<h3 id="engine_features">Engine Features</h3>
<ul>
<li>
6 directional heightfield in octree world structure allowing for instant easy in-game geometry editing (even
in multiplayer, coop edit).
</li>
<li>
Rendering engine optimized for high geometry throughput, supporting hardware occlusion culling and software precomputed conservative PVS with occluder fusion.
</li>
<li>
Lightmap based lighting with accurate shadows from everything including mapmodels,
smooth lighting for faceted geometry, and fast compiles. Soft shadowmap based shadows for dynamic entities.
</li>
<li>
Pixel and vertex shader support, each model and world texture can have its own shader assigned. Supports normal and parallax mapping, specular and dynamic lighting with bloom and glow, environment-mapped and planar reflections/refractions, and post-process effects.
</li>
<li>
Robust physics written specifically for this world structure.
</li>
<li>
Loading of md2/md3/md5/obj/smd/iqm models for skeletal and vertex animated characters, weapons, items, and world objects. Supports animation blending, procedural pitch animation, and ragdoll physics for skeletally-animated characters.
</li>
<li>
Network library designed for high speed games, client/server network system.
</li>
<li>
Small but complete configuration/scripting language.
</li>
<li>
Simple stereo positional sound system.
</li>
<li>
Particle engine, supporting text particles, volumetric explosions, soft particles, and decals.
</li>
<li>
3d menu/gui system, for in-world representation of choices.
</li>
</ul>
<h2 id="credits_slash_authors">Credits / Authors</h2>
<div class="credits">Programming</div>
<ul>
<li>
<i>Wouter &quot;Aardappel&quot; van Oortmerssen</i>: A lot of the general code, and the original concept and design. (<a href="http://strlen.com/">website</a>)
</li>
<li>
<i>Lee &quot;eihrul&quot; Salzman</i>: ENet networking library, *nix ports, and a lot of the general code, especially rendering/lightmaps/physics related. (<a href="http://lee.fov120.com/">website</a>)
</li>
<li>
<i>Mike &quot;Gilt&quot; Dysart</i>: General programming, especially editing/physics related.
</li>
<li>
<i>Robert &quot;baby-rabbit&quot; Pointon</i>: GUI, particle rendering, and movie recording code, MacOSX porting. (<a href="http://www.fernlightning.com/">website</a>)
</li>
<li>
<i>Quinton &quot;quin&quot; Reeves</i>: Bots/AI code. Asissts with community management, documentation/wiki, and development. (<a href="http://www.redeclipse.net/">website</a>)
</li>
</ul>
<div class="credits">Additional Code</div>
<ul>
<li>
<i>Julian Mayer</i>: MacOSX ports.
</li>
<li>
<i>Adrian &quot;driAn&quot; Henke</i>: MD3 code.
</li>
<li>
<i>Jerry Siebe</i>: Geometry rendering optimisations.
</li>
</ul>
<div class="credits">Level Design</div>
<ul>
<li>
<i>Kurt &quot;kdoom&quot; Kessler</i>: A bunch of DM/capture maps, k_rpg1.
</li>
<li>
<i>Shane Nieb</i>: academy, authentic, bt_falls, c_valley, complex, curvy_castle, flagstone, garden, hallo, island, justice, nevil_c, nmp4, nmp8, nmp9, ot, park, shipwreck, turbine
</li>
<li>
<i>John &quot;metlslime&quot; fitzgibbons</i>: metl* maps.
</li>
<li>MitaMan: singleplayer episodes</li>
<li>
With additional maps by: Aardappel, driAn, Gilt, voot, Bryan "KillHour" Shalke, staffy, sparr, JCDPC, ZappaZ, RatBoy, Fanatic, rocknrol, KaiserTodretter, BlikjeBier, wurfel, aftasardem, Lazy [HUN], Gregor Koch, Junebug, Gabriele "Blindabuser" Magurno, MeatROme, TUX, Mayhem, mIscreant, schmutzwurst, Kal, DairyKing, Hero, WahnFred, and others.
</li>
</ul>
<div class="credits">Art / Content</div>
<ul>
<li>
<i>
John &quot;Geartrooper&quot; Siar</i>: Mr. Fixit, Ironsnout, RPG characters, monsters, new hudguns and vweps.
</li>
<li>
<i>Gabriele "Blindabuser" Magurno</i>: Logos, loading screen, announcer voices.
</li>
<li>
<i>MakkE</i>: Mapmodels, old hudguns, items.
</li>
<li>
<i>Dietmar &quot;dcp&quot; Pier</i>: Mapmodels, old hudguns.
</li>
<li>
<i>DarthVim</i>: Old hudguns.
</li>
<li>
<i>Shane Nieb</i>: Textures, Mapmodels, Skyboxes.
</li>
<li>
<i>Sock</i>: The egyptian &amp; tech texture sets (<a href="http://www.planetquake.com/simland">website</a>).
</li>
<li>
<i>Iikka &quot;Fingers&quot; Keranen</i>: The ikbase ik2k texture sets (<a href="http://www.digital-eel.com/surface">website</a>).
</li>
<li>
<i>Lunaran, Gibbie, Gregor Koch, J&eacute;sus "aftasardem" Maia, MitaMan, and philipk</i>: Normalmapped texture sets.
</li>
<li>
Additional art by: metlslime (textures), Than (textures), Remedy Entertainment Ltd (textures), Seth &amp; Ulrich Galbraith (GPL models), Brian "EvilBastard" Collins, Conrad, Magarnigal, Psionic, James Green, Andreas M&ouml;ller, Ryan Butts &amp; Jeramy Cooke (md2 models), KaiserTodretter (items), Tentus (mapmodels), Kurt Kessler (mapmodels), Philip Klevestav (textures), leileilol/OpenArena (GPL bullet hole decal).
</li>
</ul>
<div class="credits">Sound / Music</div>
<ul>
<li>
<i>Marc &quot;Fanatic&quot; A. Pullen</i>: Soundtrack.
</li>
</ul>
<div class="credits">Other</div>
<ul>
<li>
<i>Kristian "sleepwalkr" Duske</i>: website / messageboard, hosting, master server.
</li>
<li>
<i>Pushplay</i>: Documentation help.
</li>
<li>
<i>The SDL team</i>: For their libraries (<a href="http://www.libsdl.org/">website</a>).
</li>
</ul>
<h2 id="license">License</h2>
<p>
The game is freeware, you may freely distribute the archive and/or installer <i>unmodified</i> on any media.
You may re-compress using different archival formats suitable for your OS (i.e. zip/tgz/rpm/deb/dmg), any changes beyond that require explicit permission from the developers.
</p>
<p>
You may play Cube 2: Sauerbraten for any purpose as long as you don't blame the authors for any damages incurred.
</p>
<p>
If you want to produce new content with the Cube 2 Engine, you have to be aware that the source code may be Open Source, but the game and the media it consist of have their individual licenses and copyrights.
This means that you have roughly 3 options:
</p>
<ul>
<li>
You may produce new content for the &quot;Sauerbraten&quot; game, for example as a <i>custom map</i> (.ogz/.cfg/textures etc).
Contributing <i>content</i> to the original game is most welcome, and the most productive way of working with the community.
</li>
<li>
If you want to create your own gameplay beyond what you can do with a map, the best way to do this is as a &quot;mod&quot; (same as above, but with new executable that
incorporates your gameplay), that <i>requires an existing install</i>, and <i>installs only the new files</i> you created in parallel to the existing files.
</li>
<li>
If you insist on making a standalone game based on Cube 2, do realize that <i>only the sourcecode</i> is yours to use freely (if you abide by the ZLIB license, see below),
while the media is <i>not</i>. You can't simply redistribute the entire package with your modified files, as the majority of game media is not yours to use freely (it is made
by many authors with a variety of licences and copyright restrictions). Unless you have explicit permission from the authors, or the readme says explicitly "may be used
for any purpose" or similar language, it will be illegal to include in your standalone game based on the engine (you may not assume that just because a file
has no explicit license, that it is free of copyright). Therefore, if you wish to produce a standalone game, be prepared to make many of the maps, models, textures, sounds etc from scratch
yourself.
</li>
</ul>
<p>
In this sense Cube 2: Sauerbraten is similar to games like Quake (its code is Open Source, but its media is not), it is a game that is meant
to be added to, not copied and used as a template. Sauerbraten is not meant to be a quick game creation kit, it is a game.
</p>
<p>
If you wish to use the source code (ZLIB license) in any way, read the src/readme_source.txt file carefully.
</p>
</body>
</html>

Binary file not shown.

BIN
bin/SDL.dll Normal file

Binary file not shown.

BIN
bin/SDL_image.dll Normal file

Binary file not shown.

BIN
bin/SDL_mixer.dll Normal file

Binary file not shown.

BIN
bin/libFLAC-8.dll Executable file

Binary file not shown.

BIN
bin/libjpeg-8.dll Executable file

Binary file not shown.

BIN
bin/libmikmod-2.dll Executable file

Binary file not shown.

BIN
bin/libogg-0.dll Normal file

Binary file not shown.

BIN
bin/libpng15-15.dll Executable file

Binary file not shown.

BIN
bin/libtiff-5.dll Executable file

Binary file not shown.

BIN
bin/libvorbis-0.dll Normal file

Binary file not shown.

BIN
bin/libvorbisfile-3.dll Normal file

Binary file not shown.

BIN
bin/libwebp-2.dll Executable file

Binary file not shown.

BIN
bin/mikmod.dll Executable file

Binary file not shown.

13
bin/readme_SDL.txt Normal file
View File

@ -0,0 +1,13 @@
Please distribute this file with the SDL runtime environment:
The Simple DirectMedia Layer (SDL for short) is a cross-platfrom library
designed to make it easy to write multi-media software, such as games and
emulators.
The Simple DirectMedia Layer library source code is available from:
http://www.libsdl.org/
This library is distributed under the terms of the GNU LGPL license:
http://www.gnu.org/copyleft/lesser.html

BIN
bin/rpg.exe Executable file

Binary file not shown.

BIN
bin/sauerbraten.exe Normal file

Binary file not shown.

BIN
bin/smpeg.dll Normal file

Binary file not shown.

BIN
bin/zlib1.dll Normal file

Binary file not shown.

BIN
bin_unix/linux_64_client Executable file

Binary file not shown.

BIN
bin_unix/linux_64_server Executable file

Binary file not shown.

BIN
bin_unix/linux_client Executable file

Binary file not shown.

BIN
bin_unix/linux_server Executable file

Binary file not shown.

101
bin_unix/readme.txt Normal file
View File

@ -0,0 +1,101 @@
* Installing and Running Sauerbraten
*nix versions of Sauerbraten clients and standalone servers.
The clients function identical to the win32 client, see config.html for more
information about command-line options if necessary.
Please run "sauerbraten_unix" from the root Sauerbraten dir (NOT from inside the "bin_unix"
directory) to launch these, or set the SAUER_DIR variable at the top of the "sauerbraten_unix"
script to an absolute path to allow it to be run from any location. Note that the "sauerbraten_unix"
script is set up to write any files (saved maps, configs, etc.) into the user's home
directory at "~/.sauerbraten".
Clients will need the following dynamic link libraries present:
* libGL (OpenGL)
* SDL (>= 1.2.10)
* SDL_image
* SDL_mixer
* libpng
* libjpeg
* zlib
If native binaries for your platform are not included, then try the following:
1) Ensure you have the DEVELOPMENT VERSIONS of the above libraries installed.
2) Change to the src/ directory and type "make install".
3) Re-run the "sauerbraten_unix" script from the root Sauerbraten directory if it succeeded.
The servers (bin_unix/linux_server or bin_unix/native_server) should need no libs
other than libstdc++ and zlib. Note that for the server to see the "server-init.cfg",
it must be run from whichever directory "server-init.cfg" is in. If you run a server
with the "sauerbraten_unix -d" command, this happens automatically. However, if you
wish to run the standalone servers instead, then you may need to write an appropriate
wrapper script to change to the appropriate data directory before running the standalone
server binary, as described below in the packaging guide.
* Packaging Guide for Unix-like Operating System Developers/Maintainers
If you are packaging Sauerbraten up for redistribution in a Linux distribution or other
similar OS, please avoid using the "sauerbraten_unix" script in its default/unmodified form.
You should at least set the SAUER_DATA variable to appropriately find the common Sauerbraten
data files, or better yet replace it with a more appropriate way of starting Sauerbraten using
the script as a basis. If the distribution happens to place program binaries in a specific
directory separate from data files, such as "/usr/bin", then much of the lines within the script
that deal with finding an appropriate binary can be removed, as they only exist to help people
running from the original Sauerbraten tarball. An example run script is shown further
below.
Also, please note, that if your distribution chooses to package the binaries and game data
as separate packages due to whatever licensing rules or cross-architecture package sharing,
that client binaries from newer Sauerbraten editions are NOT compatible with older versions of
game data, on whole, nor obviously compatible with newer versions of game data. Game data, as a
whole, and client binaries are only roughly compatible within individual Sauerbraten editions,
though patches to individual Sauerbraten editions generally always retain compatibility with
the game data.
For those writing custom Sauerbraten run scripts for packaging, they should adhere to the following
guidelines:
Sauerbraten finds all game files relative to the current directory from which Sauerbraten is run,
so any script running Sauerbraten should set its current directory to where the Sauerbraten data
files are located before it runs the Sauerbraten client binaries. No silly symlinking tricks should
be at all necessary.
When running the Sauerbraten client, one command-line switch should ALWAYS be supplied to
the client binary. This is "-q${HOME}/.sauerbraten", which will instruct Sauerbraten to
write any user private files such as saved maps and configurations to a private ".sauerbraten"
directory within each user's home directory. Sauerbraten will automatically create this
directory and any subdirectories for each user running it, so do not pre-create this directory
or install any symlinks within it - as some Linux distribution packages have erroneously done.
All command-line switches supplied to the Sauerbraten run script should be passed to the
Sauerbraten client after the "-q${HOME}/.sauerbraten" switch.
A simple script such as the following (with directory/file names set as appropriate) would
ultimately suffice for the client:
#!/bin/sh
SAUER_DATA=/usr/share/games/sauerbraten
SAUER_BIN=/usr/bin/sauerbraten_client
SAUER_OPTIONS="-q${HOME}/.sauerbraten"
cd ${SAUER_DATA}
exec ${SAUER_BIN} ${SAUER_OPTIONS} "$@"
A simple script for the server, which assumes a global default "server-init.cfg" in SAUER_DATA,
but allows per-user overriding via the home directory, might be:
#!/bin/sh
SAUER_DATA=/usr/share/games/sauerbraten
SAUER_SERV_BIN=/usr/bin/sauerbraten_server
SAUER_SERV_OPTIONS="-q${HOME}/.sauerbraten"
cd ${SAUER_DATA}
exec ${SAUER_SERV_BIN} ${SAUER_SERV_OPTIONS} "$@"
With respect to libraries, make sure that you do not link Sauerbraten against any other ENet package
than the one that comes included with the Sauerbraten, as it may be different from the official ENet
releases and might fail to compile or communicate properly.

BIN
data/background.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

BIN
data/background_decal.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
data/background_detail.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

175
data/brush.cfg Normal file
View File

@ -0,0 +1,175 @@
// this config defines various heightmap brushes
// a brush has two parts: the brushmap and the brushhandle
// the brushmap is a 2D field that defines how the brush affects a heightmap
// the brushhandle is a 2D vertex on the brushmap.
// this handle is a reference point on the brushmap which represents
// where the editing cursor is pointed at.
// clearbrush : resets the brushmap
// brushvert <x> <y> <value> : set a point on the brushmap
// brushx <x> : the x coordinate of the brushhandle
// brushy <y> : the y coordinate of the brushhandle
// copybrush : copies the current heightmap as a brush. cursor location becomes handle
// savebrush <name> : saves the current brush in script form into mybrushes.cfg
brushhandle = [
brushx $arg1
brushy $arg2
]
brushindex = -1
brushmax = -1 // make sure to bump this up if you add more brushes
selectbrush = [
brushindex = ( + $brushindex $arg1 )
if (< $brushindex 0) [ brushindex = $brushmax ]
if (> $brushindex $brushmax) [ brushindex = 0 ]
do [brush_@brushindex]
echo "heightmap brush set to:" $brushname
]
brushverts = [
loop y (listlen $arg1) [
bv = (at $arg1 $y)
loop x (listlen $bv) [
brushvert $x $y (at $bv $x)
]
]
]
newbrush = [
brushmax = (+ $brushmax 1)
do [
brush_@brushmax = [
brushname = [@@@arg1]
clearbrush
@@(if (> $numargs 1) [result [brushhandle @arg2 @arg3; brushverts [@@arg4]]])
]
]
]
newbrush "Circle 1-0" 0 0 [1]
newbrush "Circle 2-1" 2 2 [
""
"0 0 1 "
"0 1 2 1 "
"0 0 1 "
]
newbrush "Circle 4-2-1" 2 2 [
"0 0 1 "
"0 1 2 1 "
"1 2 4 2 1 "
"0 1 2 1 "
"0 0 1 "
]
newbrush "Square 3x3" 1 1 [
"1 1 1 "
"1 1 1 "
"1 1 1 "
]
newbrush "Square 5x5" 2 2 [
"1 1 1 1 1 "
"1 1 1 1 1 "
"1 1 1 1 1 "
"1 1 1 1 1 "
"1 1 1 1 1 "
]
newbrush "Square 7x7" 3 3 [
"1 1 1 1 1 1 1 "
"1 1 1 1 1 1 1 "
"1 1 1 1 1 1 1 "
"1 1 1 1 1 1 1 "
"1 1 1 1 1 1 1 "
"1 1 1 1 1 1 1 "
"1 1 1 1 1 1 1 "
]
newbrush "Smooth 3x3" 1 1 [
"0 0 0 "
"0 "
"0 "
]
newbrush "Smooth 5x5" 2 2 [
"0 0 0 0 0 "
"0 "
"0 "
"0 "
"0 "
]
newbrush "Smooth 7x7" 3 3 [
"0 0 0 0 0 0 0"
"0 "
"0 "
"0 "
"0 "
"0 "
"0 "
]
newbrush "Noise 25x25" 12 12 [
"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 "
""
"0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 1 "
"0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 2 2 "
"0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 "
"0 0 0 0 0 1 0 0 0 0 0 2 0 0 0 0 1 0 0 0 1 1 0 0 1 "
"0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 1 0 0 0 0 2 "
"0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 2 "
"0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 1 "
"0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 1 "
"0 1 0 2 0 1 1 1 1 0 0 1 0 0 0 0 1 "
"0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 "
"1 0 1 0 0 0 0 0 1 0 0 0 1 0 1 "
"0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 0 0 1 0 0 0 0 1 0 0 1 "
"0 1 1 1 0 3 0 2 0 0 0 1 1 0 0 0 1 1 "
"0 0 1 0 0 1 0 0 1 0 1 1 0 1 0 0 0 0 0 1 "
"0 0 1 1 0 0 0 0 2 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 1 "
"0 1 1 0 1 0 0 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 1 "
"1 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 1 "
"0 0 0 1 0 0 1 0 1 1 0 0 0 0 0 0 0 1 "
"0 0 0 0 0 0 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 1 "
"0 0 0 0 1 0 1 1 0 2 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 "
"0 0 0 0 0 0 0 0 0 1 0 1 "
"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 "
]
do [ brush_2 ] // 421
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
//Texture blending
addblendbrush "Circle 8px soft" "packages/brushes/circle_8_soft.png"
addblendbrush "Circle 8px hard" "packages/brushes/circle_8_hard.png"
addblendbrush "Circle 8px solid" "packages/brushes/circle_8_solid.png"
addblendbrush "Circle 16px soft" "packages/brushes/circle_16_soft.png"
addblendbrush "Circle 16px hard" "packages/brushes/circle_16_hard.png"
addblendbrush "Circle 16px solid" "packages/brushes/circle_16_solid.png"
addblendbrush "Circle 32px soft" "packages/brushes/circle_32_soft.png"
addblendbrush "Circle 32px hard" "packages/brushes/circle_32_hard.png"
addblendbrush "Circle 32px solid" "packages/brushes/circle_32_solid.png"
addblendbrush "Circle 64px soft" "packages/brushes/circle_64_soft.png"
addblendbrush "Circle 64px hard" "packages/brushes/circle_64_hard.png"
addblendbrush "Circle 64px solid" "packages/brushes/circle_64_solid.png"
addblendbrush "Circle 128px soft" "packages/brushes/circle_128_soft.png"
addblendbrush "Circle 128px hard" "packages/brushes/circle_128_hard.png"
addblendbrush "Circle 128px solid" "packages/brushes/circle_128_solid.png"
addblendbrush "Noise 64px" "packages/brushes/noise_64.png"
addblendbrush "Noise 128px" "packages/brushes/noise_128.png"
addblendbrush "Square 16px hard" "packages/brushes/square_16_hard.png"
addblendbrush "Square 16px solid" "packages/brushes/square_16_solid.png"
addblendbrush "Square 32px hard" "packages/brushes/square_32_hard.png"
addblendbrush "Square 32px solid" "packages/brushes/square_32_solid.png"
addblendbrush "Square 64px hard" "packages/brushes/square_64_hard.png"
addblendbrush "Square 64px solid" "packages/brushes/square_64_solid.png"
addblendbrush "Gradient 16px" "packages/brushes/gradient_16.png"
addblendbrush "Gradient 32px" "packages/brushes/gradient_32.png"
addblendbrush "Gradient 64px" "packages/brushes/gradient_64.png"
addblendbrush "Gradient 128px" "packages/brushes/gradient_128.png"

BIN
data/crosshair.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

BIN
data/cube.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
data/cube2badge.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

200
data/default_map_models.cfg Normal file
View File

@ -0,0 +1,200 @@
mapmodelreset // start counting from 0 again
mmodel "tree1" // 0
mmodel "dcp/tree2" // 1
mmodel "dcp/tree3" // 2
mmodel "dcp/palmtree" // 3
mmodel "dcp/thorns" // 4
mmodel "dcp/plant1" // 5
mmodel "dcp/grass" // 6
mmodel "dcp/ivy" // 7
mmodel "dcp/barrel" // 8
mmodel "dcp/streetlamp" // 9
mmodel "dcp/bench" // 10
mmodel "dcp/pillar" // 11
mmodel "dcp/waterbowl" // 12
mmodel "dcp/jumppad2" // 13
mmodel "dcp/leafs" // 14
mmodel "dcp/valve" // 15
mmodel "dcp/palette" // 16
mmodel "dcp/vent" // 17
mmodel "dcp/mushroom" // 18
mmodel "dcp/biotank" // 19
mmodel "dcp/groundlamp" // 20
mmodel "dcp/console" // 21
mmodel "dcp/turret" // 22
// for use as triggers:
mmodel "carrot" // 23
mmodel "switch1" // 24
mmodel "switch2" // 25
mmodel "doors/door_01" // 26
mmodel "doors/door_02" // 27
mmodel "doors/door_03" // 28
// useful default triggers to use with these:
level_trigger_1 = [
if (= $triggerstate -1) [echo "This door is opened elsewhere."]
]
mmodel "dcp/cask" // 29
mmodel "dcp/cart" // 30
mmodel "dcp/candle" // 31
mmodel "dcp/vase" // 32
mmodel "dcp/sack" // 33
mmodel "dcp/chandelier" // 34
mmodel "dcp/chest" // 35
mmodel "dcp/firebowl" // 36
mmodel "dcp/smplant" // 37
mmodel "dcp/insect" // 38
mmodel "dcp/reed" // 39
mmodel "makke/nocamp" // 40
mmodel "makke/strahler" // 41
mmodel "tentus/food-drink/goblet" // 42
mmodel "tentus/food-drink/apple" // 43
mmodel "tentus/food-drink/pear" // 44
mmodel "tentus/food-drink/appleslice" // 45
mmodel "tentus/food-drink/meat" // 46
mmodel "tentus/food-drink/bowl" // 47
mmodel "tentus/food-drink/pieslice" // 48
mmodel "tentus/food-drink/mug" // 49
mmodel "tentus/food-drink/winebottle" // 50
mmodel "tentus/food-drink/pie" // 51
mmodel "tentus/books/flat" // 52
mmodel "tentus/books/multi" // 53
mmodel "tentus/chains/chain" // 54
mmodel "tentus/chains/curvechain" // 55
mmodel "tentus/barrel" // 56
mmodel "tentus/sidebarrel" // 57
mmodel "tentus/pot1" // 58
mmodel "tentus/rope" // 59
mmodel "tentus/ropelamp" // 60
mmodel "tentus/ladder" // 61
mmodel "tentus/fattree" // 62
mmodel "tentus/moneybag" // 63
mmodel "tentus/woodbench" // 64
mmodel "tentus/hammer" // 65
mmodel "tentus/anvil" // 66
mmodel "tentus/spear" // 67
mmodel "tentus/key" // 68
mmodel "tentus/redshield" // 69
mmodel "tentus/greenshield" // 70
mmodel "tentus/bombs" // 71
mmodel "objects/window01" // 72
mmodel "objects/sign01" // 73
mmodel "objects/lamp01" // 74
mmodel "objects/chair01" // 75
mmodel "objects/bed01" // 76
mmodel "vegetation/tree00" // 77
mmodel "vegetation/tree01" // 78
mmodel "vegetation/bush01" // 79
mmodel "vegetation/tree02" // 80
mmodel "vegetation/tree04" // 81
mmodel "vegetation/tree05" // 82
mmodel "vegetation/tree06" // 83
mmodel "vegetation/tree07" // 84
mmodel "vegetation/tree03" // 85
mmodel "objects/window02/window02_1" // 86
mmodel "objects/window02/window02_2" // 87
mmodel "objects/bench01" // 88
mmodel "objects/lantern01" // 89
mmodel "objects/lantern02" // 90
mmodel "objects/woodchop" // 91
mmodel "objects/table01" // 92
mmodel "objects/torch" // 93
mmodel "objects/torch_cold" // 94
mmodel "objects/fire" // 95
mmodel "objects/sail01" // 96
mmodel "objects/well_base" // 97
mmodel "objects/well_roof" // 98
mmodel "objects/lamp02" // 99
mmodel "objects/med_chand" // 100
mmodel "objects/axe" // 101
mmodel "xeno/box1" // 102
mmodel "xeno/box2" // 103
mmodel "vegetation/tree08" // 104
mmodel "vegetation/tree09" // 105
mmodel "vegetation/tree10" // 106
mmodel "vegetation/tree11" // 107
mmodel "vegetation/tree12" // 108
mmodel "vegetation/weeds" // 109
mmodel "psionic/barrel2" // 110
mmodel "psionic/crate4" // 111
mmodel "aftas/machina/machina1" // 112
mmodel "aftas/machina/machina2" // 113
mmodel "mitaman/chainlinkfence" // 114
mmodel "mitaman/floorgrate1" // 115
mmodel "mitaman/floorgrate3" // 116
mmodel "mitaman/locker1" // 117
mmodel "mitaman/locker3" // 118
mmodel "objects/minekart" // 119
mmodel "objects/oillamp" // 120
mmodel "objects/millblade" // 121
mmodel "makke/mugs/mug01" // 122
mmodel "makke/mugs/mug02" // 123
mmodel "makke/mugs/mug03" // 124
mmodel "aftas/caixa" // 125
mmodel "aftas/lampada" // 126
mmodel "aftas/arvores/arg" // 127
mmodel "aftas/arvores/arp" // 128
mmodel "makke/arch" // 129
mmodel "makke/fork" // 130
mmodel "makke/moon" // 131
mmodel "makke/planet" // 132
mmodel "makke/spoon" // 133
mmodel "makke/tricky/sign1" // 134
mmodel "makke/tricky/sign2" // 135
mmodel "makke/tricky/sign3" // 136
mmodel "makke/tricky/sign4" // 137
mmodel "dcp/hanginlamp" // 138
mmodel "tentus/magic" // 139
mmodel "dcp/bin" // 140
mmodel "dcp/bulb" // 141
mmodel "dcp/cbbox" // 142
mmodel "dcp/grate" // 143
mmodel "dcp/switch2a" // 144
mmodel "dcp/ventflap" // 145
mmodel "mitaman/door_06" // 146
mmodel "mitaman/door_07" // 147
mmodel "mitaman/door_08" // 148
mmodel "mitaman/door_09" // 149
mmodel "mitaman/door_10" // 150
mmodel "mitaman/plat01" // 151
mmodel "mitaman/wirefence" // 152
mmodel "mitaman/woodboard" // 153
mmodel "steve_e/doors/trapdoor" // 154
mmodel "steve_e/doors/trapdoor/trapdoor_150" // 155
mmodel "steve_e/doors/trapdoor/trapdoor_200" // 156
mmodel "doors/door_04" // 157
mmodel "dcp/blade_x" // 158
mmodel "dcp/blade_y" // 159
//Justice
mmodel "mapmodels/justice/pad/jump" // 160
mmodel "mapmodels/justice/pad/teleport" // 161
mmodel "mapmodels/justice/pad/teledest" // 162
mmodel "mapmodels/justice/block" // 163
mmodel "mapmodels/justice/exit-sign" // 164
mmodel "mapmodels/justice/vending" // 165
mmodel "mapmodels/justice/railings/01" // 166
mmodel "mapmodels/justice/railings/02" // 167
mmodel "angel" // 168
mmodel "crow" // 169

View File

@ -0,0 +1,108 @@
// default settings for maps
// on every map load, this file will be executed, followed by
// "package.cfg" in the package dir of the map, and "<mapname>.cfg",
// which you can use to override the settings in this file.
// default music to be played for this map:
playasong
exec "data/default_map_models.cfg"
// the skybox for this map:
if (strcmp $skybox "") [
skybox "skyboxes/remus/sky01"
]
materialreset
texture water "golgotha/water2.jpg" // water surface
texture 1 "textures/waterfall.jpg" // waterfall
texture 1 "textures/watern.jpg" // water normals
texture 1 "textures/waterdudv.jpg" // water distortion
texture 1 "textures/waterfalln.jpg" // waterfall normals
texture 1 "textures/waterfalldudv.jpg" // waterfall distortion
texture lava "dg/floor_lava2.jpg" 0 0 0 2 // lava surface
texture 1 "dg/floor_lava2.jpg" 0 0 0 2 // falling lava
// texture definitions for the map:
texturereset // starts the texture slot/index at 0
setshader stdworld // use default world shader unless specified otherwise
texture 0 "textures/sky.png" // dummy sky texture
texture 0 "textures/default.png" // default geometry texture
texture 0 "aard/aardograss_1.jpg"
autograss "<agrad:0,0.2>textures/grass_aard.png"
texture 0 "ik2k/ik_floor_brick128a.jpg"
texture 0 "ik2k/ik_floor_wood128b.jpg"
texture 0 "ik2k/ik_ground_cobbles128.jpg"
texture 0 "ik2k/ik_brick_3216d.jpg"
texture 0 "ik2k/ik_brick_6464c.jpg"
exec "packages/dg/package.cfg"
exec "packages/tech1soc/package.cfg"
exec "packages/ik2k/package.cfg"
exec "packages/ikbase/package.cfg"
exec "packages/payne/package.cfg"
exec "packages/than_ind/package.cfg"
exec "packages/jf1/package.cfg"
// misc textures (mine/schwenz/some tech1soc)
texture 0 "aard/aardfdry256_1.jpg"
texture 0 "tech1soc/spring3.jpg"
texture 0 "tech1soc/sqrlig02wb.jpg"
texture 0 "tech1soc/sqrlig03bc.jpg"
texture 0 "tech1soc/zdetlig01bb.jpg"
texture 0 "tech1soc/zdetlig02bb.jpg"
texture 0 "aard/aardmbr16_2.jpg"
texture 0 "tech1soc/zdetlig04bb.jpg"
texture 0 "tech1soc/zdet_trim2a.jpg"
texture 0 "aard/aardmmet32_1.jpg"
texture 0 "tech1soc/zdet_trim5b.jpg"
texture 0 "schwenz/dt_tile_check.01.jpg"
exec "packages/egyptsoc/package.cfg"
exec "packages/rorschach/package2.cfg"
exec "packages/subverse/package.cfg"
exec "packages/g_pack/package.cfg"
// 2 missing jf textures
texture 0 "jf1/jfsquare.jpg"
texture 0 "jf1/jfyellow.jpg"
// 2 missing tech1soc
texture 0 "tech1soc/jp11a.jpg"
texture 0 "tech1soc/flr_tmtl_drk.jpg"
exec packages/lunaran/package.cfg
exec packages/gibbie/package.cfg
exec packages/philipk/package.cfg
exec packages/gor/package.cfg
exec packages/aftas/package.cfg
exec packages/mitaman/package.cfg
exec packages/noctua/package.cfg
exec packages/loopix/package.cfg
exec packages/g_pack/package2.cfg
//Misc textures
setshader stdworld
texture 0 "textures/nieb/rock01.jpg"
setshader bumpspecmapworld
setshaderparam "specscale" 0.25 0.25 0.25
texture 0 "ikbase/specialbrick.jpg"
texture n "ikbase/specialbrick_normal.jpg"
exec packages/painkillah/package.cfg
exec packages/tomek/package.cfg
exec packages/textures/nieb/package.cfg
exec packages/trak5/package.cfg
exec packages/textures/nieb/garden/package.cfg
// for cfgs that don't set shaders...
setshader stdworld

248
data/defaults.cfg Normal file
View File

@ -0,0 +1,248 @@
// these default settings get executed whenever "config.cfg" is not available
// do not modify anything below, instead change settings in game, or add to autoexec.cfg
name "unnamed"
invmouse 0 // 1 for flightsim mode
sensitivity 3 // similar number to quake
fov 100 // 90 is default in other games
musicvol 60 // set higher if you want (max 255)
soundvol 255 // sounds average volume is actually set per sound, average 100
gamma 100 // set to your liking, 100 = default
fullbrightmodels 60 // make player models a bit easier to see
// console
consize 5 // console is 5 lines
miniconsize 5 // mini-console is 5 lines
miniconwidth 40 // mini-console is 40% of screen width
fullconsize 75 // full console is 75% of screen height
miniconfilter 0x300 // display chat and team chat in mini-console
confilter (&~ 0x2FFF $miniconfilter) // don't display other player frags or mini-console stuff in console
fullconfilter 0xFFFF // display all messages in full console
// WASD
bind W forward
bind A left
bind S backward
bind D right
bind UP "forward"
bind DOWN "backward"
bind RIGHT "right"
bind LEFT "left"
// old style weapon binds
//bind 0 "weapon 0 1 2"
//bind 1 "weapon 1 2 4"
//bind 2 "weapon 2 1 4"
//bind 3 "weapon 3 4 2"
//bind 4 "weapon 4 3 2"
//bind 5 "weapon 5 3 1"
//bind 6 "weapon 6 2 4"
// new style weapon binds
bind 0 "setweapon FI"
bind 1 "setweapon SG"
bind 2 "setweapon CG"
bind 3 "setweapon RL"
bind 4 "setweapon RI"
bind 5 "setweapon GL"
bind 6 "setweapon PI"
bind 7 "setweapon FI"
bind SPACE "jump"
bind MOUSE2 "jump"
bind MOUSE1 "attack"
bind MOUSE3 "weapon"
specbind MOUSE1 "nextfollow"
specbind MOUSE2 "nextfollow -1"
specbind MOUSE3 "follow"
specbind SPACE "follow"
bind R dropflag
bind TAB "showscores"
bind T "saycommand"
bind Y "sayteamcommand"
bind BACKQUOTE "saycommand /"
bind SLASH "saycommand /"
bind I taunt
bind E edittoggle
bind LCTRL "allowspedit"
bind RCTRL "allowspedit"
bind KP_MINUS "conskip 5"
bind KP_PLUS "conskip -1000"
bindvar F1 paused
bindvar PAUSE paused
bind F11 "toggleconsole"
bind F12 "screenshot"
bind INSERT "addbot"
bind DELETE "delbot"
hudgun 1
//////////////////////////////////
// universal scrollwheel + modifier commands:
defaultmodifier = 0
modifier = $defaultmodifier
domodifier = [ modifier = $arg1; onrelease [ modifier = $defaultmodifier ] ]
universaldelta = [
do [delta_@(if $editing [ result edit ] [ result game ])_@modifier @arg1]
]
bind MOUSE4 [ universaldelta 1 ] // also used for editing, see below
bind MOUSE5 [ universaldelta -1 ]
//////////////////////////////////
delta_game_0 = [ if (= $arg1 1) [ weapon 2 3 5 4 1 6 0 ] [ weapon 4 1 6 2 3 5 0 ] ]
//zfov = 120
//delta_game_1 = [
// zfov = (+ $zfov (* $arg1 (div $zfov -5)))
// if (< $zfov 10) [ zfov = 10 ]
// if (> $zfov 120) [ zfov = 120 ]
// fov $zfov
//]
//bind G [ domodifier 1 ]
bind G [ togglezoom ]
bind Z [ togglezoom ]
//////////////////////////////////
// Sauerbraten Editing related bindings
// found in autoexec.cfg in your sauerbraten directory
editbind SPACE [ cancelsel ]
editbind MOUSE1 [ if $blendpaintmode [paintblendmap] [editdrag] ]
editbind MOUSE3 [ selcorners ]
editbind MOUSE2 [ if $blendpaintmode [rotateblendbrush] [editextend] ]
editbind J [ gotosel ]
editbind KP_ENTER [ entselect insel ]
editbind N [ selentfindall ]
editbind LSHIFT [ editcut ]
editbindmod LCTRL [ passthrough ]
editbindmod LALT [ hmapedit ]
editbind DELETE [ editdel ]
editbind T [ saycommand ]
editbind X [ editflip ]
editbind C [ editcopy ]
editbind V [ editpaste ]
editbind Z [ undo; passthroughsel 0]
editbind U [ undo; passthroughsel 0]
editbind I [ redo ]
editbind H [ if $hmapedit [ editface 1 -1 ] [ hmapedit 1 ] ]
editbind O [ domodifier 15 ] // vSlot: offset H
editbind P [ domodifier 16 ] // vSlot: offset V
editbindvar 5 hidehud
editbindvar 6 entselsnap
editbindvar 7 outline
editbindvar 8 wireframe
bindvar 9 thirdperson
editbindvar 0 allfaces
editbind K calclight
editbindvar L fullbright
editbindvar M showmat
editbind PERIOD selentedit
editbind F2 showtexgui
editbind F3 [if (cleargui 1) [] [showentgui]]
editbind F4 [if (cleargui 1) [] [showgui mapmodels]]
editbind F5 savemap
editbind F6 [ notepad (mapcfgname) ]
editbind F9 [echo (getseltex) : (gettexname (getseltex))] // echo texture info
// commands below are used with scroll wheel (and universaldelta).
// if you have no scroll wheel or don't want to use it,
// you can either change the binds of universaldelta
// ex: bind MOUSE4 [ universaldelta 1 ]
// bind MOUSE5 [ universaldelta -1 ]
// can be changed to:
// bind PAGEUP [ universaldelta 1 ]
// bind PAGEDOWN [ universaldelta -1 ]
// so that the PAGEUP and PAGEDOWN key act just like a scroll wheel
//
// or you can rebind all the commands to seperate keys
// ex: bind T [ domodifier 6 ]
// can be changed to:
// bind HOME [ edittex 1 ]
// bind END [ edittex -1 ]
editbind G [ domodifier 1 ] // domodifier 1 -> executes delta_edit_1
editbind F [ domodifier 2 ] // etc...
editbind Q [ domodifier 3 ]
editbind R [ domodifier 4 ]
editbind Y [ domodifier 6 ]
editbind B [ domodifier 9 ]
editbind COMMA [ domodifier 10; onrelease entautoview ]
delta_edit_0 = [
if $blendpaintmode [
scrollblendbrush $arg1
] [
editfacewentpush $arg1 1 // Fill and Empty cube
]
]
delta_edit_1 = [ nodebug [ gridpower (+ $arg1 $gridpower) ] ]
delta_edit_2 = [ editfacewentpush $arg1 0 ] // push face/corners selected
delta_edit_3 = [ editfacewentpush $arg1 2 ] // push corner pointed at by cursor
delta_edit_4 = [ if $blendpaintmode [rotateblendbrush $arg1] [editrotate $arg1] ] // rotate 90 degrees
delta_edit_5 = [ entproperty 0 $arg1 ] // and the others
delta_edit_6 = [ edittex $arg1 ] // change textures
delta_edit_9 = [ selectbrush $arg1 ] // change heightmap brushes
delta_edit_10 = [ entautoview $arg1 ]
editbind 1 [ domodifier 11 ]
editbind 2 [ domodifier 12 ]
editbind 3 [ domodifier 13 ]
editbind 4 [ domodifier 14 ]
delta_edit_11 = [ entproperty 0 (* $arg1 $multiplier) ]
delta_edit_12 = [ entproperty 1 (* $arg1 $multiplier) ]
delta_edit_13 = [ entproperty 2 (* $arg1 $multiplier) ]
delta_edit_14 = [ entproperty 3 (* $arg1 $multiplier) ]
delta_edit_15 = [ vdelta [voffset (* $arg1 $multiplier2) 0] ] // vSlot: offset H
delta_edit_16 = [ vdelta [voffset 0 (* $arg1 $multiplier2)] ] // vSlot: offset V
delta_edit_17 = [ vdelta [vrotate $arg1] ] // vSlot: rotate
delta_edit_18 = [ vdelta [vscale (if (< $arg1 0) 0.5 2)] ] // vSlot: scale
//editbind LALT [multiplier = 10;onrelease [multiplier = 1]]
//editbind RALT [multiplier2 = 32;onrelease [multiplier2 = 16]]
multiplier = 1
multiplier2 = 16
//Blendmap Painting
editbind KP0 [setblendpaintmode 0]
editbind KP1 [setblendpaintmode 1]
editbind KP2 [setblendpaintmode 2]
editbind KP3 [setblendpaintmode 3]
editbind KP4 [setblendpaintmode 4]
editbind KP5 [setblendpaintmode 5]
editbind KP8 [scrollblendbrush -1]
editbind KP9 [scrollblendbrush 1]

3
data/font.cfg Normal file
View File

@ -0,0 +1,3 @@
exec "packages/fonts/default.cfg"
exec "packages/hud/digit_font.cfg"

74
data/game_fps.cfg Normal file
View File

@ -0,0 +1,74 @@
// fps specific cfg stuff goes here
togglezoom = [ zoom (if (= $zoom 1) -1 1) ]
sayteamcommand = [inputcommand (if (>= $numargs 1) [result $arg1] [result ""]) [sayteam $commandbuf] "[team]"]
mapcomplete = [ complete $arg1 packages/base ogz ]
mapcomplete map
modenames = "ffa coop teamplay insta instateam effic efficteam tac tacteam capture regencapture ctf instactf protect instaprotect hold instahold efficctf efficprotect effichold collect instacollect efficcollect"
loop i (listlen $modenames) [
mname = (at $modenames $i)
alias $mname [ if (mode @i) [if (> $numargs 0) [map $arg1] [map]] ]
mapcomplete $mname
]
spmodenames = "sp dmsp"
loop i (listlen $spmodenames) [
mname = (at $spmodenames $i)
alias $mname [ if (mode (- @i 3)) [if (> $numargs 0) [map $arg1] [map]] ]
mapcomplete $mname
]
complete importcube packages/cube cgz
demo = [ stopdemo; if (mode -1) [if (> $numargs 0) [map $arg1] [map]] ]
complete demo . dmo
speditlock = 1
allowspedit = [ speditlock = 0; onrelease [speditlock = 1] ]
allowedittoggle = [
if (&& (m_sp (getmode)) $speditlock) [
error "you must hold" (prettylist (searchbinds "allowspedit") "or") "to toggle editing in single player modes"
result 0
] [
result 1
]
]
playermodelnum = 5
playermodeldir0 = "mrfixit"
playermodelicon0 = "mrfixit"
playermodelname0 = "Mr. Fixit"
playermodelstory0 = [Which orc do you choose when the mission calls for an all-purpose wrecking machine? Who do you call when the odds are stacked against you? Mr. Fixit, that's who. Gifted with the ability to perform deconstructive surgery with any weapon, this orc gets the job done fast and with extreme prejudice.]
playermodeldir1 = "snoutx10k"
playermodelicon1 = "snoutx10k"
playermodelname1 = "IronSnout X10K"
playermodelstory1 = [IronSnout X10K is a hybrid model of the IronSnout series. Bred in the bowels of a top secret underground facility, this walking fragging machine is for one purpose: to annihilate the opposition. Part pig, part machine, IronSnout X10K knows no fear and fears no fragger.]
playermodeldir2 = "ogro2"
playermodelicon2 = "ogro"
playermodelname2 = "Ogro"
playermodelstory2 = [Ogro is smaller than a normal ogre, but just as fat and only slightly less stupid. As opposed to common belief, he is not an evil creature, only killing as is absolutely necessary.]
playermodeldir3 = "inky"
playermodelicon3 = "inky"
playermodelname3 = "Inky"
playermodelstory3 = [Inky is the aspiring younger sibling of an infamous transdimensional celebrity. Often teased as being only the "Lesser Evil", Inky searches the battlefields for infamy of his own, claiming it one fragger at a time.]
playermodeldir4 = "captaincannon"
playermodelicon4 = "captaincannon"
playermodelname4 = "Captain Cannon"
playermodelstory4 = [Cannon Jones dared to imbibe the old imported beer can that had languished at the bottom of his refrigerator. Unbeknownst to Cannon, it had been bombarded with stray gamma radiation. After some serious indigestion, the mild-mannered Cannon Jones became the mighty Captain Cannon! Captain Cannon now has only one known weakness: his overbearingly righteous sense of justice.]
playermodeldir = [getalias (concatword "playermodeldir" (if (> $numargs 0) [result $arg1] [result $playermodel]))]
playermodelicon = [getalias (concatword "playermodelicon" (if (> $numargs 0) [result $arg1] [result $playermodel]))]
playermodelname = [getalias (concatword "playermodelname" (if (> $numargs 0) [result $arg1] [result $playermodel]))]
playermodelstory = [getalias (concatword "playermodelstory" (if (> $numargs 0) [result $arg1] [result $playermodel]))]
playasong = [ music (concatword "fanatic/" (+ 1 (rnd 8)) ".ogg") playasong ]
playasong

240
data/game_rpg.cfg Normal file
View File

@ -0,0 +1,240 @@
// rpg specific cfg stuff goes here -- see rpg.html for more clarity
// for the rpg, almost all gameplay is defined _per map_ as opposed to globally for the game
// but for now a lot of stuff goes here for testing
playasong = []
// these are the log curve settings for computing efficiency based on points. do not modify if you don't know what these do.
r_def_logscale_x = 10
r_def_logscale_y = 25
r_def_melee $r_def_logscale_x $r_def_logscale_y
r_def_ranged $r_def_logscale_x $r_def_logscale_y
r_def_magic $r_def_logscale_x $r_def_logscale_y
r_def_hpregen $r_def_logscale_x $r_def_logscale_y
r_def_manaregen $r_def_logscale_x $r_def_logscale_y
r_def_maxhp $r_def_logscale_x $r_def_logscale_y
r_def_maxmana $r_def_logscale_x $r_def_logscale_y
r_def_attackspeed $r_def_logscale_x $r_def_logscale_y
r_def_movespeed $r_def_logscale_x $r_def_logscale_y
r_def_jumpheight $r_def_logscale_x $r_def_logscale_y
r_def_tradeskill $r_def_logscale_x $r_def_logscale_y
r_def_feared $r_def_logscale_x $r_def_logscale_y
r_def_stealth $r_def_logscale_x $r_def_logscale_y
r_def_hostility $r_def_logscale_x $r_def_logscale_y
r_def_stata $r_def_logscale_x $r_def_logscale_y
r_def_statb $r_def_logscale_x $r_def_logscale_y
r_def_statc $r_def_logscale_x $r_def_logscale_y
//showcharacterboundingbox 1
// some useful functions...
newrpgspawn = [ newent spawn; spawnname $arg1; ]
r_inventory = [ r_spawn $arg1; r_contain 1; r_pop ]
r_loot = [ r_spawn $arg1; r_contain 2; r_pop ]
r_fortrade = [ r_spawn $arg1; r_contain 4; r_pop ]
r_sound = [ r_usesound (registersound $arg1) ]
// all the objects in the game:
// that's us
spawn_player = [
r_inventory apple
r_inventory power_gem
r_inventory fist // starting weapon
r_inventory sword
r_inventory fireball
r_inventory iceball
r_inventory healing
r_inventory crossbow
r_gold 10 // give us some starting money, woo
r_ai 1 // just so it is in the same group as the npcs for attacks etc
]
r_meleeweapon = [
r_usetype 1
r_damage $arg1
r_attackrate $arg2
r_maxrange $arg3
r_maxangle $arg4
r_action_use [ r_dodamage (r_eff_melee) ]
]
r_rangedweapon = [
r_usetype 2
r_damage $arg1
r_attackrate $arg2
r_maxrange $arg3
r_useamount 10 // comes with arrows included
r_action_use [ r_dodamage (r_eff_ranged) ]
r_sound "free/tick"
]
r_spell = [
r_usetype 3
r_damage $arg1
r_attackrate $arg2
r_manacost $arg3
r_maxrange $arg4
r_effectparticle (at $arg5 0)
r_effectcolor (at $arg5 1)
r_effectsize (at $arg5 2)
r_sound $arg6
r_action_use $arg7
]
// weapons
spawn_fist = [ r_meleeweapon 10 500 20 30; r_sound "free/punch1"; r_use ] // this will be equipped when we start
spawn_sword = [ r_meleeweapon 15 750 30 30; r_sound "free/tick" ]
spawn_hammer = [ r_meleeweapon 5 250 20 20; r_sound "free/tick"; r_model "tentus/hammer" ]
spawn_bomb = [ r_meleeweapon 30 1000 90 90; r_sound "free/tick"; r_model "tentus/bombs" ]
spawn_spear = [ r_meleeweapon 10 1000 60 60; r_sound "free/tick"; r_model "tentus/spear" ]
spawn_crossbow = [ r_rangedweapon 5 1000 256 ]
r_dodamage = [
damage = (r_get_damage)
r_pop
r_applydamage (div (* $damage $arg1) 100)
]
r_givehealth = [
r_pop
r_hp (+ (r_get_hp) $arg1) // temp, needs to be capped
]
r_givemana = [
r_pop
r_mana (+ (r_get_mana) $arg1)
]
// spells, can be used as weapons
spawn_fireball = [ r_spell 7 500 10 256 [0 0xFFC8C8 480] "awesund/flaunch" [ r_dodamage (r_eff_magic) ] ]
spawn_iceball = [ r_spell 10 400 20 256 [1 0xFFFFFF 480] "awesund/flaunch" [ r_dodamage (r_eff_magic) ] ]
spawn_healing = [ r_spell 0 1000 25 0 [] "free/itempick" [ r_givehealth 20 ] ]
// single-use spells, activated in inventory, or in the gameworld:
spawn_healthpotion = [ r_useamount 1; r_action_use [ r_givehealth 20 ]; r_sound "free/itempick"; r_model "tentus/food-drink/winebottle" ]
spawn_manapotion = [ r_useamount 1; r_action_use [ r_givemana 20 ]; r_sound "free/itempick"; r_model "tentus/food-drink/winebottle" ]
// defensive
spawn_green_shield = [ r_worth 500; r_hpregen 20; r_model "tentus/greenshield" ]
spawn_red_shield = [ r_worth 1000; r_hpregen 50; r_model "tentus/redshield" ]
// food/drink
spawn_apple = [ r_worth 10; r_model "tentus/food-drink/apple" ]
spawn_apple_slice = [ r_worth 1; r_model "tentus/food-drink/appleslice" ]
spawn_carrot = [ r_worth 1; r_model "carrot" ]
spawn_pear = [ r_worth 15; r_model "tentus/food-drink/pear" ]
spawn_pie = [ r_worth 20; r_model "tentus/food-drink/pie" ]
spawn_pie_slice = [ r_worth 5; r_model "tentus/food-drink/pieslice" ]
spawn_mushroom = [ r_worth 5; r_model "dcp/mushroom" ]
spawn_wolfmeat = [ r_worth 4; r_model "tentus/food-drink/meat" ]
spawn_wine = [ r_worth 30; r_model "tentus/food-drink/winebottle" ]
// valuables
spawn_power_gem = [ r_worth 100; r_melee 100; r_model "checkpoint" ]
spawn_coin = [ r_worth 10; r_model "rpg/objects/coin" ]
spawn_key = [ r_worth 10; r_model "tentus/key" ]
spawn_loot = [ r_worth 100; r_model "tentus/moneybag" ]
// misc
spawn_anvil = [ r_worth 20; r_model "tentus/anvil" ]
spawn_books = [ r_worth 5; r_model "tentus/books" ]
spawn_bowl = [ r_worth 5; r_model "tentus/food-drink/bowl" ]
spawn_goblet = [ r_worth 10; r_model "tentus/food-drink/goblet" ]
spawn_mug = [ r_worth 5; r_model "tentus/food-drink/mug" ]
spawn_candle = [ r_worth 2; r_model "dcp/candle" ]
spawn_cask = [ r_worth 30; r_model "dcp/cask" ]
spawn_rope = [ r_worth 10; r_model "dcp/rope" ]
spawn_sack = [ r_worth 10; r_model "dcp/sack" ]
spawn_wolfskin = [ r_worth 15 ]
spawn_vase = [ r_worth 20; r_model "dcp/vase" ]
// stats
spawn_fountainofmana = [ r_manaregen 10000 ]
// npcs
spawn_mman = [
r_friendly_creature "rpg/characters/mman"
r_gold 1000 // rich bastard
r_inventory red_shield // he's going to be hard to kill
r_inventory iceball // better not aggrevate him
r_inventory fountainofmana
r_fortrade apple // ooh the guy carries an apple. Maybe we can trade?
r_fortrade apple
r_action "hi" [ r_say "hey, how are you!" ]
r_action "I'm hungry" [
r_say "kill a wolf for me, and I will give you an apple"
r_quest "I killed a wolf" [
r_take wolfskin [
r_say "thanks for the wolf's skin, here's your apple"
r_give apple
] [
r_say "go kill a wolf first!"
]
]
]
]
r_friendly_creature = [
r_model $arg1
r_ai 1
]
r_hostile_creature = [
r_model $arg1
r_ai 2
r_meleeweapon $arg2 1000 $arg3 30 // this creature is itself a melee weapon
]
spawn_npcman = [ r_friendly_creature "rpg/characters/npcman"; r_inventory sword ]
spawn_horse = [ r_friendly_creature "rpg/characters/horse" ]
spawn_dragon = [ r_hostile_creature "rpg/characters/dragon" 80 100 ]
spawn_wolf = [ r_hostile_creature "rpg/characters/wolf" 10 30; r_loot wolfskin; r_loot wolfmeat ]
spawn_rat = [ r_hostile_creature "rpg/characters/rat" 2 25 ]
spawn_grizzly = [ r_hostile_creature "rpg/characters/grizzly" 20 40 ]
// temp: override main menu for rpg
bind I "showplayergui 1; cleargui 1"
bind TAB "showplayergui 2; cleargui 1"
bind L "showplayergui 3; cleargui 1"
bind ESCAPE [if (cleargui 1) [] [showgui main; showplayergui 0]]
newgui main [
guibutton "inventory (I)" "showplayergui 1" "chest"
guibutton "player stats (TAB)" "showplayergui 2" "info"
guibutton "quest log (L)" "showplayergui 3" "info"
guibar
guibutton "map k_rpg1"
guibutton "map rpg_01"
guibar
guibutton "load fps map.." "showgui maps"
guibutton "editing.." "showgui editing"
guibutton "options.." "showgui options"
guibutton "about.." "showgui about"
guibar
guibutton "quit" "quit" "exit"
]

2431
data/glsl.cfg Normal file

File diff suppressed because it is too large Load Diff

BIN
data/guicursor.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
data/guioverlay.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
data/guiskin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

BIN
data/guislider.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
data/hit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

142
data/keymap.cfg Normal file
View File

@ -0,0 +1,142 @@
// do not modify, use "bind" in autoexec.cfg instead
keymap -1 MOUSE1
keymap -3 MOUSE2
keymap -2 MOUSE3
keymap -4 MOUSE4
keymap -5 MOUSE5
keymap -6 MOUSE6
keymap -7 MOUSE7
keymap -8 MOUSE8
keymap 8 BACKSPACE
keymap 9 TAB
keymap 12 CLEAR
keymap 13 RETURN
keymap 19 PAUSE
keymap 27 ESCAPE
keymap 32 SPACE
keymap 33 EXCLAIM
keymap 34 QUOTEDBL
keymap 35 HASH
keymap 36 DOLLAR
keymap 38 AMPERSAND
keymap 39 QUOTE
keymap 40 LEFTPAREN
keymap 41 RIGHTPAREN
keymap 42 ASTERISK
keymap 43 PLUS
keymap 44 COMMA
keymap 45 MINUS
keymap 46 PERIOD
keymap 47 SLASH
keymap 48 0
keymap 49 1
keymap 50 2
keymap 51 3
keymap 52 4
keymap 53 5
keymap 54 6
keymap 55 7
keymap 56 8
keymap 57 9
keymap 58 COLON
keymap 59 SEMICOLON
keymap 60 LESS
keymap 61 EQUALS
keymap 62 GREATER
keymap 63 QUESTION
keymap 64 AT
keymap 91 LEFTBRACKET
keymap 92 BACKSLASH
keymap 93 RIGHTBRACKET
keymap 94 CARET
keymap 95 UNDERSCORE
keymap 96 BACKQUOTE
keymap 97 A
keymap 98 B
keymap 99 C
keymap 100 D
keymap 101 E
keymap 102 F
keymap 103 G
keymap 104 H
keymap 105 I
keymap 106 J
keymap 107 K
keymap 108 L
keymap 109 M
keymap 110 N
keymap 111 O
keymap 112 P
keymap 113 Q
keymap 114 R
keymap 115 S
keymap 116 T
keymap 117 U
keymap 118 V
keymap 119 W
keymap 120 X
keymap 121 Y
keymap 122 Z
keymap 127 DELETE
keymap 256 KP0
keymap 257 KP1
keymap 258 KP2
keymap 259 KP3
keymap 260 KP4
keymap 261 KP5
keymap 262 KP6
keymap 263 KP7
keymap 264 KP8
keymap 265 KP9
keymap 266 KP_PERIOD
keymap 267 KP_DIVIDE
keymap 268 KP_MULTIPLY
keymap 269 KP_MINUS
keymap 270 KP_PLUS
keymap 271 KP_ENTER
keymap 272 KP_EQUALS
keymap 273 UP
keymap 274 DOWN
keymap 275 RIGHT
keymap 276 LEFT
keymap 277 INSERT
keymap 278 HOME
keymap 279 END
keymap 280 PAGEUP
keymap 281 PAGEDOWN
keymap 282 F1
keymap 283 F2
keymap 284 F3
keymap 285 F4
keymap 286 F5
keymap 287 F6
keymap 288 F7
keymap 289 F8
keymap 290 F9
keymap 291 F10
keymap 292 F11
keymap 293 F12
keymap 294 F13
keymap 295 F14
keymap 296 F15
keymap 300 NUMLOCK
keymap 301 CAPSLOCK
keymap 302 SCROLLOCK
keymap 303 RSHIFT
keymap 304 LSHIFT
keymap 305 RCTRL
keymap 306 LCTRL
keymap 307 RALT
keymap 308 LALT
keymap 309 RMETA
keymap 310 LMETA
keymap 311 LSUPER
keymap 312 RSUPER
keymap 313 MODE
keymap 314 COMPOSE
keymap 315 HELP
keymap 316 PRINT
keymap 317 SYSREQ
keymap 318 BREAK
keymap 319 MENU

11
data/license.txt Normal file
View File

@ -0,0 +1,11 @@
These files:
guioverlay.png
guiskin.png
guislider.png
have been licensed under the
"Creative Commons Deed / Attribution Non-commercial Share-Alike ( at-nc-sa )"
(c) 2006-2007 Markus "makkE" Bekel

BIN
data/loading_bar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

BIN
data/loading_frame.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
data/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

BIN
data/logo_1024.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 KiB

BIN
data/mapshot_frame.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

1453
data/menus.cfg Normal file

File diff suppressed because it is too large Load Diff

88
data/sounds.cfg Normal file
View File

@ -0,0 +1,88 @@
// hardcoded cube sounds (i.e. order matters, and these must always be the first to be registered).
registersound "aard/jump" // 0
registersound "aard/land"
registersound "q009/rifle" // "awesund/rifle" //"free/rifle1"
altsound "q009/rifle2"
altsound "q009/rifle3"
registersound "free/punch1"
registersound "q009/shotgun" 150 // "free/shotgun" //"awesund/shotgun"
altsound "q009/shotgun2" 150
altsound "q009/shotgun3" 150
registersound "q009/minigun" // "awesund/cg1" 90 // "free/chaingun_once" //"awesund/cg2"
altsound "q009/minigun2"
altsound "q009/minigun3"
registersound "q009/rlauncher" // "awesund/rlaunch" //"free/rocketlaunch"
altsound "q009/rlauncher2"
altsound "q009/rlauncher3"
registersound "q009/ren" 150 // "awesund/explode" //"free/rocketl"
altsound "q009/ren2" 150
altsound "q009/ren3" 150
registersound "aard/weapload"
registersound "aard/itempick"
registersound "free/itempick" // 10
registersound "free/tick"
registersound "free/acid6"
registersound "free/itemback"
registersound "free/teleport"
registersound "aard/outofammo"
registersound "free/acid5"
registersound "aard/pain1"
registersound "aard/pain2"
registersound "aard/pain3" // 20
registersound "aard/pain4"
registersound "aard/pain5"
registersound "aard/pain6"
registersound "aard/die1"
registersound "aard/die2"
registersound "q009/glauncher" // "awesund/flaunch"
registersound "awesund/explodemini"
registersound "free/splash1"
registersound "free/splash2"
registersound "aard/grunt1" // 30
registersound "aard/grunt2"
registersound "free/rumble"
registersound "ppm/paino"
registersound "ppm/painr"
registersound "ppm/deathr"
registersound "ppm/paine"
registersound "ppm/deathe"
registersound "ppm/pains"
registersound "ppm/deaths"
registersound "ppm/painb" // 40
registersound "ppm/deathb"
registersound "ppm/painp"
registersound "free/piggrunt2"
registersound "ppm/painh"
registersound "ppm/deathh"
registersound "ppm/paind"
registersound "ppm/deathd"
registersound "free/piggrunt1"
registersound "ppm/iceball"
registersound "ppm/slimeball" // 50
registersound "free/boing_x"
registersound "q009/pistol" // "free/pistol"
altsound "q009/pistol2"
altsound "q009/pistol3"
registersound "blindabuser/base_captured" 150
registersound "blindabuser/base_lost" 150
registersound "blindabuser/fight" 150
registersound "blindabuser/health_boost" 150
registersound "blindabuser/health_boost_in_10_seconds" 150
registersound "blindabuser/quad_damage" 150
registersound "blindabuser/quad_damage_in_10_seconds" 150
registersound "blindabuser/respawn_point_set" 150
registersound "ctf/flagpickup"
registersound "ctf/flagdrop"
registersound "ctf/flagreturn"
registersound "ctf/flagscore"
registersound "ctf/flagreturn"
registersound "soundsnap/burn"
registersound "soundsnap/chainsaw_attack" 150
registersound "soundsnap/chainsaw_idle" 230
registersound "free/hit" 60

314
data/stdedit.cfg Normal file
View File

@ -0,0 +1,314 @@
// implements some editing commands
//////// Entity Editing ///////////////
=enttype = [
|| [strcmp * $arg1] [strcmp (enttype) $arg1]
]
=entattr = [
|| [strcmp * $arg2] [= (entattr $arg1) $arg2]
]
// clear ents of given type
clearents = [
if $editing [
entcancel
entselect [ =enttype $arg1 ];
echo Deleted (enthavesel) $arg1 entities;
delent
]
]
// replace all ents that match current selection
// with the values given
replaceents = [
if $editing [
do [
entfind @(entget)
entset @(loopconcat i $numargs [result $[arg@(+ $i 1)]])
]
echo Replaced (enthavesel) entities
]
]
selentedit = [ saycommand ( concatword "/entset " (entget) ) ]
selreplaceents = [ saycommand ( concatword "/replaceents " (entget) ) ]
selentfindall = [ do [ entfind @(entget) ] ]
// modify given attribute of ent by a given amount
// arg1 attribute
// arg2 value
entproperty = [
entattr $arg1 (+ (entattr $arg1) $arg2)
]
enttypelist = [
light mapmodel playerstart envmap particles sound
shells bullets rockets riflerounds grenades cartridges
health healthboost greenarmour yellowarmour quaddamage
teleport teledest
monster carrot jumppad
base respawnpoint
spotlight
box barrel platform elevator
flag
]
enttypeselect = [
enttypelength = (listlen $enttypelist)
next = (mod (+ (indexof $enttypelist (enttype)) $arg1) $enttypelength)
if (< $next 0) [ next = (+ $next $enttypelength) ]
do [entset @(listsplice (entget) (at $enttypelist $next) 0 1)]
]
////// Entity primary actions /////////
ent_action_base = [ entproperty 0 ( * $arg1 1 ) ]
ent_action_teleport = [ entproperty 0 ( * $arg1 1 ) ]
ent_action_teledest = [ entproperty 1 ( * $arg1 1 ) ]
ent_action_mapmodel = [ entproperty 1 ( * $arg1 1 ) ]
ent_action_mapmodel = [ entproperty 1 ( * $arg1 1 ) ]
ent_action_spotlight = [ entproperty 0 ( * $arg1 5 ) ]
ent_action_light = [ entproperty 0 ( * $arg1 5 ) ]
ent_action_jumppad = [ entproperty 0 ( * $arg1 5 ) ]
ent_action_respawnpoint = [ entproperty 0 ( * $arg1 15 ) ]
ent_action_playerstart = [ entproperty 0 ( * $arg1 15 ) ]
ent_action_envmap = [ entproperty 0 ( * $arg1 5 ) ]
ent_action_particles = [ entproperty 0 ( * $arg1 1 ) ]
ent_action_sound = [ entproperty 0 ( * $arg1 1 ) ]
ent_action_cycle = [ entset ( if ( > $arg1 -1 ) [ result $arg2 ] [ result $arg3 ] ) ]
ent_action_shells = [ ent_action_cycle $arg1 bullets quaddamage ]
ent_action_bullets = [ ent_action_cycle $arg1 rockets shells ]
ent_action_rockets = [ ent_action_cycle $arg1 riflerounds bullets ]
ent_action_riflerounds = [ ent_action_cycle $arg1 grenades rockets ]
ent_action_grenades = [ ent_action_cycle $arg1 cartridges riflerounds ]
ent_action_cartridges = [ ent_action_cycle $arg1 quaddamage grenades ]
ent_action_quaddamage = [ ent_action_cycle $arg1 shells cartridges ]
ent_action_health = [ ent_action_cycle $arg1 healthboost yellowarmour ]
ent_action_healthboost = [ ent_action_cycle $arg1 greenarmour health ]
ent_action_greenarmour = [ ent_action_cycle $arg1 yellowarmour healthboost ]
ent_action_yellowarmour = [ ent_action_cycle $arg1 health greenarmour ]
ent_action_box = [ entproperty 1 ( * $arg1 1 ) ]
ent_action_barrel = [ entproperty 1 ( * $arg1 1 ) ]
ent_action_platform = [ entproperty 1 ( * $arg1 1 ) ]
ent_action_elevator = [ entproperty 1 ( * $arg1 1 ) ]
//////// Copy and Paste //////////////
// 3 types of copying and pasting
// 1. select only cubes -> paste only cubes
// 2. select cubes and ents -> paste cubes and ents. same relative positions
// 3. select only ents -> paste last selected ent. if ents are selected, replace attrs as paste
opaquepaste = 1
entcopybuf = ""
entreplace = [
do [
if (enthavesel) [] [ newent @entcopybuf ]
entset @entcopybuf
]
]
editcopy = [
if (|| [havesel] [! (enthavesel)]) [
entcopybuf = ""
entcopy
copy
] [
entcopybuf = (entget)
]
]
editpaste = [
cancelpaste = (! (|| [enthavesel] [havesel]));
if (strcmp "" $entcopybuf) [
pastehilite
reorient // temp; real fix will be in octaedit
onrelease [
if $opaquepaste delcube
paste
entpaste
if $cancelpaste [ cancelsel ]
]
] [
entreplace
if $cancelpaste [ cancelsel ]
]
]
/////// Selection ///////////////
// select ents with given properties
// '*' is wildcard
entfind = [
if (= $numargs 0) [
entselect 1
] [
entselect (concat [ && [=enttype @@arg1] ] (loopconcat i (- $numargs 1) [
result [ [=entattr @@i @@[arg@(+ $i 2)]] ]
]))
]
]
entfindinsel = [
if (= $numargs 0) [
entselect [ insel ]
] [
entselect (concat [ && [insel] [=enttype @@arg1] ] (loopconcat i (- $numargs 1) [
result [ [=entattr @@i @@[arg@(+ $i 2)]] ]
]))
]
]
lse = [
line = ""
count = 0
entloop [
line = ( concatword $line (entget) " " )
count = ( + $count 1 )
if (> $count 4) [
echo $line
line = ""
count = 0
]
]
if (> $count 0 ) [ echo $line ]
echo (enthavesel) entities selected
]
enttoggle = [ entmoving 1; entmoving 0; ]
entaddmove = [ entmoving 2 ]
grabbing = 0
drag = [ dragging 1; onrelease [ dragging 0 ] ]
corners = [ selectcorners 1; dragging 1; onrelease [ selectcorners 0; dragging 0 ] ]
entadd = [ entaddmove; entmoving 0; ]
editmove = [ moving 1; onrelease [ moving 0 ]; result $moving ]
entdrag = [ entaddmove; onrelease [entmoving 0]; result $entmoving ]
editdrag = [ cancelsel; || [entdrag] [ drag ] ]
selcorners = [ if $hmapedit [ hmapselect ] [ cancelsel; || [entdrag] [ corners ] ] ]
editextend = [ || [entdrag] [ selextend; reorient; editmove ] ]
editmovewith = [
if (havesel) [
|| [editmove] [ @arg1 ]
onrelease [ moving 0; dragging 0 ]
] [
@arg1
]
]
editmovecorner = [ editmovewith selcorners ]
editmovedrag = [ editmovewith editdrag ]
////// Other Editing commands /////////
editfacewentpush = [
if (|| [havesel] [! (enthavesel)] ) [
if $moving [
pushsel $arg1
] [
entcancel
editface $arg1 $arg2
]
] [
if $entmoving [ entpush $arg1 ] [ ent_action_@(enttype) $arg1 ]
]
]
entswithdirection = "playerstart teledest mapmodel monster box barrel platform elevator"
entdirection = [
if ( && [enthavesel] [ = (havesel) 0 ] ) [
if (>= (indexof $entswithdirection (enttype)) 0) [
if (> $arg1 0) [
entproperty 0 $arg2
if (> (entattr 0) 360) [ entproperty 0 -360 ]
] [
entproperty 0 (- 0 $arg2)
if (< (entattr 0) 0) [ entproperty 0 360 ]
]
]
result 1
] [
result 0
]
]
editdel = [ if (! (enthavesel)) [delcube]; delent ]
editflip = [ flip; entflip ]
editrotate = [
|| [ entdirection $arg1 15 ] [
rotate $arg1
entrotate $arg1
]
]
editcut = [
hadselection = (havesel)
moving 1
if $moving [
copy; entcopy
delcube; delent
onrelease [
moving 0
paste
entpaste
if ( ! $hadselection ) [ cancelsel ]
]
]
]
passthrough = [
passthroughsel $arg1;
if $arg1 [
passthroughcube_bak = $passthroughcube
passthroughcube 1
] [
passthroughcube $passthroughcube_bak
]
entcancel
if $setting_entediting [ entediting ( ! $arg1 ) ]
]
edithud = [
if (enthavesel) [concatword (entget) " : " (enthavesel) " selected"]
]
entcomplete = [ listcomplete $arg1 $enttypelist ]
entcomplete newent
entcomplete entfind
entcomplete clearents
listcomplete editmat "air water clip glass noclip lava gameclip death alpha"
air = [ editmat air ]
water = [ editmat water ]
clip = [ editmat clip ]
glass = [ editmat glass ]
noclip = [ editmat noclip ]
lava = [ editmat lava ]
gameclip = [ editmat gameclip ]
death = [ editmat death ]
alpha = [ editmat alpha ]
blendpaintmodes = ["off" "replace" "dig" "fill" "inverted dig" "inverted fill"]
setblendpaintmode = [
if (> $numargs 0) [blendpaintmode $arg1] [blendpaintmode 0]
echo "blend paint mode set to:" (at $blendpaintmodes $blendpaintmode)
]
scrollblendbrush = [
if (> $numargs 0) [nextblendbrush $arg1] [nextblendbrush]
echo "blend brush set to:" (getblendbrushname (curblendbrush))
]
minimaphere = [minimapheight (at (getcampos) 2)]
getsundir = [sunlightyaw (getcamyaw); sunlightpitch (getcampitch)]

41
data/stdlib.cfg Normal file
View File

@ -0,0 +1,41 @@
// console language standard library
// creates a macro whose body is a format string
// i.e. macro greet [ say Hi, %1! ]
macro = [
$arg1 = (concat [format [@@arg2]] (loopconcat i $numargs [concatword " $arg" (+ $i 1)]))
]
// binds a key so that it will toggle a variable
// i.e. bindvar 9 thirdperson
bindvar = [
bind $arg1 [@arg2 (= $@arg2 0); if (= $@arg2 0) [echo @@arg2 OFF] [ echo @@arg2 ON]]
]
// same as above, but only binds for edit mode
editbindvar = [
editbind $arg1 [@arg2 (= $@arg2 0); if (= $@arg2 0) [echo @@arg2 OFF] [ echo @@arg2 ON]]
]
// binds a key so that it will set a modifier while held down
bindmod = [
bind $arg1 [@arg2 1; onrelease [@@arg2 0]]
]
// same as above, but only binds for edit mode
editbindmod = [
editbind $arg1 [@arg2 1; onrelease [@@arg2 0]]
]
quine = [ echo (format "quine = [%1]" $quine) ]
loadsky = [
skybox $arg1
if (> $numargs 1) [
spinsky $arg2
] [
if (!=f $spinsky 0) [spinsky 0]
]
]
mapmsg = [ maptitle $arg1 ]

2826
data/stdshader.cfg Normal file

File diff suppressed because it is too large Load Diff

BIN
data/teammate.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

1530
docs/config.html Normal file

File diff suppressed because it is too large Load Diff

BIN
docs/cube2logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

BIN
docs/dev/edgespans.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
docs/dev/editing1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

BIN
docs/dev/editing2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
docs/dev/editing3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
docs/dev/editing4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

BIN
docs/dev/lightmap.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -0,0 +1,293 @@
Sauerbraten initial development documentation
=============================================
This document describes the state of sauerbraten at the moment
of its initial open source release. Anyone who wants to program
as part of the sauerbraten project should read this document VERY
carefully.
Sauerbraten History
===================
Sauerbraten was started as an effort to take the ideas behind Cube
further: both allow significantly more geometrical possibilities
while at the same time being simplified compared to Cube's internal
structure. Read all about this on the Sauerbraten homepage:
http://wouter.fov120.com/sauerbraten/index.html
Sauerbraten is based on the cube source code of roughly the november
2002 state, and both code bases have diverged significantly since.
The base Cube code was cleaned up a bit, and all code specific to
the cube world structure removed or commented out. Some other
parts of cube dependent on this were also commented out, but most
code is in the sauerbraten base unmodifed. All gamecode, client/
server code, physics (dynamics, not collision), sound, monsters,
weapons, console/scripting, entities, menus, md2 / hud / particle
rendering is all there pretty much unmodified from cube and either
already works, or can be easily be made to work again as sauerbraten
progresses.
This document assumes some familiarity with the original Cube source
code.
The major areas that are new have to do with world structure, like
rendering, editing etc. A description of each follows:
World Structure
===============
The new world structure is the ultimate in elegance, if I may say so
myself ;) "octa.h" contains the definition: the only data structure
is the new struct "cube". a "cube" is the central component of Sauerbraten's
octree structure (if you don't know octree's, google them and read some
documents about them first).
If a "cube" is a leaf, i.e. the smallest element that has been edited
as a single cube at that level in the octree, the edges/faces fields
define the shape of the cube using the aforementioned "edge spans".
A cube has 12 edges, each having 1 edge span occupying 1 byte.
The single byte is split in two 4bit quanties each storing a number
between 0 and 8, the lower one being the start of the span, and the
higher being the end of the span.
A maximally exstended cube has all edge spans with value 0x80, by
definition. A completely empty cube (space) can be defined in many
different ways (all edges of 0x00, 0x11 .. 0x88), but as a convention
only the value 0x00 is used to allow for fast testing. All current
functions enforce this already.
if a "cube" is not a leaf but is 8-fold subdivided, it has a pointer
to its 8 children allocated as one chunk. The other fields of a non-leaf
cube are meant to hold the LOD version of its children, but this is
currently not implemented.
note the lack of a "type" field in the "cube" struct: there is only
one type of cube (unlike the 7 different types in the Cube engine).
This greatly simplifies the code.
It may take a while to wrap your head around the idea of edge spans and
the way they are stored. Reading the algorithms that handle them
should help.
"octa.cpp" contains some of the basic functions of dealing with this
structure. Particularly study lookupcube(), as it is the central function
used by all other code to access the octree and to further subdivide it
if needed.
"worldio.cpp" works as before but now with the new world structure,
"map" and "savemap" work as expected.
World Rendering
===============
"octarender.cpp" contains all functions that draw the octree & cubes
to the screen. It consists of two parts:
gencubeverts() and all the code above it takes the octree structure and
turns it into a vertex array and index lists ready to be rendered. It currently
does this for the entire level at once after a level load or edit, ideally
it should be done for small parts of the level at a time (see below). This
function cannot be called every frame (as it is in Cube) as it is quite
expensive.
The actual structure of the code is to take each cube, compute the 8 vertices
for it by intersecting the 6 faces defined by the 12 edge spans (the intersection
functions are in "geom.c"). It also attempts to cull unneeded faces such as
those of equal size and touching eachother. The hashtable at the top is used
to not put duplicate vertices in the array.
This code is not easy to follow, but does a lot in very little code, so
you will just have to read it to understand the details. As with everything
in Cube/Sauerbraten :)
octarender() and the 2 functions above it render the scene, and as you can
see are super simple (after all the work done by gencubeverts()). It renders
all quads using any particular texture together, and uses texgen for the
texture coordinates (which makes the vertex array very small at just 16
bytes per vertex).
World Editing
=============
This part I was in the middle of programming when I had to suspend work on it,
so contains the most bugs/unfinished parts and crappy code.
How editing works is briefly explained in "readme_player_mapper.txt". Play
with the editing functionality to get a feel of how it works.
cursorupdate() is the main function that gets called every frame in edit mode
to update the rectangle, and a dragged selection if there is one.
editface() then implements the actual geometry modification with the mousewheel
and the different key combinations.
Again, not easy to follow code, but not a lot of it considering that it implements
pretty much the entire set of editing operations.
Thing to be implemented
=======================
What follows is a list of items that would probably need to be implemented to make
Sauerbraten into a fully usable engine. I have listed the items below roughly in
the order which I think would be useful they would happen.
Quite a few of the items can be worked on by different people without interfering
too much, i.e. one person can work on rendering issues, one on editing, on on
collision etc.
- make the current editing features work in all situations (they currently work in
some of the 6 orientations and not in others).
- add texture selection feature (should be easy). Suggested is a "move to front"
texture list much like Cube, that is saved with the map. Texture slots and
texture loading is already in the engine just like Cube. Maybe later a fancy
texture selection window can be added.
- once the editing is fully working, remove the redundancy in the various
editing related functions
- currently only NV_VERTEX_ARRAY_RANGE is used to upload vertex arrays to video memory
after the level changes. ATI_VERTEX_BUFFER_OBJECT and ARB_VERTEX_BUFFER_OBJECTS
should also be supported.
- collision detection. The physics dynamics sort of work from Cube, but there is no
proper collision detection (there is an ad-hoc collision detection which treats the
player as a "needle").
- currently the entire level is rendered into one big vertex array every time the
level is loaded or edited. Not only is this very inefficient for editing, it doesn't
allow frustrum culling and occlusion culling. The level should be split up at certain
levels in the octree, depending on the number of nodes below it (i.e. a high detail
area will result in smaller chunks and more split up than a low detail area).
The target amount of cubes in a chunk should be tunable: large enough so that there
are enough polys in it such that rendering it at once is efficient, and small
enough so that culling algorithms are effective.
To make this work with VAR and VBO, a simple memory manager should be implemented
on top of the VAR or VBO which allocates parts of its memory for these chunks
as needed.
Once this works, frustrum culling should be implemented. Occlusion culling is more
complicated and can be left for later.
- lighting. Currently there is a provision for vertex lighting in the "cube" structure
which is being filled with random values at the moment as you can see in the
levels. The lighting model is debatable, but for the kind of engine Cube is,
doing things like shadow volumes or shadow maps is probably not feasible yet,
meaning that again some form of lightmap or subdivided vertex lighting must be used.
I would suggest that for surfaces below a certain size only vertex light be used,
and for the larger faces the engine accumulates lightdata in a series of lightmap
textures as required (subdivision would probably be unwise given the potential
scale sauerbraten worlds can have).
- fix all those small little issues from the former cube gameplay code which stopped
working (should not cost a lot of time). If all the above items are implemented,
Sauerbraten should be able to run the old Cube multiplayer and singleplayer game
without much problems, in much more impressive worlds!
- occlusion culling. Will be quite complicated to do well, should be left as last
item to do until all other parts of the engine are matured. Once we get to this
point I'd be happy to help brainstorm on possible good algorithms.
- many interesting features can be implemented beyond this point. We'll think of them
once we get there :)
Code style and simplicity
=========================
Many people may work on this code, all with their own coding styles and coding philosophies.
If everyone just goes their own way things will become a mess, and noone will be happy.
Coding style is least problematic. It would be easiest if everyone just followed my style
of formatting, identifiers etc. However if everyone agrees that they prefer a different
style that would be fine too, as long the style is applied consistently (i.e. all old
code is change to reflect the new style). One particular style I will forbid however, and
that is the so-called "hungarian notation".
Coding philosophy is a harder topic. I am however assuming that people working on
sauerbraten do so because they like Cube and its minimalistic engine design, and are
excited by the possibilities Sauebraten's new world structure brings. That means that
they are people that can agree with Cube's coding philosophy and may enjoy working with it.
Even though Cube's source code is not the prettiest (it is downright ugly in places),
it overal VERY easy to read, which almost entirely due to its incredibly small size
and simple algorithms. Lets face it, if you have to understand a physics system, there's
no way you are going to easily find your way around a physics system that stretches 20
.cpp and .h files with several pages of code each (even if its wonderfully designed),
compared to Cube's 1 or 2 pages in a single file (even if its ugly).
Ever wonder why an engine that is simpler than Doom2 still gets so much attention in
2004? And why nobody appears to do anything with all those hundreds of advanced engine
projects out there? its because of this kind of thing.
Cube is about doing more with less (a lot less!) and Sauerbraten is no different. Its
about elegant tiny algorithms, and using not a single line of code more than needed.
I hope the programmers working on Sauerbraten will embrace this, and join in the fun
"sport" that is simplicity, even if by their background they prefer to create collosal
class hierarchies that include every version of the kitchen sink.
A misconception is that Cube's code philosphy is "anti-OO". This is not relevant at all.
I'd be happy for people to convert all of sauerbraten into a neat bunch of classes.
The _form_ of the code does not matter, as long as its the minimal, simplest, least
redundant one. The problem with classes as used by most people is that they require
to split up a part of the code between .h and .cpp, and also invite people to get
serious with data hiding, introducing the dreaded get/set methods. All of this
introduces useless clutter that will bloat up the code size of an engine several
fold for no gain other than being "correct". And readability for anyone except the
original writer will suffer.
If you want to create a class, I suggest you put it in a .h file in its entirety,
improving readability immensely by keeping all code together. Really, the design of
classes and the .h/.cpp idea don't work well together at all. Don't worry about executable
code bloat by the appearent "inline" nature of this, most linkers have gotten very good
at filtering this out nowadays. And unless you do the entire engine this way, you are
not going to feel the compilations speed difference. And please forget about get/set.
A small example is the "vec" class that is still a bunch of macros in the Cube code base.
Important to notice is that it is still exactly the same amount of code as in Cube,
however just a bit more readable than before.
Another think people worry about is the use of global variables in the code, because
global variables are certified evil (tm). But think of it: an engine intrinsically has
some global data it needs to store. So you put all of this in a class (or classes). But
this engine really only uses one instance of this class, so you make it a singleton.
Now you need to access this data. You write get() methods, and you litter your code
with calls to them. You have just bloated your code, made it less readable, and all
for what? for no change in actual structure whatsoever. In cube, a .cpp file is often
implicitly a "singleton" already. Don't worry too much about being Politically Correct,
worry about the actual structure of the code.
Doesn't all this hacking reduce maintainability? On the contrary. By keeping the code
the simplest possible and accepting no redundancy, most modifications you want to make
are simple because the code that is related to it is easy to isolate. Abstractions can
be made when they are first really needed, rather than ahead of time and forgotten.
So when you work on Sauerbraten, try taking these steps:
- Make it a challenge thinking about the algorithm design before you start coding.
What is the simplest thing that could possibly work? How can I make it such it
requires less data structures or code, or simpler data structures and code?
Don't think in terms of just getting features done. Just because all other engines
make a certain feature look complex doesn't mean we have to follow.
- Once you got a cool base idea, discuss with other Sauerbraten programmers. There
will be a thread on the messageboard for this. Maybe they have further simplification
ideas.
- Implement using exactly the code needed to implement the algorithm without redundancy.
Refrain from implementing any big "systems" or "managers" to help your cause. Make
it a sport to be efficient with the amount of code your algorithm needs.
- spend as much time refactoring as you can. If things get a bit messy, don't just
let it become worse but take some time to restructure things.
- Be careful to not implement tons of special purpose features that sound neat. Focus
on features that have more universal power and can be used for a multitude of things.
Once players/mappers start to use Sauerbraten, they will ask for endless features,
most of them not very well thought out. Resist the temptation :)
==========
Wouter van Oortmerssen
wouter@fov120.com

BIN
docs/dev/sauerchild.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
docs/dev/saueredge.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
docs/dev/saueredge2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
docs/dev/sauerlink1b.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

249
docs/dev/wikistuff.html Normal file
View File

@ -0,0 +1,249 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sauerbraten</title>
<style type="text/css">
body { margin: 50px 11%; width: 80%; background-color: #302c28; color: #ffffff; font-family: verdana,"trebuchet ms","zurich bt",tahoma,arial,helvetica,sans-serif; font-size: 8pt; }
a { text-decoration: underline; color: #ffbb00; }
a:visited { color: #ff9900; }
a:hover { color: #ff9900; }
div { margin: 40px 0px 4px 0px; padding: 1px; background-color: #662222; font-size: 120%; font-weight: bold; }
pre { margin: 15pt 0pt 3pt 20pt; font-family: monospace; }
</style>
</head>
<body>
<div>Wiki remains</div>
<p>The original Sauerbraten wiki met with an unfortunate accident when it was targeted by linkfarm bots. The text in this html is the unique information that was in there, in no particular order.</p>
<p>Some of this material could be refactored / integrated in the docs if need be, but at least it is preserved for the time being.</p>
<p>I'd rather have some serious people work on the official docs than restarting the wiki, it is just too much admin hassle. </p>
<div>Portals</div>
<p>Sauerbraten Portal Scheme (Occlusion Culling). </p>
<p>Right now, Sauerbraten performs no occlusion culling. This is not a big issue right now, as it has very efficient geometry throughput, levels are relatively small, and the average graphics card nowadays seriously overpowers sauer's modest rendering requirements. </p>
<p>As we move to the future, 2 things will make this problematic: first, shaders will increase the fillrate &amp; pixelshader load, and in combination with larger levels (causing more overdraw), this will make the engine entirely fillrate/pixelshader bound. </p>
<p>LOD will not help much here. Heavy fog can help but is a nasty solution. For many kinds of levels, real occlusion culling will be required. </p>
<p>Occlusion culling is not trivial in sauer, because of its highly generic scene structure. One simple scheme that makes most sense on todays hardware is portals. </p>
<p>This is how portals will be implemented in Sauerbraten (again, there is no urgent need for it right now, there are other things to be implemented first). </p>
<ul>
<li> level designers mark a selection of solids, and then execute a "makeportal" command. This will mark all cubes involved as "portal" and also make them nonsolid. Portals generally are placed in visibility bottleneck between larger areas, for example a doorway going into another room. The side of the selection that has the grid on has special meaning: this is the actual portal surface. The engine will keep track of these portal surfaces (the cube refers to the portal number). </li>
</ul>
<ul>
<li> as a preprocess phase it now recomputes all sectors (at some point we will combine "calclight", "remip" and "sectorize" into a single command to make a level suitable for distribution). What this does is very simple: repeat until all cubes are sectorized:
<ul>
<li> grab a non-solid cube </li>
<li> flood fill all cubes reachable from there, not crossing solids or portal cubes. semi-solids have to be treated with care to see where to flood fill. </li>
<li> mark all these cube with a sector number. A sector structure this refers to holds a list of all portal numbers found during this traversal </li>
<li> portal cubes are made part of the sector which is not on the side of the portal plane </li>
</ul>
</li>
</ul>
<ul>
<li> now when sauer goes through its process of generating vertex arrays for the level, it effectively treats each sector as a seperate level. When a surface gets generated (which, by definition, is because it touches a non solid cube), the sector of that cube gets checked and the surface added to the vertex arrays of that sector. </li>
</ul>
<ul>
<li> This all means the following addition data
<ul>
<li> two numbers in a "cube" structure: portal and sector. portal==0 means no portal </li>
<li> a boolean in the map header that says wether sector information is valid. it gets set after a sectorize, and reset whenever geometry is edited </li>
<li> a vector of struct portal, each of which has 2 sector ids, and portal surface dimensions </li>
<li> a vector of struct sector, each of which has a vector of portal ids, and a list of vertex arrays </li>
</ul>
</li>
</ul>
<ul>
<li> when rendering, do the usual portal things. For the record: Find the sector the camer is in, and render it. Find the list of portals. Test each with the view frustrum and only retain the visible ones. Render all sectors connected to the visible portals. Collect the list of portals touching those sectors, and intersect them with the first set of portals, rather than the view frustrum. With correct portal placement, this soon reduces the set of visible portals to zero, and thus rendering is done. </li>
</ul>
<p>Of couse highly effective in indoor, it can still help in outdoor, though fog &amp; LOD may be additionally required to help. Fog + portals can still cull effectively outdoor, i.e. an area can be culled from rendering even though it is within the fog distance, because the portal to it is outside the fog distance. Clever use of mountains and large buildings can help. </p>
<p>Placing too many portals can hurt performance, as sectors fragment GPU workloads. Sectors need to be at least an entire detailed "room" or area. </p>
<p>Implementation is well defined, but a fair bit of work making it all run smooth.</p>
<div>
Heighfields</div>
<p>Algorithm for creating heighfields in Sauerbraten. </p>
<p>The problem is that you can't create a heighfield of more that 1 cube high, as then slanted surfaces would cross cube boundaries, and not all combinations are representable. </p>
<p>Solution: create the heighfield (I have a very good noise function). heighfield will be created inside the current 3d selection, taking into account grid size and orientation. Example, a 10x10 heighfield 5 deep has 40 (5x8) possible heighlevels. </p>
<p>First pass: go through all X and Y edges and detect the ones that cross a cube boundary (e.g., out of 0 to 40 depth, an edge doing from 2 to 8 doesn't cross a boundary, but one that goes from 2 to 9 does). Snap the height of the corner closest to a cube boundary, in this case make the 9 an 8. After this, there is the possibility that an edge will span 2 cubes still... the higher of the 2 then has to be brought down till that is no longer the case. </p>
<p>After this, it is trivial to generate the actual cube data structures. </p>
<p>For heighfield editing functions such as applying a raise/lower circular "brush" to terrain, you can have a function to compute heighfield data from the current cube nodes, apply the operation, then apply the above algorithm again. </p>
<p>This will do some damage to the heighfields form, but hopefully not that much, and will give the heighfield its own style. </p>
<div>New Weapons </div>
<h3>Discussion can be followed <a href="http://cubeengine.com/forum.php4?action=display_thread&thread_id=237">here </a></h3>
<p>...coding new weapons. </p>
<p>So it's my duty to detail step 2. ;) </p>
<p>I sure hope that you've guessed you'll need to edit weapons.cpp. Add required stuff in cube.h Modify the weapon selection commands to be able to select it. Then you need to make ammo for it, use the .md2 of any weapon ammo, and edit the skin.jpg with a nice logo for your new shiny weapon. make a items_yourmodname.png with original Cube items, but this one is 256*256 instead of 192 so you can add new nice stuff, and modify renderextras to display your weapon logo on the HUD Then modify something like -don't remember- world.cpp or editing.cpp so that you can do /newent ammoforthisweapon eventually model a hudgun or use an existing one. I think i didn't forgot something. </p>
<p>You should eventually wait that i release the modbase, i've added some new weapons in it, and am planning modifying a bit the code to make adding new weapons easier, plus there is a new moveprojectiles function to use weighted projectiles with curve path and bouncing ones (Cube weaponfactory ;) But since that already playing with Cube source to understand and know it well is fun :) </p>
<p>-- D.plomat </p>
<p>This is the area you can change in weapons.cpp if you desire to just modify an existing weapon. Adding weapons as D.polmat says requires more than one file edit. </p>
------8&lt;----cut here----- struct guninfo { short sound, attackdelay, damage, projspeed, part; char *name; }; const int MONSTERDAMAGEFACTOR = 4; const int SGRAYS = 20; const float SGSPREAD = 2; vec sg[SGRAYS]; guninfo guns[NUMGUNS] = { { S_PUNCH1, 250, 50, 0, 0, "fist" }, { S_SG, 1400, 10, 0, 0, "shotgun" }, // *SGRAYS { S_CG, 100, 30, 0, 0, "chaingun" }, { S_RLFIRE, 800, 120, 80, 0, "rocketlauncher" }, { S_RIFLE, 1500, 100, 0, 0, "rifle" }, { S_FLAUNCH, 200, 20, 50, 4, "fireball" }, { S_ICEBALL, 200, 40, 30, 6, "iceball" }, { S_SLIMEBALL, 200, 30, 160, 7, "slimeball" }, { S_PIGR1, 250, 50, 0, 0, "bite" }, }; ----------end cut----------
<p>Take note of the structure, the first variable is the sound it makes. And part should be zero unless your weapon has a visible projectile. </p>
<p>-- Slipstream </p>
<div>Building on windows </div>
<p>Below is a short guide for allowing programmers to edit and compile Sauerbraten source code on Windows. <br>
Keep in mind that the batch file for this guide is also available <a href="http://cube.snieb.com/node/92">here </a>. </p>
First you need msys and mingw. Get them here: <a href="http://www.mingw.org/">http://www.mingw.org/ </a> First install mingw into (recommended) c:\msys\mingw and then install msys into c:\msys. Add C:\msys\mingw\bin (or wherever mingw32-g++.exe is) to your path (Control Panel -&gt; System Properties -&gt; Advanced -&gt; Environment Variables -&gt; Edit System Variables). You'll know you got the path right when you can run "mingw32-gcc -v" from a command window anywhere and not get an unknown command error.
<p>Now grab this: (you need to download the cvs program in order to grab the source files) <a href="https://ccvs.cvshome.org/files/documents/19/886/cvs-1-11-20.zip">https://ccvs.cvshome.org/files/documents/19/886/cvs-1-11-20.zip </a><br>
or if it's been a long time since I wrote this a newer version from: <br>
<a href="https://ccvs.cvshome.org/servlets/ProjectDocumentList?folderID=83&expandFolder=83&folderID=80">https://ccvs.cvshome.org/servlets/ProjectDocumentList?folderID=83&amp;expandFolder=83&amp;folderID=80 </a><br>
Place cvs.exe in c:\windows or some other folder in your path. </p>
<p>Create a bat file in c:\ and put in there: (or download it from <a href="http://cube.snieb.com/node/92">http://cube.snieb.com/node/92 </a>) <br>
cvs -d:pserver: <a href="http://strlen.com/wiki/index.php?id=ProtectedEmail&encoded_email=Sj5gPmJFYFs4NVlTOFo4YFtyWUJXYHJ4Qlo%2BQnA%3D">anonymous&raquo;cvs </a>:/cvsroot/sauerbraten login <br>
cvs -z3 -d:pserver: <a href="http://strlen.com/wiki/index.php?id=ProtectedEmail&encoded_email=Sj5gPmJFYFs4NVlTOFo4YFtyWUJXYHJ4Qlo%2BQnA%3D">anonymous&raquo;cvs </a>:/cvsroot/sauerbraten co -P sauerbraten <br>
PAUSE </p>
<p>If that worked, you'll now have a c:\sauerbraten. Usually the exe isn't too far behind, but the latest features may only be in source. To get those run c:\sauerbraten\make.mingw.bat. If that errors on your first try you're probably SOL and will need to wait a day for a version that builds. If errors on subsequent builds then the header probably changed and you should run makeclean.mingw.bat and try again. If it built and it most likely did, go to c:\sauerbraten\sauerbraten\ and copy the sauerbraten.bat file and edit it to refer to bin\sauerbraten-mingw.exe instead of bin\sauerbraten.exe. Change the resolution to your liking and enjoy! </p>
<p>If you like, you could also download and install Bloodshed's Dev-C++ for a good lightweight IDE to aid in reading all the sourcecode. <a href="http://www.bloodshed.net/devcpp.html">http://www.bloodshed.net/devcpp.html </a></p>
<div>Ambient Lighting </div>
<p>(From Sauerbraten engine development thread) </p>
<p>post#980: Re: ambient lighting </p>
<p>by Aardappel_ on 07/03/2005 16:43 </p>
Yes there is already ambient light, fixed at about 10%
<p>For those of you who think shadows are all black: you either have a very crappy monitor or have weird settings (like super high contrast). </p>
<p>The reason <strong>ambient lighting </strong><a href="http://strlen.com/wiki/index.php?id=ambient+lighting">? </a>is fixed is because 99% of the time people want to raise it, they do so is for the wrong reasons. Repeat after me: GOOD LIGHTING SHOWS CONTRAST. Not every polygon needs to be touched entirely by light. Shadows are good (if people hiding in the dark is a problem gameplay wise, we will solve that otherwise... they already show up less dark). </p>
<p>Learn to light levels properly. Start with the biggest, most prominent lights first and continue on down as required. For many levels that means the correct placement of a sunlight (newent light 0 255 200 100) somewhere high up. </p>
<p>see also </p>
<ul>
<li><a href="http://cubeengine.com/forum.php4?action=display_thread&thread_id=286&start=986">post 986 </a></li>
<li><a href="http://cubeengine.com/forum.php4?action=display_thread&thread_id=286&start=987">post 987 </a></li>
</ul>
This post is pretty much straight from the sauer dev thread <a href="http://cubeengine.com/forum.php4?action=display_thread&thread_id=286&start=960">here </a>
<p>I added some punctuation, fixed capitalization, and added a few words so it would make more sense. </p>
<p>edited by mreynolds </p>
<div> Sauerbraten future development timeline </div>
<table cellspacing="0" cellpadding="0">
<tr>
<td><p> A lot of people are interested in Sauerbraten for different reasons. And even though I still control it, the development of it is more open, and more people influence it than Cube. <br>
<br>
For an open source project to be successful, there needs to be a balance between the community, and a person with a central vision. A lot of things that are cool about cube, and now sauerbraten again, is because I had a particular design vision. A community without leadership will not produce good designs. So for Sauerbraten I want to continue setting clear goals for whoever works with me on it, but at the same time I want to be more open to make sure it is ideal for a larger community, and I especially want to accommodate the larger contributors, meaning the programmers that may have their own plans, and the more active level designers. <br>
<br>
So without further blah, here's how I see the development phases of Sauerbraten. <br>
<br>
1) Get the core engine tech to a stage where the engine is fully usable. <br>
STATUS: We just finished this stage! Congrats to all involved! <br>
<br>
2) Get a basic FPS game along the lines of Cube, but slightly enhanced, up and running. For those of you who are wondering what the point of this step is: the biggest failure of most engines is that they are engines, not games. It is very hard to take an engine an build a game for it without an existing framework. Many people are interested in using sauerbraten as a base for a game. And what is the most basic gameplay you could give a 3D engine? that's right, an FPS. Especially since we already have the base cube gameplay to work from. <br>
STATUS: we are 70%-80% done on this one, I estimate. Most of it appears to work, but a lot of refinements can be made. At some point this gameplay will be mostly frozen, much like Cube. Most importantly we need to figure out how we want to do multiplayer, given that currently it is wide open for cheating. <br>
<br>
3) [this can actually be in parallel with 4 &amp; 5]: improve engine tech. Geometry thruput optimisations, Level of Detail, Occlusion Culling, and a shader system are the most important items on the list here, but there are tons of other features that will keep on enhancing/refining the engine. <br>
STATUS: planning/design. Currently we are not in a total hurry with these features as the engine is running rather nicely already. But we can do better and we will. <br>
<br>
4) Gameplay &amp; Engine seperation. Several people want to do widely different games with Sauerbraten. I don't want us to get in the same situation as most engine (Cube especially) where making a "mod" means forfeiting future engine development, or worse, mods add their own cool features that don't benefit the main branch. That's why I want to organize a system whereby we can have a main, shared engine, and multiple gameplay modules. For this it is also important to have the FPS gameplay polished, that way every gameplay module can be based off the FPS module and have something working to start with. <br>
Even better, since this item will require a LOT of reorganisation in the engine, there will be quite a bit of time afterwards where things have to be restructured. To do this most smoothly, I will propose an organisation where all main gameplay projects (serious ones, approved by me) sit together in the same CVS, and initially even in the same program, toggleable by a commandline switch. This means that if you change the engine or the gameplay interface, you get to compile other people's gameplay modules as well, and verify wether you haven't broken their code, or even make simple fixes (such as when adding additional parameters etc.). <br>
I am also open to thinking about a better scripting language, if time permits I will create one, such that we can move as much as possible out of the engine and allow non C++ programmers to make mods. <br>
STATUS: I will do the initial engine restructuring to allow this to happen, but I'd like to postpone this as long as possible. <br>
<br>
5) The sauerbraten RPG. This will be the main gameplay module seperate from the FPS module, designed by yours truely. I have particular ideas for this, but since our life will be simpler if we don't have 3 million different gameplay projects ongoing (we also have a limited pool of level designers), I will try to scope this project such with major programmer &amp; level designer contributors such that we can all work on a single project, if possible. It may be that our wishes are non-unifyable, so be it, but I will give it a try. I think it can be done. <br>
STATUS: Once we are past (4) and some of (3), I will lay out my plans... but if you dig through old threads on this forums you can find some of it :) <br>
</p></td>
</tr>
<tr>
<td><img src="wikistuff_spacer.gif" height="20" width="1"></td>
</tr>
</table>
<div>Wiki usage </div>
<p>The Cube forum ( <a href="http://www.cubeengine.com/forum.php4">http://www.cubeengine.com/forum.php4 </a> ) contains many large posts containing valuable information, which all too often is very hard to find. </p>
<p>From now on, whenever I am explaining something that is a larger text, I will put it on the wiki and link to it on the forum instead. That way it will be easier to build up a knowledge base. </p>
<p>The first example is my post about portals. </p>
<p>I strongly encourage you to do the same. Let's build this wiki up together and make it a dual to this forum. Knowledge goes in the wiki, temporal stuff and discussion goes in the forum. Things can move from the forum to the wiki once discussion has reached a conclusion. </p>
<p>Infact, I would be VERY grateful if someone wants to go through old threads and isolate the most valuable posts, and put them in the wiki in a logical way. </p>
<p>What the wiki is for: </p>
<p>The main focus for the wiki is Sauerbraten. That means that any wiki page not marked otherwise is about sauer. It also be nice to collect Cube information in the wiki, but it needs to be marked as such, since eventually sauer will take over entirely. So, for example, <strong>EngineFeatures </strong><a href="http://strlen.com/wiki/index.php?id=EngineFeatures">? </a> is about sauer, and <strong>CubeEngineFeatures </strong><a href="http://strlen.com/wiki/index.php?id=CubeEngineFeatures">? </a> is about Cube. </p>
<p>I welcome additional pages that are indirectly related to these 2 engines. Examples are pages about engines &amp; engine algorithms in general, about gameplay, level design, tools, art, or even about any of my other projects. </p>
<p>There are two main uses however, and that is documentation about sauerbraten for players and mappers on the one hand, and for developers (engine specifics) on the other hand. So those should take the forefront. Make a very clear distinction between something that is *information*, and something that is just your *idea*. I know people have written interesting texts on their ideas for gameplay, or certain engine features. Until I or any of the other main contributers are implementing them, these are not part of the project. So seperate ideas out by making a wikipage for yourself (e.g. <strong>PushPlay </strong><a href="http://strlen.com/wiki/index.php?id=PushPlay">? </a>) and then link your ideas from there (e.g. <strong>PushPlayGameModes </strong><a href="http://strlen.com/wiki/index.php?id=PushPlayGameModes">? </a>), rather than putting them in to the main documentation directly. Ideas are still welcome, but for a random new user that needs help on the engine, it should be easy to distinguish fact from fiction. </p>
<p>This wiki comes with a bunch of admin tools, that allow me for example to roll back a page or the entire wiki. That should allow protection against spam bots &amp; griefers. We will see how this goes. If we get too much trouble we may move to a more private wiki. I will also at some points give admin rights to some trusted contributers. Please alert me if you think a major attack on the wiki has been made. For small problems, just fix them yourself. The wiki stores all its content in a bunch of flat files, which allows us to do frequent backups, export to offline html, and easy migration. </p>
<div>Edge Spans </div>
<p>The method that <a href="http://strlen.com/wiki/index.php?id=Sauerbraten">Sauerbraten </a> uses to describe deformed cubes consists of the start and end location of each edge of the original cube. These start and end locations, along with those of the other 11 edges, define 6 faces. For a complete, normal, solid cube those 6 faces form an actual cube shape, with start and end locations at their maximum distance from each other. Once you begin deforming the cube those planes begin to carve out the sides of the cube, and what is left inside the intersections of the planes is the resulting smaller deformed cube. </p>
<p>Here is an illustration of this concept in 2D, using only 4 edges to define a deformed square. Notice that as the edges are pushed in, the remaining portion of the square is whatever is left inside the edges. In this illustration the start of the span for the top and left edges is being pushed in. </p>
<p><img src="edgespans.gif" alt="edgespans.gif" width="193" height="193"> (no picture means the wiki is still broken, two pictures means the page should be edited) </p>
<p>Notice that while the edge spans always start and end on integer grid marks, the resulting corners of the deformed cube often do not. Also note that the deformed cube tries to avoid becoming concave. This means that in some cases you get prettier corners because of better approximations of curves, and that the rendering code can be very elegant, but it also means that many conceivable shapes inside a cube cannot be realized. </p>
<div>Using free tools to produce .md2 models </div>
<p>In this small tutorial I will try to explain how to use Blender v2.36 with the Quake 2 modeller to produce and texture a simple mesh for use with Cube. </p>
<p>Disclaimer: I can't guarantee that the tutorial will be of any use to anyone. If you arise damages from the tutorial, I don't want to know about it. </p>
<p>What we need: </p>
<p>=&gt; Blender 2.36 and the Blender md2 import/export scripts by Bob Holcomb (script files must be put in the .blender/scripts folder in order to work) </p>
<p>=&gt; The Quake 2 modeller by Phillip Martin and Jaimi <strong>McEntire </strong><a href="http://strlen.com/wiki/index.php?id=McEntire">? </a> (hopefully v0.91b) </p>
<p>First let's start by creating a cube in Blender. I assume you have some basic knowledge on how to use this program, otherwise from now on it may be a little hard to follow. Place the cursor in a 3D View window, hit spacebar and select add=&gt;mesh=&gt;cube. In edit mode, press A to select all if needed (not needed in our case because all is selected by default, but good to know anyway), then click the Mesh menu and select faces=&gt;convert quads to triangles. Use keypad 1, 3 and 7 or SHIFT + the latter to change top and side views. Keypad 5 switches between perspective and orthogonal view. Once you've chosen a view enter UV face select mode and press U. Choose Bounds to 1/1 or experiment with other options. When you've made your choice enter the UV/Image editor window, select an image, go back to 3D view, enter Object mode and press ALT+Z to see your model textured. If you have difficulty with all those hotkeys look for corresponding commands in the menus, personally in most cases I find it more convenient to use a hotkey. </p>
<p>After you export the mesh, open the .md2 file with Quake 2 modeller. You need to have UV mapped the mesh in Blender even if you didn't select a texture, otherwise it may not load properly. Select, move, scale, manage frames, export to md2 and try with Cube. </p>
<p>This way of producing Cube model data is not very reliable. Nonetheless, I think the information presented here or parts of it may be useful to Cube people. </p>
<div>Troubleshooting</div>
<h4>Rockets explode in your face or bullets do not fly. </h4>
<p>This happens due to buggy ATI drivers for unix/linux operating systems. Download the fix from Sourceforge- <a href="http://sourceforge.net/project/showfiles.php?group_id=91993">http://sourceforge.net/project/showfiles.php?group_id=91993 </a> Once you have downloaded the file, unzip it and you will discover a file named linux_client. In your Cube folder, there is a folder called bin_unix, which contains a file with the same name as the one you have just unzipped (linux_client). Simply replace the linux_client file in there with the new one. Cube should now run correctly. </p>
<h4>error loading shared libraries </h4>
<p>This is quite a common error. Something like - error while loading shared libraries: libSDL_image-1.2.so.0: cannot open shared object file: No such file or directory </p>
<p>This means you do not have the SDL libraries installed (or possibly that you are running a 64bit version of Linux) You need to install the SDL libraries for the following SDL types- SDL SDL_gfx SDL_image SDL_mixer SDL_net SDL_sound SDL_ttf Note: For 64 bit Linux, you may be able to run Cube with 32 bit emulation if there is a 32 bit emulated library for SDL in your distro. But Cube is a 32 bit game and I personally have had no success with running it on a 64 bit distro. </p>
<h4>ALSA sound errors </h4>
<p>ALSA lib pcm_hw.c:1155:(snd_pcm_hw_open) open /dev/snd/pcmC0D0p failed: Device or resource busy Fatal signal: Segmentation Fault (SDL Parachute Deployed) Or a similar message means that your ALSA driver is currently in use. Shut down any program which may be using it. Also worth noting - if you run KDE, go to the KDE Control Centre, click it and select the Sound and Multimedia tab. There, select the Sound System tab. This will open the Sound System settings. Near the bottom is a sliding button marked auto-suspend if idle after... Slide this to the lowest setting (1 second) and ensure the tick box is checked next to it. Apply as usual. </p>
<h4>couldn't load texture data/newchars.png </h4>
<p>If you get this error trying to run Cube, it means you are attempting to run the actual binary in the /bin_unix folder. To run cube, simply navigate to the cube directory and run the cube_linux shell script. See the installation page of the Wiki for further details on how to run Cube in Linux. </p>
<h4>Screen goes black and then returns to my desktop </h4>
<p>Various errors can cause this problem. To discover exactly which one is causing your issues, try running Cube from a command line. This will give an error message which you can then check against this Troubleshooting guide. </p>
<h4>libGL error: open DRM failed (Operation not permitted) <br>
libGL error: reverting to (slow) indirect rendering </h4>
<p>The DRI interface to your card can't be accessed directly because Linux has set restrictive access permissions on it for security (eg. 660). Fix this by changing the permissions to 666. Exact details vary, but here are some examples: </p>
<p>chmod 666 /dev/dri/card0 (Gentoo 2.6.8 x86 with ATI Radeon 7000/VE) <br>
chmod 666 /dev/nvidia* (Gentoo 2.4.26 x86 + nVidia 5200, and 2.6.11 x86_64 + nVidia 6600) </p>
<p>If you find that your fix keeps getting reset on boot, then edit the file /etc/security/console.perms --- just remove all lines containing "&lt;dri&gt;" if the &lt;dri&gt;= line mentions any of the /dev entries above. Or alternatively, don't delete anything but change the &lt;dri&gt; permissions numbers to 0666. Take a copy of the original file first before you hack it, of course. </p>
<h4>Something about old versions in multiplayer online games..... </h4>
<h4>Something about compiling from source making your Cube incompatible with online games.... </h4>
<p>&nbsp;</p>
<div>Installing Cube </div>
<p>Firstly, download the latest Cube release from <a href="http://sourceforge.net/project/showfiles.php?group_id=91993">http://sourceforge.net/project/showfiles.php?group_id=91993 </a></p>
<p>Now you can unzip it in whatever directory you wish to run the game from - most likely this will be your home directory. How you unzip it is up to you - choose whichever method you are most comfortable with - if you have KDE and have installed the KDEutils package, then Ark will probably be the easiest way - but gunzip or the tar command also work fine. This will create a folder called cube. Thats it - there is no make or other commands to run - cube is ready to roll! </p>
<p>Cube needs the SDL libraries to run - so you need to check out your distributions file repository or your CDs to get hold of these. If you cannot locate them,then they can be obtained from <a href="http://freshmeat.net/projects/sdl/">http://freshmeat.net/projects/sdl/ </a> in various formats - though if possible, your distros file repository or CD is a lot easier. </p>
<p>To run cube,you do not click the binary file as you may think. You need to use the command line to cd into the cube folder, then once there, you use the command </p>
<p>./cube_unix </p>
<p>to start the game. You can pass parameters to this command to alter, for instance,the screen size - </p>
<p>./cube_unix -w1024 -h768 </p>
<p>for instance sets a 1024x768 screen. Passing -t ( with or without the -w and -h settings ) runs cube windowed. There are other options - feel free to explore the documentation which comes with Cube. </p>
<p>Tip - If intending to play online, please set a username and team name in the autoexec.cfg file - there are too many Unnamed players on Team Blah ;) </p>
<h3> Distribution-specific information </h3>
<p>Although there is considerable variation in how different distros manage libraries and dependencies, the list of top-level dependencies specified in the sources tree is fairly constant: </p>
<p>libGL.so.1 <br>
libGLU.so.1 <br>
libz.so.1 <br>
libjpeg.so.62 <br>
libpng.so.3 <br>
libSDL-1.2.so.0 <br>
libSDL_image-1.2.so.0 <br>
libSDL_mixer-1.2.so.0 </p>
<p>The subsections below give some information on how these are satisfied and/or any distribution-specific installation details. If you are having trouble, check out the <a href="http://strlen.com/wiki/index.php?id=Troubleshooting">Troubleshooting </a> page. </p>
<h4> Gentoo x86 </h4>
<p>NOTE: As of 11/21/05 it appears that the gentoo Portage version described below is out of date. Anyone know who is responsible for maintaining the cube package in gentoo? </p>
<p>If you're running Gentoo on x86 hardware, at the time of writing (25 June 2005) there is a Gentoo ebuild (games-fps/cube-20040522) for the latest platform-independent Sourceforge download which is " <strong>2004_05_22 </strong><a href="http://strlen.com/wiki/index.php?id=2004_05_22">? </a>.tar.gz". This makes installation very easy, since dependencies will be resolved automatically and any necessary packages will be brought in first. </p>
<p>To install, just login as root and type "emerge cube". Then, as an ordinary user in an xterm window, just type "cube_client-bin" to play in fullscreen, or "cube_client-bin -t" to play in a window. </p>
<p>This assumes that you have /usr/games/bin in your path. If you don't, then "export PATH=$PATH:/usr/games/bin" will add that directory to your path. Or do yourself a favour and set up a symlink "ln -s /usr/games/bin/cube_client-bin /usr/local/bin/cube", so that you can run Cube by just typing "cube". </p>
<p>For reference, Gentoo x86 on a 2.4 box with nVidia graphics satisfied the install dependencies with these ebuilds automatically: </p>
<p>media-video/nvidia-kernel-1.0.6629-r4 <br>
media-video/nvidia-glx-1.0.6629-r6 <br>
sys-libs/zlib-1.2.2 <br>
media-libs/jpeg-6b-r4 <br>
media-libs/libpng-1.2.8 <br>
media-libs/libsdl-1.2.8-r1 <br>
media-libs/sdl-image-1.2.3-r1 <br>
media-libs/sdl-mixer-1.2.6 <br>
games-fps/cube-20040522 </p>
<h4> Yoper 2.x </h4>
<p>In the 2.x Yoper repositories, you will find all the SDL libraries needed for Cube. Simply use either the synaptic program and install the SDL libs, or, if you prefer the command line, use the apt-get command. There is a Yoper Cube team thread within the forum on the Yoper site should you wish to chat about the game - or join in with the team games which we run from time to time. Currently, there is no Cube rpm in the repositories - however the Cube installing information at the top of the page will allow you to install Cube easily. </p>
<div>TOGoS's Map Linking ideas </div>
<p>Map linking in Sauerbraten is completely theoretical at the moment. Development is not yet to that point, and it is not clear that it ever will be. It does seem like a terrific idea, though... </p>
<h3> A possible way to implement map linking </h3>
<p>First, cubes can be named. This may be as in Cube where a set of map cells are given a tag number, or it may take the form of an actual text name. This is useful for obvious reasons: once a cube is named, you can reference it to script operations like "copy the contents of cube 'doorA-open' to cube 'door1'" for more dynamic maps. </p>
<p>Second, cubes can be marked as referencing external maps. For instance, you might select a cube and say to sauer "make this cube an instantiation of 'TOGoS/cool-pillar.ogz'. Similarly, you could make the cube a portal rather than a simple instantiation. The difference being that when the player enters a portal cube, he is seamlessly teleported to the specified section of the referenced map. </p>
<p>Now for portals, instead of referencing an entire map, the cube would reference only a named part of a map. This way we avoid the problem of having a link to a map that has a link to us and ending up having an infinite number of our map within the linked to map :) </p>
<p>This diagram shows what I am talking about: <img src="sauerlink1b.png" alt="http://i3.photobucket.com/albums/y85/TOGoS/Diagrams/sauerlink1b.png" width="512" height="384"></p>
<p>Note that the idea of loading maps off remote web servers is totally unrelated to multiplayer games. </p>
<p>Also as proposed by <strong>JerryBean </strong><a href="http://strlen.com/wiki/index.php?id=JerryBean">? </a> a while back, I think having a linked list of name=&gt;value attrivutes for each cube would be very helpful for this kind of thing. ( "id"=&gt;"foo" to set the name of a cube, "object-url"=&gt;"TOGoS/chair1.ogz" to use an ogz-based model, "portal-url"=&gt;"TOGoS/maps/coolio.ogz#main" to link to another map ). </p>
<h3> Pseudo-random infinite worlds using a server-side map generator </h3>
<p>Say map linking was implemented as described above, allowing links to maps using HTTP. There's a directory (or what appears to be a directory, anyway) on a web server containing an infinite number of sauer maps, like so: <a href="http://mycoolsauermaps.com/world15/+12-8+4.ogz">http://mycoolsauermaps.com/world15/+12-8+4.ogz </a>. When the Sauerbraten engine sees that that map is linked to, it will fetch it from that URL. As far as Sauer is concerned, there is nothing special about that map. </p>
<p>But that map might not actually exist. If nobody has uploaded such a map to the server (presumably using a fancy version of savemap, maybe requiring a password, probably implemented with HTTP PUT), a program on the server will automatically generate such a map. In this case the numbers +12-8+4 have a special meaning - those are the coordinates of the map. This map would in turn have links to maps +12-8+5, +12-8+3, +12-7+4, +12-7+5, etc (26 links total - one in each direction, including the diagonal ones). </p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>

164
docs/editing.html Normal file
View File

@ -0,0 +1,164 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Cube 2: Sauerbraten - Map Editing</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="shortcut icon" href="favicon.ico" />
</head>
<body>
<h1>Cube 2: Sauerbraten - Map Editing</h1>
<div class="contents">
<ul class="contents">
<li>
<a href="#editing_in_cube2"><b>Editing In Cube 2</b></a>
</li>
<li>
<a href="#the_basics"><b>The Basics</b></a>
</li>
<li>
<a href="#entities"><b>Entities</b></a>
</li>
<li>
<a href="#lighting"><b>Lighting</b></a>
</li>
<li>
<a href="#materials"><b>Materials</b></a>
</li>
<li>
<a href="#cheat_sheet"><b>Cheat Sheet</b></a>
</li>
</ul>
</div>
<h2 id="editing_in_cube2">Editing In Cube 2</h2>
<p>
Editing isn't like editing in any other game/engine; it is done within the program itself, and the
structure of the map is comprised of octrees. Octree may sound confusing but it's actually a pretty simple idea.
Imagine a cube you can do two things to: push the corners at any angle inwards, or split the cube into 8 smaller cubes
(4 cubes in the top half, 4 cubes in the bottom half) which you can do the same things to. That's all there is to it!
Below is an example cube where it is split and one cube is removed, and then again for a smaller cube.
</p>
<p>
<img src="dev/editing1.jpg" alt="Editing Example 1" />
<img src="dev/editing2.jpg" alt="Editing Example 2" />
<img src="dev/editing3.jpg" alt="Editing Example 2" />
</p>
<p>
With that out of the way: fire up the game and press E. This is edit mode. The first thing you'll notice is a faded
outline of the face of the cube pointed to by your cross hair. If you click on this face it will be selected, and will
be outlined by a solid outline. You can click and drag to select multiple faces of cubes. Press space to deselect all cubes.
When you have cubes selected, all editing commands will go to those cubes, otherwise it will go to the cube face you are pointing at.
Also notice the blue sparklies in the map. These are entities. They control things such as ammo, player spawns, lights, etc.
In the bottom left above your health you'll find text stating what the closest entity is and what properties it has.
The effect properties have depend upon the type of entity.
</p>
<p>
<img src="dev/editing4.jpg" alt="Editing Example 4" />
</p>
<h2 id="the_basics">The Basics</h2>
<p>
Go into edit mode (E) and press ` to open a console (pressing T then / has the same effect) and run the command <i>/newmap 7</i>.
This command creates a blank map, where smaller numbers create smaller maps and larger numbers create larger maps.
Editing commands are performed on the cube you selected by clicking and dragging, or the face you are pointing at if none are selected.
Press space to deselect. Point at the ground near you and roll the mouse wheel towards you. This creates a new cube towards you.
New cubes can only be created by "pulling them out of" adjacent cubes. So if you want a cube floating in the middle of the air,
you're going to need some temporary cubes going from the ground or a wall to there. Pushing the mouse wheel forward deletes the cube.
Either by selecting faces or just pointing at them try to create a structure 3 high and 3 to the right like an upside down L.
Now try holding G and move the mouse wheel towards you once. The selection size is now one step smaller. Any space you alter
at this grid size will be made up of smaller cubes, which will take more time to render but allow finer detail. The finest
grid size is much smaller than this, and the max size much much larger. Try adding a smaller L coming out of your bigger one for practice.
</p>
<p>
Now, let's edit those corners. To select corners press and hold Middle Mouse Button, much the same as selecting with the Left Mouse Button.
Try playing with the mouse wheel. This will push or pull the selected corners. Now make a selction with Left Mouse Button. Hold F and scroll
with mouse. This edits all 4 corners at once. These operations may seem simple but they allow for the creation of complex geometry.
</p>
<p>
By now you should have an idea of how most editing operations work. Hold a modifier button and use the scroll wheel to change the
selected cubes or the one you're pointing at. It naturally follows that changing the texture of a face of a cube is as simple as holding
Y while using the scroll wheel. Not that there is no way to shift, scale, or rotate textures. While it may feel restrictive it greatly
speeds up the process of mapping and the running of the game. Another useful command is rotate, which is done with R and the scroll
wheel. Experiment with these operations to get a feel for them and then save your creation with the command <i>/savemap mmapname</i>
where mapname is some name of your choosing. This will create a file in packages/base named mapname.ogz. Save your work often!
Backups of old saves will be made for you with a .BAK extension. You can later open your map with the command <i>/map mapname</i>.
</p>
<h2 id="entities">Entities</h2>
<p>
Entities all have a blue particles sparkling to indicate their position. Some entities such as ammo boxes and armor will also show
their standard in-game model, but these will only be rendered if the entites have existed since the map was loaded. Monsters will only
render in single player mode. Make sure you're familiar with the different <a href="editref.html#entitytypes">types on entities</a>.
To add an entity select it from the editing section of the built in menu or type <i>/newent entname arg1 arg2 arg3 arg4</i> such as
<i>/newent light 32 120 120 120</i>. The location of the entity will be exactly where you are, except dropped straight down if it's
not a light. This behavior can be changed through the entdrop variable, but the default is best in most cases. You can delete an
entity with the delent command, which is bound to backspace.
</p>
<p>
For a DM: Place some "playerstart" entities, suggested quite a few of them, i.e. from 5 or so in a really small map up to
15 in really big ones. Place some ammo... remember to not just place excessive amounts: ammo spawns VERY quickly (4 to 8 seconds
depending on player load), and not having endless ammo forces the player to move around the map more and use different weapons, rather
than just using the one she is most effective with all the time. Normal health items... suggested from 3 or 4 for a really small map
to 8 or more in really big ones. The items "boost", "yellow armour", "greenarmour" and "quaddamage" all suggested 1 item, or maybe
multiple green armours or boosts in bigger maps. Add some teleports sparingly, only if they really make sense for connectivity and gameplay.
</p>
<h2 id="lighting">Lighting</h2>
<p>
See the <a href="editref.html#lighting">lighting commands</a> for an indepth list of all lighting related commands.
</p>
<h2 id="materials">Materials</h2>
<p>
There are various materials available such as water, lava & clip etc. To create a material make a selection then in the console type
<i>/water</i>. The area of your selection will have the material applied to it.
</p>
<p>
<b>Hint:</b> You do not have to type the full command you can just type the name of the material. For example <i>/water</i> rather then <i>/editmat water</i>.
</p>
<p>
See <a href="editref.html#editmat">available materials</a>.
</p>
<h2 id="cheat_sheet">Cheat Sheet</h2>
<ul>
<li>Mouse Left Button: Select Faces</li>
<li>Mouse Middle Button: Select Corners</li>
<li>Mouse Right Button: Extend selection; Reorient section direction (requires initial selection)</li>
<li>Mouse Wheel: Pull cubes into existence and push them out of existence</li>
<li>Spacebar: Deselect</li>
<li>F+Mouse Wheel: Push and pull all 4 corners at once (in the case of no corner selection)</li>
<li>R+Mouse Wheel: Rotate relative to the white box</li>
<li>Y+Mouse Wheel: Quick texture change</li>
<li>G+Mouse Wheel: change grid size</li>
<li>U: undo one step</li>
<li>X: Mirror relative to the side of the white box</li>
<li>F2: Texture menu</li>
<li>Keypad Enter: Selection entities within selection</li>
<li><i>/savemap mapname</i> to save your map</li>
</ul>
</body>
</html>

2938
docs/editref.html Normal file

File diff suppressed because it is too large Load Diff

BIN
docs/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

1151
docs/game.html Normal file

File diff suppressed because it is too large Load Diff

1093
docs/history.html Normal file

File diff suppressed because it is too large Load Diff

883
docs/models.html Normal file
View File

@ -0,0 +1,883 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Cube 2: Sauerbraten - Model Reference</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="shortcut icon" href="favicon.ico" />
</head>
<body>
<h1>Cube 2: Sauerbraten - Model Reference</h1>
<div class="contents">
<ul class="contents">
<li>
<a href="#md2_format"><b>MD2 Format</b></a>
<ul class="contents2">
<li>
<a href="#md2anim"><tt>md2anim</tt></a>
</li>
</ul>
</li>
<li>
<a href="#md3_format"><b>MD3 Format</b></a>
<ul class="contents2">
<li>
<a href="#without_configuration">Without Configuration</a>
</li>
<li>
<a href="#with_configuration">With Configuration</a>
<ul class="contents3">
<li>
<a href="#md3load"><tt>md3load</tt></a>
</li>
<li>
<a href="#md3pitch"><tt>md3pitch</tt></a>
</li>
<li>
<a href="#md3skin"><tt>md3skin</tt></a>
</li>
<li>
<a href="#md3bumpmap"><tt>md3bumpmap</tt></a>
</li>
<li>
<a href="#md3spec"><tt>md3spec</tt></a>
</li>
<li>
<a href="#md3alphatest"><tt>md3alphatest</tt></a>
</li>
<li>
<a href="#md3alphablend"><tt>md3alphablend</tt></a>
</li>
<li>
<a href="#md3shader"><tt>md3shader</tt></a>
</li>
<li>
<a href="#md3ambient"><tt>md3ambient</tt></a>
</li>
<li>
<a href="#md3envmap"><tt>md3envmap</tt></a>
</li>
<li>
<a href="#md3glow"><tt>md3glow</tt></a>
</li>
<li>
<a href="#md3glare"><tt>md3glow</tt></a>
</li>
<li>
<a href="#md3fullbright"><tt>md3fullbright</tt></a>
</li>
<li>
<a href="#md3anim"><tt>md3anim</tt></a>
</li>
<li>
<a href="#md3link"><tt>md3link</tt></a>
</li>
</ul>
</li>
<li>
<a href="#sample_configuration">Sample Configuration</a>
</li>
</ul>
</li>
<li>
<a href="#obj_format"><b>OBJ Format</b></a>
</li>
<li>
<a href="#md5_format"><b>MD5 Format</b></a>
<ul class="contents2">
<li>
<a href="#md5load"><tt>md5load</tt></a>
</li>
<li>
<a href="#md5pitch"><tt>md5pitch</tt></a>
</li>
<li>
<a href="#md5skin"><tt>md5skin</tt></a>
</li>
<li>
<a href="#md5bumpmap"><tt>md5bumpmap</tt></a>
</li>
<li>
<a href="#md5spec"><tt>md5spec</tt></a>
</li>
<li>
<a href="#md5alphatest"><tt>md5alphatest</tt></a>
</li>
<li>
<a href="#md5alphablend"><tt>md5alphablend</tt></a>
</li>
<li>
<a href="#md5shader"><tt>md5shader</tt></a>
</li>
<li>
<a href="#md5ambient"><tt>md5ambient</tt></a>
</li>
<li>
<a href="#md5envmap"><tt>md5envmap</tt></a>
</li>
<li>
<a href="#md5glow"><tt>md5glow</tt></a>
</li>
<li>
<a href="#md5glare"><tt>md5glare</tt></a>
</li>
<li>
<a href="#md5fullbright"><tt>md5fullbright</tt></a>
</li>
<li>
<a href="#md5anim"><tt>md5anim</tt></a>
</li>
<li>
<a href="#md5animpart"><tt>md5animpart</tt></a>
</li>
<li>
<a href="#md5tag"><tt>md5tag</tt></a>
</li>
<li>
<a href="#md5link"><tt>md5link</tt></a>
</li>
<li>
<a href="#md5adjust"><tt>md5adjust</tt></a>
</li>
</ul>
</li>
<li>
<a href="#smd_format"><b>SMD Format</b></a>
</li>
<li>
<a href="#iqm_format"><b>IQM Format</b></a>
</li>
<li>
<a href="#common_commands"><b>Common Commands</b></a>
<ul class="contents2">
<li>
<a href="#mdlcollide"><tt>mdlcollide</tt></a>
</li>
<li>
<a href="#mdlellipsecollide"><tt>mdlellipsecollide</tt></a>
</li>
<li>
<a href="#mdlbb"><tt>mdlbb</tt></a>
</li>
<li>
<a href="#mdlcullface"><tt>mdlcullface</tt></a>
</li>
<li>
<a href="#mdlspec"><tt>mdlspec</tt></a>
</li>
<li>
<a href="#mdlalphatest"><tt>mdlalphatest</tt></a>
</li>
<li>
<a href="#mdlalphablend"><tt>mdlalphablend</tt></a>
</li>
<li>
<a href="#mdlglow"><tt>mdlglow</tt></a>
</li>
<li>
<a href="#mdlglare"><tt>mdlglare</tt></a>
</li>
<li>
<a href="#mdlshader"><tt>mdlshader</tt></a>
</li>
<li>
<a href="#mdlambient"><tt>mdlambient</tt></a>
</li>
<li>
<a href="#mdlscale"><tt>mdlscale</tt></a>
</li>
<li>
<a href="#mdltrans"><tt>mdltrans</tt></a>
</li>
<li>
<a href="#mdlyaw"><tt>mdlyaw</tt></a>
</li>
<li>
<a href="#mdlpitch"><tt>mdlpitch</tt></a>
</li>
<li>
<a href="#mdlspin"><tt>mdlspin</tt></a>
</li>
<li>
<a href="#mdlenvmap"><tt>mdlenvmap</tt></a>
</li>
<li>
<a href="#mdlfullbright"><tt>mdlfullbright</tt></a>
</li>
<li>
<a href="#mdlshadow"><tt>mdlshadow</tt></a>
</li>
</ul>
</li>
</ul>
</div>
<h2 id="md2_format">MD2 Format</h2>
<p>
MD2 files must be located in a directory in <i>packages/models/</i>, you must provide a skin
(either <i>skin.jpg</i> or <i>skin.png</i>) and the md2 itself (<i>tris.md2</i>).
Optionally you may provide a <i>masks.jpg</i> that holds a specmap in the R channel, a glowmap
in the G channel, and a chrome map in the B channel. The engine will apply it automatically.
</p>
<p>
If either of these files is not found, the engine will search the parent directory for them.
For example, if for the <i>flags/red</i> model, the tris.md2 is not found in
<i>packages/models/flags/red/</i>, then it will look for tris.md2 in <i>packages/models/flags/</i>.
This allows the sharing of skins and geometry.
</p>
<p>
It is expected that md2 format files use Quake-compatible scale and animations, unless you configure the model otherwise.
</p>
<p>
You may also supply a config file (<i>md2.cfg</i>) in your model directory, which allows you to
customize the model's animations. The following commands may be used in an <i>md2.cfg</i>:
</p>
<pre id="md2anim">md2anim N F M [S [P]]</pre>
<p>
N is the name of the animation to define. Any of the following names may be used:
</p>
<ul>
<li>dying</li>
<li>dead</li>
<li>pain</li>
<li>idle</li>
<li>forward</li>
<li>backward</li>
<li>left</li>
<li>right</li>
<li>hold 1 ... hold 7</li>
<li>attack 1 ... attack 7</li>
<li>jump</li>
<li>sink</li>
<li>swim</li>
<li>edit</li>
<li>lag</li>
<li>taunt</li>
<li>win</li>
<li>lose</li>
<li>gun shoot</li>
<li>gun idle</li>
<li>vwep shoot</li>
<li>vwep idle</li>
<li>mapmodel</li>
<li>trigger</li>
</ul>
<p>
F is the frame number the animation starts at. M is the number of frames in the
animation. S is the optional frames per second at which to run the anim. If none is specified,
10 FPS is the default. P specifies an optional priority for the animation (defaults to P=0).
</p>
<p>
For example, defining a "pain" animation starting at frame 50 with 6 frames and running at 30 frames per
second would look like: <i>md2anim "pain" 50 6 30</i>
</p>
<h2 id="md3_format">MD3 Format</h2>
<p>
MD3 file can be used in one of two ways.
</p>
<h3 id="without_configuration">Without Configuration</h3>
<p>
Go this way if your md3 has no animations (static) and takes only one texture, they must be
located in a directory in <i>packages/models/</i>, and provide a skin (either <i>skin.jpg</i>
or <i>skin.png</i>) and the md3 itself (<i>tris.md3</i>). Optionally you may provide a
<i>masks.jpg</i> that holds a specmap in the R channel, a glowmap in the G channel, and a
chrome map in the B channel. The engine will apply it automatically.
</p>
<p>
If either of these files is not found, the engine will search the parent directory for them.
For example, if for the <i>flags/red model</i>, the <i>tris.md3</i> is not found in
<i>packages/models/flags/red/</i>, then it will look for <i>tris.md3</i> in
<i>packages/models/flags/</i>. This allows the sharing of skins and geometry.
</p>
<h3 id="with_configuration">With Configuration</h3>
<p>
MD3 files with animations multiple skins, or if you want to make use of other configuration
possibilities, need to be set up this way. You must place a <i>md3.cfg</i> in a directory in
<i>packages/models/</i>. This file specifies which models should be loaded, linked, etc. The
following commands may be used in the <i>md3.cfg</i>:
</p>
<pre id="md3load">md3load P</pre>
<p>
This command loads the first part of your model. As an example, this could be the <i>head.md3</i>
of a playermodel. P is the path to the md3 file to load, its relative to the location of the
<i>md3.cfg</i>.
</p>
<pre id="md3pitch">md3pitch S O M N</pre>
<p>
This command controls how a model responds to the model's pitch. The pitch (in degrees) is scaled
by S, offset by O, and then clamped to the range M..N, i.e. clamp(pitch*S + O, M, N). By default,
all model parts have S=1, O=0, M=-360, and N=360, such that the model part will pitch one-to-one.
</p>
<pre id="md3skin">md3skin H S M [E [F]]</pre>
<p>
This loads a texture and assigns it to a mesh of the last loaded model (md3load). H is the name
of the mesh you want to assign the texture to. S is the path to the texture, its recursive
to the location of the <i>md3.cfg</i>. The optional M sets a texture for spec (red channel)/glow
(green channel) maps as above. If E is non-zero, then the blue channel of the masks is
interpreted as a chrome map. E (maximum envmap intensity) and F (minimum envmap intensity, default: 0) are floating point
values in the range of 0 to 1, and specify the range in which the envmapping intensity will vary based on a viewing angle
(a Fresnel term that is maximal at glancing angles, minimal when viewed dead-on). The intensity,
after scaled into this range, is then multiplied by the chrome map.
</p>
<pre id="md3bumpmap">md3bumpmap H N [S]</pre>
<p>
This command enables bumpmapping for a given mesh in the last loaded model (md3load). H is the name
of the mesh you want to assign bumpmapping textures to. S is the path to a diffuse skin texture which is (if specified)
used instead of the skin supplied with the "md3skin" command only if the user's 3D card supports bumpmapping,
otherwise the skin supplied with "md3skin" takes precedence and no bumpmapping is done. These
two diffuse skins may be the same. However a diffuse skin intended for bumpmapping should generally have
little to no directional shading baked into it, whereas flat diffuse skins (no bumpmapping) generally should,
and this command allows you to provide a separate skin for the bumpmapping case. N is a normal map texture which is
used to shade the supplied diffuse skin texture.
</p>
<pre id="md3spec">md3spec MESH S</pre>
<p>
MESH specifies the name of the mesh this setting applies to. S is the specular intensity (not given or 0 gives the default of 100, good for metal/plastics and anything shiny, use lower values like 50 for wood etc, -1 means off entirely).</p>
<pre id="md3alphatest">md3alphatest MESH T</pre>
<p>
MESH specifies the name of the mesh this setting applies to. Controls the cut-off threshold, T, at which alpha-channel skins will discard pixels where alpha is less than T.
T is a floating point value in the range of 0 to 1 (Default: 0.9).
</p>
<pre id="md3alphablend">md3alphablend MESH B</pre>
<p>
MESH specifies the name of the mesh this setting applies to. Controls whether a model with an alpha-channel skin will alpha blend (Default: 1).
</p>
<pre id="md3shader">md3shader MESH S</pre>
<p>
MESH specifies the name of the mesh this setting applies to. S is the name of the shader to use for rendering the model (Default: "stdmodel").
</p>
<pre id="md3glow">md3glow MESH G</pre>
<p>
MESH specifies the name of the mesh this setting applies to. G is the glowmap scale (not given or 0 gives the default of 300, -1 means off entirely), such that
the glow is G percent of the diffuse skin color.
</p>
<pre id="md3glare">md3glare MESH S G</pre>
<p>
MESH specifies the name of the mesh this setting applies to. S and G are floating point values that scale the amount of glare generated by specular light and glare, respectively (Default: 1 1).
</p>
<pre id="md3envmap">md3envmap MESH P</pre>
<p>
MESH specifies the name of the mesh this setting applies to. Sets the environment map used for the model, where P is a pathname in the same syntax as the
"loadsky" command. If this is not specified, the mesh will use the closest "envmap" entity,
or skybox, if none is available (unless overridden by "mdlenvmap").
</p>
<pre id="md3ambient">md3ambient MESH A</pre>
<p>
MESH specifies the name of the mesh this setting applies to. A is the percent of the ambient light that should be used for shading. Not given or 0 gives the
default of 30%, -1 means no ambient.
</p>
<pre id="md3fullbright">md3fullbright MESH N</pre>
<p>
MESH specifies the name of the mesh this setting applies to. Uses a constant lighting level of N instead of the normal lighting. N is a floating-point value on a scale of 0 to 1.
</p>
<pre id="md3anim">md3anim A F N [S [P]]</pre>
<p>
This assigns a new animation to the last loaded model (md3load). A is the name of the animation
to define. Any of the following names may be used:
</p>
<ul>
<li>dying</li>
<li>dead</li>
<li>pain</li>
<li>idle</li>
<li>forward</li>
<li>backward</li>
<li>left</li>
<li>right</li>
<li>hold 1 ... hold 7</li>
<li>attack 1 ... attack 7</li>
<li>jump</li>
<li>sink</li>
<li>swim</li>
<li>edit</li>
<li>lag</li>
<li>taunt</li>
<li>win</li>
<li>lose</li>
<li>gun shoot</li>
<li>gun idle</li>
<li>vwep shoot</li>
<li>vwep idle</li>
<li>mapmodel</li>
<li>trigger</li>
</ul>
<p>
F is the frame number the animation starts at. N is the number of frames in the animation.
S is frames per second at which to run the anim. If none is specified or S=0, 10 FPS is the default.
P specifies an optional priority for the animation (defaults to P=0).
</p>
<p>
A character model will have up to 2 animations simultaneously playing - a primary animation
and a secondary animation. If a character model defines the primary animation, it will be used,
otherwise the secondary will be used if it is available. Primary animations are:
</p>
<ul>
<li>dying</li>
<li>dead</li>
<li>pain</li>
<li>hold 1 ... hold 7</li>
<li>attack 1 ... attack 7</li>
<li>edit</li>
<li>lag</li>
<li>taunt</li>
<li>win</li>
<li>lose</li>
</ul>
<p>
Secondary animations are:
</p>
<ul>
<li>idle</li>
<li>forward</li>
<li>backward</li>
<li>left</li>
<li>right</li>
<li>jump</li>
<li>sink</li>
<li>swim</li>
</ul>
<p>
This allows, for example, a torso part to "shoot" (a primary animation) while a leg part
simultaneously runs "forward" (a secondary animation). In the event that a secondary animation
other than "idle" is playing and there is no primary animation, then the secondary animation
will behave as if it were primary, and the secondary animation will effectively be "idle".
This allows parts that would not normally participate in a certain animation to do so in the
"idle" case, or otherwise simply be "idle" if this is not desired. However, if you want to override
which animation is primary for a specific part, you can set an explicit priority for that animation,
and the animation with the highest priority is chosen, regardless of which is primary and
which is secondary. So, for example, you could give an animation a -1 priority so that all animations
with the default 0 priority are chosen first, or you could give an animation a 1 or greater priority
so that it is always chosen before animations with the default 0 priority.
</p>
<p>
For example, to define a "punch" animation starting at frame 131 with 6 frames and running at
15 frames per second: <i>md3anim "punch" 131 6 15</i>
</p>
<pre id="md3link">md3link P C T [X Y Z]</pre>
<p>
This links two models together. Every model you load with md3load has an ID. The first model
you load has the ID 0, the second has the ID 1, and so on, those ID's are now used to identify
the models and link them together. P the ID of the parent model. C to ID of the
child model. T name of the tag that specifies at which vertex the models should be linked.
X, Y, and Z are optional translation for this link.
</p>
<p>
Hint: <i>Make sure you understand the difference between the parent and child model.
Rendering starts at model 0 (first loaded model) and then continues with model 0's children,
etc. Imagine a tree, model 0 is the root if it.</i>
</p>
<h3 id="sample_configuration">Sample Configuration</h3>
<pre>
md3load lower.md3 // model no. 0
md3skin l_lower ./default_l.png
md3anim dying 0 30 20
md3anim dead 30 1 25
md3anim "forward|backward|left|right|swim" 114 10 18
md3anim idle 164 30 30
md3anim "jump|lag|edit" 147 8 15
md3load upper.md3 // model no. 1
md3skin u_torso ./default.png
md3anim dying 0 30 20
md3anim dead 30 1 25
md3anim "lag|edit" 91 40 18
md3anim "attack *" 131 6 15
md3anim idle 152 1 15
md3anim pain 152 1 15
md3load head.md3 // model no. 2
md3skin h_head ./default_h.png
md3link 0 1 tag_torso
md3link 1 2 tag_head
mdlspec 50
mdlscale 20 // 20 percent of the original size
mdltrans 0 0 -1.5 // lower the model a bit
</pre>
<h2 id="obj_format">OBJ Format</h2>
<p>
The Wavefront OBJ format is configured almost identically to how MD3s are used. The only differences are that OBJ specific commands are prefixed with "obj" instead of "md3" (i.e. "objskin" instead of "md3skin") which are specified in "obj.cfg" instead of "md3.cfg", it looks for "tris.obj" instead of "tris.md3" by default, and there is no support for animation ("objanim") or linking ("objlink"). Group names are used to identify meshes within the model.
</p>
<h2 id="md5_format">MD5 Format</h2>
<p>
MD5 models require a proper configuration to function; make sure your exporter properly exports mesh names in the MD5 file so that these can be referenced in the configuration file (the Blender exporter does not export these, but a fixed Blender MD5 exporter can be gotten from the Cube wiki).
</p>
<p>
Make sure no more than 4 blend weights are used per vertex, any extra blend weights will be dropped silently. The skeleton should use no more than 256 bones, and less than 70 or so bones should be used if you wish the model to be skeletally animated on the GPU. To optimize animation of the model on both CPU and GPU, keep the number of blend weights per vertex to a minimum. Also, similar combinations of blend weights are cached while animating, especially on the CPU, such that if two or more vertices use the same blend weights, blending calculations only have to be done once for all the vertices - so try and minimize the number of distinct combinations of blend weights if possible.
</p>
<p>
When animating skeletal models, you should model the animations as a single piece for the entire body (unlike for MD3 which requires splitting the mesh). In the configuration file, you can choose a bone at which to split the model into an upper and lower part (via "md5animpart"), which allows, for example, the upper body movement of one animation to be combined with the lower body movement of another animation automatically. The bone at which you split the animation up should ideally be a root bone, of which the upper body and lower body are separate sub-trees. Rigging the model in this way also allows for pitch animation (which also requires selecting a bone to pitch at) to take place such as bending at the waist, which similarly requires the upper body to be a sub-tree of the bone at which the pitch animation will occur.
</p>
<p>
The included MD5 support allows for two methods of attaching models to another: via tags (by assigning a tag name to a bone with "md5tag"), or by animating multiple models against a common, named skeleton that will be shared among all of them (useful for modeling clothing attachments and similar items). To use a shared skeleton, you simply export all the models with the same skeleton. Animations only need to be specified for the base model. A name for the skeleton is specified via the "md5load" command, for both the model exporting the skeleton and the models using it. When one of the models is attached to the one supplying the skeleton internally, the tag setup is instead ignored and the skeleton/animations of the base model are used to animate the attachment as if it were a sub-mesh of the base model itself.
</p>
<p>
You must place a <i>md5.cfg</i> in a directory in <i>packages/models/</i>.
The following commands may be used in the <i>md5.cfg</i>:
</p>
<pre id="md5load">md5load P [S]</pre>
<p>
This command loads the first part of your model. As an example, this could be the <i>head.md5mesh</i>
of a playermodel. P is the path to the md5mesh file to load, its relative to the location of the
<i>md5.cfg</i>. S is an optional name that can be assigned to the skeleton specified in the md5mesh
for skeleton sharing, but need not be specified if you do not wish to share the skeleton. This skeleton
name must be specified for both the model supplying a skeleton and an attached model intending to use the skeleton.
</p>
<pre id="md5pitch">md5pitch B S O M N</pre>
<p>
This command controls how a model responds to the model's pitch. B is the name of the bone which
the pitch animation is applied to, as well as all bones in the sub-tree below it. The pitch (in degrees)
is scaled by S, offset by O, and then clamped to the range M..N, i.e. clamp(pitch*S + O, M, N). By default,
all model parts have S=1, O=0, M=-360, and N=360, such that the model part will pitch one-to-one.
</p>
<pre id="md5skin">md5skin H S M [E [F]]</pre>
<p>
This loads a texture and assigns it to a mesh of the last loaded model (md5load). H is the name
of the mesh you want to assign the texture to. S is the path to the texture, its recursive
to the location of the <i>md5.cfg</i>. The optional M sets a texture for spec (red channel)/glow
(green channel) maps as above. If E is non-zero, then the blue channel of the masks is
interpreted as a chrome map. E (maximum envmap intensity) and F (minimum envmap intensity, default: 0) are floating point
values in the range of 0 to 1, and specify the range in which the envmapping intensity will vary based on a viewing angle
(a Fresnel term that is maximal at glancing angles, minimal when viewed dead-on). The intensity,
after scaled into this range, is then multiplied by the chrome map.
</p>
<pre id="md5bumpmap">md5bumpmap H N [S]</pre>
<p>
This command enables bumpmapping for a given mesh in the last loaded model (md5load). H is the name
of the mesh you want to assign bumpmapping textures to. S is the path to a diffuse skin texture which is
used (if specified) instead of the skin supplied with the "md5skin" command only if the user's 3D card supports bumpmapping,
otherwise the skin supplied with "md5skin" takes precedence and no bumpmapping is done. These
two diffuse skins may be the same. However a diffuse skin intended for bumpmapping should generally have
little to no directional shading baked into it, whereas flat diffuse skins (no bumpmapping) generally should,
and this command allows you to provide a separate skin for the bumpmapping case. N is a normal map texture which is
used to shade the supplied diffuse skin texture.
</p>
<pre id="md5spec">md5spec MESH S</pre>
<p>
MESH specifies the name of the mesh this setting applies to. S is the specular intensity (not given or 0 gives the default of 100, good for metal/plastics and anything shiny, use lower values like 50 for wood etc, -1 means off entirely).</p>
<pre id="md5alphatest">md5alphatest MESH T</pre>
<p>
MESH specifies the name of the mesh this setting applies to. Controls the cut-off threshold, T, at which alpha-channel skins will discard pixels where alpha is less than T.
T is a floating point value in the range of 0 to 1 (Default: 0.9).
</p>
<pre id="md5alphablend">md5alphablend MESH B</pre>
<p>
MESH specifies the name of the mesh this setting applies to. Controls whether a model with an alpha-channel skin will alpha blend (Default: 1).
</p>
<pre id="md5shader">md5shader MESH S</pre>
<p>
MESH specifies the name of the mesh this setting applies to. S is the name of the shader to use for rendering the model (Default: "stdmodel").
</p>
<pre id="md5glow">md5glow MESH G</pre>
<p>
MESH specifies the name of the mesh this setting applies to. G is the glowmap scale (not given or 0 gives the default of 300, -1 means off entirely), such that
the glow is G percent of the diffuse skin color.
</p>
<pre id="md5glare">md5glare MESH S G</pre>
<p>
MESH specifies the name of the mesh this setting applies to. S and G are floating point values that scale the amount of glare generated by specular light and glare, respectively (Default: 1 1).
</p>
<pre id="md5envmap">md5envmap MESH P</pre>
<p>
MESH specifies the name of the mesh this setting applies to. Sets the environment map used for the model, where P is a pathname in the same syntax as the
"loadsky" command. If this is not specified, the mesh will use the closest "envmap" entity,
or skybox, if none is available (unless overridden by "mdlenvmap").
</p>
<pre id="md5ambient">md5ambient MESH A</pre>
<p>
MESH specifies the name of the mesh this setting applies to. A is the percent of the ambient light that should be used for shading. Not given or 0 gives the
default of 30%, -1 means no ambient.
</p>
<pre id="md5fullbright">md5fullbright MESH N</pre>
<p>
MESH specifies the name of the mesh this setting applies to. Uses a constant lighting level of N instead of the normal lighting. N is a floating-point value on a scale of 0 to 1.
</p>
<pre id="md5anim">md5anim A F [S] [P] [START] [END]</pre>
<p>
This assigns a new animation to the current animation part of the last loaded model (md5load). A is the name of the animation
to define. Any of the following names may be used:
</p>
<ul>
<li>dying</li>
<li>dead</li>
<li>pain</li>
<li>idle</li>
<li>forward</li>
<li>backward</li>
<li>left</li>
<li>right</li>
<li>hold 1 ... hold 7</li>
<li>attack 1 ... attack 7</li>
<li>jump</li>
<li>sink</li>
<li>swim</li>
<li>edit</li>
<li>lag</li>
<li>taunt</li>
<li>win</li>
<li>lose</li>
<li>gun shoot</li>
<li>gun idle</li>
<li>vwep shoot</li>
<li>vwep idle</li>
<li>mapmodel</li>
<li>trigger</li>
</ul>
<p>
F is the file name of an md5 animation file. S is frames per second at which to run the anim. If none is specified or S=0, 10 FPS is the default. P specifies an optional priority for the animation (defaults to P=0). START is an optional start frame offset within the animation, where a positive values is an offset from the first frame, and a negative value is an offset from end. END is an optional animation length in frames, where positive values specify the length, or negative values merely subtract off from the length.
</p>
<p>
A character model will have up to 2 animations simultaneously playing - a primary animation
and a secondary animation. If a character model defines the primary animation, it will be used,
otherwise the secondary will be used if it is available. Primary animations are:
</p>
<ul>
<li>dying</li>
<li>dead</li>
<li>pain</li>
<li>hold 1 ... hold 7</li>
<li>attack 1 ... attack 7</li>
<li>edit</li>
<li>lag</li>
<li>taunt</li>
<li>win</li>
<li>lose</li>
</ul>
<p>
Secondary animations are:
</p>
<ul>
<li>idle</li>
<li>forward</li>
<li>backward</li>
<li>left</li>
<li>right</li>
<li>jump</li>
<li>sink</li>
<li>swim</li>
</ul>
<pre id="md5animpart">md5animpart B</pre>
<p>
Starts a new animation part that will include bone B and all its sub-bones. This effectively splits animations up at the bone B, such that each animation part animates as if it were a separate model. Note that a new animation part has no animations (does not inherit any from the previous animation part). After an "md5load", an implicit animation part is started that involves all bones not used by other animation parts. Each model currently may only have 2 animation parts, including the implicit default part, so this command may only be used once and only once per md5mesh loaded. However, you do not need to specify any animation parts explicitly and can just use the default part for all animations, if you do not wish the animations to be split up/blended together.
</p>
<pre id="md5tag">md5tag B T [X Y Z] [RX RY RZ]</pre>
<p>
Assigns the tag name T to the bone B, for either use with "md5link" or attachment of other models via tags. X, Y, and Z are an optional translation, whereas RX, RY, and RZ are optional rotations in degrees.
</p>
<pre id="md5link">md5link P C T [X Y Z]</pre>
<p>
This links two models together. Every model you load with md5load has an ID. The first model
you load has the ID 0, the second has the ID 1, and so on, those ID's are now used to identify
the models and link them together. P the ID of the parent model. C to ID of the
child model. T name of the tag that specifies at which vertex the models should be linked.
X, Y, and Z are an optional translation for this link.
</p>
<pre id="md5adjust">md5adjust BONE YAW [PITCH] [ROLL] [X Y Z]</pre>
<p>
Adjusts bone BONE with the specified rotations, in degrees, on any animations loaded after this command is specified. X, Y, and Z are an optional translation.
</p>
<h2 id="smd_format">SMD Format</h2>
<p>
The Half-Life SMD format is configured almost identically to how MD5s are used. The only differences are that SMD specific commands are prefixed with "smd" instead of "md5" (i.e. "smdskin" instead of "md5skin") which are specified in "smd.cfg" instead of "md5.cfg".
</p>
<h2 id="iqm_format">IQM Format</h2>
<p>
The Inter-Quake Model (IQM) format is configured almost identically to how MD5s are used. The only differences are that IQM specific commands are prefixed with "iqm" instead of "md5" (i.e. "iqmskin" instead of "md5skin") which are specified in "iqm.cfg" instead of "md5.cfg".
</p>
<h2 id="common_commands">Common Commands</h2>
<pre id="mdlcollide">mdlcollide N</pre>
<p>
If N is 0, collisions with the model are disabled (Default: 1).
</p>
<pre id="mdlellipsecollide">mdlellipsecollide N</pre>
<p>
If N is 1, the model uses an elliptical collision volume instead of a box (Default: 0). This setting is good for barrels, trees, etc.
</p>
<pre id="mdlbb">mdlbb R H [E]</pre>
<p>
Sets the model's bounding box to radius R and height H. If this is not set, or R and H are 0,
a bounding box is automatically generated from the model's geometry. E is fraction of the
model's height to be used as the eyeheight (Default: 0.9).
</p>
<pre id="mdlcullface">mdlcullface N</pre>
<p>
If N is 0, backface culling is disabled for this model. Otherwise, backface culling is enabled
(Default: 1).
</p>
<pre id="mdlspec">mdlspec S</pre>
<p>
S is the specular intensity (not given or 0 gives the default of 100, good for metal/plastics
and anything shiny, use lower values like 50 for wood etc, -1 means off entirely).
</p>
<pre id="mdlalphatest">mdlalphatest T</pre>
<p>
Controls the cut-off threshold, T, at which alpha-channel skins will discard pixels where alpha is less than T.
T is a floating point value in the range of 0 to 1 (Default: 0.9).
</p>
<pre id="mdlalphablend">mdlalphablend B</pre>
<p>
Controls whether a model with an alpha-channel skin will alpha blend (Default: 1).
</p>
<pre id="mdlglow">mdlglow G</pre>
<p>
G is the glowmap scale (not given or 0 gives the default of 300, -1 means off entirely), such that
the glow is G percent of the diffuse skin color.
</p>
<pre id="mdlglare">mdlglare S G</pre>
<p>
S and G are floating point values that scale the amount of glare generated by specular light and glare, respectively (Default: 1 1).
</p>
<pre id="mdlshader">mdlshader S</pre>
<p>
S is the name of the shader to use for rendering the model (Default: "stdmodel").
</p>
<pre id="mdlambient">mdlambient A</pre>
<p>
A is the percent of the ambient light that should be used for shading. Not given or 0 gives the
default of 30%, -1 means no ambient.
</p>
<pre id="mdlscale">mdlscale S</pre>
<p>
Scale the model's size to be S percent of its default size.
</p>
<pre id="mdltrans">mdltrans X Y Z</pre>
<p>
Translate the model's center by (X, Y, Z), where X/Y/Z are in model units (may use floating
point).
</p>
<pre id="mdlyaw">mdlyaw Y</pre>
<p>
Offsets the model's yaw by Y degrees.
point).
</p>
<pre id="mdlpitch">mdlpitch P</pre>
<p>
Offsets the model's pitch by P degrees.
</p>
<pre id="mdlspin">mdlspin Y</pre>
<p>
Simple spin animation that yaws the model by Y degrees per second.
</p>
<pre id="mdlenvmap">mdlenvmap E F [P]</pre>
<p>
Sets the environment map used for the model, where P is a pathname in the same syntax as the
"loadsky" command. If this is not specified, the model will use the closest "envmap" entity,
or skybox, if none is available. If E is non-zero, then the blue channel of the masks is
interpreted as a chrome map. E (maximum envmap intensity) and F (minimum envmap intensity, default: 0) are floating point
values in the range of 0 to 1, and specify the range in which the envmapping intensity will vary based on a viewing angle
(a Fresnel term that is maximal at glancing angles, minimal when viewed dead-on). The intensity,
after scaled into this range, is then multiplied by the chrome map.
</p>
<pre id="mdlfullbright">mdlfullbright N</pre>
<p>
Uses a constant lighting level of N instead of the normal lighting. N is a floating-point value on a scale of 0 to 1.
</p>
<pre id="mdlshadow">mdlshadow B</pre>
<p>
Controls whether a mapmodel will cast shadows (Default: 1).
</p>
</body>
</html>

423
docs/rpg.html Normal file
View File

@ -0,0 +1,423 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Sauerbraten RPG</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<h1>Sauerbraten RPG</h1>
<h2 id="running">Running</h2>
<p>
To launch the game, run the "rpg.bat" file which is included in the main Sauerbraten install directory.
</p>
<h2 id="building">Building</h2>
<p>
A Visual Studio solution and a Code::Blocks project file are included for building in the "src\rpggame\" directory within the Sauerbraten install directory.
</p>
<h2 id="gameplay_scripting">Gameplay Scripting</h2>
<p>
The RPG is set up in a very open way such that all gameplay objects and behaviour can be modified in a script file,
currently in data/game_rpg.cfg (this will change later to be on a per-map basis). The idea is that every map comes with its own "mod",
and that gameplay can be influenced by level designer, allowing gameplay types spanning
from a stat/story influenced FPS game, an action RPG, all the way to more complex
quest/story/stat based RPGs.
</p>
<p>
This file simply lists all gameplay objects, which can then be placed in the level editor. For example, by writing:
</p>
<pre id="spawn_apple">spawn_apple = [ r_worth 20 ]</pre>
<p>
you define a script that gets executed when an apple is spawned. You place this apple either directly in the world or as part of another objects inventory.
To place it in the world, you create an entity of type "spawn" with a name attached. This is best done by typing (in the console):
</p>
<pre id="newrpgspawn">newrpgspawn apple</pre>
<p>
which will show you your new entity in the editor. Running the map then will create
a new apple object at that location, with all stats set to your liking (in this
case just its worth).</p>
<p>
What is important to realize is that most r_ commands work with what is called the RPG stack. This makes it possible to apply
properties and actions to things without having to specify all the time which object you are talking about. For example, when the
spawn_apple script gets executed, the apple object will be on the top of the RPG stack, so any commands such as r_worth that apply to an
object, will automatically apply to it. It is a stack, because during the initialization of one object you may spawn another, which means
all r_ commands will apply to the new object, until it is done, when the RPG stack returns to the previous object.
</p>
<p>
Following is a list of all commands... unless otherwise noted, they apply to the current object (top of the RPG stack).
</p>
<h2 id="rpg_object_commands">RPG object commands</h2>
<pre id="r_pop">r_pop</pre>
<p>
Removes the top object from the RPG stack
</p>
<pre id="r_spawn">r_spawn N</pre>
<p>
creates a new object, places it on the top of the RPG stack, then executes spawn_N to initialize it.
</p>
<pre id="r_contain">r_contain T</pre>
<p>
Takes the object on the top of the stack, and makes it part of the inventory of the object on the stack below it.
T is the type of inventory object, see the convenient scripts r_inventory, r_loot, r_fortrade instead.
</p>
<pre id="r_model">r_model M</pre>
<p>
Specify model M to represent this object visually when placed in the world
</p>
<pre id="r_action">r_action N A</pre>
<pre id="Pre3">r_quest N A</pre>
<p>
defines a custom action the player can take on this object. N is the tag word that describes the action, visible in
the objects menu in the game world, and A is the script that gets executed when the player selects it.
</p>
<p>
When A gets executed, the top of the stack will be object on which the action is
defined, below that target of the action, and below that the user of the action.
For example, the player (user) casts a fireball (object) onto a monster (target).
Or, the player (user/target) interacts with an npc (object).
</p>
<p>
A special tag is "use", this is the default action for items to be executed when
the user clicks on them in the inventory, or, it is the action that gets executed
when the player casts the currently selected spell (also see usetype below).
</p>
<p>
r_quest is the same as r_action, except that it also marks the start of a quest, with the action being the resolution of the quest.
The quest description is whatever the last r_say command was. Any r_take inside the action with a positive outcome concludes the quest. Quests can be seen
in the quest log.
</p>
<pre id="r_say">r_say T</pre>
<p>
Make text T the last thing this object said to the player
</p>
<pre id="r_take">r_take N A NA</pre>
<p>
Attempt to take object with name N from the player inventory, and place it in the objects inventory. If the item was succesfully grabbed (it was present),
action A is executed. If the item was not available, NA is executed. r_take is the preferred way to structure resolution of quests, i.e. everything the player ever
needs to do should go via token items.
</p>
<pre id="r_give">r_give N</pre>
<p>
give the player an item with name N
</p>
<pre id="Pre1">r_applydamage D</pre>
<p>
does D damage to the object on top of the stack. object one below the top of the stack must be the one doing the damage.
</p>
<pre id="Pre2">r_use</pre>
<p>
select or use the object for the player (see usetype below).
</p>
<h2 id="H2_1">RPG stats &amp; attributes</h2>
<p>
The following is a list of all stats tracked by each object. A stat is defined as a property of an object that determines its effectiveness when performing a certain action,
i.e. the "melee" stat affects your melee combat effectiveness. Stats are things that you can build up thruout the game, hence "health" is not a stat, but it is dependent on a stat, maxhp.
</p>
<table class="n" border="0" cellpadding="6" cellspacing="0">
<tr>
<td style="width: 100px">
melee</td>
<td style="width: 802px">
amount of damage when using a melee weapon (fists, swords, axes...)</td>
</tr>
<tr>
<td style="width: 100px">
ranged</td>
<td style="width: 802px">
amount of damage when using a ranged weapon (crossbow, shotgun, ...)</td>
</tr>
<tr>
<td style="width: 100px">
magic</td>
<td style="width: 802px">
amount of damage when using an attack spell (fireball...), level of utility when
using healing/creation spells</td>
</tr>
<tr>
<td style="width: 100px; height: 44px;">
regen</td>
<td style="width: 802px; height: 44px;">
amount of hp regenerated per second. regen is the only defense stat, it replaces
the traditional armour or resistence stats. regen is more flexible in the sense that
it is time based, so your effectiveness depends on being able to give or take sustained
damage, and deals better with the effects of running away mid-fight etc.</td>
</tr>
<tr>
<td style="width: 100px">
focus</td>
<td style="width: 802px">
amount of mana regenerated per second</td>
</tr>
<tr>
<td style="width: 100px">
attackspeed</td>
<td style="width: 802px">
reduces time delay between two attacks for any attack (melee/ranged/magic)</td>
</tr>
<tr>
<td style="width: 100px; height: 17px;">
movespeed</td>
<td style="width: 802px; height: 17px;">
</td>
</tr>
<tr>
<td style="width: 100px">
jumpheight</td>
<td style="width: 802px">
</td>
</tr>
<tr>
<td style="width: 100px">
maxhp</td>
<td style="width: 802px">
maximum health you will regenerate to</td>
</tr>
<tr>
<td style="width: 100px; height: 17px;">
maxmana</td>
<td style="width: 802px; height: 17px;">
maximum mana you can store</td>
</tr>
<tr>
<td style="width: 100px">
tradeskill</td>
<td style="width: 802px">
will give your better deals when trading</td>
</tr>
<tr>
<td style="width: 100px">
feared</td>
<td style="width: 802px; font-family: verdana,'trebuchet ms','zurich bt',tahoma,arial,helvetica,sans-serif;">
the higher this stat, the more likely people are likely to comply with your wishes</td>
</tr>
<tr style="font-family: verdana,'trebuchet ms','zurich bt',tahoma,arial,helvetica,sans-serif">
<td style="width: 100px">
stealth</td>
<td style="width: 802px">
reduces npc fov &amp; distance when stealing stuff</td>
</tr>
<tr>
<td style="width: 100px">
hostility</td>
<td style="width: 802px">
</td>
</tr>
<tr>
<td style="width: 100px">
stata, statb,
statc</td>
<td style="width: 802px">
generic stats, i.e. their meaning is map-specific. they can be set and
accumulated like any other stat, then scripts can use the results in any way they
wish.</td>
</tr>
</table>
<p>
a stat can be set on any rpg object using the r_X command, where X is any of the
above stat names, e.g. <i>r_melee 50</i>
gives the current object 50 melee points.
a script can read the current points using r_get_X, i.e. <i>echo "your melee points are: " (r_get_melee)</i>
outputs the current objects melee points.
</p>
<p>
A special case are objects that have no stats set directly (typically the player,
and sometimes NPCs): their stats are computed as cumulative from the stats of all
their inventory items. So if the player carries a gem that has melee 50, and gloves
that have melee 20, his own melee points are 70.
</p>
<p>
It's important to realize that stat points do not directly translate to damage and
such. Points are an indication of efficiency of a particular stat over the base
100%, along a logarithmic curve. So 0 melee points translates into 100% melee efficiency,
and what 70 melee points translates into... well, something above 100%, depending
on the log curve. Every map can define their own log curve for each stat, depending
on how fast you want points to result in increased melee damage. This is a game
balancing thing, in the sense that if the game world makes obtain items with melee
points too easy and the log curve is too gentle, then players will be overpowered.
The formula for melee is (other stats work similarly):
</p>
<p>
<i>meleedamage = weapondamage * ( log ( points / pointsscale + 1 ) * percentscale + 100 ) / 100</i>
</p>
<p>
(log = natural logarithm). so with a pointscale of 10, and a percentscale of 25,
our 70 points amount to a 152% melee efficiency, which, when combined with a weapon
that does 10 damage (at 100%), now does 15 melee damage. For movespeed you'd have
a similar formula, where instead of weapondamage you'd have the default running
speed.</p>
<p>
You can get the efficiency of any stat using r_eff_X, e.g. r_eff_melee.</p>
<p>
That may seem like a really convoluted way of doing things, but the log scale is
the only way to give a relatively constant challenge level in the game. Without
it, the game would start hard and become too easy real soon. The UI will show both
points and efficiency for stats so you can easy see the effect without understanding
the math.
</p>
<p>
You can define the log scale by doing: <i>r_def_X pointscale percentscale</i>, but this should only
really ever be done by the game designer, or experienced rpg level designers on their own levels, as tweaking
these values requires deep insight into how players will collect points thruout
a game.
</p>
<p>
It is worth repeating what should be obvious from the above: the player and npcs
don't have "levels" as in other RPGs. Increased ability is purely denoted by means
of points and efficiency above whatever is the 100% value of the related ability.
The end result is similar to traditional RPGs, but not quite. The above system is
more flexible in the sense that you can have completely independent "levels" for
all your abilities. But best of all, since your points are determined by what you
have in your inventory, any way you can get items can increase your ability, which
includes killing, stealing, finding, trading etc. You can change how you assign
your priorities mid-game, by trading melee items for magic items, for example. You
won't hit a "item plateau" as in so many RPG games 20% into the game because most
items you get are useless, here you can put everything to <em>some</em> use, even
if sometimes minimal.
</p>
<p>
The following are the attributes of any rpg object. Attrs are simpler in the sense
that they are just variables kept track of per object, and can be set/changed by
either the rpg system or the script code. They are all default 0 for a newly
initialized object.
</p>
<table border="0" cellpadding="6" cellspacing="0">
<tr>
<td style="width: 100px">
health</td>
<td style="width: 800px">
set to maxhp when an AI object spawns in the world, and regens using regen</td>
</tr>
<tr>
<td style="width: 100px; height: 16px">
mana</td>
<td style="width: 800px; height: 16px">
set to maxmana upon spawn, and regens using focus</td>
</tr>
<tr>
<td style="width: 100px">
gold</td>
<td style="width: 800px">
how much money is owned by the object (mostly for npcs/player only)</td>
</tr>
<tr>
<td style="width: 100px; height: 17px;">
worth</td>
<td style="width: 800px; height: 17px;">
base value when this object is sold by an npc (not necessarily when sold TO an npc)
</td>
</tr>
<tr>
<td style="width: 100px; height: 17px">
ai</td>
<td style="width: 800px; height: 17px">
0: no AI (a lifeless object, default), 1: a friendly AI (npc), 2: hostile AI (animals/monsters)&nbsp;</td>
</tr>
<tr>
<td style="width: 100px; height: 17px">
useamount</td>
<td style="width: 800px; height: 17px">
amount of uses this object has. items such as melee weapons have a certain amount
of uses before they break, and potion bottles may have a certain content.</td>
</tr>
<tr>
<td style="width: 100px; height: 30px;">
usetype</td>
<td style="width: 800px; height: 30px;">
how this object is used: 0: not a weapon, 1: melee weapon, 2: ranged weapon, 3: magic (projectile).<br />
When you "use" an object, an it is not a weapon, its associated action will be executed
immediately. When it is a weapon, it is merely selected, and
it is then available for repeated execution through the fire button (see attackrate).</td>
</tr>
<tr>
<td style="width: 100px">
damage</td>
<td style="width: 800px">
if not 0, this object can be used a weapon</td>
</tr>
<tr>
<td style="width: 100px">
maxrange</td>
<td style="width: 800px">
max range within which objects can be targeted when this object is used</td>
</tr>
<tr>
<td style="width: 100px">
maxangle</td>
<td style="width: 800px">
max angle from "forward" that objects can be targeted</td>
</tr>
<tr>
<td style="width: 100px">
attackrate</td>
<td style="width: 800px">
minimum time between two uses of this object</td>
</tr>
<tr>
<td style="width: 100px">
manacost</td>
<td style="width: 800px">
amount of mana used up for one use of this object</td>
</tr>
<tr>
<td style="width: 100px">
effect</td>
<td style="width: 800px">
the effect associated with this item when it is used... for spells it is the particle
number</td>
</tr>
<tr style="font-family: verdana,'trebuchet ms','zurich bt',tahoma,arial,helvetica,sans-serif">
<td style="width: 100px">
attra, attrb, attrc</td>
<td style="width: 800px">
generic attributes, can be set by the script code to implement gameplay features
not foreseen by the system</td>
</tr>
<tr style="font-family: verdana,'trebuchet ms','zurich bt',tahoma,arial,helvetica,sans-serif">
<td style="width: 100px">
usesound</td>
<td style="width: 800px">
sound played when this item is used. value must be from a call to "registersound"</td>
</tr>
</table>
<p>
These can be used similarly using r_X and r_get_X.
</p>
</body>
</html>

19
docs/style.css Normal file
View File

@ -0,0 +1,19 @@
/* Sauerbraten Stylesheet */
body { margin: 50px 4%; width: 90%; background-color: #302c28; color: #ffffff; font-family: verdana,"trebuchet ms","zurich bt",tahoma,arial,helvetica,sans-serif; font-size: 8pt; }
a { text-decoration: underline; color: #ffbb00; }
a:visited { color: #ff9900; }
a:hover { color: #ff9900; }
h1,h2,h3 { margin: 20px 1px 4px 1px; background-color: #662222; font-weight: bold; }
h1 { font-size: 120%; }
h2 { font-size: 100%; }
h3 { font-size: 90%; }
pre,code { padding: 1px 10px 1px 10px; font-family: monospace; border: 2px dotted #662222 }
table,tr,td { margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; border: 2px solid #662222; }
p { padding: 1px 10px 5px 10px; }
div { padding: 1px 10px 1px 10px; }
div.credits { letter-spacing: 8px; font-weight: bold; }
div.contents, .wiki #toc
{ margin: 0px 0px 10px 20px; padding: 1px 10px 1px 1px; background-color: #302c28; border: 2px solid #662222; float: right; clear: right; width: 25%; }
ul.contents { list-style-type: decimal; list-style-position: outside; }
ul.contents2 { list-style-type: disc; list-style-position: outside; }
ul.contents3 { list-style-type: square; list-style-position: outside; }

2
rpg.bat Normal file
View File

@ -0,0 +1,2 @@
bin\rpg.exe -q"$HOME\My Games\Sauerbraten" -grpg-log.txt -r %*

1
sauerbraten.bat Normal file
View File

@ -0,0 +1 @@
start bin\sauerbraten.exe "-q$HOME\My Games\Sauerbraten" -glog.txt %*

BIN
sauerbraten.pdb Normal file

Binary file not shown.

65
sauerbraten_unix Executable file
View File

@ -0,0 +1,65 @@
#!/bin/sh
# SAUER_DATA should refer to the directory in which Sauerbraten data files are placed.
#SAUER_DATA=~/sauerbraten
#SAUER_DATA=/usr/local/sauerbraten
SAUER_DATA=.
# SAUER_BIN should refer to the directory in which Sauerbraten executable files are placed.
SAUER_BIN=${SAUER_DATA}/bin_unix
# SAUER_OPTIONS contains any command line options you would like to start Sauerbraten with.
#SAUER_OPTIONS="-f"
SAUER_OPTIONS="-q${HOME}/.sauerbraten"
# SYSTEM_NAME should be set to the name of your operating system.
#SYSTEM_NAME=Linux
SYSTEM_NAME=`uname -s`
# MACHINE_NAME should be set to the name of your processor.
#MACHINE_NAME=i686
MACHINE_NAME=`uname -m`
case ${SYSTEM_NAME} in
Linux)
SYSTEM_NAME=linux_
;;
*)
SYSTEM_NAME=unknown_
;;
esac
case ${MACHINE_NAME} in
i486|i586|i686)
MACHINE_NAME=
;;
x86_64)
MACHINE_NAME=64_
;;
*)
if [ ${SYSTEM_NAME} != native_ ]
then
SYSTEM_NAME=native_
fi
MACHINE_NAME=
;;
esac
if [ -x ${SAUER_BIN}/native_client ]
then
SYSTEM_NAME=native_
MACHINE_NAME=
fi
if [ -x ${SAUER_BIN}/${SYSTEM_NAME}${MACHINE_NAME}client ]
then
cd ${SAUER_DATA}
exec ${SAUER_BIN}/${SYSTEM_NAME}${MACHINE_NAME}client ${SAUER_OPTIONS} "$@"
else
echo "Your platform does not have a pre-compiled Sauerbraten client."
echo "Please follow the following steps to build a native client:"
echo "1) Ensure you have the SDL, SDL-image, SDL-mixer, and OpenGL libraries installed."
echo "2) Change directory to src/ and type \"make install\"."
echo "3) If the build succeeds, return to this directory and run this script again."
exit 1
fi

46
server-init.cfg Normal file
View File

@ -0,0 +1,46 @@
// optional specific IP for server to use
// serverip N.N.N.N
// optional specific port for server to use
// serverport 28785
// maximum number of allowed clients
maxclients 8
// maximum number of bots a master can add - admins are unaffected by this limit
// set to 0 to disallow bots
serverbotlimit 8
// controls whether or not the server is intended for "public" use
// when set to 0, allows "setmaster 1" and locked/private mastermodes (for coop-editing and such)
// when set to 1, can only gain master by "auth" or admin, and doesn't allow locked/private mastermodes
// when set to 2, allows "setmaster 1" but disallows private mastermode (for public coop-editing)
publicserver 0
// description server shows for the server browser
serverdesc ""
// password required to connect to the server
// generally unnecessary unless you really don't want anyone connecting to your server
serverpass ""
// password that allows you to gain admin by "setmaster password_here"
adminpass ""
// controls whether or not the server reports to the masterserver
updatemaster 1
// optional message of the day to send to players on connect
// servermotd "..."
// controls whether admin privs are necessary to record a demo
// when 1 requires admin (default)
// when 0 only requires master
// restrictdemos 1
// maximum number of demos the server will store
// maxdemos 5
// maximum size a demo is allowed to grow to in megabytes
// maxdemosize 16

1
server.bat Normal file
View File

@ -0,0 +1 @@
start bin\sauerbraten.exe "-q$HOME\My Games\Sauerbraten" -gserver-log.txt -d %*

469
src/Makefile Normal file
View File

@ -0,0 +1,469 @@
CXXFLAGS= -O3 -fomit-frame-pointer
override CXXFLAGS+= -Wall -fsigned-char -fno-exceptions -fno-rtti
PLATFORM= $(shell uname -s)
PLATFORM_PREFIX= native
INCLUDES= -Ishared -Iengine -Ifpsgame -Ienet/include
STRIP=
ifeq (,$(findstring -g,$(CXXFLAGS)))
ifeq (,$(findstring -pg,$(CXXFLAGS)))
STRIP=strip
endif
endif
MV=mv
ifneq (,$(findstring MINGW,$(PLATFORM)))
WINDRES= windres
CLIENT_INCLUDES= $(INCLUDES) -Iinclude
CLIENT_LIBS= -mwindows -Llib -lSDL -lSDL_image -lSDL_mixer -lzdll -lopengl32 -lenet -lws2_32 -lwinmm
else
CLIENT_INCLUDES= $(INCLUDES) -I/usr/X11R6/include `sdl-config --cflags`
CLIENT_LIBS= -Lenet/.libs -lenet -L/usr/X11R6/lib -lX11 `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL
endif
ifeq ($(PLATFORM),Linux)
CLIENT_LIBS+= -lrt
endif
CLIENT_OBJS= \
shared/crypto.o \
shared/geom.o \
shared/stream.o \
shared/tools.o \
shared/zip.o \
engine/3dgui.o \
engine/bih.o \
engine/blend.o \
engine/blob.o \
engine/client.o \
engine/command.o \
engine/console.o \
engine/cubeloader.o \
engine/decal.o \
engine/dynlight.o \
engine/glare.o \
engine/grass.o \
engine/lightmap.o \
engine/main.o \
engine/material.o \
engine/menus.o \
engine/movie.o \
engine/normal.o \
engine/octa.o \
engine/octaedit.o \
engine/octarender.o \
engine/physics.o \
engine/pvs.o \
engine/rendergl.o \
engine/rendermodel.o \
engine/renderparticles.o \
engine/rendersky.o \
engine/rendertext.o \
engine/renderva.o \
engine/server.o \
engine/serverbrowser.o \
engine/shader.o \
engine/shadowmap.o \
engine/sound.o \
engine/texture.o \
engine/water.o \
engine/world.o \
engine/worldio.o \
fpsgame/ai.o \
fpsgame/client.o \
fpsgame/entities.o \
fpsgame/fps.o \
fpsgame/monster.o \
fpsgame/movable.o \
fpsgame/render.o \
fpsgame/scoreboard.o \
fpsgame/server.o \
fpsgame/waypoint.o \
fpsgame/weapon.o
CLIENT_PCH= shared/cube.h.gch engine/engine.h.gch fpsgame/game.h.gch
ifneq (,$(findstring MINGW,$(PLATFORM)))
SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) -Iinclude
SERVER_LIBS= -mwindows -Llib -lzdll -lenet -lws2_32 -lwinmm
MASTER_LIBS= -Llib -lzdll -lenet -lws2_32 -lwinmm
else
SERVER_INCLUDES= -DSTANDALONE $(INCLUDES)
SERVER_LIBS= -Lenet/.libs -lenet -lz
MASTER_LIBS= $(SERVER_LIBS)
endif
SERVER_OBJS= \
shared/crypto-standalone.o \
shared/stream-standalone.o \
shared/tools-standalone.o \
engine/command-standalone.o \
engine/server-standalone.o \
engine/worldio-standalone.o \
fpsgame/entities-standalone.o \
fpsgame/server-standalone.o
MASTER_OBJS= \
shared/crypto-standalone.o \
shared/stream-standalone.o \
shared/tools-standalone.o \
engine/command-standalone.o \
engine/master-standalone.o
ifeq ($(PLATFORM),SunOS)
CLIENT_LIBS+= -lsocket -lnsl -lX11
SERVER_LIBS+= -lsocket -lnsl
endif
default: all
all: client server
enet/Makefile:
cd enet; ./configure --enable-shared=no --enable-static=yes
libenet: enet/Makefile
$(MAKE) -C enet/ all
clean-enet: enet/Makefile
$(MAKE) -C enet/ clean
clean:
-$(RM) $(CLIENT_PCH) $(CLIENT_OBJS) $(SERVER_OBJS) $(MASTER_OBJS) sauer_client sauer_server sauer_master
%.h.gch: %.h
$(CXX) $(CXXFLAGS) -o $(subst .h.gch,.tmp.h.gch,$@) $(subst .h.gch,.h,$@)
$(MV) $(subst .h.gch,.tmp.h.gch,$@) $@
%-standalone.o: %.cpp
$(CXX) $(CXXFLAGS) -c -o $@ $(subst -standalone.o,.cpp,$@)
$(CLIENT_OBJS): CXXFLAGS += $(CLIENT_INCLUDES)
$(filter shared/%,$(CLIENT_OBJS)): $(filter shared/%,$(CLIENT_PCH))
$(filter engine/%,$(CLIENT_OBJS)): $(filter engine/%,$(CLIENT_PCH))
$(filter fpsgame/%,$(CLIENT_OBJS)): $(filter fpsgame/%,$(CLIENT_PCH))
$(SERVER_OBJS): CXXFLAGS += $(SERVER_INCLUDES)
$(filter-out $(SERVER_OBJS),$(MASTER_OBJS)): CXXFLAGS += $(SERVER_INCLUDES)
ifneq (,$(findstring MINGW,$(PLATFORM)))
client: $(CLIENT_OBJS)
$(WINDRES) -I vcpp -i vcpp/mingw.rc -J rc -o vcpp/mingw.res -O coff
$(CXX) $(CXXFLAGS) -o ../bin/sauerbraten.exe vcpp/mingw.res $(CLIENT_OBJS) $(CLIENT_LIBS)
server: $(SERVER_OBJS)
$(WINDRES) -I vcpp -i vcpp/mingw.rc -J rc -o vcpp/mingw.res -O coff
$(CXX) $(CXXFLAGS) -o ../bin/sauer_server.exe vcpp/mingw.res $(SERVER_OBJS) $(SERVER_LIBS)
master: $(MASTER_OBJS)
$(CXX) $(CXXFLAGS) -o ../bin/sauer_master.exe $(MASTER_OBJS) $(MASTER_LIBS)
install: all
else
client: libenet $(CLIENT_OBJS)
$(CXX) $(CXXFLAGS) -o sauer_client $(CLIENT_OBJS) $(CLIENT_LIBS)
server: libenet $(SERVER_OBJS)
$(CXX) $(CXXFLAGS) -o sauer_server $(SERVER_OBJS) $(SERVER_LIBS)
master: libenet $(MASTER_OBJS)
$(CXX) $(CXXFLAGS) -o sauer_master $(MASTER_OBJS) $(MASTER_LIBS)
shared/cube2font.o: shared/cube2font.c
$(CXX) $(CXXFLAGS) -c -o $@ $< `freetype-config --cflags`
cube2font: shared/cube2font.o
$(CXX) $(CXXFLAGS) -o cube2font shared/cube2font.o `freetype-config --libs` -lz
install: all
cp sauer_client ../bin_unix/$(PLATFORM_PREFIX)_client
cp sauer_server ../bin_unix/$(PLATFORM_PREFIX)_server
ifneq (,$(STRIP))
$(STRIP) ../bin_unix/$(PLATFORM_PREFIX)_client
$(STRIP) ../bin_unix/$(PLATFORM_PREFIX)_server
endif
endif
depend:
makedepend -Y -Ishared -Iengine -Ifpsgame $(subst .o,.cpp,$(CLIENT_OBJS))
makedepend -a -o.h.gch -Y -Ishared -Iengine -Ifpsgame $(subst .h.gch,.h,$(CLIENT_PCH))
makedepend -a -o-standalone.o -Y -DSTANDALONE -Ishared -Iengine -Ifpsgame $(subst -standalone.o,.cpp,$(SERVER_OBJS))
makedepend -a -o-standalone.o -Y -DSTANDALONE -Ishared -Iengine -Ifpsgame $(subst -standalone.o,.cpp,$(filter-out $(SERVER_OBJS), $(MASTER_OBJS)))
engine/engine.h.gch: shared/cube.h.gch
fpsgame/game.h.gch: shared/cube.h.gch
# DO NOT DELETE
shared/crypto.o: shared/cube.h shared/tools.h shared/geom.h shared/ents.h
shared/crypto.o: shared/command.h shared/iengine.h shared/igame.h
shared/geom.o: shared/cube.h shared/tools.h shared/geom.h shared/ents.h
shared/geom.o: shared/command.h shared/iengine.h shared/igame.h
shared/stream.o: shared/cube.h shared/tools.h shared/geom.h shared/ents.h
shared/stream.o: shared/command.h shared/iengine.h shared/igame.h
shared/tools.o: shared/cube.h shared/tools.h shared/geom.h shared/ents.h
shared/tools.o: shared/command.h shared/iengine.h shared/igame.h
shared/zip.o: shared/cube.h shared/tools.h shared/geom.h shared/ents.h
shared/zip.o: shared/command.h shared/iengine.h shared/igame.h
engine/3dgui.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/3dgui.o: shared/ents.h shared/command.h shared/iengine.h
engine/3dgui.o: shared/igame.h engine/world.h engine/octa.h engine/lightmap.h
engine/3dgui.o: engine/bih.h engine/texture.h engine/model.h engine/varray.h
engine/3dgui.o: engine/textedit.h
engine/bih.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/bih.o: shared/ents.h shared/command.h shared/iengine.h shared/igame.h
engine/bih.o: engine/world.h engine/octa.h engine/lightmap.h engine/bih.h
engine/bih.o: engine/texture.h engine/model.h engine/varray.h
engine/blend.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/blend.o: shared/ents.h shared/command.h shared/iengine.h
engine/blend.o: shared/igame.h engine/world.h engine/octa.h engine/lightmap.h
engine/blend.o: engine/bih.h engine/texture.h engine/model.h engine/varray.h
engine/blob.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/blob.o: shared/ents.h shared/command.h shared/iengine.h shared/igame.h
engine/blob.o: engine/world.h engine/octa.h engine/lightmap.h engine/bih.h
engine/blob.o: engine/texture.h engine/model.h engine/varray.h
engine/client.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/client.o: shared/ents.h shared/command.h shared/iengine.h
engine/client.o: shared/igame.h engine/world.h engine/octa.h
engine/client.o: engine/lightmap.h engine/bih.h engine/texture.h
engine/client.o: engine/model.h engine/varray.h
engine/command.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/command.o: shared/ents.h shared/command.h shared/iengine.h
engine/command.o: shared/igame.h engine/world.h engine/octa.h
engine/command.o: engine/lightmap.h engine/bih.h engine/texture.h
engine/command.o: engine/model.h engine/varray.h
engine/console.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/console.o: shared/ents.h shared/command.h shared/iengine.h
engine/console.o: shared/igame.h engine/world.h engine/octa.h
engine/console.o: engine/lightmap.h engine/bih.h engine/texture.h
engine/console.o: engine/model.h engine/varray.h
engine/cubeloader.o: engine/engine.h shared/cube.h shared/tools.h
engine/cubeloader.o: shared/geom.h shared/ents.h shared/command.h
engine/cubeloader.o: shared/iengine.h shared/igame.h engine/world.h
engine/cubeloader.o: engine/octa.h engine/lightmap.h engine/bih.h
engine/cubeloader.o: engine/texture.h engine/model.h engine/varray.h
engine/decal.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/decal.o: shared/ents.h shared/command.h shared/iengine.h
engine/decal.o: shared/igame.h engine/world.h engine/octa.h engine/lightmap.h
engine/decal.o: engine/bih.h engine/texture.h engine/model.h engine/varray.h
engine/dynlight.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/dynlight.o: shared/ents.h shared/command.h shared/iengine.h
engine/dynlight.o: shared/igame.h engine/world.h engine/octa.h
engine/dynlight.o: engine/lightmap.h engine/bih.h engine/texture.h
engine/dynlight.o: engine/model.h engine/varray.h
engine/glare.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/glare.o: shared/ents.h shared/command.h shared/iengine.h
engine/glare.o: shared/igame.h engine/world.h engine/octa.h engine/lightmap.h
engine/glare.o: engine/bih.h engine/texture.h engine/model.h engine/varray.h
engine/glare.o: engine/rendertarget.h
engine/grass.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/grass.o: shared/ents.h shared/command.h shared/iengine.h
engine/grass.o: shared/igame.h engine/world.h engine/octa.h engine/lightmap.h
engine/grass.o: engine/bih.h engine/texture.h engine/model.h engine/varray.h
engine/lightmap.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/lightmap.o: shared/ents.h shared/command.h shared/iengine.h
engine/lightmap.o: shared/igame.h engine/world.h engine/octa.h
engine/lightmap.o: engine/lightmap.h engine/bih.h engine/texture.h
engine/lightmap.o: engine/model.h engine/varray.h
engine/main.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/main.o: shared/ents.h shared/command.h shared/iengine.h shared/igame.h
engine/main.o: engine/world.h engine/octa.h engine/lightmap.h engine/bih.h
engine/main.o: engine/texture.h engine/model.h engine/varray.h
engine/material.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/material.o: shared/ents.h shared/command.h shared/iengine.h
engine/material.o: shared/igame.h engine/world.h engine/octa.h
engine/material.o: engine/lightmap.h engine/bih.h engine/texture.h
engine/material.o: engine/model.h engine/varray.h
engine/menus.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/menus.o: shared/ents.h shared/command.h shared/iengine.h
engine/menus.o: shared/igame.h engine/world.h engine/octa.h engine/lightmap.h
engine/menus.o: engine/bih.h engine/texture.h engine/model.h engine/varray.h
engine/movie.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/movie.o: shared/ents.h shared/command.h shared/iengine.h
engine/movie.o: shared/igame.h engine/world.h engine/octa.h engine/lightmap.h
engine/movie.o: engine/bih.h engine/texture.h engine/model.h engine/varray.h
engine/normal.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/normal.o: shared/ents.h shared/command.h shared/iengine.h
engine/normal.o: shared/igame.h engine/world.h engine/octa.h
engine/normal.o: engine/lightmap.h engine/bih.h engine/texture.h
engine/normal.o: engine/model.h engine/varray.h
engine/octa.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/octa.o: shared/ents.h shared/command.h shared/iengine.h shared/igame.h
engine/octa.o: engine/world.h engine/octa.h engine/lightmap.h engine/bih.h
engine/octa.o: engine/texture.h engine/model.h engine/varray.h
engine/octaedit.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/octaedit.o: shared/ents.h shared/command.h shared/iengine.h
engine/octaedit.o: shared/igame.h engine/world.h engine/octa.h
engine/octaedit.o: engine/lightmap.h engine/bih.h engine/texture.h
engine/octaedit.o: engine/model.h engine/varray.h
engine/octarender.o: engine/engine.h shared/cube.h shared/tools.h
engine/octarender.o: shared/geom.h shared/ents.h shared/command.h
engine/octarender.o: shared/iengine.h shared/igame.h engine/world.h
engine/octarender.o: engine/octa.h engine/lightmap.h engine/bih.h
engine/octarender.o: engine/texture.h engine/model.h engine/varray.h
engine/physics.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/physics.o: shared/ents.h shared/command.h shared/iengine.h
engine/physics.o: shared/igame.h engine/world.h engine/octa.h
engine/physics.o: engine/lightmap.h engine/bih.h engine/texture.h
engine/physics.o: engine/model.h engine/varray.h engine/mpr.h
engine/pvs.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/pvs.o: shared/ents.h shared/command.h shared/iengine.h shared/igame.h
engine/pvs.o: engine/world.h engine/octa.h engine/lightmap.h engine/bih.h
engine/pvs.o: engine/texture.h engine/model.h engine/varray.h
engine/rendergl.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/rendergl.o: shared/ents.h shared/command.h shared/iengine.h
engine/rendergl.o: shared/igame.h engine/world.h engine/octa.h
engine/rendergl.o: engine/lightmap.h engine/bih.h engine/texture.h
engine/rendergl.o: engine/model.h engine/varray.h
engine/rendermodel.o: engine/engine.h shared/cube.h shared/tools.h
engine/rendermodel.o: shared/geom.h shared/ents.h shared/command.h
engine/rendermodel.o: shared/iengine.h shared/igame.h engine/world.h
engine/rendermodel.o: engine/octa.h engine/lightmap.h engine/bih.h
engine/rendermodel.o: engine/texture.h engine/model.h engine/varray.h
engine/rendermodel.o: engine/ragdoll.h engine/animmodel.h engine/vertmodel.h
engine/rendermodel.o: engine/skelmodel.h engine/md2.h engine/md3.h
engine/rendermodel.o: engine/md5.h engine/obj.h engine/smd.h engine/iqm.h
engine/renderparticles.o: engine/engine.h shared/cube.h shared/tools.h
engine/renderparticles.o: shared/geom.h shared/ents.h shared/command.h
engine/renderparticles.o: shared/iengine.h shared/igame.h engine/world.h
engine/renderparticles.o: engine/octa.h engine/lightmap.h engine/bih.h
engine/renderparticles.o: engine/texture.h engine/model.h engine/varray.h
engine/renderparticles.o: engine/rendertarget.h engine/depthfx.h
engine/renderparticles.o: engine/explosion.h engine/lensflare.h
engine/renderparticles.o: engine/lightning.h
engine/rendersky.o: engine/engine.h shared/cube.h shared/tools.h
engine/rendersky.o: shared/geom.h shared/ents.h shared/command.h
engine/rendersky.o: shared/iengine.h shared/igame.h engine/world.h
engine/rendersky.o: engine/octa.h engine/lightmap.h engine/bih.h
engine/rendersky.o: engine/texture.h engine/model.h engine/varray.h
engine/rendertext.o: engine/engine.h shared/cube.h shared/tools.h
engine/rendertext.o: shared/geom.h shared/ents.h shared/command.h
engine/rendertext.o: shared/iengine.h shared/igame.h engine/world.h
engine/rendertext.o: engine/octa.h engine/lightmap.h engine/bih.h
engine/rendertext.o: engine/texture.h engine/model.h engine/varray.h
engine/renderva.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/renderva.o: shared/ents.h shared/command.h shared/iengine.h
engine/renderva.o: shared/igame.h engine/world.h engine/octa.h
engine/renderva.o: engine/lightmap.h engine/bih.h engine/texture.h
engine/renderva.o: engine/model.h engine/varray.h
engine/server.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/server.o: shared/ents.h shared/command.h shared/iengine.h
engine/server.o: shared/igame.h engine/world.h engine/octa.h
engine/server.o: engine/lightmap.h engine/bih.h engine/texture.h
engine/server.o: engine/model.h engine/varray.h
engine/serverbrowser.o: engine/engine.h shared/cube.h shared/tools.h
engine/serverbrowser.o: shared/geom.h shared/ents.h shared/command.h
engine/serverbrowser.o: shared/iengine.h shared/igame.h engine/world.h
engine/serverbrowser.o: engine/octa.h engine/lightmap.h engine/bih.h
engine/serverbrowser.o: engine/texture.h engine/model.h engine/varray.h
engine/shader.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/shader.o: shared/ents.h shared/command.h shared/iengine.h
engine/shader.o: shared/igame.h engine/world.h engine/octa.h
engine/shader.o: engine/lightmap.h engine/bih.h engine/texture.h
engine/shader.o: engine/model.h engine/varray.h
engine/shadowmap.o: engine/engine.h shared/cube.h shared/tools.h
engine/shadowmap.o: shared/geom.h shared/ents.h shared/command.h
engine/shadowmap.o: shared/iengine.h shared/igame.h engine/world.h
engine/shadowmap.o: engine/octa.h engine/lightmap.h engine/bih.h
engine/shadowmap.o: engine/texture.h engine/model.h engine/varray.h
engine/shadowmap.o: engine/rendertarget.h
engine/sound.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/sound.o: shared/ents.h shared/command.h shared/iengine.h
engine/sound.o: shared/igame.h engine/world.h engine/octa.h engine/lightmap.h
engine/sound.o: engine/bih.h engine/texture.h engine/model.h engine/varray.h
engine/texture.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/texture.o: shared/ents.h shared/command.h shared/iengine.h
engine/texture.o: shared/igame.h engine/world.h engine/octa.h
engine/texture.o: engine/lightmap.h engine/bih.h engine/texture.h
engine/texture.o: engine/model.h engine/varray.h engine/scale.h
engine/water.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/water.o: shared/ents.h shared/command.h shared/iengine.h
engine/water.o: shared/igame.h engine/world.h engine/octa.h engine/lightmap.h
engine/water.o: engine/bih.h engine/texture.h engine/model.h engine/varray.h
engine/world.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/world.o: shared/ents.h shared/command.h shared/iengine.h
engine/world.o: shared/igame.h engine/world.h engine/octa.h engine/lightmap.h
engine/world.o: engine/bih.h engine/texture.h engine/model.h engine/varray.h
engine/worldio.o: engine/engine.h shared/cube.h shared/tools.h shared/geom.h
engine/worldio.o: shared/ents.h shared/command.h shared/iengine.h
engine/worldio.o: shared/igame.h engine/world.h engine/octa.h
engine/worldio.o: engine/lightmap.h engine/bih.h engine/texture.h
engine/worldio.o: engine/model.h engine/varray.h
fpsgame/ai.o: fpsgame/game.h shared/cube.h shared/tools.h shared/geom.h
fpsgame/ai.o: shared/ents.h shared/command.h shared/iengine.h shared/igame.h
fpsgame/ai.o: fpsgame/ai.h
fpsgame/client.o: fpsgame/game.h shared/cube.h shared/tools.h shared/geom.h
fpsgame/client.o: shared/ents.h shared/command.h shared/iengine.h
fpsgame/client.o: shared/igame.h fpsgame/ai.h fpsgame/capture.h fpsgame/ctf.h
fpsgame/client.o: fpsgame/collect.h
fpsgame/entities.o: fpsgame/game.h shared/cube.h shared/tools.h shared/geom.h
fpsgame/entities.o: shared/ents.h shared/command.h shared/iengine.h
fpsgame/entities.o: shared/igame.h fpsgame/ai.h
fpsgame/fps.o: fpsgame/game.h shared/cube.h shared/tools.h shared/geom.h
fpsgame/fps.o: shared/ents.h shared/command.h shared/iengine.h shared/igame.h
fpsgame/fps.o: fpsgame/ai.h
fpsgame/monster.o: fpsgame/game.h shared/cube.h shared/tools.h shared/geom.h
fpsgame/monster.o: shared/ents.h shared/command.h shared/iengine.h
fpsgame/monster.o: shared/igame.h fpsgame/ai.h
fpsgame/movable.o: fpsgame/game.h shared/cube.h shared/tools.h shared/geom.h
fpsgame/movable.o: shared/ents.h shared/command.h shared/iengine.h
fpsgame/movable.o: shared/igame.h fpsgame/ai.h
fpsgame/render.o: fpsgame/game.h shared/cube.h shared/tools.h shared/geom.h
fpsgame/render.o: shared/ents.h shared/command.h shared/iengine.h
fpsgame/render.o: shared/igame.h fpsgame/ai.h
fpsgame/scoreboard.o: fpsgame/game.h shared/cube.h shared/tools.h
fpsgame/scoreboard.o: shared/geom.h shared/ents.h shared/command.h
fpsgame/scoreboard.o: shared/iengine.h shared/igame.h fpsgame/ai.h
fpsgame/server.o: fpsgame/game.h shared/cube.h shared/tools.h shared/geom.h
fpsgame/server.o: shared/ents.h shared/command.h shared/iengine.h
fpsgame/server.o: shared/igame.h fpsgame/ai.h fpsgame/capture.h fpsgame/ctf.h
fpsgame/server.o: fpsgame/collect.h fpsgame/extinfo.h fpsgame/aiman.h
fpsgame/waypoint.o: fpsgame/game.h shared/cube.h shared/tools.h shared/geom.h
fpsgame/waypoint.o: shared/ents.h shared/command.h shared/iengine.h
fpsgame/waypoint.o: shared/igame.h fpsgame/ai.h
fpsgame/weapon.o: fpsgame/game.h shared/cube.h shared/tools.h shared/geom.h
fpsgame/weapon.o: shared/ents.h shared/command.h shared/iengine.h
fpsgame/weapon.o: shared/igame.h fpsgame/ai.h
shared/cube.h.gch: shared/tools.h shared/geom.h shared/ents.h
shared/cube.h.gch: shared/command.h shared/iengine.h shared/igame.h
engine/engine.h.gch: shared/cube.h shared/tools.h shared/geom.h shared/ents.h
engine/engine.h.gch: shared/command.h shared/iengine.h shared/igame.h
engine/engine.h.gch: engine/world.h engine/octa.h engine/lightmap.h
engine/engine.h.gch: engine/bih.h engine/texture.h engine/model.h
engine/engine.h.gch: engine/varray.h
fpsgame/game.h.gch: shared/cube.h shared/tools.h shared/geom.h shared/ents.h
fpsgame/game.h.gch: shared/command.h shared/iengine.h shared/igame.h
fpsgame/game.h.gch: fpsgame/ai.h
shared/crypto-standalone.o: shared/cube.h shared/tools.h shared/geom.h
shared/crypto-standalone.o: shared/ents.h shared/command.h shared/iengine.h
shared/crypto-standalone.o: shared/igame.h
shared/stream-standalone.o: shared/cube.h shared/tools.h shared/geom.h
shared/stream-standalone.o: shared/ents.h shared/command.h shared/iengine.h
shared/stream-standalone.o: shared/igame.h
shared/tools-standalone.o: shared/cube.h shared/tools.h shared/geom.h
shared/tools-standalone.o: shared/ents.h shared/command.h shared/iengine.h
shared/tools-standalone.o: shared/igame.h
engine/command-standalone.o: engine/engine.h shared/cube.h shared/tools.h
engine/command-standalone.o: shared/geom.h shared/ents.h shared/command.h
engine/command-standalone.o: shared/iengine.h shared/igame.h engine/world.h
engine/server-standalone.o: engine/engine.h shared/cube.h shared/tools.h
engine/server-standalone.o: shared/geom.h shared/ents.h shared/command.h
engine/server-standalone.o: shared/iengine.h shared/igame.h engine/world.h
engine/worldio-standalone.o: engine/engine.h shared/cube.h shared/tools.h
engine/worldio-standalone.o: shared/geom.h shared/ents.h shared/command.h
engine/worldio-standalone.o: shared/iengine.h shared/igame.h engine/world.h
fpsgame/entities-standalone.o: fpsgame/game.h shared/cube.h shared/tools.h
fpsgame/entities-standalone.o: shared/geom.h shared/ents.h shared/command.h
fpsgame/entities-standalone.o: shared/iengine.h shared/igame.h fpsgame/ai.h
fpsgame/server-standalone.o: fpsgame/game.h shared/cube.h shared/tools.h
fpsgame/server-standalone.o: shared/geom.h shared/ents.h shared/command.h
fpsgame/server-standalone.o: shared/iengine.h shared/igame.h fpsgame/ai.h
fpsgame/server-standalone.o: fpsgame/capture.h fpsgame/ctf.h
fpsgame/server-standalone.o: fpsgame/collect.h fpsgame/extinfo.h
fpsgame/server-standalone.o: fpsgame/aiman.h
engine/master-standalone.o: shared/cube.h shared/tools.h shared/geom.h
engine/master-standalone.o: shared/ents.h shared/command.h shared/iengine.h
engine/master-standalone.o: shared/igame.h

116
src/enet/ChangeLog Normal file
View File

@ -0,0 +1,116 @@
ENet 1.3.3 (June 28, 2011):
* fixed bug with simultaneous disconnects not dispatching events
ENet 1.3.2 (May 31, 2011):
* added support for unreliable packet fragmenting via the packet flag
ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT
* fixed regression in unreliable packet queuing
* added check against received port to limit some forms of IP-spoofing
ENet 1.3.1 (February 10, 2011):
* fixed bug in tracking of reliable data in transit
* reliable data window size now scales with the throttle
* fixed bug in fragment length calculation when checksums are used
ENet 1.3.0 (June 5, 2010):
* enet_host_create() now requires the channel limit to be specified as
a parameter
* enet_host_connect() now accepts a data parameter which is supplied
to the receiving receiving host in the event data field for a connect event
* added an adaptive order-2 PPM range coder as a built-in compressor option
which can be set with enet_host_compress_with_range_coder()
* added support for packet compression configurable with a callback
* improved session number handling to not rely on the packet checksum
field, saving 4 bytes per packet unless the checksum option is used
* removed the dependence on the rand callback for session number handling
Caveats: This version is not protocol compatible with the 1.2 series or
earlier. The enet_host_connect and enet_host_create API functions require
supplying additional parameters.
ENet 1.2.5 (June 28, 2011):
* fixed bug with simultaneous disconnects not dispatching events
ENet 1.2.4 (May 31, 2011):
* fixed regression in unreliable packet queuing
* added check against received port to limit some forms of IP-spoofing
ENet 1.2.3 (February 10, 2011):
* fixed bug in tracking reliable data in transit
ENet 1.2.2 (June 5, 2010):
* checksum functionality is now enabled by setting a checksum callback
inside ENetHost instead of being a configure script option
* added totalSentData, totalSentPackets, totalReceivedData, and
totalReceivedPackets counters inside ENetHost for getting usage
statistics
* added enet_host_channel_limit() for limiting the maximum number of
channels allowed by connected peers
* now uses dispatch queues for event dispatch rather than potentially
unscalable array walking
* added no_memory callback that is called when a malloc attempt fails,
such that if no_memory returns rather than aborts (the default behavior),
then the error is propagated to the return value of the API calls
* now uses packed attribute for protocol structures on platforms with
strange alignment rules
* improved autoconf build system contributed by Nathan Brink allowing
for easier building as a shared library
Caveats: If you were using the compile-time option that enabled checksums,
make sure to set the checksum callback inside ENetHost to enet_crc32 to
regain the old behavior. The ENetCallbacks structure has added new fields,
so make sure to clear the structure to zero before use if
using enet_initialize_with_callbacks().
ENet 1.2.1 (November 12, 2009):
* fixed bug that could cause disconnect events to be dropped
* added thin wrapper around select() for portable usage
* added ENET_SOCKOPT_REUSEADDR socket option
* factored enet_socket_bind()/enet_socket_listen() out of enet_socket_create()
* added contributed Code::Blocks build file
ENet 1.2 (February 12, 2008):
* fixed bug in VERIFY_CONNECT acknowledgement that could cause connect
attempts to occasionally timeout
* fixed acknowledgements to check both the outgoing and sent queues
when removing acknowledged packets
* fixed accidental bit rot in the MSVC project file
* revised sequence number overflow handling to address some possible
disconnect bugs
* added enet_host_check_events() for getting only local queued events
* factored out socket option setting into enet_socket_set_option() so
that socket options are now set separately from enet_socket_create()
Caveats: While this release is superficially protocol compatible with 1.1,
differences in the sequence number overflow handling can potentially cause
random disconnects.
ENet 1.1 (June 6, 2007):
* optional CRC32 just in case someone needs a stronger checksum than UDP
provides (--enable-crc32 configure option)
* the size of packet headers are half the size they used to be (so less
overhead when sending small packets)
* enet_peer_disconnect_later() that waits till all queued outgoing
packets get sent before issuing an actual disconnect
* freeCallback field in individual packets for notification of when a
packet is about to be freed
* ENET_PACKET_FLAG_NO_ALLOCATE for supplying pre-allocated data to a
packet (can be used in concert with freeCallback to support some custom
allocation schemes that the normal memory allocation callbacks would
normally not allow)
* enet_address_get_host_ip() for printing address numbers
* promoted the enet_socket_*() functions to be part of the API now
* a few stability/crash fixes

993
src/enet/Doxyfile Normal file
View File

@ -0,0 +1,993 @@
# Doxyfile 1.2.18
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project
#
# All text after a hash (#) is considered a comment and will be ignored
# The format is:
# TAG = value [value, ...]
# For lists items can also be appended using:
# TAG += value [value, ...]
# Values that contain spaces should be placed between quotes (" ")
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
PROJECT_NAME = enet
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER =
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
OUTPUT_DIRECTORY = docs
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
# documentation generated by doxygen is written. Doxygen will use this
# information to generate all constant output in the proper language.
# The default language is English, other supported languages are:
# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch,
# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en
# (Japanese with english messages), Korean, Norwegian, Polish, Portuguese,
# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian.
OUTPUT_LANGUAGE = English
# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
# documentation are documented, even if no documentation was available.
# Private class members and static file members will be hidden unless
# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
EXTRACT_ALL = NO
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
# will be included in the documentation.
EXTRACT_PRIVATE = NO
# If the EXTRACT_STATIC tag is set to YES all static members of a file
# will be included in the documentation.
EXTRACT_STATIC = NO
# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
# defined locally in source files will be included in the documentation.
# If set to NO only classes defined in header files are included.
EXTRACT_LOCAL_CLASSES = NO
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
# undocumented members of documented classes, files or namespaces.
# If set to NO (the default) these members will be included in the
# various overviews, but no documentation section is generated.
# This option has no effect if EXTRACT_ALL is enabled.
HIDE_UNDOC_MEMBERS = NO
# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
# undocumented classes that are normally visible in the class hierarchy.
# If set to NO (the default) these class will be included in the various
# overviews. This option has no effect if EXTRACT_ALL is enabled.
HIDE_UNDOC_CLASSES = NO
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
# friend (class|struct|union) declarations.
# If set to NO (the default) these declarations will be included in the
# documentation.
HIDE_FRIEND_COMPOUNDS = NO
# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
# include brief member descriptions after the members that are listed in
# the file and class documentation (similar to JavaDoc).
# Set to NO to disable this.
BRIEF_MEMBER_DESC = YES
# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
# the brief description of a member or function before the detailed description.
# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
# brief descriptions will be completely suppressed.
REPEAT_BRIEF = NO
# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
# Doxygen will generate a detailed section even if there is only a brief
# description.
ALWAYS_DETAILED_SEC = NO
# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
# members of a class in the documentation of that class as if those members were
# ordinary class members. Constructors, destructors and assignment operators of
# the base classes will not be shown.
INLINE_INHERITED_MEMB = NO
# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
# path before files name in the file list and in the header files. If set
# to NO the shortest path that makes the file name unique will be used.
FULL_PATH_NAMES = NO
# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
# can be used to strip a user defined part of the path. Stripping is
# only done if one of the specified strings matches the left-hand part of
# the path. It is allowed to use relative paths in the argument list.
STRIP_FROM_PATH =
# The INTERNAL_DOCS tag determines if documentation
# that is typed after a \internal command is included. If the tag is set
# to NO (the default) then the documentation will be excluded.
# Set it to YES to include the internal documentation.
INTERNAL_DOCS = NO
# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
# doxygen to hide any special comment blocks from generated source code
# fragments. Normal C and C++ comments will always remain visible.
STRIP_CODE_COMMENTS = YES
# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
# file names in lower case letters. If set to YES upper case letters are also
# allowed. This is useful if you have classes or files whose names only differ
# in case and if your file system supports case sensitive file names. Windows
# users are adviced to set this option to NO.
CASE_SENSE_NAMES = YES
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
# (but less readable) file names. This can be useful is your file systems
# doesn't support long names like on DOS, Mac, or CD-ROM.
SHORT_NAMES = NO
# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
# will show members with their full class and namespace scopes in the
# documentation. If set to YES the scope will be hidden.
HIDE_SCOPE_NAMES = NO
# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
# will generate a verbatim copy of the header file for each class for
# which an include is specified. Set to NO to disable this.
VERBATIM_HEADERS = YES
# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
# will put list of the files that are included by a file in the documentation
# of that file.
SHOW_INCLUDE_FILES = YES
# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
# will interpret the first line (until the first dot) of a JavaDoc-style
# comment as the brief description. If set to NO, the JavaDoc
# comments will behave just like the Qt-style comments (thus requiring an
# explict @brief command for a brief description.
JAVADOC_AUTOBRIEF = YES
# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
# treat a multi-line C++ special comment block (i.e. a block of //! or ///
# comments) as a brief description. This used to be the default behaviour.
# The new default is to treat a multi-line C++ comment block as a detailed
# description. Set this tag to YES if you prefer the old behaviour instead.
MULTILINE_CPP_IS_BRIEF = NO
# If the DETAILS_AT_TOP tag is set to YES then Doxygen
# will output the detailed description near the top, like JavaDoc.
# If set to NO, the detailed description appears after the member
# documentation.
DETAILS_AT_TOP = YES
# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
# member inherits the documentation from any documented member that it
# reimplements.
INHERIT_DOCS = YES
# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
# is inserted in the documentation for inline members.
INLINE_INFO = YES
# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
# will sort the (detailed) documentation of file and class members
# alphabetically by member name. If set to NO the members will appear in
# declaration order.
SORT_MEMBER_DOCS = YES
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
# tag is set to YES, then doxygen will reuse the documentation of the first
# member in the group (if any) for the other members of the group. By default
# all members of a group must be documented explicitly.
DISTRIBUTE_GROUP_DOC = NO
# The TAB_SIZE tag can be used to set the number of spaces in a tab.
# Doxygen uses this value to replace tabs by spaces in code fragments.
TAB_SIZE = 8
# The GENERATE_TODOLIST tag can be used to enable (YES) or
# disable (NO) the todo list. This list is created by putting \todo
# commands in the documentation.
GENERATE_TODOLIST = YES
# The GENERATE_TESTLIST tag can be used to enable (YES) or
# disable (NO) the test list. This list is created by putting \test
# commands in the documentation.
GENERATE_TESTLIST = YES
# The GENERATE_BUGLIST tag can be used to enable (YES) or
# disable (NO) the bug list. This list is created by putting \bug
# commands in the documentation.
GENERATE_BUGLIST = YES
# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
# disable (NO) the deprecated list. This list is created by putting \deprecated commands in the documentation.
GENERATE_DEPRECATEDLIST= YES
# This tag can be used to specify a number of aliases that acts
# as commands in the documentation. An alias has the form "name=value".
# For example adding "sideeffect=\par Side Effects:\n" will allow you to
# put the command \sideeffect (or @sideeffect) in the documentation, which
# will result in a user defined paragraph with heading "Side Effects:".
# You can put \n's in the value part of an alias to insert newlines.
ALIASES =
# The ENABLED_SECTIONS tag can be used to enable conditional
# documentation sections, marked by \if sectionname ... \endif.
ENABLED_SECTIONS =
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
# the initial value of a variable or define consist of for it to appear in
# the documentation. If the initializer consists of more lines than specified
# here it will be hidden. Use a value of 0 to hide initializers completely.
# The appearance of the initializer of individual variables and defines in the
# documentation can be controlled using \showinitializer or \hideinitializer
# command in the documentation regardless of this setting.
MAX_INITIALIZER_LINES = 30
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C.
# For instance some of the names that are used will be different. The list
# of all members will be omitted, etc.
OPTIMIZE_OUTPUT_FOR_C = YES
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
# only. Doxygen will then generate output that is more tailored for Java.
# For instance namespaces will be presented as packages, qualified scopes
# will look different, etc.
OPTIMIZE_OUTPUT_JAVA = NO
# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
# at the bottom of the documentation of classes and structs. If set to YES the
# list will mention the files that were used to generate the documentation.
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
# The QUIET tag can be used to turn on/off the messages that are generated
# by doxygen. Possible values are YES and NO. If left blank NO is used.
QUIET = NO
# The WARNINGS tag can be used to turn on/off the warning messages that are
# generated by doxygen. Possible values are YES and NO. If left blank
# NO is used.
WARNINGS = YES
# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
# automatically be disabled.
WARN_IF_UNDOCUMENTED = YES
# The WARN_FORMAT tag determines the format of the warning messages that
# doxygen can produce. The string should contain the $file, $line, and $text
# tags, which will be replaced by the file and line number from which the
# warning originated and the warning text.
WARN_FORMAT = "$file:$line: $text"
# The WARN_LOGFILE tag can be used to specify a file to which warning
# and error messages should be written. If left blank the output is written
# to stderr.
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
# The INPUT tag can be used to specify the files and/or directories that contain
# documented source files. You may enter file names like "myfile.cpp" or
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = . include/enet docs
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
# and *.h) to filter out the source-files in the directories. If left
# blank the following patterns are tested:
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
# *.h++ *.idl *.odl
FILE_PATTERNS = *.c *.h *.dox
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
# should be searched for input files as well. Possible values are YES and NO.
# If left blank NO is used.
RECURSIVE = YES
# The EXCLUDE tag can be used to specify files and/or directories that should
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT tag.
EXCLUDE = Tests
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
# that are symbolic links (a Unix filesystem feature) are excluded from the input.
EXCLUDE_SYMLINKS = NO
# If the value of the INPUT tag contains directories, you can use the
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
# certain files from those directories.
EXCLUDE_PATTERNS =
# The EXAMPLE_PATH tag can be used to specify one or more files or
# directories that contain example code fragments that are included (see
# the \include command).
EXAMPLE_PATH =
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
# and *.h) to filter out the source-files in the directories. If left
# blank all files are included.
EXAMPLE_PATTERNS =
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
# searched for input files to be used with the \include or \dontinclude
# commands irrespective of the value of the RECURSIVE tag.
# Possible values are YES and NO. If left blank NO is used.
EXAMPLE_RECURSIVE = NO
# The IMAGE_PATH tag can be used to specify one or more files or
# directories that contain image that are included in the documentation (see
# the \image command).
IMAGE_PATH =
# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
# by executing (via popen()) the command <filter> <input-file>, where <filter>
# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
# input file. Doxygen will then use the output that the filter program writes
# to standard output.
INPUT_FILTER =
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
# INPUT_FILTER) will be used to filter the input files when producing source
# files to browse (i.e. when SOURCE_BROWSER is set to YES).
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
# If the SOURCE_BROWSER tag is set to YES then a list of source files will
# be generated. Documented entities will be cross-referenced with these sources.
SOURCE_BROWSER = NO
# Setting the INLINE_SOURCES tag to YES will include the body
# of functions and classes directly in the documentation.
INLINE_SOURCES = NO
# If the REFERENCED_BY_RELATION tag is set to YES (the default)
# then for each documented function all documented
# functions referencing it will be listed.
REFERENCED_BY_RELATION = YES
# If the REFERENCES_RELATION tag is set to YES (the default)
# then for each documented function all documented entities
# called/used by that function will be listed.
REFERENCES_RELATION = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
# of all compounds will be generated. Enable this if the project
# contains a lot of classes, structs, unions or interfaces.
ALPHABETICAL_INDEX = YES
# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
# in which this list will be split (can be a number in the range [1..20])
COLS_IN_ALPHA_INDEX = 5
# In case all classes in a project start with a common prefix, all
# classes will be put under the same header in the alphabetical index.
# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
# should be ignored while generating the index headers.
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
# generate HTML output.
GENERATE_HTML = YES
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `html' will be used as the default path.
HTML_OUTPUT = html
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
# doxygen will generate files with .html extension.
HTML_FILE_EXTENSION = .html
# The HTML_HEADER tag can be used to specify a personal HTML header for
# each generated HTML page. If it is left blank doxygen will generate a
# standard header.
HTML_HEADER =
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
# each generated HTML page. If it is left blank doxygen will generate a
# standard footer.
HTML_FOOTER =
# The HTML_STYLESHEET tag can be used to specify a user defined cascading
# style sheet that is used by each HTML page. It can be used to
# fine-tune the look of the HTML output. If the tag is left blank doxygen
# will generate a default style sheet
HTML_STYLESHEET =
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
# files or namespaces will be aligned in HTML using tables. If set to
# NO a bullet list will be used.
HTML_ALIGN_MEMBERS = YES
# If the GENERATE_HTMLHELP tag is set to YES, additional index files
# will be generated that can be used as input for tools like the
# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
# of the generated HTML documentation.
GENERATE_HTMLHELP = NO
# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
# be used to specify the file name of the resulting .chm file. You
# can add a path in front of the file if the result should not be
# written to the html output dir.
CHM_FILE =
# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
# be used to specify the location (absolute path including file name) of
# the HTML help compiler (hhc.exe). If non empty doxygen will try to run
# the html help compiler on the generated index.hhp.
HHC_LOCATION =
# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
# controls if a separate .chi index file is generated (YES) or that
# it should be included in the master .chm file (NO).
GENERATE_CHI = NO
# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
# controls whether a binary table of contents is generated (YES) or a
# normal table of contents (NO) in the .chm file.
BINARY_TOC = NO
# The TOC_EXPAND flag can be set to YES to add extra items for group members
# to the contents of the Html help documentation and to the tree view.
TOC_EXPAND = NO
# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
# top of each HTML page. The value NO (the default) enables the index and
# the value YES disables it.
DISABLE_INDEX = NO
# This tag can be used to set the number of enum values (range [1..20])
# that doxygen will group on one line in the generated HTML documentation.
ENUM_VALUES_PER_LINE = 4
# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
# generated containing a tree-like index structure (just like the one that
# is generated for HTML Help). For this to work a browser that supports
# JavaScript and frames is required (for instance Mozilla, Netscape 4.0+,
# or Internet explorer 4.0+). Note that for large projects the tree generation
# can take a very long time. In such cases it is better to disable this feature.
# Windows users are probably better off using the HTML help feature.
GENERATE_TREEVIEW = NO
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
# used to set the initial width (in pixels) of the frame in which the tree
# is shown.
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
# generate Latex output.
GENERATE_LATEX = NO
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `latex' will be used as the default path.
LATEX_OUTPUT = latex
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be invoked. If left blank `latex' will be used as the default command name.
LATEX_CMD_NAME = latex
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
# generate index for LaTeX. If left blank `makeindex' will be used as the
# default command name.
MAKEINDEX_CMD_NAME = makeindex
# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
# LaTeX documents. This may be useful for small projects and may help to
# save some trees in general.
COMPACT_LATEX = NO
# The PAPER_TYPE tag can be used to set the paper type that is used
# by the printer. Possible values are: a4, a4wide, letter, legal and
# executive. If left blank a4wide will be used.
PAPER_TYPE = a4wide
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
# packages that should be included in the LaTeX output.
EXTRA_PACKAGES =
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
# the generated latex document. The header should contain everything until
# the first chapter. If it is left blank doxygen will generate a
# standard header. Notice: only use this tag if you know what you are doing!
LATEX_HEADER =
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
# is prepared for conversion to pdf (using ps2pdf). The pdf file will
# contain links (just like the HTML output) instead of page references
# This makes the output suitable for online browsing using a pdf viewer.
PDF_HYPERLINKS = NO
# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
# plain latex in the generated Makefile. Set this option to YES to get a
# higher quality PDF documentation.
USE_PDFLATEX = NO
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
# command to the generated LaTeX files. This will instruct LaTeX to keep
# running if errors occur, instead of asking the user for help.
# This option is also used when generating formulas in HTML.
LATEX_BATCHMODE = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
# The RTF output is optimised for Word 97 and may not look very pretty with
# other RTF readers or editors.
GENERATE_RTF = NO
# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `rtf' will be used as the default path.
RTF_OUTPUT = rtf
# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
# RTF documents. This may be useful for small projects and may help to
# save some trees in general.
COMPACT_RTF = NO
# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
# will contain hyperlink fields. The RTF file will
# contain links (just like the HTML output) instead of page references.
# This makes the output suitable for online browsing using WORD or other
# programs which support those fields.
# Note: wordpad (write) and others do not support links.
RTF_HYPERLINKS = NO
# Load stylesheet definitions from file. Syntax is similar to doxygen's
# config file, i.e. a series of assigments. You only have to provide
# replacements, missing definitions are set to their default value.
RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an rtf document.
# Syntax is similar to doxygen's config file.
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
# generate man pages
GENERATE_MAN = NO
# The MAN_OUTPUT tag is used to specify where the man pages will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `man' will be used as the default path.
MAN_OUTPUT = man
# The MAN_EXTENSION tag determines the extension that is added to
# the generated man pages (default is the subroutine's section .3)
MAN_EXTENSION = .3
# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
# then it will generate one additional man file for each entity
# documented in the real man page(s). These additional files
# only source the real man page, but without them the man command
# would be unable to find the correct page. The default is NO.
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
# If the GENERATE_XML tag is set to YES Doxygen will
# generate an XML file that captures the structure of
# the code including all documentation. Note that this
# feature is still experimental and incomplete at the
# moment.
GENERATE_XML = NO
# The XML_SCHEMA tag can be used to specify an XML schema,
# which can be used by a validating XML parser to check the
# syntax of the XML files.
XML_SCHEMA =
# The XML_DTD tag can be used to specify an XML DTD,
# which can be used by a validating XML parser to check the
# syntax of the XML files.
XML_DTD =
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
# generate an AutoGen Definitions (see autogen.sf.net) file
# that captures the structure of the code including all
# documentation. Note that this feature is still experimental
# and incomplete at the moment.
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
# evaluate all C-preprocessor directives found in the sources and include
# files.
ENABLE_PREPROCESSING = YES
# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
# names in the source code. If set to NO (the default) only conditional
# compilation will be performed. Macro expansion can be done in a controlled
# way by setting EXPAND_ONLY_PREDEF to YES.
MACRO_EXPANSION = NO
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
# then the macro expansion is limited to the macros specified with the
# PREDEFINED and EXPAND_AS_PREDEFINED tags.
EXPAND_ONLY_PREDEF = NO
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
# in the INCLUDE_PATH (see below) will be search if a #include is found.
SEARCH_INCLUDES = YES
# The INCLUDE_PATH tag can be used to specify one or more directories that
# contain include files that are not input files but should be processed by
# the preprocessor.
INCLUDE_PATH =
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the
# directories. If left blank, the patterns specified with FILE_PATTERNS will
# be used.
INCLUDE_FILE_PATTERNS =
# The PREDEFINED tag can be used to specify one or more macro names that
# are defined before the preprocessor is started (similar to the -D option of
# gcc). The argument of the tag is a list of macros of the form: name
# or name=definition (no spaces). If the definition and the = are
# omitted =1 is assumed.
PREDEFINED = FORCE_DOXYGEN
# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
# The macro definition that is found in the sources will be used.
# Use the PREDEFINED tag if you want to use a different macro definition.
EXPAND_AS_DEFINED =
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
# doxygen's preprocessor will remove all function-like macros that are alone
# on a line, have an all uppercase name, and do not end with a semicolon. Such
# function macros are typically used for boiler-plate code, and will confuse the
# parser if not removed.
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
# The TAGFILES tag can be used to specify one or more tagfiles.
TAGFILES =
# When a file name is specified after GENERATE_TAGFILE, doxygen will create
# a tag file that is based on the input files it reads.
GENERATE_TAGFILE =
# If the ALLEXTERNALS tag is set to YES all external classes will be listed
# in the class index. If set to NO only the inherited external classes
# will be listed.
ALLEXTERNALS = NO
# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
# in the modules index. If set to NO, only the current project's groups will
# be listed.
EXTERNAL_GROUPS = YES
# The PERL_PATH should be the absolute path and name of the perl script
# interpreter (i.e. the result of `which perl').
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or
# super classes. Setting the tag to NO turns the diagrams off. Note that this
# option is superceded by the HAVE_DOT option below. This is only a fallback. It is
# recommended to install and use dot, since it yield more powerful graphs.
CLASS_DIAGRAMS = YES
# If set to YES, the inheritance and collaboration graphs will hide
# inheritance and usage relations if the target is undocumented
# or is not a class.
HIDE_UNDOC_RELATIONS = YES
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
# available from the path. This tool is part of Graphviz, a graph visualization
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
# have no effect if this option is set to NO (the default)
HAVE_DOT = NO
# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
# will generate a graph for each documented class showing the direct and
# indirect inheritance relations. Setting this tag to YES will force the
# the CLASS_DIAGRAMS tag to NO.
CLASS_GRAPH = YES
# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
# will generate a graph for each documented class showing the direct and
# indirect implementation dependencies (inheritance, containment, and
# class references variables) of the class with other documented classes.
COLLABORATION_GRAPH = YES
# If set to YES, the inheritance and collaboration graphs will show the
# relations between templates and their instances.
TEMPLATE_RELATIONS = YES
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
# tags are set to YES then doxygen will generate a graph for each documented
# file showing the direct and indirect include dependencies of the file with
# other documented files.
INCLUDE_GRAPH = YES
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
# documented header file showing the documented files that directly or
# indirectly include this file.
INCLUDED_BY_GRAPH = YES
# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
# will graphical hierarchy of all classes instead of a textual one.
GRAPHICAL_HIERARCHY = YES
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
# generated by dot. Possible values are png, jpg, or gif
# If left blank png will be used.
DOT_IMAGE_FORMAT = png
# The tag DOT_PATH can be used to specify the path where the dot tool can be
# found. If left blank, it is assumed the dot tool can be found on the path.
DOT_PATH =
# The DOTFILE_DIRS tag can be used to specify one or more directories that
# contain dot files that are included in the documentation (see the
# \dotfile command).
DOTFILE_DIRS =
# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
# this value, doxygen will try to truncate the graph, so that it fits within
# the specified constraint. Beware that most browsers cannot cope with very
# large images.
MAX_DOT_GRAPH_WIDTH = 1024
# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
# (in pixels) of the graphs generated by dot. If a graph becomes larger than
# this value, doxygen will try to truncate the graph, so that it fits within
# the specified constraint. Beware that most browsers cannot cope with very
# large images.
MAX_DOT_GRAPH_HEIGHT = 1024
# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
# generate a legend page explaining the meaning of the various boxes and
# arrows in the dot generated graphs.
GENERATE_LEGEND = YES
# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
# remove the intermedate dot files that are used to generate
# the various graphs.
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
# The SEARCHENGINE tag specifies whether or not a search engine should be
# used. If set to NO the values of all tags below this one will be ignored.
SEARCHENGINE = NO
# The CGI_NAME tag should be the name of the CGI script that
# starts the search engine (doxysearch) with the correct parameters.
# A script with this name will be generated by doxygen.
CGI_NAME = search.cgi
# The CGI_URL tag should be the absolute URL to the directory where the
# cgi binaries are located. See the documentation of your http daemon for
# details.
CGI_URL =
# The DOC_URL tag should be the absolute URL to the directory where the
# documentation is located. If left blank the absolute path to the
# documentation, with file:// prepended to it, will be used.
DOC_URL =
# The DOC_ABSPATH tag should be the absolute path to the directory where the
# documentation is located. If left blank the directory on the local machine
# will be used.
DOC_ABSPATH =
# The BIN_ABSPATH tag must point to the directory where the doxysearch binary
# is installed.
BIN_ABSPATH = /usr/local/bin/
# The EXT_DOC_PATHS tag can be used to specify one or more paths to
# documentation generated for other projects. This allows doxysearch to search
# the documentation for these projects as well.
EXT_DOC_PATHS =

7
src/enet/LICENSE Normal file
View File

@ -0,0 +1,7 @@
Copyright (c) 2002-2011 Lee Salzman
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

22
src/enet/Makefile.am Normal file
View File

@ -0,0 +1,22 @@
pkgconfigdir = $(libdir)/pkgconfig
nodist_pkgconfig_DATA = libenet.pc
enetincludedir=$(includedir)/enet
enetinclude_HEADERS = \
include/enet/callbacks.h \
include/enet/enet.h \
include/enet/list.h \
include/enet/protocol.h \
include/enet/time.h \
include/enet/types.h \
include/enet/unix.h \
include/enet/utility.h \
include/enet/win32.h
lib_LTLIBRARIES = libenet.la
libenet_la_SOURCES = callbacks.c compress.c host.c list.c packet.c peer.c protocol.c unix.c win32.c
# see info '(libtool) Updating version info' before making a release
libenet_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:3:0
INCLUDES = -I$(top_srcdir)/include
ACLOCAL_AMFLAGS = -Im4

742
src/enet/Makefile.in Normal file
View File

@ -0,0 +1,742 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
DIST_COMMON = README $(am__configure_deps) $(enetinclude_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/libenet.pc.in $(top_srcdir)/configure ChangeLog \
config.guess config.sub depcomp install-sh ltmain.sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES = libenet.pc
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \
"$(DESTDIR)$(enetincludedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
libenet_la_LIBADD =
am_libenet_la_OBJECTS = callbacks.lo compress.lo host.lo list.lo \
packet.lo peer.lo protocol.lo unix.lo win32.lo
libenet_la_OBJECTS = $(am_libenet_la_OBJECTS)
libenet_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libenet_la_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libenet_la_SOURCES)
DIST_SOURCES = $(libenet_la_SOURCES)
DATA = $(nodist_pkgconfig_DATA)
HEADERS = $(enetinclude_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d "$(distdir)" \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(distdir)"; }; }
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
pkgconfigdir = $(libdir)/pkgconfig
nodist_pkgconfig_DATA = libenet.pc
enetincludedir = $(includedir)/enet
enetinclude_HEADERS = \
include/enet/callbacks.h \
include/enet/enet.h \
include/enet/list.h \
include/enet/protocol.h \
include/enet/time.h \
include/enet/types.h \
include/enet/unix.h \
include/enet/utility.h \
include/enet/win32.h
lib_LTLIBRARIES = libenet.la
libenet_la_SOURCES = callbacks.c compress.c host.c list.c packet.c peer.c protocol.c unix.c win32.c
# see info '(libtool) Updating version info' before making a release
libenet_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:3:0
INCLUDES = -I$(top_srcdir)/include
ACLOCAL_AMFLAGS = -Im4
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
am--refresh:
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
libenet.pc: $(top_builddir)/config.status $(srcdir)/libenet.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libenet.la: $(libenet_la_OBJECTS) $(libenet_la_DEPENDENCIES)
$(libenet_la_LINK) -rpath $(libdir) $(libenet_la_OBJECTS) $(libenet_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callbacks.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compress.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/host.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packet.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/peer.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unix.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/win32.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool config.lt
install-nodist_pkgconfigDATA: $(nodist_pkgconfig_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
@list='$(nodist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
done
uninstall-nodist_pkgconfigDATA:
@$(NORMAL_UNINSTALL)
@list='$(nodist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
install-enetincludeHEADERS: $(enetinclude_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(enetincludedir)" || $(MKDIR_P) "$(DESTDIR)$(enetincludedir)"
@list='$(enetinclude_HEADERS)'; test -n "$(enetincludedir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(enetincludedir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(enetincludedir)" || exit $$?; \
done
uninstall-enetincludeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(enetinclude_HEADERS)'; test -n "$(enetincludedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(enetincludedir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(enetincludedir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@$(am__cd) '$(distuninstallcheck_dir)' \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(enetincludedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-enetincludeHEADERS \
install-nodist_pkgconfigDATA
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-libLTLIBRARIES
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-enetincludeHEADERS uninstall-libLTLIBRARIES \
uninstall-nodist_pkgconfigDATA
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-generic clean-libLTLIBRARIES clean-libtool ctags dist \
dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \
dist-xz dist-zip distcheck distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am \
install-enetincludeHEADERS install-exec install-exec-am \
install-html install-html-am install-info install-info-am \
install-libLTLIBRARIES install-man \
install-nodist_pkgconfigDATA install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-enetincludeHEADERS \
uninstall-libLTLIBRARIES uninstall-nodist_pkgconfigDATA
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

15
src/enet/README Normal file
View File

@ -0,0 +1,15 @@
Please visit the ENet homepage at http://enet.bespin.org for installation
and usage instructions.
If you obtained this package from CVS, the quick description on how to build
is:
# Generate the build system.
autoreconf -vfi
# Compile and install the library.
./configure && make && make install

996
src/enet/aclocal.m4 vendored Normal file
View File

@ -0,0 +1,996 @@
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
[m4_warning([this file was generated for autoconf 2.68.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.11.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
# _AM_AUTOCONF_VERSION(VERSION)
# -----------------------------
# aclocal traces this macro to find the Autoconf version.
# This is a private macro too. Using m4_define simplifies
# the logic in aclocal, which can simply ignore this definition.
m4_define([_AM_AUTOCONF_VERSION], [])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.11.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
# therefore $ac_aux_dir as well) can be either absolute or relative,
# depending on how configure is run. This is pretty annoying, since
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
# source directory, any form will work fine, but in subdirectories a
# relative path needs to be adjusted first.
#
# $ac_aux_dir/missing
# fails when called from a subdirectory if $ac_aux_dir is relative
# $top_srcdir/$ac_aux_dir/missing
# fails if $ac_aux_dir is absolute,
# fails when called from a subdirectory in a VPATH build with
# a relative $ac_aux_dir
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
# harmless because $srcdir is `.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
# and then we would define $MISSING as
# MISSING="\${SHELL} $am_aux_dir/missing"
# This will work as long as MISSING is not called from configure, because
# unfortunately $(top_srcdir) has no meaning in configure.
# However there are other variables, like CC, which are often used in
# configure, and could therefore not use this "fixed" $ac_aux_dir.
#
# Another solution, used here, is to always expand $ac_aux_dir to an
# absolute PATH. The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
[dnl Rely on autoconf to set up CDPATH properly.
AC_PREREQ([2.50])dnl
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 9
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
[AC_PREREQ(2.52)dnl
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])dnl
AC_SUBST([$1_FALSE])dnl
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
m4_define([_AM_COND_VALUE_$1], [$2])dnl
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([[conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 10
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
# NAME is "CC", "CXX", "GCJ", or "OBJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
# dependency, and given that the user is not expected to run this macro,
# just rely on AC_PROG_CC.
AC_DEFUN([_AM_DEPENDENCIES],
[AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
[$1], CXX, [depcc="$CXX" am_compiler_list=],
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
[$1], UPC, [depcc="$UPC" am_compiler_list=],
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
am__universal=false
m4_case([$1], [CC],
[case " $depcc " in #(
*\ -arch\ *\ -arch\ *) am__universal=true ;;
esac],
[CXX],
[case " $depcc " in #(
*\ -arch\ *\ -arch\ *) am__universal=true ;;
esac])
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this. Also, some Intel
# versions had trouble with output in subdirs
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
gcc)
# This depmode causes a compiler race in universal mode.
test "$am__universal" = false || continue
;;
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
am__minus_obj=
;;
none) break ;;
esac
if depmode=$depmode \
source=sub/conftest.c object=$am__obj \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_$1_dependencies_compiler_type=none
fi
])
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
AM_CONDITIONAL([am__fastdep$1], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR],
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
[AC_ARG_ENABLE(dependency-tracking,
[ --disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
#serial 5
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[{
# Autoconf 2.62 quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
*\'*) eval set x "$CONFIG_FILES" ;;
*) set x $CONFIG_FILES ;;
esac
shift
for mf
do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
# AM_OUTPUT_DEPENDENCY_COMMANDS
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking
# is enabled. FIXME. This creates each `.P' file that we will
# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 16
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
# The call with PACKAGE and VERSION arguments is the old style
# call (pre autoconf-2.50), which is being phased out. PACKAGE
# and VERSION should now be passed to AC_INIT and removed from
# the call to AM_INIT_AUTOMAKE.
# We support both call styles for the transition. After
# the next Automake release, Autoconf can make the AC_INIT
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.62])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
if test "`cd $srcdir && pwd`" != "`pwd`"; then
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
# is not polluted with repeated "-I."
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
# test to see if srcdir already configured
if test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
fi
# test whether we have cygpath
if test -z "$CYGPATH_W"; then
if (cygpath --version) >/dev/null 2>/dev/null; then
CYGPATH_W='cygpath -w'
else
CYGPATH_W=echo
fi
fi
AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES(CC)],
[define([AC_PROG_CC],
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES(CXX)],
[define([AC_PROG_CXX],
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
[_AM_DEPENDENCIES(OBJC)],
[define([AC_PROG_OBJC],
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
])
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
])
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
# loop where config.status creates the headers, so we can generate
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
_am_arg=$1
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
$_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
if test x"${install_sh}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
*)
install_sh="\${SHELL} $am_aux_dir/install-sh"
esac
fi
AC_SUBST(install_sh)])
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
AC_DEFUN([AM_SET_LEADING_DOT],
[rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
am__leading_dot=.
else
am__leading_dot=_
fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 5
# AM_MAINTAINER_MODE([DEFAULT-MODE])
# ----------------------------------
# Control maintainer-specific portions of Makefiles.
# Default is to disable them, unless `enable' is passed literally.
# For symmetry, `disable' may be passed as well. Anyway, the user
# can override the default with the --enable/--disable switch.
AC_DEFUN([AM_MAINTAINER_MODE],
[m4_case(m4_default([$1], [disable]),
[enable], [m4_define([am_maintainer_other], [disable])],
[disable], [m4_define([am_maintainer_other], [enable])],
[m4_define([am_maintainer_other], [enable])
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
(and sometimes confusing) to the casual installer],
[USE_MAINTAINER_MODE=$enableval],
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST([MAINT])dnl
]
)
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
@echo this is the am__doit target
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# Ignore all kinds of additional output from `make'.
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=include
am__quote=
_am_result=GNU
;;
esac
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=.include
am__quote="\""
_am_result=BSD
;;
esac
fi
AC_SUBST([am__include])
AC_SUBST([am__quote])
AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 6
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
[AC_REQUIRE([AM_MISSING_HAS_RUN])
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
# AM_MISSING_HAS_RUN
# ------------------
# Define MISSING if not defined so far and test if it supports --run.
# If it does, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
*)
MISSING="\${SHELL} $am_aux_dir/missing" ;;
esac
fi
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
AC_MSG_WARN([`missing' script is too old or missing])
fi
])
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_MKDIR_P
# ---------------
# Check for `mkdir -p'.
AC_DEFUN([AM_PROG_MKDIR_P],
[AC_PREREQ([2.60])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
dnl while keeping a definition of mkdir_p for backward compatibility.
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
dnl Makefile.ins that do not define MKDIR_P, so we do our own
dnl adjustment using top_builddir (which is defined more often than
dnl MKDIR_P).
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
case $mkdir_p in
[[\\/$]]* | ?:[[\\/]]*) ;;
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
esac
])
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
# ------------------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
# ----------------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 5
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
'
case `pwd` in
*[[\\\"\#\$\&\'\`$am_lf]]*)
AC_MSG_ERROR([unsafe absolute working directory name]);;
esac
case $srcdir in
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
esac
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
rm -f conftest.file
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
test "$[2]" = conftest.file
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
AC_MSG_RESULT(yes)])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
# always use install-sh in `make install-strip', and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the `STRIP' environment variable to overrule this program.
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
# This macro is traced by Automake.
AC_DEFUN([_AM_SUBST_NOTMAKE])
# AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
# FORMAT should be one of `v7', `ustar', or `pax'.
#
# Substitute a variable $(am__tar) that is a command
# writing to stdout a FORMAT-tarball containing the directory
# $tardir.
# tardir=directory && $(am__tar) > result.tar
#
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility.
AM_MISSING_PROG([AMTAR], [tar])
m4_if([$1], [v7],
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
# Loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
# Do not fold the above two line into one, because Tru64 sh and
# Solaris sh will not grok spaces in the rhs of `-'.
for _am_tool in $_am_tools
do
case $_am_tool in
gnutar)
for _am_tar in tar gnutar gtar;
do
AM_RUN_LOG([$_am_tar --version]) && break
done
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
am__untar="$_am_tar -xf -"
;;
plaintar)
# Must skip GNU tar: if it does not support --format= it doesn't create
# ustar tarball either.
(tar --version) >/dev/null 2>&1 && continue
am__tar='tar chf - "$$tardir"'
am__tar_='tar chf - "$tardir"'
am__untar='tar xf -'
;;
pax)
am__tar='pax -L -x $1 -w "$$tardir"'
am__tar_='pax -L -x $1 -w "$tardir"'
am__untar='pax -r'
;;
cpio)
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
am__untar='cpio -i -H $1 -d'
;;
none)
am__tar=false
am__tar_=false
am__untar=false
;;
esac
# If the value was cached, stop now. We just wanted to have am__tar
# and am__untar set.
test -n "${am_cv_prog_tar_$1}" && break
# tar/untar a dummy directory, and stop if the command works
rm -rf conftest.dir
mkdir conftest.dir
echo GrepMe > conftest.dir/file
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
rm -rf conftest.dir
if test -s conftest.tar; then
AM_RUN_LOG([$am__untar <conftest.tar])
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
fi
done
rm -rf conftest.dir
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
m4_include([m4/ltsugar.m4])
m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4])

47
src/enet/callbacks.c Normal file
View File

@ -0,0 +1,47 @@
/**
@file callbacks.c
@brief ENet callback functions
*/
#define ENET_BUILDING_LIB 1
#include "enet/enet.h"
static ENetCallbacks callbacks = { malloc, free, abort };
int
enet_initialize_with_callbacks (ENetVersion version, const ENetCallbacks * inits)
{
if (version < ENET_VERSION_CREATE (1, 3, 0))
return -1;
if (inits -> malloc != NULL || inits -> free != NULL)
{
if (inits -> malloc == NULL || inits -> free == NULL)
return -1;
callbacks.malloc = inits -> malloc;
callbacks.free = inits -> free;
}
if (inits -> no_memory != NULL)
callbacks.no_memory = inits -> no_memory;
return enet_initialize ();
}
void *
enet_malloc (size_t size)
{
void * memory = callbacks.malloc (size);
if (memory == NULL)
callbacks.no_memory ();
return memory;
}
void
enet_free (void * memory)
{
callbacks.free (memory);
}

654
src/enet/compress.c Normal file
View File

@ -0,0 +1,654 @@
/**
@file compress.c
@brief An adaptive order-2 PPM range coder
*/
#define ENET_BUILDING_LIB 1
#include <string.h>
#include "enet/enet.h"
typedef struct _ENetSymbol
{
/* binary indexed tree of symbols */
enet_uint8 value;
enet_uint8 count;
enet_uint16 under;
enet_uint16 left, right;
/* context defined by this symbol */
enet_uint16 symbols;
enet_uint16 escapes;
enet_uint16 total;
enet_uint16 parent;
} ENetSymbol;
/* adaptation constants tuned aggressively for small packet sizes rather than large file compression */
enum
{
ENET_RANGE_CODER_TOP = 1<<24,
ENET_RANGE_CODER_BOTTOM = 1<<16,
ENET_CONTEXT_SYMBOL_DELTA = 3,
ENET_CONTEXT_SYMBOL_MINIMUM = 1,
ENET_CONTEXT_ESCAPE_MINIMUM = 1,
ENET_SUBCONTEXT_ORDER = 2,
ENET_SUBCONTEXT_SYMBOL_DELTA = 2,
ENET_SUBCONTEXT_ESCAPE_DELTA = 5
};
/* context exclusion roughly halves compression speed, so disable for now */
#undef ENET_CONTEXT_EXCLUSION
typedef struct _ENetRangeCoder
{
/* only allocate enough symbols for reasonable MTUs, would need to be larger for large file compression */
ENetSymbol symbols[4096];
} ENetRangeCoder;
void *
enet_range_coder_create (void)
{
ENetRangeCoder * rangeCoder = (ENetRangeCoder *) enet_malloc (sizeof (ENetRangeCoder));
if (rangeCoder == NULL)
return NULL;
return rangeCoder;
}
void
enet_range_coder_destroy (void * context)
{
ENetRangeCoder * rangeCoder = (ENetRangeCoder *) context;
if (rangeCoder == NULL)
return;
enet_free (rangeCoder);
}
#define ENET_SYMBOL_CREATE(symbol, value_, count_) \
{ \
symbol = & rangeCoder -> symbols [nextSymbol ++]; \
symbol -> value = value_; \
symbol -> count = count_; \
symbol -> under = count_; \
symbol -> left = 0; \
symbol -> right = 0; \
symbol -> symbols = 0; \
symbol -> escapes = 0; \
symbol -> total = 0; \
symbol -> parent = 0; \
}
#define ENET_CONTEXT_CREATE(context, escapes_, minimum) \
{ \
ENET_SYMBOL_CREATE (context, 0, 0); \
(context) -> escapes = escapes_; \
(context) -> total = escapes_ + 256*minimum; \
(context) -> symbols = 0; \
}
static enet_uint16
enet_symbol_rescale (ENetSymbol * symbol)
{
enet_uint16 total = 0;
for (;;)
{
symbol -> count -= symbol->count >> 1;
symbol -> under = symbol -> count;
if (symbol -> left)
symbol -> under += enet_symbol_rescale (symbol + symbol -> left);
total += symbol -> under;
if (! symbol -> right) break;
symbol += symbol -> right;
}
return total;
}
#define ENET_CONTEXT_RESCALE(context, minimum) \
{ \
(context) -> total = (context) -> symbols ? enet_symbol_rescale ((context) + (context) -> symbols) : 0; \
(context) -> escapes -= (context) -> escapes >> 1; \
(context) -> total += (context) -> escapes + 256*minimum; \
}
#define ENET_RANGE_CODER_OUTPUT(value) \
{ \
if (outData >= outEnd) \
return 0; \
* outData ++ = value; \
}
#define ENET_RANGE_CODER_ENCODE(under, count, total) \
{ \
encodeRange /= (total); \
encodeLow += (under) * encodeRange; \
encodeRange *= (count); \
for (;;) \
{ \
if((encodeLow ^ (encodeLow + encodeRange)) >= ENET_RANGE_CODER_TOP) \
{ \
if(encodeRange >= ENET_RANGE_CODER_BOTTOM) break; \
encodeRange = -encodeLow & (ENET_RANGE_CODER_BOTTOM - 1); \
} \
ENET_RANGE_CODER_OUTPUT (encodeLow >> 24); \
encodeRange <<= 8; \
encodeLow <<= 8; \
} \
}
#define ENET_RANGE_CODER_FLUSH \
{ \
while (encodeLow) \
{ \
ENET_RANGE_CODER_OUTPUT (encodeLow >> 24); \
encodeLow <<= 8; \
} \
}
#define ENET_RANGE_CODER_FREE_SYMBOLS \
{ \
if (nextSymbol >= sizeof (rangeCoder -> symbols) / sizeof (ENetSymbol) - ENET_SUBCONTEXT_ORDER ) \
{ \
nextSymbol = 0; \
ENET_CONTEXT_CREATE (root, ENET_CONTEXT_ESCAPE_MINIMUM, ENET_CONTEXT_SYMBOL_MINIMUM); \
predicted = 0; \
order = 0; \
} \
}
#define ENET_CONTEXT_ENCODE(context, symbol_, value_, under_, count_, update, minimum) \
{ \
under_ = value*minimum; \
count_ = minimum; \
if (! (context) -> symbols) \
{ \
ENET_SYMBOL_CREATE (symbol_, value_, update); \
(context) -> symbols = symbol_ - (context); \
} \
else \
{ \
ENetSymbol * node = (context) + (context) -> symbols; \
for (;;) \
{ \
if (value_ < node -> value) \
{ \
node -> under += update; \
if (node -> left) { node += node -> left; continue; } \
ENET_SYMBOL_CREATE (symbol_, value_, update); \
node -> left = symbol_ - node; \
} \
else \
if (value_ > node -> value) \
{ \
under_ += node -> under; \
if (node -> right) { node += node -> right; continue; } \
ENET_SYMBOL_CREATE (symbol_, value_, update); \
node -> right = symbol_ - node; \
} \
else \
{ \
count_ += node -> count; \
under_ += node -> under - node -> count; \
node -> under += update; \
node -> count += update; \
symbol_ = node; \
} \
break; \
} \
} \
}
#ifdef ENET_CONTEXT_EXCLUSION
static const ENetSymbol emptyContext = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
#define ENET_CONTEXT_WALK(context, body) \
{ \
const ENetSymbol * node = (context) + (context) -> symbols; \
const ENetSymbol * stack [256]; \
size_t stackSize = 0; \
while (node -> left) \
{ \
stack [stackSize ++] = node; \
node += node -> left; \
} \
for (;;) \
{ \
body; \
if (node -> right) \
{ \
node += node -> right; \
while (node -> left) \
{ \
stack [stackSize ++] = node; \
node += node -> left; \
} \
} \
else \
if (stackSize <= 0) \
break; \
else \
node = stack [-- stackSize]; \
} \
}
#define ENET_CONTEXT_ENCODE_EXCLUDE(context, value_, under, total, minimum) \
ENET_CONTEXT_WALK(context, { \
if (node -> value != value_) \
{ \
enet_uint16 parentCount = rangeCoder -> symbols [node -> parent].count + minimum; \
if (node -> value < value_) \
under -= parentCount; \
total -= parentCount; \
} \
})
#endif
size_t
enet_range_coder_compress (void * context, const ENetBuffer * inBuffers, size_t inBufferCount, size_t inLimit, enet_uint8 * outData, size_t outLimit)
{
ENetRangeCoder * rangeCoder = (ENetRangeCoder *) context;
enet_uint8 * outStart = outData, * outEnd = & outData [outLimit];
const enet_uint8 * inData, * inEnd;
enet_uint32 encodeLow = 0, encodeRange = ~0;
ENetSymbol * root;
enet_uint16 predicted = 0;
size_t order = 0, nextSymbol = 0;
if (rangeCoder == NULL || inBufferCount <= 0 || inLimit <= 0)
return 0;
inData = (const enet_uint8 *) inBuffers -> data;
inEnd = & inData [inBuffers -> dataLength];
inBuffers ++;
inBufferCount --;
ENET_CONTEXT_CREATE (root, ENET_CONTEXT_ESCAPE_MINIMUM, ENET_CONTEXT_SYMBOL_MINIMUM);
for (;;)
{
ENetSymbol * subcontext, * symbol;
#ifdef ENET_CONTEXT_EXCLUSION
const ENetSymbol * childContext = & emptyContext;
#endif
enet_uint8 value;
enet_uint16 count, under, * parent = & predicted, total;
if (inData >= inEnd)
{
if (inBufferCount <= 0)
break;
inData = (const enet_uint8 *) inBuffers -> data;
inEnd = & inData [inBuffers -> dataLength];
inBuffers ++;
inBufferCount --;
}
value = * inData ++;
for (subcontext = & rangeCoder -> symbols [predicted];
subcontext != root;
#ifdef ENET_CONTEXT_EXCLUSION
childContext = subcontext,
#endif
subcontext = & rangeCoder -> symbols [subcontext -> parent])
{
ENET_CONTEXT_ENCODE (subcontext, symbol, value, under, count, ENET_SUBCONTEXT_SYMBOL_DELTA, 0);
* parent = symbol - rangeCoder -> symbols;
parent = & symbol -> parent;
total = subcontext -> total;
#ifdef ENET_CONTEXT_EXCLUSION
if (childContext -> total > ENET_SUBCONTEXT_SYMBOL_DELTA + ENET_SUBCONTEXT_ESCAPE_DELTA)
ENET_CONTEXT_ENCODE_EXCLUDE (childContext, value, under, total, 0);
#endif
if (count > 0)
{
ENET_RANGE_CODER_ENCODE (subcontext -> escapes + under, count, total);
}
else
{
if (subcontext -> escapes > 0 && subcontext -> escapes < total)
ENET_RANGE_CODER_ENCODE (0, subcontext -> escapes, total);
subcontext -> escapes += ENET_SUBCONTEXT_ESCAPE_DELTA;
subcontext -> total += ENET_SUBCONTEXT_ESCAPE_DELTA;
}
subcontext -> total += ENET_SUBCONTEXT_SYMBOL_DELTA;
if (count > 0xFF - 2*ENET_SUBCONTEXT_SYMBOL_DELTA || subcontext -> total > ENET_RANGE_CODER_BOTTOM - 0x100)
ENET_CONTEXT_RESCALE (subcontext, 0);
if (count > 0) goto nextInput;
}
ENET_CONTEXT_ENCODE (root, symbol, value, under, count, ENET_CONTEXT_SYMBOL_DELTA, ENET_CONTEXT_SYMBOL_MINIMUM);
* parent = symbol - rangeCoder -> symbols;
parent = & symbol -> parent;
total = root -> total;
#ifdef ENET_CONTEXT_EXCLUSION
if (childContext -> total > ENET_SUBCONTEXT_SYMBOL_DELTA + ENET_SUBCONTEXT_ESCAPE_DELTA)
ENET_CONTEXT_ENCODE_EXCLUDE (childContext, value, under, total, ENET_CONTEXT_SYMBOL_MINIMUM);
#endif
ENET_RANGE_CODER_ENCODE (root -> escapes + under, count, total);
root -> total += ENET_CONTEXT_SYMBOL_DELTA;
if (count > 0xFF - 2*ENET_CONTEXT_SYMBOL_DELTA + ENET_CONTEXT_SYMBOL_MINIMUM || root -> total > ENET_RANGE_CODER_BOTTOM - 0x100)
ENET_CONTEXT_RESCALE (root, ENET_CONTEXT_SYMBOL_MINIMUM);
nextInput:
if (order >= ENET_SUBCONTEXT_ORDER)
predicted = rangeCoder -> symbols [predicted].parent;
else
order ++;
ENET_RANGE_CODER_FREE_SYMBOLS;
}
ENET_RANGE_CODER_FLUSH;
return (size_t) (outData - outStart);
}
#define ENET_RANGE_CODER_SEED \
{ \
if (inData < inEnd) decodeCode |= * inData ++ << 24; \
if (inData < inEnd) decodeCode |= * inData ++ << 16; \
if (inData < inEnd) decodeCode |= * inData ++ << 8; \
if (inData < inEnd) decodeCode |= * inData ++; \
}
#define ENET_RANGE_CODER_READ(total) ((decodeCode - decodeLow) / (decodeRange /= (total)))
#define ENET_RANGE_CODER_DECODE(under, count, total) \
{ \
decodeLow += (under) * decodeRange; \
decodeRange *= (count); \
for (;;) \
{ \
if((decodeLow ^ (decodeLow + decodeRange)) >= ENET_RANGE_CODER_TOP) \
{ \
if(decodeRange >= ENET_RANGE_CODER_BOTTOM) break; \
decodeRange = -decodeLow & (ENET_RANGE_CODER_BOTTOM - 1); \
} \
decodeCode <<= 8; \
if (inData < inEnd) \
decodeCode |= * inData ++; \
decodeRange <<= 8; \
decodeLow <<= 8; \
} \
}
#define ENET_CONTEXT_DECODE(context, symbol_, code, value_, under_, count_, update, minimum, createRoot, visitNode, createRight, createLeft) \
{ \
under_ = 0; \
count_ = minimum; \
if (! (context) -> symbols) \
{ \
createRoot; \
} \
else \
{ \
ENetSymbol * node = (context) + (context) -> symbols; \
for (;;) \
{ \
enet_uint16 after = under_ + node -> under + (node -> value + 1)*minimum, before = node -> count + minimum; \
visitNode; \
if (code >= after) \
{ \
under_ += node -> under; \
if (node -> right) { node += node -> right; continue; } \
createRight; \
} \
else \
if (code < after - before) \
{ \
node -> under += update; \
if (node -> left) { node += node -> left; continue; } \
createLeft; \
} \
else \
{ \
value_ = node -> value; \
count_ += node -> count; \
under_ = after - before; \
node -> under += update; \
node -> count += update; \
symbol_ = node; \
} \
break; \
} \
} \
}
#define ENET_CONTEXT_TRY_DECODE(context, symbol_, code, value_, under_, count_, update, minimum, exclude) \
ENET_CONTEXT_DECODE (context, symbol_, code, value_, under_, count_, update, minimum, return 0, exclude (node -> value, after, before), return 0, return 0)
#define ENET_CONTEXT_ROOT_DECODE(context, symbol_, code, value_, under_, count_, update, minimum, exclude) \
ENET_CONTEXT_DECODE (context, symbol_, code, value_, under_, count_, update, minimum, \
{ \
value_ = code / minimum; \
under_ = code - code%minimum; \
ENET_SYMBOL_CREATE (symbol_, value_, update); \
(context) -> symbols = symbol_ - (context); \
}, \
exclude (node -> value, after, before), \
{ \
value_ = node->value + 1 + (code - after)/minimum; \
under_ = code - (code - after)%minimum; \
ENET_SYMBOL_CREATE (symbol_, value_, update); \
node -> right = symbol_ - node; \
}, \
{ \
value_ = node->value - 1 - (after - before - code - 1)/minimum; \
under_ = code - (after - before - code - 1)%minimum; \
ENET_SYMBOL_CREATE (symbol_, value_, update); \
node -> left = symbol_ - node; \
}) \
#ifdef ENET_CONTEXT_EXCLUSION
typedef struct _ENetExclude
{
enet_uint8 value;
enet_uint16 under;
} ENetExclude;
#define ENET_CONTEXT_DECODE_EXCLUDE(context, total, minimum) \
{ \
enet_uint16 under = 0; \
nextExclude = excludes; \
ENET_CONTEXT_WALK (context, { \
under += rangeCoder -> symbols [node -> parent].count + minimum; \
nextExclude -> value = node -> value; \
nextExclude -> under = under; \
nextExclude ++; \
}); \
total -= under; \
}
#define ENET_CONTEXT_EXCLUDED(value_, after, before) \
{ \
size_t low = 0, high = nextExclude - excludes; \
for(;;) \
{ \
size_t mid = (low + high) >> 1; \
const ENetExclude * exclude = & excludes [mid]; \
if (value_ < exclude -> value) \
{ \
if (low + 1 < high) \
{ \
high = mid; \
continue; \
} \
if (exclude > excludes) \
after -= exclude [-1].under; \
} \
else \
{ \
if (value_ > exclude -> value) \
{ \
if (low + 1 < high) \
{ \
low = mid; \
continue; \
} \
} \
else \
before = 0; \
after -= exclude -> under; \
} \
break; \
} \
}
#endif
#define ENET_CONTEXT_NOT_EXCLUDED(value_, after, before)
size_t
enet_range_coder_decompress (void * context, const enet_uint8 * inData, size_t inLimit, enet_uint8 * outData, size_t outLimit)
{
ENetRangeCoder * rangeCoder = (ENetRangeCoder *) context;
enet_uint8 * outStart = outData, * outEnd = & outData [outLimit];
const enet_uint8 * inEnd = & inData [inLimit];
enet_uint32 decodeLow = 0, decodeCode = 0, decodeRange = ~0;
ENetSymbol * root;
enet_uint16 predicted = 0;
size_t order = 0, nextSymbol = 0;
#ifdef ENET_CONTEXT_EXCLUSION
ENetExclude excludes [256];
ENetExclude * nextExclude = excludes;
#endif
if (rangeCoder == NULL || inLimit <= 0)
return 0;
ENET_CONTEXT_CREATE (root, ENET_CONTEXT_ESCAPE_MINIMUM, ENET_CONTEXT_SYMBOL_MINIMUM);
ENET_RANGE_CODER_SEED;
for (;;)
{
ENetSymbol * subcontext, * symbol, * patch;
#ifdef ENET_CONTEXT_EXCLUSION
const ENetSymbol * childContext = & emptyContext;
#endif
enet_uint8 value = 0;
enet_uint16 code, under, count, bottom, * parent = & predicted, total;
for (subcontext = & rangeCoder -> symbols [predicted];
subcontext != root;
#ifdef ENET_CONTEXT_EXCLUSION
childContext = subcontext,
#endif
subcontext = & rangeCoder -> symbols [subcontext -> parent])
{
if (subcontext -> escapes <= 0)
continue;
total = subcontext -> total;
#ifdef ENET_CONTEXT_EXCLUSION
if (childContext -> total > 0)
ENET_CONTEXT_DECODE_EXCLUDE (childContext, total, 0);
#endif
if (subcontext -> escapes >= total)
continue;
code = ENET_RANGE_CODER_READ (total);
if (code < subcontext -> escapes)
{
ENET_RANGE_CODER_DECODE (0, subcontext -> escapes, total);
continue;
}
code -= subcontext -> escapes;
#ifdef ENET_CONTEXT_EXCLUSION
if (childContext -> total > 0)
{
ENET_CONTEXT_TRY_DECODE (subcontext, symbol, code, value, under, count, ENET_SUBCONTEXT_SYMBOL_DELTA, 0, ENET_CONTEXT_EXCLUDED);
}
else
#endif
{
ENET_CONTEXT_TRY_DECODE (subcontext, symbol, code, value, under, count, ENET_SUBCONTEXT_SYMBOL_DELTA, 0, ENET_CONTEXT_NOT_EXCLUDED);
}
bottom = symbol - rangeCoder -> symbols;
ENET_RANGE_CODER_DECODE (subcontext -> escapes + under, count, total);
subcontext -> total += ENET_SUBCONTEXT_SYMBOL_DELTA;
if (count > 0xFF - 2*ENET_SUBCONTEXT_SYMBOL_DELTA || subcontext -> total > ENET_RANGE_CODER_BOTTOM - 0x100)
ENET_CONTEXT_RESCALE (subcontext, 0);
goto patchContexts;
}
total = root -> total;
#ifdef ENET_CONTEXT_EXCLUSION
if (childContext -> total > 0)
ENET_CONTEXT_DECODE_EXCLUDE (childContext, total, ENET_CONTEXT_SYMBOL_MINIMUM);
#endif
code = ENET_RANGE_CODER_READ (total);
if (code < root -> escapes)
{
ENET_RANGE_CODER_DECODE (0, root -> escapes, total);
break;
}
code -= root -> escapes;
#ifdef ENET_CONTEXT_EXCLUSION
if (childContext -> total > 0)
{
ENET_CONTEXT_ROOT_DECODE (root, symbol, code, value, under, count, ENET_CONTEXT_SYMBOL_DELTA, ENET_CONTEXT_SYMBOL_MINIMUM, ENET_CONTEXT_EXCLUDED);
}
else
#endif
{
ENET_CONTEXT_ROOT_DECODE (root, symbol, code, value, under, count, ENET_CONTEXT_SYMBOL_DELTA, ENET_CONTEXT_SYMBOL_MINIMUM, ENET_CONTEXT_NOT_EXCLUDED);
}
bottom = symbol - rangeCoder -> symbols;
ENET_RANGE_CODER_DECODE (root -> escapes + under, count, total);
root -> total += ENET_CONTEXT_SYMBOL_DELTA;
if (count > 0xFF - 2*ENET_CONTEXT_SYMBOL_DELTA + ENET_CONTEXT_SYMBOL_MINIMUM || root -> total > ENET_RANGE_CODER_BOTTOM - 0x100)
ENET_CONTEXT_RESCALE (root, ENET_CONTEXT_SYMBOL_MINIMUM);
patchContexts:
for (patch = & rangeCoder -> symbols [predicted];
patch != subcontext;
patch = & rangeCoder -> symbols [patch -> parent])
{
ENET_CONTEXT_ENCODE (patch, symbol, value, under, count, ENET_SUBCONTEXT_SYMBOL_DELTA, 0);
* parent = symbol - rangeCoder -> symbols;
parent = & symbol -> parent;
if (count <= 0)
{
patch -> escapes += ENET_SUBCONTEXT_ESCAPE_DELTA;
patch -> total += ENET_SUBCONTEXT_ESCAPE_DELTA;
}
patch -> total += ENET_SUBCONTEXT_SYMBOL_DELTA;
if (count > 0xFF - 2*ENET_SUBCONTEXT_SYMBOL_DELTA || patch -> total > ENET_RANGE_CODER_BOTTOM - 0x100)
ENET_CONTEXT_RESCALE (patch, 0);
}
* parent = bottom;
ENET_RANGE_CODER_OUTPUT (value);
if (order >= ENET_SUBCONTEXT_ORDER)
predicted = rangeCoder -> symbols [predicted].parent;
else
order ++;
ENET_RANGE_CODER_FREE_SYMBOLS;
}
return (size_t) (outData - outStart);
}
/** @defgroup host ENet host functions
@{
*/
/** Sets the packet compressor the host should use to the default range coder.
@param host host to enable the range coder for
@returns 0 on success, < 0 on failure
*/
int
enet_host_compress_with_range_coder (ENetHost * host)
{
ENetCompressor compressor;
memset (& compressor, 0, sizeof (compressor));
compressor.context = enet_range_coder_create();
if (compressor.context == NULL)
return -1;
compressor.compress = enet_range_coder_compress;
compressor.decompress = enet_range_coder_decompress;
compressor.destroy = enet_range_coder_destroy;
enet_host_compress (host, & compressor);
return 0;
}
/** @} */

1517
src/enet/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

1760
src/enet/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

13615
src/enet/configure vendored Executable file

File diff suppressed because it is too large Load Diff

30
src/enet/configure.ac Normal file
View File

@ -0,0 +1,30 @@
AC_INIT([libenet], [1.3.3])
AC_CONFIG_SRCDIR([include/enet/enet.h])
AM_INIT_AUTOMAKE([foreign])
AM_MAINTAINER_MODE([enable])
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
AC_PROG_LIBTOOL
AC_CHECK_FUNC(gethostbyaddr_r, [AC_DEFINE(HAS_GETHOSTBYADDR_R)])
AC_CHECK_FUNC(gethostbyname_r, [AC_DEFINE(HAS_GETHOSTBYNAME_R)])
AC_CHECK_FUNC(poll, [AC_DEFINE(HAS_POLL)])
AC_CHECK_FUNC(fcntl, [AC_DEFINE(HAS_FCNTL)])
AC_CHECK_FUNC(inet_pton, [AC_DEFINE(HAS_INET_PTON)])
AC_CHECK_FUNC(inet_ntop, [AC_DEFINE(HAS_INET_NTOP)])
AC_CHECK_MEMBER(struct msghdr.msg_flags, [AC_DEFINE(HAS_MSGHDR_FLAGS)], , [#include <sys/socket.h>])
AC_CHECK_TYPE(socklen_t, [AC_DEFINE(HAS_SOCKLEN_T)], ,
#include <sys/types.h>
#include <sys/socket.h>
)
AC_EGREP_HEADER(MSG_MAXIOVLEN, /usr/include/sys/socket.h, AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN]))
AC_EGREP_HEADER(MSG_MAXIOVLEN, socket.h, AC_DEFINE(ENET_BUFFER_MAXIMUM, [MSG_MAXIOVLEN]))
AC_CONFIG_FILES([Makefile
libenet.pc])
AC_OUTPUT

630
src/enet/depcomp Executable file
View File

@ -0,0 +1,630 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
# Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u="sed s,\\\\\\\\,/,g"
depmode=msvisualcpp
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no eat=no
for arg
do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
if test $eat = yes; then
eat=no
continue
fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-arch)
eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" "
for arg
do
case "$arg" in
-o)
shift
;;
$object)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvcmsys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

Some files were not shown because too many files have changed in this diff Show More