GTcreyon / SM63Redux

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

Fix non-integer-division code warnings #220

Closed Koopa1018 closed 1 year ago

Koopa1018 commented 1 year ago

Description of changes

Fixes all remaining runtime warnings (that I could find).

I'm not certain about the use of @warning_ignore("shadowed_variable"). The affected functions' readability would take a hit if I renamed the variables instead, I think, but it still feels icky. Suggestions? (relevant scripts are player, character_sprite, terrain_border, and pause_button)

Issue(s)

N/A

Koopa1018 commented 1 year ago

That variable gets used in the very last line of the function. It's...kind of the whole point of the function.

Kuma-Boo commented 1 year ago

That variable gets used in the very last line of the function. It's...kind of the whole point of the function.

Don't know what I was thinking here, thank goodness I'm not programming this by myself. :P

Koopa1018 commented 1 year ago

As I check, though, you were right. It would've pulled from the class's frame variable, just like in the is_pressed situation. Not ideal for function purity, but it would've worked just the same.