-
Notifications
You must be signed in to change notification settings - Fork 132
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
Fix automap marks dissapering near left side of the screen #1127
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Allow me please to break head more on |
Hm, this seems to be working fine and fixing marks blinking in both normal and void AM_drawMarks(void)
{
- int i, fx, fy, w, h;
+ int i, fx, fx_flip, fy, w, h;
mpoint_t pt;
for (i=0;i<AM_NUMMARKPOINTS;i++)
@@ -2068,10 +2068,11 @@
{
AM_rotatePoint(&pt);
}
- fx = (flipscreenwidth[CXMTOF(pt.x)] >> crispy->hires) - 1;
+ fx = (CXMTOF(pt.x) >> crispy->hires) - 1;
fy = (CYMTOF(pt.y) >> crispy->hires) - 2;
+ fx_flip = (flipscreenwidth[CXMTOF(pt.x)] >> crispy->hires) - 1;
if (fx >= f_x && fx <= (f_w >> crispy->hires) - w && fy >= f_y && fy <= (f_h >> crispy->hires) - h)
- V_DrawPatch(fx - WIDESCREENDELTA, fy, marknums[i]);
+ V_DrawPatch(fx_flip - WIDESCREENDELTA, fy, marknums[i]);
}
} I.e., we are drawing mark patch with taking to account possible flipped screen width, but keeping it in strictly original/positive screen bounds (damn, language barriers!). But I wonder if it could be simplified, such "doubling" doesn't looks nice. Simple |
While we here. It is critical.
I think it's all done now. To summarize, this PR making two things:
Still don't like that |
@@ -854,7 +854,8 @@ AM_Responder | |||
if (!followplayer && (ev->data2 || ev->data3)) | |||
{ | |||
// [crispy] mouse sensitivity for strafe | |||
m_paninc2.x = FTOM(ev->data2*(mouseSensitivity_x2+5)/(160 >> crispy->hires)); | |||
const int flip_x = (ev->data2*(mouseSensitivity_x2+5)/(160 >> crispy->hires)); | |||
m_paninc2.x = crispy->fliplevels ? -FTOM(flip_x) : FTOM(flip_x); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! I never realized this was wrong, because honestly, how often do you play with flipped levels? 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly? Pretty rarely and only in vanilla IWADs. But I still remember very well first time effect - dizziness and disorientation. Literally almost hit my face on the corner of the wall while trying to walk out from my room after one hour of playing. That's was quite something!
But it was 2017 I think. Far later, in the end of 2019 in pre- New Year celebration at day job, I have tried expensive VR helmet with some kind of zombie shooter game. While playing everything was okay. But about 10 minutes after, different feeling comes: like I was lost between two realities. It's hard to describe, but something like: eyes are seeing one, traditional scene and surroundings, while brain still thinks that I'm "somewhere else" and do not accepts current reality. But no dizziness and disorientation, just heavily annoying "desync" which was standing for a few hours.
Fortunately, my wife was near by, and walking to home was much easier than it could be. Well, she wasn't wife back then, it was happened just a 6 months later. 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
Fixes this case in widescreen mode:
crispy-doom.2023-12-17.17-49-01-406.mp4
Hovewer! There is a small problem with Doom, caused by
flipscreenwidth
. This is won't happent if justCXMTOF(pt.x)
will be used. Note how1
is blinking and appearing when it shouldn't. It was happening even before my fix.crispy-doom.2023-12-17.18-45-56-925.mp4
Not sure how to fix this blinking, no ideas yet... 🤔