Fixed some warnings. Patch by Torbjorn Andersson.
This commit is contained in:
parent
e6421b17f6
commit
66bba94bcf
3 changed files with 10 additions and 6 deletions
|
@ -57,13 +57,17 @@ LipSync::LipSync(const char *filename, const char *data, int len) :
|
|||
readPhoneme = READ_LE_UINT16(data + 2);
|
||||
|
||||
// Look for the animation corresponding to the phoneme
|
||||
for (j = 0; (j < _animTableSize) && (readPhoneme != _animTable[j].phoneme); j++) { ; }
|
||||
for (j = 0; j < _animTableSize; j++) {
|
||||
if (readPhoneme == _animTable[j].phoneme) {
|
||||
_entries[i].anim = _animTable[j].anim;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (readPhoneme != _animTable[j].phoneme) {
|
||||
if (j >= _animTableSize) {
|
||||
warning("Unknown phoneme: 0x%X in file %s", readPhoneme, filename);
|
||||
_entries[i].anim = 1;
|
||||
} else
|
||||
_entries[i].anim = _animTable[j].anim;
|
||||
}
|
||||
|
||||
data += 4;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ void TextObject::setText(const char *text) {
|
|||
// this should be good enough to still be unique
|
||||
// but for debug purposes lets make this crash the program so we know about it
|
||||
strncpy(_textID, text, sizeof(_textID));
|
||||
_textID[sizeof(_textID)] = 0;
|
||||
_textID[sizeof(_textID) - 1] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -406,7 +406,7 @@ void tglLightModeli(int pname, int param) {
|
|||
p[0].op = TinyGL::OP_LightModel;
|
||||
p[1].i = pname;
|
||||
p[2].f = (float)param;
|
||||
for (i = 0; i < 4; i++)
|
||||
for (i = 0; i < 3; i++)
|
||||
p[3 + i].f = 0;
|
||||
|
||||
TinyGL::gl_add_op(p);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue