Skip to content

Commit

Permalink
Merge remote branch 'upstream/master' into pegasus
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Hoops committed Apr 2, 2012
2 parents 47ae65e + d50e34c commit b6374a3
Show file tree
Hide file tree
Showing 85 changed files with 3,610 additions and 1,834 deletions.
7 changes: 6 additions & 1 deletion NEWS
Expand Up @@ -11,7 +11,12 @@ For a more comprehensive changelog of the latest experimental code, see:
- Implemented support for TrueType fonts via FreeType2 in our GUI. Along
with it GNU FreeFont was also added to our modern theme. Note that not all
ports take advantage of this.
- Added Basque translation
- Added Basque translation.
- Added custom game and engine options in the AGI, DREAMWEB, KYRA, QUEEN,
SKY and SCI engines. It is now possible to toggle these options via the
Engine tab when adding or editing a configuration for a game. In most
cases, you will have to run each game once or readd them all in ScummVM's
launcher in order to get the custom options tab.

SDL ports:
- Added support for OpenGL (GSoC Task).
Expand Down
54 changes: 53 additions & 1 deletion README
Expand Up @@ -56,6 +56,8 @@ Table of Contents:
* 7.8 Using compressed audio files (MP3, Ogg Vorbis, Flac)
* 7.9 Output sample rate
8.0) Configuration file
* 8.1 Recognized configuration keywords
* 8.2 Custom game options that can be toggled via the GUI
9.0) Compiling


Expand Down Expand Up @@ -1994,6 +1996,9 @@ An example config file looks as follows:
path=C:\amiga_mi2\
music_driver=windows


8.1) Recognized configuration keywords
---- ---------------------------------
The following keywords are recognized:

path string The path to where a game's data files are
Expand All @@ -2019,7 +2024,6 @@ The following keywords are recognized:

fullscreen bool Fullscreen mode
aspect_ratio bool Enable aspect ratio correction
disable_dithering bool Remove dithering artifacts from EGA games
gfx_mode string Graphics mode (normal, 2x, 3x, 2xsai,
super2xsai, supereagle, advmame2x, advmame3x,
hq2x, hq3x, tv2x, dotmatrix)
Expand Down Expand Up @@ -2062,6 +2066,22 @@ The following keywords are recognized:

boot_param number Pass this number to the boot script

Sierra games using the AGI engine add the following non-standard keywords:

originalsaveload bool If true, the original save/load screens are
used instead of the enhanced ScummVM ones

Sierra games using the SCI engine add the following non-standard keywords:

disable_dithering bool Remove dithering artifacts from EGA games
prefer_digitalsfx bool If true, digital sound effects are preferred
instead of synthesized ones
originalsaveload bool If true, the original save/load screens are
used instead of the enhanced ScummVM ones
native_fb01 bool If true, the music driver for an IBM Music
Feature card or a Yahama FB-01 FM synth module
is used for MIDI output

Broken Sword II adds the following non-standard keywords:

gfx_details number Graphics details setting (0-3)
Expand All @@ -2075,6 +2095,11 @@ Flight of the Amazon Queen adds the following non-standard keywords:
music_mute bool If true, music is muted
sfx_mute bool If true, sound effects are muted

Jones in the Fast Lane adds the following non-standard keyword:

music_mute bool If true, CD audio is used, if available,
instead of in-game audio

King's Quest VI Windows adds the following non-standard keyword:

windows_cursors bool If true, the original unscaled black and white
Expand All @@ -2083,6 +2108,15 @@ King's Quest VI Windows adds the following non-standard keyword:
Windows version, upscaled to match the rest of
the upscaled graphics

Lands of Lore: The Throne of Chaos adds the following non-standard keywords:

smooth_scrolling bool If true, scrolling is smoother when changing
from one screen to another
floating_cursors bool If true, the cursor changes when it floats to
the edge of the screen to a directional arrow.
The player can then click to walk towards that
direction.

Space Quest IV CD adds the following non-standard keyword:

silver_cursors bool If true, an alternate set of silver mouse cursors
Expand All @@ -2097,11 +2131,29 @@ The Legend of Kyrandia adds the following non-standard keyword:

walkspeed int The walk speed (0-4)

The Legend of Kyrandia: Malcolm's Revenge adds the following non-standard
keywords:

studio_audience bool If true, applause and cheering sounds are heard
whenever Malcolm makes a joke
skip_support bool If true, the player can skip text and cutscenes
helium_mode bool If true, people sound like they've inhaled Helium

The 7th Guest adds the following non-standard keyword:

t7g_speed string Video playback speed (normal, tweaked, im_an_ios)


8.2) Custom game options that can be toggled via the GUI
---- ---------------------------------------------------
A lot of the custom game options in the previous section can be toggled via the
GUI. If a custom option is available for a specific game, a new tab called
"Engine" will appear when adding or editing the configuration of that game.
If the custom options are not shown, the games in question will need to be run
once or readded in the ScummVM launcher's game list. This will update the
configuration of each entry, allowing the custom options to be shown.


9.0) Compiling:
---- ----------
For an up-to-date overview on how to compile ScummVM for various
Expand Down
104 changes: 28 additions & 76 deletions audio/decoders/qdm2.cpp
Expand Up @@ -1695,7 +1695,6 @@ void QDM2Stream::initVlc(void) {

QDM2Stream::QDM2Stream(Common::SeekableReadStream *extraData, DisposeAfterUse::Flag disposeExtraData) {
uint32 tmp;
int32 tmp_s;
int tmp_val;
int i;

Expand Down Expand Up @@ -1736,91 +1735,44 @@ QDM2Stream::QDM2Stream(Common::SeekableReadStream *extraData, DisposeAfterUse::F
_superblocktype_2_3 = 0;
_hasErrors = false;

// Rewind extraData stream from any previous calls...
// The QDM2 "extra data" is really just an amalgam of three QuickTime
// atoms needed to correctly set up the decoder.

// Rewind extraData stream from any previous calls
extraData->seek(0, SEEK_SET);

tmp_s = extraData->readSint32BE();
debug(1, "QDM2Stream::QDM2Stream() extraSize: %d", tmp_s);
if ((extraData->size() - extraData->pos()) / 4 + 1 != tmp_s)
warning("QDM2Stream::QDM2Stream() extraSize mismatch - Expected %d", (extraData->size() - extraData->pos()) / 4 + 1);
if (tmp_s < 12)
error("QDM2Stream::QDM2Stream() Insufficient extraData");

tmp = extraData->readUint32BE();
debug(1, "QDM2Stream::QDM2Stream() extraTag: %d", tmp);
if (tmp != MKTAG('f','r','m','a'))
warning("QDM2Stream::QDM2Stream() extraTag mismatch");

tmp = extraData->readUint32BE();
debug(1, "QDM2Stream::QDM2Stream() extraType: %d", tmp);
if (tmp == MKTAG('Q','D','M','C'))
warning("QDM2Stream::QDM2Stream() QDMC stream type not supported");
else if (tmp != MKTAG('Q','D','M','2'))
error("QDM2Stream::QDM2Stream() Unsupported stream type");

tmp_s = extraData->readSint32BE();
debug(1, "QDM2Stream::QDM2Stream() extraSize2: %d", tmp_s);
if ((extraData->size() - extraData->pos()) + 4 != tmp_s)
warning("QDM2Stream::QDM2Stream() extraSize2 mismatch - Expected %d", (extraData->size() - extraData->pos()) + 4);

tmp = extraData->readUint32BE();
debug(1, "QDM2Stream::QDM2Stream() extraTag2: %d", tmp);
if (tmp != MKTAG('Q','D','C','A'))
warning("QDM2Stream::QDM2Stream() extraTag2 mismatch");

if (extraData->readUint32BE() != 1)
warning("QDM2Stream::QDM2Stream() u0 field not 1");
// First, the frma atom
uint32 frmaSize = extraData->readUint32BE();
if (frmaSize != 12)
error("Invalid QDM2 frma atom");

_channels = extraData->readUint32BE();
debug(1, "QDM2Stream::QDM2Stream() channels: %d", _channels);
if (extraData->readUint32BE() != MKTAG('f', 'r', 'm', 'a'))
error("Failed to find frma atom for QDM2");

_sampleRate = extraData->readUint32BE();
debug(1, "QDM2Stream::QDM2Stream() sampleRate: %d", _sampleRate);
uint32 version = extraData->readUint32BE();
if (version == MKTAG('Q', 'D', 'M', 'C'))
error("Unhandled QDMC sound");
else if (version != MKTAG('Q', 'D', 'M', '2'))
error("Failed to find QDM2 tag in frma atom");

_bitRate = extraData->readUint32BE();
debug(1, "QDM2Stream::QDM2Stream() bitRate: %d", _bitRate);
// Second, the QDCA atom
uint32 qdcaSize = extraData->readUint32BE();
if (qdcaSize > (uint32)(extraData->size() - extraData->pos()))
error("Invalid QDM2 QDCA atom");

_blockSize = extraData->readUint32BE();
debug(1, "QDM2Stream::QDM2Stream() blockSize: %d", _blockSize);
if (extraData->readUint32BE() != MKTAG('Q', 'D', 'C', 'A'))
error("Failed to find QDCA atom for QDM2");

_frameSize = extraData->readUint32BE();
debug(1, "QDM2Stream::QDM2Stream() frameSize: %d", _frameSize);
extraData->readUint32BE(); // unknown

_channels = extraData->readUint32BE();
_sampleRate = extraData->readUint32BE();
_bitRate = extraData->readUint32BE();
_blockSize = extraData->readUint32BE();
_frameSize = extraData->readUint32BE();
_packetSize = extraData->readUint32BE();
debug(1, "QDM2Stream::QDM2Stream() packetSize: %d", _packetSize);

if (extraData->size() - extraData->pos() != 0) {
tmp_s = extraData->readSint32BE();
debug(1, "QDM2Stream::QDM2Stream() extraSize3: %d", tmp_s);
if (extraData->size() + 4 != tmp_s)
warning("QDM2Stream::QDM2Stream() extraSize3 mismatch - Expected %d", extraData->size() + 4);

tmp = extraData->readUint32BE();
debug(1, "QDM2Stream::QDM2Stream() extraTag3: %d", tmp);
if (tmp != MKTAG('Q','D','C','P'))
warning("QDM2Stream::QDM2Stream() extraTag3 mismatch");

if ((float)extraData->readUint32BE() != 1.0)
warning("QDM2Stream::QDM2Stream() uf0 field not 1.0");

if (extraData->readUint32BE() != 0)
warning("QDM2Stream::QDM2Stream() u1 field not 0");

if ((float)extraData->readUint32BE() != 1.0)
warning("QDM2Stream::QDM2Stream() uf1 field not 1.0");

if ((float)extraData->readUint32BE() != 1.0)
warning("QDM2Stream::QDM2Stream() uf2 field not 1.0");

if (extraData->readUint32BE() != 27)
warning("QDM2Stream::QDM2Stream() u2 field not 27");

if (extraData->readUint32BE() != 8)
warning("QDM2Stream::QDM2Stream() u3 field not 8");

if (extraData->readUint32BE() != 0)
warning("QDM2Stream::QDM2Stream() u4 field not 0");
}
// Third, we don't care about the QDCP atom

_fftOrder = Common::intLog2(_frameSize) + 1;
_fftFrameSize = 2 * _frameSize; // complex has two floats
Expand Down
10 changes: 9 additions & 1 deletion backends/platform/iphone/iphone_common.h
Expand Up @@ -86,9 +86,17 @@ struct VideoContext {
int shakeOffsetY;
};

struct InternalEvent {
InternalEvent() : type(), value1(), value2() {}
InternalEvent(InputEvent t, int v1, int v2) : type(t), value1(v1), value2(v2) {}

InputEvent type;
int value1, value2;
};

// On the ObjC side
void iPhone_updateScreen();
bool iPhone_fetchEvent(int *outEvent, int *outX, int *outY);
bool iPhone_fetchEvent(InternalEvent *event);
const char *iPhone_getDocumentsDir();
bool iPhone_isHighResDevice();

Expand Down
9 changes: 6 additions & 3 deletions backends/platform/iphone/iphone_video.h
Expand Up @@ -34,10 +34,13 @@
#include "iphone_keyboard.h"
#include "iphone_common.h"

#include "common/list.h"

@interface iPhoneView : UIView {
VideoContext _videoContext;

NSMutableArray *_events;
Common::List<InternalEvent> _events;
NSLock *_eventLock;
SoftKeyboard *_keyboardView;

EAGLContext *_context;
Expand Down Expand Up @@ -94,14 +97,14 @@
- (void)updateMouseCursorScaling;
- (void)updateMouseCursor;

- (id)getEvent;

- (void)deviceOrientationChanged:(UIDeviceOrientation)orientation;

- (void)applicationSuspend;

- (void)applicationResume;

- (bool)fetchEvent:(InternalEvent *)event;

@end

extern iPhoneView *g_iPhoneViewInstance;
Expand Down

0 comments on commit b6374a3

Please sign in to comment.