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
Package registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kaldrum
SRB2
Commits
a2355fc0
Commit
a2355fc0
authored
Feb 24, 2024
by
Lactozilla
Browse files
Options
Downloads
Patches
Plain Diff
Always use R_DrawRepeatMaskedColumn and R_DrawRepeatFlippedMaskedColumn
parent
66234d09
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/r_segs.c
+11
-23
11 additions, 23 deletions
src/r_segs.c
src/r_things.c
+8
-4
8 additions, 4 deletions
src/r_things.c
with
19 additions
and
27 deletions
src/r_segs.c
+
11
−
23
View file @
a2355fc0
...
@@ -741,25 +741,10 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
...
@@ -741,25 +741,10 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
// Texture must be cached
// Texture must be cached
R_CheckTextureCache
(
texnum
);
R_CheckTextureCache
(
texnum
);
if
(
dc_numlights
)
{
// If there is a lightlist we can simply use either R_DrawMaskedColumn or R_DrawFlippedMaskedColumn
// since windowtop and windowbottom are used
if
(
textures
[
texnum
]
->
flip
&
2
)
// vertically flipped?
colfunc_2s
=
R_DrawFlippedMaskedColumn
;
else
colfunc_2s
=
R_DrawMaskedColumn
;
}
else
{
// If there is no light list, windowtop and windowbottom are not used,
// so R_DrawMaskedColumn or R_DrawFlippedMaskedColumn need to be called
// multiple times for a single column.
if
(
textures
[
texnum
]
->
flip
&
2
)
// vertically flipped?
if
(
textures
[
texnum
]
->
flip
&
2
)
// vertically flipped?
colfunc_2s
=
R_DrawRepeatFlippedMaskedColumn
;
colfunc_2s
=
R_DrawRepeatFlippedMaskedColumn
;
else
else
colfunc_2s
=
R_DrawRepeatMaskedColumn
;
colfunc_2s
=
R_DrawRepeatMaskedColumn
;
}
lengthcol
=
textures
[
texnum
]
->
height
;
lengthcol
=
textures
[
texnum
]
->
height
;
...
@@ -804,6 +789,8 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
...
@@ -804,6 +789,8 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
else
if
(
bottom_frac
>
(
INT64
)
CLAMPMIN
)
sprbotscreen
=
windowbottom
=
(
fixed_t
)
bottom_frac
;
else
if
(
bottom_frac
>
(
INT64
)
CLAMPMIN
)
sprbotscreen
=
windowbottom
=
(
fixed_t
)
bottom_frac
;
else
sprbotscreen
=
windowbottom
=
CLAMPMIN
;
else
sprbotscreen
=
windowbottom
=
CLAMPMIN
;
fixed_t
bottomclip
=
sprbotscreen
;
top_frac
+=
top_step
;
top_frac
+=
top_step
;
bottom_frac
+=
bottom_step
;
bottom_frac
+=
bottom_step
;
...
@@ -909,14 +896,14 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
...
@@ -909,14 +896,14 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
if
(
lighteffect
)
if
(
lighteffect
)
dc_colormap
=
rlight
->
rcolormap
;
dc_colormap
=
rlight
->
rcolormap
;
if
(
solid
&&
windowtop
<
bheight
)
if
(
solid
&&
windowtop
<
bheight
)
windowtop
=
bheight
;
sprtopscreen
=
windowtop
=
bheight
;
continue
;
continue
;
}
}
windowbottom
=
height
;
sprbotscreen
=
windowbottom
=
height
;
if
(
windowbottom
>=
sprbotscreen
)
if
(
windowbottom
>=
bottomclip
)
{
{
windowbottom
=
sprbotscreen
;
sprbotscreen
=
windowbottom
=
bottomclip
;
// draw the texture
// draw the texture
colfunc_2s
(
col
,
lengthcol
);
colfunc_2s
(
col
,
lengthcol
);
for
(
i
++
;
i
<
dc_numlights
;
i
++
)
for
(
i
++
;
i
<
dc_numlights
;
i
++
)
...
@@ -934,10 +921,11 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
...
@@ -934,10 +921,11 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
windowtop
=
bheight
;
windowtop
=
bheight
;
else
else
windowtop
=
windowbottom
+
1
;
windowtop
=
windowbottom
+
1
;
sprtopscreen
=
windowtop
;
if
(
lighteffect
)
if
(
lighteffect
)
dc_colormap
=
rlight
->
rcolormap
;
dc_colormap
=
rlight
->
rcolormap
;
}
}
windowbottom
=
sprbotscreen
;
sprbotscreen
=
windowbottom
=
bottomclip
;
// draw the texture, if there is any space left
// draw the texture, if there is any space left
if
(
windowtop
<
windowbottom
)
if
(
windowtop
<
windowbottom
)
colfunc_2s
(
col
,
lengthcol
);
colfunc_2s
(
col
,
lengthcol
);
...
...
This diff is collapsed.
Click to expand it.
src/r_things.c
+
8
−
4
View file @
a2355fc0
...
@@ -628,7 +628,9 @@ void R_DrawMaskedColumn(column_t *column, unsigned lengthcol)
...
@@ -628,7 +628,9 @@ void R_DrawMaskedColumn(column_t *column, unsigned lengthcol)
if
(
windowtop
!=
INT32_MAX
&&
windowbottom
!=
INT32_MAX
)
if
(
windowtop
!=
INT32_MAX
&&
windowbottom
!=
INT32_MAX
)
{
{
if
(
windowtop
>
topscreen
)
dc_yl
=
(
windowtop
+
FRACUNIT
-
1
)
>>
FRACBITS
;
dc_yl
=
(
windowtop
+
FRACUNIT
-
1
)
>>
FRACBITS
;
if
(
windowbottom
<
bottomscreen
)
dc_yh
=
(
windowbottom
-
1
)
>>
FRACBITS
;
dc_yh
=
(
windowbottom
-
1
)
>>
FRACBITS
;
}
}
...
@@ -679,7 +681,9 @@ void R_DrawFlippedMaskedColumn(column_t *column, unsigned lengthcol)
...
@@ -679,7 +681,9 @@ void R_DrawFlippedMaskedColumn(column_t *column, unsigned lengthcol)
if
(
windowtop
!=
INT32_MAX
&&
windowbottom
!=
INT32_MAX
)
if
(
windowtop
!=
INT32_MAX
&&
windowbottom
!=
INT32_MAX
)
{
{
if
(
windowtop
>
topscreen
)
dc_yl
=
(
windowtop
+
FRACUNIT
-
1
)
>>
FRACBITS
;
dc_yl
=
(
windowtop
+
FRACUNIT
-
1
)
>>
FRACBITS
;
if
(
windowbottom
<
bottomscreen
)
dc_yh
=
(
windowbottom
-
1
)
>>
FRACBITS
;
dc_yh
=
(
windowbottom
-
1
)
>>
FRACBITS
;
}
}
...
...
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