diff options
-rw-r--r-- | sky/logic.cpp | 10 | ||||
-rw-r--r-- | sky/struc.h | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/sky/logic.cpp b/sky/logic.cpp index 4224fd54bc..6313ccde7e 100644 --- a/sky/logic.cpp +++ b/sky/logic.cpp @@ -144,10 +144,9 @@ void SkyLogic::arAnim() { } void SkyLogic::arTurn() { - _compact->frame = *(uint16 *)(_compact->extCompact->turnProg); - ((uint16 *)(_compact->extCompact->turnProg))++; + _compact->frame = *_compact->extCompact->turnProg++; - if (!*(uint16 *)(_compact->extCompact->turnProg)) { // turn done? + if (!*_compact->extCompact->turnProg) { // turn done? // Back to ar mode _compact->extCompact->arAnimIndex = 0; _compact->logic = L_AR_ANIM; @@ -170,9 +169,8 @@ void SkyLogic::anim() { } void SkyLogic::turn() { - if (*(uint16 *)(_compact->extCompact->turnProg)) { - _compact->frame = *(uint16 *)(_compact->extCompact->turnProg); - ((uint16 *)(_compact->extCompact->turnProg))++; + if (*_compact->extCompact->turnProg) { + _compact->frame = *_compact->extCompact->turnProg++; return; } diff --git a/sky/struc.h b/sky/struc.h index 06c43718f4..80e86e860a 100644 --- a/sky/struc.h +++ b/sky/struc.h @@ -66,7 +66,7 @@ struct ExtCompact { uint16 spTime; uint16 arAnimIndex; - void *turnProg; + uint16 *turnProg; uint16 waitingFor; |