mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
This macro is to make it so it won't be error-prone to write the semi-confusing `(a % b + b) % b` statement, and you can just use an easy macro instead. Currently, the only places a positive modulo is needed is when switching tilesets, enemies, and warp directions in the editor, as well as when getting a tile in the tower, since towers just repeat themselves vertically. Towers used this weird while-loop to sort of emulate a modulo, which isn't half-bad, but is unnecessary, and I don't think any compiler would recognize it as a modulo. (And if it's not optimized to a proper modulo... what happens if the number being moduloed is really, really big?)
112 KiB
112 KiB