#35283 - mr_square - Wed Feb 02, 2005 4:32 pm
Bizarre problem here - I'm trying to make an enemy rotate. My code differentiates between enemies facing left and facing right using the following code:
Literally the only code difference is the addition of the HORIZONTAL_FLIP flag, but whenever enemies are facing left, they come up as big single blocks of colour (as though its zoomed too far). Take out the HORIZONTAL_FLIP flag, and they look fine. Whats going on??
Code: |
if //facing right.... { sprites[x].attribute0 = COLOR_256 | SQUARE | ROTATION_FLAG | yPos & 0x00FF; sprites[x].attribute1 = SIZE_64 | ROTDATA(17 + x) | xPos & 0x01FF; etc... } else //facing left... { { sprites[x].attribute0 = COLOR_256 | SQUARE | ROTATION_FLAG |yPos & 0x00FF; sprites[x].attribute1 = SIZE_64 | HORIZONTAL_FLIP | ROTDATA(17 + x) | xPos & 0x01FF; etc... } |
Literally the only code difference is the addition of the HORIZONTAL_FLIP flag, but whenever enemies are facing left, they come up as big single blocks of colour (as though its zoomed too far). Take out the HORIZONTAL_FLIP flag, and they look fine. Whats going on??