Skip to content

Commit

Permalink
WINTERMUTE: Constify some getters in TransparentSurface, UIObject and…
Browse files Browse the repository at this point in the history
… UIWindow
  • Loading branch information
somaen committed Sep 30, 2013
1 parent f7a9e92 commit 5afb297
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion engines/wintermute/graphics/transparent_surface.cpp
Expand Up @@ -612,7 +612,7 @@ void TransparentSurface::applyColorKey(uint8 rKey, uint8 gKey, uint8 bKey, bool
}
}

TransparentSurface::AlphaType TransparentSurface::getAlphaMode() {
TransparentSurface::AlphaType TransparentSurface::getAlphaMode() const {
return _alphaMode;
}

Expand Down
2 changes: 1 addition & 1 deletion engines/wintermute/graphics/transparent_surface.h
Expand Up @@ -118,7 +118,7 @@ struct TransparentSurface : public Graphics::Surface {

TransparentSurface *scale(uint16 newWidth, uint16 newHeight) const;
TransparentSurface *rotoscale(const TransformStruct &transform) const;
AlphaType getAlphaMode();
AlphaType getAlphaMode() const;
void setAlphaMode(AlphaType);
private:
AlphaType _alphaMode;
Expand Down
12 changes: 6 additions & 6 deletions engines/wintermute/ui/ui_object.cpp
Expand Up @@ -666,11 +666,11 @@ void UIObject::setHeight(int32 height) {
_height = height;
}

bool UIObject::isDisabled() {
bool UIObject::isDisabled() const {
return _disable;
}

bool UIObject::isVisible() {
bool UIObject::isVisible() const {
return _visible;
}

Expand All @@ -682,15 +682,15 @@ void UIObject::setDisabled(bool disable) {
_disable = disable;
}

bool UIObject::hasSharedFonts() {
bool UIObject::hasSharedFonts() const {
return _sharedFonts;
}

void UIObject::setSharedFonts(bool shared) {
_sharedFonts = shared;
}

bool UIObject::hasSharedImages() {
bool UIObject::hasSharedImages() const {
return _sharedImages;
}

Expand All @@ -706,15 +706,15 @@ void UIObject::setImage(BaseSprite *image) {
_image = image;
}

bool UIObject::canFocus() {
bool UIObject::canFocus() const {
return _canFocus;
}

void UIObject::setFont(BaseFont *font) {
_font = font;
}

BaseFont *UIObject::getFont() const {
BaseFont *UIObject::getFont() {
return _font;
}

Expand Down
12 changes: 6 additions & 6 deletions engines/wintermute/ui/ui_object.h
Expand Up @@ -72,19 +72,19 @@ class UIObject : public BaseObject {
int32 getHeight() const;
void setHeight(int32 height);
void setWidth(int32 width);
bool isDisabled();
bool isDisabled() const;
void setDisabled(bool disable);
bool isVisible();
bool isVisible() const;
void setVisible(bool visible);
bool hasSharedFonts();
bool hasSharedFonts() const;
void setSharedFonts(bool shared);
bool hasSharedImages();
bool hasSharedImages() const;
void setSharedImages(bool shared);
BaseSprite *getImage() const;
void setImage(BaseSprite *image);
void setFont(BaseFont *font);
BaseFont *getFont() const;
bool canFocus();
BaseFont *getFont();
bool canFocus() const;

protected:
BaseScriptHolder *_listenerParamObject;
Expand Down
4 changes: 2 additions & 2 deletions engines/wintermute/ui/ui_window.cpp
Expand Up @@ -1442,11 +1442,11 @@ bool UIWindow::getWindowObjects(BaseArray<UIObject *> &objects, bool interactive
return STATUS_OK;
}

bool UIWindow::getInGame() {
bool UIWindow::getInGame() const {
return _inGame;
}

TWindowMode UIWindow::getMode() {
TWindowMode UIWindow::getMode() const {
return _mode;
}

Expand Down
4 changes: 2 additions & 2 deletions engines/wintermute/ui/ui_window.h
Expand Up @@ -73,8 +73,8 @@ class UIWindow : public UIObject {
virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
virtual const char *scToString();

bool getInGame();
TWindowMode getMode();
bool getInGame() const;
TWindowMode getMode() const;

private:
bool _pauseMusic;
Expand Down

0 comments on commit 5afb297

Please sign in to comment.