Switched running the LUA script from the emuThread to the main window / main GUI thread... Should have just done this from the start, this makes things much simpler to implement, and will make future planned GUI functions much easier to add.
Renamed "MelonPrint" to just "print",
TIL you can redefine pretty much any lua funct...
Also fixed the lua console not re-opening after closing it the first time.
Refactored code to make use of new LuaBundle class, this is to bring the implementation closer inline with how EmuThread is implemented, and should now be compatible with multiple emuInstances, if needed. also should make adding support for multiple lua scripts a bit easier as well.
* maintain precision until all lights are calculated
fixes lugia on the soul silver title screen
* small optimization
* small note
* small cleanup/notes
shouldn't need to check that every time, since the variable shouldn't be able to overflow
* hw doesn't cap difflevel at 255
Should it cap at all?
Can vtx colors overflow...?
* diffuse level appears to be shifted right by 9
fixes some minor inaccuracies
* improve specular lighting a little
* small improvement to diffuse lighting
fixes a few off by ones
- finding by azusa
* small tweaks
* handle overflows of diffuse lighting properly
-credits to azusa once more
* attempt at improving specular lighting calcs
still far from correct, but its a start.
fixes: https://github.com/melonDS-emu/melonDS/issues/1545
* meh
* improve specular lighting further
* add notes
* theory: add half vec instead of subt 1
* implement azusa's specular lighting algorithm
* fix minor edge case with spec lighting
* give proper credit in comments
* fix some bugs/misc tweaks
* more quirky overflow/underflow handling
* fix a spec lighting edgecase
remove some redundant parentheses
* fix an edge case with light vector calcs
* spec recip uses a different calc for light dir?
also remove a check that shouldn't be mathematically possible to trigger
* nvm that thing i thought couldn't trigger was required
also move reciprocal calc into the light vector calc function since i might as well now ig
* replace a bunch of stuff with much *much* simpler algorithms
* misc cleanup
PARENTHESES WOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
* leave a note abt shininess table's default value being incorrect
* Resolve symlinks to avoid including the same thing twice (like
version-numered dylib symlinks)
* Look in all Qt prefix paths for plugins - the package may not
necessarily have the same path
* reduce install_name_tool invocations to make it a bit faster
* change dylib IDs to remove original source path