aboutsummaryrefslogtreecommitdiff
path: root/graphics/wincursor.cpp
diff options
context:
space:
mode:
authorCameron Cawley2019-12-31 19:19:42 +0000
committerFilippos Karapetis2020-01-11 17:34:12 +0200
commit948c555ea616821ed7c2678ad406ed5bea392339 (patch)
tree000a4566cd70bdddff6d8f4d64edfc3db9119ac5 /graphics/wincursor.cpp
parent395f707203e8f30add0b2f8e9d8616dd12468676 (diff)
downloadscummvm-rg350-948c555ea616821ed7c2678ad406ed5bea392339.tar.gz
scummvm-rg350-948c555ea616821ed7c2678ad406ed5bea392339.tar.bz2
scummvm-rg350-948c555ea616821ed7c2678ad406ed5bea392339.zip
ALL: Create all instances of NEResources and PEResources using new instead of on the stack
Also adapted WinCursorGroup and MacMenu to reflect this.
Diffstat (limited to 'graphics/wincursor.cpp')
-rw-r--r--graphics/wincursor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/graphics/wincursor.cpp b/graphics/wincursor.cpp
index 13d9bebfba..4cade1f5e2 100644
--- a/graphics/wincursor.cpp
+++ b/graphics/wincursor.cpp
@@ -242,8 +242,8 @@ WinCursorGroup::~WinCursorGroup() {
delete cursors[i].cursor;
}
-WinCursorGroup *WinCursorGroup::createCursorGroup(Common::NEResources &exe, const Common::WinResourceID &id) {
- Common::ScopedPtr<Common::SeekableReadStream> stream(exe.getResource(Common::kWinGroupCursor, id));
+WinCursorGroup *WinCursorGroup::createCursorGroup(Common::NEResources *exe, const Common::WinResourceID &id) {
+ Common::ScopedPtr<Common::SeekableReadStream> stream(exe->getResource(Common::kWinGroupCursor, id));
if (!stream || stream->size() <= 6)
return 0;
@@ -276,7 +276,7 @@ WinCursorGroup *WinCursorGroup::createCursorGroup(Common::NEResources &exe, cons
stream->readUint32LE(); // data size
uint32 cursorId = stream->readUint16LE();
- Common::ScopedPtr<Common::SeekableReadStream> cursorStream(exe.getResource(Common::kWinCursor, cursorId));
+ Common::ScopedPtr<Common::SeekableReadStream> cursorStream(exe->getResource(Common::kWinCursor, cursorId));
if (!cursorStream) {
delete group;
return 0;
@@ -298,8 +298,8 @@ WinCursorGroup *WinCursorGroup::createCursorGroup(Common::NEResources &exe, cons
return group;
}
-WinCursorGroup *WinCursorGroup::createCursorGroup(Common::PEResources &exe, const Common::WinResourceID &id) {
- Common::ScopedPtr<Common::SeekableReadStream> stream(exe.getResource(Common::kWinGroupCursor, id));
+WinCursorGroup *WinCursorGroup::createCursorGroup(Common::PEResources *exe, const Common::WinResourceID &id) {
+ Common::ScopedPtr<Common::SeekableReadStream> stream(exe->getResource(Common::kWinGroupCursor, id));
if (!stream || stream->size() <= 6)
return 0;
@@ -325,7 +325,7 @@ WinCursorGroup *WinCursorGroup::createCursorGroup(Common::PEResources &exe, cons
stream->readUint32LE(); // data size
uint32 cursorId = stream->readUint16LE();
- Common::ScopedPtr<Common::SeekableReadStream> cursorStream(exe.getResource(Common::kWinCursor, cursorId));
+ Common::ScopedPtr<Common::SeekableReadStream> cursorStream(exe->getResource(Common::kWinCursor, cursorId));
if (!cursorStream) {
delete group;
return 0;