JHGuitarFreak / UQM-MegaMod-Archived

UQM-HD Remastered plus a whole host of extra content and goodies
http://megamod.serosis.net
Other
21 stars 1 forks source link

Melee scaling mode is not properly loaded on startup, causing graphical issues #19

Closed Ala-lala closed 5 years ago

Ala-lala commented 5 years ago

The melee scaling mode doesn't seem to be properly converted on non-Android platforms when it is initially read from the config file upon startup, making the smooth zooming use nearest-neighbor scaling. This causes very noticeable graphical issues when using the original graphics and smooth zooming.

There are three workarounds that I could find:

Serosis commented 5 years ago

Snap. Thanks for pointing this out I'll take a look.

Serosis commented 5 years ago

Fixed

Ala-lala commented 5 years ago

This doesn't quite work either: getBoolConfigValueXlat requires the provided config value to be a boolean, whereas config.smoothmelee is an integer (0 or 1 on desktop platforms). This makes it always use the default setting (trilinear smooth scaling) on startup. Using something like:

if (res_IsInteger("config.smoothmelee") && !options->meleeScale.set) {
#if defined(ANDROID) || defined(__ANDROID__)
    options->meleeScale.value = res_GetInteger("config.smoothmelee");
#else
    options->meleeScale.value = res_GetInteger("config.smoothmelee") ? TFB_SCALE_TRILINEAR : TFB_SCALE_STEP;
#endif
    options->meleeScale.set = true;
}

instead should work.

Ala-lala commented 5 years ago

(This is minor, but also, line endings in uqm.c are inconsistent now: #else and the line below it use CRLF while the rest use LF)

Serosis commented 5 years ago

Yeah, that's Visual Studio for you, next time I open it up it will give me a pop-up about it.

Serosis commented 5 years ago

Fixed smooth scaling options in commit 6294c27. Overlooked that everything but Android was supposed to be boolean until you said something and that the value being written was always an integer before now.