JNechaevsky / international-doom

Small, functional and simple source ports, created with help, efforts and bits of code from people around the world.
https://jnechaevsky.github.io/inter-doom/
GNU General Public License v2.0
25 stars 1 forks source link

Bunny-screen seems to not like 16:9 aspect ratio #138

Closed Meerschweinmann closed 3 months ago

Meerschweinmann commented 3 months ago

Hi Julia.

I have found something strange. On my ultrawide monitor at home and my 16:10 notebook DOOM's Bunny-screen works as intended.

But today i was on another PC with an 16:9 monitor and, because i have been playing around with widescreen assets, i found out that everytime DOOM wants to show the Bunny-screen, the game closes without warning.

When i choose another aspect ratio as 16:9/match screen on that PC, the Bunny-screen works.

That happens to me with Version 7.4 and the actual dev-build.

Meerschweinmann commented 3 months ago

Can confirm that this happened on my 16:10 notebook too, when i set an aspect ratio of 16:9.

Meerschweinmann commented 3 months ago

Have to add once more. It happens only when 4x or 6x resolution in combination with 16:9 is chosen. 3x and 5x are fine.

JNechaevsky commented 3 months ago

Sigh, that poor bunny again. Thank you, I was able to reproduce it. Interestingly, on my side it does not happen with widescreen assets loaded, just with stock IWAD pictures. But what is the cause - that's a question of the day. 🤤

Meerschweinmann commented 3 months ago

Poor Daisy :)

Yes, i could reproduce it without widescreen assets too. Sorry, forgot to mention this. Trying out without widescreen assets after the first crash was the first thing i had done, because first i thought the ws assets were the problem. What irritates me ist that it happens with 4x resolution. 1x,2x,4x are easier to scale than 3x or 5x. Don't know how to say in english, but hope you get what i mean.

JNechaevsky commented 3 months ago

Could you please try this? This seems to do the trick:

+++ inter-doom/src/doom/f_finale.c  Tue Jun 18 21:35:37 2024
@@ -779,7 +779,7 @@

     for (x = pillar_width; x < SCREENWIDTH - pillar_width; x++)
     {
-        int x2 = ((x * dxi) >> FRACBITS) - WIDESCREENDELTA + scrolled;
+        int x2 = ((x * dxi) >> FRACBITS) - WIDESCREENDELTA + scrolled - 1;

         if (x2 < p2offset)
             F_DrawPatchCol (x, p1, x2 - p1offset);

I.e. just add -1 in the end of int x2 line. I got you, don't worry. 🙂 Not very responsive today, woke up this morning with odd exhaustion like was moving crates all the night.

Meerschweinmann commented 3 months ago

I will edit the line, built new and try this.

One thing i have noticed in another test now. The crash does only occur when the first of the two bunny pictures is shown. When it scrolls and i switch from 3x to 4x res nothing bad happens. When the first bunny picture is shown, does not scroll and i switch then from 3x to 4x it crashes.

Meerschweinmann commented 3 months ago

Not very responsive today, woke up this morning with odd exhaustion like was moving crates all the night.

Had first to translate what that means. I know exhausts from cars :) I hope it is nothing bad and wish you a speedy recovery.

Meerschweinmann commented 3 months ago

Your "-1" solution with the bunny screen works. I have switched through all resolution before the first bunny screen scrolls and did not get a crash. When i did that before that change it crashed.

JNechaevsky commented 3 months ago

Yeah, just tried same way, with and without assets: once bunny screen appears and later scrolls, I simply was holding a finger on rendering resolution changing. What was going on? Honestly, no idea. This function was written by Michael for Crispy Doom where there is no > 3x resolutions. I just briefly looked through the function and thought what can possible happens. Yeah-yeah, this is exactly how programming magic is working! 😅

I'm fine, nothing bad happened. Probably just need to be on a fresh air more often, not just on weekends.

Meerschweinmann commented 3 months ago

Yeah, fine that this problem is solved before the next release. My two main monitors are an ultrawide 1440p (43:18) and my 16:10 notebook. Normally i had never seen that crash, but today i was on another PC with a 16:9 monitor and luckily i had chosen one of those two critical resolutions and wanted to see the bunny screen. That was pure luck, you have to find this composition first :)

And yes, an open window or going outside works wonders :)