HDB: Fix compilation on Amiga
This commit is contained in:
parent
8ec8b5fc7d
commit
a7e30d0e7f
4 changed files with 20 additions and 13 deletions
|
@ -1285,7 +1285,9 @@ void Menu::fillSavegameSlots() {
|
||||||
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(saveGameFile);
|
Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(saveGameFile);
|
||||||
|
|
||||||
if (!in) {
|
if (!in) {
|
||||||
memset(&_saveGames[i], 0, sizeof(Save));
|
_saveGames[i].seconds = 0;
|
||||||
|
_saveGames[i].saveID[0] = 0;
|
||||||
|
_saveGames[i].mapName[0] = 0;
|
||||||
} else {
|
} else {
|
||||||
Graphics::skipThumbnail(*in);
|
Graphics::skipThumbnail(*in);
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ Common::Error HDBGame::saveGameState(int slot, const Common::String &desc) {
|
||||||
|
|
||||||
Graphics::saveThumbnail(*out);
|
Graphics::saveThumbnail(*out);
|
||||||
|
|
||||||
memset(&_saveHeader, 0, sizeof(Save));
|
_saveHeader.fileSlot = 0;
|
||||||
strcpy(_saveHeader.saveID, saveFileName.c_str());
|
strcpy(_saveHeader.saveID, saveFileName.c_str());
|
||||||
_saveHeader.seconds = _timeSeconds + (_timePlayed / 1000);
|
_saveHeader.seconds = _timeSeconds + (_timePlayed / 1000);
|
||||||
strcpy(_saveHeader.mapName, _inMapName);
|
strcpy(_saveHeader.mapName, _inMapName);
|
||||||
|
|
|
@ -1446,11 +1446,11 @@ enum SndType {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SoundCache {
|
struct SoundCache {
|
||||||
SndMem loaded; // -1 = freeable; in memory, 0 = not cached, 1 = cached
|
SndMem loaded; // -1 = freeable; in memory, 0 = not cached, 1 = cached
|
||||||
int32 size; // size of sound
|
int size; // size of sound
|
||||||
const char *name; // filename / MSD name
|
const char *name; // filename / MSD name
|
||||||
const char *luaName; // name used by Lua for i.d.
|
const char *luaName; // name used by Lua for i.d.
|
||||||
SndType ext; // 0 = Uninitialized, -1 = WAV, 1 = MP3
|
SndType ext; // 0 = Uninitialized, -1 = WAV, 1 = MP3
|
||||||
byte *data;
|
byte *data;
|
||||||
|
|
||||||
SoundCache() : loaded(SNDMEM_NOTCACHED), size(0), name(nullptr), luaName(nullptr), ext(SNDTYPE_NONE), data(nullptr) {}
|
SoundCache() : loaded(SNDMEM_NOTCACHED), size(0), name(nullptr), luaName(nullptr), ext(SNDTYPE_NONE), data(nullptr) {}
|
||||||
|
|
|
@ -574,7 +574,9 @@ void Window::openDialog(const char *title, int tileIndex, const char *string, in
|
||||||
if (_dialogInfo.active)
|
if (_dialogInfo.active)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
memset(&_dialogInfo, 0, sizeof(_dialogInfo));
|
_dialogInfo.gfx = NULL;
|
||||||
|
_dialogInfo.el = _dialogInfo.er = _dialogInfo.et = _dialogInfo.eb = 0;
|
||||||
|
_dialogInfo.luaMore[0] = 0;
|
||||||
|
|
||||||
_dialogInfo.tileIndex = tileIndex;
|
_dialogInfo.tileIndex = tileIndex;
|
||||||
strcpy(_dialogInfo.title, title);
|
strcpy(_dialogInfo.title, title);
|
||||||
|
@ -791,18 +793,21 @@ void Window::setDialogDelay(int delay) {
|
||||||
|
|
||||||
void Window::openDialogChoice(const char *title, const char *text, const char *func, int numChoices, const char *choices[10]) {
|
void Window::openDialogChoice(const char *title, const char *text, const char *func, int numChoices, const char *choices[10]) {
|
||||||
int width, height, titleWidth, titleHeight;
|
int width, height, titleWidth, titleHeight;
|
||||||
int e1, e2, e3, e4, i;
|
int e1, e2, e3, e4;
|
||||||
|
|
||||||
if (_dialogInfo.active)
|
if (_dialogInfo.active)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
memset(&_dialogChoiceInfo, 0, sizeof(_dialogChoiceInfo));
|
_dialogChoiceInfo.el = _dialogChoiceInfo.er = _dialogChoiceInfo.et = _dialogChoiceInfo.eb = 0;
|
||||||
|
for (int i = 0; i < 10; i++)
|
||||||
|
_dialogChoiceInfo.choices[i][0] = 0;
|
||||||
|
|
||||||
strcpy(_dialogChoiceInfo.title, title);
|
strcpy(_dialogChoiceInfo.title, title);
|
||||||
strcpy(_dialogChoiceInfo.text, text);
|
strcpy(_dialogChoiceInfo.text, text);
|
||||||
strcpy(_dialogChoiceInfo.func, func);
|
strcpy(_dialogChoiceInfo.func, func);
|
||||||
_dialogChoiceInfo.numChoices = numChoices;
|
_dialogChoiceInfo.numChoices = numChoices;
|
||||||
|
|
||||||
for (i = 0; i < numChoices; i++)
|
for (int i = 0; i < numChoices; i++)
|
||||||
strcpy(_dialogChoiceInfo.choices[i], choices[i]);
|
strcpy(_dialogChoiceInfo.choices[i], choices[i]);
|
||||||
_dialogChoiceInfo.active = true;
|
_dialogChoiceInfo.active = true;
|
||||||
|
|
||||||
|
@ -811,7 +816,7 @@ void Window::openDialogChoice(const char *title, const char *text, const char *f
|
||||||
g_hdb->_gfx->getDimensions(text, &width, &height);
|
g_hdb->_gfx->getDimensions(text, &width, &height);
|
||||||
g_hdb->_gfx->getDimensions(title, &titleWidth, &titleHeight);
|
g_hdb->_gfx->getDimensions(title, &titleWidth, &titleHeight);
|
||||||
|
|
||||||
for (i = 0; i < 10; i++)
|
for (int i = 0; i < 10; i++)
|
||||||
if (choices[i]) {
|
if (choices[i]) {
|
||||||
int w, h;
|
int w, h;
|
||||||
g_hdb->_gfx->getDimensions(choices[i], &w, &h);
|
g_hdb->_gfx->getDimensions(choices[i], &w, &h);
|
||||||
|
@ -948,7 +953,7 @@ void Window::openMessageBar(const char *title, int time) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(&_msgInfo, 0, sizeof(_msgInfo));
|
_msgInfo.y = 0;
|
||||||
|
|
||||||
_msgInfo.timer = (time * kGameFPS);
|
_msgInfo.timer = (time * kGameFPS);
|
||||||
strcpy(_msgInfo.title, title);
|
strcpy(_msgInfo.title, title);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue