raphaelgoulart / ya_inputdisplay

Yet another input display for Clone Hero / YARG
16 stars 3 forks source link

Address multiple compiler warnings and rename a few variants for clarity #14

Closed SkyJumper409x closed 4 months ago

SkyJumper409x commented 4 months ago

Specifically, i renamed btn to kb_btn (in multiple files), Singleton.w to width and inputbtn.max_a to max_alpha. This is mostly for readability and removing ambiguity. The rename from btn to kb_btn is also applied to the config.

The addressed compiler warnings were mostly related to unused delta parameters in the _process(delta) methods of multiple scripts, which I renamed to _delta. Additionally there was some variant shadowing in Singleton._notification(what).

One compiler warning was related to integer division being done in InputBar.gd, and the decimal place being discarded. This is odd, as the width can very well be set to a decimal value in the config, which would also result in decimal value division. Nonetheless, i added a floor() statement around the variants to ensure that the decimal places will always be rounded down after the division.

To differentiate between the old and new iteration of the config, i added a "Meta" section with a "config_version" parameter. I decided the config version for the current config is 1, and the config version that uses this change is 1.1 I am currently doing a lot of config modifications on a separate branch to fix a variety of issues relating to it, that will use config_version 2 because it changes a lot more.

I tested this build a bit and got no errors (except the ones that i am gonna address among other things, with config v2) but i mainly tested if the config was being written and read correctly.

Yeah this one is a lil big but its also more than it seems, i just wanted to make everything clear.

raphaelgoulart commented 4 months ago

I'll review and test it asap! Thanks