Author Topic: [Suggestion] Fix wide screen aspect ratio in briefings, techroom and so on...  (Read 9218 times)

0 Members and 1 Guest are viewing this topic.

Offline Axem

  • 211
Re: [Suggestion] Fix wide screen aspect ratio in briefings, techroom and so on...
    • I haven't taken a good look at Lua yet, but I'm happy to say that Axem's script still appears to work as intended, complete with the background stretching. I don't know if it's possible to stretch a Lua menu based on the -stretch_menu flag, though.

    Wait, no! I think I didn't make it clear. Since I'm trying to emulate FreeSpace's interface system, I would want it to match how your system scales the background. If there's a non-stretched interface, I wouldn't want my interface to be stretched. The best way I could think of to do this is to get some sort of function that returns scaled interface coordinates?

     

    Offline Yarn

    • 210
    Re: [Suggestion] Fix wide screen aspect ratio in briefings, techroom and so on...
    I updated the patch and build to add a new Lua function, isMenuStretched(), which returns true if the main interface is stretched to fill the screen, and false otherwise. (Yes, I tested it; it appears to return the correct values.) If you want your script to match FS2's scaling behavior, you still need to write it in a way that does that; the game won't add the black bars for you if you don't.
    "Your fighter is running out of oil.  Please check under the hood and add more if necessary"
    --strings.tbl, entry 177

    "Freespace is very tired.  It is shutting down to get some rest."
    --strings.tbl, entry 178

     

    Offline Yarn

    • 210
    Re: [Suggestion] Fix wide screen aspect ratio in briefings, techroom and so on...
    The patch and build have been updated again. This should be ready for code review once Axem confirms that everything is good on the Lua side.
    "Your fighter is running out of oil.  Please check under the hood and add more if necessary"
    --strings.tbl, entry 177

    "Freespace is very tired.  It is shutting down to get some rest."
    --strings.tbl, entry 178

     

    Offline Axem

    • 211
    Re: [Suggestion] Fix wide screen aspect ratio in briefings, techroom and so on...
    Yeah, the function seems to work as expected. :)

     

    Offline niffiwan

    • 211
    • Eluder Class
    Re: [Suggestion] Fix wide screen aspect ratio in briefings, techroom and so on...
    I was doing some testing and noticed this issue:



    It looks like it's related to this chunk of the patch.

    Code: [Select]
    diff --git a/code/sound/sound.cpp b/code/sound/sound.cpp
    index ddb2cbf..b513401 100644
    --- a/code/sound/sound.cpp
    +++ b/code/sound/sound.cpp
    @@ -216,7 +216,7 @@ void snd_spew_debug_info()
            int interface_sounds = 0;
            int done = 0;
     
    -       if(!Sound_spew){
    +       if(Sound_spew){
                    return;
            }
     
    @@ -252,10 +252,10 @@ void snd_spew_debug_info()
     
            // spew info
            gr_set_color_fast(&Color_normal);
    -       gr_printf(30, 100, "Game sounds : %d\n", game_sounds);
    -       gr_printf(30, 110, "Interface sounds : %d\n", interface_sounds);
    -       gr_printf(30, 120, "Message sounds : %d\n", message_sounds);
    -       gr_printf(30, 130, "Total sounds : %d\n", game_sounds + interface_sounds + message_sounds);
    +       gr_printf_no_resize(30, 100, "Game sounds : %d\n", game_sounds);
    +       gr_printf_no_resize(30, 110, "Interface sounds : %d\n", interface_sounds);
    +       gr_printf_no_resize(30, 120, "Message sounds : %d\n", message_sounds);
    +       gr_printf_no_resize(30, 130, "Total sounds : %d\n", game_sounds + interface_sounds + message_sounds);
     }
     
     // ---------------------------------------------------------------------------------------

    I think it can be "removed again" by reverting the 1st section, but I'm kinda confused as to why the 2nd section is outputting text inti 3D space, rather than 2D like the (e.g.) FPS counter.
    Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
    ----
    Debian Packages (testing/unstable): Freespace2 | wxLauncher
    ----
    m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

     

    Offline Yarn

    • 210
    Re: [Suggestion] Fix wide screen aspect ratio in briefings, techroom and so on...
    I must have changed that if statement to test that part of the code (I couldn't, and still can't, figure out how to test it otherwise). The inclusion of that change in the patch is completely unintentional. I'll get a new patch and build up soon. (EDIT: It's uploaded now.)

    As for what you experienced, I was able to reproduce it by changing only that if statement, so it appears to be unrelated to my patch (aside from that one little change). If you know how to properly enable the sound info display, perhaps try that with an unmodified build and see if the bug still occurs.
    « Last Edit: March 27, 2014, 01:19:51 am by Yarn »
    "Your fighter is running out of oil.  Please check under the hood and add more if necessary"
    --strings.tbl, entry 177

    "Freespace is very tired.  It is shutting down to get some rest."
    --strings.tbl, entry 178

     

    Offline Yarn

    • 210
    Re: [Suggestion] Fix wide screen aspect ratio in briefings, techroom and so on...
    I finally figured out how you're supposed to make the sound info appear: Press shift+enter to enter the debug console, then enter show_sounds. I tried this with an unpatched build, and the info was still rendered in 3D space! So, my patch definitely isn't causing it.

    I also noticed that the debug console was still stretched; I updated the patch and builds again to fix that. Hopefully, no more changes are needed.
    "Your fighter is running out of oil.  Please check under the hood and add more if necessary"
    --strings.tbl, entry 177

    "Freespace is very tired.  It is shutting down to get some rest."
    --strings.tbl, entry 178

     

    Offline Bryan See

    • Has anyone really been far as decided to use even go want to do look more like?
    • 210
    • Trying to redeem.
      • Skype
      • Steam
      • Twitter
    Re: [Suggestion] Fix wide screen aspect ratio in briefings, techroom and so on...
    Tried your patch, Yarn. Works best. I'd like to see this commit added to SVN as urgent, given the circumstances.

     

    Offline The E

    • He's Ebeneezer Goode
    • Moderator
    • 213
    • Nothing personal, just tech support.
      • Steam
      • Twitter
    Re: [Suggestion] Fix wide screen aspect ratio in briefings, techroom and so on...
    Okay, just to be clear here: "Urgent" are issues like "game crashes while starting FS2 retail". Or "FSO will sometimes corrupt VP files". This? This is not urgent. It's nice and good to have, but it is very emphatically not "urgent".

    Nevertheless, it should be appearing in the next nightly.
    If I'm just aching this can't go on
    I came from chasing dreams to feel alone
    There must be changes, miss to feel strong
    I really need lifе to touch me
    --Evergrey, Where August Mourns