DM: Finish f113_drawField
This commit is contained in:
parent
44a5e36fc1
commit
4442b0b302
2 changed files with 15 additions and 9 deletions
|
@ -16,6 +16,5 @@ Todo:
|
||||||
Code stuff todo:
|
Code stuff todo:
|
||||||
Complete stub methods(blitShrink, blitmask, scroller, etc.)
|
Complete stub methods(blitShrink, blitmask, scroller, etc.)
|
||||||
Save file f433_processCommand140_saveGame fails silently, add error checking
|
Save file f433_processCommand140_saveGame fails silently, add error checking
|
||||||
Clean up f113_drawField
|
|
||||||
|
|
||||||
|
|
|
@ -2771,17 +2771,24 @@ uint32 DisplayMan::getCompressedDataSize(uint16 index) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplayMan::f113_drawField(FieldAspect* fieldAspect, Box& box) {
|
void DisplayMan::f113_drawField(FieldAspect* fieldAspect, Box& box) {
|
||||||
warning(false, "STUB METHOD: f113_drawField");
|
byte* bitmapMask = nullptr;
|
||||||
|
|
||||||
if (fieldAspect->_mask != kMaskFieldAspectNoMask) {
|
if (fieldAspect->_mask != kMaskFieldAspectNoMask) {
|
||||||
DisplayMan &dispMan = *_vm->_displayMan;
|
bitmapMask = _g74_tmpBitmap;
|
||||||
|
memmove(bitmapMask, f489_getNativeBitmapOrGraphic(k69_FieldMask_D3R_GraphicIndice + getFlag(fieldAspect->_mask, kMaskFieldAspectIndex)),
|
||||||
byte *bitmapMask = dispMan._g74_tmpBitmap;
|
fieldAspect->_height * fieldAspect->_byteWidth * 2);
|
||||||
memmove(bitmapMask, dispMan.f489_getNativeBitmapOrGraphic(k69_FieldMask_D3R_GraphicIndice + getFlag(fieldAspect->_mask, kMaskFieldAspectIndex)),
|
if (getFlag(fieldAspect->_mask, kMaskFieldAspectFlipMask)) {
|
||||||
fieldAspect->_height * fieldAspect->_byteWidth * 2 * sizeof(bitmapMask[0]));
|
f130_flipBitmapHorizontal(bitmapMask, fieldAspect->_byteWidth, fieldAspect->_height);
|
||||||
if (getFlag(fieldAspect->_mask, kMaskFieldAspectFlipMask))
|
|
||||||
dispMan.f130_flipBitmapHorizontal(bitmapMask, fieldAspect->_byteWidth, fieldAspect->_height);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
f491_isDerivedBitmapInCache(k0_DerivedBitmapViewport);
|
||||||
|
byte *bitmap = f489_getNativeBitmapOrGraphic(k73_FieldTeleporterGraphicIndice + fieldAspect->_nativeBitmapRelativeIndex);
|
||||||
|
f133_blitBoxFilledWithMaskedBitmap(bitmap, _g296_bitmapViewport, bitmapMask, f492_getDerivedBitmap(k0_DerivedBitmapViewport), box,
|
||||||
|
_vm->getRandomNumber(2) + fieldAspect->_baseStartUnitIndex, _vm->getRandomNumber(32), k112_byteWidthViewport,
|
||||||
|
(Color)fieldAspect->_transparentColor, fieldAspect->_xPos, 0, 136, fieldAspect->_bitplaneWordCount);
|
||||||
|
f493_addDerivedBitmap(k0_DerivedBitmapViewport);
|
||||||
|
f480_releaseBlock(k0_DerivedBitmapViewport | 0x8000);
|
||||||
}
|
}
|
||||||
|
|
||||||
int16 DisplayMan::f459_getScaledBitmapByteCount(int16 byteWidth, int16 height, int16 scale) {
|
int16 DisplayMan::f459_getScaledBitmapByteCount(int16 byteWidth, int16 height, int16 scale) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue