aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/voyeur/animation.cpp2
-rw-r--r--engines/voyeur/files.cpp14
-rw-r--r--engines/voyeur/files.h2
3 files changed, 9 insertions, 9 deletions
diff --git a/engines/voyeur/animation.cpp b/engines/voyeur/animation.cpp
index 0f98dbbf63..c771f04f80 100644
--- a/engines/voyeur/animation.cpp
+++ b/engines/voyeur/animation.cpp
@@ -92,7 +92,7 @@ RL2Decoder::RL2FileHeader::RL2FileHeader() {
RL2Decoder::RL2FileHeader::~RL2FileHeader() {
delete[] _frameOffsets;
- _frameSoundSizes;
+ delete[] _frameSoundSizes;
}
void RL2Decoder::RL2FileHeader::load(Common::SeekableReadStream *stream) {
diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp
index 61c5e4295e..fb9bcc3389 100644
--- a/engines/voyeur/files.cpp
+++ b/engines/voyeur/files.cpp
@@ -816,7 +816,7 @@ ViewPortResource::ViewPortResource(BoltFilesState &state, const byte *src):
// Get the rect list
for (int listIndex = 0; listIndex < 3; ++listIndex) {
_rectListCount[listIndex] = (int16)READ_LE_UINT16(src + 0x40 + 2 * listIndex);
- uint32 id = READ_LE_UINT32(src + 0x34 + listIndex * 4);
+ int id = (int)READ_LE_UINT32(src + 0x34 + listIndex * 4);
if (id == -1) {
_rectListPtr[listIndex] = NULL;
@@ -826,8 +826,8 @@ ViewPortResource::ViewPortResource(BoltFilesState &state, const byte *src):
if (_rectListCount[listIndex] > 0) {
int16 *rectList = (int16 *)state._curLibPtr->memberAddrOffset(id);
for (int i = 0; i < _rectListCount[listIndex]; ++i) {
- int xs = FROM_LE_16(rectList[0]);
- int ys = FROM_LE_16(rectList[1]);
+ xs = FROM_LE_16(rectList[0]);
+ ys = FROM_LE_16(rectList[1]);
_rectListPtr[i]->push_back(Common::Rect(xs, ys, xs + FROM_LE_16(rectList[2]),
ys + FROM_LE_16(rectList[3])));
}
@@ -1171,7 +1171,7 @@ ViewPortListResource::ViewPortListResource(BoltFilesState &state, const byte *sr
_palette.push_back(ViewPortPalEntry(palData));
// Load view port pointer list
- uint32 *idP = (uint32 *)&src[8];
+ const uint32 *idP = (const uint32 *)&src[8];
for (uint i = 0; i < count; ++i, ++idP) {
uint32 id = READ_LE_UINT32(idP);
BoltEntry &entry = state._curLibPtr->getBoltEntryFromLong(id);
@@ -1184,7 +1184,7 @@ ViewPortListResource::ViewPortListResource(BoltFilesState &state, const byte *sr
/*------------------------------------------------------------------------*/
ViewPortPalEntry::ViewPortPalEntry(const byte *src) {
- uint16 *v = (uint16 *)src;
+ const uint16 *v = (const uint16 *)src;
_rEntry = READ_LE_UINT16(v++);
_gEntry = READ_LE_UINT16(v++);
_bEntry = READ_LE_UINT16(v++);
@@ -1317,7 +1317,7 @@ VInitCyclResource::VInitCyclResource(BoltFilesState &state, const byte *src) {
PtrResource::PtrResource(BoltFilesState &state, const byte *src) {
// Load pointer list
- uint32 *idP = (uint32 *)&src[0];
+ const uint32 *idP = (const uint32 *)&src[0];
int size = state._curMemberPtr->_size;
for (int i = 0; i < size / 4; ++i, ++idP) {
@@ -1339,7 +1339,7 @@ ControlResource::ControlResource(BoltFilesState &state, const byte *src) {
_memberIds[i] = READ_LE_UINT16(src + i * 2);
// Load pointer list
- uint32 *idP = (uint32 *)&src[0x10];
+ const uint32 *idP = (const uint32 *)&src[0x10];
int count = READ_LE_UINT16(&src[0x36]);
Common::fill(&_entries[0], &_entries[8], (byte *)nullptr);
diff --git a/engines/voyeur/files.h b/engines/voyeur/files.h
index 43057afec4..98e0aa206c 100644
--- a/engines/voyeur/files.h
+++ b/engines/voyeur/files.h
@@ -117,7 +117,7 @@ private:
void termGro() {} // TODO
public:
BoltFile(const Common::String &filename, BoltFilesState &state);
- ~BoltFile();
+ virtual ~BoltFile();
BoltGroup *getBoltGroup(uint32 id);
void freeBoltGroup(uint32 id);