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
69e97840
Commit
69e97840
authored
5 years ago
by
Lactozilla
Browse files
Options
Downloads
Patches
Plain Diff
Something in R_RenderSegLoop I thought looked off...
parent
6f5a2599
No related branches found
No related tags found
2 merge requests
!734
Rebase Keycodes only branch.
,
!578
Software clownery
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/r_segs.c
+14
-14
14 additions, 14 deletions
src/r_segs.c
with
14 additions
and
14 deletions
src/r_segs.c
+
14
−
14
View file @
69e97840
...
...
@@ -1349,7 +1349,7 @@ UINT32 nombre = 100000;
static
void
R_RenderSegLoop
(
void
)
{
angle_t
angle
;
size_t
pindex
;
size_t
pindex
=
0
;
INT32
yl
;
INT32
yh
;
...
...
@@ -1362,6 +1362,10 @@ static void R_RenderSegLoop (void)
INT32
bottom
;
INT32
i
;
// Set the shadowed column drawer for light lists.
if
(
dc_numlights
)
colfunc
=
colfuncs
[
COLDRAWFUNC_SHADOWED
];
for
(;
rw_x
<
rw_stopx
;
rw_x
++
)
{
// mark floor / ceiling areas
...
...
@@ -1472,6 +1476,15 @@ static void R_RenderSegLoop (void)
}
}
// Calculate lighting.
// Done for light lists anyway to avoid doing it for every light.
if
(
segtextured
||
dc_numlights
)
{
pindex
=
FixedMul
(
rw_scale
,
FixedDiv
(
640
,
vid
.
width
))
>>
LIGHTSCALESHIFT
;
if
(
pindex
>=
MAXLIGHTSCALE
)
pindex
=
MAXLIGHTSCALE
-
1
;
}
//SoM: Calculate offsets for Thick fake floors.
// calculate texture offset
angle
=
(
rw_centerangle
+
xtoviewangle
[
rw_x
])
>>
ANGLETOFINESHIFT
;
...
...
@@ -1492,12 +1505,6 @@ static void R_RenderSegLoop (void)
// texturecolumn and lighting are independent of wall tiers
if
(
segtextured
)
{
// calculate lighting
pindex
=
FixedMul
(
rw_scale
,
FixedDiv
(
640
,
vid
.
width
))
>>
LIGHTSCALESHIFT
;
if
(
pindex
>=
MAXLIGHTSCALE
)
pindex
=
MAXLIGHTSCALE
-
1
;
dc_colormap
=
walllights
[
pindex
];
dc_x
=
rw_x
;
dc_iscale
=
0xffffffffu
/
(
unsigned
)
rw_scale
;
...
...
@@ -1528,17 +1535,10 @@ static void R_RenderSegLoop (void)
else
xwalllights
=
scalelight
[
lightnum
];
pindex
=
FixedMul
(
rw_scale
,
FixedDiv
(
640
,
vid
.
width
))
>>
LIGHTSCALESHIFT
;
if
(
pindex
>=
MAXLIGHTSCALE
)
pindex
=
MAXLIGHTSCALE
-
1
;
if
(
dc_lightlist
[
i
].
extra_colormap
)
dc_lightlist
[
i
].
rcolormap
=
dc_lightlist
[
i
].
extra_colormap
->
colormap
+
(
xwalllights
[
pindex
]
-
colormaps
);
else
dc_lightlist
[
i
].
rcolormap
=
xwalllights
[
pindex
];
colfunc
=
colfuncs
[
COLDRAWFUNC_SHADOWED
];
}
}
...
...
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