Patches needed to build for SYMBIAN32 WINS/GCC added.
Test built for Symbian and run on P910i without any major problems. Test built for MSVC6. Changed parts seems to compile ok but there are some problems with MSVC6 and some of the targets which the EPOC build does n't support (KYRA,SAGA). svn-id: r18430
This commit is contained in:
parent
4564f0d3bf
commit
1c69696a9a
35 changed files with 168 additions and 49 deletions
|
@ -37,12 +37,15 @@ extern OSystem *OSystem_MAC_create(int gfx_mode, bool full_screen);
|
|||
extern OSystem *OSystem_GP32_create();
|
||||
extern OSystem *OSystem_PALMOS_create();
|
||||
extern OSystem *OSystem_PS2_create();
|
||||
extern OSystem *OSystem_SymbianOS_create();
|
||||
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
#define SAMPLES_PER_SEC 22050
|
||||
#define SAMPLES_PER_SEC_OLD 11025
|
||||
#define SAMPLES_PER_SEC_NEW 22050
|
||||
#elif defined(__SYMBIAN32__)
|
||||
#define SAMPLES_PER_SEC 16000
|
||||
#elif defined(__PLAYSTATION2__)
|
||||
#define SAMPLES_PER_SEC 48000 // the SPU can't handle anything else
|
||||
#else
|
||||
|
|
|
@ -193,13 +193,17 @@ void CDECL warning(const char *s, ...) {
|
|||
va_list va;
|
||||
|
||||
va_start(va, s);
|
||||
#ifdef __SYMBIAN32__
|
||||
vsprintf(buf, s, va);
|
||||
#else
|
||||
vsnprintf(buf, STRINGBUFLEN, s, va);
|
||||
#endif
|
||||
va_end(va);
|
||||
|
||||
#ifdef __GP32__ //ph0x FIXME: implement fprint?
|
||||
printf("WARNING: %s\n", buf);
|
||||
#else
|
||||
#ifndef _WIN32_WCE
|
||||
#if !defined (_WIN32_WCE) && !defined (__SYMBIAN32__)
|
||||
fprintf(stderr, "WARNING: %s!\n", buf);
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#ifndef ENGINE_H
|
||||
#define ENGINE_H
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "common/scummsys.h"
|
||||
#include "common/str.h"
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#endif
|
||||
|
||||
// DONT FIXME: DO NOT ORDER ALPHABETICALLY, THIS IS ORDERED BY IMPORTANCE/CATEGORY! :)
|
||||
#ifdef __PALM_OS__
|
||||
#if defined(__PALM_OS__) || defined(__SYMBIAN32__)
|
||||
static const char USAGE_STRING[] = "NoUsageString"; // save more data segment space
|
||||
#else
|
||||
static const char USAGE_STRING[] =
|
||||
|
@ -194,7 +194,12 @@ GameDetector::GameDetector() {
|
|||
#endif
|
||||
|
||||
_dumpScripts = false;
|
||||
|
||||
#if defined(__SYMBIAN32__)
|
||||
_force1xOverlay = true;
|
||||
#else
|
||||
_force1xOverlay = false;
|
||||
#endif
|
||||
|
||||
memset(&_game, 0, sizeof(_game));
|
||||
_plugin = 0;
|
||||
|
@ -588,15 +593,15 @@ bool GameDetector::detectGame() {
|
|||
realGame = ConfMan.get("gameid");
|
||||
else
|
||||
realGame = _targetName;
|
||||
printf("Looking for %s\n", realGame.c_str());
|
||||
|
||||
debug(1, "Looking for %s\n", realGame.c_str());
|
||||
_game = findGame(realGame, &_plugin);
|
||||
|
||||
if (_game.name) {
|
||||
printf("Trying to start game '%s'\n", _game.description);
|
||||
debug(1, "Trying to start game '%s'\n", _game.description);
|
||||
return true;
|
||||
} else {
|
||||
printf("Failed game detection\n");
|
||||
debug(1, "Failed game detection\n");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -136,6 +136,9 @@ const char* stackCookie = "$STACK: 655360\0";
|
|||
#include <cstdio>
|
||||
#define STDOUT_FILE TEXT("stdout.txt")
|
||||
#define STDERR_FILE TEXT("stderr.txt")
|
||||
#elif defined(__SYMBIAN32__) // Symbian does not like any output to the console through any *print* function
|
||||
#define STDOUT_FILE SYMBIAN32_DOC_DIR "scummvm.stdout.txt"
|
||||
#define STDERR_FILE SYMBIAN32_DOC_DIR "scummvm.stderr.txt"
|
||||
#endif
|
||||
|
||||
#if defined(QTOPIA)
|
||||
|
@ -143,7 +146,7 @@ const char* stackCookie = "$STACK: 655360\0";
|
|||
extern "C" int main(int argc, char *argv[]);
|
||||
#endif
|
||||
|
||||
#if defined(MACOSX) || defined(QTOPIA)
|
||||
#if defined(MACOSX) || defined(QTOPIA) || defined(__SYMBIAN32__)
|
||||
#include <SDL.h>
|
||||
#elif !defined(__MORPHOS__) && !defined(__DC__) && !defined(__GP32__)
|
||||
#undef main
|
||||
|
@ -315,7 +318,8 @@ extern "C" int scummvm_main(int argc, char *argv[]) {
|
|||
#else
|
||||
extern "C" int main(int argc, char *argv[]) {
|
||||
#endif
|
||||
char *cfgFilename = NULL, *s=argv[1];
|
||||
char *cfgFilename = NULL;
|
||||
char *s=NULL;//argv[1]; SumthinWicked says: cannot assume that argv!=NULL here! eg. Symbian's CEBasicAppUI::SDLStartL() calls as main(0,NULL), if you want to change plz #ifdef __SYMBIAN32__
|
||||
bool running = true;
|
||||
|
||||
#if defined(UNIX)
|
||||
|
@ -324,7 +328,8 @@ extern "C" int main(int argc, char *argv[]) {
|
|||
#endif
|
||||
|
||||
// Code copied from SDL_main
|
||||
#if defined(WIN32) && defined(NO_CONSOLE)
|
||||
#if (defined(WIN32) && defined(NO_CONSOLE)) || defined(__SYMBIAN32__)
|
||||
// Symbian does not like any output to the console through any *print* function
|
||||
|
||||
/* Flush the output in case anything is queued */
|
||||
fclose(stdout);
|
||||
|
@ -353,7 +358,9 @@ extern "C" int main(int argc, char *argv[]) {
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#ifndef __SYMBIAN32__ // fcn not supported on Symbian
|
||||
setlinebuf(stdout); /* Line buffered */
|
||||
#endif
|
||||
setbuf(stderr, NULL); /* No buffering */
|
||||
|
||||
#endif //defined(WIN32) && defined(USE_CONSOLE)
|
||||
|
@ -490,7 +497,11 @@ void CDECL debug(int level, const char *s, ...) {
|
|||
return;
|
||||
|
||||
va_start(va, s);
|
||||
#ifdef __SYMBIAN32__
|
||||
vsprintf(buf, s, va);
|
||||
#else
|
||||
vsnprintf(buf, STRINGBUFLEN, s, va);
|
||||
#endif
|
||||
va_end(va);
|
||||
|
||||
debugHelper(buf);
|
||||
|
@ -501,7 +512,11 @@ void CDECL debug(const char *s, ...) {
|
|||
va_list va;
|
||||
|
||||
va_start(va, s);
|
||||
#ifdef __SYMBIAN32__
|
||||
vsprintf(buf, s, va);
|
||||
#else
|
||||
vsnprintf(buf, STRINGBUFLEN, s, va);
|
||||
#endif
|
||||
va_end(va);
|
||||
|
||||
debugHelper(buf);
|
||||
|
|
|
@ -47,7 +47,12 @@ public:
|
|||
_data[i] = array._data[i];
|
||||
}
|
||||
|
||||
~Array<T>() {
|
||||
#ifdef __SYMBIAN32__
|
||||
~Array()
|
||||
#else
|
||||
~Array<T>()
|
||||
#endif
|
||||
{
|
||||
if (_data)
|
||||
delete [] _data;
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ void ConfigFile::removeKey(const String &key, const String §ion) {
|
|||
|
||||
Section *s = getSection(section);
|
||||
if (s)
|
||||
return s->removeKey(key);
|
||||
s->removeKey(key);
|
||||
}
|
||||
|
||||
bool ConfigFile::getKey(const String &key, const String §ion, String &value) const {
|
||||
|
|
|
@ -86,13 +86,15 @@ void ConfigManager::loadDefaultConfigFile() {
|
|||
else
|
||||
strcpy(configFile, DEFAULT_CONFIG_FILE);
|
||||
#else
|
||||
#if defined (WIN32) && !defined(_WIN32_WCE)
|
||||
#if defined (WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
|
||||
GetWindowsDirectory(configFile, MAXPATHLEN);
|
||||
strcat(configFile, "\\" DEFAULT_CONFIG_FILE);
|
||||
#elif defined(__PALM_OS__)
|
||||
strcpy(configFile,"/PALM/Programs/ScummVM/" DEFAULT_CONFIG_FILE);
|
||||
#elif defined(__PLAYSTATION2__)
|
||||
strcpy(configFile, "mc0:ScummVM/" DEFAULT_CONFIG_FILE);
|
||||
#elif defined (__SYMBIAN32__)
|
||||
strcpy(configFile, SYMBIAN32_DOC_DIR DEFAULT_CONFIG_FILE);
|
||||
#else
|
||||
strcpy(configFile, DEFAULT_CONFIG_FILE);
|
||||
#endif
|
||||
|
|
|
@ -65,6 +65,7 @@ int Debugger<T>::DebugPrintf(const char *format, ...) {
|
|||
return count;
|
||||
}
|
||||
|
||||
#ifndef __SYMBIAN32__ // gcc/UIQ doesn't like the debugger code for some reason? Actually get a cc1plus core dump here :)
|
||||
template <class T>
|
||||
void Debugger<T>::attach(const char *entry) {
|
||||
|
||||
|
@ -105,6 +106,7 @@ void Debugger<T>::onFrame() {
|
|||
detach();
|
||||
}
|
||||
}
|
||||
#endif // of ifndef __SYMBIAN32__ // gcc/UIQ doesn't like the debugger code for some reason? Actually get a cc1plus core dump here :)
|
||||
|
||||
// Main Debugger Loop
|
||||
template <class T>
|
||||
|
|
|
@ -38,9 +38,14 @@ public:
|
|||
|
||||
int DebugPrintf(const char *format, ...);
|
||||
|
||||
#ifndef __SYMBIAN32__ // gcc/UIQ doesn't like the debugger code for some reason? Actually get a cc1plus core dump here :)
|
||||
virtual void onFrame();
|
||||
|
||||
virtual void attach(const char *entry = 0);
|
||||
#else
|
||||
void onFrame() {}
|
||||
void attach(const char *entry = 0) {}
|
||||
#endif
|
||||
bool isAttached() const { return _isAttached; }
|
||||
|
||||
protected:
|
||||
|
|
|
@ -121,7 +121,12 @@ public:
|
|||
insert(begin(), list.begin(), list.end());
|
||||
}
|
||||
|
||||
~List<T>() {
|
||||
#ifndef __SYMBIAN32__
|
||||
~List<T>()
|
||||
#else
|
||||
~List()
|
||||
#endif
|
||||
{
|
||||
clear();
|
||||
delete _anchor;
|
||||
}
|
||||
|
|
|
@ -110,7 +110,12 @@ public:
|
|||
_header->_right = _header->_left = _header;
|
||||
}
|
||||
|
||||
virtual ~Map<Key, Value, Comparator>() {
|
||||
#ifndef __SYMBIAN32__
|
||||
virtual ~Map<Key, Value, Comparator>()
|
||||
#else
|
||||
~Map()
|
||||
#endif
|
||||
{
|
||||
clearNodes(_root);
|
||||
delete _header;
|
||||
_root = _header = 0;
|
||||
|
|
|
@ -38,6 +38,11 @@
|
|||
#define PI 3.14159265358979323846
|
||||
#endif
|
||||
|
||||
// make sure we really are compiling for WIN32
|
||||
#ifndef WIN32
|
||||
#undef _MSC_VER
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
|
||||
#define scumm_stricmp stricmp
|
||||
|
@ -289,6 +294,29 @@
|
|||
typedef unsigned char byte;
|
||||
typedef unsigned int uint;
|
||||
#endif
|
||||
#elif defined __SYMBIAN32__ // AnotherGuest / Sprawl / SumthinWicked
|
||||
|
||||
#define scumm_stricmp strcasecmp
|
||||
#define scumm_strnicmp strncasecmp
|
||||
|
||||
#define CDECL
|
||||
#define SCUMM_NEED_ALIGNMENT
|
||||
#define SCUMM_LITTLE_ENDIAN
|
||||
#define CHECK_HEAP
|
||||
|
||||
#define FORCEINLINE inline
|
||||
#define _HEAPOK 0
|
||||
typedef unsigned char byte;
|
||||
typedef unsigned char uint8;
|
||||
typedef unsigned short int uint16;
|
||||
typedef unsigned long int uint32;
|
||||
typedef unsigned int uint;
|
||||
typedef signed char int8;
|
||||
typedef signed short int int16;
|
||||
typedef signed long int int32;
|
||||
|
||||
#define START_PACK_STRUCTS pack (push,1)
|
||||
#define END_PACK_STRUCTS pack(pop)
|
||||
#else
|
||||
#error No system type defined
|
||||
#endif
|
||||
|
|
|
@ -45,7 +45,7 @@ private:
|
|||
* and you specialise makeInstance to return an instance of a subclass.
|
||||
*/
|
||||
//template <class T>
|
||||
#if defined (_WIN32_WCE) || defined (_MSC_VER)
|
||||
#if defined (_WIN32_WCE) || defined (_MSC_VER) || defined (__WINS__)
|
||||
//FIXME evc4 and msvc7 doesn't like it as private member
|
||||
public:
|
||||
#endif
|
||||
|
@ -69,7 +69,11 @@ public:
|
|||
}
|
||||
protected:
|
||||
Singleton<T>() { }
|
||||
#ifdef __SYMBIAN32__
|
||||
virtual ~Singleton() { }
|
||||
#else
|
||||
virtual ~Singleton<T>() { }
|
||||
#endif
|
||||
|
||||
typedef T SingletonBaseType;
|
||||
};
|
||||
|
|
|
@ -56,6 +56,8 @@ OSystem *OSystem::makeInstance() {
|
|||
return OSystem_PALMOS_create();
|
||||
#elif defined(__PLAYSTATION2__)
|
||||
return OSystem_PS2_create();
|
||||
#elif defined(__SYMBIAN32__) // SumthinWicked / Sprawl
|
||||
return OSystem_SymbianOS_create();
|
||||
#else
|
||||
/* SDL is the default driver for now */
|
||||
return OSystem_SDL_create();
|
||||
|
|
|
@ -82,7 +82,12 @@ void hexdump(const byte * data, int len, int bytesPerLine) {
|
|||
RandomSource::RandomSource() {
|
||||
// Use system time as RNG seed. Normally not a good idea, if you are using
|
||||
// a RNG for security purposes, but good enough for our purposes.
|
||||
setSeed(time(0));
|
||||
#if defined (__SYMBIAN32__) && defined (__WINS__)
|
||||
uint32 seed = 0; // Symbian produces RT crash on time(0)
|
||||
#else
|
||||
uint32 seed = time(0);
|
||||
#endif
|
||||
setSeed(seed);
|
||||
}
|
||||
|
||||
void RandomSource::setSeed(uint32 seed) {
|
||||
|
|
|
@ -40,7 +40,8 @@ struct Surface {
|
|||
Surface() : pixels(0), w(0), h(0), pitch(0), bytesPerPixel(0) {}
|
||||
|
||||
inline const void *getBasePtr(int x, int y) const {
|
||||
return static_cast<const void *>(static_cast<const byte *>(pixels) + y * pitch + x * bytesPerPixel);
|
||||
// SumthinWicked says: I was getting a typecast error here from GCC/UIQ: might need an #ifdef __SYMBIAN32__
|
||||
return static_cast<const void *>(static_cast<byte *>(pixels) + y * pitch + x * bytesPerPixel);
|
||||
}
|
||||
|
||||
inline void *getBasePtr(int x, int y) {
|
||||
|
|
|
@ -542,6 +542,8 @@ int ConsoleDialog::vprintf(const char *format, va_list argptr) {
|
|||
|
||||
#if defined(WIN32)
|
||||
int count = _vsnprintf(buf, sizeof(buf), format, argptr);
|
||||
#elif defined(__SYMBIAN32__)
|
||||
int count = vsprintf(buf, format, argptr);
|
||||
#else
|
||||
int count = vsnprintf(buf, sizeof(buf), format, argptr);
|
||||
#endif
|
||||
|
|
|
@ -40,6 +40,8 @@ static const char *credits[] = {
|
|||
"\\L\\c2"" MT-32 emulator",
|
||||
"\\L\\c0"" Jochen Hoenicke",
|
||||
"\\L\\c2"" Speaker & PCjr sound support, Adlib work",
|
||||
"\\L\\c0"" Jurgen Braam",
|
||||
"\\L\\c2"" Port: EPOC/SymbianOS maintainer",
|
||||
"\\L\\c0""",
|
||||
"\\C\\c1""Retired Team Members:",
|
||||
"\\L\\c0"" Ralph Brorsen",
|
||||
|
@ -105,6 +107,10 @@ static const char *credits[] = {
|
|||
"\\L\\c2"" SDL-based OpenGL renderer",
|
||||
"\\L\\c0"" Tim ???",
|
||||
"\\L\\c2"" Initial MI1 CD music support",
|
||||
"\\L\\c0"" Andreas Karlsson",
|
||||
"\\L\\c2"" Port: EPOC/SymbianOS, ESDL",
|
||||
"\\L\\c0"" Lars Persson",
|
||||
"\\L\\c2"" Port: EPOC/SymbianOS, Audio System, Alignment fixes, ESDL",
|
||||
"\\L\\c0""",
|
||||
"\\L\\c0""And to all the contributors, users, and beta testers we've missed. Thanks!",
|
||||
"\\L\\c0""",
|
||||
|
|
|
@ -48,6 +48,11 @@ enum {
|
|||
kKeyRepeatSustainDelay = 100
|
||||
};
|
||||
|
||||
#if defined(__SYMBIAN32__) // Testing: could be removed? Just making sure that an CVS update doesn't break my code :P
|
||||
#define USE_AUTO_SCALING false
|
||||
#else
|
||||
#define USE_AUTO_SCALING false
|
||||
#endif
|
||||
|
||||
// Constructor
|
||||
NewGui::NewGui() : _needRedraw(false),
|
||||
|
|
|
@ -51,6 +51,7 @@ Debugger::Debugger(QueenEngine *vm)
|
|||
DCmd_Register("song", &Debugger::Cmd_Song);
|
||||
}
|
||||
|
||||
Debugger::~Debugger() {} // we need this here for __SYMBIAN32__
|
||||
void Debugger::preEnter() {
|
||||
}
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ class Debugger : public Common::Debugger<Debugger> {
|
|||
public:
|
||||
|
||||
Debugger(QueenEngine *vm);
|
||||
virtual ~Debugger(); // we need this here for __SYMBIAN32__ archaic gcc/UIQ
|
||||
|
||||
int flags() const { return _flags; }
|
||||
|
||||
|
|
|
@ -214,8 +214,8 @@ public:
|
|||
|
||||
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
||||
const String &getResultString() const;
|
||||
void setList(const StringList& list) { GUI::ChooserDialog::setList(list); }
|
||||
int runModal() { return GUI::ChooserDialog::runModal(); }
|
||||
void setList(const StringList& list) { GUI_ChooserDialog::setList(list); }
|
||||
int runModal() { return GUI_ChooserDialog::runModal(); }
|
||||
};
|
||||
|
||||
SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode)
|
||||
|
@ -316,7 +316,7 @@ void SaveLoadChooserEx::setList(const StringList& list) {
|
|||
|
||||
int SaveLoadChooserEx::runModal() {
|
||||
_gfxWidget->setGfx(0);
|
||||
int ret = GUI::Dialog::runModal();
|
||||
int ret = Dialog::runModal();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -339,7 +339,7 @@ void SaveLoadChooserEx::handleCommand(CommandSender *sender, uint32 cmd, uint32
|
|||
close();
|
||||
break;
|
||||
case GUI::kListSelectionChangedCmd: {
|
||||
const Graphics::Surface *thumb;
|
||||
Graphics::Surface *thumb;
|
||||
thumb = _scumm->loadThumbnailFromSlot(_saveMode ? selItem + 1 : selItem);
|
||||
_gfxWidget->setGfx(thumb);
|
||||
delete thumb;
|
||||
|
@ -357,7 +357,7 @@ void SaveLoadChooserEx::handleCommand(CommandSender *sender, uint32 cmd, uint32
|
|||
case kCloseCmd:
|
||||
setResult(-1);
|
||||
default:
|
||||
GUI::Dialog::handleCommand(sender, cmd, data);
|
||||
Dialog::handleCommand(sender, cmd, data);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1263,7 +1263,7 @@ void IMuseInternal::initMT32(MidiDriver *midi) {
|
|||
|
||||
void IMuseInternal::initGM(MidiDriver *midi) {
|
||||
byte buffer[11];
|
||||
|
||||
int i=0;
|
||||
// General MIDI System On message
|
||||
// Resets all GM devices to default settings
|
||||
memcpy(&buffer[0], "\xF0\x7E\x7F\x09\x01\xF7", 6);
|
||||
|
@ -1321,13 +1321,13 @@ void IMuseInternal::initGM(MidiDriver *midi) {
|
|||
|
||||
// Set Channels 1-16 Reverb to 64, which is the
|
||||
// equivalent of MT-32 default Reverb Level 5
|
||||
for (int i = 0; i < 16; ++i)
|
||||
for (i = 0; i < 16; ++i)
|
||||
midi->send(( 64 << 16) | (91 << 8) | (0xB0 | i));
|
||||
debug(2, "GM Controller 91 Change: Channels 1-16 Reverb Level is 64");
|
||||
|
||||
// Set Channels 1-16 Pitch Bend Sensitivity to
|
||||
// 12 semitones; then lock the RPN by setting null.
|
||||
for (int i = 0; i < 16; ++i) {
|
||||
for (i = 0; i < 16; ++i) {
|
||||
midi->send(( 0 << 16) | (100 << 8) | (0xB0 | i));
|
||||
midi->send(( 0 << 16) | (101 << 8) | (0xB0 | i));
|
||||
midi->send(( 12 << 16) | (6 << 8) | (0xB0 | i));
|
||||
|
|
|
@ -401,8 +401,9 @@ int32 LogicHEfunshop::dispatch(int op, int numArgs, int32 *args) {
|
|||
void LogicHEfunshop::op_1004(int32 *args) {
|
||||
double data[8], at, sq;
|
||||
int32 x, y;
|
||||
int i=0;
|
||||
|
||||
for (int i = 0; i <= 6; i += 2) {
|
||||
for (i = 0; i <= 6; i += 2) {
|
||||
data[i] = getFromArray(args[0], 0, 519 + i);
|
||||
data[i + 1] = getFromArray(args[0], 0, 519 + i + 1);
|
||||
}
|
||||
|
@ -414,14 +415,14 @@ void LogicHEfunshop::op_1004(int32 *args) {
|
|||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i <= 6; i += 2) {
|
||||
for (i = 0; i <= 6; i += 2) {
|
||||
data[i] -= (double)x;
|
||||
data[i + 1] -= (double)y;
|
||||
}
|
||||
|
||||
double a1 = (double)args[1] * DEG2RAD;
|
||||
|
||||
for (int i = 0; i <= 6; i += 2) {
|
||||
for (i = 0; i <= 6; i += 2) {
|
||||
at = atan2(data[i + 1], data[i]);
|
||||
sq = hypot(data[i + 1], data[i]);
|
||||
|
||||
|
@ -435,14 +436,14 @@ void LogicHEfunshop::op_1004(int32 *args) {
|
|||
int minx = 2;
|
||||
int miny = 3;
|
||||
|
||||
for (int i = 0; i <= 6; i += 2) {
|
||||
for (i = 0; i <= 6; i += 2) {
|
||||
if (data[i] < data[minx])
|
||||
minx = i;
|
||||
if (data[i + 1] < data[miny])
|
||||
miny = i + 1;
|
||||
}
|
||||
|
||||
for (int i = 0; i <= 6; i += 2) {
|
||||
for (i = 0; i <= 6; i += 2) {
|
||||
data[i] -= data[minx];
|
||||
data[i + 1] -= data[miny];
|
||||
|
||||
|
@ -454,8 +455,8 @@ void LogicHEfunshop::op_1004(int32 *args) {
|
|||
void LogicHEfunshop::op_1005(int32 *args) {
|
||||
double data[8];
|
||||
double args1, args2;
|
||||
|
||||
for (int i = 520; i <= 526; i += 2) {
|
||||
int i=0;
|
||||
for (i = 520; i <= 526; i += 2) {
|
||||
data[i - 520] = getFromArray(args[0], 0, i - 1);
|
||||
data[i - 520 + 1] = getFromArray(args[0], 0, i);
|
||||
}
|
||||
|
@ -463,12 +464,12 @@ void LogicHEfunshop::op_1005(int32 *args) {
|
|||
args1 = args[1] * 0.01 + 1;
|
||||
args2 = args[2] * 0.01 + 1;
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
data[2 * i] *= args1;
|
||||
data[2 * i + 1] *= args2;
|
||||
}
|
||||
|
||||
for (int i = 520; i <= 526; i += 2) {
|
||||
for (i = 520; i <= 526; i += 2) {
|
||||
putInArray(args[0], 0, i - 1, scumm_round(data[i - 520]));
|
||||
putInArray(args[0], 0, i, scumm_round(data[i - 520 + 1]));
|
||||
}
|
||||
|
|
|
@ -35,6 +35,10 @@ namespace Scumm {
|
|||
|
||||
class ScummEngine;
|
||||
|
||||
static const int MAXVOLUME = 0x7F;
|
||||
static const int NUMSLOTS = 3;
|
||||
static const int NUMCHANS = 4;
|
||||
|
||||
/**
|
||||
* Scumm NES sound/music driver.
|
||||
*/
|
||||
|
@ -77,10 +81,6 @@ private:
|
|||
int _current_sample;
|
||||
int _maxvol;
|
||||
|
||||
static const int MAXVOLUME = 0x7F;
|
||||
static const int NUMSLOTS = 3;
|
||||
static const int NUMCHANS = 4;
|
||||
|
||||
struct slot {
|
||||
int framesleft;
|
||||
int id;
|
||||
|
|
|
@ -1198,8 +1198,8 @@ void SmushPlayer::tryCmpFile(const char *filename) {
|
|||
if (i == NULL) {
|
||||
error("invalid filename : %s", filename);
|
||||
}
|
||||
char fname[260];
|
||||
#ifdef USE_MAD
|
||||
char fname[260];
|
||||
memcpy(fname, filename, i - filename);
|
||||
strcpy(fname + (i - filename), ".mp3");
|
||||
_compressedFile.open(fname);
|
||||
|
|
|
@ -103,7 +103,9 @@ Graphics::Surface *ScummEngine::loadThumbnail(Common::InSaveFile *file) {
|
|||
void ScummEngine::saveThumbnail(Common::OutSaveFile *file) {
|
||||
Graphics::Surface thumb;
|
||||
|
||||
#ifndef DISABLE_HQ_SCALERS // fcn has dep on HQ_SCALERS: thumbnail gets created as empty
|
||||
if (!createThumbnailFromScreen(&thumb))
|
||||
#endif
|
||||
thumb.create(kThumbnailWidth, kThumbnailHeight2, sizeof(uint16));
|
||||
|
||||
ThumbnailHeader header;
|
||||
|
|
|
@ -31,6 +31,7 @@ class SimonEngine;
|
|||
class Debugger : public Common::Debugger<Debugger> {
|
||||
public:
|
||||
Debugger(SimonEngine *vm);
|
||||
virtual ~Debugger() {} // we need this for __SYMBIAN32__ archaic gcc/UIQ
|
||||
|
||||
protected:
|
||||
SimonEngine *_vm;
|
||||
|
|
|
@ -268,7 +268,7 @@ static const char* bad_versions[3] = {
|
|||
|
||||
SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
|
||||
: Engine(syst), midi(syst) {
|
||||
|
||||
int j =0;
|
||||
_vcPtr = 0;
|
||||
_vc_get_out_of_code = 0;
|
||||
_gameOffsetsPtr = 0;
|
||||
|
@ -321,11 +321,11 @@ SimonEngine::SimonEngine(GameDetector *detector, OSystem *syst)
|
|||
|
||||
if (Common::md5_file(buf, md5sum)) {
|
||||
char md5str[32+1];
|
||||
for (int j = 0; j < 16; j++) {
|
||||
for (j = 0; j < 16; j++) {
|
||||
sprintf(md5str + j*2, "%02x", (int)md5sum[j]);
|
||||
}
|
||||
|
||||
for (int j = 0; j < 3; j++) {
|
||||
for (j = 0; j < 3; j++) {
|
||||
if (!strcmp(md5str, bad_versions[j]))
|
||||
error("Cracked versions aren't supported");
|
||||
}
|
||||
|
@ -1697,6 +1697,7 @@ uint SimonEngine::get_fcs_ptr_3_index(FillOrCopyStruct *fcs) {
|
|||
return i;
|
||||
|
||||
error("get_fcs_ptr_3_index: not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SimonEngine::lock() {
|
||||
|
@ -2280,6 +2281,7 @@ TextLocation *SimonEngine::getTextLocation(uint a) {
|
|||
default:
|
||||
error("text, invalid value %d", a);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void SimonEngine::o_print_str() {
|
||||
|
@ -3040,6 +3042,7 @@ uint SimonEngine::itemPtrToID(Item *id) {
|
|||
if (_itemArrayPtr[i] == id)
|
||||
return i;
|
||||
error("itemPtrToID: not found");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SimonEngine::o_pathfind(int x, int y, uint var_1, uint var_2) {
|
||||
|
|
|
@ -1290,6 +1290,8 @@ Debugger::Debugger(Logic *logic, Mouse *mouse, Screen *screen, SkyCompact *skyCo
|
|||
DCmd_Register("section", &Debugger::Cmd_Section);
|
||||
}
|
||||
|
||||
Debugger::~Debugger() {} // we need this here for __SYMBIAN32__
|
||||
|
||||
void Debugger::preEnter() {
|
||||
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ class SkyCompact;
|
|||
class Debugger : public Common::Debugger<Debugger> {
|
||||
public:
|
||||
Debugger(Logic *logic, Mouse *mouse, Screen *screen, SkyCompact *skyCompact);
|
||||
virtual ~Debugger(); // we need this here for __SYMBIAN32__ archaic gcc/UIQ
|
||||
bool showGrid() { return _showGrid; }
|
||||
|
||||
protected:
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include "common/util.h"
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
#if defined (_WIN32_WCE)|| defined (__SYMBIAN32__)
|
||||
#include "common/config-manager.h"
|
||||
#endif
|
||||
|
||||
|
@ -1167,7 +1167,7 @@ FM_OPL *makeAdlibOPL(int rate) {
|
|||
// We need to emulate one YM3812 chip
|
||||
int env_bits = FMOPL_ENV_BITS_HQ;
|
||||
int eg_ent = FMOPL_EG_ENT_HQ;
|
||||
#ifdef _WIN32_WCE
|
||||
#if defined (_WIN32_WCE)|| defined(__SYMBIAN32__)
|
||||
if (ConfMan.hasKey("FM_high_quality") && ConfMan.getBool("FM_high_quality")) {
|
||||
env_bits = FMOPL_ENV_BITS_HQ;
|
||||
eg_ent = FMOPL_EG_ENT_HQ;
|
||||
|
|
|
@ -33,7 +33,7 @@ static const struct MidiDriverDescription midiDrivers[] = {
|
|||
{"auto", "Default", MD_AUTO},
|
||||
{"null", "No music", MD_NULL},
|
||||
|
||||
#if defined(WIN32) && !defined(_WIN32_WCE)
|
||||
#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
|
||||
{"windows", "Windows MIDI", MD_WINDOWS},
|
||||
#endif
|
||||
|
||||
|
@ -126,7 +126,7 @@ int MidiDriver::detectMusicDriver(int midiFlags) {
|
|||
if (musicDriver == MD_AUTO || musicDriver < 0) {
|
||||
if (midiFlags & MDT_PREFER_NATIVE) {
|
||||
if (musicDriver == MD_AUTO) {
|
||||
#if defined(WIN32) && !defined(_WIN32_WCE)
|
||||
#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
|
||||
musicDriver = MD_WINDOWS; // MD_WINDOWS is default MidiDriver on windows targets
|
||||
#elif defined(MACOSX)
|
||||
musicDriver = MD_COREAUDIO;
|
||||
|
@ -134,7 +134,7 @@ int MidiDriver::detectMusicDriver(int midiFlags) {
|
|||
musicDriver = MD_YPA1; // TODO : change this and use Zodiac driver when needed
|
||||
#elif defined(__MORPHOS__)
|
||||
musicDriver = MD_ETUDE;
|
||||
#elif defined(_WIN32_WCE) || defined(UNIX) || defined(X11_BACKEND)
|
||||
#elif defined(_WIN32_WCE) || defined(UNIX) || defined(X11_BACKEND) || defined (__SYMBIAN32__)
|
||||
// Always use MIDI emulation via adlib driver on CE and UNIX device
|
||||
|
||||
// TODO: We should, for the Unix targets, attempt to detect
|
||||
|
@ -195,7 +195,7 @@ MidiDriver *MidiDriver::createMidi(int midiDriver) {
|
|||
case MD_ZODIAC: return MidiDriver_Zodiac_create();
|
||||
#endif
|
||||
#endif
|
||||
#if defined(WIN32) && !defined(_WIN32_WCE)
|
||||
#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
|
||||
case MD_WINDOWS: return MidiDriver_WIN_create();
|
||||
#endif
|
||||
#if defined(__MORPHOS__)
|
||||
|
|
|
@ -337,6 +337,8 @@ begin_credits("Credits");
|
|||
add_person("Hans-Jörg Frieden", "", "Port: AmigaOS 4");
|
||||
add_person("Jerome Fisher", "KingGuppy", "MT-32 emulator");
|
||||
add_person("Jochen Hoenicke", "hoenicke", "Speaker & PCjr sound support, Adlib work");
|
||||
add_person("Lars Persson", "AnotherGuest", "Port: EPOC/SymbianOS, ESDL");
|
||||
add_person("Jurgen Braam", "SumthinWicked", "Port: EPOC/SymbianOS maintainer");
|
||||
end_section();
|
||||
|
||||
|
||||
|
@ -374,6 +376,7 @@ begin_credits("Credits");
|
|||
add_person("Johannes Schickel", "LordHoto", "Thumbnails for ScummEngine");
|
||||
add_person("André Souza", "", "SDL-based OpenGL renderer");
|
||||
add_person("Tim ???", "realmz", "Initial MI1 CD music support");
|
||||
add_person("Andreas Karlsson", "Sprawl", "Port: EPOC/SymbianOS");
|
||||
end_section();
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue