Advertisement
Guest User

Untitled

a guest
Dec 11th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. void SpriteManager::SetHFlip(bool a_bFlip, s32 a_SpriteID)
  2. {
  3.     if (a_bFlip)
  4.     {
  5.         SpriteArray[a_SpriteID]->attr1 |= 0x1000;//Flips the sprite by directly affecting the flip bits using a mask
  6.     }
  7.     else
  8.     {
  9.         SpriteArray[a_SpriteID]->attr1 &= 0xefff;//Flips the sprite by directly affecting the flip bits using a mask
  10.     }
  11. }
  12. void SpriteManager::SetVFlip(bool a_bFlip, s32 a_SpriteID)
  13. {
  14.     if (a_bFlip)
  15.     {
  16.         SpriteArray[a_SpriteID]->attr1 |= 0x2000;//Flips the sprite by directly affecting the flip bits using a mask
  17.     }
  18.     else
  19.     {
  20.         SpriteArray[a_SpriteID]->attr1 &= 0xdfff;//Flips the sprite by directly affecting the flip bits using a mask
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement