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

Method Sidebar_Copy_To_Surface

Source/Amiga/Graphics_Amiga.cpp:1064–1093  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1062}
1063
1064void cGraphics_Amiga::Sidebar_Copy_To_Surface(int16 pStartY, cSurface* pSurface) {
1065 uint8* Buffer = mSurface->GetSurfaceBuffer();
1066
1067 if (pSurface)
1068 Buffer = pSurface->GetSurfaceBuffer();
1069
1070 uint8* si = (uint8*)mFodder->mSidebar_Screen_Buffer;
1071
1072 // Start 16 rows down
1073 Buffer += (16 * mSurface->GetWidth()) + 16;
1074
1075 // Start further in?
1076 if (pStartY) {
1077 Buffer += (mSurface->GetWidth() * pStartY);
1078 si += (0x30 * pStartY);
1079 }
1080
1081 // Entire Height of Sidebar
1082 for (unsigned int Y = 17 + pStartY; Y < mSurface->GetHeight(); ++Y) {
1083
1084 // Width of Sidebar
1085 for (unsigned int X = 0; X < 0x30; X++) {
1086 Buffer[X] = *si++;
1087 }
1088
1089 // Next Row
1090 Buffer += mSurface->GetWidth();
1091 }
1092
1093}
1094
1095void cGraphics_Amiga::Sidebar_Copy_Sprite_To_ScreenBufPtr(int16 pSpriteType, size_t pX, size_t pY) {
1096 const sSpriteSheet_pstuff* str2 = &mSpriteSheet_PStuff[pSpriteType];

Callers

nothing calls this directly

Calls 3

GetSurfaceBufferMethod · 0.80
GetWidthMethod · 0.80
GetHeightMethod · 0.80

Tested by

no test coverage detected