Skip to content
Snippets Groups Projects
Commit 7c3de7d4 authored by Amorilia's avatar Amorilia
Browse files

niflib: vector bool solution + syncing

parent 70c72c2e
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,19 @@ typedef Ref<NiBillboardNode> NiBillboardNodeRef; ...@@ -22,6 +22,19 @@ typedef Ref<NiBillboardNode> NiBillboardNodeRef;
/*! /*!
* These nodes will always be rotated to face the camera creating a billboard * These nodes will always be rotated to face the camera creating a billboard
* effect for any attached objects. * effect for any attached objects.
*
* In pre-10.1.0.0 the Flags field is used for BillboardMode.
* Here is what alphax says about these Flags after checking SceneImmerse:
*
* 0x0000 - 0x0010 is ALWAYS_FACE_CAMERA (somewhat misleadingly named, but
* that is what the format calls it),
* 0x0020 is ROTATE_ABOUT_UP,
* 0x0040 is RIGID_FACE_CAMERA (always face the viewport), and
* 0x0060 is ALWAYS_FACE_CENTER.
* That is where "left shift the corresponding value from v10 NIFs 5 bits"
* falls down - I do not know if v4 NIFs support the others, or if they actually
* mean anything, but these seem the most useful. The rotation of the node does
* seem to affect the axis of constraint.
*/ */
class NiBillboardNode : public NiNode { class NiBillboardNode : public NiNode {
public: public:
......
...@@ -48,7 +48,11 @@ void NiLinesData::Read( istream& in, list<unsigned int> & link_stack, const NifI ...@@ -48,7 +48,11 @@ void NiLinesData::Read( istream& in, list<unsigned int> & link_stack, const NifI
NiGeometryData::Read( in, link_stack, info ); NiGeometryData::Read( in, link_stack, info );
lines.resize(numVertices); lines.resize(numVertices);
for (unsigned int i1 = 0; i1 < lines.size(); i1++) { for (unsigned int i1 = 0; i1 < lines.size(); i1++) {
NifStream( lines[i1], in, info ); {
bool tmp;
NifStream( tmp, in, info );
lines[i1] = tmp;
};
}; };
//--BEGIN POST-READ CUSTOM CODE--// //--BEGIN POST-READ CUSTOM CODE--//
...@@ -63,7 +67,10 @@ void NiLinesData::Write( ostream& out, const map<NiObjectRef,unsigned int> & lin ...@@ -63,7 +67,10 @@ void NiLinesData::Write( ostream& out, const map<NiObjectRef,unsigned int> & lin
NiGeometryData::Write( out, link_map, info ); NiGeometryData::Write( out, link_map, info );
for (unsigned int i1 = 0; i1 < lines.size(); i1++) { for (unsigned int i1 = 0; i1 < lines.size(); i1++) {
NifStream( lines[i1], out, info ); {
bool tmp = lines[i1];
NifStream( tmp, out, info );
};
}; };
//--BEGIN POST-WRITE CUSTOM CODE--// //--BEGIN POST-WRITE CUSTOM CODE--//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment