Files
pspsdk/src/gu/sceGuScissor.c
Francisco Javier Trujillo Mata f7fc5117d4 Fixing sceGUScissor
2025-05-18 14:37:34 +02:00

31 lines
837 B
C

/*
* PSP Software Development Kit - https://github.com/pspdev
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* Copyright (c) 2005 Jesper Svennevid
*/
#include "guInternal.h"
void sceGuScissor(int x, int y, int w, int h)
{
GuContext *context = &gu_contexts[gu_curr_context];
context->scissor_start[0] = x;
context->scissor_start[1] = y;
context->scissor_end[0] = x + w - 1;
context->scissor_end[1] = y +h - 1;
if (context->scissor_enable)
{
int orig = (context->scissor_start[1] << 10) | context->scissor_start[0];
int end = (context->scissor_end[1] << 10) | context->scissor_end[0];
sendCommandi(SCISSOR1, orig);
sendCommandi(SCISSOR2, end);
sendCommandi(REGION1, orig);
sendCommandi(REGION2, end);
}
}