Mercurial > vba-linux
diff src/gba/GBAGfx.cpp @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/gba/GBAGfx.cpp Sat Mar 03 10:31:27 2012 -0600 1.3 @@ -0,0 +1,35 @@ 1.4 +#include "../Port.h" 1.5 +#include "GBAGfx.h" 1.6 + 1.7 +int coeff[32] = { 1.8 + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1.9 + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16 1.10 +}; 1.11 + 1.12 +// some of the rendering code in gfx.h (such as mode 0 line 1298) 1.13 +// renders outside the given buffer (past 239) which corrupts other memory, 1.14 +// so rather than find all places in that code that need to be fixed, 1.15 +// just give it enough extra scratch space to use 1.16 + 1.17 +u32 line0[240+LINE_BUFFER_OVERFLOW_LEEWAY]; 1.18 +u32 line1[240+LINE_BUFFER_OVERFLOW_LEEWAY]; 1.19 +u32 line2[240+LINE_BUFFER_OVERFLOW_LEEWAY]; 1.20 +u32 line3[240+LINE_BUFFER_OVERFLOW_LEEWAY]; 1.21 +u32 lineOBJ[240+LINE_BUFFER_OVERFLOW_LEEWAY]; 1.22 +u32 lineOBJWin[240+LINE_BUFFER_OVERFLOW_LEEWAY]; 1.23 +u32 lineMix[240+LINE_BUFFER_OVERFLOW_LEEWAY]; 1.24 +bool gfxInWin0[240+LINE_BUFFER_OVERFLOW_LEEWAY]; 1.25 +bool gfxInWin1[240+LINE_BUFFER_OVERFLOW_LEEWAY]; 1.26 + 1.27 +int gfxBG2Changed = 0; 1.28 +int gfxBG3Changed = 0; 1.29 + 1.30 +int gfxBG2X = 0; 1.31 +int gfxBG2Y = 0; 1.32 +int gfxBG2LastX = 0; 1.33 +int gfxBG2LastY = 0; 1.34 +int gfxBG3X = 0; 1.35 +int gfxBG3Y = 0; 1.36 +int gfxBG3LastX = 0; 1.37 +int gfxBG3LastY = 0; 1.38 +int gfxLastVCOUNT = 0;