Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raven RawScreen Aspect Fix #546

Merged

Conversation

andrikpowell
Copy link
Contributor

@andrikpowell andrikpowell commented Dec 1, 2024

So a thing that's bothered me for quite a while is that the "RawScreen"s that Raven uses have only been rendered using the "Not Adjusted" stretch setting... regardless of the stretch settings.

This PR fixes that and the issue mentioned here (#467). They are both related to the same issue in different ways. The problem with the specific issue, was that the "RawScreen" under "Fit to Width" was supposed to fit to width (imagine that), but code was set to prevent that.

Now the "RawScreen"s will look as they should for all three settings: "Not Adjusted", "Doom Format", and "Fit to Width". I will mention that the "RawScreen" code seems a bit WIP, so eventually there may be a better way to approach this further down the line.

One of the reasons the format was previously forced was probably due to the Raven Statusbar not being rendered properly under "Not Adjusted"... But the "RawScreen"s don't have that issue.

I haven't been able to fix the Raven Statusbar for "Not Adjusted", so I have it using the "Doom Format" stretch settings (just as DSDA Doom currently does).

@andrikpowell andrikpowell force-pushed the dsda_raven_rawscreen_aspect_fix branch from 76b5de0 to 8b951bf Compare December 1, 2024 01:19
prboom2/src/dsda/stretch.c Outdated Show resolved Hide resolved
prboom2/src/dsda/stretch.c Outdated Show resolved Hide resolved
prboom2/src/st_stuff.c Outdated Show resolved Hide resolved
prboom2/src/v_video.c Show resolved Hide resolved
@andrikpowell andrikpowell force-pushed the dsda_raven_rawscreen_aspect_fix branch 2 times, most recently from 29b2e45 to 80e6229 Compare December 5, 2024 00:00
@andrikpowell
Copy link
Contributor Author

Is this better?

@fabiangreffrath
Copy link
Collaborator

Most of these changes appear redundant with code that is alrady there. It would be easier to implement a function (or macro) that returns (raven && stretch == patch_stretch_not_adjusted) ? patch_stretch_doom_format : stretch and use this in the switch statements instead of redefining in a later paragraph what was already checked before. This would also hold up the "temporary" aspect of these changes, as that function could later be changed to just return stretch (or get removed entirely).

@andrikpowell andrikpowell force-pushed the dsda_raven_rawscreen_aspect_fix branch from 80e6229 to e9506a1 Compare January 15, 2025 08:52
@andrikpowell
Copy link
Contributor Author

Most of these changes appear redundant with code that is alrady there. It would be easier to implement a function (or macro) that returns (raven && stretch == patch_stretch_not_adjusted) ? patch_stretch_doom_format : stretch and use this in the switch statements instead of redefining in a later paragraph what was already checked before. This would also hold up the "temporary" aspect of these changes, as that function could later be changed to just return stretch (or get removed entirely).

I think this is close to what you were suggesting? (check force push)

@fabiangreffrath
Copy link
Collaborator

I think this is close to what you were suggesting? (check force push)

Yes, except that it now uses the global render_stretch_hud in InitStretchParam() instead of the passed stetch parameter.

@andrikpowell
Copy link
Contributor Author

Yes, except that it now uses the global render_stretch_hud in InitStretchParam() instead of the passed stetch parameter.

How do you wanna get around that?

Because the only way to force that switch statement to use patch_stretch_doom_format is to not use the passed stretch parameter.

I guess we could have a if (stretch_hud != stretch) then stretch == stretch_hud above?

@fabiangreffrath
Copy link
Collaborator

How do you wanna get around that?

#define stretch_hud(a) ((raven && (a) == patch_stretch_not_adjusted) ? patch_stretch_doom_format : (a))

- Note that stbar in "Not Adjusted" aspect currently uses settings for "Doom Format"
@andrikpowell andrikpowell force-pushed the dsda_raven_rawscreen_aspect_fix branch from e9506a1 to 962bd1c Compare January 15, 2025 09:21
@andrikpowell
Copy link
Contributor Author

andrikpowell commented Jan 15, 2025

How do you wanna get around that?

#define stretch_hud(a) ((raven && (a) == patch_stretch_not_adjusted) ? patch_stretch_doom_format : (a))

oh fascinating! This is actually the first time I've seen a #define statement with arguments! That's actually really cool.

Force pushed new version with that included.

Copy link
Collaborator

@fabiangreffrath fabiangreffrath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now, thank you!

@Pedro-Beirao Pedro-Beirao merged commit 9e2d8d0 into kraflab:master Jan 15, 2025
5 checks passed
@Pedro-Beirao
Copy link
Collaborator

Thank you both!

@andrikpowell andrikpowell deleted the dsda_raven_rawscreen_aspect_fix branch January 15, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants