aboutsummaryrefslogtreecommitdiff
path: root/sword1
diff options
context:
space:
mode:
authorMax Horn2004-02-28 12:58:13 +0000
committerMax Horn2004-02-28 12:58:13 +0000
commitc6752cccf5186fb04c97e2bb4a64c52fc9447073 (patch)
tree91f3f0264b1542a839cc3504b52603a8034547cb /sword1
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 'sword1')
-rw-r--r--sword1/animation.cpp16
-rw-r--r--sword1/animation.h6
-rw-r--r--sword1/control.cpp12
-rw-r--r--sword1/music.cpp4
-rw-r--r--sword1/screen.cpp14
5 files changed, 26 insertions, 26 deletions
diff --git a/sword1/animation.cpp b/sword1/animation.cpp
index 9212656762..f3bb1c61c6 100644
--- a/sword1/animation.cpp
+++ b/sword1/animation.cpp
@@ -104,7 +104,7 @@ bool AnimationState::init(const char *name) {
palnum = 0;
maxPalnum = p;
- _sys->set_palette(palettes[palnum].pal, 0, 256);
+ _sys->setPalette(palettes[palnum].pal, 0, 256);
lut = lut2 = lookup[0];
curpal = -1;
cr = 0;
@@ -113,7 +113,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));
_sys->show_overlay();
#endif
@@ -208,7 +208,7 @@ bool AnimationState::checkPaletteSwitch() {
if (framenum == palettes[palnum].end) {
unsigned char *l = lut2;
palnum++;
- _sys->set_palette(palettes[palnum].pal, 0, 256);
+ _sys->setPalette(palettes[palnum].pal, 0, 256);
lutcalcnum = (BITDEPTH + palettes[palnum].end - (framenum + 1) + 2) / (palettes[palnum].end - (framenum + 1) + 2);
lut2 = lut;
lut = l;
@@ -220,13 +220,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;
@@ -252,9 +252,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;
@@ -377,7 +377,7 @@ void MoviePlayer::play(const char *filename) {
if (anim->init(filename)) {
while (anim->decodeFrame()) {
#ifndef BACKEND_8BIT
- _sys->update_screen();
+ _sys->updateScreen();
#endif
// FIXME: check for ESC and abbort animation be just returning from the function
OSystem::Event event;
diff --git a/sword1/animation.h b/sword1/animation.h
index fdb78cd99a..0e0bea0694 100644
--- a/sword1/animation.h
+++ b/sword1/animation.h
@@ -111,8 +111,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/sword1/control.cpp b/sword1/control.cpp
index 9297435c19..b28e3ab62c 100644
--- a/sword1/control.cpp
+++ b/sword1/control.cpp
@@ -179,7 +179,7 @@ void Control::askForCd(void) {
}
palOut[0] = palOut[1] = palOut[2] = palOut[3] = 0;
_resMan->resClose(SR_PALETTE);
- _system->set_palette(palOut, 0, 256);
+ _system->setPalette(palOut, 0, 256);
free(palOut);
File test;
@@ -195,7 +195,7 @@ void Control::askForCd(void) {
renderText(textA, 320, 220, TEXT_CENTER);
renderText(_lStrings[STR_INSERT_CD_B], 320, 240, TEXT_CENTER);
_system->copy_rect(_screenBuf, 640, 0, 0, 640, 480);
- _system->update_screen();
+ _system->updateScreen();
}
delay(300);
if (_keyPressed) {
@@ -204,7 +204,7 @@ void Control::askForCd(void) {
memset(_screenBuf, 0, 640 * 480);
renderText(_lStrings[STR_INCORRECT_CD], 320, 230, TEXT_CENTER);
_system->copy_rect(_screenBuf, 640, 0, 0, 640, 480);
- _system->update_screen();
+ _system->updateScreen();
delay(2000);
refreshText = true;
} else {
@@ -240,7 +240,7 @@ uint8 Control::runPanel(void) {
}
palOut[0] = palOut[1] = palOut[2] = palOut[3] = 0;
_resMan->resClose(SR_PALETTE);
- _system->set_palette(palOut, 0, 256);
+ _system->setPalette(palOut, 0, 256);
free(palOut);
uint8 mode = 0, newMode = BUTTON_MAIN_PANEL;
bool fullRefresh = false;
@@ -281,7 +281,7 @@ uint8 Control::runPanel(void) {
fullRefresh = false;
_system->copy_rect(_screenBuf, SCREEN_WIDTH, 0, 0, SCREEN_WIDTH, 480);
}
- _system->update_screen();
+ _system->updateScreen();
delay(1000 / 12);
newMode = getClicks(mode, &retVal);
} while ((newMode != 1) && (retVal == 0));
@@ -568,7 +568,7 @@ bool Control::getConfirm(const uint8 *title) {
do {
buttons[0]->draw();
buttons[1]->draw();
- _system->update_screen();
+ _system->updateScreen();
delay(1000 / 12);
if (_mouseState & BS1L_BUTTON_DOWN) {
if (buttons[0]->wasClicked(_mouseX, _mouseY))
diff --git a/sword1/music.cpp b/sword1/music.cpp
index 946b7b19b1..ae0a9c0794 100644
--- a/sword1/music.cpp
+++ b/sword1/music.cpp
@@ -114,7 +114,7 @@ Music::Music(OSystem *system, SoundMixer *pMixer) {
_system = system;
_mixer = pMixer;
_mixer->setupPremix(passMixerFunc, this);
- _mutex = _system->create_mutex();
+ _mutex = _system->createMutex();
_converter[0] = NULL;
_converter[1] = NULL;
_volumeL = _volumeR = 192;
@@ -125,7 +125,7 @@ Music::~Music() {
delete _converter[0];
delete _converter[1];
if (_mutex)
- _system->delete_mutex(_mutex);
+ _system->deleteMutex(_mutex);
}
void Music::passMixerFunc(void *param, int16 *buf, uint len) {
diff --git a/sword1/screen.cpp b/sword1/screen.cpp
index 3f3e0f3e3b..faac076d3d 100644
--- a/sword1/screen.cpp
+++ b/sword1/screen.cpp
@@ -108,14 +108,14 @@ void Screen::fnSetPalette(uint8 start, uint16 length, uint32 id, bool fadeUp) {
_fadingStep = 1;
_fadingDirection = FADE_UP;
memset(_currentPalette, 0, 256 * 4);
- _system->set_palette(_currentPalette, 0, 256);
+ _system->setPalette(_currentPalette, 0, 256);
} else
- _system->set_palette(_targetPalette + 4 * start, start, length);
+ _system->setPalette(_targetPalette + 4 * start, start, length);
}
void Screen::fullRefresh(void) {
_fullRefresh = true;
- _system->set_palette(_targetPalette, 0, 256);
+ _system->setPalette(_targetPalette, 0, 256);
}
bool Screen::stillFading(void) {
@@ -133,7 +133,7 @@ bool Screen::showScrollFrame(void) {
uint16 avgScrlY = (uint16)(_oldScrollY + Logic::_scriptVars[SCROLL_OFFSET_Y]) / 2;
_system->copy_rect(_screenBuf + avgScrlY * _scrnSizeX + avgScrlX, _scrnSizeX, 0, 40, SCREEN_WIDTH, SCREEN_DEPTH);
- _system->update_screen();
+ _system->updateScreen();
return true;
}
@@ -147,7 +147,7 @@ void Screen::updateScreen(void) {
}
if (_fadingStep) {
fadePalette();
- _system->set_palette(_currentPalette, 0, 256);
+ _system->setPalette(_currentPalette, 0, 256);
}
uint16 scrlX = (uint16)Logic::_scriptVars[SCROLL_OFFSET_X];
@@ -241,7 +241,7 @@ void Screen::updateScreen(void) {
scrnBuf += _scrnSizeX * SCRNGRID_Y;
}
}
- _system->update_screen();
+ _system->updateScreen();
}
void Screen::newScreen(uint32 screen) {
@@ -956,7 +956,7 @@ void Screen::plotYUV(byte *lut, int width, int height, byte *const *dat) {
}
_system->copy_rect(buf, width, (640-width)/2, (480-height)/2, width, height);
- _system->update_screen();
+ _system->updateScreen();
free(buf);