void MatrixStackPopMatrix (s32 *mtxCurr, MatrixStack *stack, int size) { //printf("Pop %i pos %i (change %d)\n", stack->type, stack->position, -size); MatrixStackSetStackPosition(stack, -size); if ((stack->type == 0) || (stack->type == 3)) MatrixCopy (mtxCurr, &stack->matrix[0]); else MatrixCopy (mtxCurr, &stack->matrix[stack->position*16]); }
void MatrixStackPushMatrix (MatrixStack *stack, const s32 *ptr) { //printf("Push %i pos %i\n", stack->type, stack->position); if ((stack->type == 0) || (stack->type == 3)) MatrixCopy (&stack->matrix[0], ptr); else MatrixCopy (&stack->matrix[stack->position*16], ptr); MatrixStackSetStackPosition (stack, 1); }
float * MatrixStackPopMatrix (MatrixStack *stack, int size) { MatrixStackSetStackPosition(stack, -size); return &stack->matrix[stack->position*16]; }
void MatrixStackPushMatrix (MatrixStack *stack, const float *ptr) { MatrixCopy (&stack->matrix[stack->position*16], ptr); MatrixStackSetStackPosition (stack, 1); }