diff --git a/doc/datadir.html b/doc/datadir.html new file mode 100644 index 000000000..2ac8a6df1 --- /dev/null +++ b/doc/datadir.html @@ -0,0 +1,272 @@ +<HTML><HEAD> +<!-- +---- $Id$ +--> + <TITLE>FreeCraft Version 1.17 - Data directory structure</TITLE> +</HEAD> +<BODY> + <H1>FreeCraft Version 1.17 - Data directory structure</H1> +<HR><PRE WIDTH=80> + ___________ _________ _____ __ + \_ _____/______ ____ ____ \_ ___ \____________ _/ ____\/ |_ + | __) \_ __ \_/ __ \_/ __ \/ \ \/\_ __ \__ \\ __\\ __\ + | \ | | \/\ ___/\ ___/\ \____| | \// __ \| | | | + \___ / |__| \___ >\___ >\______ /|__| (____ /__| |__| + \/ \/ \/ \/ \/ + ______________________ ______________________ + T H E W A R B E G I N S + FreeCraft - A free fantasy real time strategy game engine +</PRE> +<B>(C) Copyright 2001 by The FreeCraft Project. Distributed under the +<A HREF="artistic-license.html">"Artistic License"</A></B> +<HR> +<PRE> +Proposal for the new FreeCraft data directory structure: + +<I>{race}</I> : Replace with a race name: human, orc, alliance or mythical.. +<I>{tileset}</I> : Replace with a tileset name: winter, summer, ... +<I>{unit}</I> : Replace with an unit name: footman, bowman, ... +<I>{building}</I> : Replace with a building name: goldmine, farm, ... +<I>{race-campaign}</I> : Replace with a name of a campaign of a race: human-exp, ... + +<B>$FREECRAFT_LIBRARY_PATH/data</B> +| Contains all data files for the FreeCraft game engine. +| +|-- <B>data/campaigns</B> +| | Contains all available campaigns. +| | +| `-- <B>data/campaigns/<I>{race-campaign}</I></B> +| | Contains all data for a campaign: scripts, maps, texts, intros. +| | +| `-- <B>data/campaigns/<I>{race-campaign}</I>/interface</B> +| Contains special backgrounds images for the campaign. +| +|-- <B>data/ccl</B> +| Contains all global CCL - Craft Configuration Language files. +| +|-- <B>data/graphics</B> +| | Contains all available graphics. +| | +| |-- <B>data/graphics/<I>{race}</I></B> +| | | Contains all graphics of a race, which could be used in any +| | | tileset. +| | | +| | |-- <B>data/graphics/<I>{race}</I>/buildings</B> +| | | Contains the building of the race, which could be used in +| | | any tileset. +| | | +| | `-- <B>data/graphics/<I>{race}</I>/units</B> +| | Contains all units of the race, which could be used in any +| | any tileset. +| | +| |-- <B>data/graphics/neutral</B> +| | | Contains all graphics that didn't belong to a special race and +| | | which could be used in any tileset. +| | | +| | |-- <B>data/graphics/neutral/buildings</B> +| | | Contains all buildings that didn't belong to a special race +| | | and which could be used in any tileset. +| | | +| | `-- <B>data/graphics/neutral/units</B> +| | Contains all units that didn't belong to a special race and +| | which could be used in any tileset. +| | +| |-- <B>data/graphics/missiles</B> +| | Contains all graphics of missiles. +| | +| |-- <B>data/graphics/tilesets</B> +| | | Contains the graphics special to a single tileset. +| | | Icons, buildings, units, tileset, decorations. +| | | +| | `-- <B>data/graphics/tilesets/<I>{tileset}</I></B> +| | | Contains the special graphics of this tileset of all races. +| | | +| | |-- <B>data/graphics/tilesets/<I>{tileset}</I>/<I>{race}</I></B> +| | | | Contains all graphics of a race special to this tileset. +| | | | +| | | |-- <B>data/graphics/tilesets/<I>{tileset}</I>/<I>{race}</I>/buildings</B> +| | | | Contains all buildings graphics of a race and a tileset. +| | | | +| | | `-- <B>data/graphics/tilesets/<I>{tileset}</I>/<I>{race}</I>/units</B> +| | | Contains all units graphics of a race and a tileset. +| | | +| | |-- <B>data/graphics/tilesets/<I>{tileset}</I>/neutral</B> +| | | | Contains the graphics not belonging to any race. +| | | | +| | | |-- <B>data/graphics/tilesets/<I>{tileset}</I>/neutral/buildings</B> +| | | | Contains the buildings graphics of the neutral race. +| | | | +| | | `-- <B>data/graphics/tilesets/<I>{tileset}</I>/neutral/units</B> +| | | Contains the units graphics of the neutral race. +| | | +| | `-- <B>data/graphics/tilesets/<I>{tileset}</I>/terrain</B> +| | Contains the graphics for the tileset self. +| | +| | +| `-- <B>data/graphics/ui</B> +| | Contains all user interface graphics. +| | +| |-- <B>data/graphics/ui/cursors</B> +| | Contains all cursors not special to any race. +| | +| |-- <B>data/graphics/ui/fonts</B> +| | Contains all fonts not special to any race. +| | +| `-- <B>data/graphics/ui/<I>{race}</I></B> +| | Contains all user interface graphics special to a race. +| | +| |-- <B>data/graphics/ui/<I>{race}</I>/640x480</B> +| | Contains the user interface graphics for this resolution. +| | +| `-- <B>data/graphics/ui/<I>{race}</I>/cursors</B> +| Contains the cursors special to this race. +| +| +|-- <B>data/puds</B> +| | Contains all 'puds' the original level format. +| | +| |-- <B>data/puds/demo</B> +| | Contains the demo levels. +| | +| |-- <B>data/puds/internal</B> +| | Contains the internal (stored in the data file) levels. +| | +| |-- <B>data/puds/multi</B> +| | Contains multi-player levels. +| | +| |-- <B>data/puds/my_puds</B> +| | Contains your own levels. +| | +| |-- <B>data/puds/single</B> +| | Contains single player levels. +| | +| `-- <B>data/puds/strange</B> +| Contains strange levels. +| +|-- <B>data/maps</B> +| | Contains all maps in our own level format. +| | +| |-- <B>data/maps/single</B> +| | Contains single player levels. +| | +| `-- <B>data/maps/multi</B> +| Contains multi-player player levels. +| +| +`-- <B>data/sounds</B> + | Contains all available sounds. + | + |-- <B>data/sounds/buildings</B> + | Contains all general buildings sounds. + | + |-- <B>data/sounds/<I>{race}</I></B> + | | Contains all sounds special to a race. + | | + | |-- <B>data/sounds/<I>{race}</I>/basic_voices</B> + | | | Contains the general sounds of this race. + | | | + | | |-- <B>data/sounds/<I>{race}</I>/basic_voices/acknowledgement</B> + | | | Contains the general acknowledgement sounds of this race. + | | | + | | |-- <B>data/sounds/<I>{race}</I>/basic_voices/annoyed</B> + | | | Contains the general annoyed sounds of this race. + | | | + | | |-- <B>data/sounds/<I>{race}</I>/basic_voices/help</B> + | | | Contains the general help sounds of this race. + | | | + | | `-- <B>data/sounds/<I>{race}</I>/basic_voices/selected</B> + | | Contains the general selected sounds of this race. + | | + | |-- <B>data/sounds/<I>{race}</I>/buildings</B> + | | Contains the buildings sounds of this race. + | | + | |-- <B>data/sounds/<I>{race}</I>/ships</B> + | | | Contains all general ship sounds of this race. + | | | + | | |-- <B>data/sounds/<I>{race}</I>/ships/acknowledgement</B> + | | | Contains the ship acknowledgement sound of this race. + | | | + | | |-- <B>data/sounds/<I>{race}</I>/ships/annoyed</B> + | | | Contains the ship annoyed sound of this race. + | | | + | | `-- <B>data/sounds/<I>{race}</I>/ships/selected</B> + | | Contains the ship selected sound of this race. + | | + | `-- <B>data/sounds/<I>{race}</I>/units</B> + | | Contains the special sounds of a race and unit. + | | + | `-- <B>data/sounds/<I>{race}</I>/units/<I>{unit}</I></B> + | | Contains the special sounds of this units of the race. + | | + | |-- <B>data/sounds/<I>{race}</I>/units/<I>{unit}</I>/acknowledgement</B> + | | Contains the acknowledge sound of this unit. + | | + | |-- <B>data/sounds/<I>{race}</I>/units/<I>{unit}</I>/annoyed</B> + | | Contains the annoyed sound of this unit. + | | + | `-- <B>data/sounds/<I>{race}</I>/units/<I>{unit}</I>/selected</B> + | Contains the selected sound of this unit. + | + |-- <B>data/sounds/misc</B> + | | Contains the sounds that didn't fit in any section. + | | + | |-- <B>data/sounds/misc/building explosion</B> + | | Contains the building explosion sounds. + | | + | `-- <B>data/sounds/misc/tree chopping</B> + | Contains the tree chopping sounds. + | + |-- <B>data/sounds/missiles</B> + | | Contains the fire and hit sounds of missiles. + | | + | `-- <B>data/sounds/missiles/sword attack</B> + | Contains different sounds of the same kind. + | + |-- <B>data/sounds/neutral</B> + | | Contains the sounds of buildings or units not belonging to any race. + | | + | |-- <B>data/sounds/neutral/buildings</B> + | | Contains the building sounds of the neutral race. + | | + | `-- <B>data/sounds/neutral/units</B> + | | Contains the units sounds of the neutral race. + | | + | `-- <B>data/sounds/neutral/units/<I>{unit}</I></B> + | | Contains the special sounds of the unit of the neutral race. + | | + | |-- <B>data/sounds/neutral/units/<I>{unit}</I>/acknowledgement</B> + | | Contains the acknowledgement sound of the unit of + | | the neutral race. + | | + | |-- <B>data/sounds/neutral/units/<I>{unit}</I>/annoyed</B> + | | Contains the annoyed sound of the unit of the neutral + | | race. + | | + | `-- <B>data/sounds/neutral/units/<I>{unit}</I>/selected</B> + | Contains the selected sound of the unit of the neutral + | race. + | + |-- <B>data/sounds/spells</B> + | Contains the sounds of the different spells. + | + |-- <B>data/sounds/ui</B> + | Contains the sounds for the user interface. + | + `-- <B>data/sounds/units</B> + | Contains the sounds of units common for all races. + | + `-- <B>data/sounds/units/<I>{unit}</I></B> + | Contains the sounds of this unit. + | + |-- <B>data/sounds/units/<I>{unit}</I>/acknowledgement</B> + | Contains the acknowledgement sound of this unit. + | + |-- <B>data/sounds/units/<I>{unit}</I>/annoyed</B> + | Contains the annoyed sound of this unit. + | + `-- <B>data/sounds/units/<I>{unit}</I>/selected</B> + Contains the selected sound of this unit. +</PRE><HR> +All trademarks and copyrights on this page are owned by their respective owners. +<ADDRESS><A HREF="mailto:aleclone@FreeCraft.org">The FreeCraft Project</A> +</ADDRESS></BODY></HTML> diff --git a/doc/development.html b/doc/development.html index fff63fd83..2db7bb918 100644 --- a/doc/development.html +++ b/doc/development.html @@ -17,7 +17,7 @@ T H E W A R B E G I N S FreeCraft - A free fantasy real time strategy game engine </PRE> -<P><B>(C) Copyright 1998-2000 by The FreeCraft Project. Distributed under the +<P><B>(C) Copyright 1998-2001 by The FreeCraft Project. Distributed under the <A HREF="artistic-license.html">"Artistic License"</A></B> <HR> @@ -27,6 +27,17 @@ This file should give you some information to help too develop FreeCraft.<P> Type 'make help' to get an overview what all could be made.<P> +<H2>C code documentation</H2> + +See below: you can use always the source code documentation.<P> + +I have prepared some extra documentations:<P> + +<UL> +<LI><A HREF="datadir.html">FreeCraft data file description.</A> +<LI><A HREF="unit.html">C "Unit" type description.</A> +</UL> + <H2>Source code documentation</H2> Valery Shchedrin has introduced tagged source documentation. I continued to @@ -76,6 +87,52 @@ Grouping.<P> Please read the documentation of the programs. +<H2>Empty C prototype file</H2> + +<PRE> +// ___________ _________ _____ __ +// \_ _____/______ ____ ____ \_ ___ \____________ _/ ____\/ |_ +// | __) \_ __ \_/ __ \_/ __ \/ \ \/\_ __ \__ \\ __\\ __\ +// | \ | | \/\ ___/\ ___/\ \____| | \// __ \| | | | +// \___ / |__| \___ >\___ >\______ /|__| (____ /__| |__| +// \/ \/ \/ \/ \/ +// ______________________ ______________________ +// T H E W A R B E G I N S +// FreeCraft - A free fantasy real time strategy game engine +// +/**@name {filename}.c - {One line description of this file} */ +// +// (c) Copyright 2001 by {insert your name here} +// +// $Id$ + +//@{ + +/*---------------------------------------------------------------------------- +-- Includes +----------------------------------------------------------------------------*/ + +#include <stdio.h> + +#include "freecraft.h" + +// More game includes. + +/*---------------------------------------------------------------------------- +-- Variables +----------------------------------------------------------------------------*/ + +// Global and local variables of this module. + +/*---------------------------------------------------------------------------- +-- Functions +----------------------------------------------------------------------------*/ + +// Local and global functions of this module. + +//@} +</PRE> + <H2>Coding style</H2> You can use your own coding style in your own modules. @@ -86,7 +143,7 @@ If you fix in other modules, please imitate the coding style of the old coder. <UL> <LI>Write ANSI C. <LI>Use 8 spaces tabulators. -<LI>Use 4 spaces indention levels. +<LI>Use 4 spaces indentation levels. <LI>Use C++ comments for to end of line comments. <LI>Use { } also for one statement blocks. </UL> diff --git a/doc/freecraft.html b/doc/freecraft.html index 641f72ff4..006926e65 100644 --- a/doc/freecraft.html +++ b/doc/freecraft.html @@ -23,12 +23,21 @@ <A HREF="#contents">Contents</A> - <H2><A NAME="copyright">Copyright</A></H2> + <H2><A NAME="copyright">Copyrights</A></H2> Please refer to the <A HREF="artistic-license.html">LICENSE</A> document provided with this distribution. To proceed beyond this point, is to agree with the license agreement. + <P>The self extracting archive contains ZIP code, read the + <A HREF="ZIP-LICENSE">ZIP-LICENSE</A>. + <P>The binaries could contain SDL code, read the + <A HREF="../README-SDL.txt">README-SDL.txt</A> and the + <A HREF="http://www.gnu.org/copyleft/lesser.html"> GNU LGPL license.</A> + <P>The source and binaries contains SIOD code, read + <A HREF="../src/siod/siod.html"> siod.html</A> for copyright and + informations. + <H2><A NAME="disclaimer">DISCLAIMER</A></H2> This software is provided as-is. The author(s) can not be held liable for diff --git a/doc/readme.html b/doc/readme.html index 0517f8442..3d09465f3 100644 --- a/doc/readme.html +++ b/doc/readme.html @@ -17,25 +17,34 @@ T H E W A R B E G I N S FreeCraft - A free fantasy real time strategy game engine </PRE> -<P><B>(C) Copyright 1998-2000 by The FreeCraft Project. Distributed under the +<P><B>(C) Copyright 1998-2001 by The FreeCraft Project. Distributed under the <A HREF="artistic-license.html">"Artistic License"</A></B> <HR> <H2>What is FreeCraft?</H2> FreeCraft was formerly known as ALE Clone.<P> - A clone of the realtime fantasy strategy game W*rCr*ft II.<BR> - FreeCraft runs under UNIX or BSD with X11 or console or any Win32.<P> + A clone of the real-time fantasy strategy game W*rCr*ft II.<BR> + FreeCraft is platform independent and runs currently under UNIX or LINUX + or BSD or BeOS or MacOS with X11 or console or any Win32 (Win95,Win98, + WinME,WinNT,Win2000). + <P> Since FreeCraft doesn't provide graphics, sounds and documentation,<BR> you need the <B>original game</B> so FreeCraft can extract the necessary files. (With over 1 million sold copies this shouldn't be a big problem)<P> - Alternative you could download the free graphic from the<BR> + Alternative you could download the free graphic from the:<BR> <A HREF="http://fgp.cjb.net"> http://fgp.cjb.net - FreeCraft Graphic Project</A>.<P> The newest version of FreeCraft (formerly known as ALE Clone) could always - be found here.<BR><A HREF="http://FreeCraft.Org"> + be found here:<BR><A HREF="http://FreeCraft.Org"> http://FreeCraft.Org - A free fantasy real time strategy game engine</A>.<P> + The development is coordinated with:<BR> + <A HREF="http://SourceForge.Net"> + SourceForge: Breaking Down the Barriers to Open Source Development</A><P> + Our project page is:<BR> + <A HREF="http://SourceForge.Net/projects/freecraft"> + FreeCraft real-time strategy game engine - Summary</A> <H2>Install</H2> @@ -47,7 +56,7 @@ Read this for a little documentation about FreeCraft: <A HREF="freecraft.html">freecraft.html</A><P> - If you want to help developmenting FreeCraft read this: + If you want to help develop FreeCraft read this: <A HREF="development.html">development.html</A><P> About the craft scripting language (Scheme, implemented with SIOD) read: <A HREF="../src/siod/siod.html">siod.html</A><P> @@ -57,7 +66,7 @@ Read this for the history of FreeCraft: <A HREF="ChangeLog.html">ChangeLog.html</A> - <H2>Todo and known bugs</H2> + <H2>To-do and known bugs</H2> This file contains the known bugs and what we plan in the future: <A HREF="todo.html">todo.html</A> diff --git a/doc/unit.html b/doc/unit.html new file mode 100644 index 000000000..6af8606e2 --- /dev/null +++ b/doc/unit.html @@ -0,0 +1,224 @@ +<HTML><HEAD> +<!-- +---- $Id$ +--> + <TITLE>FreeCraft Version 1.17 - Unit: C type description</TITLE> +</HEAD> +<BODY> + <H1>FreeCraft Version 1.17 - Unit: C type description</H1> +<HR><PRE WIDTH=80> + ___________ _________ _____ __ + \_ _____/______ ____ ____ \_ ___ \____________ _/ ____\/ |_ + | __) \_ __ \_/ __ \_/ __ \/ \ \/\_ __ \__ \\ __\\ __\ + | \ | | \/\ ___/\ ___/\ \____| | \// __ \| | | | + \___ / |__| \___ >\___ >\______ /|__| (____ /__| |__| + \/ \/ \/ \/ \/ + ______________________ ______________________ + T H E W A R B E G I N S + FreeCraft - A free fantasy real time strategy game engine +</PRE> +<B>(C) Copyright 2001 by The FreeCraft Project. Distributed under the +<A HREF="artistic-license.html">"Artistic License"</A></B> +<HR> +<PRE> +Unit: +===== + + #include "unit.h" + typedef struct _unit_ Unit; + + This structure contains all informations about an unit in game. + An unit could be everything, a man, a vehicle, a ship or a building. + +The unit structure members: + +Unit::Refs +---------- + The reference counter of the unit. If the pointer to the unit is stored + the counter must be incremented and if this reference is destroyed the + counter must be decremented. Alternative it would be possible to + implement a garbage collector for this. + +Unit::Slot +---------- + This is the unique slot number. It is not possible that two units have + the same slot number at the same time. The slot numbers are reused. + This field could be accessed by UnitNumber(Unit*). + Maximal 65535 (=MAX_UNIT_SLOTS) simultaneous units are supported. + +Unit::UnitSlot +-------------- + This is the pointer into Units[], where the unit pointer is stored. + Units[] is a table of all units currently active in game. + This pointer is only needed to speed up, the remove of the unit pointer + from Units[]. + +Unit::PlayerSlot +---------------- + A pointer into Player::Units[], where the unit pointer is stored. + Player::Units[] is a table of all units currently belonging to a player. + This pointer is only needed to speed up, the remove of the unit pointer + from Player::Units[]. + +Unit::Next +---------- + A generic link pointer. This member is currently used, if an unit is on + the map, to link all units on the same map field together. This member is + currently unused, if the unit is removed. (see Unit::Removed) + F.E.: A worker is removed, if he is in a mine or depot. Or an unit is + on board a transporter. + +Unit::X Unit::Y +------- ------- + The tile map coordinates of the unit. 0,0 is the upper left on the map. + +Unit::Type +---------- + Pointer to the unit type (UnitType). The unit type contains all informations + that all units of the same type shares. (Animations, Name, ...) + +Unit::Player +------------ + Pointer to the owner of this unit (Player). An unit could only be owned + by one player. + +Unit::Stats +----------- + Pointer to the current status (UnitStats) of an unit. The units of the + same player and the same type could share the same stats. The status + contains all values which could be different for each player. This + are f.e. the upgradeable abilities of an unit. (Unit::Stats::SightRange, + Unit::Stats::Armor, Unit::Stats::HitPoints, ...) + +Unit::IX Unit::IY +-------- -------- + Coordinate displacement in pixels or coordinates inside a tile. Currently + only !=0, if the unit is moving from one tile to another (0-32). + +Unit::Frame +----------- + Current graphic image of the animation sequence. The high bit (128) is used + to flip this image horizontal (x direction). + +Unit::SeenFrame +--------------- + Graphic image (see Unit::Frame) what the player on this computer has last + seen. If -1 the player haven't seen this unit. + + + FIXME: + If you need more informations, please send me an email or write it + self. + +Unit::Direction +--------------- + +Unit::Attacked +-------------- + +Unit::Burning +------------- + +Unit::Visible +------------- + +Unit::Destroyed +--------------- + +Unit::Removed +------------- + +Unit::Selected +-------------- + +Unit::Constructed +----------------- + +Unit::Mana +---------- + +Unit::HP +-------- + +Unit::Bloodlust +--------------- + +Unit::Haste +----------- + +Unit::Slow +---------- + +Unit::Invisible +--------------- + +Unit::FlameShield +----------------- + +Unit::UnholyArmor +----------------- + +Unit::GroupId +------------- + +Unit::Value +----------- + +Unit::SubAction +--------------- + +Unit::Wait +---------- + +Unit::State +----------- + +Unit::Reset +----------- + +Unit::Blink +----------- + +Unit::Moving +------------ + +Unit::Rs +-------- + +Unit::Revealer +-------------- + +Unit::OnBoard +------------- + +Unit::OrderCount +---------------- + +Unit::OrderFlush +---------------- + +Unit::Orders +------------ + +Unit::SavedOrder +---------------- + +Unit::NewOrder +-------------- + +Unit::Data +---------- + +Unit::Goal +---------- + +Unit::GoalX +----------- + +Unit::GoalY +----------- + +</PRE><HR> +All trademarks and copyrights on this page are owned by their respective owners. +<ADDRESS><A HREF="mailto:aleclone@FreeCraft.org">The FreeCraft Project</A> +</ADDRESS></BODY></HTML>