aboutsummaryrefslogtreecommitdiff
path: root/engines/toltecs/screen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/toltecs/screen.cpp')
-rw-r--r--engines/toltecs/screen.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/engines/toltecs/screen.cpp b/engines/toltecs/screen.cpp
index 9f0ff51b5d..91527bdbf5 100644
--- a/engines/toltecs/screen.cpp
+++ b/engines/toltecs/screen.cpp
@@ -70,7 +70,7 @@ Screen::Screen(ToltecsEngine *vm) : _vm(vm) {
// Talk text
_talkTextItemNum = 0;
memset(_talkTextItems, 0, sizeof(_talkTextItems));
- _talkTextX = 0;//TODO correct init values
+ _talkTextX = 0;
_talkTextY = 0;
_talkTextFontColor = 0;
_talkTextMaxWidth = 520;
@@ -202,7 +202,7 @@ void Screen::addStaticSprite(byte *spriteItem) {
drawRequest.flags = READ_LE_UINT16(spriteItem + 8);
drawRequest.scaling = 0;
- //debug(0, "Screen::addStaticSprite() x = %d; y = %d; baseColor = %d; resIndex = %d; flags = %04X", drawRequest.x, drawRequest.y, drawRequest.baseColor, drawRequest.resIndex, drawRequest.flags);
+ debug(0, "Screen::addStaticSprite() x = %d; y = %d; baseColor = %d; resIndex = %d; flags = %04X", drawRequest.x, drawRequest.y, drawRequest.baseColor, drawRequest.resIndex, drawRequest.flags);
addDrawRequest(drawRequest);
@@ -271,6 +271,26 @@ void Screen::clearSprites() {
}
+void Screen::blastSprite(int16 x, int16 y, int16 fragmentId, int16 resIndex, uint16 flags) {
+
+ DrawRequest drawRequest;
+ SpriteDrawItem sprite;
+
+ drawRequest.x = x;
+ drawRequest.y = y;
+ drawRequest.baseColor = _vm->_palette->findFragment(fragmentId) & 0xFF;
+ drawRequest.resIndex = resIndex;
+ drawRequest.flags = flags;
+ drawRequest.scaling = 0;
+
+ if (createSpriteDrawItem(drawRequest, sprite)) {
+ sprite.x -= _vm->_cameraX;
+ sprite.y -= _vm->_cameraY;
+ drawSprite(sprite);
+ }
+
+}
+
void Screen::updateVerbLine(int16 slotIndex, int16 slotOffset) {
debug(0, "Screen::updateVerbLine() _verbLineNum = %d; _verbLineX = %d; _verbLineY = %d; _verbLineWidth = %d; _verbLineCount = %d",