Skip to content

Instantly share code, notes, and snippets.

@bgK
bgK / myst_windowed.hexdiff
Created January 29, 2011 09:50
Windowed mode patch for Myst Masterpiece Edition
# Allow moving the window
00029FEA: 0F E9
00029FEB: 85 1B
00029FEC: 1A 03
00029FED: 03 00
# Prevent the window from maximising by itself
0002A028: E5 DE
0002A029: 00 02
18,91% residualvm [.] Graphics::PixelBuffer::getValueAt
15,53% residualvm [.] Graphics::PixelFormat::expand
15,43% residualvm [.] Graphics::PixelBuffer::setPixelAt
7,20% residualvm [.] Graphics::PixelFormat::colorToRGB
6,38% residualvm [.] Graphics::PixelFormat::RGBToColor
5,01% residualvm [.] Graphics::PixelFormat::colorToARGB
4,38% residualvm [.] Graphics::PixelBuffer::copyBuffer
2,62% residualvm [.] Graphics::PixelBuffer::setPixelAt
2,31% residualvm [.] Graphics::PixelBuffer::getRGBAt
2,11% residualvm [.] Graphics::PixelFormat::gBits
diff --git a/backends/mixer/sdl/sdl-mixer.cpp b/backends/mixer/sdl/sdl-mixer.cpp
index 0ca3231..b07c016 100644
--- a/backends/mixer/sdl/sdl-mixer.cpp
+++ b/backends/mixer/sdl/sdl-mixer.cpp
@@ -92,6 +92,9 @@ void SdlMixerManager::init() {
debug(1, "SDL mixer sound format: %d differs from desired: %d", _obtained.format, desired.format);
SDL_CloseAudio();
+ fmt.freq = _obtained.freq;
+ fmt.samples = _obtained.samples;
diff --git a/engines/myst3/gfx.cpp b/engines/myst3/gfx.cpp
index 9c5b4f7..66a1ce1 100644
--- a/engines/myst3/gfx.cpp
+++ b/engines/myst3/gfx.cpp
@@ -77,8 +77,10 @@ OpenGLTexture::OpenGLTexture(const Graphics::Surface *surface) {
height = surface->h;
format = surface->format;
- internalHeight = upperPowerOfTwo(height);
- internalWidth = upperPowerOfTwo(width);
diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp
index 967bbb5..b87134d 100644
--- a/video/video_decoder.cpp
+++ b/video/video_decoder.cpp
@@ -195,12 +195,13 @@ bool VideoDecoder::setReverse(bool reverse) {
// Attempt to make sure all the tracks are in the requested direction
for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++)
- if ((*it)->getTrackType() == Track::kTrackTypeVideo && ((VideoTrack *)*it)->isReversed() != reverse)
+ if ((*it)->getTrackType() == Track::kTrackTypeVideo && ((VideoTrack *)*it)->isReversed() != reverse) {
diff --git a/engines/myst3/inventory.cpp b/engines/myst3/inventory.cpp
index 49e563b..254c680 100644
--- a/engines/myst3/inventory.cpp
+++ b/engines/myst3/inventory.cpp
@@ -284,6 +284,7 @@ DragItem::DragItem(Myst3Engine *vm, uint id):
_movieStream = movieDesc->getData();
_bink.setDefaultHighColorFormat(Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24));
_bink.loadStream(_movieStream);
+ _bink.start();
const Graphics::Surface *VideoDecoder::decodeNextFrame() {
_needsUpdate = false;
readNextPacket();
VideoTrack *track = findNextVideoTrack();
if (!track)
return 0;
const Graphics::Surface *frame = track->decodeNextFrame();
void LinkServer::OnServerStart()
{
UpdateData(TRUE);
lanlink.numslaves = m_numplayers+1;
lanlink.type = m_prottype;
lanlink.server = true;
lanlink.speed = m_speed==1 ? true : false;
sf::IPAddress addr;
diff --git a/engines/mohawk/myst_stacks/mechanical.cpp b/engines/mohawk/myst_stacks/mechanical.cpp
index 79de033..ec1fc4c 100644
--- a/engines/mohawk/myst_stacks/mechanical.cpp
+++ b/engines/mohawk/myst_stacks/mechanical.cpp
@@ -41,6 +41,7 @@
_mystStaircaseState = false;
_fortressPosition = 0;
+ _gearsWereRunning = false;
}

Prerequisites

Installing

From a computer, download the installable package of the PS3 port from ScummVM's main site. It should be a .pkg file. Copy it to an USB drive.