diff options
author | Arisotura <thetotalworm@gmail.com> | 2020-05-30 02:59:45 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2020-05-30 02:59:45 +0200 |
commit | 61799c35bdf26a5754ca760ac92d4f07d6a9396b (patch) | |
tree | d8ecf2fd4c92dad813c5a35aaf5e80b1e8b6334a /src/GPU2D.h | |
parent | 5eb01f1f15d81fc908b9ed3819213442b8c4bd3e (diff) | |
parent | 58c2790ea34abe54de7607d081cbb975257f87c7 (diff) |
sadadssa
Diffstat (limited to 'src/GPU2D.h')
-rw-r--r-- | src/GPU2D.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/GPU2D.h b/src/GPU2D.h index 6ad9783..8c6ec27 100644 --- a/src/GPU2D.h +++ b/src/GPU2D.h @@ -63,7 +63,7 @@ public: void OBJExtPalDirty(); u16* GetBGExtPal(u32 slot, u32 pal); - u16* GetOBJExtPal(u32 pal); + u16* GetOBJExtPal(); private: u32 Num; @@ -111,7 +111,11 @@ private: u8 BGMosaicSize[2]; u8 OBJMosaicSize[2]; u8 BGMosaicY, BGMosaicYMax; - u8 OBJMosaicY, OBJMosaicYMax; + u8 OBJMosaicYCount, OBJMosaicY, OBJMosaicYMax; + + u8 MosaicTable[16][256]; + u8* CurBGXMosaicTable; + u8* CurOBJXMosaicTable; u16 BlendCnt; u16 BlendAlpha; @@ -133,6 +137,8 @@ private: u32 ColorBrightnessDown(u32 val, u32 factor); u32 ColorComposite(int i, u32 val1, u32 val2); + void UpdateMosaicCounters(u32 line); + template<u32 bgmode> void DrawScanlineBGMode(u32 line); void DrawScanlineBGMode6(u32 line); void DrawScanlineBGMode7(u32 line); @@ -143,11 +149,12 @@ private: void (*DrawPixel)(u32* dst, u16 color, u32 flag); void DrawBG_3D(); - void DrawBG_Text(u32 line, u32 bgnum); - void DrawBG_Affine(u32 line, u32 bgnum); - void DrawBG_Extended(u32 line, u32 bgnum); - void DrawBG_Large(u32 line); + template<bool mosaic> void DrawBG_Text(u32 line, u32 bgnum); + template<bool mosaic> void DrawBG_Affine(u32 line, u32 bgnum); + template<bool mosaic> void DrawBG_Extended(u32 line, u32 bgnum); + template<bool mosaic> void DrawBG_Large(u32 line); + void ApplySpriteMosaicX(); void InterleaveSprites(u32 prio); template<bool window> void DrawSprite_Rotscale(u16* attrib, u16* rotparams, u32 boundwidth, u32 boundheight, u32 width, u32 height, s32 xpos, s32 ypos); template<bool window> void DrawSprite_Normal(u16* attrib, u32 width, s32 xpos, s32 ypos); |