DRASCULA: Fix warnings

This commit is contained in:
Eugene Sandulenko 2011-11-02 23:18:10 +00:00
parent 7e57a87479
commit 6d4189e2ed
3 changed files with 4 additions and 4 deletions

View File

@ -882,7 +882,7 @@ bool DrasculaEngine::loadDrasculaDat() {
in.read(buf, 8);
buf[8] = '\0';
if (strcmp(buf, "DRASCULA")) {
if (strcmp(buf, "DRASCULA") != 0) {
Common::String errorMessage = "File 'drascula.dat' is corrupt. Get it from the ScummVM website";
GUIErrorMessage(errorMessage);
warning("%s", errorMessage.c_str());

View File

@ -361,7 +361,7 @@ void DrasculaEngine::centerText(const char *message, int textX, int textY) {
curWord = strtok(msg, " ");
while (curWord != NULL) {
// Check if the word and the current line fit on screen
if (strlen(tmpMessageLine) > 0)
if (tmpMessageLine[0] != '\0')
strcat(tmpMessageLine, " ");
strcat(tmpMessageLine, curWord);
if (textFitsCentered(tmpMessageLine, textX)) {
@ -643,7 +643,7 @@ void DrasculaEngine::waitFrameSSN() {
}
bool DrasculaEngine::animate(const char *animationFile, int FPS) {
int NFrames = 1;
int NFrames;
int cnt = 2;
Common::SeekableReadStream *stream = _archives.open(animationFile);

View File

@ -123,7 +123,7 @@ bool DrasculaEngine::saveLoadScreen() {
if (mouseX > 115 && mouseY > y + (9 * n) && mouseX < 115 + 175 && mouseY < y + 10 + (9 * n)) {
strcpy(select, _saveNames[n]);
if (strcmp(select, "*"))
if (strcmp(select, "*") != 0)
selectionMade = 1;
else {
enterName();