Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void SpriteManager::SetHFlip(bool a_bFlip, s32 a_SpriteID)
- {
- if (a_bFlip)
- {
- SpriteArray[a_SpriteID]->attr1 |= 0x1000;//Flips the sprite by directly affecting the flip bits using a mask
- }
- else
- {
- SpriteArray[a_SpriteID]->attr1 &= 0xefff;//Flips the sprite by directly affecting the flip bits using a mask
- }
- }
- void SpriteManager::SetVFlip(bool a_bFlip, s32 a_SpriteID)
- {
- if (a_bFlip)
- {
- SpriteArray[a_SpriteID]->attr1 |= 0x2000;//Flips the sprite by directly affecting the flip bits using a mask
- }
- else
- {
- SpriteArray[a_SpriteID]->attr1 &= 0xdfff;//Flips the sprite by directly affecting the flip bits using a mask
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement