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