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

Function RDP_MoveMemLight

Source/HLEGraphics/DLParser.cpp:655–684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

653//
654//*****************************************************************************
655void RDP_MoveMemLight(u32 light_idx, const N64Light *light)
656{
657 #ifdef DAEDALUS_ENABLE_ASSERTS
658 DAEDALUS_ASSERT( light_idx < 12, "Warning: invalid light # = %d", light_idx );
659 #endif
660 u8 r {light->r};
661 u8 g {light->g};
662 u8 b {light->b};
663
664 s8 dir_x {light->dir_x};
665 s8 dir_y {light->dir_y};
666 s8 dir_z {light->dir_z};
667
668 bool valid = (dir_x | dir_y | dir_z) != 0;
669 #ifdef DAEDALUS_ENABLE_ASSERTS
670 DAEDALUS_USE(valid);
671
672 DAEDALUS_ASSERT( valid, " Light direction is invalid" );
673 #endif
674#ifdef DAEDALUS_DEBUG_DISPLAYLIST
675 DL_PF(" Light[%d] RGB[%d, %d, %d] x[%d] y[%d] z[%d]", light_idx, r, g, b, dir_x, dir_y, dir_z);
676 DL_PF(" Light direction is %s",valid ? "valid" : "invalid");
677#endif
678
679 //Light color
680 gRenderer->SetLightCol( light_idx, r, g, b );
681
682 //Direction
683 gRenderer->SetLightDirection( light_idx, dir_x, dir_y, dir_z );
684}
685
686//*****************************************************************************
687//

Callers 6

DLParser_GBI1_MoveMemFunction · 0.85
DLParser_GBI2_MoveMemFunction · 0.85
DLParser_MoveMem_ConkerFunction · 0.85
DLParser_GBI1_MoveMemFunction · 0.85
DLParser_GBI2_MoveMemFunction · 0.85
DLParser_MoveMem_ConkerFunction · 0.85

Calls 2

SetLightColMethod · 0.80
SetLightDirectionMethod · 0.80

Tested by

no test coverage detected