aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Eriksson2003-10-16 16:55:13 +0000
committerDavid Eriksson2003-10-16 16:55:13 +0000
commit29fc207062d4ffaa557cceff760f311f2d1f96b9 (patch)
tree7e519996c6eabecc292cc2f983b76a4ed9f30014
parent8833f8c4908d8be3a92288bc592cf9ddfd1f568d (diff)
downloadscummvm-rg350-29fc207062d4ffaa557cceff760f311f2d1f96b9.tar.gz
scummvm-rg350-29fc207062d4ffaa557cceff760f311f2d1f96b9.tar.bz2
scummvm-rg350-29fc207062d4ffaa557cceff760f311f2d1f96b9.zip
Make frames array available.
svn-id: r10828
-rw-r--r--queen/graphics.cpp10
-rw-r--r--queen/graphics.h1
2 files changed, 8 insertions, 3 deletions
diff --git a/queen/graphics.cpp b/queen/graphics.cpp
index dcf34426df..01046b994e 100644
--- a/queen/graphics.cpp
+++ b/queen/graphics.cpp
@@ -81,6 +81,10 @@ void Graphics::bankLoad(const char *bankname, uint32 bankslot) {
void Graphics::bankUnpack(uint32 srcframe, uint32 dstframe, uint32 bankslot) {
uint8 *p = _banks[bankslot].data + _banks[bankslot].indexes[srcframe];
+
+ if (!_banks[bankslot].data)
+ error("Graphics::bankUnpack(%i, %i, %i) called but _banks[bankslot].data is NULL!",
+ srcframe, dstframe, bankslot);
BobFrame *pbf = &_frames[dstframe];
delete[] pbf->data;
@@ -656,13 +660,13 @@ void Graphics::useJournal() { // GameSettings* pgs
}
-void Graphics::journalBobSetup(uint32 bobnum, uint16 x, uint16 y, uint16 frame) {
-
+void Graphics::journalBobSetup(uint32 bobnum, uint16 x, uint16 y, uint16 frameNum)
+{
BobSlot *pbs = &_bobs[bobnum];
pbs->active = true;
pbs->x = x;
pbs->y = y;
- pbs->frameNum = FRAMES_JOURNAL + frame;
+ pbs->frameNum = FRAMES_JOURNAL + frameNum;
pbs->box.y2 = GAME_SCREEN_HEIGHT - 1;
}
diff --git a/queen/graphics.h b/queen/graphics.h
index 332897154e..d68d4e8e5e 100644
--- a/queen/graphics.h
+++ b/queen/graphics.h
@@ -144,6 +144,7 @@ public:
void frameErase(uint32 fslot);
void frameEraseAll(bool joe); // freeframes, freeallframes
+ BobFrame *frame(int index) { return _frames + index; }
void loadBackdrop(const char *name, uint16 room);
void loadPanel();