mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
XEEN: Compilation fixes for gcc
This commit is contained in:
parent
b12e26836a
commit
f46b9d77dd
@ -66,9 +66,10 @@ void DarkSideEngine::showTitle1() {
|
||||
SpriteResource("nwc1.int"), SpriteResource("nwc2.int"),
|
||||
SpriteResource("nwc3.int"), SpriteResource("nwc4.int")
|
||||
};
|
||||
File voc[3] = {
|
||||
File("dragon1.voc"), File("dragon2.voc"), File("dragon3.voc")
|
||||
};
|
||||
Common::File voc[3];
|
||||
voc[0].open("dragon1.voc");
|
||||
voc[1].open("dragon2.voc");
|
||||
voc[2].open("dragon3.voc");
|
||||
|
||||
// Load backgrounds
|
||||
_screen->loadBackground("nwc1.raw");
|
||||
@ -168,9 +169,9 @@ void DarkSideEngine::showStartSequence() {
|
||||
SpriteResource sprites[3] = {
|
||||
SpriteResource("title.int"), SpriteResource("pyratop.int"), SpriteResource("pyramid.int")
|
||||
};
|
||||
File voc[2] = {
|
||||
File("pharoh1a.voc"), File("pharoh1b.voc")
|
||||
};
|
||||
Common::File voc[2];
|
||||
voc[0].open("pharoh1a.voc");
|
||||
voc[1].open("pharoh1b.voc");
|
||||
|
||||
_screen->vertMerge(SCREEN_HEIGHT);
|
||||
_screen->loadPage(0);
|
||||
|
@ -102,14 +102,14 @@ void ButtonContainer::doScroll(XeenEngine *vm, bool drawFlag, bool doFade) {
|
||||
// Load hand vga files
|
||||
SpriteResource *hand[16];
|
||||
for (int i = 0; i < 16; ++i) {
|
||||
Common::String name = Common::String::format("hand%02u.vga", i);
|
||||
Common::String name = Common::String::format("hand%02d.vga", i);
|
||||
hand[i] = new SpriteResource(name);
|
||||
}
|
||||
|
||||
// Load marb vga files
|
||||
SpriteResource *marb[5];
|
||||
for (int i = 1; i < 5; ++i) {
|
||||
Common::String name = Common::String::format("marb%02u.vga");
|
||||
Common::String name = Common::String::format("marb%02d.vga", i);
|
||||
marb[i] = new SpriteResource(name);
|
||||
}
|
||||
|
||||
|
@ -76,6 +76,8 @@ protected:
|
||||
virtual void showContents(SpriteResource &title1, bool mode);
|
||||
public:
|
||||
SettingsBaseDialog(XeenEngine *vm) : ButtonContainer(), _vm(vm) {}
|
||||
|
||||
virtual ~SettingsBaseDialog() {}
|
||||
};
|
||||
|
||||
class CreditsScreen: public ButtonContainer {
|
||||
|
@ -38,7 +38,7 @@ void ErrorScroll::execute(const Common::String &msg, ErrorWaitType waitType) {
|
||||
EventsManager &events = *_vm->_events;
|
||||
Window &w = screen._windows[6];
|
||||
|
||||
Common::String s = Common::String::format("\x03c\v010\t000%s", msg);
|
||||
Common::String s = Common::String::format("\x03c\v010\t000%s", msg.c_str());
|
||||
w.open();
|
||||
w.writeString(s);
|
||||
w.update();
|
||||
|
@ -46,6 +46,8 @@ protected:
|
||||
|
||||
virtual void openWindow() {}
|
||||
public:
|
||||
virtual ~OptionsMenu() {}
|
||||
|
||||
static void show(XeenEngine *vm);
|
||||
};
|
||||
|
||||
@ -54,6 +56,8 @@ protected:
|
||||
virtual void startup(Common::String &title1, Common::String &title2);
|
||||
public:
|
||||
CloudsOptionsMenu(XeenEngine *vm) : OptionsMenu(vm) {}
|
||||
|
||||
virtual ~CloudsOptionsMenu() {}
|
||||
};
|
||||
|
||||
class DarkSideOptionsMenu : public OptionsMenu {
|
||||
@ -61,6 +65,8 @@ protected:
|
||||
virtual void startup(Common::String &title1, Common::String &title2);
|
||||
public:
|
||||
DarkSideOptionsMenu(XeenEngine *vm) : OptionsMenu(vm) {}
|
||||
|
||||
virtual ~DarkSideOptionsMenu() {}
|
||||
};
|
||||
|
||||
class WorldOptionsMenu : public DarkSideOptionsMenu {
|
||||
@ -80,6 +86,8 @@ protected:
|
||||
virtual void showContents(SpriteResource &title1, bool mode);
|
||||
public:
|
||||
WorldOptionsMenu(XeenEngine *vm) : DarkSideOptionsMenu(vm), _bgFrame(0) {}
|
||||
|
||||
virtual ~WorldOptionsMenu() {}
|
||||
};
|
||||
|
||||
} // End of namespace Xeen
|
||||
|
@ -34,7 +34,7 @@ FontSurface::FontSurface() : XSurface(), _fontData(nullptr), _bgColor(DEFAULT_BG
|
||||
_textColors[3] = 0x20;
|
||||
}
|
||||
|
||||
FontSurface::FontSurface(int w, int h) : XSurface(), _fontData(nullptr), _msgWraps(false),
|
||||
FontSurface::FontSurface(int wv, int hv) : XSurface(wv, hv), _fontData(nullptr), _msgWraps(false),
|
||||
_bgColor(DEFAULT_BG_COLOR), _fontReduced(false), _fontJustify(JUSTIFY_NONE) {
|
||||
create(w, h);
|
||||
_textColors[0] = 0;
|
||||
@ -173,12 +173,12 @@ Common::String FontSurface::writeString(const Common::String &s, const Common::R
|
||||
_fontJustify = JUSTIFY_NONE;
|
||||
} else if (c == 4) {
|
||||
// Draw an empty box of a given width
|
||||
int w = fontAtoi();
|
||||
int wv = fontAtoi();
|
||||
Common::Point pt = _writePos;
|
||||
if (_fontJustify == JUSTIFY_RIGHT)
|
||||
pt.x -= w;
|
||||
pt.x -= wv;
|
||||
|
||||
Common::Rect r(pt.x, pt.y, pt.x + w, pt.y + (_fontReduced ? 9 : 10));
|
||||
Common::Rect r(pt.x, pt.y, pt.x + wv, pt.y + (_fontReduced ? 9 : 10));
|
||||
fillRect(r, _bgColor);
|
||||
} else if (c == 5) {
|
||||
continue;
|
||||
@ -187,8 +187,8 @@ Common::String FontSurface::writeString(const Common::String &s, const Common::R
|
||||
writeChar(' ');
|
||||
} else if (c == 7) {
|
||||
// Set text background color
|
||||
int c = fontAtoi();
|
||||
_bgColor = (c < 0 || c > 255) ? DEFAULT_BG_COLOR : c;
|
||||
int bgColor = fontAtoi();
|
||||
_bgColor = (bgColor < 0 || bgColor > 255) ? DEFAULT_BG_COLOR : bgColor;
|
||||
} else if (c == 8) {
|
||||
// Draw a character outline
|
||||
c = getNextChar();
|
||||
@ -218,8 +218,8 @@ Common::String FontSurface::writeString(const Common::String &s, const Common::R
|
||||
}
|
||||
} else if (c == 9) {
|
||||
// Skip x position
|
||||
int xp = fontAtoi();
|
||||
_writePos.x = MIN(bounds.left + xp, (int)bounds.right);
|
||||
int xAmount = fontAtoi();
|
||||
_writePos.x = MIN(bounds.left + xAmount, (int)bounds.right);
|
||||
} else if (c == 10) {
|
||||
// Newline
|
||||
if (newLine(bounds))
|
||||
@ -304,10 +304,10 @@ bool FontSurface::newLine(const Common::Rect &bounds) {
|
||||
_msgWraps = false;
|
||||
_writePos.x = bounds.left;
|
||||
|
||||
int h = _fontReduced ? 9 : 10;
|
||||
_writePos.y += h;
|
||||
int hv = _fontReduced ? 9 : 10;
|
||||
_writePos.y += hv;
|
||||
|
||||
return ((_writePos.y + h - 1) > bounds.bottom);
|
||||
return ((_writePos.y + hv - 1) > bounds.bottom);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
Justify _fontJustify;
|
||||
public:
|
||||
FontSurface();
|
||||
FontSurface(int w, int h);
|
||||
FontSurface(int wv, int hv);
|
||||
virtual ~FontSurface() {}
|
||||
|
||||
void writeSymbol(int symbolId);
|
||||
|
@ -28,7 +28,7 @@
|
||||
namespace Xeen {
|
||||
|
||||
Interface::Interface(XeenEngine *vm) : ButtonContainer(), InterfaceMap(vm), _vm(vm) {
|
||||
Common::fill(&_partyFaces[0], &_partyFaces[MAX_ACTIVE_PARTY], nullptr);
|
||||
Common::fill(&_partyFaces[0], &_partyFaces[MAX_ACTIVE_PARTY], (SpriteResource *)nullptr);
|
||||
_batUIFrame = 0;
|
||||
_spotDoorsUIFrame = 0;
|
||||
_dangerSenseUIFrame = 0;
|
||||
@ -425,7 +425,7 @@ void Interface::setupFaces(int charIndex, Common::Array<int> xeenSideChars, bool
|
||||
int charId;
|
||||
|
||||
for (posIndex = 0; posIndex < 4; ++posIndex) {
|
||||
int charId = xeenSideChars[charIndex];
|
||||
charId = xeenSideChars[charIndex];
|
||||
bool isInParty = _vm->_party.isInParty(charId);
|
||||
|
||||
if (charId == 0xff) {
|
||||
@ -902,7 +902,7 @@ void Interface::setMazeBits() {
|
||||
break;
|
||||
case 4:
|
||||
case 7:
|
||||
_wo[27];
|
||||
++_wo[27];
|
||||
break;
|
||||
case 5:
|
||||
++_wo[227];
|
||||
|
@ -18,7 +18,6 @@ MODULE_OBJS := \
|
||||
items.o \
|
||||
map.o \
|
||||
party.o \
|
||||
resdata.o \
|
||||
resources.o \
|
||||
saves.o \
|
||||
screen.o \
|
||||
|
@ -27,7 +27,7 @@ namespace Xeen {
|
||||
SoundManager::SoundManager(XeenEngine *vm): _vm(vm) {
|
||||
}
|
||||
|
||||
void SoundManager::proc2(File &f) {
|
||||
void SoundManager::proc2(Common::SeekableReadStream &f) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -35,11 +35,11 @@ private:
|
||||
public:
|
||||
SoundManager(XeenEngine *vm);
|
||||
|
||||
void proc2(File &f);
|
||||
void proc2(Common::SeekableReadStream &f);
|
||||
|
||||
void startMusic(int v1);
|
||||
|
||||
void playSong(const File &f) {}
|
||||
void playSong(Common::SeekableReadStream &f) {}
|
||||
|
||||
void playSample(const Common::SeekableReadStream *stream, int v2) {}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user