diff options
Diffstat (limited to 'engines/mohawk/view.cpp')
-rw-r--r-- | engines/mohawk/view.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/engines/mohawk/view.cpp b/engines/mohawk/view.cpp index 70d20270a5..ec73723971 100644 --- a/engines/mohawk/view.cpp +++ b/engines/mohawk/view.cpp @@ -63,10 +63,10 @@ void Feature::setNodeDefaults(Feature *prev, Feature *next) { _prev = prev; _next = next; - _moveProc = NULL; - _drawProc = NULL; - _doneProc = NULL; - _frameProc = NULL; + _moveProc = nullptr; + _drawProc = nullptr; + _doneProc = nullptr; + _frameProc = nullptr; _data.bounds = Common::Rect(); _data.clipRect = Common::Rect(); @@ -333,7 +333,7 @@ void NewFeature::finishResetFeatureScript() { } View::View(MohawkEngine *vm) : _vm(vm) { - _currentModule = NULL; + _currentModule = nullptr; _backgroundId = 0xffff; @@ -393,7 +393,7 @@ void View::setModule(Module *module) { delete _currentModule; } - _currentModule = NULL; + _currentModule = nullptr; if (module) { _currentModule = module; @@ -572,7 +572,7 @@ Feature *View::getFeaturePtr(uint16 id) { return node; } - return NULL; + return nullptr; } uint16 View::getNewFeatureId() { @@ -591,8 +591,8 @@ void View::removeFeature(Feature *feature, bool free) { feature->_prev->_next = feature->_next; feature->_next->_prev = feature->_prev; - feature->_next = NULL; - feature->_prev = NULL; + feature->_next = nullptr; + feature->_prev = nullptr; if (free) delete feature; @@ -619,21 +619,21 @@ Feature *View::pointOnFeature(bool topdown, uint32 flags, Common::Point pos) { else curr = curr->_next; } - return NULL; + return nullptr; } void View::sortView() { Feature *base = _rootNode; Feature *next = base->_next; - Feature *otherRoot = NULL; - Feature *otherBase = NULL; - Feature *objectRoot = NULL; - Feature *objectBase = NULL; - Feature *staticRoot = NULL; - Feature *staticBase = NULL; + Feature *otherRoot = nullptr; + Feature *otherBase = nullptr; + Feature *objectRoot = nullptr; + Feature *objectBase = nullptr; + Feature *staticRoot = nullptr; + Feature *staticBase = nullptr; // Remove all features. - base->_next = NULL; + base->_next = nullptr; // Iterate through all the previous features, placing them in the appropriate list. while (next) { @@ -645,33 +645,33 @@ void View::sortView() { // so we insert this node directly after the current base. base->_next = curr; curr->_prev = base; - curr->_next = NULL; + curr->_next = nullptr; base = base->_next; } else if (curr->_flags & kFeatureSortStatic) { // Insert this node into the list of static objects. if (staticBase) { staticBase->_next = curr; curr->_prev = staticBase; - curr->_next = NULL; + curr->_next = nullptr; staticBase = curr; } else { staticBase = curr; staticRoot = curr; - curr->_prev = NULL; - curr->_next = NULL; + curr->_prev = nullptr; + curr->_next = nullptr; } } else if (curr->_flags & kFeatureObjectMask) { // This is == 1 or == 2 in old code. // Insert this node into the list of objects. if (objectRoot) { objectBase->_next = curr; curr->_prev = objectBase; - curr->_next = NULL; + curr->_next = nullptr; objectBase = curr; } else { objectBase = curr; objectRoot = curr; - curr->_prev = NULL; - curr->_next = NULL; + curr->_prev = nullptr; + curr->_next = nullptr; } } else { if (!(curr->_flags & kFeatureOldSortForeground)) @@ -681,13 +681,13 @@ void View::sortView() { if (otherRoot) { otherBase->_next = curr; curr->_prev = otherBase; - curr->_next = NULL; + curr->_next = nullptr; otherBase = curr; } else { otherBase = curr; otherRoot = curr; - curr->_prev = NULL; - curr->_next = NULL; + curr->_prev = nullptr; + curr->_next = nullptr; } } } @@ -700,7 +700,7 @@ void View::sortView() { base->_next = prev; prev->_prev = base; base = base->_next; - base->_next = NULL; + base->_next = nullptr; } // Add the other features on top.. @@ -711,12 +711,12 @@ void View::sortView() { Feature *View::sortOneList(Feature *root) { if (!root) - return NULL; + return nullptr; // Save the next feature and then clear the list. Feature *curr = root->_next; - root->_next = NULL; - root->_prev = NULL; + root->_next = nullptr; + root->_prev = nullptr; // Iterate over all the features. while (curr) { @@ -735,7 +735,7 @@ Feature *View::sortOneList(Feature *root) { // This is the end of the list: add ourselves there. check->_next = prev; prev->_prev = check; - prev->_next = NULL; + prev->_next = nullptr; break; } } else { @@ -779,7 +779,7 @@ Feature *View::mergeLists(Feature *root, Feature *mergeRoot) { check = check->_next; check->_next = prev; prev->_prev = check; - prev->_next = NULL; + prev->_next = nullptr; continue; } @@ -802,7 +802,7 @@ Feature *View::mergeLists(Feature *root, Feature *mergeRoot) { // We're at the end of the list, so we have to go here. check->_next = prev; prev->_prev = check; - prev->_next = NULL; + prev->_next = nullptr; base = prev; break; } |