Jump to content
The Dark Mod Forums

OnionKnight

Member
  • Posts

    3
  • Joined

  • Last visited

Posts posted by OnionKnight

  1. Yep I assumed it was all 16:9. The code can be modified so referenceAspect is no longer const. It could use 16:9 as default and for other aspect ratios perhaps forceAspectWidth/Height can be set on those screens and the referenceAspect would be calculated based on those values.

    I agree it would be nice to drop special images for different aspect ratios. I was able to change the spyglass & keyhole images to always use the 16:9 image and it worked nicely. The issue is just finding a way to have the black background continue outside the letterbox area so the game viewport is not leaking through.

    With the fullscreen changes I was hoping to find some general way of correcting the UI without having to change the content too much, ideally so mission creators wouldn't have to go back and change their content to support different aspect ratios. I did however hit a roadblock because it seems that loading screens and briefing screens are copypasted for every mission so this content may need to be patched anyway.

    If a whole pass on the GUI files is necessary anyway I would skip the fullscreen hack and aspectAware parameter and go with something else that makes sense.

    • Like 1
  2. I noticed those flags though pretty late in my exploration when I was looking at how the glasses worked. The aspect ratio is currently wrong on those galsses right now but I noticed the black transparency extends nicely onto the sides. Tried getting the spyglass looking as nice but adding a black background would also cover the spyglass lens.

    I suppose the h/center and forceAspecWidth/Height have to be applied to every GUI file or at least the root windowDefs. My attempt goes for an automated approach and GUI authors can use flags to stop control it. Attaching all the stuff I did if you want to have a look.

    • Patch1.patch - Letterboxing for windowDefs. Menu cursor aspect rendering fix. Adds xOffset and yOffset to DeviceContext and a RestoreCoords() for reverse AdjustCoords() calculation.
    • Patch2.patch - Adjust clip rect coords so elements can render outside the letterbox like world books. Backgrounds will render fullscreen if the rect looks like a fullscreen rect.
    • Patch3.patch - Adds the aspectAware flag for making exceptions to rendering fullscreen rects so they become letterboxed instead.

    Patch1.patch Patch2.patch Patch3.patch

    • Thanks 1
×
×
  • Create New...