This repository was archived by the owner on Dec 10, 2022. It is now read-only.
forked from ataulien/ZenLib
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathzCMaterial.cpp
57 lines (52 loc) · 3.16 KB
/
zCMaterial.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include "zCMaterial.h"
#include "zenParserPropRead.h"
#include "zenParser.h"
using namespace ZenLoad;
zCMaterialData zCMaterial::readObjectData(ZenParser& parser, uint16_t version) {
// Read everything the material has to offer
zCMaterialData materialInfo;
if(version != 39939) { // Gothic 1
ReadObjectProperties(parser,
Prop("MaterialName", materialInfo.matName),
Prop("MaterialGroup", materialInfo.matGroup),
Prop("Color", materialInfo.color),
Prop("SmoothAngle", materialInfo.smoothAngle),
Prop("Texture", materialInfo.texture),
Prop("TextureScale", materialInfo.texScale),
Prop("TextureAniFPS", materialInfo.texAniFPS),
Prop("TextureAniMapMode", materialInfo.texAniMapMode),
Prop("TextureAniMapDir", materialInfo.texAniMapDir),
Prop("NoCollisionDetection", materialInfo.noCollDet),
Prop("NoLightmap", materialInfo.noLighmap),
Prop("LoadDontCollapse", materialInfo.loadDontCollapse),
Prop("DetailObject", materialInfo.detailObject),
Prop("DefaultMapping", materialInfo.defaultMapping));
} else {
ReadObjectProperties(parser,
Prop("MaterialName", materialInfo.matName),
Prop("MaterialGroup", materialInfo.matGroup),
Prop("Color", materialInfo.color),
Prop("SmoothAngle", materialInfo.smoothAngle),
Prop("Texture", materialInfo.texture),
Prop("TextureScale", materialInfo.texScale),
Prop("TextureAniFPS", materialInfo.texAniFPS),
Prop("TextureAniMapMode", materialInfo.texAniMapMode),
Prop("TextureAniMapDir", materialInfo.texAniMapDir),
Prop("NoCollisionDetection", materialInfo.noCollDet),
Prop("NoLightmap", materialInfo.noLighmap),
Prop("LoadDontCollapse", materialInfo.loadDontCollapse),
Prop("DetailObject", materialInfo.detailObject),
Prop("DetailTextureScale", materialInfo.detailTextureScale),
Prop("ForceOccluder", materialInfo.forceOccluder),
Prop("EnvironmentMapping", materialInfo.environmentMapping),
Prop("EnvironmentalMappingStrength", materialInfo.environmentalMappingStrength),
Prop("WaveMode", materialInfo.waveMode),
Prop("WaveSpeed", materialInfo.waveSpeed),
Prop("WaveMaxAmplitude", materialInfo.waveMaxAmplitude),
Prop("WaveGridSize", materialInfo.waveGridSize),
Prop("IgnoreSun", materialInfo.ignoreSun),
Prop("AlphaFunc", materialInfo.alphaFunc),
Prop("DefaultMapping", materialInfo.defaultMapping));
}
return materialInfo;
}