mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
Implement/match PickEntity (#1153)
* Implement/match PickEntity * Rename function
This commit is contained in:

committed by
GitHub

parent
62f09570b0
commit
93c640a45f
@@ -36,20 +36,20 @@
|
||||
|
||||
// FUNCTION: LEGO1 0x1003dd70
|
||||
// FUNCTION: BETA10 0x100d3410
|
||||
LegoROI* PickROI(MxLong p_a, MxLong p_b)
|
||||
LegoROI* PickROI(MxLong p_x, MxLong p_y)
|
||||
{
|
||||
LegoVideoManager* videoManager = VideoManager();
|
||||
Lego3DView* view = videoManager->Get3DManager()->GetLego3DView();
|
||||
return (LegoROI*) view->Pick(p_a, p_b);
|
||||
return (LegoROI*) view->Pick(p_x, p_y);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003dd90
|
||||
// FUNCTION: BETA10 0x100d3449
|
||||
LegoROI* PickParentROI(MxLong p_a, MxLong p_b)
|
||||
LegoROI* PickRootROI(MxLong p_x, MxLong p_y)
|
||||
{
|
||||
LegoVideoManager* videoManager = VideoManager();
|
||||
Lego3DView* view = videoManager->Get3DManager()->GetLego3DView();
|
||||
LegoROI* roi = (LegoROI*) view->Pick(p_a, p_b);
|
||||
LegoROI* roi = (LegoROI*) view->Pick(p_x, p_y);
|
||||
|
||||
while (roi != NULL && roi->GetParentROI() != NULL) {
|
||||
roi = (LegoROI*) roi->GetParentROI();
|
||||
@@ -58,11 +58,16 @@ LegoROI* PickParentROI(MxLong p_a, MxLong p_b)
|
||||
return roi;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x1003ddc0
|
||||
LegoEntity* PickEntity(MxLong, MxLong)
|
||||
// FUNCTION: LEGO1 0x1003ddc0
|
||||
LegoEntity* PickEntity(MxLong p_x, MxLong p_y)
|
||||
{
|
||||
// TODO
|
||||
return NULL;
|
||||
LegoROI* roi = PickRootROI(p_x, p_y);
|
||||
|
||||
if (roi == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return roi->GetEntity();
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1003dde0
|
||||
|
Reference in New Issue
Block a user