[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.340,2.341 script_v90he.cpp,2.130,2.131 sprite_he.cpp,1.8,1.9
kirben
kirben at users.sourceforge.net
Sun Feb 20 16:26:38 CET 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.339,2.340 script_v90he.cpp,2.129,2.130 sprite_he.cpp,1.7,1.8 sprite_he.h,1.4,1.5
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.341,2.342 script_v90he.cpp,2.131,2.132 sprite_he.cpp,1.9,1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22450/scumm
Modified Files:
intern.h script_v90he.cpp sprite_he.cpp
Log Message:
More getSpriteInfo functions
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.340
retrieving revision 2.341
diff -u -d -r2.340 -r2.341
--- intern.h 21 Feb 2005 00:02:44 -0000 2.340
+++ intern.h 21 Feb 2005 00:25:30 -0000 2.341
@@ -895,6 +895,8 @@
int spriteInfoGet_field_78(int spriteNun);
int spriteInfoGet_field_80(int spriteNun);
void getSpriteImageDim(int spriteNum, int32 &w, int32 &h);
+ void spriteInfoGet_tx_ty(int spriteNum, int32 &tx, int32 &ty);
+ void spriteInfoGet_field_2C_30(int spriteNum, int32 &field_2C, int32 &field_30);
void spriteInfoSet_field_14(int spriteNum, int value);
void spriteInfoSet_field_7C(int spriteNum, int value);
Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.130
retrieving revision 2.131
diff -u -d -r2.130 -r2.131
--- script_v90he.cpp 21 Feb 2005 00:02:44 -0000 2.130
+++ script_v90he.cpp 21 Feb 2005 00:25:30 -0000 2.131
@@ -699,23 +699,33 @@
void ScummEngine_v90he::o90_getSpriteInfo() {
int args[16];
int eax, esi;
- int32 w, h;
+ int32 a, b;
byte subOp = fetchScriptByte();
subOp -= 30;
debug(1,"o90_getSpriteInfo stub (%d)", subOp);
switch (subOp) {
case 0:
- pop();
- break;
+ eax = pop();
+ if (eax) {
+ spriteInfoGet_tx_ty(eax, a, b);
+ push(a);
+ } else {
+ push(0);
+ }
case 1:
- pop();
- break;
+ eax = pop();
+ if (eax) {
+ spriteInfoGet_tx_ty(eax, a, b);
+ push(b);
+ } else {
+ push(0);
+ }
case 2:
eax = pop();
if (eax) {
- getSpriteImageDim(eax, w, h);
- push(w);
+ getSpriteImageDim(eax, a, b);
+ push(a);
} else {
push(0);
}
@@ -723,17 +733,29 @@
case 3:
eax = pop();
if (eax) {
- getSpriteImageDim(eax, w, h);
- push(h);
+ getSpriteImageDim(eax, a, b);
+ push(b);
} else {
push(0);
}
break;
case 4:
- pop();
+ eax = pop();
+ if (eax) {
+ spriteInfoGet_field_2C_30(eax, a, b);
+ push(a);
+ } else {
+ push(0);
+ }
break;
case 5:
- pop();
+ eax = pop();
+ if (eax) {
+ spriteInfoGet_field_2C_30(eax, a, b);
+ push(b);
+ } else {
+ push(0);
+ }
break;
case 6:
eax = pop();
Index: sprite_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sprite_he.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- sprite_he.cpp 21 Feb 2005 00:02:44 -0000 1.8
+++ sprite_he.cpp 21 Feb 2005 00:25:30 -0000 1.9
@@ -110,13 +110,19 @@
int ScummEngine_v90he::spriteInfoGet_grp_tx(int spriteNum) {
checkRange(_numSprites, 1, spriteNum, "spriteInfoGet_grp_tx: Invalid sprite %d");
- return _spriteTable[spriteNum].tx;
+ if (_spriteTable[spriteNum].group_num)
+ return _spriteTable[spriteNum].tx + _spriteGroups[spriteNum].tx;
+ else
+ return _spriteTable[spriteNum].tx;
}
int ScummEngine_v90he::spriteInfoGet_grp_ty(int spriteNum) {
checkRange(_numSprites, 1, spriteNum, "spriteInfoGet_grp_ty: Invalid sprite %d");
- return _spriteTable[spriteNum].ty;
+ if (_spriteTable[spriteNum].group_num)
+ return _spriteTable[spriteNum].ty + _spriteGroups[spriteNum].ty;
+ else
+ return _spriteTable[spriteNum].ty;
}
int ScummEngine_v90he::spriteInfoGet_field_44(int spriteNum) {
@@ -161,6 +167,20 @@
getWizImageDim(_spriteTable[spriteNum].res_id, _spriteTable[spriteNum].res_state, w, h);
}
+void ScummEngine_v90he::spriteInfoGet_tx_ty(int spriteNum, int32 &tx, int32 &ty) {
+ checkRange(_numSprites, 1, spriteNum, "spriteInfoGet_tx_ty: Invalid sprite %d");
+
+ tx = _spriteTable[spriteNum].tx;
+ ty = _spriteTable[spriteNum].ty;
+}
+
+void ScummEngine_v90he::spriteInfoGet_field_2C_30(int spriteNum, int32 &field_2C, int32 &field_30) {
+ checkRange(_numSprites, 1, spriteNum, "spriteInfoGet_field_2C_30: Invalid sprite %d");
+
+ field_2C = _spriteTable[spriteNum].field_2C;
+ field_30 = _spriteTable[spriteNum].field_30;
+}
+
//
// spriteInfoSet functions
//
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.339,2.340 script_v90he.cpp,2.129,2.130 sprite_he.cpp,1.7,1.8 sprite_he.h,1.4,1.5
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.341,2.342 script_v90he.cpp,2.131,2.132 sprite_he.cpp,1.9,1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list