#43391 - Impatient - Mon May 23, 2005 12:50 am
I have a mode 5 image that I need to center on the GBA display. I seem to recall there is a bit somewhere you just flick, and that centers the Mode5, am I correct?
Code: |
/* n - new */ /* s - screen */ /* b - box */ nx = (sw/2) - (bw/2); ny = (sh/2) - (bh/2); BG2X = nx << 8; BG2Y = ny << 8; |
Code: |
nx = (240/2) - (160/2); ny = (160/2) - (128/2); BG2X = nx << 8; BG2Y = ny << 8; |
Code: |
nx = 160 - 80 = 80; ny = 80 - 64 = 16; BG2X = nx << 8; BG2Y = ny << 8; |
Code: |
nx = 80; ny = 16; BG2X = 80 << 8 = 0x5000; BG2Y = 16 << 8 = 0x1000; |
Code: |
BG2X = 0x00005000; BG2Y = 0x00001000; |