[Scummvm-cvs-logs] SF.net SVN: scummvm: [22816] scummvm/trunk/engines/gob
drmccoy at users.sourceforge.net
drmccoy at users.sourceforge.net
Thu Jun 1 05:19:07 CEST 2006
Revision: 22816
Author: drmccoy
Date: 2006-06-01 05:18:12 -0700 (Thu, 01 Jun 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22816&view=rev
Log Message:
-----------
- Fixed drawing of sprite-parts based texts
- Removed misplaced Music::stopPlay() call
Modified Paths:
--------------
scummvm/trunk/engines/gob/draw_v2.cpp
scummvm/trunk/engines/gob/inter.h
scummvm/trunk/engines/gob/inter_v2.cpp
Modified: scummvm/trunk/engines/gob/draw_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/draw_v2.cpp 2006-06-01 12:06:53 UTC (rev 22815)
+++ scummvm/trunk/engines/gob/draw_v2.cpp 2006-06-01 12:18:12 UTC (rev 22816)
@@ -709,9 +709,12 @@
}
} else {
for (i = 0; i < len; i++) {
- ratio = _spritesArray[_fontToSprite[_fontIndex].sprite]->width / _fontToSprite[_fontIndex].width;
- x = ((_textToPrint[i] - _fontToSprite[_fontIndex].base) / ratio) * _fontToSprite[_fontIndex].height;
- y = ((_textToPrint[i] - _fontToSprite[_fontIndex].base) / ratio) * _fontToSprite[_fontIndex].width;
+ ratio = _spritesArray[_fontToSprite[_fontIndex].sprite]->width
+ / _fontToSprite[_fontIndex].width;
+ y = ((_textToPrint[i] - _fontToSprite[_fontIndex].base) / ratio)
+ * _fontToSprite[_fontIndex].height;
+ x = ((_textToPrint[i] - _fontToSprite[_fontIndex].base) % ratio)
+ * _fontToSprite[_fontIndex].width;
_vm->_video->drawSprite(_spritesArray[_fontToSprite[_fontIndex].sprite],
_spritesArray[_destSurface], x, y,
x + _fontToSprite[_fontIndex].width - 1,
Modified: scummvm/trunk/engines/gob/inter.h
===================================================================
--- scummvm/trunk/engines/gob/inter.h 2006-06-01 12:06:53 UTC (rev 22815)
+++ scummvm/trunk/engines/gob/inter.h 2006-06-01 12:18:12 UTC (rev 22816)
@@ -317,7 +317,8 @@
void o2_stub0x80(void);
void o2_stub0x82(void);
void o2_stub0x85(void);
- void o2_renderStatic(void);
+ bool o2_stopSound(char &cmdCount, int16 &counter, int16 &retFlag);
+ bool o2_createSprite(char &cmdCount, int16 &counter, int16 &retFlag);
bool o2_animPalInit(char &cmdCount, int16 &counter, int16 &retFlag);
bool o2_playSound(char &cmdCount, int16 &counter, int16 &retFlag);
bool o2_goblinFunc(char &cmdCount, int16 &counter, int16 &retFlag);
@@ -326,6 +327,8 @@
bool o2_loadTot(char &cmdCount, int16 &counter, int16 &retFlag);
bool o2_freeSprite(char &cmdCount, int16 &counter, int16 &retFlag);
bool o2_loadSound(char &cmdCount, int16 &counter, int16 &retFlag);
+ void o2_loadFontToSprite(void);
+ void o2_renderStatic(void);
void o2_loadMapObjects(void);
void o2_freeGoblins(void);
void o2_writeGoblinPos(void);
Modified: scummvm/trunk/engines/gob/inter_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v2.cpp 2006-06-01 12:06:53 UTC (rev 22815)
+++ scummvm/trunk/engines/gob/inter_v2.cpp 2006-06-01 12:18:12 UTC (rev 22816)
@@ -185,7 +185,7 @@
{NULL, ""},
{NULL, ""},
/* 30 */
- OPCODE(o1_loadFontToSprite),
+ OPCODE(o2_loadFontToSprite),
OPCODE(o1_freeFontToSprite),
{NULL, ""},
{NULL, ""},
@@ -495,7 +495,7 @@
/* 24 */
OPCODE(o1_putPixel),
OPCODE(o2_goblinFunc),
- OPCODE(o1_createSprite),
+ OPCODE(o2_createSprite),
OPCODE(o2_freeSprite),
/* 28 */
{NULL, ""},
@@ -519,7 +519,7 @@
OPCODE(o1_setBackDelta),
/* 38 */
OPCODE(o2_playSound),
- OPCODE(o1_stopSound),
+ OPCODE(o2_stopSound),
OPCODE(o2_loadSound),
OPCODE(o1_freeSoundSlot),
/* 3C */
@@ -919,6 +919,19 @@
return slot;
}
+void Inter_v2::o2_loadFontToSprite(void) {
+ int16 i = load16();
+
+ _vm->_draw->_fontToSprite[i].sprite = *_vm->_global->_inter_execPtr;
+ _vm->_global->_inter_execPtr += 2;
+ _vm->_draw->_fontToSprite[i].base = *_vm->_global->_inter_execPtr;
+ _vm->_global->_inter_execPtr += 2;
+ _vm->_draw->_fontToSprite[i].width = *_vm->_global->_inter_execPtr;
+ _vm->_global->_inter_execPtr += 2;
+ _vm->_draw->_fontToSprite[i].height = *_vm->_global->_inter_execPtr;
+ _vm->_global->_inter_execPtr += 2;
+}
+
void Inter_v2::o2_loadMapObjects(void) {
_vm->_map->loadMapObjects(0);
}
@@ -1065,6 +1078,30 @@
}
}
+bool Inter_v2::o2_stopSound(char &cmdCount, int16 &counter, int16 &retFlag) {
+ _vm->_snd->stopSound(_vm->_parse->parseValExpr());
+ _soundEndTimeKey = 0;
+ return false;
+}
+
+bool Inter_v2::o2_createSprite(char &cmdCount, int16 &counter, int16 &retFlag) {
+ int16 index;
+ int16 height;
+ int16 width;
+ int16 flag;
+
+ index = load16();
+ width = load16();
+ height = load16();
+
+ _vm->_draw->adjustCoords(0, &width, &height);
+
+ flag = load16();
+
+ _vm->_draw->initBigSprite(index, width, height, flag);
+ return false;
+}
+
bool Inter_v2::o2_animPalInit(char &cmdCount, int16 &counter, int16 &retFlag) {
int16 index;
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