From e75eba1a1fbdf2dd025bca6086d1c8b59d5f252f Mon Sep 17 00:00:00 2001 From: Joost Peters Date: Mon, 29 Sep 2003 23:03:54 +0000 Subject: consistency (must've overlooked these) svn-id: r10493 --- queen/graphics.cpp | 7 +++---- queen/graphics.h | 7 +++---- queen/resource.h | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/queen/graphics.cpp b/queen/graphics.cpp index ec581b4224..cdf8b48b70 100644 --- a/queen/graphics.cpp +++ b/queen/graphics.cpp @@ -58,9 +58,9 @@ void QueenGraphics::bankLoad(const char *bankname, uint32 bankslot) { void QueenGraphics::bankUnpack(uint32 srcframe, uint32 dstframe, uint32 bankslot) { - uint8* p = _banks[bankslot].data + _banks[bankslot].indexes[srcframe]; + uint8 *p = _banks[bankslot].data + _banks[bankslot].indexes[srcframe]; - ObjectFrame* pof = &_frames[dstframe]; + ObjectFrame *pof = &_frames[dstframe]; delete[] pof->data; pof->width = READ_LE_UINT16(p + 0); @@ -68,14 +68,13 @@ void QueenGraphics::bankUnpack(uint32 srcframe, uint32 dstframe, uint32 bankslot pof->xhotspot = READ_LE_UINT16(p + 4); pof->yhotspot = READ_LE_UINT16(p + 6); - uint size = pof->width * pof->height; + uint32 size = pof->width * pof->height; pof->data = new uint8[ size ]; memcpy(pof->data, p, size); debug(5, "Unpacked frame %d from bank slot %d to frame slot %d", srcframe, bankslot, dstframe); } - void QueenGraphics::bankOverpack(uint32 srcframe, uint32 dstframe, uint32 bankslot) { uint8 *p = _banks[bankslot].data + _banks[bankslot].indexes[srcframe]; diff --git a/queen/graphics.h b/queen/graphics.h index 586679585c..0cd8ea95fb 100644 --- a/queen/graphics.h +++ b/queen/graphics.h @@ -30,7 +30,6 @@ #define MAX_BANKS_NUMBER 18 - struct ObjectFrame { uint16 width, height; uint16 xhotspot, yhotspot; @@ -44,8 +43,8 @@ public: QueenGraphics(QueenResource *resource); void bankLoad(const char *bankname, uint32 bankslot); - void bankUnpack(uint srcframe, uint dstframe, uint32 bankslot); - void bankOverpack(uint srcframe, uint dstframe, uint32 bankslot); + void bankUnpack(uint32 srcframe, uint32 dstframe, uint32 bankslot); + void bankOverpack(uint32 srcframe, uint32 dstframe, uint32 bankslot); void bankErase(uint32 bankslot); private: @@ -62,5 +61,5 @@ private: }; - #endif + diff --git a/queen/resource.h b/queen/resource.h index aea589f49d..ae083adaba 100644 --- a/queen/resource.h +++ b/queen/resource.h @@ -45,7 +45,7 @@ class QueenResource { public: QueenResource(char *datafilePath); ~QueenResource(void); - uint8 *loadFile(const char *filename, uint32 skipbytes = 0); + uint8 *loadFile(const char *filename, uint32 skipBytes = 0); bool exists(const char *filename); protected: -- cgit v1.2.3