I've started thinking about the rotation/mirror thing again.
I've looked through the latest MAME code and I see the following still being used in the GAME macro...
0 ORIENTATION_FLIP_X ORIENTATION_FLIP_X ^ ROT270 ORIENTATION_FLIP_Y ORIENTATION_FLIP_Y ^ ORIENTATION_FLIP_X ORIENTATION_SWAP_XY ROT0 | ORIENTATION_FLIP_X ROT270|ORIENTATION_FLIP_X ROT90 ^ ORIENTATION_FLIP_Y
I'd like to standardize these to one of the standard 8 cases I identified in the first post in this thread...
rotate 0 rotate 90 rotate 180 rotate 270 rotate 0 + flip x rotate 90 + flip x rotate 180 + flip x rotate 270 + flip x
Which using MAME defines in the macro would be...
ROT0 ROT90 ROT180 ROT270 ROT0 ROT0^ORIENTATION_FLIP_X ROT90^ORIENTATION_FLIP_X ROT180^ORIENTATION_FLIP_X ROT270^ORIENTATION_FLIP_X
I'd also like to introduce shorthand defines for the last four if that would be ok with MAMEdev...
ROT0_FLIPX ROT90_FLIPX ROT180_FLIPX ROT270_FLIPX
If you think about it, the fundamental defines for orientation are...
#define ORIENTATION_FLIP_X 0x0001 /* mirror everything in the X direction */ #define ORIENTATION_FLIP_Y 0x0002 /* mirror everything in the Y direction */ #define ORIENTATION_SWAP_XY 0x0004 /* mirror along the top-left/bottom-right diagonal */
All the other defines are just combinations of the above for convenience, mainly used in the GAME macro.
I propose that we have 8 "convenience" defines...
#define ROT0 0 #define ROT90 (ORIENTATION_SWAP_XY | ORIENTATION_FLIP_X) /* rotate clockwise 90 degrees */ #define ROT180 (ORIENTATION_FLIP_X | ORIENTATION_FLIP_Y) /* rotate 180 degrees */ #define ROT270 (ORIENTATION_SWAP_XY | ORIENTATION_FLIP_Y) /* rotate counter-clockwise 90 degrees */
#define ROT0_FLIPX ORIENTATION_FLIP_X /* flip X axis */ #define ROT90_FLIPX ORIENTATION_SWAP_XY /* rotate clockwise 90 degrees and flip X axis */ #define ROT180_FLIPX ORIENTATION_FLIP_Y /* rotate 180 degrees and flip X axis */ #define ROT270_FLIPX (ORIENTATION_SWAP_XY | ORIENTATION_FLIP_Y | ORIENTATION_FLIP_X) /* rotate counter-clockwise 90 degrees and flip X axis */
Thoughts anyone?
GroovyMAME support forum on BYOAC
|