TOLTECS: Renamed ybottom to priority

This commit is contained in:
Benjamin Haisch 2008-09-17 11:01:43 +00:00 committed by Willem Jan Palenstijn
parent ade8eec8cf
commit 150e555953
4 changed files with 8 additions and 8 deletions

View File

@ -64,7 +64,7 @@ struct SpriteDrawItem {
int16 xdelta, ydelta;
uint16 flags;
int16 skipX, yerror;
int16 ybottom;
int16 priority;
int16 baseColor;
};

View File

@ -75,10 +75,10 @@ void SegmentMap::load(byte *source) {
maskRect.width = READ_LE_UINT16(source + 6);
maskRect.maskOffset = READ_LE_UINT16(source + 8);
maskRect.maskOffset -= maskRectDataSize;
maskRect.ybottom = READ_LE_UINT16(source + 10);
maskRect.priority = READ_LE_UINT16(source + 10);
debug(0, "SegmentMap::load() (%d, %d, %d, %d, %04X, %d)",
maskRect.x, maskRect.y, maskRect.width, maskRect.height, maskRect.maskOffset, maskRect.ybottom);
maskRect.x, maskRect.y, maskRect.width, maskRect.height, maskRect.maskOffset, maskRect.priority);
source += 12;
_maskRects.push_back(maskRect);
@ -393,7 +393,7 @@ void SegmentMap::restoreMasksBySprite(SpriteDrawItem *sprite) {
for (uint i = 0; i < _maskRects.size(); i++) {
#if 0
if ( *(__int16 *)((char *)&spriteDrawList[0].y2 + v5) <= (unsigned __int16)v3->ybottom )
if ( *(__int16 *)((char *)&spriteDrawList[0].y2 + v5) <= (unsigned __int16)v3->priority )
{
if ( (unsigned __int16)(*(__int16 *)((char *)&spriteDrawList[0].height + v5)
+ *(__int16 *)((char *)&spriteDrawList[0].y + v5)) > v3->y )
@ -408,7 +408,7 @@ void SegmentMap::restoreMasksBySprite(SpriteDrawItem *sprite) {
#endif
if (sprite->ybottom <= _maskRects[i].ybottom) {
if (sprite->priority <= _maskRects[i].priority) {
restoreMask(i);
}
}

View File

@ -83,7 +83,7 @@ public: // for debugging purposes
int16 y, x;
int16 height, width;
int16 maskOffset;
int16 ybottom;
int16 priority;
};
struct SegmapPathRect {

View File

@ -209,7 +209,7 @@ void Screen::addDrawRequest(const DrawRequest &drawRequest) {
sprite.baseColor = drawRequest.baseColor;
sprite.x = drawRequest.x;
sprite.y = drawRequest.y;
sprite.ybottom = drawRequest.y;
sprite.priority = drawRequest.y;
sprite.resIndex = drawRequest.resIndex;
spriteData = _vm->_res->load(drawRequest.resIndex);
@ -393,7 +393,7 @@ void Screen::addDrawRequest(const DrawRequest &drawRequest) {
// Add sprite sorted by priority
Common::List<SpriteDrawItem>::iterator iter = _spriteDrawList.begin();
while (iter != _spriteDrawList.end() && (*iter).ybottom <= sprite.ybottom) {
while (iter != _spriteDrawList.end() && (*iter).priority <= sprite.priority) {
iter++;
}
_spriteDrawList.insert(iter, sprite);