Linux multi-monitor fullscreen support
[ryzomcore.git] / nel / src / pacs / retrievable_surface.cpp
blob3080340836fae6e1de18d4d10468971bc339e9ae
1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #include "stdpacs.h"
19 #include "nel/pacs/retrievable_surface.h"
21 using namespace std;
22 using namespace NLMISC;
25 float NLPACS::Models[NumCreatureModels][NumModelCharacteristics] =
27 { 0.5f, 1.0f, -1.0f },
28 { 0.8f, 2.0f, -0.5f },
29 { 2.0f, 4.0f, +0.5f },
30 { 4.0f, 8.0f, +0.707f }
34 float NLPACS::Models[NumMaxCreatureModels][NumModelCharacteristics] =
36 { 0.5f, 1.0f, -1.0f },
37 { 4.0f, 8.0f, +0.5f },
38 { 0.0f, 0.0f, -1.0f },
39 { 0.0f, 0.0f, -1.0f },
42 void NLPACS::CRetrievableSurface::serial(NLMISC::IStream &f)
45 Version 0:
46 - base version.
47 Version 1:
48 - absolute water height and flag
49 Version 2:
50 - no more topologies in stream (obsolete)
51 - no more height quad
52 - quantized height (_QuantHeight)
54 sint ver= f.serialVersion(2);
56 if (ver < 2)
57 throw EOlderStream();
59 uint i;
60 f.serial(_NormalQuanta);
61 f.serial(_OrientationQuanta);
62 f.serial(_Material);
63 f.serial(_Character);
64 f.serial(_Level);
65 f.serialCont(_Chains);
66 f.serialCont(_Loops);
67 if (ver <= 1)
69 f.serial(_Quad);
70 for (i=0; i<NumMaxCreatureModels; ++i)
71 f.serial(_Topologies[i]);
73 f.serial(_Center);
74 f.serial(_IsFloor, _IsCeiling);
75 f.serial(_Flags);
77 if (ver >= 1)
79 f.serial(_WaterHeight);
82 if (ver >= 2)
84 f.serial(_QuantHeight);
88 void NLPACS::CRetrievableSurface::TLoop::serial(NLMISC::IStream &f)
90 f.serialCont(*this);
91 f.serial(Length);