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
e44727f6
Commit
e44727f6
authored
13 years ago
by
Amorilia
Browse files
Options
Downloads
Patches
Plain Diff
Fix for having ByteColor4 inside a Key.
parent
8d527db4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/NIF_IO.h
+6
-0
6 additions, 0 deletions
include/NIF_IO.h
include/obj/NiPSSimulatorGeneralStep.h
+2
-0
2 additions, 0 deletions
include/obj/NiPSSimulatorGeneralStep.h
src/NIF_IO.cpp
+21
-0
21 additions, 0 deletions
src/NIF_IO.cpp
with
29 additions
and
0 deletions
include/NIF_IO.h
+
6
−
0
View file @
e44727f6
...
...
@@ -214,6 +214,12 @@ ostream & operator<<( ostream & out, Char8String const & val );
void
NifStream
(
InertiaMatrix
&
val
,
istream
&
in
,
const
NifInfo
&
info
);
void
NifStream
(
InertiaMatrix
const
&
val
,
ostream
&
out
,
const
NifInfo
&
info
);
//ByteColor4
class
ByteColor4
;
void
NifStream
(
ByteColor4
&
val
,
istream
&
in
,
const
NifInfo
&
info
);
void
NifStream
(
ByteColor4
const
&
val
,
ostream
&
out
,
const
NifInfo
&
info
);
ostream
&
operator
<<
(
ostream
&
out
,
ByteColor4
const
&
val
);
//--Templates--//
void
NifStream
(
Key
<
Quaternion
>
&
key
,
istream
&
file
,
const
NifInfo
&
info
,
KeyType
type
);
...
...
This diff is collapsed.
Click to expand it.
include/obj/NiPSSimulatorGeneralStep.h
+
2
−
0
View file @
e44727f6
...
...
@@ -12,6 +12,8 @@ All rights reserved. Please see niflib.h for license. */
//--BEGIN FILE HEAD CUSTOM CODE--//
#include
"../gen/ByteColor4.h"
//--END CUSTOM CODE--//
#include
"NiPSSimulatorStep.h"
...
...
This diff is collapsed.
Click to expand it.
src/NIF_IO.cpp
+
21
−
0
View file @
e44727f6
...
...
@@ -4,6 +4,7 @@ All rights reserved. Please see niflib.h for license. */
#include
"../include/NIF_IO.h"
#include
"../include/niflib.h"
#include
"../include/gen/Header.h"
#include
"../include/gen/ByteColor4.h"
namespace
Niflib
{
//--Endian Support Functions--//
...
...
@@ -890,6 +891,26 @@ void NifStream( InertiaMatrix const & val, ostream& out, const NifInfo & info )
}
}
//ByteColor4
void
NifStream
(
ByteColor4
&
val
,
istream
&
in
,
const
NifInfo
&
info
)
{
val
.
r
=
ReadByte
(
in
);
val
.
g
=
ReadByte
(
in
);
val
.
b
=
ReadByte
(
in
);
val
.
a
=
ReadByte
(
in
);
}
void
NifStream
(
ByteColor4
const
&
val
,
ostream
&
out
,
const
NifInfo
&
info
)
{
WriteByte
(
val
.
r
,
out
);
WriteByte
(
val
.
g
,
out
);
WriteByte
(
val
.
b
,
out
);
WriteByte
(
val
.
a
,
out
);
}
ostream
&
operator
<<
(
ostream
&
out
,
ByteColor4
const
&
val
)
{
out
<<
"RGBA: "
<<
val
.
r
<<
" "
<<
val
.
g
<<
" "
<<
val
.
b
<<
" "
<<
val
.
a
;
return
out
;
}
ostream
&
operator
<<
(
ostream
&
out
,
hdrInfo
const
&
val
)
{
out
.
pword
(
hdrInfo
::
infoIdx
)
=
(
void
*
)
val
.
info
;
return
(
out
);
...
...
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