diff options
author | Einar Johan Trøan Sømåen | 2012-06-26 02:27:33 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-06-26 02:27:33 +0200 |
commit | cc56ba01e470f9af9f16724acbda58f67852d284 (patch) | |
tree | 133962ec1fcb4e414e01a11cd8a2b763181ca3cd | |
parent | 382e3b097eacf79722d12c0e402c3300488436dd (diff) | |
download | scummvm-rg350-cc56ba01e470f9af9f16724acbda58f67852d284.tar.gz scummvm-rg350-cc56ba01e470f9af9f16724acbda58f67852d284.tar.bz2 scummvm-rg350-cc56ba01e470f9af9f16724acbda58f67852d284.zip |
WINTERMUTE: Rename FuncName->funcName in Brenderer/BrendererSDL
-rw-r--r-- | engines/wintermute/Ad/AdGame.cpp | 8 | ||||
-rw-r--r-- | engines/wintermute/Ad/AdScene.cpp | 10 | ||||
-rw-r--r-- | engines/wintermute/Base/BFader.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/BFontBitmap.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/Base/BGame.cpp | 40 | ||||
-rw-r--r-- | engines/wintermute/Base/BRenderSDL.cpp | 36 | ||||
-rw-r--r-- | engines/wintermute/Base/BRenderSDL.h | 32 | ||||
-rw-r--r-- | engines/wintermute/Base/BRenderer.cpp | 62 | ||||
-rw-r--r-- | engines/wintermute/Base/BRenderer.h | 64 | ||||
-rw-r--r-- | engines/wintermute/Base/BSaveThumbHelper.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/Base/BSurfaceSDL.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/BTransitionMgr.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/PartEmitter.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/PlatformSDL.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/Sys/SysClassRegistry.cpp | 8 | ||||
-rw-r--r-- | engines/wintermute/UI/UITiledImage.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/UI/UIWindow.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/wintermute.cpp | 4 |
18 files changed, 149 insertions, 149 deletions
diff --git a/engines/wintermute/Ad/AdGame.cpp b/engines/wintermute/Ad/AdGame.cpp index 2467a47e9f..6d1744b3d3 100644 --- a/engines/wintermute/Ad/AdGame.cpp +++ b/engines/wintermute/Ad/AdGame.cpp @@ -1688,8 +1688,8 @@ HRESULT CAdGame::DisplayContent(bool Update, bool DisplayAll) { if (Update) InitLoop();
// fill black
- _renderer->Fill(0, 0, 0);
- if (!_editorMode) _renderer->SetScreenViewport();
+ _renderer->fill(0, 0, 0);
+ if (!_editorMode) _renderer->setScreenViewport();
// playing exclusive video?
if (_videoPlayer->isPlaying()) {
@@ -1727,7 +1727,7 @@ HRESULT CAdGame::DisplayContent(bool Update, bool DisplayAll) { // display normal windows
DisplayWindows(false);
- SetActiveObject(Game->_renderer->GetObjectAt(p.x, p.y));
+ SetActiveObject(Game->_renderer->getObjectAt(p.x, p.y));
// textual info
DisplaySentences(_state == GAME_FROZEN);
@@ -1942,7 +1942,7 @@ bool CAdGame::ValidMouse() { POINT Pos;
CBPlatform::GetCursorPos(&Pos);
- return _renderer->PointInViewport(&Pos);
+ return _renderer->pointInViewport(&Pos);
}
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/wintermute/Ad/AdScene.cpp b/engines/wintermute/Ad/AdScene.cpp index fe3820d574..670fb7283d 100644 --- a/engines/wintermute/Ad/AdScene.cpp +++ b/engines/wintermute/Ad/AdScene.cpp @@ -940,7 +940,7 @@ HRESULT CAdScene::TraverseNodes(bool Update) { //////////////////////////////////////////////////////////////////////////
// *** display/update everything
- Game->_renderer->Setup2D();
+ Game->_renderer->setup2D();
// for each layer
/* int MainOffsetX = 0; */
@@ -985,7 +985,7 @@ HRESULT CAdScene::TraverseNodes(bool Update) { switch (Node->_type) {
case OBJECT_ENTITY:
if (Node->_entity->_active && (Game->_editorMode || !Node->_entity->_editorOnly)) {
- Game->_renderer->Setup2D();
+ Game->_renderer->setup2D();
if (Update) Node->_entity->update();
else Node->_entity->display();
@@ -1018,7 +1018,7 @@ HRESULT CAdScene::TraverseNodes(bool Update) { // restore state
Game->SetOffset(OrigX, OrigY);
- Game->_renderer->Setup2D();
+ Game->_renderer->setup2D();
// display/update fader
if (_fader) {
@@ -1104,7 +1104,7 @@ HRESULT CAdScene::DisplayRegionContent(CAdRegion *Region, bool Display3DOnly) { if (Display3DOnly && !Obj->_is3D) continue;
- Game->_renderer->Setup2D();
+ Game->_renderer->setup2D();
if (Game->_editorMode || !Obj->_editorOnly) Obj->display();
Obj->_drawn = true;
@@ -1165,7 +1165,7 @@ HRESULT CAdScene::DisplayRegionContentOld(CAdRegion *Region) { if (obj != NULL) {
- Game->_renderer->Setup2D();
+ Game->_renderer->setup2D();
if (Game->_editorMode || !obj->_editorOnly) obj->display();
obj->_drawn = true;
diff --git a/engines/wintermute/Base/BFader.cpp b/engines/wintermute/Base/BFader.cpp index a1e551df3f..55937dbcfa 100644 --- a/engines/wintermute/Base/BFader.cpp +++ b/engines/wintermute/Base/BFader.cpp @@ -87,7 +87,7 @@ HRESULT CBFader::update() { HRESULT CBFader::display() {
if (!_active) return S_OK;
- if (_currentAlpha > 0x00) return Game->_renderer->FadeToColor(DRGBA(_red, _green, _blue, _currentAlpha));
+ if (_currentAlpha > 0x00) return Game->_renderer->fadeToColor(DRGBA(_red, _green, _blue, _currentAlpha));
else return S_OK;
}
diff --git a/engines/wintermute/Base/BFontBitmap.cpp b/engines/wintermute/Base/BFontBitmap.cpp index e88a6f0589..31a667bcbe 100644 --- a/engines/wintermute/Base/BFontBitmap.cpp +++ b/engines/wintermute/Base/BFontBitmap.cpp @@ -138,11 +138,11 @@ int CBFontBitmap::TextHeightDraw(byte *text, int x, int y, int width, TTextAlig bool new_line = false;
bool long_line = false;
- if (draw) Game->_renderer->StartSpriteBatch();
+ if (draw) Game->_renderer->startSpriteBatch();
while (!done) {
if (max_height > 0 && (NumLines + 1)*_tileHeight > max_height) {
- if (draw) Game->_renderer->EndSpriteBatch();
+ if (draw) Game->_renderer->endSpriteBatch();
return NumLines * _tileHeight;
}
@@ -208,7 +208,7 @@ int CBFontBitmap::TextHeightDraw(byte *text, int x, int y, int width, TTextAlig }
}
- if (draw) Game->_renderer->EndSpriteBatch();
+ if (draw) Game->_renderer->endSpriteBatch();
return NumLines * _tileHeight;
}
diff --git a/engines/wintermute/Base/BGame.cpp b/engines/wintermute/Base/BGame.cpp index 05dfcf6abb..994dd48b2c 100644 --- a/engines/wintermute/Base/BGame.cpp +++ b/engines/wintermute/Base/BGame.cpp @@ -610,7 +610,7 @@ HRESULT CBGame::InitLoop() { _currentTime = CBPlatform::GetTime();
GetDebugMgr()->OnGameTick();
- _renderer->InitLoop();
+ _renderer->initLoop();
_soundMgr->initLoop();
UpdateMusicCrossfade();
@@ -1806,7 +1806,7 @@ HRESULT CBGame::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS }
bool ret = false;
- CBImage *Image = Game->_renderer->TakeScreenshot();
+ CBImage *Image = Game->_renderer->takeScreenshot();
if (Image) {
ret = SUCCEEDED(Image->SaveBMPFile(Filename));
delete Image;
@@ -1826,7 +1826,7 @@ HRESULT CBGame::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS int SizeY = Stack->Pop()->GetInt(_renderer->_height);
bool ret = false;
- CBImage *Image = Game->_renderer->TakeScreenshot();
+ CBImage *Image = Game->_renderer->takeScreenshot();
if (Image) {
ret = SUCCEEDED(Image->Resize(SizeX, SizeY));
if (ret) ret = SUCCEEDED(Image->SaveBMPFile(Filename));
@@ -1999,8 +1999,8 @@ HRESULT CBGame::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS _loadingIcon = NULL;
} else {
DisplayContent(false, true);
- Game->_renderer->Flip();
- Game->_renderer->InitLoop();
+ Game->_renderer->flip();
+ Game->_renderer->initLoop();
}
Stack->PushNULL();
@@ -2025,7 +2025,7 @@ HRESULT CBGame::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS Stack->CorrectParams(1);
const char *Filename = Stack->Pop()->GetString();
- _renderer->DumpData(Filename);
+ _renderer->dumpData(Filename);
Stack->PushNULL();
return S_OK;
@@ -3321,7 +3321,7 @@ HRESULT CBGame::LoadGame(const char *Filename) { Game->applyEvent("AfterLoad", true);
DisplayContent(true, false);
- //_renderer->Flip();
+ //_renderer->flip();
GetDebugMgr()->OnGameInit();
@@ -3786,7 +3786,7 @@ bool CBGame::handleKeypress(Common::Event *event, bool printable) { if (event->type == Common::EVENT_KEYDOWN && event->kbd.keycode == Common::KEYCODE_RETURN && (event->kbd.flags == Common::KBD_ALT)) {
// TODO: Handle alt-enter as well as alt-return.
- _renderer->SwitchFullscreen();
+ _renderer->switchFullscreen();
return true;
}
@@ -3983,7 +3983,7 @@ HRESULT CBGame::PushViewport(CBViewport *Viewport) { if (_viewportSP >= _viewportStack.GetSize()) _viewportStack.Add(Viewport);
else _viewportStack[_viewportSP] = Viewport;
- _renderer->SetViewport(Viewport->getRect());
+ _renderer->setViewport(Viewport->getRect());
return S_OK;
}
@@ -3994,8 +3994,8 @@ HRESULT CBGame::PopViewport() { _viewportSP--;
if (_viewportSP < -1) Game->LOG(0, "Fatal: Viewport stack underflow!");
- if (_viewportSP >= 0 && _viewportSP < _viewportStack.GetSize()) _renderer->SetViewport(_viewportStack[_viewportSP]->getRect());
- else _renderer->SetViewport(_renderer->_drawOffsetX,
+ if (_viewportSP >= 0 && _viewportSP < _viewportStack.GetSize()) _renderer->setViewport(_viewportStack[_viewportSP]->getRect());
+ else _renderer->setViewport(_renderer->_drawOffsetX,
_renderer->_drawOffsetY,
_renderer->_width + _renderer->_drawOffsetX,
_renderer->_height + _renderer->_drawOffsetY);
@@ -4082,7 +4082,7 @@ HRESULT CBGame::DisplayContent(bool update, bool displayAll) { //////////////////////////////////////////////////////////////////////////
HRESULT CBGame::DisplayContentSimple() {
// fill black
- _renderer->Fill(0, 0, 0);
+ _renderer->fill(0, 0, 0);
if (_indicatorDisplay) DisplayIndicator();
return S_OK;
@@ -4099,11 +4099,11 @@ HRESULT CBGame::DisplayIndicator() { }
if ((!_indicatorDisplay && _indicatorWidth <= 0) || _indicatorHeight <= 0) return S_OK;
- _renderer->SetupLines();
+ _renderer->setupLines();
for (int i = 0; i < _indicatorHeight; i++)
- _renderer->DrawLine(_indicatorX, _indicatorY + i, _indicatorX + (int)(_indicatorWidth * (float)((float)_indicatorProgress / 100.0f)), _indicatorY + i, _indicatorColor);
+ _renderer->drawLine(_indicatorX, _indicatorY + i, _indicatorX + (int)(_indicatorWidth * (float)((float)_indicatorProgress / 100.0f)), _indicatorY + i, _indicatorColor);
- _renderer->Setup2D();
+ _renderer->setup2D();
return S_OK;
}
@@ -4255,7 +4255,7 @@ HRESULT CBGame::OnActivate(bool Activate, bool RefreshMouse) { if (RefreshMouse) {
POINT p;
GetMousePos(&p);
- SetActiveObject(_renderer->GetObjectAt(p.x, p.y));
+ SetActiveObject(_renderer->getObjectAt(p.x, p.y));
}
if (Activate) _soundMgr->resumeAll();
@@ -4386,10 +4386,10 @@ HRESULT CBGame::OnMouseMiddleUp() { //////////////////////////////////////////////////////////////////////////
HRESULT CBGame::OnPaint() {
if (_renderer && _renderer->_windowed && _renderer->_ready) {
- _renderer->InitLoop();
+ _renderer->initLoop();
DisplayContent(false, true);
DisplayDebugInfo();
- _renderer->WindowedBlt();
+ _renderer->windowedBlt();
}
return S_OK;
}
@@ -4418,11 +4418,11 @@ HRESULT CBGame::DisplayDebugInfo() { sprintf(str, "Mode: %dx%d windowed", _renderer->_width, _renderer->_height);
strcat(str, " (");
- strcat(str, _renderer->GetName());
+ strcat(str, _renderer->getName());
strcat(str, ")");
_systemFont->DrawText((byte *)str, 0, 0, _renderer->_width, TAL_RIGHT);
- _renderer->DisplayDebugInfo();
+ _renderer->displayDebugInfo();
int ScrTotal, ScrRunning, ScrWaiting, ScrPersistent;
ScrTotal = _scEngine->GetNumScripts(&ScrRunning, &ScrWaiting, &ScrPersistent);
diff --git a/engines/wintermute/Base/BRenderSDL.cpp b/engines/wintermute/Base/BRenderSDL.cpp index f372335cf1..6ddf200b9e 100644 --- a/engines/wintermute/Base/BRenderSDL.cpp +++ b/engines/wintermute/Base/BRenderSDL.cpp @@ -66,7 +66,7 @@ CBRenderSDL::~CBRenderSDL() { }
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderSDL::InitRenderer(int width, int height, bool windowed) {
+HRESULT CBRenderSDL::initRenderer(int width, int height, bool windowed) {
//if (SDL_Init(SDL_INIT_VIDEO) < 0) return E_FAIL;
#if 0
@@ -193,7 +193,7 @@ void CBRenderSDL::setColorMod(byte r, byte g, byte b) { }
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderSDL::Flip() {
+HRESULT CBRenderSDL::flip() {
#ifdef __IPHONEOS__
// hack: until viewports work correctly, we just paint black bars instead
@@ -242,7 +242,7 @@ HRESULT CBRenderSDL::Flip() { }
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderSDL::Fill(byte r, byte g, byte b, Common::Rect *rect) {
+HRESULT CBRenderSDL::fill(byte r, byte g, byte b, Common::Rect *rect) {
//SDL_SetRenderDrawColor(_renderer, r, g, b, 0xFF);
//SDL_RenderClear(_renderer);
uint32 color = _renderSurface->format.ARGBToColor(0xFF, r, g, b);
@@ -260,14 +260,14 @@ HRESULT CBRenderSDL::Fill(byte r, byte g, byte b, Common::Rect *rect) { }
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderSDL::Fade(uint16 Alpha) {
+HRESULT CBRenderSDL::fade(uint16 Alpha) {
uint32 dwAlpha = 255 - Alpha;
- return FadeToColor(dwAlpha << 24);
+ return fadeToColor(dwAlpha << 24);
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderSDL::FadeToColor(uint32 Color, Common::Rect *rect) {
+HRESULT CBRenderSDL::fadeToColor(uint32 Color, Common::Rect *rect) {
// This particular warning is rather messy, as this function is called a ton,
// thus we avoid printing it more than once.
static bool hasWarned = false;
@@ -291,7 +291,7 @@ HRESULT CBRenderSDL::FadeToColor(uint32 Color, Common::Rect *rect) { fillRect.setWidth((int16)(rc.right - rc.left));
fillRect.setHeight((int16)(rc.bottom - rc.top));
}
- ModTargetRect(&fillRect);
+ modTargetRect(&fillRect);
byte r = D3DCOLGetR(Color);
byte g = D3DCOLGetG(Color);
@@ -365,7 +365,7 @@ void CBRenderSDL::drawOpaqueFromSurface(Graphics::Surface *surf, Common::Rect *s }
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderSDL::DrawLine(int X1, int Y1, int X2, int Y2, uint32 Color) {
+HRESULT CBRenderSDL::drawLine(int X1, int Y1, int X2, int Y2, uint32 Color) {
static bool hasWarned = false;
if (!hasWarned) {
warning("CBRenderSDL::DrawLine - not fully ported yet");
@@ -382,11 +382,11 @@ HRESULT CBRenderSDL::DrawLine(int X1, int Y1, int X2, int Y2, uint32 Color) { POINT point1, point2;
point1.x = X1;
point1.y = Y1;
- PointToScreen(&point1);
+ pointToScreen(&point1);
point2.x = X2;
point2.y = Y2;
- PointToScreen(&point2);
+ pointToScreen(&point2);
// TODO: This thing is mostly here until I'm sure about the final color-format.
uint32 color = _renderSurface->format.ARGBToColor(a, r, g, b);
@@ -396,7 +396,7 @@ HRESULT CBRenderSDL::DrawLine(int X1, int Y1, int X2, int Y2, uint32 Color) { }
//////////////////////////////////////////////////////////////////////////
-CBImage *CBRenderSDL::TakeScreenshot() {
+CBImage *CBRenderSDL::takeScreenshot() {
// TODO: Fix this
warning("CBRenderSDL::TakeScreenshot() - not ported yet");
CBImage *screenshot = new CBImage(Game);
@@ -428,7 +428,7 @@ CBImage *CBRenderSDL::TakeScreenshot() { }
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderSDL::SwitchFullscreen() {
+HRESULT CBRenderSDL::switchFullscreen() {
/*if (_windowed) SDL_SetWindowFullscreen(_win, SDL_TRUE);
else SDL_SetWindowFullscreen(_win, SDL_FALSE);
@@ -440,7 +440,7 @@ HRESULT CBRenderSDL::SwitchFullscreen() { }
//////////////////////////////////////////////////////////////////////////
-const char *CBRenderSDL::GetName() {
+const char *CBRenderSDL::getName() {
if (_name.empty()) {
#if 0
if (_renderer) {
@@ -454,7 +454,7 @@ const char *CBRenderSDL::GetName() { }
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderSDL::SetViewport(int left, int top, int right, int bottom) {
+HRESULT CBRenderSDL::setViewport(int left, int top, int right, int bottom) {
Common::Rect rect;
// TODO: Hopefully this is the same logic that ScummVM uses.
rect.left = (int16)(left + _borderLeft);
@@ -470,7 +470,7 @@ HRESULT CBRenderSDL::SetViewport(int left, int top, int right, int bottom) { }
//////////////////////////////////////////////////////////////////////////
-void CBRenderSDL::ModTargetRect(Common::Rect *rect) {
+void CBRenderSDL::modTargetRect(Common::Rect *rect) {
#if 0
SDL_Rect viewportRect;
SDL_RenderGetViewport(GetSdlRenderer(), &viewportRect);
@@ -483,7 +483,7 @@ void CBRenderSDL::ModTargetRect(Common::Rect *rect) { }
//////////////////////////////////////////////////////////////////////////
-void CBRenderSDL::PointFromScreen(POINT *point) {
+void CBRenderSDL::pointFromScreen(POINT *point) {
#if 0
SDL_Rect viewportRect;
SDL_RenderGetViewport(GetSdlRenderer(), &viewportRect);
@@ -495,7 +495,7 @@ void CBRenderSDL::PointFromScreen(POINT *point) { //////////////////////////////////////////////////////////////////////////
-void CBRenderSDL::PointToScreen(POINT *point) {
+void CBRenderSDL::pointToScreen(POINT *point) {
#if 0
SDL_Rect viewportRect;
SDL_RenderGetViewport(GetSdlRenderer(), &viewportRect);
@@ -506,7 +506,7 @@ void CBRenderSDL::PointToScreen(POINT *point) { }
//////////////////////////////////////////////////////////////////////////
-void CBRenderSDL::DumpData(const char *Filename) {
+void CBRenderSDL::dumpData(const char *Filename) {
warning("CBRenderSDL::DumpData(%s) - not reimplemented yet", Filename); // TODO
#if 0
FILE *f = fopen(Filename, "wt");
diff --git a/engines/wintermute/Base/BRenderSDL.h b/engines/wintermute/Base/BRenderSDL.h index 2a1910790a..e9ca53610a 100644 --- a/engines/wintermute/Base/BRenderSDL.h +++ b/engines/wintermute/Base/BRenderSDL.h @@ -43,38 +43,38 @@ public: CBRenderSDL(CBGame *inGame);
~CBRenderSDL();
- const char *GetName();
+ const char *getName();
- HRESULT InitRenderer(int width, int height, bool windowed);
- HRESULT Flip();
- HRESULT Fill(byte r, byte g, byte b, Common::Rect *rect = NULL);
+ HRESULT initRenderer(int width, int height, bool windowed);
+ HRESULT flip();
+ HRESULT fill(byte r, byte g, byte b, Common::Rect *rect = NULL);
- HRESULT Fade(uint16 Alpha);
- HRESULT FadeToColor(uint32 Color, Common::Rect *rect = NULL);
+ HRESULT fade(uint16 Alpha);
+ HRESULT fadeToColor(uint32 Color, Common::Rect *rect = NULL);
- HRESULT SwitchFullscreen();
+ HRESULT switchFullscreen();
- HRESULT DrawLine(int X1, int Y1, int X2, int Y2, uint32 Color);
+ HRESULT drawLine(int X1, int Y1, int X2, int Y2, uint32 Color);
- CBImage *TakeScreenshot();
+ CBImage *takeScreenshot();
void setAlphaMod(byte alpha);
void setColorMod(byte r, byte g, byte b);
void drawFromSurface(Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRest, bool mirrorX = false, bool mirrorY = false);
void drawOpaqueFromSurface(Graphics::Surface *surf, Common::Rect *srcRect, Common::Rect *dstRest, bool mirrorX = false, bool mirrorY = false);
- HRESULT SetViewport(int left, int top, int right, int bottom);
+ HRESULT setViewport(int left, int top, int right, int bottom);
- void ModTargetRect(Common::Rect *rect);
- void PointFromScreen(POINT *point);
- void PointToScreen(POINT *point);
+ void modTargetRect(Common::Rect *rect);
+ void pointFromScreen(POINT *point);
+ void pointToScreen(POINT *point);
- void DumpData(const char *Filename);
+ void dumpData(const char *Filename);
- float GetScaleRatioX() const {
+ float getScaleRatioX() const {
return _ratioX;
}
- float GetScaleRatioY() const {
+ float getScaleRatioY() const {
return _ratioY;
}
diff --git a/engines/wintermute/Base/BRenderer.cpp b/engines/wintermute/Base/BRenderer.cpp index fa9bec5f4f..3a58cdefb4 100644 --- a/engines/wintermute/Base/BRenderer.cpp +++ b/engines/wintermute/Base/BRenderer.cpp @@ -56,19 +56,19 @@ CBRenderer::CBRenderer(CBGame *inGame): CBBase(inGame) { //////////////////////////////////////////////////////////////////////
CBRenderer::~CBRenderer() {
- DeleteRectList();
- UnclipCursor();
+ deleteRectList();
+ unclipCursor();
}
//////////////////////////////////////////////////////////////////////
-void CBRenderer::InitLoop() {
- DeleteRectList();
+void CBRenderer::initLoop() {
+ deleteRectList();
}
//////////////////////////////////////////////////////////////////////
-CBObject *CBRenderer::GetObjectAt(int X, int Y) {
+CBObject *CBRenderer::getObjectAt(int X, int Y) {
POINT point;
point.x = X;
point.y = Y;
@@ -106,7 +106,7 @@ CBObject *CBRenderer::GetObjectAt(int X, int Y) { //////////////////////////////////////////////////////////////////////////
-void CBRenderer::DeleteRectList() {
+void CBRenderer::deleteRectList() {
for (int i = 0; i < _rectList.GetSize(); i++) {
delete _rectList[i];
}
@@ -116,96 +116,96 @@ void CBRenderer::DeleteRectList() { //////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::SwitchFullscreen() {
+HRESULT CBRenderer::switchFullscreen() {
return E_FAIL;
}
//////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::Flip() {
+HRESULT CBRenderer::flip() {
return E_FAIL;
}
//////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::InitRenderer(int width, int height, bool windowed) {
+HRESULT CBRenderer::initRenderer(int width, int height, bool windowed) {
return E_FAIL;
}
//////////////////////////////////////////////////////////////////////
-void CBRenderer::OnWindowChange() {
+void CBRenderer::onWindowChange() {
}
//////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::Fill(byte r, byte g, byte b, Common::Rect *rect) {
+HRESULT CBRenderer::fill(byte r, byte g, byte b, Common::Rect *rect) {
return E_FAIL;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::WindowedBlt() {
+HRESULT CBRenderer::windowedBlt() {
return E_FAIL;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::Setup2D(bool Force) {
+HRESULT CBRenderer::setup2D(bool Force) {
return E_FAIL;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::SetupLines() {
+HRESULT CBRenderer::setupLines() {
return E_FAIL;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::DrawLine(int X1, int Y1, int X2, int Y2, uint32 Color) {
+HRESULT CBRenderer::drawLine(int X1, int Y1, int X2, int Y2, uint32 Color) {
return E_FAIL;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::DrawRect(int X1, int Y1, int X2, int Y2, uint32 Color, int Width) {
+HRESULT CBRenderer::drawRect(int X1, int Y1, int X2, int Y2, uint32 Color, int Width) {
for (int i = 0; i < Width; i++) {
- DrawLine(X1 + i, Y1 + i, X2 - i, Y1 + i, Color); // up
- DrawLine(X1 + i, Y2 - i, X2 - i + 1, Y2 - i, Color); // down
+ drawLine(X1 + i, Y1 + i, X2 - i, Y1 + i, Color); // up
+ drawLine(X1 + i, Y2 - i, X2 - i + 1, Y2 - i, Color); // down
- DrawLine(X1 + i, Y1 + i, X1 + i, Y2 - i, Color); // left
- DrawLine(X2 - i, Y1 + i, X2 - i, Y2 - i + 1, Color); // right
+ drawLine(X1 + i, Y1 + i, X1 + i, Y2 - i, Color); // left
+ drawLine(X2 - i, Y1 + i, X2 - i, Y2 - i + 1, Color); // right
}
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::Fade(uint16 Alpha) {
+HRESULT CBRenderer::fade(uint16 Alpha) {
return E_FAIL;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::FadeToColor(uint32 Color, Common::Rect *rect) {
+HRESULT CBRenderer::fadeToColor(uint32 Color, Common::Rect *rect) {
return E_FAIL;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::SetViewport(int left, int top, int right, int bottom) {
+HRESULT CBRenderer::setViewport(int left, int top, int right, int bottom) {
return E_FAIL;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::SetScreenViewport() {
- return SetViewport(_drawOffsetX, _drawOffsetY, _width + _drawOffsetX, _height + _drawOffsetY);
+HRESULT CBRenderer::setScreenViewport() {
+ return setViewport(_drawOffsetX, _drawOffsetY, _width + _drawOffsetX, _height + _drawOffsetY);
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::SetViewport(RECT *Rect) {
- return SetViewport(Rect->left + _drawOffsetX,
+HRESULT CBRenderer::setViewport(RECT *Rect) {
+ return setViewport(Rect->left + _drawOffsetX,
Rect->top + _drawOffsetY,
Rect->right + _drawOffsetX,
Rect->bottom + _drawOffsetY);
@@ -213,13 +213,13 @@ HRESULT CBRenderer::SetViewport(RECT *Rect) { //////////////////////////////////////////////////////////////////////////
-CBImage *CBRenderer::TakeScreenshot() {
+CBImage *CBRenderer::takeScreenshot() {
return NULL;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::ClipCursor() {
+HRESULT CBRenderer::clipCursor() {
/*
if (!_windowed) {
RECT rc;
@@ -238,7 +238,7 @@ HRESULT CBRenderer::ClipCursor() { }
//////////////////////////////////////////////////////////////////////////
-HRESULT CBRenderer::UnclipCursor() {
+HRESULT CBRenderer::unclipCursor() {
/*
if (!_windowed) ::ClipCursor(NULL);
*/
@@ -246,7 +246,7 @@ HRESULT CBRenderer::UnclipCursor() { }
//////////////////////////////////////////////////////////////////////////
-bool CBRenderer::PointInViewport(POINT *P) {
+bool CBRenderer::pointInViewport(POINT *P) {
if (P->x < _drawOffsetX) return false;
if (P->y < _drawOffsetY) return false;
if (P->x > _drawOffsetX + _width) return false;
diff --git a/engines/wintermute/Base/BRenderer.h b/engines/wintermute/Base/BRenderer.h index a13082b1b2..38925fc57a 100644 --- a/engines/wintermute/Base/BRenderer.h +++ b/engines/wintermute/Base/BRenderer.h @@ -47,61 +47,61 @@ public: int _drawOffsetX;
int _drawOffsetY;
- virtual void DumpData(const char *Filename) {};
- virtual CBImage *TakeScreenshot();
- virtual HRESULT SetViewport(int left, int top, int right, int bottom);
- virtual HRESULT SetViewport(RECT *Rect);
- virtual HRESULT SetScreenViewport();
- virtual HRESULT Fade(uint16 Alpha);
- virtual HRESULT FadeToColor(uint32 Color, Common::Rect *rect = NULL);
- virtual HRESULT DrawLine(int X1, int Y1, int X2, int Y2, uint32 Color);
- virtual HRESULT DrawRect(int X1, int Y1, int X2, int Y2, uint32 Color, int Width = 1);
+ virtual void dumpData(const char *Filename) {};
+ virtual CBImage *takeScreenshot();
+ virtual HRESULT setViewport(int left, int top, int right, int bottom);
+ virtual HRESULT setViewport(RECT *Rect);
+ virtual HRESULT setScreenViewport();
+ virtual HRESULT fade(uint16 Alpha);
+ virtual HRESULT fadeToColor(uint32 Color, Common::Rect *rect = NULL);
+ virtual HRESULT drawLine(int X1, int Y1, int X2, int Y2, uint32 Color);
+ virtual HRESULT drawRect(int X1, int Y1, int X2, int Y2, uint32 Color, int Width = 1);
CBRenderer(CBGame *inGame = NULL);
virtual ~CBRenderer();
- virtual HRESULT SetProjection() {
+ virtual HRESULT setProjection() {
return S_OK;
};
- virtual HRESULT WindowedBlt();
- virtual HRESULT Fill(byte r, byte g, byte b, Common::Rect *rect = NULL);
- virtual void OnWindowChange();
- virtual HRESULT InitRenderer(int width, int height, bool windowed);
- virtual HRESULT Flip();
- virtual void InitLoop();
- virtual HRESULT SwitchFullscreen();
- virtual HRESULT Setup2D(bool Force = false);
- virtual HRESULT SetupLines();
-
- virtual const char *GetName() {
+ virtual HRESULT windowedBlt();
+ virtual HRESULT fill(byte r, byte g, byte b, Common::Rect *rect = NULL);
+ virtual void onWindowChange();
+ virtual HRESULT initRenderer(int width, int height, bool windowed);
+ virtual HRESULT flip();
+ virtual void initLoop();
+ virtual HRESULT switchFullscreen();
+ virtual HRESULT setup2D(bool Force = false);
+ virtual HRESULT setupLines();
+
+ virtual const char *getName() {
return "";
};
- virtual HRESULT DisplayDebugInfo() {
+ virtual HRESULT displayDebugInfo() {
return E_FAIL;
};
- virtual HRESULT DrawShaderQuad() {
+ virtual HRESULT drawShaderQuad() {
return E_FAIL;
}
- virtual float GetScaleRatioX() const {
+ virtual float getScaleRatioX() const {
return 1.0f;
}
- virtual float GetScaleRatioY() const {
+ virtual float getScaleRatioY() const {
return 1.0f;
}
- HRESULT ClipCursor();
- HRESULT UnclipCursor();
+ HRESULT clipCursor();
+ HRESULT unclipCursor();
- CBObject *GetObjectAt(int X, int Y);
- void DeleteRectList();
+ CBObject *getObjectAt(int X, int Y);
+ void deleteRectList();
- virtual HRESULT StartSpriteBatch() {
+ virtual HRESULT startSpriteBatch() {
return S_OK;
};
- virtual HRESULT EndSpriteBatch() {
+ virtual HRESULT endSpriteBatch() {
return S_OK;
};
- bool PointInViewport(POINT *P);
+ bool pointInViewport(POINT *P);
uint32 _forceAlphaColor;
HINSTANCE _instance;
HWND _window;
diff --git a/engines/wintermute/Base/BSaveThumbHelper.cpp b/engines/wintermute/Base/BSaveThumbHelper.cpp index 58ddbe5eca..1e54470924 100644 --- a/engines/wintermute/Base/BSaveThumbHelper.cpp +++ b/engines/wintermute/Base/BSaveThumbHelper.cpp @@ -54,13 +54,13 @@ HRESULT CBSaveThumbHelper::StoreThumbnail(bool DoFlip) { // when using opengl on windows it seems to be necessary to do this twice
// works normally for direct3d
Game->DisplayContent(false);
- Game->_renderer->Flip();
+ Game->_renderer->flip();
Game->DisplayContent(false);
- Game->_renderer->Flip();
+ Game->_renderer->flip();
}
- CBImage *Screenshot = Game->_renderer->TakeScreenshot();
+ CBImage *Screenshot = Game->_renderer->takeScreenshot();
if (!Screenshot) return E_FAIL;
// normal thumbnail
diff --git a/engines/wintermute/Base/BSurfaceSDL.cpp b/engines/wintermute/Base/BSurfaceSDL.cpp index 3bac8ecc78..1a86bf8a90 100644 --- a/engines/wintermute/Base/BSurfaceSDL.cpp +++ b/engines/wintermute/Base/BSurfaceSDL.cpp @@ -510,7 +510,7 @@ HRESULT CBSurfaceSDL::drawSprite(int x, int y, RECT *Rect, float ZoomX, float Zo position.setWidth((float)srcRect.width() * ZoomX / 100.f);
position.setHeight((float)srcRect.height() * ZoomX / 100.f);
- renderer->ModTargetRect(&position);
+ renderer->modTargetRect(&position);
/* position.left += offsetX;
position.top += offsetY;*/
diff --git a/engines/wintermute/Base/BTransitionMgr.cpp b/engines/wintermute/Base/BTransitionMgr.cpp index f61cd9d518..7ddbf21ec9 100644 --- a/engines/wintermute/Base/BTransitionMgr.cpp +++ b/engines/wintermute/Base/BTransitionMgr.cpp @@ -99,7 +99,7 @@ HRESULT CBTransitionMgr::update() { uint32 time = CBPlatform::GetTime() - _lastTime;
int Alpha = (int)(255 - (float)time / (float)FADE_DURATION * 255);
Alpha = MIN(255, MAX(Alpha, 0));
- Game->_renderer->Fade((uint16)Alpha);
+ Game->_renderer->fade((uint16)Alpha);
if (time > FADE_DURATION) _state = TRANS_MGR_READY;
}
@@ -109,7 +109,7 @@ HRESULT CBTransitionMgr::update() { uint32 time = CBPlatform::GetTime() - _lastTime;
int Alpha = (int)((float)time / (float)FADE_DURATION * 255);
Alpha = MIN(255, MAX(Alpha, 0));
- Game->_renderer->Fade((uint16)Alpha);
+ Game->_renderer->fade((uint16)Alpha);
if (time > FADE_DURATION) _state = TRANS_MGR_READY;
}
diff --git a/engines/wintermute/Base/PartEmitter.cpp b/engines/wintermute/Base/PartEmitter.cpp index 0c7606b4f0..9809e50695 100644 --- a/engines/wintermute/Base/PartEmitter.cpp +++ b/engines/wintermute/Base/PartEmitter.cpp @@ -289,7 +289,7 @@ HRESULT CPartEmitter::updateInternal(uint32 CurrentTime, uint32 TimerDelta) { //////////////////////////////////////////////////////////////////////////
HRESULT CPartEmitter::display(CBRegion *Region) {
- if (_sprites.GetSize() <= 1) Game->_renderer->StartSpriteBatch();
+ if (_sprites.GetSize() <= 1) Game->_renderer->startSpriteBatch();
for (int i = 0; i < _particles.GetSize(); i++) {
if (Region != NULL && _useRegion) {
@@ -299,7 +299,7 @@ HRESULT CPartEmitter::display(CBRegion *Region) { _particles[i]->display(this);
}
- if (_sprites.GetSize() <= 1) Game->_renderer->EndSpriteBatch();
+ if (_sprites.GetSize() <= 1) Game->_renderer->endSpriteBatch();
return S_OK;
}
diff --git a/engines/wintermute/PlatformSDL.cpp b/engines/wintermute/PlatformSDL.cpp index 6817ef047b..9b4c8e7e04 100644 --- a/engines/wintermute/PlatformSDL.cpp +++ b/engines/wintermute/PlatformSDL.cpp @@ -193,7 +193,7 @@ bool CBPlatform::GetCursorPos(LPPOINT lpPoint) { lpPoint->x = p.x;
lpPoint->y = p.y;
- renderer->PointFromScreen(lpPoint);
+ renderer->pointFromScreen(lpPoint);
return true;
}
@@ -205,7 +205,7 @@ bool CBPlatform::SetCursorPos(int X, int Y) { POINT p;
p.x = X;
p.y = Y;
- renderer->PointToScreen(&p);
+ renderer->pointToScreen(&p);
// TODO
//SDL_WarpMouseInWindow(renderer->GetSdlWindow(), p.x, p.y);
return true;
diff --git a/engines/wintermute/Sys/SysClassRegistry.cpp b/engines/wintermute/Sys/SysClassRegistry.cpp index 7025e4c79a..8125678ee4 100644 --- a/engines/wintermute/Sys/SysClassRegistry.cpp +++ b/engines/wintermute/Sys/SysClassRegistry.cpp @@ -179,7 +179,7 @@ HRESULT CSysClassRegistry::SaveTable(CBGame *Game, CBPersistMgr *persistMgr, boo if (!quickSave) {
Game->_indicatorProgress = (int)(50.0f / (float)((float)_classes.size() / (float)counter));
Game->DisplayContent(false);
- Game->_renderer->Flip();
+ Game->_renderer->flip();
}
(it->_value)->SaveTable(Game, persistMgr);
@@ -211,7 +211,7 @@ HRESULT CSysClassRegistry::LoadTable(CBGame *Game, CBPersistMgr *persistMgr) { for (uint32 i = 0; i < numClasses; i++) {
Game->_indicatorProgress = (int)(50.0f / (float)((float)numClasses / (float)i));
Game->DisplayContentSimple();
- Game->_renderer->Flip();
+ Game->_renderer->flip();
char *className = persistMgr->getString();
NameMap::iterator mapIt = _nameMap.find(className);
@@ -245,7 +245,7 @@ HRESULT CSysClassRegistry::SaveInstances(CBGame *Game, CBPersistMgr *persistMgr, if (counter % 20 == 0) {
Game->_indicatorProgress = 50 + 50.0f / (float)((float)_classes.size() / (float)counter);
Game->DisplayContent(false);
- Game->_renderer->Flip();
+ Game->_renderer->flip();
}
}
Game->MiniUpdate();
@@ -265,7 +265,7 @@ HRESULT CSysClassRegistry::LoadInstances(CBGame *Game, CBPersistMgr *persistMgr) if (i % 20 == 0) {
Game->_indicatorProgress = 50 + 50.0f / (float)((float)numInstances / (float)i);
Game->DisplayContentSimple();
- Game->_renderer->Flip();
+ Game->_renderer->flip();
}
checkHeader("<INSTANCE_HEAD>", persistMgr);
diff --git a/engines/wintermute/UI/UITiledImage.cpp b/engines/wintermute/UI/UITiledImage.cpp index aea658e254..5d1cc53aa3 100644 --- a/engines/wintermute/UI/UITiledImage.cpp +++ b/engines/wintermute/UI/UITiledImage.cpp @@ -75,7 +75,7 @@ HRESULT CUITiledImage::display(int X, int Y, int Width, int Height) { int col, row;
- Game->_renderer->StartSpriteBatch();
+ Game->_renderer->startSpriteBatch();
// top left/right
_image->_surface->displayTrans(X, Y, _upLeft);
@@ -112,7 +112,7 @@ HRESULT CUITiledImage::display(int X, int Y, int Width, int Height) { yyy += tile_width;
}
- Game->_renderer->EndSpriteBatch();
+ Game->_renderer->endSpriteBatch();
return S_OK;
}
diff --git a/engines/wintermute/UI/UIWindow.cpp b/engines/wintermute/UI/UIWindow.cpp index 5d7bade46e..ce1fb05042 100644 --- a/engines/wintermute/UI/UIWindow.cpp +++ b/engines/wintermute/UI/UIWindow.cpp @@ -142,7 +142,7 @@ HRESULT CUIWindow::display(int OffsetX, int OffsetY) { if (!_visible) return S_OK;
- if (_fadeBackground) Game->_renderer->FadeToColor(_fadeColor);
+ if (_fadeBackground) Game->_renderer->fadeToColor(_fadeColor);
if (_dragging) {
_posX += (Game->_mousePos.x - _dragFrom.x);
diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp index 91a086af63..cbcd652946 100644 --- a/engines/wintermute/wintermute.cpp +++ b/engines/wintermute/wintermute.cpp @@ -208,7 +208,7 @@ int WinterMuteEngine::init() { HRESULT ret; // initialize the renderer - ret = _game->_renderer->InitRenderer(_game->_settingsResWidth, _game->_settingsResHeight, windowedMode); + ret = _game->_renderer->initRenderer(_game->_settingsResWidth, _game->_settingsResHeight, windowedMode); if (FAILED(ret)) { _game->LOG(ret, "Error initializing renderer. Exiting."); @@ -278,7 +278,7 @@ int WinterMuteEngine::messageLoop() { _game->DisplayDebugInfo(); // ***** flip - if (!_game->_suspendedRendering) _game->_renderer->Flip(); + if (!_game->_suspendedRendering) _game->_renderer->flip(); if (_game->_loading) _game->LoadGame(_game->_scheduledLoadSlot); } if (_game->_quitting) break; |