mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-10 21:03:31 +00:00
commit
9d2203c8ea
@ -407,10 +407,18 @@ Model *Costume::getModel() {
|
||||
}
|
||||
|
||||
void Costume::setChoreLastFrame(int num) {
|
||||
if (num < 0 || num >= _numChores) {
|
||||
Debug::warning(Debug::Chores, "Requested chore number %d is outside the range of chores (0-%d)", num, _numChores);
|
||||
return;
|
||||
}
|
||||
_chores[num]->setLastFrame();
|
||||
}
|
||||
|
||||
void Costume::setChoreLooping(int num, bool val) {
|
||||
if (num < 0 || num >= _numChores) {
|
||||
Debug::warning(Debug::Chores, "Requested chore number %d is outside the range of chores (0-%d)", num, _numChores);
|
||||
return;
|
||||
}
|
||||
_chores[num]->setLooping(val);
|
||||
}
|
||||
|
||||
@ -481,11 +489,9 @@ void Costume::stopChores() {
|
||||
}
|
||||
|
||||
void Costume::fadeChoreIn(int chore, int msecs) {
|
||||
if (chore >= _numChores) {
|
||||
if (chore < 0 || chore >= _numChores) {
|
||||
Debug::warning(Debug::Chores, "Requested chore number %d is outside the range of chores (0-%d)", chore, _numChores);
|
||||
return;
|
||||
}
|
||||
if (chore < 0 || chore >= _numChores) {
|
||||
Debug::warning(Debug::Chores, "Requested chore number %d is outside the range of chores (0-%d)", chore, _numChores);
|
||||
return;
|
||||
}
|
||||
_chores[chore]->fadeIn(msecs);
|
||||
if (Common::find(_playingChores.begin(), _playingChores.end(), _chores[chore]) == _playingChores.end())
|
||||
@ -493,11 +499,9 @@ void Costume::fadeChoreIn(int chore, int msecs) {
|
||||
}
|
||||
|
||||
void Costume::fadeChoreOut(int chore, int msecs) {
|
||||
if (chore >= _numChores) {
|
||||
if (chore < 0 || chore >= _numChores) {
|
||||
Debug::warning(Debug::Chores, "Requested chore number %d is outside the range of chores (0-%d)", chore, _numChores);
|
||||
return;
|
||||
}
|
||||
if (chore < 0 || chore >= _numChores) {
|
||||
Debug::warning(Debug::Chores, "Requested chore number %d is outside the range of chores (0-%d)", chore, _numChores);
|
||||
return;
|
||||
}
|
||||
_chores[chore]->fadeOut(msecs);
|
||||
}
|
||||
@ -511,6 +515,10 @@ int Costume::isChoring(const char *name, bool excludeLooping) {
|
||||
}
|
||||
|
||||
int Costume::isChoring(int num, bool excludeLooping) {
|
||||
if (num < 0 || num >= _numChores) {
|
||||
Debug::warning(Debug::Chores, "Requested chore number %d is outside the range of chores (0-%d)", num, _numChores);
|
||||
return -1;
|
||||
}
|
||||
if (_chores[num]->_playing && !(excludeLooping && _chores[num]->_looping))
|
||||
return num;
|
||||
else
|
||||
|
@ -294,9 +294,11 @@ void gl_shade_vertex(GLContext *c, GLVertex *v) {
|
||||
// testing specular buffer code
|
||||
// dot_spec= pow(dot_spec,m->shininess)
|
||||
specbuf = specbuf_get_buffer(c, m->shininess_i, m->shininess);
|
||||
idx = (int)(dot_spec * SPECULAR_BUFFER_SIZE);
|
||||
if (idx > SPECULAR_BUFFER_SIZE)
|
||||
tmp = dot_spec * SPECULAR_BUFFER_SIZE;
|
||||
if (tmp > SPECULAR_BUFFER_SIZE)
|
||||
idx = SPECULAR_BUFFER_SIZE;
|
||||
else
|
||||
idx = (int)tmp;
|
||||
|
||||
dot_spec = specbuf->buf[idx];
|
||||
lR += dot_spec * l->specular.v[0] * m->specular.v[0];
|
||||
|
Loading…
x
Reference in New Issue
Block a user