Jump to content
The Dark Mod Forums

OnionKnight

Member
  • Posts

    3
  • Joined

  • Last visited

Reputation

8 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  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.
  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
  3. I've got myself a 32:9 monitor and because of how text-heavy these games are it was almost unplayable to go on reading text all the way from my left to my right. I'm an engine programmer by trade so I set out to fix this and wanted to share my results. This fix will center the UI for any resolution wider than 16:9. For resolution that are more square i.e. 4:3 and 5:4 the UI will be anchored to the bottom instead as having the bottom elements floating in the middle looks strange. I also had to employ a trick to make some fullscreen effects stay fullscreen instead of becoming letterboxed, such as the transparent black backgrounds when reading books. Any rect that is 0,0,640,480 or larger will be considered fullscreen and stretch as normal. Of course some are note supposed to stretch like the custom main menu backgrounds so I added a bool variable for windowDefs called aspectAware that can be set to override this behavior. I experimented doing the opposite but could never find out how to make the book backgrounds stretch so I went with this. Still haven't figured out how to position the compass correctly but it looks decent enough.
×
×
  • Create New...