mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-28 20:55:19 +00:00
added some code to get better valgrind results
svn-id: r6758
This commit is contained in:
parent
12d09b57b5
commit
b484c7a6bc
@ -467,8 +467,14 @@ void Scumm::setResult(int value) {
|
||||
writeVar(_resultVarNumber, value);
|
||||
}
|
||||
|
||||
int my_dummy_global = 0;
|
||||
|
||||
void Scumm::push(int a) {
|
||||
assert(_scummStackPos >= 0 && (unsigned int)_scummStackPos <= ARRAYSIZE(_scummStack));
|
||||
// HACK to aid valgrind
|
||||
if (a > 0)
|
||||
my_dummy_global++;
|
||||
|
||||
assert(_scummStackPos >= 0 && (unsigned int)_scummStackPos < ARRAYSIZE(_scummStack));
|
||||
_scummStack[_scummStackPos++] = a;
|
||||
}
|
||||
|
||||
@ -477,7 +483,13 @@ int Scumm::pop() {
|
||||
error("No items on stack to pop() for %s (0x%X) at [%d-%d]", getOpcodeDesc(_opcode), _opcode, _roomResource, vm.slot[_currentScript].number);
|
||||
}
|
||||
|
||||
return _scummStack[--_scummStackPos];
|
||||
int a = _scummStack[--_scummStackPos];
|
||||
|
||||
// HACK to aid valgrind
|
||||
if (a > 0)
|
||||
my_dummy_global++;
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
void Scumm::drawBox(int x, int y, int x2, int y2, int color) {
|
||||
|
Loading…
Reference in New Issue
Block a user