#include <revolution/mtx.h>
MtxPtr MTXPop ( MtxStack* sPtr );
sPtr |
Pointer to a MtxStack structure whose member stackPtr is to be decreased. |
Returns the new stack pointer (old stack pointer - MTX_PTR_OFFSET) if the old stack pointer was greater than stack base;
otherwise, returns NULL (empty stack).
Decreases sPtr's member stackPtr by one matrix (sPtr->stackPtr -= MTX_PTR_OFFSET), in effect popping it from the stack. The popped matrix's memory is untouched until overwritten by a 'push' call.
If the stack pointer was equal to the stack base, sPtr->stackPtr is set to NULL, indicating an empty stack.
Mtx, MtxPtr, MtxStack, MtxStackPtr, MTXGetStackPtr, MTXPush, MTXPushFwd, MTXPushInv, MTXPushInvXpose
03/01/2006 Initial version.