2003-05-03 08:09:58 -06:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
|
<html>
|
|
|
|
<head>
|
2000-03-25 15:38:54 -07:00
|
|
|
<!--
|
|
|
|
---- $Id$
|
2001-05-30 08:20:03 -06:00
|
|
|
|
2003-05-03 08:25:58 -06:00
|
|
|
---- (c) Copyright 2001-2003 by Lutz Sammer and Nehal Mistry
|
2001-05-30 08:20:03 -06:00
|
|
|
|
2003-07-03 10:08:07 -06:00
|
|
|
---- This program is free software; you can redistribute it and/or modify
|
2001-05-30 08:20:03 -06:00
|
|
|
---- it under the terms of the GNU General Public License as published by
|
2003-07-03 10:08:07 -06:00
|
|
|
---- the Free Software Foundation; version 2 dated June, 1991.
|
|
|
|
----
|
|
|
|
---- This program is distributed in the hope that it will be useful,
|
2001-05-30 08:20:03 -06:00
|
|
|
---- 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.
|
2003-07-03 10:08:07 -06:00
|
|
|
----
|
|
|
|
---- You should have received a copy of the GNU General Public License
|
|
|
|
---- along with this program; if not, write to the Free Software
|
|
|
|
---- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
---- 02111-1307, USA.
|
2000-03-25 15:38:54 -07:00
|
|
|
-->
|
2003-07-03 09:35:45 -06:00
|
|
|
<title>Development for Stratagus Version 1.18</title>
|
2003-05-03 08:09:58 -06:00
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
2003-04-22 18:44:03 -06:00
|
|
|
</head>
|
2003-05-03 08:09:58 -06:00
|
|
|
|
2003-04-22 18:44:03 -06:00
|
|
|
<body>
|
2003-05-03 08:09:58 -06:00
|
|
|
|
2003-07-03 09:35:45 -06:00
|
|
|
<h1>Development for Stratagus Version 1.18</h1>
|
2003-04-22 18:44:03 -06:00
|
|
|
<hr>
|
2000-03-25 15:38:54 -07:00
|
|
|
|
2003-07-03 09:35:45 -06:00
|
|
|
This file should give you some information to help with development of Stratagus.<p>
|
2001-05-30 08:20:03 -06:00
|
|
|
|
2003-04-22 18:44:03 -06:00
|
|
|
<h2>Mailing list</h2>
|
2001-05-30 08:20:03 -06:00
|
|
|
|
2003-07-03 09:35:45 -06:00
|
|
|
If you want to help with development for Stratagus you should
|
2003-09-03 04:46:49 -06:00
|
|
|
<a href="http://mail.nongnu.org/mailman/listinfo/stratagus-devel/">join</a>
|
|
|
|
the stratagus-devel mailing list.<br> You may also want to look at the
|
|
|
|
<a href="http://mail.nongnu.org/archive/html/stratagus-devel/">archives.</a>
|
2001-05-30 08:20:03 -06:00
|
|
|
|
2003-04-22 18:44:03 -06:00
|
|
|
<h2>IRC - Internet Relay Chat</h2>
|
2001-07-25 15:58:52 -06:00
|
|
|
|
2003-07-03 09:35:45 -06:00
|
|
|
You can try to meet other Stratagus developers and users on the
|
2003-05-03 08:09:58 -06:00
|
|
|
<a href="http://www.freenode.net/">FreeNode</a> IRC Network, in channel
|
2003-07-03 09:35:45 -06:00
|
|
|
<a href="irc://irc.freenode.net/stratagus">#Stratagus</a>.
|
2001-07-25 15:58:52 -06:00
|
|
|
|
2003-04-22 18:44:03 -06:00
|
|
|
<h2>Bugs and tasks</h2>
|
2001-05-30 08:20:03 -06:00
|
|
|
|
2003-09-03 04:46:49 -06:00
|
|
|
You can find <a
|
|
|
|
href="http://savannah.nongnu.org/bugs/?group=stratagus">known bugs</a>
|
|
|
|
and <a href="http://savannah.nongnu.org/pm/?group=stratagus">planned
|
|
|
|
tasks</a> on the <a
|
|
|
|
href="http://savannah.nongnu.org/projects/stratagus/">Savannah pages
|
|
|
|
of Stratagus</a>.<p>
|
2001-05-30 08:20:03 -06:00
|
|
|
|
2003-05-03 08:09:58 -06:00
|
|
|
Before starting on a bug or task, please ask on the mailing list or in the
|
|
|
|
IRC channel whether anybody else is already working on it.
|
2001-05-30 08:20:03 -06:00
|
|
|
|
2003-07-03 09:35:45 -06:00
|
|
|
<h2>Building Stratagus</h2>
|
2001-06-18 08:20:24 -06:00
|
|
|
|
2003-04-22 18:44:03 -06:00
|
|
|
<h3>Installing CVS client</h3>
|
2001-06-18 08:20:24 -06:00
|
|
|
|
2003-09-03 04:46:49 -06:00
|
|
|
If you want to help develop, it is the best that you use CVS. To do
|
|
|
|
so, first you need CVS for your system. Savannah has a <a
|
|
|
|
href="http://savannah.nongnu.org/cvs/?group=stratagus">guide</a> that
|
|
|
|
will help you get started.
|
2001-06-18 08:20:24 -06:00
|
|
|
|
2003-07-03 09:35:45 -06:00
|
|
|
<h3>Getting Stratagus from CVS</h3>
|
2001-06-18 08:20:24 -06:00
|
|
|
|
2003-05-03 08:09:58 -06:00
|
|
|
<h4>There are 3 modules in the CVS repository.</h4>
|
2001-06-18 08:20:24 -06:00
|
|
|
|
2003-04-22 18:44:03 -06:00
|
|
|
<ul>
|
2003-07-03 09:35:45 -06:00
|
|
|
<li>stratagus - The Stratagus engine source<p>
|
|
|
|
The source to the Stratagus engine. The source is licenced
|
2003-05-03 08:09:58 -06:00
|
|
|
under the GNU General Public License.
|
2003-04-22 18:44:03 -06:00
|
|
|
<b>This module is needed for development.</b>
|
2001-06-18 08:20:24 -06:00
|
|
|
|
2003-07-03 09:35:45 -06:00
|
|
|
<li>fcmp - The Stratagus Media Project<p>
|
2002-05-13 15:00:35 -06:00
|
|
|
A collection of free media (free sounds, music, videos, graphics,
|
2003-05-03 08:09:58 -06:00
|
|
|
animations and models), licensed under the GNU General Public License.
|
2002-05-13 15:00:35 -06:00
|
|
|
|
2003-07-03 09:35:45 -06:00
|
|
|
<li>crafted - The Stratagus Map Editor<p>
|
|
|
|
A map editor for Stratagus. This is obsolete now as Stratagus
|
2003-05-03 08:09:58 -06:00
|
|
|
has an internal editor.
|
2003-04-22 18:44:03 -06:00
|
|
|
</ul>
|
2001-06-18 08:20:24 -06:00
|
|
|
|
2003-04-22 18:44:03 -06:00
|
|
|
<h4>How do I access to these modules?</h4>
|
2001-06-18 08:20:24 -06:00
|
|
|
|
2003-05-03 08:09:58 -06:00
|
|
|
The instructions for accessing the modules are on the
|
2003-09-03 04:46:49 -06:00
|
|
|
<a href="http://savannah.nongnu.org/cvs/?group=stratagus">project cvs</a> page.<br>
|
2003-05-03 08:09:58 -06:00
|
|
|
NOTE: it is highly recommended that you use the -z3 flag, this compresses
|
|
|
|
the data and therefore speeds the transfer up.<p>
|
2001-06-18 08:20:24 -06:00
|
|
|
|
2003-05-03 08:09:58 -06:00
|
|
|
For example:<p>
|
2001-06-18 08:20:24 -06:00
|
|
|
|
2003-09-03 04:46:49 -06:00
|
|
|
cvs -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/stratagus login<br />
|
2003-04-22 18:44:03 -06:00
|
|
|
<i>"When prompted for a password for anonymous, simply press the Enter key."</i><br>
|
2003-09-03 04:46:49 -06:00
|
|
|
cvs -z3 -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/stratagus co stratagus<br />
|
2001-06-18 08:20:24 -06:00
|
|
|
|
2003-05-03 08:09:58 -06:00
|
|
|
This is done only once. To update your CVS directory, go into
|
|
|
|
the module directory and type 'cvs -z3 -q update -dP'.<p>
|
2001-06-18 08:20:24 -06:00
|
|
|
|
2003-05-03 08:09:58 -06:00
|
|
|
You may put these flags in your ~/.cvsrc file so that you only
|
|
|
|
need to type 'cvs update', the cvs (1) man page will show you how.
|
2001-06-18 08:20:24 -06:00
|
|
|
|
2003-07-03 09:35:45 -06:00
|
|
|
<h3>Getting Stratagus without CVS</h3>
|
2001-07-25 15:58:52 -06:00
|
|
|
|
2003-05-03 08:09:58 -06:00
|
|
|
Please note CVS is always the latest and it is easier for you to keep
|
|
|
|
up to date. But if for some reason you cannot get the source via CVS,
|
2003-07-03 09:35:45 -06:00
|
|
|
you find can regular snapshots of Stratagus
|
2003-09-03 04:46:49 -06:00
|
|
|
<a href="http://savannah.nongnu.org/files/?group=stratagus">here</a>.
|
2002-06-26 16:07:28 -06:00
|
|
|
|
2003-07-03 09:35:45 -06:00
|
|
|
<h3>Compiling Stratagus</h3>
|
2003-04-22 18:44:03 -06:00
|
|
|
|
2003-07-03 09:35:45 -06:00
|
|
|
You can find instructions for compiling Stratagus at
|
2003-05-03 08:09:58 -06:00
|
|
|
<a href="install.html">install.html</a>.<br>
|
|
|
|
Since you already have a copy of the source, you may skip
|
|
|
|
ahead to step 2.
|
2001-03-10 16:25:40 -07:00
|
|
|
|
2003-04-22 18:44:03 -06:00
|
|
|
<h2>Source code documentation</h2>
|
2000-03-25 15:38:54 -07:00
|
|
|
|
2003-05-03 08:09:58 -06:00
|
|
|
Valery Shchedrin has introduced tagged source
|
2003-07-03 09:35:45 -06:00
|
|
|
documentation for Stratagus.<p>
|
2000-03-25 15:38:54 -07:00
|
|
|
|
2003-05-03 08:16:43 -06:00
|
|
|
You need either
|
|
|
|
<a href="http://www.doxygen.org">DoxyGen</a> or
|
|
|
|
<a href="http://www.zib.de/Visual/software/doc++/index.html">DOC++</a>
|
|
|
|
to generate source code documentation. You may then
|
|
|
|
use the following commands to produce the documentation:
|
2003-04-22 18:44:03 -06:00
|
|
|
<ul>
|
2003-05-03 08:16:43 -06:00
|
|
|
<li>If you use DoxyGen: <b>make doc</b>
|
|
|
|
<li>If you use DOC++: <b>make doc++</b>
|
2003-04-22 18:44:03 -06:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<h3>Tags used in source code</h3>
|
|
|
|
|
2003-05-03 08:09:58 -06:00
|
|
|
We use the doc++ tags:<p>
|
2003-04-22 18:44:03 -06:00
|
|
|
|
2003-05-03 08:09:58 -06:00
|
|
|
Multi line source code documentation:<p>
|
2003-04-22 18:44:03 -06:00
|
|
|
/** ... */<p>
|
2003-05-03 08:09:58 -06:00
|
|
|
|
|
|
|
Single line source code documentation:<p>
|
2003-04-22 18:44:03 -06:00
|
|
|
/// ... <p>
|
2003-05-03 08:09:58 -06:00
|
|
|
|
|
|
|
Start grouping:<p>
|
2003-04-22 18:44:03 -06:00
|
|
|
//@{ or /*@{*/<p>
|
2003-05-03 08:09:58 -06:00
|
|
|
|
|
|
|
End grouping:<p>
|
2003-04-22 18:44:03 -06:00
|
|
|
//@} or /*@}*/<p>
|
2003-05-03 08:09:58 -06:00
|
|
|
|
2003-04-22 18:44:03 -06:00
|
|
|
|
|
|
|
<ul>
|
2003-05-03 08:09:58 -06:00
|
|
|
<li>@name
|
|
|
|
<br>Name of file or group.
|
|
|
|
<li>@param
|
|
|
|
<br>Describes function/macro parameter
|
|
|
|
<li>@return
|
|
|
|
<br>Describes function return
|
|
|
|
<li>@see
|
|
|
|
<br>Links to other section
|
|
|
|
</ul><p>
|
|
|
|
|
|
|
|
Please read the doxygen/doc++ documentation.
|
2000-03-25 15:38:54 -07:00
|
|
|
|
2003-04-22 18:44:03 -06:00
|
|
|
<h2>Empty C prototype file</h2>
|
2001-03-10 16:25:40 -07:00
|
|
|
|
2003-04-22 18:44:03 -06:00
|
|
|
<pre>
|
2003-07-03 09:55:38 -06:00
|
|
|
// _________ __ __
|
|
|
|
// / _____// |_____________ _/ |______ ____ __ __ ______
|
|
|
|
// \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
|
|
|
|
// / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
|
|
|
|
// /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
|
|
|
|
// \/ \/ \//_____/ \/
|
2001-03-10 16:25:40 -07:00
|
|
|
// ______________________ ______________________
|
|
|
|
// T H E W A R B E G I N S
|
2003-07-03 09:35:45 -06:00
|
|
|
// Stratagus - A free fantasy real time strategy game engine
|
2001-03-10 16:25:40 -07:00
|
|
|
//
|
|
|
|
/**@name {filename}.c - {One line description of this file} */
|
|
|
|
//
|
2003-02-04 17:35:02 -07:00
|
|
|
// (c) Copyright 2003 by {insert your name here}
|
2001-03-10 16:25:40 -07:00
|
|
|
//
|
2003-07-03 09:59:56 -06:00
|
|
|
// 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; version 2 dated June, 1991.
|
2001-05-30 08:20:03 -06:00
|
|
|
//
|
2003-07-03 09:59:56 -06:00
|
|
|
// 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, write to the Free Software
|
|
|
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
// 02111-1307, USA.
|
2001-05-30 08:20:03 -06:00
|
|
|
//
|
2001-03-10 16:25:40 -07:00
|
|
|
// $Id$
|
|
|
|
|
|
|
|
//@{
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------------
|
|
|
|
-- Includes
|
|
|
|
----------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2003-07-03 09:35:45 -06:00
|
|
|
#include "stratagus.h"
|
2001-03-10 16:25:40 -07:00
|
|
|
|
|
|
|
// More game includes.
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------------
|
|
|
|
-- Variables
|
|
|
|
----------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
// Global and local variables of this module.
|
|
|
|
|
|
|
|
/*----------------------------------------------------------------------------
|
|
|
|
-- Functions
|
|
|
|
----------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
// Local and global functions of this module.
|
|
|
|
|
|
|
|
//@}
|
2003-04-22 18:44:03 -06:00
|
|
|
</pre>
|
2001-03-10 16:25:40 -07:00
|
|
|
|
2003-04-22 18:44:03 -06:00
|
|
|
<h2>Coding style</h2>
|
2000-03-25 15:38:54 -07:00
|
|
|
|
|
|
|
You can use your own coding style in your own modules.
|
2003-05-03 08:09:58 -06:00
|
|
|
If you fix in other modules, please imitate the coding style of the original coder.
|
2000-03-25 15:38:54 -07:00
|
|
|
|
2003-05-03 08:09:58 -06:00
|
|
|
<p>We suggest the
|
|
|
|
<a href="/usr/src/linux/Documentation/CodingStyle">Linux kernel coding style</a> (also
|
|
|
|
found online <a href="http://lwn.net/2001/1115/a/CodingStyle.php3">here</a>).
|
2003-04-22 18:44:03 -06:00
|
|
|
<ul>
|
2003-05-03 08:09:58 -06:00
|
|
|
<li>Write ANSI C.
|
|
|
|
<li>Use 8 spaces tabulators.
|
|
|
|
<li>Use 4 spaces indentation levels.
|
|
|
|
<li>No line should be longer than 78 characters.
|
|
|
|
<li>Use C++ comments for to end of line comments.
|
|
|
|
<li>Use { } even for one statement blocks.
|
2003-04-22 18:44:03 -06:00
|
|
|
</ul>
|
2000-03-25 15:38:54 -07:00
|
|
|
|
2003-05-03 08:09:58 -06:00
|
|
|
NOTE: If you make big changes please always extend the copyright with your name,
|
|
|
|
and always update the copyright year if required.<p>
|
|
|
|
|
2003-04-22 18:44:03 -06:00
|
|
|
<h2>Sending a patch</h2>
|
2001-06-18 08:20:24 -06:00
|
|
|
|
2003-05-03 08:09:58 -06:00
|
|
|
Once you have completed some work, you will probably want it to be
|
2003-07-03 09:35:45 -06:00
|
|
|
included in the main Stratagus source.<p>
|
2001-06-18 08:20:24 -06:00
|
|
|
|
2003-05-03 08:09:58 -06:00
|
|
|
Follow these steps:<p>
|
2001-06-18 08:20:24 -06:00
|
|
|
|
2003-04-22 18:44:03 -06:00
|
|
|
<ul>
|
2003-05-03 08:09:58 -06:00
|
|
|
<li>cvs -q update -d
|
|
|
|
<li>cvs -q diff -u > your-nickname.diff
|
2003-05-03 08:12:24 -06:00
|
|
|
<li>upload 'your-nickname.diff' to the
|
2003-09-03 04:46:49 -06:00
|
|
|
<a href=http://savannah.nongnu.org/patch/?group=stratagus">patch tracker</a>.
|
2003-04-22 18:44:03 -06:00
|
|
|
</ul>
|
2001-08-06 12:35:59 -06:00
|
|
|
|
2003-04-22 18:44:03 -06:00
|
|
|
<h2>Building FcMP</h2>
|
2002-04-27 18:59:30 -06:00
|
|
|
|
2003-05-03 08:09:58 -06:00
|
|
|
Once you have the fcmp module, go into the 'fcmp' directory, and edit
|
|
|
|
the location variables if necessary in 'buildfcmp.sh'. Then run
|
|
|
|
the 'buildfcmp.sh' script and it will create a working data.fcmp directory.<p>
|
2001-08-06 12:35:59 -06:00
|
|
|
|
2003-07-03 09:35:45 -06:00
|
|
|
Please read the <a href="datadir.html">Stratagus data directory description.</a>
|
2002-05-13 15:00:35 -06:00
|
|
|
|
2003-04-22 18:44:03 -06:00
|
|
|
<hr>
|
2003-07-03 09:35:45 -06:00
|
|
|
(C) Copyright 1998-2003 by The <a href="http://stratagus.sf.net">Stratagus</a> Project
|
2003-05-19 12:32:54 -06:00
|
|
|
under the <a href="gpl.html">GNU General Public License</a>.<br>
|
|
|
|
All trademarks and copyrights on this page are owned by their respective owners.<br>
|
2003-05-03 08:09:58 -06:00
|
|
|
</body>
|
2003-05-19 12:32:54 -06:00
|
|
|
</html>
|