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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Miguel Gustavo Rodrigues Teixeira
SRB2
Commits
9d6cb931
Commit
9d6cb931
authored
1 year ago
by
Lactozilla
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup R_DrawPrecipitationVisSprite and fix a warning
parent
379c163b
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/r_things.c
+4
-18
4 additions, 18 deletions
src/r_things.c
with
4 additions
and
18 deletions
src/r_things.c
+
4
−
18
View file @
9d6cb931
...
@@ -988,21 +988,12 @@ static void R_DrawVisSprite(vissprite_t *vis)
...
@@ -988,21 +988,12 @@ static void R_DrawVisSprite(vissprite_t *vis)
// Special precipitation drawer Tails 08-18-2002
// Special precipitation drawer Tails 08-18-2002
static
void
R_DrawPrecipitationVisSprite
(
vissprite_t
*
vis
)
static
void
R_DrawPrecipitationVisSprite
(
vissprite_t
*
vis
)
{
{
column_t
*
column
;
patch_t
*
patch
=
vis
->
patch
;
#ifdef RANGECHECK
INT32
texturecolumn
;
#endif
fixed_t
frac
;
patch_t
*
patch
;
INT64
overflow_test
;
//Fab : R_InitSprites now sets a wad lump number
patch
=
vis
->
patch
;
if
(
!
patch
)
if
(
!
patch
)
return
;
return
;
// Check for overflow
// Check for overflow
overflow_test
=
(
INT64
)
centeryfrac
-
(((
INT64
)
vis
->
texturemid
*
vis
->
scale
)
>>
FRACBITS
);
INT64
overflow_test
=
(
INT64
)
centeryfrac
-
(((
INT64
)
vis
->
texturemid
*
vis
->
scale
)
>>
FRACBITS
);
if
(
overflow_test
<
0
)
overflow_test
=
-
overflow_test
;
if
(
overflow_test
<
0
)
overflow_test
=
-
overflow_test
;
if
((
UINT64
)
overflow_test
&
0xFFFFFFFF80000000ULL
)
return
;
// fixed point mult would overflow
if
((
UINT64
)
overflow_test
&
0xFFFFFFFF80000000ULL
)
return
;
// fixed point mult would overflow
...
@@ -1018,23 +1009,18 @@ static void R_DrawPrecipitationVisSprite(vissprite_t *vis)
...
@@ -1018,23 +1009,18 @@ static void R_DrawPrecipitationVisSprite(vissprite_t *vis)
dc_texturemid
=
vis
->
texturemid
;
dc_texturemid
=
vis
->
texturemid
;
dc_texheight
=
0
;
dc_texheight
=
0
;
frac
=
vis
->
startfrac
;
spryscale
=
vis
->
scale
;
spryscale
=
vis
->
scale
;
sprtopscreen
=
centeryfrac
-
FixedMul
(
dc_texturemid
,
spryscale
);
sprtopscreen
=
centeryfrac
-
FixedMul
(
dc_texturemid
,
spryscale
);
windowtop
=
windowbottom
=
sprbotscreen
=
INT32_MAX
;
windowtop
=
windowbottom
=
sprbotscreen
=
INT32_MAX
;
if
(
vis
->
x1
<
0
)
if
(
vis
->
x1
<
0
)
vis
->
x1
=
0
;
vis
->
x1
=
0
;
if
(
vis
->
x2
>=
vid
.
width
)
if
(
vis
->
x2
>=
vid
.
width
)
vis
->
x2
=
vid
.
width
-
1
;
vis
->
x2
=
vid
.
width
-
1
;
fixed_t
frac
=
vis
->
startfrac
;
for
(
dc_x
=
vis
->
x1
;
dc_x
<=
vis
->
x2
;
dc_x
++
,
frac
+=
vis
->
xiscale
)
for
(
dc_x
=
vis
->
x1
;
dc_x
<=
vis
->
x2
;
dc_x
++
,
frac
+=
vis
->
xiscale
)
{
R_DrawMaskedColumn
(
Patch_GetColumn
(
patch
,
frac
>>
FRACBITS
));
texturecolumn
=
frac
>>
FRACBITS
;
column
=
Patch_GetColumn
(
patch
,
texturecolumn
);
R_DrawMaskedColumn
(
column
);
}
colfunc
=
colfuncs
[
BASEDRAWFUNC
];
colfunc
=
colfuncs
[
BASEDRAWFUNC
];
}
}
...
...
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