Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
8080e1cd
Commit
8080e1cd
authored
8 years ago
by
Monster Iestyn
Browse files
Options
Downloads
Patches
Plain Diff
More optimising and otherwise fixing bizarre formatting in hw_trick.c
parent
6a85121b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/hardware/hw_trick.c
+23
-33
23 additions, 33 deletions
src/hardware/hw_trick.c
with
23 additions
and
33 deletions
src/hardware/hw_trick.c
+
23
−
33
View file @
8080e1cd
...
...
@@ -397,7 +397,7 @@ static void sortStacklist(sector_t *sector)
i
=
0
;
finished
=
true
;
while
(
NULL
!=
*
(
list
+
i
+
1
))
while
(
*
(
list
+
i
+
1
))
{
sec1
=
*
(
list
+
i
);
sec2
=
*
(
list
+
i
+
1
);
...
...
@@ -438,7 +438,7 @@ static double calcLineoutLength(sector_t *sector)
double
length
=
0
.
0L
;
chain
=
sector
->
sectorLines
;
while
(
NULL
!=
chain
)
// sum up lengths of all lines
while
(
chain
)
// sum up lengths of all lines
{
length
+=
lineLength
(
chain
->
line
);
chain
=
chain
->
next
;
...
...
@@ -454,7 +454,7 @@ static void calcLineouts(sector_t *sector)
size_t
secCount
=
0
;
sector_t
*
encSector
=
*
(
sector
->
stackList
);
while
(
NULL
!=
encSector
)
while
(
encSector
)
{
if
(
encSector
->
lineoutLength
<
0
.
0L
)
// if length has not yet been calculated
{
...
...
@@ -552,7 +552,7 @@ static boolean areBottomtexturesMissing(sector_t *thisSector)
if
(
frontSector
==
backSector
)
// skip damn renderer tricks here
continue
;
if
(
frontSector
==
NULL
||
backSector
==
NULL
)
if
(
!
frontSector
||
!
backSector
)
continue
;
sider
=
&
sides
[
thisElem
->
line
->
sidenum
[
0
]];
...
...
@@ -693,9 +693,7 @@ static fixed_t estimateCeilHeight(sector_t *thisSector)
{
sector_t
*
adjSector
;
if
(
!
thisSector
||
!
thisSector
->
sectorLines
||
!
thisSector
->
sectorLines
->
line
)
if
(
!
thisSector
||
!
thisSector
->
sectorLines
||
!
thisSector
->
sectorLines
->
line
)
return
0
;
adjSector
=
thisSector
->
sectorLines
->
line
->
frontsector
;
...
...
@@ -715,16 +713,14 @@ static fixed_t estimateFloorHeight(sector_t *thisSector)
{
sector_t
*
adjSector
;
if
(
!
thisSector
||
!
thisSector
->
sectorLines
||
!
thisSector
->
sectorLines
->
line
)
if
(
!
thisSector
||
!
thisSector
->
sectorLines
||
!
thisSector
->
sectorLines
->
line
)
return
0
;
adjSector
=
thisSector
->
sectorLines
->
line
->
frontsector
;
if
(
adjSector
==
thisSector
)
adjSector
=
thisSector
->
sectorLines
->
line
->
backsector
;
if
(
NULL
==
adjSector
)
if
(
!
adjSector
)
return
0
;
return
adjSector
->
floorheight
;
...
...
@@ -831,18 +827,12 @@ void HWR_CorrectSWTricks(void)
// correct height of floating sectors
if
(
isCeilingFloating
(
floatSector
))
{
fixed_t
corrheight
;
corrheight
=
estimateCeilHeight
(
floatSector
);
floatSector
->
virtualCeilingheight
=
corrheight
;
floatSector
->
virtualCeilingheight
=
estimateCeilHeight
(
floatSector
);
floatSector
->
virtualCeiling
=
true
;
}
if
(
isFloorFloating
(
floatSector
))
{
fixed_t
corrheight
;
corrheight
=
estimateFloorHeight
(
floatSector
);
floatSector
->
virtualFloorheight
=
corrheight
;
floatSector
->
virtualFloorheight
=
estimateFloorHeight
(
floatSector
);
floatSector
->
virtualFloor
=
true
;
}
}
...
...
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