| 1 |
/* |
| 2 |
$Id$ |
| 3 |
|
| 4 |
Copyright (C) 2001 Kai Sterker |
| 5 |
Part of the Adonthell Project http://adonthell.linuxgames.com |
| 6 |
|
| 7 |
This program is free software; you can redistribute it and/or modify |
| 8 |
it under the terms of the GNU General Public License. |
| 9 |
This program is distributed in the hope that it will be useful, |
| 10 |
but WITHOUT ANY WARRANTY. |
| 11 |
|
| 12 |
See the COPYING file for more details. |
| 13 |
*/ |
| 14 |
|
| 15 |
/*! \page page4 The Map Engine |
| 16 |
|
| 17 |
The map engine consists of several parts that work together to display the |
| 18 |
%game world on %screen. |
| 19 |
|
| 20 |
\section map_data Map Data |
| 21 |
|
| 22 |
The landmap holds the %data of the map: the actual \link mapobject graphics |
| 23 |
\endlink used on that map, and the information how to place them. A single map |
| 24 |
can contain multiple, independent \link mapsquare_area terrains \endlink |
| 25 |
that share the same graphics though. All terrains (or submaps) of a map are |
| 26 |
kept in memory, so transition between them is fast. Therefore it is desirable |
| 27 |
to keep related areas, like different levels of a dungeon or the floors of a |
| 28 |
building, on the same map. |
| 29 |
|
| 30 |
\section map_rendering The Renderer |
| 31 |
|
| 32 |
The %data on its own is only of little use as long as there is no way of displaying |
| 33 |
it. This is the \link mapview mapview's \endlink task. It renders a certain area |
| 34 |
of the map and everything on it onto a surface. That way, it can be as easily |
| 35 |
displayed on %screen as it can be saved to disk. |
| 36 |
|
| 37 |
The %mapview itself is rather dumb and without further instructions it would |
| 38 |
render the same part of the map for the rest of eternity. A \link py_object python |
| 39 |
script \endlink can be used to achieve a dynamic behaviour of the mapview, like |
| 40 |
following the player around the map. This script is called once every cycle of the |
| 41 |
%game and has access to practically all API functions and in-%game data, to permit |
| 42 |
as much flexibility as possible. |
| 43 |
*/ |