Author Topic: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time  (Read 42271 times)

0 Members and 1 Guest are viewing this topic.

Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
Hello, I have a few newb questions. :confused:
I'm using fs2_open_3_7_2_RC4.exe and a 1920x1080 display.

1. Why is the HUD so small in 1920x1080 resolution?
2. Can I make it bigger again?

Thank you for your time.

 

Offline niffiwan

  • 211
  • Eluder Class
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
1) It's small because the mod you're using has set the gauges to not scale up.  This is to avoid fuzzy looking gauges.
2) Yes, but it's not super simple.  Can you advise which mod you're using as the fix will probably be mod dependent.
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...

 
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
The problem seems to be exclusive to the combination of 3.7.2 RC4 with MediaVPs_2014.
Curiously, the problem is not present when I'm using MediaVPs_3612 (with 3.7.2 RC4!) or any other mod as far as I can tell.

Is there some kind of flag or piece of code that controls the scaling? Can you tell me where to find it?

I tried playing MediaVPs_2014 with fs2_open_3_7_0.exe... but all I get is this error:

Code: [Select]
ERANGE: String error. Please Report.
Trying to put into 32 byte buffer:
ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌ.
ntdll.dll! ZwWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_7_0-DEBUG.exe! SCP_DumpStack + 354 bytes
fs2_open_3_7_0-DEBUG.exe! Error + 229 bytes
fs2_open_3_7_0-DEBUG.exe! scp_strcpy_s + 297 bytes
fs2_open_3_7_0-DEBUG.exe! scp_strcpy_s<32> + 53 bytes
fs2_open_3_7_0-DEBUG.exe! cf_search_root_pack + 873 bytes
fs2_open_3_7_0-DEBUG.exe! cf_build_file_list + 131 bytes
fs2_open_3_7_0-DEBUG.exe! cf_build_secondary_filelist + 166 bytes
fs2_open_3_7_0-DEBUG.exe! cfile_init + 398 bytes
fs2_open_3_7_0-DEBUG.exe! game_init + 291 bytes
fs2_open_3_7_0-DEBUG.exe! game_main + 519 bytes
fs2_open_3_7_0-DEBUG.exe! WinMain + 330 bytes
fs2_open_3_7_0-DEBUG.exe! __tmainCRTStartup + 358 bytes
fs2_open_3_7_0-DEBUG.exe! WinMainCRTStartup + 15 bytes
kernel32.dll! BaseThreadInitThunk + 18 bytes
ntdll.dll! RtlInitializeExceptionChain + 99 bytes
ntdll.dll! RtlInitializeExceptionChain + 54 bytes
« Last Edit: September 07, 2014, 10:21:43 am by Starforged »

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
I tried playing MediaVPs_2014 with fs2_open_3_7_0.exe... but all I get is this error:
First, the 2014 MediaVPs won't work with 3.7.0. Secondly, that error means that 3.7.0 won't work in a file path that long.

As niffiwan already said:
It's small because the mod you're using has set the gauges to not scale up.
The 2014 MediaVPs have a very simple mv_root-hdg.tbm, containing only 6 lines, of which 2 are blank and one is a comment, leaving only 3 actually parsed by the engine:
Code: [Select]
$Max Directives: 8
$Max Escort Ships: 13
$Scale Gauges: no
That last one is the one that is causing the HUD to be small. You can create your own *-hdg.tbm with a single line saying:
Code: [Select]
$Scale Gauges: yes
If you stick it in your /mediavps_2014/data/tables/ folder (which you will probably have to create), it will make the HUD scale without changing anything else. See the attached file for an example of such a modular table.

[attachment kidnapped by pirates]
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.

 
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
@AdmiralRalwood Thank you very much, that worked like a charm.  :yes:

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: [CODE REVIEW] Adaptable HUD, a.k.a. No more HUD stretching, for real this time
I just noticed that in BtA the target brackets around talking ships aren't present. It works in retail still (and MediaVPs2014, but they don't really have a fully hud_gauges.tbl), so it's definitely mod specific. I'm guessing it's something in hud_gauges.tbl that I didn't include? Any chance someone can point me in the right direction?

EDIT: I figured it out. If you've specified a 'Dot Filename:' under '+Target Brackets:' then the message brackets won't be drawn. This is a bug, so I'm putting it on Mantis.

EDIT 2: Except I couldn't reproduce on retail... hrm... Well at least I fixed it in my mod.


I dunno what's going on.. more testing required.

EDIT FINAL: Turns out it's not hud_gauges at all!
« Last Edit: September 29, 2014, 10:55:58 am by mjn.mixael »
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.