mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
Some more safety checks and the first room's background can be seen
svn-id: r28204
This commit is contained in:
parent
99a707d89e
commit
e151167dd8
@ -1698,6 +1698,9 @@ void Goblin::playSounds(Mult::Mult_Object *obj) {
|
||||
int16 sndSlot;
|
||||
int16 frame;
|
||||
|
||||
if (!obj->goblinStates)
|
||||
return;
|
||||
|
||||
animData = obj->pAnimData;
|
||||
|
||||
for (int i = 1; i <= obj->goblinStates[animData->state][0].dataCount; i++) {
|
||||
|
@ -115,6 +115,9 @@ void Goblin_v3::placeObject(Gob_Object *objDesc, char animated,
|
||||
Mult::Mult_Object &obj = _vm->_mult->_objects[index];
|
||||
Mult::Mult_AnimData &objAnim = *(obj.pAnimData);
|
||||
|
||||
if (!obj.goblinStates)
|
||||
return;
|
||||
|
||||
if ((state != -1) && (obj.goblinStates[state] != 0)) {
|
||||
if (state == 8)
|
||||
objAnim.curLookDir = 0;
|
||||
|
@ -1705,6 +1705,10 @@ bool Inter_v1::o1_capturePush(OpFuncParams ¶ms) {
|
||||
top = _vm->_parse->parseValExpr();
|
||||
width = _vm->_parse->parseValExpr();
|
||||
height = _vm->_parse->parseValExpr();
|
||||
|
||||
if ((width < 0) || (height < 0))
|
||||
return false;
|
||||
|
||||
_vm->_game->capturePush(left, top, width, height);
|
||||
(*_vm->_scenery->_pCaptureCounter)++;
|
||||
return false;
|
||||
|
@ -320,7 +320,7 @@ void Scenery::updateStatic(int16 orderFrom, byte index, byte layer) {
|
||||
int16 top;
|
||||
int16 bottom;
|
||||
|
||||
if (layer >= _statics[index].layersCount)
|
||||
if ((index >= 10) || layer >= _statics[index].layersCount)
|
||||
return;
|
||||
|
||||
layerPtr = &_statics[index].layers[layer];
|
||||
|
Loading…
Reference in New Issue
Block a user