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

Function DLParser_S2DEX_ObjMoveMem

Source/HLEGraphics/uCodes/Ucode_S2DEX.h:448–473  ·  view source on GitHub ↗

Used for Sprite rotation

Source from the content-addressed store, hash-verified

446//*****************************************************************************
447// Used for Sprite rotation
448void DLParser_S2DEX_ObjMoveMem( MicroCodeCommand command )
449{
450 u32 addr = RDPSegAddr(command.inst.cmd1);
451 u32 index = command.inst.cmd0 & 0xFFFF;
452
453 if( index == 0 ) // Mtx
454 {
455 uObjMtx* mtx = (uObjMtx *)(addr+g_pu8RamBase);
456 mat2D.A = mtx->A/65536.0f;
457 mat2D.B = mtx->B/65536.0f;
458 mat2D.C = mtx->C/65536.0f;
459 mat2D.D = mtx->D/65536.0f;
460 mat2D.X = f32(mtx->X>>2);
461 mat2D.Y = f32(mtx->Y>>2);
462 mat2D.BaseScaleX = mtx->BaseScaleX/1024.0f;
463 mat2D.BaseScaleY = mtx->BaseScaleY/1024.0f;
464 }
465 else if( index == 2 ) // Sub Mtx
466 {
467 uObjSubMtx* sub = (uObjSubMtx*)(addr+g_pu8RamBase);
468 mat2D.X = f32(sub->X>>2);
469 mat2D.Y = f32(sub->Y>>2);
470 mat2D.BaseScaleX = sub->BaseScaleX/1024.0f;
471 mat2D.BaseScaleY = sub->BaseScaleY/1024.0f;
472 }
473}
474
475//*****************************************************************************
476//

Callers 1

DLParser_GBI2_MoveMemFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected