rlm@1: #include "../Port.h"
rlm@1: #include "GBAGfx.h"
rlm@1: 
rlm@1: int coeff[32] = {
rlm@1: 	0,   1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,
rlm@1: 	16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16
rlm@1: };
rlm@1: 
rlm@1: // some of the rendering code in gfx.h (such as mode 0 line 1298)
rlm@1: // renders outside the given buffer (past 239) which corrupts other memory,
rlm@1: // so rather than find all places in that code that need to be fixed,
rlm@1: // just give it enough extra scratch space to use
rlm@1: 
rlm@1: u32  line0[240+LINE_BUFFER_OVERFLOW_LEEWAY];
rlm@1: u32  line1[240+LINE_BUFFER_OVERFLOW_LEEWAY];
rlm@1: u32  line2[240+LINE_BUFFER_OVERFLOW_LEEWAY];
rlm@1: u32  line3[240+LINE_BUFFER_OVERFLOW_LEEWAY];
rlm@1: u32  lineOBJ[240+LINE_BUFFER_OVERFLOW_LEEWAY];
rlm@1: u32  lineOBJWin[240+LINE_BUFFER_OVERFLOW_LEEWAY];
rlm@1: u32  lineMix[240+LINE_BUFFER_OVERFLOW_LEEWAY];
rlm@1: bool gfxInWin0[240+LINE_BUFFER_OVERFLOW_LEEWAY];
rlm@1: bool gfxInWin1[240+LINE_BUFFER_OVERFLOW_LEEWAY];
rlm@1: 
rlm@1: int gfxBG2Changed = 0;
rlm@1: int gfxBG3Changed = 0;
rlm@1: 
rlm@1: int gfxBG2X       = 0;
rlm@1: int gfxBG2Y       = 0;
rlm@1: int gfxBG2LastX   = 0;
rlm@1: int gfxBG2LastY   = 0;
rlm@1: int gfxBG3X       = 0;
rlm@1: int gfxBG3Y       = 0;
rlm@1: int gfxBG3LastX   = 0;
rlm@1: int gfxBG3LastY   = 0;
rlm@1: int gfxLastVCOUNT = 0;