[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.338,2.339 script_v90he.cpp,2.128,2.129 sprite_he.cpp,1.6,1.7
kirben
kirben at users.sourceforge.net
Sun Feb 20 15:55:54 CET 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.337,2.338 script_v90he.cpp,2.127,2.128 sprite_he.cpp,1.5,1.6
- Next 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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13971/scumm
Modified Files:
intern.h script_v90he.cpp sprite_he.cpp
Log Message:
Add sprite function
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.338
retrieving revision 2.339
diff -u -d -r2.338 -r2.339
--- intern.h 20 Feb 2005 23:30:36 -0000 2.338
+++ intern.h 20 Feb 2005 23:55:10 -0000 2.339
@@ -891,6 +891,7 @@
int spriteInfoGet_zoom(int spriteNun);
int spriteInfoGet_field_78(int spriteNun);
int spriteInfoGet_field_80(int spriteNun);
+ void getSpriteImageDim(int spriteNum, int32 &w, int32 &h);
void spritesAllocTables(int numSprites, int numGroups, int numImgSprites);
void spritesResetTables(bool refreshScreen);
Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.128
retrieving revision 2.129
diff -u -d -r2.128 -r2.129
--- script_v90he.cpp 20 Feb 2005 23:30:37 -0000 2.128
+++ script_v90he.cpp 20 Feb 2005 23:55:11 -0000 2.129
@@ -699,6 +699,7 @@
void ScummEngine_v90he::o90_getSpriteInfo() {
int args[16];
int eax, esi;
+ int32 w, h;
byte subOp = fetchScriptByte();
subOp -= 30;
@@ -711,10 +712,22 @@
pop();
break;
case 2:
- pop();
+ eax = pop();
+ if (eax) {
+ getSpriteImageDim(eax, w, h);
+ push(w);
+ } else {
+ push(0);
+ }
break;
case 3:
- pop();
+ eax = pop();
+ if (eax) {
+ getSpriteImageDim(eax, w, h);
+ push(h);
+ } else {
+ push(0);
+ }
break;
case 4:
pop();
Index: sprite_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sprite_he.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- sprite_he.cpp 20 Feb 2005 23:30:37 -0000 1.6
+++ sprite_he.cpp 20 Feb 2005 23:55:11 -0000 1.7
@@ -155,6 +155,12 @@
return _spriteTable[spriteNum].field_80;
}
+void ScummEngine_v90he::getSpriteImageDim(int spriteNum, int32 &w, int32 &h) {
+ checkRange(_numSprites, 1, spriteNum, "getSpriteImageDim: Invalid sprite %d");
+
+ getWizImageDim(_spriteTable[spriteNum].res_id, _spriteTable[spriteNum].res_state, w, h);
+}
+
void ScummEngine_v90he::spritesAllocTables(int numSprites, int numGroups, int numImgLists) {
_varNumSpriteGroups = numGroups;
_numSpritesToProcess = 0;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.337,2.338 script_v90he.cpp,2.127,2.128 sprite_he.cpp,1.5,1.6
- Next 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
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list