Skip to content

Commit

Permalink
FULLPIPE: Further work on inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Sep 6, 2013
1 parent 56cb726 commit 1aa11bd
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 13 deletions.
8 changes: 7 additions & 1 deletion engines/fullpipe/gfx.cpp
Expand Up @@ -257,7 +257,6 @@ void Picture::setAOIDs() {
_memoryObject2->_rows[i] = ptr;
ptr += pitch;
}
warning("STUB: Picture::setAOIDs()");
}

void Picture::init() {
Expand All @@ -281,6 +280,13 @@ void Picture::getDibInfo() {
_bitmap->pixels = _data;
}

Bitmap *Picture::getPixelData() {
if (!_bitmap)
init();

return _bitmap;
}

BigPicture::BigPicture() {
}

Expand Down
4 changes: 4 additions & 0 deletions engines/fullpipe/gfx.h
Expand Up @@ -66,6 +66,10 @@ class Picture : public MemoryObject {
void setAOIDs();
void init();
void getDibInfo();
Bitmap *getPixelData();

byte getAlpha() { return (byte)_alpha; }
void setAlpha(byte alpha) { _alpha = alpha; }
};

class BigPicture : public Picture {
Expand Down
2 changes: 2 additions & 0 deletions engines/fullpipe/inventory.cpp
Expand Up @@ -100,6 +100,8 @@ void CInventory2::addItem(int itemId, int value) {

void CInventory2::rebuildItemRects() {
g_fullpipe->accessScene(_sceneId);

warning("STUB: CInventory2::rebuildItemRects()");
}

} // End of namespace Fullpipe
24 changes: 13 additions & 11 deletions engines/fullpipe/inventory.h
Expand Up @@ -64,18 +64,20 @@ struct InventoryItem {

typedef Common::Array<InventoryItem> InventoryItems;

class PictureObject;

class InventoryIcon {
int pictureObjectNormal;
int pictureObjectMouseInside;
int pictureObject3;
int x1;
int y1;
int x2;
int y2;
int16 inventoryItemId;
int16 field_1E;
int isSelected;
int isMouseInside;
PictureObject *_pictureObjectNormal;
InventoryIcon **_icons;
int _numIcons;
int _x1;
int _y1;
int _x2;
int _y2;
int16 _inventoryItemId;
int16 _field_1E;
int _isSelected;
int _isMouseInside;
};

typedef Common::Array<InventoryIcon> InventoryIcons;
Expand Down
2 changes: 1 addition & 1 deletion engines/fullpipe/utils.cpp
Expand Up @@ -132,7 +132,7 @@ bool MemoryObject::load(MfcArchive &file) {
}

void MemoryObject::loadFile(char *filename) {
debug(0, "MemoryObject::loadFile(<%s>)", filename);
debug(5, "MemoryObject::loadFile(<%s>)", filename);
if (!_data) {
Common::SeekableReadStream *s = g_fullpipe->_currArchive->createReadStreamForMember(filename);

Expand Down

0 comments on commit 1aa11bd

Please sign in to comment.