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
3872bbb9
Commit
3872bbb9
authored
18 years ago
by
Shon Ferguson
Browse files
Options
Downloads
Patches
Plain Diff
Noticed VertMode and LightMode enums had not been implemented, so did so.
parent
82784d7b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NIF_IO.cpp
+23
-0
23 additions, 0 deletions
NIF_IO.cpp
NIF_IO.h
+27
-0
27 additions, 0 deletions
NIF_IO.h
with
50 additions
and
0 deletions
NIF_IO.cpp
+
23
−
0
View file @
3872bbb9
...
@@ -538,6 +538,29 @@ ostream & operator<<( ostream & out, PixelLayout const & val ) {
...
@@ -538,6 +538,29 @@ ostream & operator<<( ostream & out, PixelLayout const & val ) {
};
};
}
}
//VertMode
void
NifStream
(
VertMode
&
val
,
istream
&
in
,
uint
version
)
{
val
=
VertMode
(
ReadUInt
(
in
));
};
void
NifStream
(
VertMode
const
&
val
,
ostream
&
out
,
uint
version
)
{
WriteUInt
(
val
,
out
);
}
ostream
&
operator
<<
(
ostream
&
out
,
VertMode
const
&
val
)
{
switch
(
val
)
{
case
VERT_MODE_SRC_IGNORE
:
return
out
<<
"VERT_MODE_SRC_IGNORE"
;
case
VERT_MODE_SRC_EMISSIVE
:
return
out
<<
"VERT_MODE_SRC_EMISSIVE"
;
case
VERT_MODE_SRC_AMB_DIF
:
return
out
<<
"VERT_MODE_SRC_AMB_DIF"
;
default:
return
out
<<
"Invalid Value! - "
<<
uint
(
val
);
};
}
//LightMode
void
NifStream
(
LightMode
&
val
,
istream
&
in
,
uint
version
)
{
val
=
LightMode
(
ReadUInt
(
in
));
};
void
NifStream
(
LightMode
const
&
val
,
ostream
&
out
,
uint
version
)
{
WriteUInt
(
val
,
out
);
}
ostream
&
operator
<<
(
ostream
&
out
,
LightMode
const
&
val
)
{
switch
(
val
)
{
case
LIGHT_MODE_EMISSIVE
:
return
out
<<
"LIGHT_MODE_EMISSIVE"
;
case
LIGHT_MODE_EMI_AMB_DIF
:
return
out
<<
"LIGHT_MODE_EMI_AMB_DIF"
;
default:
return
out
<<
"Invalid Value! - "
<<
uint
(
val
);
};
}
//The HexString function creates a formatted hex display of the given data for use in printing
//The HexString function creates a formatted hex display of the given data for use in printing
//a debug string for information that is not understood
//a debug string for information that is not understood
string
HexString
(
const
byte
*
src
,
uint
len
)
{
string
HexString
(
const
byte
*
src
,
uint
len
)
{
...
...
This diff is collapsed.
Click to expand it.
NIF_IO.h
+
27
−
0
View file @
3872bbb9
...
@@ -163,6 +163,23 @@ enum PixelLayout {
...
@@ -163,6 +163,23 @@ enum PixelLayout {
PIX_LAY_DEFAULT
=
5
/*!< Use default setting. */
PIX_LAY_DEFAULT
=
5
/*!< Use default setting. */
};
};
/*!
* Specifies what type of light is active on the shape.
*/
enum
VertMode
{
VERT_MODE_SRC_IGNORE
=
0
,
/*!< Source Ignore. */
VERT_MODE_SRC_EMISSIVE
=
1
,
/*!< Source Emissive. */
VERT_MODE_SRC_AMB_DIF
=
2
,
/*!< Source Ambient/Diffuse. */
};
/*!
* Specifies the light mode.
*/
enum
LightMode
{
LIGHT_MODE_EMISSIVE
=
0
,
/*!< Emissive. */
LIGHT_MODE_EMI_AMB_DIF
=
1
,
/*!< Emissive + Ambient + Diffuse. */
};
//--IO Functions--//
//--IO Functions--//
int
BlockSearch
(
istream
&
in
);
int
BlockSearch
(
istream
&
in
);
...
@@ -327,6 +344,16 @@ void NifStream( PixelLayout & val, istream& in, uint version = 0 );
...
@@ -327,6 +344,16 @@ void NifStream( PixelLayout & val, istream& in, uint version = 0 );
void
NifStream
(
PixelLayout
const
&
val
,
ostream
&
out
,
uint
version
=
0
);
void
NifStream
(
PixelLayout
const
&
val
,
ostream
&
out
,
uint
version
=
0
);
ostream
&
operator
<<
(
ostream
&
out
,
PixelLayout
const
&
val
);
ostream
&
operator
<<
(
ostream
&
out
,
PixelLayout
const
&
val
);
//VertMode
void
NifStream
(
VertMode
&
val
,
istream
&
in
,
uint
version
=
0
);
void
NifStream
(
VertMode
const
&
val
,
ostream
&
out
,
uint
version
=
0
);
ostream
&
operator
<<
(
ostream
&
out
,
VertMode
const
&
val
);
//LightMode
void
NifStream
(
LightMode
&
val
,
istream
&
in
,
uint
version
=
0
);
void
NifStream
(
LightMode
const
&
val
,
ostream
&
out
,
uint
version
=
0
);
ostream
&
operator
<<
(
ostream
&
out
,
LightMode
const
&
val
);
//--Templates--//
//--Templates--//
//Key<T>
//Key<T>
...
...
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