[Scummvm-cvs-logs] SF.net SVN: scummvm: [31711] scummvm/trunk/engines/made
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Fri Apr 25 01:06:22 CEST 2008
Revision: 31711
http://scummvm.svn.sourceforge.net/scummvm/?rev=31711&view=rev
Author: thebluegr
Date: 2008-04-24 16:06:21 -0700 (Thu, 24 Apr 2008)
Log Message:
-----------
Implemented opcodes o1_DROPSHADOW, o1_TEXTCOLOR, o1_OUTLINE. Added some initial code for opcode o1_TEXTRECT
Modified Paths:
--------------
scummvm/trunk/engines/made/screen.h
scummvm/trunk/engines/made/scriptfuncs.cpp
Modified: scummvm/trunk/engines/made/screen.h
===================================================================
--- scummvm/trunk/engines/made/screen.h 2008-04-24 21:48:04 UTC (rev 31710)
+++ scummvm/trunk/engines/made/screen.h 2008-04-24 23:06:21 UTC (rev 31711)
@@ -71,7 +71,18 @@
void setExclude(uint16 exclude) { _exclude = exclude; }
void setGround(uint16 ground) { _ground = ground; }
void setFont(uint16 font) { _currentFont = font; }
+ void setTextColor(int16 color) { _textColor = color; }
+ void setOutlineColor(int16 color) {
+ _outlineColor = color;
+ _dropshadowColor = -1;
+ }
+
+ void setDropShadowColor(int16 color) {
+ _outlineColor = -1;
+ _dropshadowColor = color;
+ }
+
uint16 updateChannel(uint16 channelIndex);
void deleteChannel(uint16 channelIndex);
int16 getChannelType(uint16 channelIndex);
@@ -117,6 +128,9 @@
int _paletteColorCount, _oldPaletteColorCount;
bool _paletteInitialized, _needPalette;
uint16 _currentFont;
+ int16 _textColor;
+ int16 _outlineColor;
+ int16 _dropShadowColor;
uint16 _clip, _exclude, _ground;
int _visualEffectNum;
Modified: scummvm/trunk/engines/made/scriptfuncs.cpp
===================================================================
--- scummvm/trunk/engines/made/scriptfuncs.cpp 2008-04-24 21:48:04 UTC (rev 31710)
+++ scummvm/trunk/engines/made/scriptfuncs.cpp 2008-04-24 23:06:21 UTC (rev 31711)
@@ -441,6 +441,16 @@
int16 ScriptFunctionsRtz::o1_TEXTRECT(int16 argc, int16 *argv) {
warning("Unimplemented opcode: o1_TEXTRECT");
+
+ int16 x1 = CLIP<int16>(argv[0], 1, 318);
+ int16 y1 = CLIP<int16>(argv[1], 1, 198);
+ int16 x2 = CLIP<int16>(argv[2], 1, 318);
+ int16 y2 = CLIP<int16>(argv[3], 1, 198);
+ int16 textValue = argv[4];
+
+ printf("Text rect: %i, %i, %i, %i - text value: %i\n", x1, y1, x2, y2, textValue);
+ // TODO: set text rect
+
return 0;
}
@@ -455,17 +465,21 @@
}
int16 ScriptFunctionsRtz::o1_DROPSHADOW(int16 argc, int16 *argv) {
- warning("Unimplemented opcode: o1_DROPSHADOW");
+ // if the drop shadow color is -1, then text drop shadow is disabled
+ // when font drop shadow is enabled, outline is disabled
+ _vm->_screen->setDropShadowColor(argv[0]);
return 0;
}
int16 ScriptFunctionsRtz::o1_TEXTCOLOR(int16 argc, int16 *argv) {
- warning("Unimplemented opcode: o1_TEXTCOLOR");
+ _vm->_screen->setTextColor(argv[0]);
return 0;
}
int16 ScriptFunctionsRtz::o1_OUTLINE(int16 argc, int16 *argv) {
- warning("Unimplemented opcode: o1_OUTLINE");
+ // if the outline color is -1, then text outline is disabled
+ // when font outline is enabled, drop shadow is disabled
+ _vm->_screen->setOutlineColor(argv[0]);
return 0;
}
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