aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/core/game_object.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-03-30 21:43:07 -0400
committerPaul Gilbert2016-03-30 21:43:07 -0400
commit948fb5bcca3a8d8594fd9e1f5470dac0448f74a9 (patch)
treefcebfbb176978852e81b91a5b962f683b9c9cf9b /engines/titanic/core/game_object.cpp
parent348b2d4b4bf9c6e8c6ca134ce7968eb9e9521a9c (diff)
downloadscummvm-rg350-948fb5bcca3a8d8594fd9e1f5470dac0448f74a9.tar.gz
scummvm-rg350-948fb5bcca3a8d8594fd9e1f5470dac0448f74a9.tar.bz2
scummvm-rg350-948fb5bcca3a8d8594fd9e1f5470dac0448f74a9.zip
TITANIC: Implement CPetVal drawing
Diffstat (limited to 'engines/titanic/core/game_object.cpp')
-rw-r--r--engines/titanic/core/game_object.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp
index bb1541c275..ee7e071423 100644
--- a/engines/titanic/core/game_object.cpp
+++ b/engines/titanic/core/game_object.cpp
@@ -202,6 +202,22 @@ void CGameObject::draw(CScreenManager *screenManager) {
}
}
+void CGameObject::draw(CScreenManager *screenManager, const Common::Point &destPos) {
+ if (!_surface && !_resource.empty()) {
+ loadResource(_resource);
+ _resource.clear();
+ }
+
+ if (_surface) {
+ int xSize = _surface->getWidth();
+ int ySize = _surface->getHeight();
+
+ if (xSize > 0 && ySize > 0) {
+ screenManager->blitFrom(SURFACE_BACKBUFFER, _surface, &destPos);
+ }
+ }
+}
+
void CGameObject::loadResource(const CString &name) {
switch (name.imageTypeSuffix()) {
case FILETYPE_IMAGE: