TWINE: finished splitting type and index

This commit is contained in:
Martin Gerhardy 2020-12-13 13:20:12 +01:00
parent cef7d733f1
commit 6c337d5488
2 changed files with 7 additions and 7 deletions

View File

@ -276,13 +276,13 @@ void Redraw::redrawEngineActions(bool bgRedraw) { // fullRedraw
if (actor->staticFlags.bIsSpriteActor) {
drawList[drawListPos].type = 0x1000;
drawList[drawListPos].index = 0x1000 + modelActorPos;
drawList[drawListPos].actorIdx = modelActorPos;
if (actor->staticFlags.bUsesClipping) {
tmpVal = actor->lastX - _engine->_grid->cameraX + actor->lastZ - _engine->_grid->cameraZ;
}
} else {
drawList[drawListPos].type = 0;
drawList[drawListPos].index = modelActorPos;
drawList[drawListPos].actorIdx = modelActorPos;
}
drawList[drawListPos].posValue = tmpVal;
@ -302,7 +302,7 @@ void Redraw::redrawEngineActions(bool bgRedraw) { // fullRedraw
tmpVal--;
drawList[drawListPos].posValue = tmpVal; // save the shadow entry in the drawList
drawList[drawListPos].type = 0xC00; // shadowActorPos
drawList[drawListPos].index = 0xC00;
drawList[drawListPos].actorIdx = 0;
drawList[drawListPos].x = _engine->_actor->shadowX;
drawList[drawListPos].y = _engine->_actor->shadowY;
drawList[drawListPos].z = _engine->_actor->shadowZ;
@ -331,7 +331,7 @@ void Redraw::redrawEngineActions(bool bgRedraw) { // fullRedraw
if (_engine->_renderer->projPosX > -50 && _engine->_renderer->projPosX < 680 && _engine->_renderer->projPosY > -30 && _engine->_renderer->projPosY < 580) {
drawList[drawListPos].posValue = extra->x - _engine->_grid->cameraX + extra->z - _engine->_grid->cameraZ;
drawList[drawListPos].index = 0x1800 + i;
drawList[drawListPos].actorIdx = i;
drawList[drawListPos].type = 0x1800;
drawListPos++;
@ -339,7 +339,7 @@ void Redraw::redrawEngineActions(bool bgRedraw) { // fullRedraw
_engine->_movements->getShadowPosition(extra->x, extra->y, extra->z);
drawList[drawListPos].posValue = extra->x - _engine->_grid->cameraX + extra->z - _engine->_grid->cameraZ - 1;
drawList[drawListPos].index = 0xC00;
drawList[drawListPos].actorIdx = 0;
drawList[drawListPos].type = 0xC00;
drawList[drawListPos].x = _engine->_actor->shadowX;
drawList[drawListPos].y = _engine->_actor->shadowY;
@ -359,7 +359,7 @@ void Redraw::redrawEngineActions(bool bgRedraw) { // fullRedraw
int32 pos = 0;
do {
int32 actorIdx = drawList[pos].index & 0x3FF;
int32 actorIdx = drawList[pos].actorIdx;
ActorStruct *actor2 = _engine->_scene->getActor(actorIdx);
const uint32 flags = drawList[pos].type;

View File

@ -61,7 +61,7 @@ private:
struct DrawListStruct {
int16 posValue = 0;
uint32 type = 0;
uint16 index = 0; // field_2
uint16 actorIdx = 0;
uint16 x = 0;
uint16 y = 0;
uint16 z = 0;