[Scummvm-cvs-logs] SF.net SVN: scummvm:[44574] scummvm/trunk/engines/sci/gui
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Sat Oct 3 23:49:09 CEST 2009
Revision: 44574
http://scummvm.svn.sourceforge.net/scummvm/?rev=44574&view=rev
Author: m_kiewitz
Date: 2009-10-03 21:49:09 +0000 (Sat, 03 Oct 2009)
Log Message:
-----------
SCI/newgui: removed duplicate unused code
Modified Paths:
--------------
scummvm/trunk/engines/sci/gui/gui_gfx.cpp
scummvm/trunk/engines/sci/gui/gui_gfx.h
Modified: scummvm/trunk/engines/sci/gui/gui_gfx.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_gfx.cpp 2009-10-03 21:30:36 UTC (rev 44573)
+++ scummvm/trunk/engines/sci/gui/gui_gfx.cpp 2009-10-03 21:49:09 UTC (rev 44574)
@@ -536,70 +536,6 @@
#endif
}
-SCILanguage SciGUIgfx::getSCILanguage() {
- return kLangEnglish;
-}
-
-char *SciGUIgfx::StrSplit(char *buff, const char *msg, const char *fmt) {
- SCILanguage gameLang = getSCILanguage();
- SCILanguage subtitleLang = kLangNone;
- char *retval;
-// if (_theGame.getHandle())
- //subtitleLang = (SCILanguage)_theGame.getProperty(0x58); // subtitleLang property
-
- if (buff == msg) {
- char str[2000];
- getIntlString(str, msg, fmt, gameLang, subtitleLang);
- retval = strcpy(buff, str);
- } else
- retval = getIntlString(buff, msg, fmt, gameLang, subtitleLang);
- return retval;
-}
-//--------------------------------
-// In multilanguage game the msg has format ___english_text__#I___italian_text___
-// The function should place in buff a translated part of msg or the 1st one if a translation
-// does not exist
-char *SciGUIgfx::getIntlString(char *buff, const char *msg, const char *fmt, SCILanguage gameLang, SCILanguage subtitleLang) {
-
- // prefer subtitleLang if set
- SCILanguage lang = subtitleLang != kLangNone ? subtitleLang : gameLang;
- const char *ptr = msg, *szFrom;
- char ch;
- int nLen = 0;
- // searching for language code in msg
- while (*ptr) {
- ch = *(ptr + 1);
- if(*ptr == '#' && (ch == 'I' || ch == 'F' || ch == 'G' || ch == 'S')) {
- ptr +=2;
- break;
- }
- ptr++;
- }
- // if a language code was found...
- if (*ptr) {
- if ((lang == kLangItalian && ch == 'I') || (lang == kLangFrench && ch == 'F') ||
- (lang == kLangGerman && ch == 'G') || (lang == kLangSpanish && ch == 'S')) {
- nLen = (int)strlen(ptr);
- szFrom = ptr;
- } else {
- nLen = ptr - msg - 2;
- szFrom = msg;
- }
- } else {
- nLen = ptr - msg;
- szFrom = msg;
- }
- if (fmt && subtitleLang != kLangNone) {
- strcpy(buff, fmt);
- strncat(buff, szFrom, nLen);
- buff[nLen + strlen(fmt)] = 0;
- } else {
- strncpy(buff, szFrom, nLen);
- buff[nLen] = 0;
- }
- return buff;
-}
-
// TODO: implement codes
int16 SciGUIgfx::TextSize(Common::Rect &rect, const char *str, int16 fontId, int16 maxwidth) {
char buff[1000] = { 0 };
Modified: scummvm/trunk/engines/sci/gui/gui_gfx.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_gfx.h 2009-10-03 21:30:36 UTC (rev 44573)
+++ scummvm/trunk/engines/sci/gui/gui_gfx.h 2009-10-03 21:49:09 UTC (rev 44574)
@@ -86,9 +86,6 @@
void ClearChar(int16 chr);
void DrawChar(int16 chr);
void StdChar(int16 chr);
- SCILanguage getSCILanguage();
- char* StrSplit(char*buff, const char*msg, const char*fmt);
- char* getIntlString(char*buff, const char*msg, const char*fmt, SCILanguage lang, SCILanguage prop);
int16 TextSize(Common::Rect &rect, const char *str, int16 fontId, int16 maxwidth);
int16 GetLongest(const char *str, int16 maxwidth);
void DrawText(const char *str, int16 from, int16 len);
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