| 369 | } |
| 370 | |
| 371 | void PathCamera::pushFront(CameraSpline::Knot *knot) |
| 372 | { |
| 373 | // Make room at the front |
| 374 | if (mNodeCount == NodeWindow) |
| 375 | delete mSpline.remove(mSpline.getKnot(mNodeCount)); |
| 376 | else |
| 377 | mNodeCount++; |
| 378 | mNodeBase--; |
| 379 | |
| 380 | // Fill in the new node |
| 381 | mSpline.push_front(knot); |
| 382 | setMaskBits(WindowMask); |
| 383 | |
| 384 | // Make sure the position doesn't fall off |
| 385 | if (mPosition > F32(mNodeBase + (NodeWindow - 1))) |
| 386 | { |
| 387 | mPosition = F32(mNodeBase + (NodeWindow - 1)); |
| 388 | setMaskBits(PositionMask); |
| 389 | } |
| 390 | } |
| 391 | |
| 392 | void PathCamera::popFront() |
| 393 | { |
no test coverage detected