Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Niflib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Grant Kim
Niflib
Commits
ad7389f1
Commit
ad7389f1
authored
17 years ago
by
Tazpn
Browse files
Options
Downloads
Patches
Plain Diff
Another round with the NiGeomMorpherController.
parent
95e834b2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/obj/NiGeomMorpherController.h
+2
-6
2 additions, 6 deletions
include/obj/NiGeomMorpherController.h
src/obj/NiGeomMorpherController.cpp
+33
-35
33 additions, 35 deletions
src/obj/NiGeomMorpherController.cpp
src/obj/NiMorphData.cpp
+2
-2
2 additions, 2 deletions
src/obj/NiMorphData.cpp
with
37 additions
and
43 deletions
include/obj/NiGeomMorpherController.h
+
2
−
6
View file @
ad7389f1
...
...
@@ -109,13 +109,9 @@ protected:
/*! List of interpolators. */
vector
<
Ref
<
NiInterpolator
>
>
interpolators
;
/*! A count. */
mutable
unsigned
int
numUnknownInts
1
;
mutable
unsigned
int
numUnknownInts
;
/*! Unknown. */
vector
<
unsigned
int
>
unknownInts1
;
/*! A count. */
mutable
unsigned
int
numUnknownInts2
;
/*! Unknown. */
vector
<
unsigned
int
>
unknownInts2
;
vector
<
unsigned
int
>
unknownInts
;
public:
/*! NIFLIB_HIDDEN function. For internal use only. */
NIFLIB_HIDDEN
virtual
void
Read
(
istream
&
in
,
list
<
unsigned
int
>
&
link_stack
,
const
NifInfo
&
info
);
...
...
This diff is collapsed.
Click to expand it.
src/obj/NiGeomMorpherController.cpp
+
33
−
35
View file @
ad7389f1
...
...
@@ -22,7 +22,7 @@ using namespace Niflib;
//Definition of TYPE constant
const
Type
NiGeomMorpherController
::
TYPE
(
"NiGeomMorpherController"
,
&
NiInterpController
::
TYPE
);
NiGeomMorpherController
::
NiGeomMorpherController
()
:
unknown
((
unsigned
short
)
0
),
unknown2
((
byte
)
0
),
data
(
NULL
),
unknownByte
((
byte
)
0
),
numInterpolators
((
unsigned
int
)
0
),
numUnknownInts
1
((
unsigned
int
)
0
),
numUnknownInts2
((
unsigned
int
)
0
)
{
NiGeomMorpherController
::
NiGeomMorpherController
()
:
unknown
((
unsigned
short
)
0
),
unknown2
((
byte
)
0
),
data
(
NULL
),
unknownByte
((
byte
)
0
),
numInterpolators
((
unsigned
int
)
0
),
numUnknownInts
((
unsigned
int
)
0
)
{
//--BEGIN CONSTRUCTOR CUSTOM CODE--//
//--END CUSTOM CODE--//
}
...
...
@@ -64,17 +64,24 @@ void NiGeomMorpherController::Read( istream& in, list<unsigned int> & link_stack
};
};
if
(
(
info
.
version
>=
0x0A020000
)
&&
(
info
.
version
<=
0x0A020000
)
)
{
NifStream
(
numUnknownInts
1
,
in
,
info
);
unknownInts
1
.
resize
(
numUnknownInts
1
);
for
(
unsigned
int
i2
=
0
;
i2
<
unknownInts
1
.
size
();
i2
++
)
{
NifStream
(
unknownInts
1
[
i2
],
in
,
info
);
NifStream
(
numUnknownInts
,
in
,
info
);
unknownInts
.
resize
(
numUnknownInts
);
for
(
unsigned
int
i2
=
0
;
i2
<
unknownInts
.
size
();
i2
++
)
{
NifStream
(
unknownInts
[
i2
],
in
,
info
);
};
};
if
(
(
info
.
version
>=
0x14000004
)
&&
(
info
.
userVersion
==
10
)
)
{
NifStream
(
numUnknownInts2
,
in
,
info
);
unknownInts2
.
resize
(
numUnknownInts2
);
for
(
unsigned
int
i2
=
0
;
i2
<
unknownInts2
.
size
();
i2
++
)
{
NifStream
(
unknownInts2
[
i2
],
in
,
info
);
NifStream
(
numUnknownInts
,
in
,
info
);
unknownInts
.
resize
(
numUnknownInts
);
for
(
unsigned
int
i2
=
0
;
i2
<
unknownInts
.
size
();
i2
++
)
{
NifStream
(
unknownInts
[
i2
],
in
,
info
);
};
};
if
(
(
info
.
version
>=
0x14000004
)
&&
(
info
.
userVersion
==
11
)
)
{
NifStream
(
numUnknownInts
,
in
,
info
);
unknownInts
.
resize
(
numUnknownInts
);
for
(
unsigned
int
i2
=
0
;
i2
<
unknownInts
.
size
();
i2
++
)
{
NifStream
(
unknownInts
[
i2
],
in
,
info
);
};
};
...
...
@@ -87,8 +94,7 @@ void NiGeomMorpherController::Write( ostream& out, const map<NiObjectRef,unsigne
//--END CUSTOM CODE--//
NiInterpController
::
Write
(
out
,
link_map
,
info
);
numUnknownInts2
=
(
unsigned
int
)(
unknownInts2
.
size
());
numUnknownInts1
=
(
unsigned
int
)(
unknownInts1
.
size
());
numUnknownInts
=
(
unsigned
int
)(
unknownInts
.
size
());
numInterpolators
=
(
unsigned
int
)(
interpolators
.
size
());
if
(
info
.
version
>=
0x0A010000
)
{
NifStream
(
unknown
,
out
,
info
);
...
...
@@ -121,15 +127,21 @@ void NiGeomMorpherController::Write( ostream& out, const map<NiObjectRef,unsigne
};
};
if
(
(
info
.
version
>=
0x0A020000
)
&&
(
info
.
version
<=
0x0A020000
)
)
{
NifStream
(
numUnknownInts
1
,
out
,
info
);
for
(
unsigned
int
i2
=
0
;
i2
<
unknownInts
1
.
size
();
i2
++
)
{
NifStream
(
unknownInts
1
[
i2
],
out
,
info
);
NifStream
(
numUnknownInts
,
out
,
info
);
for
(
unsigned
int
i2
=
0
;
i2
<
unknownInts
.
size
();
i2
++
)
{
NifStream
(
unknownInts
[
i2
],
out
,
info
);
};
};
if
(
(
info
.
version
>=
0x14000004
)
&&
(
info
.
userVersion
==
10
)
)
{
NifStream
(
numUnknownInts2
,
out
,
info
);
for
(
unsigned
int
i2
=
0
;
i2
<
unknownInts2
.
size
();
i2
++
)
{
NifStream
(
unknownInts2
[
i2
],
out
,
info
);
NifStream
(
numUnknownInts
,
out
,
info
);
for
(
unsigned
int
i2
=
0
;
i2
<
unknownInts
.
size
();
i2
++
)
{
NifStream
(
unknownInts
[
i2
],
out
,
info
);
};
};
if
(
(
info
.
version
>=
0x14000004
)
&&
(
info
.
userVersion
==
11
)
)
{
NifStream
(
numUnknownInts
,
out
,
info
);
for
(
unsigned
int
i2
=
0
;
i2
<
unknownInts
.
size
();
i2
++
)
{
NifStream
(
unknownInts
[
i2
],
out
,
info
);
};
};
...
...
@@ -144,8 +156,7 @@ std::string NiGeomMorpherController::asString( bool verbose ) const {
stringstream
out
;
unsigned
int
array_output_count
=
0
;
out
<<
NiInterpController
::
asString
();
numUnknownInts2
=
(
unsigned
int
)(
unknownInts2
.
size
());
numUnknownInts1
=
(
unsigned
int
)(
unknownInts1
.
size
());
numUnknownInts
=
(
unsigned
int
)(
unknownInts
.
size
());
numInterpolators
=
(
unsigned
int
)(
interpolators
.
size
());
out
<<
" Unknown: "
<<
unknown
<<
endl
;
out
<<
" Unknown 2: "
<<
unknown2
<<
endl
;
...
...
@@ -164,22 +175,9 @@ std::string NiGeomMorpherController::asString( bool verbose ) const {
out
<<
" Interpolators["
<<
i1
<<
"]: "
<<
interpolators
[
i1
]
<<
endl
;
array_output_count
++
;
};
out
<<
" Num Unknown Ints 1: "
<<
numUnknownInts1
<<
endl
;
array_output_count
=
0
;
for
(
unsigned
int
i1
=
0
;
i1
<
unknownInts1
.
size
();
i1
++
)
{
if
(
!
verbose
&&
(
array_output_count
>
MAXARRAYDUMP
)
)
{
out
<<
"<Data Truncated. Use verbose mode to see complete listing.>"
<<
endl
;
break
;
};
if
(
!
verbose
&&
(
array_output_count
>
MAXARRAYDUMP
)
)
{
break
;
};
out
<<
" Unknown Ints 1["
<<
i1
<<
"]: "
<<
unknownInts1
[
i1
]
<<
endl
;
array_output_count
++
;
};
out
<<
" Num Unknown Ints 2: "
<<
numUnknownInts2
<<
endl
;
out
<<
" Num Unknown Ints: "
<<
numUnknownInts
<<
endl
;
array_output_count
=
0
;
for
(
unsigned
int
i1
=
0
;
i1
<
unknownInts
2
.
size
();
i1
++
)
{
for
(
unsigned
int
i1
=
0
;
i1
<
unknownInts
.
size
();
i1
++
)
{
if
(
!
verbose
&&
(
array_output_count
>
MAXARRAYDUMP
)
)
{
out
<<
"<Data Truncated. Use verbose mode to see complete listing.>"
<<
endl
;
break
;
...
...
@@ -187,7 +185,7 @@ std::string NiGeomMorpherController::asString( bool verbose ) const {
if
(
!
verbose
&&
(
array_output_count
>
MAXARRAYDUMP
)
)
{
break
;
};
out
<<
" Unknown Ints
2
["
<<
i1
<<
"]: "
<<
unknownInts
2
[
i1
]
<<
endl
;
out
<<
" Unknown Ints["
<<
i1
<<
"]: "
<<
unknownInts
[
i1
]
<<
endl
;
array_output_count
++
;
};
return
out
.
str
();
...
...
This diff is collapsed.
Click to expand it.
src/obj/NiMorphData.cpp
+
2
−
2
View file @
ad7389f1
...
...
@@ -62,7 +62,7 @@ void NiMorphData::Read( istream& in, list<unsigned int> & link_stack, const NifI
if
(
(
info
.
version
>=
0x0A01006A
)
&&
(
info
.
version
<=
0x0A01006A
)
)
{
NifStream
(
morphs
[
i1
].
unknownInt
,
in
,
info
);
};
if
(
info
.
version
>=
0x14000004
)
{
if
(
(
info
.
version
>=
0x14000004
)
&&
(
info
.
userVersion
==
0
)
)
{
NifStream
(
morphs
[
i1
].
unknownInt
,
in
,
info
);
};
morphs
[
i1
].
vectors
.
resize
(
numVertices
);
...
...
@@ -99,7 +99,7 @@ void NiMorphData::Write( ostream& out, const map<NiObjectRef,unsigned int> & lin
if
(
(
info
.
version
>=
0x0A01006A
)
&&
(
info
.
version
<=
0x0A01006A
)
)
{
NifStream
(
morphs
[
i1
].
unknownInt
,
out
,
info
);
};
if
(
info
.
version
>=
0x14000004
)
{
if
(
(
info
.
version
>=
0x14000004
)
&&
(
info
.
userVersion
==
0
)
)
{
NifStream
(
morphs
[
i1
].
unknownInt
,
out
,
info
);
};
for
(
unsigned
int
i2
=
0
;
i2
<
morphs
[
i1
].
vectors
.
size
();
i2
++
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment