Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
OTCFileFormat.h
Go to the documentation of this file.
1/*
2 This source file is part of Rigs of Rods
3 Copyright 2016-2020 Petr Ohlidal
4
5 For more information, see http://www.rigsofrods.org/
6
7 Rigs of Rods is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 3, as
9 published by the Free Software Foundation.
10
11 Rigs of Rods is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
24
25#include <OgreColourValue.h>
26#include <OgreDataStream.h>
27#include <OgreVector3.h>
28
29#include <string>
30#include <list>
31#include <memory>
32
33namespace RoR {
34
36{
37 OTCLayer();
38
39 std::string blendmap_filename;
43 float alpha;
45};
46
47struct OTCPage
48{
49 OTCPage(int pos_x, int pos_z, std::string const & conf_filename, bool flipX, bool flipY, int rawsize, int rawbpp);
50
51 std::string pageconf_filename;
52 std::string heightmap_filename;
57
58 std::list<OTCLayer> layers;
59};
60
92
94{
95public:
96 OTCParser();
97
98 bool LoadMasterConfig(Ogre::DataStreamPtr &ds, const char* filename);
99 bool LoadPageConfig(Ogre::DataStreamPtr &ds, OTCPage& page, const char* filename);
101
102private:
103
105};
106
107} // namespace RoR
OTCDocumentPtr m_def
OTCDocumentPtr GetDefinition()
bool LoadMasterConfig(Ogre::DataStreamPtr &ds, const char *filename)
bool LoadPageConfig(Ogre::DataStreamPtr &ds, OTCPage &page, const char *filename)
std::shared_ptr< OTCDocument > OTCDocumentPtr
Rembember OGRE coordinates are {X = right/left, Y = up/down, Z = front/back}.
Ogre::Vector3 origin_pos
std::string cache_filename_base
int pages_max_z
Highest page index.
std::list< OTCPage > pages
std::string page_filename_format
std::string normalheight_filename
std::string diffusespecular_filename
std::string blendmap_filename
std::list< OTCLayer > layers
bool is_heightmap_raw
std::string pageconf_filename
std::string heightmap_filename