diff options
Diffstat (limited to 'engines/hugo/object_v1w.cpp')
-rw-r--r-- | engines/hugo/object_v1w.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/engines/hugo/object_v1w.cpp b/engines/hugo/object_v1w.cpp index dd3de5fe40..e1e8496d9d 100644 --- a/engines/hugo/object_v1w.cpp +++ b/engines/hugo/object_v1w.cpp @@ -59,21 +59,21 @@ void ObjectHandler_v1w::updateImages() { debugC(5, kDebugObject, "updateImages"); // Initialize the index array to visible objects in current screen - int num_objs = 0; + int objNumb = 0; byte objindex[kMaxObjNumb]; // Array of indeces to objects for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; + Object *obj = &_objects[i]; if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling >= kCycleAlmostInvisible)) - objindex[num_objs++] = i; + objindex[objNumb++] = i; } // Sort the objects into increasing y+y2 (painter's algorithm) - qsort(objindex, num_objs, sizeof(objindex[0]), y2comp); + qsort(objindex, objNumb, sizeof(objindex[0]), y2comp); // Add each visible object to display list - for (int i = 0; i < num_objs; i++) { - object_t *obj = &_objects[objindex[i]]; + for (int i = 0; i < objNumb; i++) { + Object *obj = &_objects[objindex[i]]; // Count down inter-frame timer if (obj->_frameTimer) obj->_frameTimer--; @@ -90,7 +90,7 @@ void ObjectHandler_v1w::updateImages() { _vm->_screen->displayFrame(obj->_x, obj->_y, obj->_currImagePtr->_nextSeqPtr, obj->_priority == kPriorityOverOverlay); break; case kCycleBackward: { - seq_t *seqPtr = obj->_currImagePtr; + Seq *seqPtr = obj->_currImagePtr; if (!obj->_frameTimer) { // Show next frame while (seqPtr->_nextSeqPtr != obj->_currImagePtr) seqPtr = seqPtr->_nextSeqPtr; @@ -105,8 +105,8 @@ void ObjectHandler_v1w::updateImages() { } // Cycle any animating objects - for (int i = 0; i < num_objs; i++) { - object_t *obj = &_objects[objindex[i]]; + for (int i = 0; i < objNumb; i++) { + Object *obj = &_objects[objindex[i]]; if (obj->_cycling != kCycleInvisible) { // Only if it's visible if (obj->_cycling == kCycleAlmostInvisible) @@ -138,7 +138,7 @@ void ObjectHandler_v1w::updateImages() { case kCycleBackward: { if (!obj->_frameTimer) { // Time to step to prev frame - seq_t *seqPtr = obj->_currImagePtr; + Seq *seqPtr = obj->_currImagePtr; while (obj->_currImagePtr->_nextSeqPtr != seqPtr) obj->_currImagePtr = obj->_currImagePtr->_nextSeqPtr; // Find out if this is first frame of sequence @@ -180,8 +180,8 @@ void ObjectHandler_v1w::moveObjects() { // and store all (visible) object baselines into the boundary file. // Don't store foreground or background objects for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + Object *obj = &_objects[i]; // Get pointer to object + Seq *currImage = obj->_currImagePtr; // Get ptr to current image if (obj->_screenIndex == *_vm->_screen_p) { switch (obj->_pathType) { case kPathChase: @@ -281,13 +281,13 @@ void ObjectHandler_v1w::moveObjects() { // Move objects, allowing for boundaries for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; // Get pointer to object + Object *obj = &_objects[i]; // Get pointer to object if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_vx || obj->_vy)) { // Only process if it's moving // Do object movement. Delta_x,y return allowed movement in x,y // to move as close to a boundary as possible without crossing it. - seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + Seq *currImage = obj->_currImagePtr; // Get ptr to current image // object coordinates int x1 = obj->_x + currImage->_x1; // Left edge of object int x2 = obj->_x + currImage->_x2; // Right edge @@ -335,15 +335,15 @@ void ObjectHandler_v1w::moveObjects() { // Clear all object baselines from the boundary file. for (int i = 0; i < _numObj; i++) { - object_t *obj = &_objects[i]; // Get pointer to object - seq_t *currImage = obj->_currImagePtr; // Get ptr to current image + Object *obj = &_objects[i]; // Get pointer to object + Seq *currImage = obj->_currImagePtr; // Get ptr to current image if ((obj->_screenIndex == *_vm->_screen_p) && (obj->_cycling > kCycleAlmostInvisible) && (obj->_priority == kPriorityFloating)) clearBoundary(obj->_oldx + currImage->_x1, obj->_oldx + currImage->_x2, obj->_oldy + currImage->_y2); } // If maze mode is enabled, do special maze processing if (_vm->_maze._enabledFl) { - seq_t *currImage = _vm->_hero->_currImagePtr; // Get ptr to current image + Seq *currImage = _vm->_hero->_currImagePtr; // Get ptr to current image // hero coordinates int x1 = _vm->_hero->_x + currImage->_x1; // Left edge of object int x2 = _vm->_hero->_x + currImage->_x2; // Right edge @@ -364,8 +364,8 @@ void ObjectHandler_v1w::swapImages(int objIndex1, int objIndex2) { saveSeq(&_objects[objIndex1]); - seqList_t tmpSeqList[kMaxSeqNumb]; - int seqListSize = sizeof(seqList_t) * kMaxSeqNumb; + SeqList tmpSeqList[kMaxSeqNumb]; + int seqListSize = sizeof(SeqList) * kMaxSeqNumb; memmove(tmpSeqList, _objects[objIndex1]._seqList, seqListSize); memmove(_objects[objIndex1]._seqList, _objects[objIndex2]._seqList, seqListSize); |