Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
krtcore
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
amd-design
krtcore
Commits
23912053
Commit
23912053
authored
Feb 24, 2016
by
Martin Turski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed now not needed QuatToMatrix code from the FileLoader (now given by librw)
parent
6cb26ae3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
34 deletions
+6
-34
FileLoader.cpp
krt/game/src/FileLoader.cpp
+6
-34
No files found.
krt/game/src/FileLoader.cpp
View file @
23912053
...
...
@@ -517,34 +517,6 @@ struct sa_iplInstance_t
int
lodIndex
;
// 36, index inside of the .ipl file pointing at the LOD instance.
};
// Code from MTA.
static
void
QuatToMatrix
(
const
rw
::
Quat
&
q
,
rw
::
Matrix
&
m
)
{
float
xx
=
q
.
x
*
q
.
x
;
float
xy
=
q
.
x
*
q
.
y
;
float
xz
=
q
.
x
*
q
.
z
;
float
xw
=
q
.
x
*
q
.
w
;
float
yy
=
q
.
y
*
q
.
y
;
float
yz
=
q
.
y
*
q
.
z
;
float
yw
=
q
.
y
*
q
.
w
;
float
zz
=
q
.
z
*
q
.
z
;
float
zw
=
q
.
z
*
q
.
w
;
m
.
right
.
x
=
1.0
f
-
2.0
f
*
(
yy
+
zz
);
m
.
right
.
y
=
2.0
f
*
(
xy
-
zw
);
m
.
right
.
z
=
2.0
f
*
(
xz
+
yw
);
m
.
up
.
x
=
2.0
f
*
(
xy
+
zw
);
m
.
up
.
y
=
1.0
f
-
2.0
f
*
(
xx
+
zz
);
m
.
up
.
z
=
2.0
f
*
(
yz
-
xw
);
m
.
at
.
x
=
2.0
f
*
(
xz
-
yw
);
m
.
at
.
y
=
2.0
f
*
(
yz
+
xw
);
m
.
at
.
z
=
1.0
f
-
2.0
f
*
(
xx
+
yy
);
}
struct
inst_section_manager
{
inline
void
RegisterGTA3Instance
(
...
...
@@ -566,9 +538,7 @@ struct inst_section_manager
// Assign the matrix.
{
rw
::
Matrix
instMatrix
;
QuatToMatrix
(
rotation
,
instMatrix
);
rw
::
Matrix
instMatrix
=
rw
::
Matrix
::
makeRotation
(
rotation
);
instMatrix
.
rightw
=
0
;
instMatrix
.
atw
=
0
;
...
...
@@ -581,6 +551,8 @@ struct inst_section_manager
resultEntity
->
interiorId
=
areaCode
;
resultEntity
->
isStaticWorldEntity
=
true
;
// Register this instance entity.
// Note that we have no support for LOD instances here.
lod_inst_entity
inst_info
;
...
...
@@ -613,9 +585,7 @@ struct inst_section_manager
// Convert the Quat to a matrix and assign it.
{
rw
::
Matrix
instMatrix
;
QuatToMatrix
(
instData
.
quatRotation
,
instMatrix
);
rw
::
Matrix
instMatrix
=
rw
::
Matrix
::
makeRotation
(
instData
.
quatRotation
);
instMatrix
.
rightw
=
0
;
instMatrix
.
atw
=
0
;
...
...
@@ -649,6 +619,8 @@ struct inst_section_manager
resultEntity
->
interiorId
=
instData
.
areaIndex
;
resultEntity
->
isStaticWorldEntity
=
true
;
// Register this instance entity.
lod_inst_entity
inst_info
;
inst_info
.
lod_id
=
instData
.
lodIndex
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment