aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMax Horn2012-02-20 16:03:39 +0100
committerMax Horn2012-02-20 16:18:27 +0100
commit4f8665fc836898ebf54fc73b1061125b748183bc (patch)
treeae393cd0822fab01bdcc38bd003ab186955eb270 /engines/sci
parent658080deeda79d20ea40643569fbcb072573e7cf (diff)
downloadscummvm-rg350-4f8665fc836898ebf54fc73b1061125b748183bc.tar.gz
scummvm-rg350-4f8665fc836898ebf54fc73b1061125b748183bc.tar.bz2
scummvm-rg350-4f8665fc836898ebf54fc73b1061125b748183bc.zip
COMMON: Move isFoo functions to namespace Common, add doxygen comments
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kstring.cpp6
-rw-r--r--engines/sci/graphics/text16.cpp2
-rw-r--r--engines/sci/parser/vocabulary.cpp2
-rw-r--r--engines/sci/resource.cpp4
-rw-r--r--engines/sci/resource_audio.cpp2
5 files changed, 8 insertions, 8 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp
index 735b1b2187..fe8d631497 100644
--- a/engines/sci/engine/kstring.cpp
+++ b/engines/sci/engine/kstring.cpp
@@ -147,7 +147,7 @@ reg_t kReadNumber(EngineState *s, int argc, reg_t *argv) {
Common::String source_str = s->_segMan->getString(argv[0]);
const char *source = source_str.c_str();
- while (isSpace(*source))
+ while (Common::isSpace(*source))
source++; /* Skip whitespace */
int16 result = 0;
@@ -246,14 +246,14 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) {
/* int writelength; -- unused atm */
- if (xfer && (isDigit(xfer) || xfer == '-' || xfer == '=')) {
+ if (xfer && (Common::isDigit(xfer) || xfer == '-' || xfer == '=')) {
char *destp;
if (xfer == '0')
fillchar = '0';
else if (xfer == '=')
align = ALIGN_CENTER;
- else if (isDigit(xfer) || (xfer == '-'))
+ else if (Common::isDigit(xfer) || (xfer == '-'))
source--; // Go to start of length argument
strLength = strtol(source, &destp, 10);
diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp
index bd89e237f0..7eaa0168b8 100644
--- a/engines/sci/graphics/text16.cpp
+++ b/engines/sci/graphics/text16.cpp
@@ -100,7 +100,7 @@ int16 GfxText16::CodeProcessing(const char *&text, GuiResourceId orgFontId, int1
// cX -> sets textColor to _textColors[X-1]
curCode = textCode[0];
curCodeParm = textCode[1];
- if (isDigit(curCodeParm)) {
+ if (Common::isDigit(curCodeParm)) {
curCodeParm -= '0';
} else {
curCodeParm = -1;
diff --git a/engines/sci/parser/vocabulary.cpp b/engines/sci/parser/vocabulary.cpp
index 44e11d5b1f..e56158ecc1 100644
--- a/engines/sci/parser/vocabulary.cpp
+++ b/engines/sci/parser/vocabulary.cpp
@@ -534,7 +534,7 @@ bool Vocabulary::tokenizeString(ResultWordListList &retval, const char *sentence
do {
c = sentence[pos_in_sentence++];
- if (isAlnum(c) || (c == '-' && wordLen) || (c >= 0x80)) {
+ if (Common::isAlnum(c) || (c == '-' && wordLen) || (c >= 0x80)) {
currentWord[wordLen] = lowerCaseMap[c];
++wordLen;
}
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index a95a7e9b35..50b3387159 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -1558,7 +1558,7 @@ void ResourceManager::readResourcePatches() {
name = (*x)->getName();
// SCI1 scheme
- if (isDigit(name[0])) {
+ if (Common::isDigit(name[0])) {
char *end = 0;
resourceNr = strtol(name.c_str(), &end, 10);
bAdd = (*end == '.'); // Ensure the next character is the period
@@ -1566,7 +1566,7 @@ void ResourceManager::readResourcePatches() {
// SCI0 scheme
int resname_len = strlen(szResType);
if (scumm_strnicmp(name.c_str(), szResType, resname_len) == 0
- && !isAlpha(name[resname_len + 1])) {
+ && !Common::isAlpha(name[resname_len + 1])) {
resourceNr = atoi(name.c_str() + resname_len + 1);
bAdd = true;
}
diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp
index 4eb94cca69..684e1a1d0d 100644
--- a/engines/sci/resource_audio.cpp
+++ b/engines/sci/resource_audio.cpp
@@ -198,7 +198,7 @@ void ResourceManager::readWaveAudioPatches() {
for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); ++x) {
Common::String name = (*x)->getName();
- if (isDigit(name[0]))
+ if (Common::isDigit(name[0]))
processWavePatch(ResourceId(kResourceTypeAudio, atoi(name.c_str())), name);
}
}