GTcreyon / SM63Redux

Code base for Super Mario 63 Redux
https://sm63redux.com
Mozilla Public License 2.0
195 stars 27 forks source link

Fix all spots which give int division warnings #205

Closed Koopa1018 closed 1 year ago

Koopa1018 commented 1 year ago

Description of changes

Fix all remaining spots which give int-division warnings.

Spots commented with # warning-ignore:integer_division were upgraded to use the proper Godot 4 version of that command (@warning_ignore("integer_division")).

I'm assuming other erroring divisions were expected to divide as float, so any such spots have been upgraded with the required casts to make that happen.

A lot of these warnings came from spots that were using get_window().size. Many of them called this function multiple times per function, or even per line, and that seems a bit stinky...so I rewrote them to call once, convert to a float vector, then reuse the converted vector. Also saves horizontal real estate in the scripts.

jaschutte commented 1 year ago

Checked this some time ago, but forgot to do anything with it hehe