aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/event.cpp
diff options
context:
space:
mode:
authorDavid Corrales2007-05-31 23:44:43 +0000
committerDavid Corrales2007-05-31 23:44:43 +0000
commit0cab5b7791e56b32455748bf20c21f0d6b42f654 (patch)
tree9e6580328542f1db230e019ba77e3db1be8fa50b /engines/agos/event.cpp
parent6c69d531d262e14fa02b6e1adb42baaa5c74dbe6 (diff)
parent22c0403e0dfec16badf156afa842c6c37e850263 (diff)
downloadscummvm-rg350-0cab5b7791e56b32455748bf20c21f0d6b42f654.tar.gz
scummvm-rg350-0cab5b7791e56b32455748bf20c21f0d6b42f654.tar.bz2
scummvm-rg350-0cab5b7791e56b32455748bf20c21f0d6b42f654.zip
Merged the fs branch with trunk. r26949:27031
svn-id: r27032
Diffstat (limited to 'engines/agos/event.cpp')
-rw-r--r--engines/agos/event.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp
index 9fc8cb72e5..8570859bb8 100644
--- a/engines/agos/event.cpp
+++ b/engines/agos/event.cpp
@@ -1,6 +1,8 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2001 Ludvig Strigeus
- * Copyright (C) 2001-2006 The ScummVM project
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -362,10 +364,11 @@ static const byte _image4[32] = {
0x3A, 0x3A, 0x3B, 0x3A,
};
-void AGOSEngine::drawStuff(const byte *src, uint offs) {
- byte *dst = getFrontBuf() + offs;
+void AGOSEngine::drawStuff(const byte *src, uint xoffs) {
+ const uint8 y = (getPlatform() == Common::kPlatformAtariST) ? 132 : 135;
+ byte *dst = getFrontBuf() + y * _screenWidth + xoffs;
- for (uint y = 0; y < 6; y++) {
+ for (uint h = 0; h < 6; h++) {
memcpy(dst, src, 4);
src += 4;
dst += _screenWidth;
@@ -373,11 +376,11 @@ void AGOSEngine::drawStuff(const byte *src, uint offs) {
}
void AGOSEngine::imageEvent2(VgaTimerEntry * vte, uint dx) {
- // Draws damage indicator gauge
+ // Draws damage indicator gauge when player hit
_nextVgaTimerToProcess = vte + 1;
if (!_opcode177Var1) {
- drawStuff(_image1, 43204 + _opcode177Var2 * 4);
+ drawStuff(_image1, 4 + _opcode177Var2 * 4);
_opcode177Var2++;
if (_opcode177Var2 == dx) {
_opcode177Var1 = 1;
@@ -387,7 +390,7 @@ void AGOSEngine::imageEvent2(VgaTimerEntry * vte, uint dx) {
}
} else if (_opcode177Var2) {
_opcode177Var2--;
- drawStuff(_image2, 43204 + _opcode177Var2 * 4);
+ drawStuff(_image2, 4 + _opcode177Var2 * 4);
vte->delay = 3;
} else {
deleteVgaEvent(vte);
@@ -395,10 +398,11 @@ void AGOSEngine::imageEvent2(VgaTimerEntry * vte, uint dx) {
}
void AGOSEngine::imageEvent3(VgaTimerEntry * vte, uint dx) {
+ // Draws damage indicator gauge when monster hit
_nextVgaTimerToProcess = vte + 1;
if (!_opcode178Var1) {
- drawStuff(_image3, 43475 + _opcode178Var2 * 4);
+ drawStuff(_image3, 275 + _opcode178Var2 * 4);
_opcode178Var2++;
if (_opcode178Var2 >= 10 || _opcode178Var2 == dx) {
_opcode178Var1 = 1;
@@ -408,7 +412,7 @@ void AGOSEngine::imageEvent3(VgaTimerEntry * vte, uint dx) {
}
} else if (_opcode178Var2) {
_opcode178Var2--;
- drawStuff(_image4, 43475 + _opcode178Var2 * 4);
+ drawStuff(_image4, 275 + _opcode178Var2 * 4);
vte->delay = 3;
} else {
deleteVgaEvent(vte);