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

Method Video_Draw_16

Source/Amiga/Graphics_Amiga.cpp:1028–1062  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1026}
1027
1028void cGraphics_Amiga::Video_Draw_16(const uint8* RowPallete) {
1029
1030 uint8* di = mSurface->GetSurfaceBuffer();
1031 uint8* si = mFodder->mVideo_Draw_FrameDataPtr;
1032
1033 di += mSurface->GetWidth() * mFodder->mVideo_Draw_PosY;
1034 di += mFodder->mVideo_Draw_PosX;
1035
1036 mFodder->mDraw_Source_SkipPixelsPerRow = (mBMHD_Current->mWidth >> 3) - mFodder->mVideo_Draw_Columns;
1037 mFodder->mVideo_Draw_Columns >>= 1;
1038 mFodder->mDraw_Dest_SkipPixelsPerRow = mSurface->GetWidth() - (mFodder->mVideo_Draw_Columns * 16);
1039
1040 // Height
1041 for (int16 dx = 0; dx < mFodder->mVideo_Draw_Rows; ++dx) {
1042
1043 uint8 Palette = mFodder->mVideo_Draw_PaletteIndex;
1044 if (RowPallete) {
1045 // TODO: palette should degrade closer to top/bottom of screen
1046 //int16 bx = mFodder->mVideo_Draw_PosY + dx;
1047 //Palette = 1;// RowPallete[bx];
1048 }
1049
1050 // Width
1051 for (int16 cx = 0; cx < mFodder->mVideo_Draw_Columns; ++cx) {
1052
1053 DrawPixels_16(si, di, Palette);
1054
1055 di += 16;
1056 si += 2;
1057 }
1058
1059 si += mFodder->mDraw_Source_SkipPixelsPerRow;
1060 di += mFodder->mDraw_Dest_SkipPixelsPerRow;
1061 }
1062}
1063
1064void cGraphics_Amiga::Sidebar_Copy_To_Surface(int16 pStartY, cSurface* pSurface) {
1065 uint8* Buffer = mSurface->GetSurfaceBuffer();

Callers

nothing calls this directly

Calls 2

GetSurfaceBufferMethod · 0.80
GetWidthMethod · 0.80

Tested by

no test coverage detected