diff options
author | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
commit | 0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch) | |
tree | 2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/a03517.html | |
download | nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip |
Initial commit
Diffstat (limited to 'docs/doxygen/nel/a03517.html')
-rw-r--r-- | docs/doxygen/nel/a03517.html | 2423 |
1 files changed, 2423 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03517.html b/docs/doxygen/nel/a03517.html new file mode 100644 index 00000000..e3a02ddb --- /dev/null +++ b/docs/doxygen/nel/a03517.html @@ -0,0 +1,2423 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>NeL: NL3D::CTileBank class Reference</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.3.6 --> +<div class="qindex"> <form class="search" action="search.php" method="get"> +<a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div> +<h1>NL3D::CTileBank Class Reference</h1><code>#include <<a class="el" href="a06537.html">tile_bank.h</a>></code> +<p> +<hr><a name="_details"></a><h2>Detailed Description</h2> +This class manage tile texture. It can load banktile description file (*.bank), and then gives access to land infos. <dl compact><dt><b>Author:</b></dt><dd>Cyril Corvazier <p> +Nevrax France </dd></dl> +<dl compact><dt><b>Date:</b></dt><dd>2000 </dd></dl> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00494">494</a> of file <a class="el" href="a06537.html">tile_bank.h</a>.<table border=0 cellpadding=0 cellspacing=0> +<tr><td></td></tr> +<tr><td colspan=2><br><h2>Public Types</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>enum </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBankw3">TTileType</a> { <a class="el" href="a03517.html#NL3D_1_1CTileBankw3NL3D_1_1CTileBankw0">_128x128</a> = 0, +<a class="el" href="a03517.html#NL3D_1_1CTileBankw3NL3D_1_1CTileBankw1">_256x256</a>, +<a class="el" href="a03517.html#NL3D_1_1CTileBankw3NL3D_1_1CTileBankw2">transition</a>, +<a class="el" href="a03517.html#NL3D_1_1CTileBankw3NL3D_1_1CTileBankw4">undefined</a> + }</td></tr> + +<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka0">addLand</a> (const std::string &name)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka1">addTileSet</a> (const std::string &name)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka2">cleanUnusedData</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka3">clear</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka4">computeXRef</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka5">CTileBank</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const std::string & </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka6">getAbsPath</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka7">getDisplacementMap</a> (const std::string &fileName)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const char * </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka8">getDisplacementMap</a> (<a class="el" href="a04558.html#a15">uint</a> noiseMap)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka9">getDisplacementMapCount</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03526.html">CTileLand</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka10">getLand</a> (int landIndex)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03526.html">CTileLand</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka11">getLand</a> (int landIndex) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka12">getLandCount</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka13">getNumBitmap</a> (<a class="el" href="a03515.html#NL3D_1_1CTilew4">CTile::TBitmap</a> bitmap) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03515.html">CTile</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka14">getTile</a> (int tileIndex)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03515.html">CTile</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka15">getTile</a> (int tileIndex) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka16">getTileCount</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03534.html">CTileSet</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka17">getTileSet</a> (int tileIndex)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03534.html">CTileSet</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka18">getTileSet</a> (int tileIndex) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka19">getTileSetCount</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka20">getTileXRef</a> (int tile, int &tileSet, int &number, <a class="el" href="a03517.html#NL3D_1_1CTileBankw3">TTileType</a> &<a class="el" href="a04223.html#a581">type</a>) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka21">makeAllExtensionDDS</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">This method change ".tga" of texture filename, to ".dds". Do this only for Additive and Diffuse part (not alpha). <a href="#NL3D_1_1CTileBanka21"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka22">makeAllPathRelative</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka23">postfixTileFilename</a> (const char *<a class="el" href="a04560.html#a1">filename</a>)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Postfix tile filename. <a href="#NL3D_1_1CTileBanka23"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka24">postfixTileVegetableDesc</a> (const char *<a class="el" href="a04560.html#a1">filename</a>)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Postfix tile vegetable desc. <a href="#NL3D_1_1CTileBanka24"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka25">removeDisplacementMap</a> (<a class="el" href="a04558.html#a15">uint</a> mapId)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka26">removeLand</a> (<a class="el" href="a04558.html#a14">sint</a> landIndex)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka27">removeTileSet</a> (<a class="el" href="a04558.html#a14">sint</a> landIndex)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka28">serial</a> (class <a class="el" href="a02270.html">NLMISC::IStream</a> &f) throw (NLMISC::EStream)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka29">setAbsPath</a> (const std::string &newPath)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka30">setDisplacementMap</a> (<a class="el" href="a04558.html#a15">uint</a> noiseMap, const char *newName)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBanka31">xchgTileset</a> (<a class="el" href="a04558.html#a14">sint</a> first, <a class="el" href="a04558.html#a14">sint</a> second)</td></tr> + +<tr><td colspan="2"><div class="groupHeader">Vegetable</div></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03532.html">CTileNoiseMap</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBankz994_0">getTileNoiseMap</a> (<a class="el" href="a04558.html#a15">uint</a> tileNumber, <a class="el" href="a04558.html#a15">uint</a> tileSubNoise)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03536.html">CTileVegetableDesc</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBankz994_1">getTileVegetableDesc</a> (<a class="el" href="a04558.html#a15">uint</a> tileNumber) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBankz994_2">initTileVegetableDescs</a> (<a class="el" href="a03680.html">CVegetableManager</a> *vegetableManager)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBankz994_3">loadTileVegetableDescs</a> ()</td></tr> + +<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a14">sint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBankd0">createTile</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBankd1">freeTile</a> (int tileIndex)</td></tr> + +<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>std::string </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBankr0">_AbsPath</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a03531.html">CTileNoise</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a03526.html">CTileLand</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBankr2">_LandVector</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a03534.html">CTileSet</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a03515.html">CTile</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a03518.html">CTileXRef</a> > </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBankr5">_TileXRef</a></td></tr> + +<tr><td colspan=2><br><h2>Static Private Attributes</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a04558.html#a14">sint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBankv0">_Version</a> = 4</td></tr> + +<tr><td colspan=2><br><h2>Friends</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>class </td><td class="memItemRight" valign=bottom><a class="el" href="a03517.html#NL3D_1_1CTileBankn0">CTileSet</a></td></tr> + +</table> +<hr><h2>Member Enumeration Documentation</h2> +<a class="anchor" name="NL3D_1_1CTileBankw3" doxytag="NL3D::CTileBank::TTileType" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> enum <a class="el" href="a03517.html#NL3D_1_1CTileBankw3">NL3D::CTileBank::TTileType</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +<dl compact><dt><b>Enumeration values: </b></dt><dd> +<table border=0 cellspacing=2 cellpadding=0> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CTileBankw3NL3D_1_1CTileBankw0" doxytag="_128x128" ></a>_128x128</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CTileBankw3NL3D_1_1CTileBankw1" doxytag="_256x256" ></a>_256x256</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CTileBankw3NL3D_1_1CTileBankw2" doxytag="transition" ></a>transition</em> </td><td> +</td></tr> +<tr><td valign=top><em><a class="anchor" name="NL3D_1_1CTileBankw3NL3D_1_1CTileBankw4" doxytag="undefined" ></a>undefined</em> </td><td> +</td></tr> +</table> +</dl> + +<p> +Definition at line <a class="el" href="a06537.html#l00498">498</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +<div class="fragment"><pre>00498 { <a class="code" href="a03517.html#NL3D_1_1CTileBankw3NL3D_1_1CTileBankw0">_128x128</a>=0, <a class="code" href="a03517.html#NL3D_1_1CTileBankw3NL3D_1_1CTileBankw1">_256x256</a>, <a class="code" href="a03517.html#NL3D_1_1CTileBankw3NL3D_1_1CTileBankw2">transition</a>, <a class="code" href="a03517.html#NL3D_1_1CTileBankw3NL3D_1_1CTileBankw4">undefined</a> }; +</pre></div> </td> + </tr> +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NL3D_1_1CTileBanka5" doxytag="NL3D::CTileBank::CTileBank" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> NL3D::CTileBank::CTileBank </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00090">90</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00655">_DisplacementMap</a>. +<p> +<div class="fragment"><pre>00091 { +00092 <span class="comment">// Default _DisplacementMap</span> +00093 <a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>.resize (1); +00094 +00095 <span class="comment">// Fill it with 0</span> +00096 <a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>[0].setEmpty (); +00097 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NL3D_1_1CTileBanka0" doxytag="NL3D::CTileBank::addLand" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> NL3D::CTileBank::addLand </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const std::string & </td> + <td class="mdname1" valign="top" nowrap> <em>name</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00172">172</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00651">_LandVector</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +<div class="fragment"><pre>00173 { +00174 <a class="code" href="a04558.html#a14">sint</a> last=<a class="code" href="a03517.html#NL3D_1_1CTileBankr2">_LandVector</a>.size(); +00175 <a class="code" href="a03517.html#NL3D_1_1CTileBankr2">_LandVector</a>.push_back(CTileLand()); +00176 <a class="code" href="a03517.html#NL3D_1_1CTileBankr2">_LandVector</a>[last].setName (name); +00177 <span class="keywordflow">return</span> last; +00178 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka1" doxytag="NL3D::CTileBank::addTileSet" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> NL3D::CTileBank::addTileSet </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const std::string & </td> + <td class="mdname1" valign="top" nowrap> <em>name</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00189">189</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00652">_TileSetVector</a>, <a class="el" href="a06536.html#l00226">createTile()</a>, <a class="el" href="a06537.html#l00496">CTileSet</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +<div class="fragment"><pre>00190 { +00191 <a class="code" href="a04558.html#a14">sint</a> last=<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.size(); +00192 <a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.push_back(<a class="code" href="a03517.html#NL3D_1_1CTileBankn0">CTileSet</a>()); +00193 <a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>[last].setName (name); +00194 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i<CTileSet::count; i++) +00195 { +00196 <a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>[last]._TileTransition[i]._Tile=<a class="code" href="a03517.html#NL3D_1_1CTileBankd0">createTile</a> (); +00197 } +00198 <span class="keywordflow">return</span> last; +00199 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka2" doxytag="NL3D::CTileBank::cleanUnusedData" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::cleanUnusedData </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00429">429</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00651">_LandVector</a>, <a class="el" href="a06537.html#l00652">_TileSetVector</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>00430 { +00431 <span class="comment">// Clean each tileset</span> +00432 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i<<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.size(); i++) +00433 { +00434 <span class="comment">// Clean the tileset</span> +00435 <a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>[i].cleanUnusedData (); +00436 } +00437 +00438 <span class="comment">// Clear the land vector</span> +00439 <a class="code" href="a03517.html#NL3D_1_1CTileBankr2">_LandVector</a>.clear(); +00440 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka3" doxytag="NL3D::CTileBank::clear" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::clear </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00216">216</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00656">_AbsPath</a>, <a class="el" href="a06537.html#l00655">_DisplacementMap</a>, <a class="el" href="a06537.html#l00651">_LandVector</a>, <a class="el" href="a06537.html#l00652">_TileSetVector</a>, <a class="el" href="a06537.html#l00653">_TileVector</a>, and <a class="el" href="a06537.html#l00654">_TileXRef</a>. +<p> +Referenced by <a class="el" href="a05874.html#l00064">NL3D::CLandscapeUser::loadBankFiles()</a>. +<p> +<div class="fragment"><pre>00217 { +00218 <a class="code" href="a03517.html#NL3D_1_1CTileBankr2">_LandVector</a>.clear (); +00219 <a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.clear (); +00220 <a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.clear (); +00221 <a class="code" href="a03517.html#NL3D_1_1CTileBankr5">_TileXRef</a>.clear (); +00222 <a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>.clear (); +00223 <a class="code" href="a03517.html#NL3D_1_1CTileBankr0">_AbsPath</a>.clear (); +00224 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka4" doxytag="NL3D::CTileBank::computeXRef" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::computeXRef </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00288">288</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a03517.html#NL3D_1_1CTileBankw3NL3D_1_1CTileBankw0">_128x128</a>, <a class="el" href="a03517.html#NL3D_1_1CTileBankw3NL3D_1_1CTileBankw1">_256x256</a>, <a class="el" href="a06537.html#l00652">_TileSetVector</a>, <a class="el" href="a06537.html#l00653">_TileVector</a>, <a class="el" href="a06537.html#l00654">_TileXRef</a>, <a class="el" href="a06537.html#l00337">NL3D::CTileSet::getNumTile128()</a>, <a class="el" href="a06537.html#l00341">NL3D::CTileSet::getNumTile256()</a>, <a class="el" href="a06537.html#l00207">NL3D::CTileSetTransition::getTile()</a>, <a class="el" href="a06537.html#l00345">NL3D::CTileSet::getTile128()</a>, <a class="el" href="a06537.html#l00349">NL3D::CTileSet::getTile256()</a>, <a class="el" href="a06537.html#l00520">getTileSet()</a>, <a class="el" href="a06537.html#l00353">NL3D::CTileSet::getTransition()</a>, <a class="el" href="a05646.html#l00225">index</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05646.html#l00985">t</a>, and <a class="el" href="a03517.html#NL3D_1_1CTileBankw3NL3D_1_1CTileBankw2">transition</a>. +<p> +<div class="fragment"><pre>00289 { +00290 <span class="comment">// Resize</span> +00291 <a class="code" href="a03517.html#NL3D_1_1CTileBankr5">_TileXRef</a>.resize (<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.size()); +00292 +00293 <span class="comment">// Erase number of the tileset in xref</span> +00294 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> tile=0; tile<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.size(); tile++) +00295 <a class="code" href="a03517.html#NL3D_1_1CTileBankr5">_TileXRef</a>[tile]._XRefTileSet=-1; +00296 +00297 <span class="comment">// Erase number of the tileset in xref</span> +00298 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> <a class="code" href="a04223.html#a626">s</a>=0; <a class="code" href="a04223.html#a626">s</a><(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.size(); <a class="code" href="a04223.html#a626">s</a>++) +00299 { +00300 <span class="keywordtype">int</span> <a class="code" href="a04223.html#a627">t</a>; +00301 <a class="code" href="a03517.html#NL3D_1_1CTileBankn0">CTileSet</a> *tileSet=<a class="code" href="a03517.html#NL3D_1_1CTileBanka18">getTileSet</a> (s); +00302 <span class="keywordflow">for</span> (<a class="code" href="a04223.html#a627">t</a>=0; <a class="code" href="a04223.html#a627">t</a><tileSet->getNumTile128(); <a class="code" href="a04223.html#a627">t</a>++) +00303 { +00304 <span class="keywordtype">int</span> <a class="code" href="a04223.html#a566">index</a>=tileSet->getTile128 (t); +00305 <a class="code" href="a03517.html#NL3D_1_1CTileBankr5">_TileXRef</a>[<a class="code" href="a04223.html#a566">index</a>]._XRefTileSet=<a class="code" href="a04223.html#a626">s</a>; +00306 <a class="code" href="a03517.html#NL3D_1_1CTileBankr5">_TileXRef</a>[<a class="code" href="a04223.html#a566">index</a>]._XRefTileNumber=<a class="code" href="a04223.html#a627">t</a>; +00307 <a class="code" href="a03517.html#NL3D_1_1CTileBankr5">_TileXRef</a>[<a class="code" href="a04223.html#a566">index</a>]._XRefTileType=<a class="code" href="a03517.html#NL3D_1_1CTileBankw3NL3D_1_1CTileBankw0">_128x128</a>; +00308 } +00309 <span class="keywordflow">for</span> (<a class="code" href="a04223.html#a627">t</a>=0; <a class="code" href="a04223.html#a627">t</a><tileSet->getNumTile256(); <a class="code" href="a04223.html#a627">t</a>++) +00310 { +00311 <span class="keywordtype">int</span> <a class="code" href="a04223.html#a566">index</a>=tileSet->getTile256 (t); +00312 <a class="code" href="a03517.html#NL3D_1_1CTileBankr5">_TileXRef</a>[<a class="code" href="a04223.html#a566">index</a>]._XRefTileSet=<a class="code" href="a04223.html#a626">s</a>; +00313 <a class="code" href="a03517.html#NL3D_1_1CTileBankr5">_TileXRef</a>[<a class="code" href="a04223.html#a566">index</a>]._XRefTileNumber=<a class="code" href="a04223.html#a627">t</a>; +00314 <a class="code" href="a03517.html#NL3D_1_1CTileBankr5">_TileXRef</a>[<a class="code" href="a04223.html#a566">index</a>]._XRefTileType=<a class="code" href="a03517.html#NL3D_1_1CTileBankw3NL3D_1_1CTileBankw1">_256x256</a>; +00315 } +00316 <span class="keywordflow">for</span> (<a class="code" href="a04223.html#a627">t</a>=0; <a class="code" href="a04223.html#a627">t</a><CTileSet::count; <a class="code" href="a04223.html#a627">t</a>++) +00317 { +00318 <span class="keywordtype">int</span> <a class="code" href="a04223.html#a566">index</a>=tileSet->getTransition (t)->getTile(); +00319 <a class="code" href="a03517.html#NL3D_1_1CTileBankr5">_TileXRef</a>[<a class="code" href="a04223.html#a566">index</a>]._XRefTileSet=<a class="code" href="a04223.html#a626">s</a>; +00320 <a class="code" href="a03517.html#NL3D_1_1CTileBankr5">_TileXRef</a>[<a class="code" href="a04223.html#a566">index</a>]._XRefTileNumber=<a class="code" href="a04223.html#a627">t</a>; +00321 <a class="code" href="a03517.html#NL3D_1_1CTileBankr5">_TileXRef</a>[<a class="code" href="a04223.html#a566">index</a>]._XRefTileType=<a class="code" href="a03517.html#NL3D_1_1CTileBankw3NL3D_1_1CTileBankw2">transition</a>; +00322 } +00323 } +00324 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBankd0" doxytag="NL3D::CTileBank::createTile" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> NL3D::CTileBank::createTile </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [private]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00226">226</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00653">_TileVector</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +Referenced by <a class="el" href="a06536.html#l00998">NL3D::CTileSet::addTile128()</a>, <a class="el" href="a06536.html#l01057">NL3D::CTileSet::addTile256()</a>, and <a class="el" href="a06536.html#l00189">addTileSet()</a>. +<p> +<div class="fragment"><pre>00227 { +00228 <span class="comment">// Look for a free tile</span> +00229 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.size(); i++) +00230 { +00231 <span class="keywordflow">if</span> (<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[i].isFree()) +00232 { +00233 <a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[i].setFileName (CTile::diffuse, <span class="stringliteral">""</span>); +00234 <a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[i].setFileName (CTile::additive, <span class="stringliteral">""</span>); +00235 <a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[i].setFileName (CTile::alpha, <span class="stringliteral">""</span>); +00236 <span class="keywordflow">return</span> i; +00237 } +00238 } +00239 +00240 <span class="comment">// Nothing free, add a tile at the end</span> +00241 <a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.push_back (CTile()); +00242 <a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.size()-1].setFileName (CTile::diffuse, <span class="stringliteral">""</span>); +00243 <a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.size()-1].setFileName (CTile::additive, <span class="stringliteral">""</span>); +00244 <a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.size()-1].setFileName (CTile::alpha, <span class="stringliteral">""</span>); +00245 <span class="keywordflow">return</span> <a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.size()-1; +00246 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBankd1" doxytag="NL3D::CTileBank::freeTile" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::freeTile </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">int </td> + <td class="mdname1" valign="top" nowrap> <em>tileIndex</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [private]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00248">248</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00653">_TileVector</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +Referenced by <a class="el" href="a06536.html#l01236">NL3D::CTileSet::removeTile128()</a>, <a class="el" href="a06536.html#l01255">NL3D::CTileSet::removeTile256()</a>, and <a class="el" href="a06536.html#l00201">removeTileSet()</a>. +<p> +<div class="fragment"><pre>00249 { +00250 <span class="comment">// Check args</span> +00251 <a class="code" href="a04199.html#a6">nlassert</a> (tileIndex>=0); +00252 <a class="code" href="a04199.html#a6">nlassert</a> (tileIndex<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.size()); +00253 +00254 <span class="comment">// Free</span> +00255 <a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[tileIndex].free(); +00256 +00257 <span class="comment">// Resize tile table</span> +00258 <span class="keywordtype">int</span> i; +00259 <span class="keywordflow">for</span> (i=(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.size()-1; i>=0; i--) +00260 { +00261 <span class="keywordflow">if</span> (!<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[i].isFree ()) +00262 <span class="keywordflow">break</span>; +00263 } +00264 <span class="keywordflow">if</span> (i<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.size()-1) +00265 <a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.resize (i+1); +00266 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka6" doxytag="NL3D::CTileBank::getAbsPath" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const std::string& NL3D::CTileBank::getAbsPath </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00619">619</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +References <a class="el" href="a06537.html#l00656">_AbsPath</a>. +<p> +Referenced by <a class="el" href="a06536.html#l00442">getTileNoiseMap()</a>, and <a class="el" href="a05862.html#l01670">NL3D::CLandscape::loadTile()</a>. +<p> +<div class="fragment"><pre>00620 { +00621 <span class="keywordflow">return</span> <a class="code" href="a03517.html#NL3D_1_1CTileBankr0">_AbsPath</a>; +00622 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka7" doxytag="NL3D::CTileBank::getDisplacementMap" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NL3D::CTileBank::getDisplacementMap </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const std::string & </td> + <td class="mdname1" valign="top" nowrap> <em>fileName</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00597">597</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00655">_DisplacementMap</a>, <a class="el" href="a05586.html#l00536">NLMISC::strlwr()</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>00598 { +00599 <span class="comment">// Lower string</span> +00600 string lower=fileName; +00601 lower=<a class="code" href="a05378.html#a273">strlwr</a> (lower); +00602 +00603 <span class="comment">// Look for this texture filename</span> +00604 <a class="code" href="a04558.html#a15">uint</a> noiseTile; +00605 <span class="keywordflow">for</span> (noiseTile=0; noiseTile<<a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>.size(); noiseTile++) +00606 { +00607 <span class="comment">// Same name ?</span> +00608 <span class="keywordflow">if</span> (lower==<a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>[noiseTile]._FileName) +00609 <span class="keywordflow">return</span> noiseTile; +00610 } +00611 +00612 <span class="comment">// Look for a free space</span> +00613 <span class="keywordflow">for</span> (noiseTile=0; noiseTile<<a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>.size(); noiseTile++) +00614 { +00615 <span class="comment">// Same name ?</span> +00616 <span class="keywordflow">if</span> (<a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>[noiseTile]._FileName==<span class="stringliteral">""</span>) +00617 <span class="keywordflow">break</span>; +00618 } +00619 <span class="keywordflow">if</span> (noiseTile==<a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>.size()) +00620 { +00621 <span class="comment">// Add a tile</span> +00622 <a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>.resize (noiseTile+1); +00623 } +00624 +00625 <span class="comment">// Set the file name</span> +00626 <a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>[noiseTile]._FileName=lower; +00627 +00628 <span class="keywordflow">return</span> noiseTile; +00629 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka8" doxytag="NL3D::CTileBank::getDisplacementMap" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const char * NL3D::CTileBank::getDisplacementMap </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>noiseMap</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00631">631</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00655">_DisplacementMap</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a06536.html#l01514">NL3D::CTileSet::setDisplacement()</a>. +<p> +<div class="fragment"><pre>00632 { +00633 <span class="keywordflow">return</span> <a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>[noiseMap]._FileName.c_str(); +00634 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka9" doxytag="NL3D::CTileBank::getDisplacementMapCount" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a15">uint</a> NL3D::CTileBank::getDisplacementMapCount </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00641">641</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00655">_DisplacementMap</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>00642 { +00643 <span class="keywordflow">return</span> <a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>.size(); +00644 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka10" doxytag="NL3D::CTileBank::getLand" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03526.html">CTileLand</a>* NL3D::CTileBank::getLand </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">int </td> + <td class="mdname1" valign="top" nowrap> <em>landIndex</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00512">512</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +References <a class="el" href="a06537.html#l00651">_LandVector</a>. +<p> +<div class="fragment"><pre>00513 { +00514 <span class="keywordflow">return</span> &<a class="code" href="a03517.html#NL3D_1_1CTileBankr2">_LandVector</a>[landIndex]; +00515 }; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka11" doxytag="NL3D::CTileBank::getLand" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const <a class="el" href="a03526.html">CTileLand</a>* NL3D::CTileBank::getLand </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">int </td> + <td class="mdname1" valign="top" nowrap> <em>landIndex</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00508">508</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +References <a class="el" href="a06537.html#l00651">_LandVector</a>. +<p> +<div class="fragment"><pre>00509 { +00510 <span class="keywordflow">return</span> &<a class="code" href="a03517.html#NL3D_1_1CTileBankr2">_LandVector</a>[landIndex]; +00511 }; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka12" doxytag="NL3D::CTileBank::getLandCount" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> NL3D::CTileBank::getLandCount </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00504">504</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +References <a class="el" href="a06537.html#l00651">_LandVector</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +<div class="fragment"><pre>00505 { +00506 <span class="keywordflow">return</span> <a class="code" href="a03517.html#NL3D_1_1CTileBankr2">_LandVector</a>.size(); +00507 }; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka13" doxytag="NL3D::CTileBank::getNumBitmap" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> NL3D::CTileBank::getNumBitmap </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03515.html#NL3D_1_1CTilew4">CTile::TBitmap</a> </td> + <td class="mdname1" valign="top" nowrap> <em>bitmap</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00268">268</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00653">_TileVector</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a05586.html#l00536">NLMISC::strlwr()</a>. +<p> +<div class="fragment"><pre>00269 { +00270 std::set<std::string> setString; +00271 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.size(); i++) +00272 { +00273 <span class="keywordflow">if</span> (!<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[i].isFree()) +00274 { +00275 <span class="keyword">const</span> std::string &str=<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[i].getRelativeFileName (bitmap); +00276 <span class="keywordflow">if</span> (str!=<span class="stringliteral">""</span>) +00277 { +00278 std::vector<char> vect (str.length()+1); +00279 memcpy (&*vect.begin(), str.c_str(), str.length()+1); +00280 <a class="code" href="a05378.html#a273">NLMISC::strlwr</a> (&*vect.begin()); +00281 setString.insert (std::string (&*vect.begin())); +00282 } +00283 } +00284 } +00285 <span class="keywordflow">return</span> setString.size(); +00286 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka14" doxytag="NL3D::CTileBank::getTile" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03515.html">CTile</a>* NL3D::CTileBank::getTile </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">int </td> + <td class="mdname1" valign="top" nowrap> <em>tileIndex</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00536">536</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +References <a class="el" href="a06537.html#l00653">_TileVector</a>. +<p> +<div class="fragment"><pre>00537 { +00538 <span class="keywordflow">return</span> &<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[tileIndex]; +00539 }; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka15" doxytag="NL3D::CTileBank::getTile" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const <a class="el" href="a03515.html">CTile</a>* NL3D::CTileBank::getTile </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">int </td> + <td class="mdname1" valign="top" nowrap> <em>tileIndex</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00532">532</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +References <a class="el" href="a06537.html#l00653">_TileVector</a>. +<p> +Referenced by <a class="el" href="a06536.html#l01399">NL3D::CTileSet::clearTile128()</a>, <a class="el" href="a06536.html#l01408">NL3D::CTileSet::clearTile256()</a>, <a class="el" href="a06536.html#l01417">NL3D::CTileSet::clearTransition()</a>, <a class="el" href="a06536.html#l01429">NL3D::CTileSet::deleteBordersIfLast()</a>, <a class="el" href="a05862.html#l01670">NL3D::CLandscape::loadTile()</a>, <a class="el" href="a06536.html#l01018">NL3D::CTileSet::setTile128()</a>, <a class="el" href="a06536.html#l01108">NL3D::CTileSet::setTile256()</a>, <a class="el" href="a06536.html#l01116">NL3D::CTileSet::setTileTransition()</a>, and <a class="el" href="a06536.html#l01130">NL3D::CTileSet::setTileTransitionAlpha()</a>. +<p> +<div class="fragment"><pre>00533 { +00534 <span class="keywordflow">return</span> &<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[tileIndex]; +00535 }; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka16" doxytag="NL3D::CTileBank::getTileCount" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> NL3D::CTileBank::getTileCount </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00528">528</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +References <a class="el" href="a06537.html#l00653">_TileVector</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +Referenced by <a class="el" href="a06758.html#l01667">NL3D::CPatchInfo::getTileSymmetryRotate()</a>, <a class="el" href="a05862.html#l02592">NL3D::CLandscape::initTileBanks()</a>, <a class="el" href="a05862.html#l01670">NL3D::CLandscape::loadTile()</a>, <a class="el" href="a06778.html#l00670">NL3D::CZoneSymmetrisation::propagateTileState()</a>, and <a class="el" href="a06758.html#l01708">NL3D::CPatchInfo::transformTile()</a>. +<p> +<div class="fragment"><pre>00529 { +00530 <span class="keywordflow">return</span> <a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.size(); +00531 }; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBankz994_0" doxytag="NL3D::CTileBank::getTileNoiseMap" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03532.html">CTileNoiseMap</a> * NL3D::CTileBank::getTileNoiseMap </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>tileNumber</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>tileSubNoise</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the tilenoisemap pointer for this tile and subnoise tile +<p> +Definition at line <a class="el" href="a06536.html#l00442">442</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00655">_DisplacementMap</a>, <a class="el" href="a06537.html#l00483">NL3D::CTileNoise::_FileName</a>, <a class="el" href="a06537.html#l00482">NL3D::CTileNoise::_TileNoiseMap</a>, <a class="el" href="a06537.html#l00652">_TileSetVector</a>, <a class="el" href="a06537.html#l00653">_TileVector</a>, <a class="el" href="a06537.html#l00654">_TileXRef</a>, <a class="el" href="a05486.html#l00926">NLMISC::CBitmap::convertToType()</a>, <a class="el" href="a06506.html#l00309">NL3D::ITexture::generate()</a>, <a class="el" href="a06537.html#l00619">getAbsPath()</a>, <a class="el" href="a05486.html#l01388">NLMISC::CBitmap::getHeight()</a>, <a class="el" href="a05487.html#l00308">NLMISC::CBitmap::getPixels()</a>, <a class="el" href="a05486.html#l01363">NLMISC::CBitmap::getWidth()</a>, <a class="el" href="a05487.html#l00472">NLMISC::CBitmap::loadGrayscaleAsAlpha()</a>, <a class="el" href="a06549.html#l00040">NL3D_TILE_NOISE_MAP_SIZE</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a06549.html#l00055">NL3D::CTileNoiseMap::Pixels</a>, <a class="el" href="a05981.html#l00095">sint8</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>. +<p> +Referenced by <a class="el" href="a06158.html#l00136">NL3D::CPatch::computeDisplaceRawInteger()</a>. +<p> +<div class="fragment"><pre>00443 { +00444 <span class="keywordflow">if</span> (<a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>.size() == 0) +00445 { +00446 <span class="comment">// it happens when serial a tile bank with version < 4</span> +00447 <span class="keywordflow">return</span> NULL; +00448 } +00449 +00450 <span class="comment">// Check tile number..</span> +00451 <span class="keywordflow">if</span> (tileNumber<<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.size()) +00452 { +00453 <span class="comment">// Get tileset number</span> +00454 <a class="code" href="a04558.html#a15">uint</a> tileSet=<a class="code" href="a03517.html#NL3D_1_1CTileBankr5">_TileXRef</a>[tileNumber]._XRefTileSet; +00455 +00456 <span class="comment">// Checks</span> +00457 <span class="keywordflow">if</span> (tileSet<<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.size()) +00458 { +00459 <a class="code" href="a04199.html#a6">nlassert</a> (tileSubNoise<CTileSet::CountDisplace); +00460 <span class="comment">//nlassert (_TileSetVector[tileSet]._DisplacementBitmap[tileSubNoise]<_DisplacementMap.size());</span> +00461 +00462 <span class="keywordflow">if</span> (<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>[tileSet]._DisplacementBitmap[tileSubNoise]>=<a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>.size()) +00463 <span class="keywordflow">return</span> NULL; +00464 +00465 <span class="comment">// Return the tile noise map</span> +00466 CTileNoise &tileNoise=<a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>[<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>[tileSet]._DisplacementBitmap[tileSubNoise]]; +00467 +00468 <span class="comment">// Not loaded ?</span> +00469 <span class="keywordflow">if</span> (tileNoise._TileNoiseMap==NULL) +00470 { +00471 <span class="comment">// Load a bitmap</span> +00472 CTextureFile texture (<a class="code" href="a03517.html#NL3D_1_1CTileBanka6">getAbsPath</a>()+tileNoise._FileName); +00473 texture.loadGrayscaleAsAlpha (<span class="keyword">false</span>); +00474 texture.generate (); +00475 texture.convertToType (CBitmap::Luminance); +00476 +00477 <span class="comment">// Alloc</span> +00478 tileNoise._TileNoiseMap=<span class="keyword">new</span> CTileNoiseMap; +00479 +00480 <span class="comment">// Good size ?</span> +00481 <span class="keywordflow">if</span> ((texture.getWidth ()==<a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>)&&(texture.getHeight()==<a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>)) +00482 { +00483 <span class="comment">// Copy</span> +00484 memcpy (tileNoise._TileNoiseMap->Pixels, &texture.getPixels()[0], <a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>*<a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>); +00485 +00486 <span class="comment">// Remap lumels</span> +00487 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i<<a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>*<a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>; i++) +00488 { +00489 tileNoise._TileNoiseMap->Pixels[i]=(<a class="code" href="a04558.html#a6">sint8</a>)((<a class="code" href="a04558.html#a7">uint8</a>)tileNoise._TileNoiseMap->Pixels[i]-128); +00490 <span class="keywordflow">if</span> (tileNoise._TileNoiseMap->Pixels[i]==-128) +00491 tileNoise._TileNoiseMap->Pixels[i]=-127; +00492 } +00493 } +00494 <span class="keywordflow">else</span> +00495 { +00496 <span class="comment">// This is not a normal behaviour.</span> +00497 string pathname= <a class="code" href="a03517.html#NL3D_1_1CTileBanka6">getAbsPath</a>()+tileNoise._FileName; +00498 <span class="keywordflow">if</span>( texture.getWidth ()==0 || texture.getHeight ()==0 ) +00499 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"TileNoiseMap not found: %s."</span>, pathname.c_str()); +00500 <span class="keywordflow">else</span> +00501 <a class="code" href="a04199.html#a2">nlwarning</a>(<span class="stringliteral">"Bad TileNoiseMap size: %s."</span>, pathname.c_str()); +00502 +00503 <span class="comment">// Not good size, copy a static map</span> +00504 <a class="code" href="a04558.html#a6">sint8</a> notGoodSizeForm[<a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>*<a class="code" href="a05126.html#a1">NL3D_TILE_NOISE_MAP_SIZE</a>]= +00505 { +00506 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00507 00, 99, 99, 99, 99, 99, 99, 99, 99, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00508 00, 99, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00509 00, 99, 00, 99, 99, 99, 99, 99, 99, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00510 00, 99, 00, 99, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00511 00, 99, 00, 99, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00512 00, 99, 00, 99, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00513 00, 99, 00, 99, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00514 00, 99, 00, 99, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00515 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00516 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00517 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00518 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00519 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00520 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00521 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00522 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00523 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00524 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00525 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00526 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00527 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00528 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, +00529 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 99, 00, 99, 00, +00530 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 99, 00, 99, 00, +00531 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 99, 00, 99, 00, +00532 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 99, 00, 99, 00, +00533 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 99, 00, 99, 00, +00534 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 99, 99, 99, 99, 99, 99, 00, 99, 00, +00535 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 99, 00, +00536 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 99, 99, 99, 99, 99, 99, 99, 99, 00, +00537 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 +00538 }; +00539 +00540 <span class="comment">// Copy</span> +00541 memcpy (tileNoise._TileNoiseMap->Pixels, notGoodSizeForm, NL3D_TILE_NOISE_MAP_SIZE*NL3D_TILE_NOISE_MAP_SIZE); +00542 } +00543 } +00544 +00545 <span class="comment">// Return the noise map</span> +00546 <span class="keywordflow">return</span> tileNoise._TileNoiseMap; +00547 } +00548 } +00549 +00550 <span class="keywordflow">if</span> (<a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>.size()==0 || <a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>[0]._TileNoiseMap) +00551 <span class="keywordflow">return</span> NULL; +00552 +00553 <span class="comment">// Checks</span> +00554 <a class="code" href="a04199.html#a6">nlassert</a> (_DisplacementMap[0]._TileNoiseMap); +00555 <span class="keywordflow">return</span> <a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>[0]._TileNoiseMap; +00556 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka17" doxytag="NL3D::CTileBank::getTileSet" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03534.html">CTileSet</a>* NL3D::CTileBank::getTileSet </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">int </td> + <td class="mdname1" valign="top" nowrap> <em>tileIndex</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00524">524</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +References <a class="el" href="a06537.html#l00652">_TileSetVector</a>. +<p> +<div class="fragment"><pre>00525 { +00526 <span class="keywordflow">return</span> &<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>[tileIndex]; +00527 }; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka18" doxytag="NL3D::CTileBank::getTileSet" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const <a class="el" href="a03534.html">CTileSet</a>* NL3D::CTileBank::getTileSet </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">int </td> + <td class="mdname1" valign="top" nowrap> <em>tileIndex</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00520">520</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +References <a class="el" href="a06537.html#l00652">_TileSetVector</a>. +<p> +Referenced by <a class="el" href="a06536.html#l00288">computeXRef()</a>, <a class="el" href="a05874.html#l00091">NL3D::CLandscapeUser::flushTiles()</a>, <a class="el" href="a06725.html#l00565">NL3D::CVisualCollisionEntity::getSurfaceInfo()</a>, <a class="el" href="a06758.html#l01667">NL3D::CPatchInfo::getTileSymmetryRotate()</a>, <a class="el" href="a05862.html#l02592">NL3D::CLandscape::initTileBanks()</a>, <a class="el" href="a06778.html#l00670">NL3D::CZoneSymmetrisation::propagateTileState()</a>, <a class="el" href="a06778.html#l00472">NL3D::CZoneSymmetrisation::setOrientedTileState()</a>, <a class="el" href="a06778.html#l00312">NL3D::CZoneSymmetrisation::setTileState()</a>, and <a class="el" href="a06758.html#l01708">NL3D::CPatchInfo::transformTile()</a>. +<p> +<div class="fragment"><pre>00521 { +00522 <span class="keywordflow">return</span> &<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>[tileIndex]; +00523 }; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka19" doxytag="NL3D::CTileBank::getTileSetCount" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a14">sint</a> NL3D::CTileBank::getTileSetCount </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00516">516</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +References <a class="el" href="a06537.html#l00652">_TileSetVector</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +Referenced by <a class="el" href="a05874.html#l00091">NL3D::CLandscapeUser::flushTiles()</a>, <a class="el" href="a06758.html#l01667">NL3D::CPatchInfo::getTileSymmetryRotate()</a>, <a class="el" href="a05862.html#l02592">NL3D::CLandscape::initTileBanks()</a>, <a class="el" href="a06778.html#l00670">NL3D::CZoneSymmetrisation::propagateTileState()</a>, <a class="el" href="a06778.html#l00472">NL3D::CZoneSymmetrisation::setOrientedTileState()</a>, and <a class="el" href="a06778.html#l00312">NL3D::CZoneSymmetrisation::setTileState()</a>. +<p> +<div class="fragment"><pre>00517 { +00518 <span class="keywordflow">return</span> <a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.size(); +00519 }; +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBankz994_1" doxytag="NL3D::CTileBank::getTileVegetableDesc" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const <a class="el" href="a03536.html">CTileVegetableDesc</a> & NL3D::CTileBank::getTileVegetableDesc </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>tileNumber</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return the TileVegetable desc for this tile +<p> +Definition at line <a class="el" href="a06536.html#l00648">648</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00652">_TileSetVector</a>, <a class="el" href="a06537.html#l00653">_TileVector</a>, <a class="el" href="a06537.html#l00654">_TileXRef</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05862.html#l03218">NL3D::CLandscape::getTileVegetableDesc()</a>. +<p> +<div class="fragment"><pre>00649 { +00650 <span class="comment">// Check tile number..</span> +00651 <span class="keywordflow">if</span> (tileNumber<<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.size()) +00652 { +00653 <span class="comment">// Get tileset number</span> +00654 <a class="code" href="a04558.html#a15">uint</a> tileSet=<a class="code" href="a03517.html#NL3D_1_1CTileBankr5">_TileXRef</a>[tileNumber]._XRefTileSet; +00655 +00656 <span class="comment">// Checks</span> +00657 <span class="keywordflow">if</span> (tileSet<<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.size()) +00658 { +00659 <span class="keywordflow">return</span> <a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>[tileSet].getTileVegetableDesc(); +00660 } +00661 +00662 } +00663 +00664 <span class="comment">// if fails for any reason, return an empty tileVegetableDesc;</span> +00665 <span class="keyword">static</span> CTileVegetableDesc emptyTvd; +00666 <span class="keywordflow">return</span> emptyTvd; +00667 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka20" doxytag="NL3D::CTileBank::getTileXRef" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::getTileXRef </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">int </td> + <td class="mdname" nowrap> <em>tile</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>int & </td> + <td class="mdname" nowrap> <em>tileSet</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>int & </td> + <td class="mdname" nowrap> <em>number</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a03517.html#NL3D_1_1CTileBankw3">TTileType</a> & </td> + <td class="mdname" nowrap> <em>type</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the xref for a tile.<p> +<dl compact><dt><b>Parameters:</b></dt><dd> + <table border="0" cellspacing="2" cellpadding="0"> + <tr><td valign=top><em>tile</em> </td><td>is the tile number. </td></tr> + <tr><td valign=top><em>tileSet</em> </td><td>will receive the tile set number in which the tile is. -1 if the tile is not used. </td></tr> + <tr><td valign=top><em>number</em> </td><td>will receive the number of the tile in the tileset. </td></tr> + <tr><td valign=top><em>type</em> </td><td>is the type of tile.</td></tr> + </table> +</dl> + +<p> +Definition at line <a class="el" href="a06537.html#l00560">560</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +References <a class="el" href="a06537.html#l00654">_TileXRef</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a05646.html#l00244">type</a>. +<p> +Referenced by <a class="el" href="a06725.html#l00565">NL3D::CVisualCollisionEntity::getSurfaceInfo()</a>, <a class="el" href="a06758.html#l01667">NL3D::CPatchInfo::getTileSymmetryRotate()</a>, <a class="el" href="a06778.html#l00670">NL3D::CZoneSymmetrisation::propagateTileState()</a>, <a class="el" href="a06778.html#l00472">NL3D::CZoneSymmetrisation::setOrientedTileState()</a>, <a class="el" href="a06778.html#l00312">NL3D::CZoneSymmetrisation::setTileState()</a>, and <a class="el" href="a06758.html#l01708">NL3D::CPatchInfo::transformTile()</a>. +<p> +<div class="fragment"><pre>00561 { +00562 <a class="code" href="a04199.html#a6">nlassert</a> (tile>=0); +00563 <a class="code" href="a04199.html#a6">nlassert</a> (tile<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03517.html#NL3D_1_1CTileBankr5">_TileXRef</a>.size()); +00564 tileSet=<a class="code" href="a03517.html#NL3D_1_1CTileBankr5">_TileXRef</a>[tile]._XRefTileSet; +00565 number=_TileXRef[tile]._XRefTileNumber; +00566 <a class="code" href="a04223.html#a581">type</a>=_TileXRef[tile]._XRefTileType; +00567 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBankz994_2" doxytag="NL3D::CTileBank::initTileVegetableDescs" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::initTileVegetableDescs </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a03680.html">CVegetableManager</a> * </td> + <td class="mdname1" valign="top" nowrap> <em>vegetableManager</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +register all <a class="el" href="a03671.html">CVegetable</a> to the Manager. called by <a class="el" href="a02702.html#NL3D_1_1CLandscapez235_6">CLandscape::initTileBanks()</a> +<p> +Definition at line <a class="el" href="a06536.html#l00685">685</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00652">_TileSetVector</a>, <a class="el" href="a06550.html#l00084">NL3D::CTileVegetableDesc::registerToManager()</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05862.html#l03120">NL3D::CLandscape::enableVegetable()</a>, and <a class="el" href="a05862.html#l02592">NL3D::CLandscape::initTileBanks()</a>. +<p> +<div class="fragment"><pre>00686 { +00687 <span class="comment">// For all tileSets.</span> +00688 <a class="code" href="a04558.html#a15">uint</a> tileSet; +00689 +00690 <span class="keywordflow">for</span>(tileSet=0; tileSet<<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.size(); tileSet++) +00691 { +00692 CTileVegetableDesc &tvd= <a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>[tileSet].getTileVegetableDesc(); +00693 tvd.registerToManager(vegetableManager); +00694 } +00695 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBankz994_3" doxytag="NL3D::CTileBank::loadTileVegetableDescs" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::loadTileVegetableDescs </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +you should call this method, after serialising the TileBank, and before <a class="el" href="a02702.html#NL3D_1_1CLandscapez235_6">CLandscape::initTileBanks()</a> You must call <a class="el" href="a02702.html#NL3D_1_1CLandscapez235_6">CLandscape::initTileBanks()</a> after calling this method for each tileSet call <a class="el" href="a03534.html#NL3D_1_1CTileSeta28">CTileSet::loadTileVegetableDesc()</a> +<p> +Definition at line <a class="el" href="a06536.html#l00671">671</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00652">_TileSetVector</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05874.html#l00091">NL3D::CLandscapeUser::flushTiles()</a>. +<p> +<div class="fragment"><pre>00672 { +00673 <span class="comment">// For all tileSets.</span> +00674 <a class="code" href="a04558.html#a15">uint</a> tileSet; +00675 +00676 <span class="keywordflow">for</span>(tileSet=0; tileSet<<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.size(); tileSet++) +00677 { +00678 <span class="comment">// load their fileName</span> +00679 <a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>[tileSet].loadTileVegetableDesc(); +00680 } +00681 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka21" doxytag="NL3D::CTileBank::makeAllExtensionDDS" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::makeAllExtensionDDS </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +This method change ".tga" of texture filename, to ".dds". Do this only for Additive and Diffuse part (not alpha). +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00390">390</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00653">_TileVector</a>, <a class="el" href="a05981.html#l00104">sint</a>, and <a class="el" href="a05981.html#l00100">uint32</a>. +<p> +Referenced by <a class="el" href="a05874.html#l00064">NL3D::CLandscapeUser::loadBankFiles()</a>. +<p> +<div class="fragment"><pre>00391 { +00392 <span class="comment">// For all tiles</span> +00393 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a14">sint</a> nTile=0; nTile<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.size(); nTile++) +00394 { +00395 string tmp; +00396 <a class="code" href="a04558.html#a11">uint32</a> pos; +00397 +00398 <span class="comment">// Diffuse</span> +00399 tmp= <a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[nTile].getRelativeFileName (CTile::diffuse); +00400 pos= tmp.rfind(<span class="stringliteral">".tga"</span>); +00401 <span class="keywordflow">if</span>(pos!= string::npos) +00402 { +00403 tmp.replace(pos, 4, <span class="stringliteral">".dds"</span>); +00404 _TileVector[nTile].setFileName (CTile::diffuse, tmp); +00405 } +00406 +00407 <span class="comment">// Additive.</span> +00408 tmp= _TileVector[nTile].getRelativeFileName (CTile::additive); +00409 pos= tmp.rfind(<span class="stringliteral">".tga"</span>); +00410 <span class="keywordflow">if</span>(pos!= string::npos) +00411 { +00412 tmp.replace(pos, 4, <span class="stringliteral">".dds"</span>); +00413 _TileVector[nTile].setFileName (CTile::additive, tmp); +00414 } +00415 +00416 <span class="comment">// Alpha.</span> +00417 tmp= _TileVector[nTile].getRelativeFileName (CTile::alpha); +00418 pos= tmp.rfind(<span class="stringliteral">".tga"</span>); +00419 <span class="keywordflow">if</span>(pos!= string::npos) +00420 { +00421 tmp.replace(pos, 4, <span class="stringliteral">".dds"</span>); +00422 _TileVector[nTile].setFileName (CTile::alpha, tmp); +00423 } +00424 +00425 } +00426 +00427 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka22" doxytag="NL3D::CTileBank::makeAllPathRelative" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::makeAllPathRelative </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00355">355</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00655">_DisplacementMap</a>, <a class="el" href="a06537.html#l00653">_TileVector</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a06536.html#l00338">NL3D::TroncFileName()</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05874.html#l00064">NL3D::CLandscapeUser::loadBankFiles()</a>. +<p> +<div class="fragment"><pre>00356 { +00357 <span class="comment">// For all tiles</span> +00358 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a14">sint</a> nTile=0; nTile<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.size(); nTile++) +00359 { +00360 <span class="comment">// Tronc filename</span> +00361 <span class="keywordtype">char</span> sTmpFileName[512]; +00362 +00363 <span class="comment">// Diffuse</span> +00364 <a class="code" href="a05363.html#a538">TroncFileName</a> (sTmpFileName, _TileVector[nTile].getRelativeFileName (CTile::diffuse).c_str()); +00365 <a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[nTile].setFileName (CTile::diffuse, sTmpFileName); +00366 +00367 <span class="comment">// Additive</span> +00368 <a class="code" href="a05363.html#a538">TroncFileName</a> (sTmpFileName, _TileVector[nTile].getRelativeFileName (CTile::additive).c_str()); +00369 <a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[nTile].setFileName (CTile::additive, sTmpFileName); +00370 +00371 <span class="comment">// Alpha</span> +00372 <a class="code" href="a05363.html#a538">TroncFileName</a> (sTmpFileName, _TileVector[nTile].getRelativeFileName (CTile::alpha).c_str()); +00373 <a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[nTile].setFileName (CTile::alpha, sTmpFileName); +00374 } +00375 +00376 <span class="comment">// For all displaces</span> +00377 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i<<a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>.size(); i++) +00378 { +00379 <span class="comment">// Tronc filename</span> +00380 <span class="keywordtype">char</span> sTmpFileName[512]; +00381 +00382 <a class="code" href="a05363.html#a538">TroncFileName</a> (sTmpFileName, _DisplacementMap[i]._FileName.c_str()); +00383 <a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>[i]._FileName = sTmpFileName; +00384 } +00385 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka23" doxytag="NL3D::CTileBank::postfixTileFilename" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::postfixTileFilename </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname1" valign="top" nowrap> <em>filename</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Postfix tile filename. +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00699">699</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00653">_TileVector</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05874.html#l00533">NL3D::CLandscapeUser::postfixTileFilename()</a>. +<p> +<div class="fragment"><pre>00700 { +00701 <span class="comment">// For each tiles</span> +00702 <a class="code" href="a04558.html#a15">uint</a> tile; +00703 <span class="keywordflow">for</span> (tile=0; tile<<a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>.size (); tile++) +00704 { +00705 <span class="comment">// For each bitmap</span> +00706 <a class="code" href="a04558.html#a15">uint</a> bitmap; +00707 <span class="keywordflow">for</span> (bitmap=0; bitmap<CTile::bitmapCount; bitmap++) +00708 { +00709 string &<a class="code" href="a05377.html#a2">filename</a> = <a class="code" href="a03517.html#NL3D_1_1CTileBankr4">_TileVector</a>[tile]._BitmapName[bitmap]; +00710 <span class="keywordflow">if</span> (!<a class="code" href="a05377.html#a2">filename</a>.empty()) +00711 { +00712 string ext = CFile::getExtension(filename); +00713 string name = CFile::getFilenameWithoutExtension(filename); +00714 <a class="code" href="a05377.html#a2">filename</a> = CFile::getPath (filename); +00715 <a class="code" href="a05377.html#a2">filename</a> += name; +00716 <a class="code" href="a05377.html#a2">filename</a> += postfix; +00717 <a class="code" href="a05377.html#a2">filename</a> += <span class="stringliteral">"."</span>; +00718 <a class="code" href="a05377.html#a2">filename</a> += ext; +00719 } +00720 } +00721 } +00722 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka24" doxytag="NL3D::CTileBank::postfixTileVegetableDesc" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::postfixTileVegetableDesc </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const char * </td> + <td class="mdname1" valign="top" nowrap> <em>filename</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Postfix tile vegetable desc. +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00726">726</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00652">_TileSetVector</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05874.html#l00540">NL3D::CLandscapeUser::postfixTileVegetableDesc()</a>. +<p> +<div class="fragment"><pre>00727 { +00728 <span class="comment">// For each tiles</span> +00729 <a class="code" href="a04558.html#a15">uint</a> tileSet; +00730 <span class="keywordflow">for</span> (tileSet=0; tileSet<<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.size (); tileSet++) +00731 { +00732 string &<a class="code" href="a05377.html#a2">filename</a> = <a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>[tileSet]._TileVegetableDescFileName; +00733 <span class="keywordflow">if</span> (!<a class="code" href="a05377.html#a2">filename</a>.empty()) +00734 { +00735 string ext = CFile::getExtension(filename); +00736 string name = CFile::getFilenameWithoutExtension(filename); +00737 <a class="code" href="a05377.html#a2">filename</a> = CFile::getPath (filename); +00738 <a class="code" href="a05377.html#a2">filename</a> += name; +00739 <a class="code" href="a05377.html#a2">filename</a> += postfix; +00740 <a class="code" href="a05377.html#a2">filename</a> += <span class="stringliteral">"."</span>; +00741 <a class="code" href="a05377.html#a2">filename</a> += ext; +00742 } +00743 } +00744 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka25" doxytag="NL3D::CTileBank::removeDisplacementMap" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::removeDisplacementMap </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>mapId</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00558">558</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00655">_DisplacementMap</a>, <a class="el" href="a06537.html#l00652">_TileSetVector</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a06536.html#l01498">NL3D::CTileSet::clearDisplacement()</a>, and <a class="el" href="a06536.html#l01514">NL3D::CTileSet::setDisplacement()</a>. +<p> +<div class="fragment"><pre>00559 { +00560 <span class="comment">// Checks</span> +00561 <a class="code" href="a04199.html#a6">nlassert</a> (mapId<<a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>.size()); +00562 +00563 <span class="keywordflow">if</span> (mapId!=0) +00564 { +00565 <span class="comment">// Check if another tileSet uses it</span> +00566 <a class="code" href="a04558.html#a15">uint</a> tileSet; +00567 <span class="keywordflow">for</span> (tileSet=0; tileSet<<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.size(); tileSet++) +00568 { +00569 <span class="comment">// It uses it ?</span> +00570 <a class="code" href="a04558.html#a15">uint</a> tile; +00571 <span class="keywordflow">for</span> (tile=0; tile<CTileSet::CountDisplace; tile++) +00572 { +00573 <span class="comment">// The same ?</span> +00574 <span class="keywordflow">if</span> (<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>[tileSet]._DisplacementBitmap[tile]==mapId) +00575 <span class="comment">// Stop</span> +00576 <span class="keywordflow">break</span>; +00577 } +00578 <span class="keywordflow">if</span> (tile!=CTileSet::CountDisplace) +00579 <span class="keywordflow">break</span>; +00580 } +00581 <span class="keywordflow">if</span> (tileSet==<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.size()) +00582 { +00583 <span class="comment">// Remove it</span> +00584 <a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>[mapId].reset(); +00585 +00586 <span class="comment">// Last element ?</span> +00587 <span class="keywordflow">if</span> (mapId==<a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>.size()-1) +00588 { +00589 <span class="comment">// Resize the array ?</span> +00590 <span class="keywordflow">while</span> ((mapId>0)&&(<a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>[mapId]._FileName==<span class="stringliteral">""</span>)) +00591 <a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>.resize (mapId--); +00592 } +00593 } +00594 } +00595 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka26" doxytag="NL3D::CTileBank::removeLand" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::removeLand </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>landIndex</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00180">180</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00651">_LandVector</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +<div class="fragment"><pre>00181 { +00182 <span class="comment">// Check args</span> +00183 <a class="code" href="a04199.html#a6">nlassert</a> (landIndex>=0); +00184 <a class="code" href="a04199.html#a6">nlassert</a> (landIndex<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03517.html#NL3D_1_1CTileBankr2">_LandVector</a>.size()); +00185 +00186 <a class="code" href="a03517.html#NL3D_1_1CTileBankr2">_LandVector</a>.erase (<a class="code" href="a03517.html#NL3D_1_1CTileBankr2">_LandVector</a>.begin ()+landIndex); +00187 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka27" doxytag="NL3D::CTileBank::removeTileSet" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::removeTileSet </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a> </td> + <td class="mdname1" valign="top" nowrap> <em>landIndex</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00201">201</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00652">_TileSetVector</a>, <a class="el" href="a06536.html#l00248">freeTile()</a>, <a class="el" href="a05646.html#l00225">index</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +<div class="fragment"><pre>00202 { +00203 <span class="comment">// Check args</span> +00204 <a class="code" href="a04199.html#a6">nlassert</a> (setIndex>=0); +00205 <a class="code" href="a04199.html#a6">nlassert</a> (setIndex<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.size()); +00206 +00207 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i<CTileSet::count; i++) +00208 { +00209 <span class="keywordtype">int</span> <a class="code" href="a04223.html#a566">index</a>=<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>[setIndex]._TileTransition[i]._Tile; +00210 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a566">index</a>!=-1) +00211 <a class="code" href="a03517.html#NL3D_1_1CTileBankd1">freeTile</a> (index); +00212 } +00213 <a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.erase (<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.begin ()+setIndex); +00214 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka28" doxytag="NL3D::CTileBank::serial" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::serial </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">class <a class="el" href="a02270.html">NLMISC::IStream</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>f</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> throw (<a class="el" href="a03781.html">NLMISC::EStream</a>)</td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00099">99</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05646.html#l00244">type</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +Referenced by <a class="el" href="a05874.html#l00064">NL3D::CLandscapeUser::loadBankFiles()</a>. +<p> +<div class="fragment"><pre>00100 { +00101 f.serialCheck (std::string (<span class="stringliteral">"BANK"</span>)); +00102 +00103 <a class="code" href="a04558.html#a14">sint</a> streamver = f.serialVersion(_Version); +00104 +00105 <span class="comment">// Version 1 not compatible</span> +00106 <span class="keywordflow">if</span> (f.isReading()) +00107 { +00108 <span class="keywordflow">if</span> (streamver<2) +00109 <span class="keywordflow">throw</span> <a class="code" href="a03798.html">EOlderStream</a>(f); +00110 } +00111 +00112 <span class="keywordflow">switch</span> (streamver) +00113 { +00114 <span class="keywordflow">case</span> 4: +00115 <span class="comment">// Displacement map array</span> +00116 f.serialCont (_DisplacementMap); +00117 <span class="keywordflow">if</span> (f.isReading()) +00118 { +00119 <span class="comment">// Checks</span> +00120 <a class="code" href="a04199.html#a6">nlassert</a> (<a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>.size()>0); +00121 +00122 <span class="comment">// Set first empty</span> +00123 <a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>[0].setEmpty (); +00124 } +00125 <span class="keywordflow">case</span> 3: +00126 <span class="comment">// Absolute path</span> +00127 f.serial (_AbsPath); +00128 <span class="keywordflow">case</span> 2: +00129 <span class="comment">// Serial all containers</span> +00130 f.serialCont (_LandVector); +00131 f.serialCont (_TileSetVector); +00132 f.serialCont (_TileVector); +00133 } +00134 +00135 <span class="comment">// Compute XRef in read mode</span> +00136 <span class="keywordflow">if</span> (f.isReading()) +00137 <a class="code" href="a03517.html#NL3D_1_1CTileBanka4">computeXRef</a> (); +00138 +00139 <span class="comment">// If Version<=2, remove diffuse and alpha tiles in transitions</span> +00140 <span class="keywordflow">if</span> (streamver<=2) +00141 { +00142 <span class="comment">// Must be reading</span> +00143 <a class="code" href="a04199.html#a6">nlassert</a> (f.isReading()); +00144 +00145 <span class="comment">// Reset _AbsPath</span> +00146 <a class="code" href="a03517.html#NL3D_1_1CTileBankr0">_AbsPath</a>=<span class="stringliteral">""</span>; +00147 +00148 <span class="comment">// Remove diffuse and additive in transition</span> +00149 <a class="code" href="a04558.html#a15">uint</a> tileCount=(<a class="code" href="a04558.html#a15">uint</a>)<a class="code" href="a03517.html#NL3D_1_1CTileBanka16">getTileCount</a> (); +00150 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i<tileCount; i++) +00151 { +00152 <span class="keywordtype">int</span> tileSet; +00153 <span class="keywordtype">int</span> number; +00154 <a class="code" href="a03517.html#NL3D_1_1CTileBankw3">TTileType</a> <a class="code" href="a04223.html#a581">type</a>; +00155 +00156 <span class="comment">// Get xref</span> +00157 <a class="code" href="a03517.html#NL3D_1_1CTileBanka20">getTileXRef</a> (i, tileSet, number, type); +00158 +00159 <span class="comment">// Transition ?</span> +00160 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a581">type</a>==<a class="code" href="a03517.html#NL3D_1_1CTileBankw3NL3D_1_1CTileBankw2">transition</a>) +00161 { +00162 <span class="comment">// Remove diffuse bitmap</span> +00163 <a class="code" href="a03517.html#NL3D_1_1CTileBanka18">getTileSet</a>(tileSet)->clearTransition ((CTileSet::TTransition)number, CTile::diffuse, *<span class="keyword">this</span>); +00164 +00165 <span class="comment">// Remove alpha bitmap</span> +00166 <a class="code" href="a03517.html#NL3D_1_1CTileBanka18">getTileSet</a>(tileSet)->clearTransition ((CTileSet::TTransition)number, CTile::alpha, *<span class="keyword">this</span>); +00167 } +00168 } +00169 } +00170 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka29" doxytag="NL3D::CTileBank::setAbsPath" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::setAbsPath </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const std::string & </td> + <td class="mdname1" valign="top" nowrap> <em>newPath</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00615">615</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +References <a class="el" href="a06537.html#l00656">_AbsPath</a>. +<p> +Referenced by <a class="el" href="a05874.html#l00064">NL3D::CLandscapeUser::loadBankFiles()</a>. +<p> +<div class="fragment"><pre>00616 { +00617 <a class="code" href="a03517.html#NL3D_1_1CTileBankr0">_AbsPath</a>=newPath; +00618 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka30" doxytag="NL3D::CTileBank::setDisplacementMap" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::setDisplacementMap </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a15">uint</a> </td> + <td class="mdname" nowrap> <em>noiseMap</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const char * </td> + <td class="mdname" nowrap> <em>newName</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00636">636</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00655">_DisplacementMap</a>, and <a class="el" href="a05981.html#l00105">uint</a>. +<p> +<div class="fragment"><pre>00637 { +00638 <a class="code" href="a03517.html#NL3D_1_1CTileBankr1">_DisplacementMap</a>[noiseMap]._FileName=newName; +00639 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBanka31" doxytag="NL3D::CTileBank::xchgTileset" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> void NL3D::CTileBank::xchgTileset </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a14">sint</a> </td> + <td class="mdname" nowrap> <em>first</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap><a class="el" href="a04558.html#a14">sint</a> </td> + <td class="mdname" nowrap> <em>second</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00326">326</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. +<p> +References <a class="el" href="a06537.html#l00652">_TileSetVector</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00104">sint</a>. +<p> +<div class="fragment"><pre>00327 { +00328 <span class="comment">// Some check</span> +00329 <a class="code" href="a04199.html#a6">nlassert</a> ((firstTileSet>=0)&&(firstTileSet<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.size())); +00330 <a class="code" href="a04199.html#a6">nlassert</a> ((secondTileSet>=0)&&(secondTileSet<(<a class="code" href="a04558.html#a14">sint</a>)<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>.size())); +00331 +00332 <span class="comment">// Xchange the sets</span> +00333 <a class="code" href="a03517.html#NL3D_1_1CTileBankn0">CTileSet</a> tmp=<a class="code" href="a03517.html#NL3D_1_1CTileBankr3">_TileSetVector</a>[firstTileSet]; +00334 _TileSetVector[firstTileSet]=_TileSetVector[secondTileSet]; +00335 _TileSetVector[secondTileSet]=tmp; +00336 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Friends And Related Function Documentation</h2> +<a class="anchor" name="NL3D_1_1CTileBankn0" doxytag="NL3D::CTileBank::CTileSet" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> friend class <a class="el" href="a03534.html">CTileSet</a><code> [friend]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00496">496</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +Referenced by <a class="el" href="a06536.html#l00189">addTileSet()</a>. </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NL3D_1_1CTileBankr0" doxytag="NL3D::CTileBank::_AbsPath" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::string <a class="el" href="a03517.html#NL3D_1_1CTileBankr0">NL3D::CTileBank::_AbsPath</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00656">656</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +Referenced by <a class="el" href="a06536.html#l00216">clear()</a>, <a class="el" href="a06537.html#l00619">getAbsPath()</a>, and <a class="el" href="a06537.html#l00615">setAbsPath()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBankr1" doxytag="NL3D::CTileBank::_DisplacementMap" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::vector<<a class="el" href="a03531.html">CTileNoise</a>> <a class="el" href="a03517.html#NL3D_1_1CTileBankr1">NL3D::CTileBank::_DisplacementMap</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00655">655</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +Referenced by <a class="el" href="a06536.html#l00216">clear()</a>, <a class="el" href="a06536.html#l00090">CTileBank()</a>, <a class="el" href="a06536.html#l00597">getDisplacementMap()</a>, <a class="el" href="a06536.html#l00641">getDisplacementMapCount()</a>, <a class="el" href="a06536.html#l00442">getTileNoiseMap()</a>, <a class="el" href="a06536.html#l00355">makeAllPathRelative()</a>, <a class="el" href="a06536.html#l00558">removeDisplacementMap()</a>, and <a class="el" href="a06536.html#l00636">setDisplacementMap()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBankr2" doxytag="NL3D::CTileBank::_LandVector" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::vector<<a class="el" href="a03526.html">CTileLand</a>> <a class="el" href="a03517.html#NL3D_1_1CTileBankr2">NL3D::CTileBank::_LandVector</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00651">651</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +Referenced by <a class="el" href="a06536.html#l00172">addLand()</a>, <a class="el" href="a06536.html#l00429">cleanUnusedData()</a>, <a class="el" href="a06536.html#l00216">clear()</a>, <a class="el" href="a06537.html#l00508">getLand()</a>, <a class="el" href="a06537.html#l00504">getLandCount()</a>, and <a class="el" href="a06536.html#l00180">removeLand()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBankr3" doxytag="NL3D::CTileBank::_TileSetVector" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::vector<<a class="el" href="a03534.html">CTileSet</a>> <a class="el" href="a03517.html#NL3D_1_1CTileBankr3">NL3D::CTileBank::_TileSetVector</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00652">652</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +Referenced by <a class="el" href="a06536.html#l00189">addTileSet()</a>, <a class="el" href="a06536.html#l00429">cleanUnusedData()</a>, <a class="el" href="a06536.html#l00216">clear()</a>, <a class="el" href="a06536.html#l00288">computeXRef()</a>, <a class="el" href="a06536.html#l00442">getTileNoiseMap()</a>, <a class="el" href="a06537.html#l00520">getTileSet()</a>, <a class="el" href="a06537.html#l00516">getTileSetCount()</a>, <a class="el" href="a06536.html#l00648">getTileVegetableDesc()</a>, <a class="el" href="a06536.html#l00685">initTileVegetableDescs()</a>, <a class="el" href="a06536.html#l00671">loadTileVegetableDescs()</a>, <a class="el" href="a06536.html#l00726">postfixTileVegetableDesc()</a>, <a class="el" href="a06536.html#l00558">removeDisplacementMap()</a>, <a class="el" href="a06536.html#l00201">removeTileSet()</a>, and <a class="el" href="a06536.html#l00326">xchgTileset()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBankr4" doxytag="NL3D::CTileBank::_TileVector" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::vector<<a class="el" href="a03515.html">CTile</a>> <a class="el" href="a03517.html#NL3D_1_1CTileBankr4">NL3D::CTileBank::_TileVector</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00653">653</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +Referenced by <a class="el" href="a06536.html#l00216">clear()</a>, <a class="el" href="a06536.html#l00288">computeXRef()</a>, <a class="el" href="a06536.html#l00226">createTile()</a>, <a class="el" href="a06536.html#l00248">freeTile()</a>, <a class="el" href="a06536.html#l00268">getNumBitmap()</a>, <a class="el" href="a06537.html#l00532">getTile()</a>, <a class="el" href="a06537.html#l00528">getTileCount()</a>, <a class="el" href="a06536.html#l00442">getTileNoiseMap()</a>, <a class="el" href="a06536.html#l00648">getTileVegetableDesc()</a>, <a class="el" href="a06536.html#l00390">makeAllExtensionDDS()</a>, <a class="el" href="a06536.html#l00355">makeAllPathRelative()</a>, and <a class="el" href="a06536.html#l00699">postfixTileFilename()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBankr5" doxytag="NL3D::CTileBank::_TileXRef" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> std::vector<<a class="el" href="a03518.html">CTileXRef</a>> <a class="el" href="a03517.html#NL3D_1_1CTileBankr5">NL3D::CTileBank::_TileXRef</a><code> [private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06537.html#l00654">654</a> of file <a class="el" href="a06537.html">tile_bank.h</a>. +<p> +Referenced by <a class="el" href="a06536.html#l00216">clear()</a>, <a class="el" href="a06536.html#l00288">computeXRef()</a>, <a class="el" href="a06536.html#l00442">getTileNoiseMap()</a>, <a class="el" href="a06536.html#l00648">getTileVegetableDesc()</a>, and <a class="el" href="a06537.html#l00560">getTileXRef()</a>. </td> + </tr> +</table> +<a class="anchor" name="NL3D_1_1CTileBankv0" doxytag="NL3D::CTileBank::_Version" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" nowrap valign="top"> const <a class="el" href="a04558.html#a14">sint</a> <a class="el" href="a03517.html#NL3D_1_1CTileBankv0">NL3D::CTileBank::_Version</a> = 4<code> [static, private]</code> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06536.html#l00088">88</a> of file <a class="el" href="a06536.html">tile_bank.cpp</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following files:<ul> +<li><a class="el" href="a06537.html">tile_bank.h</a><li><a class="el" href="a06536.html">tile_bank.cpp</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 08:04:08 2004 for NeL by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border=0 > +</a>1.3.6 </small></address> +</body> +</html> |