aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2007-11-21 00:41:51 +0000
committerJohannes Schickel2007-11-21 00:41:51 +0000
commitb39ee7ec3c8ad944cc0401f54ae199e0b142bc21 (patch)
tree184159ab01d1b4059071cece4158e30424258b5f
parentf05712548e39c75080431555574adc89b21ee0ac (diff)
downloadscummvm-rg350-b39ee7ec3c8ad944cc0401f54ae199e0b142bc21.tar.gz
scummvm-rg350-b39ee7ec3c8ad944cc0401f54ae199e0b142bc21.tar.bz2
scummvm-rg350-b39ee7ec3c8ad944cc0401f54ae199e0b142bc21.zip
Fixed usage of Common::Stack.
svn-id: r29591
-rw-r--r--engines/agi/picture.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/agi/picture.cpp b/engines/agi/picture.cpp
index 502793006d..e01e70f3ba 100644
--- a/engines/agi/picture.cpp
+++ b/engines/agi/picture.cpp
@@ -65,7 +65,7 @@ void PictureMgr::putVirtPixel(int x, int y) {
// For the flood fill routines
// MH2 needs stack size > 300
-Common::Stack<uint16> _stack[512];
+Common::Stack<uint16> _stack;
/**
* Draw an AGI line.
@@ -271,7 +271,7 @@ void PictureMgr::fillScanline(int x, int y) {
putVirtPixel(c, y);
if (isOkFillHere(c, y - 1)) {
if (newspanUp) {
- _stack->push(c + (_width * 2) * (y - 1));
+ _stack.push(c + (_width * 2) * (y - 1));
newspanUp = 0;
}
} else {
@@ -280,7 +280,7 @@ void PictureMgr::fillScanline(int x, int y) {
if (isOkFillHere(c, y + 1)) {
if (newspanDown) {
- _stack->push(c + (_width * 2) * (y + 1));
+ _stack.push(c + (_width * 2) * (y + 1));
newspanDown = 0;
}
} else {
@@ -291,14 +291,14 @@ void PictureMgr::fillScanline(int x, int y) {
void PictureMgr::agiFill(unsigned int x, unsigned int y) {
uint16 c;
- _stack->push(x + (_width * 2) * y);
+ _stack.push(x + (_width * 2) * y);
for (;;) {
// Exit if stack is empty
- if (_stack->empty())
+ if (_stack.empty())
break;
- c = _stack->pop();
+ c = _stack.pop();
x = c % (_width * 2);
y = c / (_width * 2);
@@ -306,7 +306,7 @@ void PictureMgr::agiFill(unsigned int x, unsigned int y) {
fillScanline(x, y);
}
- _stack->clear();
+ _stack.clear();
}
/**************************************************************************