natvis: basic handle view - see #1052
This commit is contained in:
@@ -144,6 +144,34 @@
|
||||
<Item Name="[filter]">filter,na</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="entt::basic_handle<*>">
|
||||
<Intrinsic Name="pool_at" Expression="owner->pools.packed.first_base::value[index].element.second._Ptr">
|
||||
<Parameter Name="index" Type="unsigned int"/>
|
||||
</Intrinsic>
|
||||
<DisplayString>{{ entity={ entt } }}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[entity]">entt</Item>
|
||||
<Item Name="[registry]" Condition="owner != nullptr">owner,na</Item>
|
||||
<Synthetic Name="[components]" Condition="owner != nullptr">
|
||||
<Expand>
|
||||
<CustomListItems>
|
||||
<Variable Name="entity_mask" InitialValue="traits_type::entity_mask"/>
|
||||
<Variable Name="page" InitialValue="((*((traits_type::entity_type *)&entt)) & entity_mask) / traits_type::page_size"/>
|
||||
<Variable Name="offset" InitialValue="(*((traits_type::entity_type *)&entt)) & (traits_type::page_size - 1u)"/>
|
||||
<Variable Name="last" InitialValue="owner->pools.packed.first_base::value.size()"/>
|
||||
<Variable Name="pos" InitialValue="0u"/>
|
||||
<Loop>
|
||||
<Break Condition="pos == last"/>
|
||||
<If Condition="pool_at(pos)->sparse.size() > page && pool_at(pos)->sparse[page] != nullptr && ((*((traits_type::entity_type *)&pool_at(pos)->sparse[page][offset])) & entity_mask) != entity_mask">
|
||||
<Item Name="[{ pool_at(pos)->info->alias,na }:{ ((*((traits_type::entity_type *)&pool_at(pos)->sparse[page][offset])) & entity_mask) != entity_mask }]">pool_at(pos),view(simple)nanr</Item>
|
||||
</If>
|
||||
<Exec>++pos</Exec>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Synthetic>
|
||||
</Expand>
|
||||
</Type>
|
||||
<Type Name="entt::null_t">
|
||||
<DisplayString><null></DisplayString>
|
||||
</Type>
|
||||
|
||||
Reference in New Issue
Block a user