Skip to content

Commit

Permalink
Merge branch 'master' into wme_rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
wjp committed Sep 30, 2013
2 parents 057b019 + 17df6b3 commit 8e58be7
Show file tree
Hide file tree
Showing 126 changed files with 1,663 additions and 901 deletions.
2 changes: 1 addition & 1 deletion base/plugins.h
Expand Up @@ -169,7 +169,7 @@ class Plugin {
PluginType _type;

public:
Plugin() : _pluginObject(0) {}
Plugin() : _pluginObject(0), _type(PLUGIN_TYPE_MAX) {}
virtual ~Plugin() {
//if (isLoaded())
//unloadPlugin();
Expand Down
6 changes: 4 additions & 2 deletions common/dcl.cpp
Expand Up @@ -371,12 +371,14 @@ bool DecompressorDCL::unpack(ReadStream *src, byte *dest, uint32 nPacked, uint32
debug(8, "\nCOPY(%d from %d)\n", val_length, val_distance);

if (val_length + _dwWrote > _szUnpacked) {
warning("DCL-INFLATE Error: Write out of bounds while copying %d bytes", val_length);
warning("DCL-INFLATE Error: Write out of bounds while copying %d bytes (declared unpacked size is %d bytes, current is %d + %d bytes)",
val_length, _szUnpacked, _dwWrote, val_length);
return false;
}

if (_dwWrote < val_distance) {
warning("DCL-INFLATE Error: Attempt to copy from before beginning of input stream");
warning("DCL-INFLATE Error: Attempt to copy from before beginning of input stream (declared unpacked size is %d bytes, current is %d bytes)",
_szUnpacked, _dwWrote);
return false;
}

Expand Down
4 changes: 4 additions & 0 deletions common/scummsys.h
Expand Up @@ -23,6 +23,10 @@
#ifndef COMMON_SCUMMSYS_H
#define COMMON_SCUMMSYS_H

#ifndef __has_feature // Optional of course.
#define __has_feature(x) 0 // Compatibility with non-clang compilers.
#endif

// This is a convenience macro to test whether the compiler used is a GCC
// version, which is at least major.minor.
#define GCC_ATLEAST(major, minor) (defined(__GNUC__) && (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))))
Expand Down
4 changes: 2 additions & 2 deletions configure
Expand Up @@ -3410,10 +3410,10 @@ int main(void) {
return 0;
}
EOF
cc_check $PNG_CFLAGS $PNG_LIBS -lpng && _png=yes
cc_check $PNG_CFLAGS $PNG_LIBS -lpng -lz && _png=yes
fi
if test "$_png" = yes ; then
LIBS="$LIBS $PNG_LIBS -lpng"
LIBS="$LIBS $PNG_LIBS -lpng -lz"
INCLUDES="$INCLUDES $PNG_CFLAGS"
fi
define_in_config_if_yes "$_png" 'USE_PNG'
Expand Down
4 changes: 4 additions & 0 deletions devtools/convbdf.cpp
Expand Up @@ -20,6 +20,10 @@
*
*/

#ifndef __has_feature // Optional of course.
#define __has_feature(x) 0 // Compatibility with non-clang compilers.
#endif

#include <fstream>
#include <string>
#include <stdio.h>
Expand Down
4 changes: 0 additions & 4 deletions devtools/create_mortdat/create_mortdat.cpp
Expand Up @@ -33,10 +33,6 @@
#undef main
#endif // main

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "common/endian.h"
#include "create_mortdat.h"
#include "enginetext.h"
Expand Down
2 changes: 1 addition & 1 deletion devtools/create_neverhood/create_neverhood.cpp
Expand Up @@ -30,8 +30,8 @@
#undef main
#endif // main

#include <vector>
#include "create_neverhood.h"
#include <vector>
#include "md5.h"
#include "tables.h"

Expand Down
4 changes: 4 additions & 0 deletions devtools/create_project/create_project.h
Expand Up @@ -23,6 +23,10 @@
#ifndef TOOLS_CREATE_PROJECT_H
#define TOOLS_CREATE_PROJECT_H

#ifndef __has_feature // Optional of course.
#define __has_feature(x) 0 // Compatibility with non-clang compilers.
#endif

#include <map>
#include <list>
#include <string>
Expand Down
3 changes: 2 additions & 1 deletion devtools/create_translations/create_translations.cpp
Expand Up @@ -22,6 +22,8 @@
* The generated files is used by ScummVM to propose translation of its GUI.
*/

#include "create_translations.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand All @@ -34,7 +36,6 @@
#undef main
#endif // main

#include "create_translations.h"
#include "po_parser.h"
#include "cp_parser.h"

Expand Down
4 changes: 4 additions & 0 deletions devtools/create_translations/create_translations.h
Expand Up @@ -28,4 +28,8 @@ typedef unsigned short uint16;
typedef unsigned int uint32;
typedef signed short int16;

#ifndef __has_feature // Optional of course.
#define __has_feature(x) 0 // Compatibility with non-clang compilers.
#endif

#endif /* CREATE_TRANSLATIONS_H */
1 change: 1 addition & 0 deletions devtools/scumm-md5.txt
Expand Up @@ -598,6 +598,7 @@ catalog Humongous Interactive Catalog
a56e8d9d4281c53c3f63c9bd22a59e21 10978342 en All HE CUP Preview George Kormendi
74da3494fbe1a7d20213b0afe0954755 10841544 fr All HE CUP Preview - George Kormendi
4c4820518e16e1a0e3616a3b021a04f3 10927456 de All HE CUP Preview - Kirben
288fb75b24389733c29fa107fe8d44e8 10795148 us All HE CUP Preview - Kirben

airport Let's Explore the Airport with Buzzy
d6334a5a9b61afe18c368540fdf522ca -1 en Mac - - - Joachim Eberhard
Expand Down
25 changes: 14 additions & 11 deletions engines/composer/composer.cpp
Expand Up @@ -48,6 +48,15 @@ namespace Composer {
ComposerEngine::ComposerEngine(OSystem *syst, const ComposerGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
_rnd = new Common::RandomSource("composer");
_audioStream = NULL;
_currSoundPriority = 0;
_currentTime = 0;
_lastTime = 0;
_needsUpdate = true;
_directoriesToStrip = 1;
_mouseVisible = true;
_mouseEnabled = false;
_mouseSpriteId = 0;
_lastButton = NULL;
}

ComposerEngine::~ComposerEngine() {
Expand Down Expand Up @@ -79,12 +88,6 @@ Common::Error ComposerEngine::run() {
_queuedScripts[i]._scriptId = 0;
}

_mouseVisible = true;
_mouseEnabled = false;
_mouseSpriteId = 0;
_lastButton = NULL;

_directoriesToStrip = 1;
if (!_bookIni.loadFromFile("book.ini")) {
_directoriesToStrip = 0;
if (!_bookIni.loadFromFile("programs/book.ini")) {
Expand All @@ -103,7 +106,6 @@ Common::Error ComposerEngine::run() {
height = atoi(getStringFromConfig("Common", "Height").c_str());
initGraphics(width, height, true);
_screen.create(width, height, Graphics::PixelFormat::createFormatCLUT8());
_needsUpdate = true;

Graphics::Cursor *cursor = Graphics::makeDefaultWinCursor();
CursorMan.replaceCursor(cursor->getSurface(), cursor->getWidth(), cursor->getHeight(), cursor->getHotspotX(),
Expand All @@ -113,11 +115,12 @@ Common::Error ComposerEngine::run() {

loadLibrary(0);

_currentTime = 0;
_lastTime = 0;

uint fps = atoi(getStringFromConfig("Common", "FPS").c_str());
uint frameTime = 1000 / fps;
uint frameTime = 125; // Default to 125ms (1000/8)
if (fps != 0)
frameTime = 1000 / fps;
else
warning("FPS in book.ini is zero. Defaulting to 8...");
uint32 lastDrawTime = 0;

while (!shouldQuit()) {
Expand Down

0 comments on commit 8e58be7

Please sign in to comment.