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

Method Video_Draw_16

Source/PC/Graphics_PC.cpp:435–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433}
434
435void cGraphics_PC::Video_Draw_16(const uint8* RowPallete) {
436 uint8* di = mSurface->GetSurfaceBuffer();
437 uint8* si = mFodder->mVideo_Draw_FrameDataPtr;
438
439 di += mSurface->GetWidth() * mFodder->mVideo_Draw_PosY;
440 di += mFodder->mVideo_Draw_PosX;
441
442 mFodder->mDraw_Source_SkipPixelsPerRow = mFodder->mVideo_Draw_ColumnsMax - mFodder->mVideo_Draw_Columns;
443 mFodder->mDraw_Dest_SkipPixelsPerRow = mSurface->GetWidth() - mFodder->mVideo_Draw_Columns;
444
445 for (int16 dx = mFodder->mVideo_Draw_Rows; dx > 0; --dx) {
446
447 for (int16 cx = mFodder->mVideo_Draw_Columns; cx > 0; --cx) {
448 int8 al = *si;
449 if (al)
450 *di = al;
451
452 si++;
453 di++;
454 }
455
456 si += mFodder->mDraw_Source_SkipPixelsPerRow;
457 di += mFodder->mDraw_Dest_SkipPixelsPerRow;
458 }
459}
460
461void cGraphics_PC::Sidebar_Copy_To_Surface( int16 pStartY, cSurface* pSurface) {
462 uint8* Buffer = mSurface->GetSurfaceBuffer();

Callers 2

GUI_Draw_Frame_16Method · 0.45
Service_Sprite_DrawMethod · 0.45

Calls 2

GetSurfaceBufferMethod · 0.80
GetWidthMethod · 0.80

Tested by

no test coverage detected