[Scummvm-cvs-logs] SF.net SVN: scummvm: [29591] scummvm/trunk/engines/agi/picture.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Wed Nov 21 01:41:51 CET 2007
Revision: 29591
http://scummvm.svn.sourceforge.net/scummvm/?rev=29591&view=rev
Author: lordhoto
Date: 2007-11-20 16:41:51 -0800 (Tue, 20 Nov 2007)
Log Message:
-----------
Fixed usage of Common::Stack.
Modified Paths:
--------------
scummvm/trunk/engines/agi/picture.cpp
Modified: scummvm/trunk/engines/agi/picture.cpp
===================================================================
--- scummvm/trunk/engines/agi/picture.cpp 2007-11-21 00:39:12 UTC (rev 29590)
+++ scummvm/trunk/engines/agi/picture.cpp 2007-11-21 00:41:51 UTC (rev 29591)
@@ -65,7 +65,7 @@
// 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 @@
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 @@
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::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 @@
fillScanline(x, y);
}
- _stack->clear();
+ _stack.clear();
}
/**************************************************************************
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list