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

Method Load_And_Draw_Image

Source/Amiga/Graphics_Amiga2.cpp:175–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175void cGraphics_Amiga2::Load_And_Draw_Image(const std::string &pFilename, unsigned int pColors, size_t pBackColor) {
176 std::string Filename = pFilename;
177
178 // Try it as an IFF
179 sImage Decoded = GetImage(pFilename, 0);
180
181 // All raws are 320x257
182 Decoded.mDimension.mWidth = 0x140;
183 Decoded.mDimension.mHeight = 0x101;
184
185 // Load the palette
186 Decoded.CopyPalette(mPalette, (1LL << 5));
187
188 mBMHD_Current = Decoded.GetHeader();
189
190 mFodder->mVideo_Draw_FrameDataPtr = Decoded.mData->data();
191 mFodder->mVideo_Draw_PosX = 16;
192 mFodder->mVideo_Draw_PosY = 16;
193 mFodder->mVideo_Draw_Columns = Decoded.mDimension.mWidth >> 3;
194 mFodder->mVideo_Draw_Rows = Decoded.mDimension.mHeight;
195 mFodder->mVideo_Draw_PaletteIndex = 0x00;
196
197 mSurface->clearBuffer(pBackColor);
198
199 Video_Draw_16();
200 mBMHD_Current = 0;
201}
202
203
204void cGraphics_Amiga2::Recruit_Draw_Hill() {

Callers

nothing calls this directly

Calls 3

CopyPaletteMethod · 0.80
GetHeaderMethod · 0.80
clearBufferMethod · 0.80

Tested by

no test coverage detected