MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / DLParser_SetScissor

Function DLParser_SetScissor

Source/HLEGraphics/DLParser.cpp:815–842  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

813//
814//*****************************************************************************
815void DLParser_SetScissor( MicroCodeCommand command )
816{
817 // The coords are all in 10:2 fixed point
818 // Set up scissoring zone, we'll use it to scissor other stuff ex Texrect
819 //
820 scissors.left = command.scissor.x0>>2;
821 scissors.top = command.scissor.y0>>2;
822 scissors.right = command.scissor.x1>>2;
823 scissors.bottom = command.scissor.y1>>2;
824
825 // Hack to correct Super Bowling's right and left screens
826 if ( g_ROM.GameHacks == SUPER_BOWLING && g_CI.Address%0x100 != 0 )
827 {
828 scissors.left += 160;
829 scissors.right += 160;
830 v2 vec_trans( 240, 120 );
831 v2 vec_scale( 80, 120 );
832 gRenderer->SetN64Viewport( vec_scale, vec_trans );
833 }
834#ifdef DAEDALUS_DEBUG_DISPLAYLIST
835 DL_PF(" x0=%d y0=%d x1=%d y1=%d mode=%d", scissors.left, scissors.top, scissors.right, scissors.bottom, command.scissor.mode);
836#endif
837 // Set the cliprect now...
838 if ( scissors.left < scissors.right && scissors.top < scissors.bottom )
839 {
840 gRenderer->SetScissor( scissors.left, scissors.top, scissors.right, scissors.bottom );
841 }
842}
843//*****************************************************************************
844//
845//*****************************************************************************

Callers

nothing calls this directly

Calls 2

SetN64ViewportMethod · 0.80
SetScissorMethod · 0.80

Tested by

no test coverage detected