18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 21:07:06 +01:00
Files
maszyna/model/materialdata.h
T
Hirek b82784be92 refactor(vehicle): AnimModel.h, Sweep.h and Camera.h no longer include DynObj.h
The scenery models (AnimModel.h), the sweeps (Sweep.h) and the camera
(Camera.h, which Globals.h includes) pulled in the whole vehicle header, for
one structure (material_data) and a pointer type.

- model/materialdata.h/.cpp: material_data and TextureTest(), moved from
  DynObj.h/.cpp as they were
- Camera.h names TDynamicObject through utilities/Classes.h
- Classes.h includes interfaces/ITexture.h for null_handle, the value of the
  handles it defines; AnimModel.h includes utilities/Names.h for basic_table
  itself. Both came through DynObj.h before.
- the files that use the vehicles include vehicle/DynObj.h themselves

164 of the 730 objects of the build depend on DynObj.h now, 304 before.

No change in behaviour: 1142/1142 tests, golden traces exact against staging
62f7a29b.
2026-11-27 19:46:26 +01:00

31 lines
1.1 KiB
C++

/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/
// the replaceable skins of a model: the textures a vehicle or a scenery model puts in place of the replaceable ones
#pragma once
#include <string>
#include "interfaces/IMaterial.h"
#include "utilities/Classes.h"
struct material_data {
int textures_alpha{ 0x30300030 }; // maska przezroczystości tekstur. default: tekstury wymienne nie mają przezroczystości
material_handle replacable_skins[ 5 ] = { null_handle, null_handle, null_handle, null_handle, null_handle }; // McZapkie:zmienialne nadwozie
int multi_textures{ 0 }; //<0 tekstury wskazane wpisem, >0 tekstury z przecinkami, =0 jedna
// assigns specified texture or a group of textures to replacable texture slots
void assign( std::string const &Replacableskin );
};
// the file of the texture or the material of the given name, looked up as the models do; empty when there is none
std::string TextureTest( std::string const &Name );