mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-20 08:53:51 +00:00
LASTEXPRESS: Reduce nesting in Entities::processEntity()
This commit is contained in:
parent
552e8d45b2
commit
7974b62b71
@ -751,43 +751,41 @@ label_nosequence:
|
||||
|
||||
if (data->frame->getInfo()->field_30 > (data->field_49B + 1) || (data->direction == kDirectionLeft && data->sequence->count() == 1)) {
|
||||
++data->field_49B;
|
||||
} else {
|
||||
if (data->frame->getInfo()->field_30 > data->field_49B && !data->frame->getInfo()->keepPreviousFrame) {
|
||||
++data->field_49B;
|
||||
} else {
|
||||
if (data->frame->getInfo()->keepPreviousFrame == 1)
|
||||
} else if (data->frame->getInfo()->field_30 <= data->field_49B || data->frame->getInfo()->keepPreviousFrame) {
|
||||
if (data->frame->getInfo()->keepPreviousFrame == 1)
|
||||
keepPreviousFrame = true;
|
||||
|
||||
// Increment current frame
|
||||
++data->currentFrame;
|
||||
|
||||
if (data->currentFrame > (int16)(data->sequence->count() - 1) || (data->field_4A9 && checkSequenceFromPosition(entityIndex))) {
|
||||
|
||||
if (data->direction == kDirectionLeft) {
|
||||
data->currentFrame = 0;
|
||||
} else {
|
||||
keepPreviousFrame = true;
|
||||
drawNextSequence(entityIndex);
|
||||
|
||||
// Increment current frame
|
||||
++data->currentFrame;
|
||||
if (getFlags()->flag_entities_0 || data->doProcessEntity)
|
||||
return;
|
||||
|
||||
if (data->currentFrame > (int16)(data->sequence->count() - 1) || (data->field_4A9 && checkSequenceFromPosition(entityIndex))) {
|
||||
|
||||
if (data->direction == kDirectionLeft) {
|
||||
data->currentFrame = 0;
|
||||
} else {
|
||||
keepPreviousFrame = true;
|
||||
drawNextSequence(entityIndex);
|
||||
|
||||
if (getFlags()->flag_entities_0 || data->doProcessEntity)
|
||||
return;
|
||||
|
||||
if (!data->sequence2) {
|
||||
updateEntityPosition(entityIndex);
|
||||
data->doProcessEntity = false;
|
||||
return;
|
||||
}
|
||||
|
||||
copySequenceData(entityIndex);
|
||||
if (!data->sequence2) {
|
||||
updateEntityPosition(entityIndex);
|
||||
data->doProcessEntity = false;
|
||||
return;
|
||||
}
|
||||
|
||||
copySequenceData(entityIndex);
|
||||
}
|
||||
|
||||
processFrame(entityIndex, keepPreviousFrame, false);
|
||||
|
||||
if (getFlags()->flag_entities_0 || data->doProcessEntity)
|
||||
return;
|
||||
}
|
||||
|
||||
processFrame(entityIndex, keepPreviousFrame, false);
|
||||
|
||||
if (getFlags()->flag_entities_0 || data->doProcessEntity)
|
||||
return;
|
||||
} else {
|
||||
++data->field_49B;
|
||||
}
|
||||
|
||||
incrementDirectionCounter(data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user