Skip to content

Commit

Permalink
DRASCULA: Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
wjp committed Oct 17, 2013
1 parent 734abb5 commit ee9e6b9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions engines/drascula/converse.cpp
Expand Up @@ -168,19 +168,19 @@ void DrasculaEngine::converse(int index) {
// delete stream;

if (currentChapter == 2 && !strcmp(fileName, "op_5.cal") && flags[38] == 1 && flags[33] == 1) {
strlcpy(phrase3, _text[405], 128);
Common::strlcpy(phrase3, _text[405], 128);
strcpy(sound3, "405.als");
answer3 = 31;
}

if (currentChapter == 6 && !strcmp(fileName, "op_12.cal") && flags[7] == 1) {
strlcpy(phrase3, _text[273], 128);
Common::strlcpy(phrase3, _text[273], 128);
strcpy(sound3, "273.als");
answer3 = 14;
}

if (currentChapter == 6 && !strcmp(fileName, "op_12.cal") && flags[10] == 1) {
strlcpy(phrase3, _text[274], 128);
Common::strlcpy(phrase3, _text[274], 128);
strcpy(sound3, "274.als");
answer3 = 15;
}
Expand Down
2 changes: 1 addition & 1 deletion engines/drascula/drascula.cpp
Expand Up @@ -324,7 +324,7 @@ Common::Error DrasculaEngine::run() {
memset(iconName, 0, sizeof(iconName));

for (i = 0; i < 6; i++)
strlcpy(iconName[i + 1], _textverbs[i], 13);
Common::strlcpy(iconName[i + 1], _textverbs[i], 13);

assignPalette(defaultPalette);

Expand Down
10 changes: 5 additions & 5 deletions engines/drascula/graphics.cpp
Expand Up @@ -336,7 +336,7 @@ void DrasculaEngine::centerText(const char *message, int textX, int textY) {
// original starts printing 4 lines above textY
int y = CLIP<int>(textY - (4 * CHAR_HEIGHT), 0, 320);

strlcpy(msg, message, 200);
Common::strlcpy(msg, message, 200);

// If the message fits on screen as-is, just print it here
if (textFitsCentered(msg, textX)) {
Expand All @@ -363,8 +363,8 @@ void DrasculaEngine::centerText(const char *message, int textX, int textY) {
while (curWord != NULL) {
// Check if the word and the current line fit on screen
if (tmpMessageLine[0] != '\0')
strlcat(tmpMessageLine, " ", 200);
strlcat(tmpMessageLine, curWord, 200);
Common::strlcat(tmpMessageLine, " ", 200);
Common::strlcat(tmpMessageLine, curWord, 200);
if (textFitsCentered(tmpMessageLine, textX)) {
// Line fits, so add the word to the current message line
strcpy(messageLine, tmpMessageLine);
Expand All @@ -374,8 +374,8 @@ void DrasculaEngine::centerText(const char *message, int textX, int textY) {
// If it goes off screen, print_abc will adjust it
x = CLIP<int>(textX - strlen(messageLine) * CHAR_WIDTH / 2, 60, 255);
print_abc(messageLine, x, y + curLine * CHAR_HEIGHT);
strlcpy(messageLine, curWord, 200);
strlcpy(tmpMessageLine, curWord, 200);
Common::strlcpy(messageLine, curWord, 200);
Common::strlcpy(tmpMessageLine, curWord, 200);
curLine++;
}

Expand Down
2 changes: 1 addition & 1 deletion engines/drascula/objects.cpp
Expand Up @@ -266,7 +266,7 @@ void DrasculaEngine::updateVisible() {
if (_roomNumber == 22 && flags[27] == 1)
visible[3] = 0;
if (_roomNumber == 26 && flags[21] == 0) {
strlcpy(objName[2], _textmisc[0], 20);
Common::strlcpy(objName[2], _textmisc[0], 20);
}
if (_roomNumber == 26 && flags[18] == 1)
visible[2] = 0;
Expand Down

0 comments on commit ee9e6b9

Please sign in to comment.