From 6abdb969813e3a2e6c7f8dfe3fda8cdeb56fb54a Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 20 Feb 2005 13:26:30 +0000 Subject: Use sprite functions svn-id: r16824 --- scumm/script_v90he.cpp | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) (limited to 'scumm') diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index 8c4a70ce11..329b433bed 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -698,6 +698,7 @@ void ScummEngine_v90he::o90_getDistanceBetweenPoints() { void ScummEngine_v90he::o90_getSpriteInfo() { int args[16]; + int eax, esi; byte subOp = fetchScriptByte(); subOp -= 30; @@ -734,8 +735,31 @@ void ScummEngine_v90he::o90_getSpriteInfo() { pop(); break; case 12: - pop(); - pop(); + esi = pop(); + eax = pop(); + if (eax) { + switch(esi) { + case 0: + push(spriteInfoGet_flags_1(eax)); + break; + case 1: + push(spriteInfoGet_flags_2(eax)); + break; + case 2: + push(spriteInfoGet_flags_3(eax)); + break; + case 3: + push(spriteInfoGet_flags_4(eax)); + break; + case 4: + push(spriteInfoGet_flags_5(eax)); + break; + default: + push(0); + } + } else { + push(0); + } break; case 13: pop(); @@ -768,7 +792,11 @@ void ScummEngine_v90he::o90_getSpriteInfo() { pop(); break; case 52: - pop(); + eax = pop(); + if (eax) + push(spriteInfoGet_flags_6(eax)); + else + push(0); break; case 62: pop(); @@ -780,7 +808,11 @@ void ScummEngine_v90he::o90_getSpriteInfo() { pop(); break; case 94: - pop(); + eax = pop(); + if (eax) + push(spriteInfoGet_flags_7(eax)); + else + push(0); break; case 95: getStackList(args, ARRAYSIZE(args)); -- cgit v1.2.3