mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 05:48:40 +00:00
delete raddbg layer duplicative ctrl entity kinds / related code; we are now fully moved onto the ctrl system for ctrl entities
This commit is contained in:
@@ -1687,72 +1687,6 @@ rd_entity_from_id(RD_EntityID id)
|
||||
return result;
|
||||
}
|
||||
|
||||
internal RD_Entity *
|
||||
rd_machine_entity_from_machine_id(CTRL_MachineID machine_id)
|
||||
{
|
||||
RD_Entity *result = &d_nil_entity;
|
||||
for(RD_Entity *e = rd_entity_root();
|
||||
!rd_entity_is_nil(e);
|
||||
e = rd_entity_rec_depth_first_pre(e, &d_nil_entity).next)
|
||||
{
|
||||
if(e->kind == RD_EntityKind_Machine && e->ctrl_handle.machine_id == machine_id)
|
||||
{
|
||||
result = e;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(rd_entity_is_nil(result))
|
||||
{
|
||||
result = rd_entity_alloc(rd_entity_root(), RD_EntityKind_Machine);
|
||||
rd_entity_equip_ctrl_handle(result, ctrl_handle_make(machine_id, dmn_handle_zero()));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
internal RD_Entity *
|
||||
rd_entity_from_ctrl_handle(CTRL_Handle handle)
|
||||
{
|
||||
RD_Entity *result = &d_nil_entity;
|
||||
if(handle.machine_id != 0 || handle.dmn_handle.u64[0] != 0)
|
||||
{
|
||||
for(RD_Entity *e = rd_entity_root();
|
||||
!rd_entity_is_nil(e);
|
||||
e = rd_entity_rec_depth_first_pre(e, &d_nil_entity).next)
|
||||
{
|
||||
if(e->flags & RD_EntityFlag_HasCtrlHandle &&
|
||||
ctrl_handle_match(e->ctrl_handle, handle))
|
||||
{
|
||||
result = e;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
internal RD_Entity *
|
||||
rd_entity_from_ctrl_id(CTRL_MachineID machine_id, U32 id)
|
||||
{
|
||||
RD_Entity *result = &d_nil_entity;
|
||||
if(id != 0)
|
||||
{
|
||||
for(RD_Entity *e = rd_entity_root();
|
||||
!rd_entity_is_nil(e);
|
||||
e = rd_entity_rec_depth_first_pre(e, &d_nil_entity).next)
|
||||
{
|
||||
if(e->flags & RD_EntityFlag_HasCtrlHandle &&
|
||||
e->flags & RD_EntityFlag_HasCtrlID &&
|
||||
e->ctrl_handle.machine_id == machine_id &&
|
||||
e->ctrl_id == id)
|
||||
{
|
||||
result = e;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
internal RD_Entity *
|
||||
rd_entity_from_name_and_kind(String8 string, RD_EntityKind kind)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user