aboutsummaryrefslogtreecommitdiff
path: root/sword2/driver
diff options
context:
space:
mode:
authorMax Horn2004-02-28 12:58:13 +0000
committerMax Horn2004-02-28 12:58:13 +0000
commitc6752cccf5186fb04c97e2bb4a64c52fc9447073 (patch)
tree91f3f0264b1542a839cc3504b52603a8034547cb /sword2/driver
parent56102a1d02925abbe9fc0504751de1a270a34ff3 (diff)
downloadscummvm-rg350-c6752cccf5186fb04c97e2bb4a64c52fc9447073.tar.gz
scummvm-rg350-c6752cccf5186fb04c97e2bb4a64c52fc9447073.tar.bz2
scummvm-rg350-c6752cccf5186fb04c97e2bb4a64c52fc9447073.zip
renamed more OSystem methods to follow our naming scheme; renamed NewGuiColor to OverlayColor; fixed some calls to error() in the SDL backend
svn-id: r13087
Diffstat (limited to 'sword2/driver')
-rw-r--r--sword2/driver/animation.cpp18
-rw-r--r--sword2/driver/animation.h6
-rw-r--r--sword2/driver/d_sound.cpp4
-rw-r--r--sword2/driver/palette.cpp8
-rw-r--r--sword2/driver/rdwin.cpp2
5 files changed, 19 insertions, 19 deletions
diff --git a/sword2/driver/animation.cpp b/sword2/driver/animation.cpp
index 4b915c913c..df5a3ad10a 100644
--- a/sword2/driver/animation.cpp
+++ b/sword2/driver/animation.cpp
@@ -121,7 +121,7 @@ bool AnimationState::init(const char *name) {
lutcalcnum = (BITDEPTH + palettes[palnum].end + 2) / (palettes[palnum].end + 2);
#else
buildLookup();
- overlay = (NewGuiColor*)calloc(MOVIE_WIDTH * MOVIE_HEIGHT, sizeof(NewGuiColor));
+ overlay = (OverlayColor*)calloc(MOVIE_WIDTH * MOVIE_HEIGHT, sizeof(OverlayColor));
_vm->_system->show_overlay();
#endif
@@ -229,13 +229,13 @@ bool AnimationState::checkPaletteSwitch() {
#else
-NewGuiColor *AnimationState::lookup = 0;
+OverlayColor *AnimationState::lookup = 0;
void AnimationState::buildLookup() {
if (lookup)
return;
- lookup = (NewGuiColor *)calloc(BITDEPTH * BITDEPTH * 256, sizeof(NewGuiColor));
+ lookup = (OverlayColor *)calloc(BITDEPTH * BITDEPTH * 256, sizeof(OverlayColor));
int y, cb, cr;
int r, g, b;
@@ -262,9 +262,9 @@ void AnimationState::buildLookup() {
}
-void AnimationState::plotYUV(NewGuiColor *lut, int width, int height, byte *const *dat) {
+void AnimationState::plotYUV(OverlayColor *lut, int width, int height, byte *const *dat) {
- NewGuiColor *ptr = overlay + (MOVIE_HEIGHT - height) / 2 * MOVIE_WIDTH + (MOVIE_WIDTH - width) / 2;
+ OverlayColor *ptr = overlay + (MOVIE_HEIGHT - height) / 2 * MOVIE_WIDTH + (MOVIE_WIDTH - width) / 2;
int x, y;
@@ -289,12 +289,12 @@ void AnimationState::plotYUV(NewGuiColor *lut, int width, int height, byte *cons
}
void AnimationState::drawTextObject(SpriteInfo *s, uint8 *src) {
- NewGuiColor *dst = overlay + RENDERWIDE * (s->y) + s->x;
+ OverlayColor *dst = overlay + RENDERWIDE * (s->y) + s->x;
// FIXME: These aren't the "right" colours, but look good to me.
- NewGuiColor pen = _vm->_system->RGBToColor(255, 255, 255);
- NewGuiColor border = _vm->_system->RGBToColor(0, 0, 0);
+ OverlayColor pen = _vm->_system->RGBToColor(255, 255, 255);
+ OverlayColor border = _vm->_system->RGBToColor(0, 0, 0);
for (int y = 0; y < s->h; y++) {
for (int x = 0; x < s->w; x++) {
@@ -315,7 +315,7 @@ void AnimationState::drawTextObject(SpriteInfo *s, uint8 *src) {
}
void AnimationState::clearDisplay(void) {
- NewGuiColor black = _vm->_system->RGBToColor(0, 0, 0);
+ OverlayColor black = _vm->_system->RGBToColor(0, 0, 0);
for (int i = 0; i < MOVIE_WIDTH * MOVIE_HEIGHT; i++)
overlay[i] = black;
diff --git a/sword2/driver/animation.h b/sword2/driver/animation.h
index 25c4284f4c..117aadd094 100644
--- a/sword2/driver/animation.h
+++ b/sword2/driver/animation.h
@@ -105,8 +105,8 @@ private:
byte pal[4 * 256];
} palettes[50];
#else
- static NewGuiColor *lookup;
- NewGuiColor *overlay;
+ static OverlayColor *lookup;
+ OverlayColor *overlay;
#endif
public:
@@ -130,7 +130,7 @@ private:
bool checkPaletteSwitch();
#else
void buildLookup(void);
- void plotYUV(NewGuiColor *lut, int width, int height, byte *const *dat);
+ void plotYUV(OverlayColor *lut, int width, int height, byte *const *dat);
#endif
};
diff --git a/sword2/driver/d_sound.cpp b/sword2/driver/d_sound.cpp
index 0d16c72969..2305bc619e 100644
--- a/sword2/driver/d_sound.cpp
+++ b/sword2/driver/d_sound.cpp
@@ -54,7 +54,7 @@ static void premix_proc(void *param, int16 *data, uint len) {
Sound::Sound(Sword2Engine *vm) {
_vm = vm;
- _mutex = _vm->_system->create_mutex();
+ _mutex = _vm->_system->createMutex();
memset(_fx, 0, sizeof(_fx));
@@ -83,7 +83,7 @@ Sound::~Sound() {
for (int i = 0; i < MAXFX; i++)
stopFxHandle(i);
if (_mutex)
- _vm->_system->delete_mutex(_mutex);
+ _vm->_system->deleteMutex(_mutex);
}
void Sound::fxServer(int16 *data, uint len) {
diff --git a/sword2/driver/palette.cpp b/sword2/driver/palette.cpp
index 2d28d517eb..c9433c3ef1 100644
--- a/sword2/driver/palette.cpp
+++ b/sword2/driver/palette.cpp
@@ -113,11 +113,11 @@ void Graphics::setPalette(int16 startEntry, int16 noEntries, uint8 *colourTable,
if (noEntries) {
memcpy(&_palCopy[startEntry][0], colourTable, noEntries * 4);
if (fadeNow == RDPAL_INSTANT) {
- _vm->_system->set_palette((const byte *) _palCopy, startEntry, noEntries);
+ _vm->_system->setPalette((const byte *) _palCopy, startEntry, noEntries);
setNeedFullRedraw();
}
} else {
- _vm->_system->set_palette((const byte *) _palCopy, 0, 256);
+ _vm->_system->setPalette((const byte *) _palCopy, 0, 256);
setNeedFullRedraw();
}
}
@@ -128,7 +128,7 @@ void Graphics::dimPalette(void) {
for (int i = 0; i < 256 * 4; i++)
p[i] /= 2;
- _vm->_system->set_palette(p, 0, 256);
+ _vm->_system->setPalette(p, 0, 256);
setNeedFullRedraw();
}
@@ -230,7 +230,7 @@ void Graphics::fadeServer(void) {
}
}
- _vm->_system->set_palette(newPalette, 0, 256);
+ _vm->_system->setPalette(newPalette, 0, 256);
setNeedFullRedraw();
}
diff --git a/sword2/driver/rdwin.cpp b/sword2/driver/rdwin.cpp
index cf7f5f0ff9..bc0ec79319 100644
--- a/sword2/driver/rdwin.cpp
+++ b/sword2/driver/rdwin.cpp
@@ -139,7 +139,7 @@ void Graphics::updateDisplay(bool redrawScene) {
}
// We always need to update because of fades, menu animations, etc.
- _vm->_system->update_screen();
+ _vm->_system->updateScreen();
}
/**