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

Method Load_Hill_Data

Source/Amiga/Graphics_Amiga.cpp:305–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303}
304
305void cGraphics_Amiga::Load_Hill_Data() {
306
307 mImageHillBackground = Decode_Image("hills", 64);
308 if (!mImageHillBackground.mData->size())
309 return;
310
311 mImageHillBackground.mData->resize(mImageHillBackground.GetHeader()->ScreenSize() * (mImageHillBackground.GetHeader()->mPlanes + 30));
312
313 // We increase these buffers because the engine still writes to it
314 mImageHillSprites = Decode_Image("hills", 64);
315 mImageHillSprites.mData->resize(mImageHillBackground.GetHeader()->ScreenSize() * (mImageHillBackground.GetHeader()->mPlanes + 30));
316
317 // A5A7E
318 uint8* a0 = mImageHillSprites.mData->data() + (29 * 40);
319 uint8* a1 = mImageHillSprites.mData->data() + 0x390EE + 0x3E8;
320
321 for (int16 d1 = 0xB7; d1 >= 0; --d1) {
322 uint8* a2 = a0 + 6;
323 uint8* a3 = a1 + 6;
324
325 for (int16 d0 = 0x10; d0 >= 0; --d0) {
326 writeBEWord(a3, readBEWord(a2));
327 writeBEWord(a3 + 0x2828, readBEWord(a2 + 0x2800));
328 writeBEWord(a3 + 0x5050, readBEWord(a2 + 0x5000));
329 writeBEWord(a3 + 0x7878, readBEWord(a2 + 0x7800));
330
331 // Clear memory which has hill sprites drawn into it
332 writeBEWord(a2, 0);
333 writeBEWord(a2 + 0x2800, 0);
334 writeBEWord(a2 + 0x5000, 0);
335 writeBEWord(a2 + 0x7800, 0);
336
337 a2 += 2;
338 a3 += 2;
339 }
340
341 a0 += 0x28;
342 a1 += 0x28;
343 }
344}
345
346
347void cGraphics_Amiga::Load_Sprite_Font() {

Callers

nothing calls this directly

Calls 6

writeBEWordFunction · 0.85
readBEWordFunction · 0.85
resizeMethod · 0.80
ScreenSizeMethod · 0.80
GetHeaderMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected