@@ -9,12 +9,12 @@ namespace LibCmo::CK2::ObjImpls {
9
9
CKRenderObject (ctx, ckid, name),
10
10
m_PotentialMeshes (), m_CurrentMesh(nullptr ),
11
11
m_WorldMatrix (), m_ZOrder(0 ),
12
- m_MoveableFlags (EnumsHelper:: Merge({
12
+ m_MoveableFlags (YYCC::EnumHelper:: Merge(
13
13
VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_PICKABLE,
14
14
VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_VISIBLE,
15
15
VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_RENDERCHANNELS,
16
16
VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_INVERSEWORLDMATVALID
17
- } )),
17
+ )),
18
18
m_3dEntityFlags (static_cast <CK_3DENTITY_FLAGS>(0 )) {}
19
19
20
20
CK3dEntity::~CK3dEntity () {}
@@ -53,15 +53,15 @@ namespace LibCmo::CK2::ObjImpls {
53
53
// regulate self flag again
54
54
// MARK: originally we should check parent here.
55
55
// but we do not support parent and hierarchy feature, so we simply remove flag
56
- EnumsHelper::Rm (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_PARENTVALID);
56
+ YYCC::EnumHelper::Remove (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_PARENTVALID);
57
57
// MARK: originally we should check grouped into CKPlace here.
58
58
// but we do not support CKPlace, so we simply remove this flag
59
- EnumsHelper::Rm (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_PLACEVALID);
59
+ YYCC::EnumHelper::Remove (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_PLACEVALID);
60
60
// check z-order, if not zero, save it
61
61
if (m_ZOrder != 0 ) {
62
- EnumsHelper ::Add (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_ZORDERVALID);
62
+ YYCC::EnumHelper ::Add (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_ZORDERVALID);
63
63
} else {
64
- EnumsHelper::Rm (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_ZORDERVALID);
64
+ YYCC::EnumHelper::Remove (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_ZORDERVALID);
65
65
}
66
66
67
67
// write 2 flags
@@ -94,7 +94,7 @@ namespace LibCmo::CK2::ObjImpls {
94
94
if (!suc) return false ;
95
95
96
96
// backup moveable flags
97
- bool hasWorldAligned = EnumsHelper ::Has (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_WORLDALIGNED);
97
+ bool hasWorldAligned = YYCC::EnumHelper ::Has (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_WORLDALIGNED);
98
98
99
99
// MARK: object animation is skipped
100
100
@@ -132,11 +132,11 @@ namespace LibCmo::CK2::ObjImpls {
132
132
chunk->ReadStruct (m_3dEntityFlags);
133
133
chunk->ReadStruct (m_MoveableFlags);
134
134
// remove some properties
135
- EnumsHelper::Rm (m_3dEntityFlags, EnumsHelper::Merge ({
135
+ YYCC::EnumHelper::Remove (m_3dEntityFlags,
136
136
CK_3DENTITY_FLAGS::CK_3DENTITY_UPDATELASTFRAME,
137
137
CK_3DENTITY_FLAGS::CK_3DENTITY_RESERVED0
138
- }) );
139
- EnumsHelper::Rm (m_MoveableFlags, EnumsHelper::Merge ({
138
+ );
139
+ YYCC::EnumHelper::Remove (m_MoveableFlags,
140
140
VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_RESERVED2,
141
141
VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_STENCILONLY,
142
142
VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_DONTUPDATEFROMPARENT,
@@ -145,13 +145,13 @@ namespace LibCmo::CK2::ObjImpls {
145
145
VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_BOXVALID,
146
146
VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_USERBOX,
147
147
VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_UPTODATE
148
- }) );
148
+ );
149
149
if (hasWorldAligned) {
150
- EnumsHelper ::Add (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_WORLDALIGNED);
150
+ YYCC::EnumHelper ::Add (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_WORLDALIGNED);
151
151
}
152
152
153
153
// if order render first
154
- if (EnumsHelper ::Has (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_RENDERFIRST)) {
154
+ if (YYCC::EnumHelper ::Has (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_RENDERFIRST)) {
155
155
m_ZOrder = 10000 ;
156
156
}
157
157
@@ -171,47 +171,47 @@ namespace LibCmo::CK2::ObjImpls {
171
171
VxMath::VxVector3 crossProduct = VxMath::NSVxVector::CrossProduct (col0, col1);
172
172
CKFLOAT dotProduct = VxMath::NSVxVector::DotProduct (crossProduct, col2);
173
173
if (dotProduct >= 0 .0f ) {
174
- EnumsHelper::Rm (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_INDIRECTMATRIX);
174
+ YYCC::EnumHelper::Remove (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_INDIRECTMATRIX);
175
175
} else {
176
- EnumsHelper ::Add (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_INDIRECTMATRIX);
176
+ YYCC::EnumHelper ::Add (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_INDIRECTMATRIX);
177
177
}
178
178
179
179
// copy visible data
180
180
// process direct visible
181
- if (EnumsHelper ::Has (m_ObjectFlags, CK_OBJECT_FLAGS::CK_OBJECT_VISIBLE)) {
182
- EnumsHelper ::Add (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_VISIBLE);
181
+ if (YYCC::EnumHelper ::Has (m_ObjectFlags, CK_OBJECT_FLAGS::CK_OBJECT_VISIBLE)) {
182
+ YYCC::EnumHelper ::Add (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_VISIBLE);
183
183
} else {
184
- EnumsHelper::Rm (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_VISIBLE);
184
+ YYCC::EnumHelper::Remove (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_VISIBLE);
185
185
}
186
186
// process indirect visible
187
- if (EnumsHelper ::Has (m_ObjectFlags, CK_OBJECT_FLAGS::CK_OBJECT_HIERACHICALHIDE)) {
188
- EnumsHelper ::Add (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_HIERARCHICALHIDE);
187
+ if (YYCC::EnumHelper ::Has (m_ObjectFlags, CK_OBJECT_FLAGS::CK_OBJECT_HIERACHICALHIDE)) {
188
+ YYCC::EnumHelper ::Add (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_HIERARCHICALHIDE);
189
189
} else {
190
- EnumsHelper::Rm (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_HIERARCHICALHIDE);
190
+ YYCC::EnumHelper::Remove (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_HIERARCHICALHIDE);
191
191
}
192
192
193
193
// read associated CKPlace
194
- if (EnumsHelper ::Has (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_PLACEVALID)) {
194
+ if (YYCC::EnumHelper ::Has (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_PLACEVALID)) {
195
195
// MARK: we drop the support of CKPlace.
196
196
// so we just read it and skip it.
197
197
CK_ID placeid;
198
198
chunk->ReadObjectID (placeid);
199
199
// and remove this flag
200
- EnumsHelper::Rm (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_PLACEVALID);
200
+ YYCC::EnumHelper::Remove (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_PLACEVALID);
201
201
}
202
202
203
203
// read parent
204
- if (EnumsHelper ::Has (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_PARENTVALID)) {
204
+ if (YYCC::EnumHelper ::Has (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_PARENTVALID)) {
205
205
// MAKR: we drop the support of parent and the whole 3dentity hierarchy system
206
206
// we ignore this field.
207
207
CK_ID parentid;
208
208
chunk->ReadObjectID (parentid);
209
209
// and remove this flag
210
- EnumsHelper::Rm (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_PARENTVALID);
210
+ YYCC::EnumHelper::Remove (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_PARENTVALID);
211
211
}
212
212
213
213
// read priority (non-zero zorder)
214
- if (EnumsHelper ::Has (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_ZORDERVALID)) {
214
+ if (YYCC::EnumHelper ::Has (m_3dEntityFlags, CK_3DENTITY_FLAGS::CK_3DENTITY_ZORDERVALID)) {
215
215
chunk->ReadStruct (m_ZOrder);
216
216
}
217
217
@@ -227,16 +227,16 @@ namespace LibCmo::CK2::ObjImpls {
227
227
void CK3dEntity::Show (CK_OBJECT_SHOWOPTION show) {
228
228
CKObject::Show (show);
229
229
230
- EnumsHelper::Rm (m_MoveableFlags, EnumsHelper::Merge ({
230
+ YYCC::EnumHelper::Remove (m_MoveableFlags,
231
231
VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_VISIBLE,
232
- VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_HIERARCHICALHIDE,
233
- }) );
232
+ VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_HIERARCHICALHIDE
233
+ );
234
234
switch (show) {
235
235
case CK_OBJECT_SHOWOPTION::CKSHOW:
236
- EnumsHelper ::Add (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_VISIBLE);
236
+ YYCC::EnumHelper ::Add (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_VISIBLE);
237
237
break ;
238
238
case CK_OBJECT_SHOWOPTION::CKHIERARCHICALHIDE:
239
- EnumsHelper ::Add (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_HIERARCHICALHIDE);
239
+ YYCC::EnumHelper ::Add (m_MoveableFlags, VxMath::VX_MOVEABLE_FLAGS::VX_MOVEABLE_HIERARCHICALHIDE);
240
240
break ;
241
241
case CK_OBJECT_SHOWOPTION::CKHIDE:
242
242
break ;
0 commit comments