MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / Video_Draw_8

Method Video_Draw_8

Source/Amiga/Graphics_Amiga.cpp:911–942  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

909}
910
911void cGraphics_Amiga::Video_Draw_8(cSurface* pTarget, const uint8* RowPallete) {
912 if (!pTarget)
913 pTarget = mSurface;
914
915 uint8* di = pTarget->GetSurfaceBuffer();
916 uint8* si = mFodder->mVideo_Draw_FrameDataPtr;
917
918 di += pTarget->GetWidth() * mFodder->mVideo_Draw_PosY;
919 di += mFodder->mVideo_Draw_PosX;
920
921 mFodder->mVideo_Draw_Columns -= 1;
922 mFodder->mVideo_Draw_Columns <<= 1;
923
924 mFodder->mDraw_Source_SkipPixelsPerRow = (mBMHD_Current->mWidth >> 3) - (mFodder->mVideo_Draw_Columns);
925 mFodder->mDraw_Dest_SkipPixelsPerRow = pTarget->GetWidth() - (mFodder->mVideo_Draw_Columns * 8);
926
927 // Height
928 for (int16 dx = mFodder->mVideo_Draw_Rows; dx > 0; --dx) {
929
930 // Width
931 for (int16 cx = 0; cx < mFodder->mVideo_Draw_Columns; ++cx) {
932
933 DrawPixels_8(si, di);
934
935 di += 8;
936 si += 1;
937 }
938
939 si += mFodder->mDraw_Source_SkipPixelsPerRow;
940 di += mFodder->mDraw_Dest_SkipPixelsPerRow;
941 }
942}
943
944void cGraphics_Amiga::Video_Draw_8_Alt(const uint8* RowPalette) {
945

Callers

nothing calls this directly

Calls 2

GetSurfaceBufferMethod · 0.80
GetWidthMethod · 0.80

Tested by

no test coverage detected