These macros produced inaccurate assembly

This commit is contained in:
Clownacy 2019-09-15 18:44:03 +01:00
parent a55361ec2c
commit bc5a9b2d9f

View file

@ -7,8 +7,8 @@
#define PIXELS_TO_TILES(x) ((x) / 0x10)
#define PIXELS_TO_UNITS(x) ((x) * 0x200)
#define UNITS_TO_PIXELS(x) ((x) / 0x200)
#define TILES_TO_UNITS(x) (PIXELS_TO_UNITS(TILES_TO_PIXELS(x))) // * 0x2000
#define UNITS_TO_TILES(x) (PIXELS_TO_TILES(UNITS_TO_PIXELS(x))) // / 0x2000
#define TILES_TO_UNITS(x) ((x) * (0x200 * 0x10))
#define UNITS_TO_TILES(x) ((x) / (0x200 * 0x10))
#define SECONDS_TO_FRAMES(x) ((x) * 50)
#define FRAMES_TO_SECONDS(x) ((x) / 50)