SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
trick_definitions.h
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  * http://www.segs.io/
4  * Copyright (c) 2006 - 2018 SEGS Team (see Authors.txt)
5  * This software is licensed! (See License.txt for details)
6  */
7 
8 #pragma once
9 
10 #include "Colors.h"
12 
13 #include <glm/vec3.hpp>
14 #include <glm/vec2.hpp>
15 #include <QtCore/QString>
16 #include <vector>
17 enum eBlendMode : uint8_t;
18 
19 enum TrickFlags : uint32_t
20 {
21  Additive = 0x1,
22  ScrollST0 = 0x2,
23  FrontFace = 0x4,
24  CameraFace = 0x8,
25  DistAlpha = 0x10,
26  ColorOnly = 0x20,
27  DoubleSided = 0x40,
28  NoZTest = 0x80,
29  ReflectTex1 = 0x100,
30  ScrollST1 = 0x200,
31  NightLight = 0x400,
32  NoZWrite = 0x800,
33  Wireframe = 0x1000,
34  NoDraw = 0x2000,
35  STAnimate = 0x4000,
36  ParticleSys = 0x8000,
37  NoColl = 0x10000,
38  SetColor = 0x20000,
39  VertexAlpha = 0x40000,
40  NoFog = 0x80000,
41  FogHasStartAndEnd= 0x100000,
42  EditorVisible = 0x200000,
43  CastShadow = 0x400000,
44  LightFace = 0x800000,
45  ReflectTex0 = 0x1000000,
46  AlphaRef = 0x2000000,
47  SimpleAlphaSort = 0x4000000,
48  TexBias = 0x8000000,
49  NightGlow = 0x10000000,
50  SelectOnly = 0x20000000,
51  STSScale = 0x40000000,
52  NotSelectable = 0x80000000,
53 };
54 
56 {
57  QString src_file;
58  QString name;
59  QString Blend;
60  QString BumpMap;
61  glm::vec2 Fade{0, 0};
62  glm::vec2 ScaleST0{0, 0};
63  glm::vec2 ScaleST1{0, 0};
64  uint32_t Flags;
65  uint32_t BlendType;
67  QString Surface; // Name of this surface WOOD METAL etc.
68  float Gloss;
69 };
70 
71 struct ColorList
72 {
74  int count; // count of color 'key frames'
75  float scale;
76 };
77 
79 {
80  glm::vec2 ScrollST0;
81  glm::vec2 ScrollST1;
82  glm::vec2 tex_scale;
85  uint32_t _TrickFlags=0;
86  float SortBias=0;
87  struct GeometryModifiers *info=nullptr;
88  bool isFlag(TrickFlags v) const {
89  return (_TrickFlags & uint32_t(v))!=0;
90  }
91 };
92 
93 enum GroupFlags : uint32_t
94 {
95  VisOutside = 0x1,
96  VisBlocker = 0x2,
98  VisTray = 0x8,
99  VisShell = 0x10,
100  VisWindow = 0x20,
101  VisDoorFrame = 0x40,
102  RegionMarker = 0x80,
103  VolumeTrigger = 0x100,
104  WaterVolume = 0x200,
105  LavaVolume = 0x400,
106  DoorVolume = 0x800,
107  ParentFade = 0x1000,
108  KeyLight = 0x2000,
110  RedWaterVolume = 0x8000, // only in I2
111  MaterialVolume =0x10000, // only in I2
112 };
113 
115 {
116  QString src_name;
117  QString name;
119  int GfxFlags;
120  uint32_t ObjFlags;
121  uint32_t GroupFlags;
122  eBlendMode blend_mode;
123  float LodNear;
124  float LodFar;
125  float LodNearFade;
126  float LodFarFade;
127  std::vector<TextureAnim_Data> StAnim;
128  glm::vec2 FogDist;
129  float ShadowDist;
130  float AlphaRef;
131  float ObjTexBias;
132  glm::vec2 NightGlow;
133  float Sway;
134  float Sway_Rotate;
136  float LodScale;
137 };
138 
140 {
141  std::vector<TextureModifiers> texture_mods;
142  std::vector<GeometryModifiers> geometry_mods;
143 };
Definition: trick_definitions.h:27
float LodFar
Definition: trick_definitions.h:124
Definition: Colors.h:62
Definition: trick_definitions.h:26
Definition: trick_definitions.h:37
Definition: trick_definitions.h:107
float Gloss
Definition: trick_definitions.h:68
Definition: trick_definitions.h:110
eBlendMode blend_mode
Definition: trick_definitions.h:122
Definition: trick_definitions.h:44
Definition: trick_definitions.h:50
Definition: trick_definitions.h:39
glm::vec2 ScrollST0
Definition: trick_definitions.h:80
Definition: trick_definitions.h:21
Definition: trick_definitions.h:139
Definition: trick_definitions.h:100
glm::vec2 FogDist
Definition: trick_definitions.h:128
QString src_file
Definition: trick_definitions.h:57
QString name
Definition: trick_definitions.h:117
Definition: trick_definitions.h:29
float Sway_Rotate
Definition: trick_definitions.h:134
float ShadowDist
Definition: trick_definitions.h:129
Definition: trick_definitions.h:25
float ObjTexBias
Definition: trick_definitions.h:131
Definition: trick_definitions.h:41
Definition: trick_definitions.h:47
Definition: trick_definitions.h:34
Definition: trick_definitions.h:38
Definition: trick_definitions.h:36
std::vector< TextureModifiers > texture_mods
Definition: trick_definitions.h:141
std::vector< TextureAnim_Data > StAnim
Definition: trick_definitions.h:127
float SortBias
Definition: trick_definitions.h:86
RGBA field_0[16]
Definition: trick_definitions.h:73
Definition: trick_definitions.h:42
float LodNear
Definition: trick_definitions.h:123
Definition: trick_definitions.h:102
QString Blend
Definition: trick_definitions.h:59
Definition: trick_definitions.h:32
Definition: trick_definitions.h:103
float LodFarFade
Definition: trick_definitions.h:126
uint32_t ObjFlags
Definition: trick_definitions.h:120
Definition: trick_definitions.h:114
Definition: trick_definitions.h:105
Definition: trick_definitions.h:111
float AlphaRef
Definition: trick_definitions.h:130
RGBA TintColor0
Definition: trick_definitions.h:83
glm::vec2 ScrollST1
Definition: trick_definitions.h:81
Definition: trick_definitions.h:23
Definition: trick_definitions.h:52
RGBA TintColor1
Definition: trick_definitions.h:84
Definition: trick_definitions.h:45
Definition: trick_definitions.h:24
uint32_t _TrickFlags
Definition: trick_definitions.h:85
uint32_t GroupFlags
Definition: trick_definitions.h:121
float Sway
Definition: trick_definitions.h:133
Definition: trick_definitions.h:104
Definition: trick_definitions.h:78
QString Surface
Definition: trick_definitions.h:67
QString BumpMap
Definition: trick_definitions.h:60
Definition: trick_definitions.h:33
Definition: trick_definitions.h:30
Definition: trick_definitions.h:95
int GfxFlags
Definition: trick_definitions.h:119
Definition: trick_definitions.h:96
glm::vec2 ScaleST0
Definition: trick_definitions.h:62
Definition: trick_definitions.h:46
Definition: trick_definitions.h:99
QString name
Definition: trick_definitions.h:58
glm::vec2 ScaleST1
Definition: trick_definitions.h:63
Definition: trick_definitions.h:106
Definition: trick_definitions.h:49
Definition: trick_definitions.h:40
float scale
Definition: trick_definitions.h:75
Definition: trick_definitions.h:108
Definition: trick_definitions.h:101
int surfaceBitIdx
Definition: trick_definitions.h:66
glm::vec2 Fade
Definition: trick_definitions.h:61
glm::vec2 tex_scale
Definition: trick_definitions.h:82
Definition: trick_definitions.h:22
Definition: trick_definitions.h:98
Definition: trick_definitions.h:97
Definition: trick_definitions.h:48
float LodScale
Definition: trick_definitions.h:136
bool isFlag(TrickFlags v) const
Definition: trick_definitions.h:88
Definition: trick_definitions.h:71
ModelModifiers node
Definition: trick_definitions.h:118
uint32_t BlendType
Definition: trick_definitions.h:65
Definition: trick_definitions.h:43
int count
Definition: trick_definitions.h:74
glm::vec2 NightGlow
Definition: trick_definitions.h:132
float LodNearFade
Definition: trick_definitions.h:125
GroupFlags
Definition: trick_definitions.h:93
Definition: trick_definitions.h:28
Definition: trick_definitions.h:55
Definition: trick_definitions.h:51
std::vector< GeometryModifiers > geometry_mods
Definition: trick_definitions.h:142
struct GeometryModifiers * info
Definition: trick_definitions.h:87
uint32_t Flags
Definition: trick_definitions.h:64
QString src_name
Definition: trick_definitions.h:116
Definition: trick_definitions.h:35
ColorList clists[2]
Definition: trick_definitions.h:135
Definition: trick_definitions.h:31
Definition: trick_definitions.h:109
TrickFlags
Definition: trick_definitions.h:19