Replace samewrd() function, with scumm_strnicmp.

svn-id: r39248
This commit is contained in:
Travis Howell 2009-03-08 22:54:00 +00:00
parent b2ec405011
commit 2abfb968a6
2 changed files with 1 additions and 17 deletions

View File

@ -1455,7 +1455,6 @@ public:
int findentry();
int findset();
int gvwrd(uint8 *wptr, int mask);
int samewrd(uint8 *w1, uint8 *w2, int ln);
int wrdmatch(uint8 *word1, int mask1, uint8 *word2, int mask2);
bool testContainer(uint16 a);

View File

@ -984,21 +984,6 @@ int AGOSEngine_PN::gvwrd(uint8 *wptr, int mask) {
// FIXME/TODO: Isn't this just scumm_strnicmp ?
int AGOSEngine_PN::samewrd(uint8 *w1, uint8 *w2, int ln) {
int ct = 0;
while (ct < ln) {
if (toupper(*w1) > toupper(*w2))
return 1;
if (toupper(*w1) < toupper(*w2))
return -1;
ct++;
w1++;
w2++;
}
return 0;
}
int AGOSEngine_PN::setposition(int process, int line) {
uint8 *ourptr;
int np;
@ -1034,7 +1019,7 @@ int AGOSEngine_PN::wrdmatch(uint8 *word1, int mask1, uint8 *word2, int mask2) {
sv = *word1;
*word1 &= 127;
if (samewrd(word1, word2, _dataBase[57])) {
if (scumm_strnicmp((const char *)word1, (const char *)word2, _dataBase[57])) {
*word1 = sv;
return 0;
}