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
e05eea01
Commit
e05eea01
authored
4 months ago
by
Hanicef
Browse files
Options
Downloads
Patches
Plain Diff
Improve HUD rendering when drawing stretched patches
parent
366b7113
Branches
Branches containing commit
No related tags found
1 merge request
!2635
Improve HUD rendering when drawing stretched patches
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/hardware/hw_draw.c
+2
-2
2 additions, 2 deletions
src/hardware/hw_draw.c
with
2 additions
and
2 deletions
src/hardware/hw_draw.c
+
2
−
2
View file @
e05eea01
...
@@ -256,8 +256,8 @@ void HWR_DrawStretchyFixedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t p
...
@@ -256,8 +256,8 @@ void HWR_DrawStretchyFixedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t p
}
}
// positions of the cx, cy, are between 0 and vid.width/vid.height now, we need them to be between -1 and 1
// positions of the cx, cy, are between 0 and vid.width/vid.height now, we need them to be between -1 and 1
cx
=
-
1
+
(
cx
/
(
vid
.
width
/
2
));
cx
=
-
1
.
0
f
+
(
cx
/
(
vid
.
width
/
2
.
0
f
));
cy
=
1
-
(
cy
/
(
vid
.
height
/
2
));
cy
=
1
.
0
f
-
(
cy
/
(
vid
.
height
/
2
.
0
f
));
// fwidth and fheight are similar
// fwidth and fheight are similar
fwidth
/=
vid
.
width
/
2
;
fwidth
/=
vid
.
width
/
2
;
...
...
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