mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +00:00
JANITORIAL: Fix formatting
This commit is contained in:
parent
1357f1bade
commit
512f1268d7
@ -94,16 +94,11 @@ void PatrolRouteList::setRouteData(PatrolRouteData *data) {
|
|||||||
error("Cannot allocate patrol route list offset array.");
|
error("Cannot allocate patrol route list offset array.");
|
||||||
|
|
||||||
// Iterate through each patrol route a compute its offset
|
// Iterate through each patrol route a compute its offset
|
||||||
for (i = 0, currentRoute = (PatrolRoute *)&routeData[1];
|
for (i = 0, currentRoute = (PatrolRoute *)&routeData[1]; i < noRoutes; i++) {
|
||||||
i < noRoutes;
|
|
||||||
i++,
|
|
||||||
currentRoute =
|
|
||||||
(PatrolRoute *) & (*currentRoute)[currentRoute->vertices()]) {
|
|
||||||
#if DEBUG
|
|
||||||
assert(currentRoute->vertices() > 1);
|
|
||||||
#endif
|
|
||||||
warning("STUB: PatrolRouteList::setRouteData: unsafe arithmetics");
|
warning("STUB: PatrolRouteList::setRouteData: unsafe arithmetics");
|
||||||
offsetArray[i] = 0; // FIXME: It was "currentRoute - routeData";
|
offsetArray[i] = 0; // FIXME: It was "currentRoute - routeData";
|
||||||
|
|
||||||
|
currentRoute = (PatrolRoute *)&(*currentRoute)[currentRoute->vertices()];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,8 +186,7 @@ void PatrolRouteIterator::altIncrement(void) {
|
|||||||
|
|
||||||
vertexNo++;
|
vertexNo++;
|
||||||
|
|
||||||
if (vertexNo >= route.vertices()
|
if (vertexNo >= route.vertices() && (flags & patrolRouteRepeat)) {
|
||||||
&& (flags & patrolRouteRepeat)) {
|
|
||||||
// If repeating, initialize for iteration in the standard
|
// If repeating, initialize for iteration in the standard
|
||||||
// direction, and reset the waypoint index
|
// direction, and reset the waypoint index
|
||||||
flags &= ~patrolRouteInAlternate;
|
flags &= ~patrolRouteInAlternate;
|
||||||
@ -208,8 +202,7 @@ void PatrolRouteIterator::altDecrement(void) {
|
|||||||
|
|
||||||
vertexNo--;
|
vertexNo--;
|
||||||
|
|
||||||
if (vertexNo < 0
|
if (vertexNo < 0 && (flags & patrolRouteRepeat)) {
|
||||||
&& (flags & patrolRouteRepeat)) {
|
|
||||||
// If repeating, initialize for iteration in the standard
|
// If repeating, initialize for iteration in the standard
|
||||||
// direction, and reset the waypoint index
|
// direction, and reset the waypoint index
|
||||||
flags &= ~patrolRouteInAlternate;
|
flags &= ~patrolRouteInAlternate;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user