141 lines
5 KiB
XML
141 lines
5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<!--
|
|
Debug visualizers for a few common ScummVM types for Visual Studio 2012 and up.
|
|
|
|
To use, copy this file into Documents\Visual Studio 20xx\Visualizers.
|
|
-->
|
|
|
|
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
|
<UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" MenuName="Add to Image Watch"/>
|
|
|
|
<Type Name="Graphics::Surface">
|
|
<UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" />
|
|
</Type>
|
|
|
|
<Type Name="Graphics::Surface">
|
|
<Expand>
|
|
<Synthetic Name="[type]">
|
|
<DisplayString>UINT8</DisplayString>
|
|
</Synthetic>
|
|
<Item Name="[channels]" Condition="format.bytesPerPixel==1">1</Item>
|
|
<Item Name="[channels]" Condition="format.bytesPerPixel==2">2</Item>
|
|
<Synthetic Name="[channels]" Condition="format.bytesPerPixel==3">
|
|
<DisplayString>RGB</DisplayString>
|
|
</Synthetic>
|
|
<Synthetic Name="[channels]" Condition="format.bytesPerPixel==4">
|
|
<DisplayString>RGBA</DisplayString>
|
|
</Synthetic>
|
|
<Item Name="[width]">w</Item>
|
|
<Item Name="[height]">h</Item>
|
|
<Item Name="[stride]">pitch</Item>
|
|
<Item Name="[data]">pixels</Item>
|
|
</Expand>
|
|
</Type>
|
|
|
|
<Type Name="Common::Array<*>">
|
|
<DisplayString>{{ size={_size} }}</DisplayString>
|
|
<Expand>
|
|
<Item Name="[size]">_size</Item>
|
|
<Item Name="[capacity]">_capacity</Item>
|
|
<ArrayItems>
|
|
<Size>_size</Size>
|
|
<ValuePointer>_storage</ValuePointer>
|
|
</ArrayItems>
|
|
</Expand>
|
|
</Type>
|
|
|
|
<Type Name="Common::HashMap<*,*,*,*>">
|
|
<DisplayString>{{ size={_size} }}</DisplayString>
|
|
<Expand>
|
|
<Item Name="[size]">_size</Item>
|
|
<Item Name="[capacity]">_mask + 1</Item>
|
|
<Item Name="[deleted]">_deleted</Item>
|
|
<CustomListItems MaxItemsPerView="5000" ExcludeView="Test">
|
|
<Variable Name="ctr" InitialValue="0" />
|
|
<Size>_size</Size>
|
|
<Loop>
|
|
<Break Condition="ctr > _mask" />
|
|
<Item Condition="_storage[ctr] > 1" Name="[{_storage[ctr]->_key}]">*_storage[ctr],view(MapHelper)</Item>
|
|
<Exec>ctr++</Exec>
|
|
</Loop>
|
|
</CustomListItems>
|
|
</Expand>
|
|
</Type>
|
|
|
|
<Type Name="Common::HashMap<*,*,*,*>::Node" IncludeView="MapHelper">
|
|
<DisplayString>{_value}</DisplayString>
|
|
</Type>
|
|
|
|
<Type Name="Common::HashMap<*,*,*,*>::IteratorImpl<*>">
|
|
<DisplayString>{_hashmap->_storage[_idx],na}</DisplayString>
|
|
<Expand>
|
|
<Item Name="[ptr]">_hashmap->_storage[_idx]</Item>
|
|
</Expand>
|
|
</Type>
|
|
|
|
<Type Name="Common::List<*>">
|
|
<DisplayString Condition="&_anchor == _anchor._next">{{ empty }}</DisplayString>
|
|
<DisplayString Condition="&_anchor != _anchor._next">{{ non-empty }}</DisplayString>
|
|
<Expand>
|
|
<CustomListItems Condition="&_anchor != _anchor._next">
|
|
<Variable Name="head" InitialValue="&_anchor"/>
|
|
<Variable Name="iter" InitialValue="_anchor._next"/>
|
|
<Loop>
|
|
<Break Condition="iter == head"/>
|
|
<Item>((Common::ListInternal::Node<$T1>*)iter)->_data</Item>
|
|
<Exec>iter = iter->_next</Exec>
|
|
</Loop>
|
|
</CustomListItems>
|
|
</Expand>
|
|
</Type>
|
|
|
|
<Type Name="Common::ListInternal::Node<*>">
|
|
<DisplayString>{_data}</DisplayString>
|
|
</Type>
|
|
|
|
<Type Name="Common::ListInternal::Iterator<*>">
|
|
<AlternativeType Name="Common::ListInternal::ConstIterator<*>" />
|
|
<DisplayString>{((Common::ListInternal::Node<$T1>*)_node)->_data}</DisplayString>
|
|
<Expand>
|
|
<Item Name="[ptr]">((Common::ListInternal::Node<$T1>*)_node)->_data</Item>
|
|
</Expand>
|
|
</Type>
|
|
|
|
<Type Name="Common::String">
|
|
<DisplayString>{_str,na}</DisplayString>
|
|
<StringView>_str,na</StringView>
|
|
<Expand>
|
|
<Item Name="[size]">_size</Item>
|
|
<Item Condition="_str != _storage" Name="[capacity]">_extern._capacity</Item>
|
|
<Item Condition="_str != _storage && _extern._refCount != 0" Name="[refCount]">*_extern._refCount</Item>
|
|
<ArrayItems>
|
|
<Size>_size</Size>
|
|
<ValuePointer>_str</ValuePointer>
|
|
</ArrayItems>
|
|
</Expand>
|
|
</Type>
|
|
|
|
<Type Name="Common::U32String">
|
|
<DisplayString>{_str,s32}</DisplayString>
|
|
<StringView>_str,s32</StringView>
|
|
<Expand>
|
|
<Item Name="[size]">_size</Item>
|
|
<Item Condition="_str != _storage" Name="[capacity]">_extern._capacity</Item>
|
|
<Item Condition="_str != _storage && _extern._refCount != 0" Name="[refCount]">*_extern._refCount</Item>
|
|
<ArrayItems>
|
|
<Size>_size</Size>
|
|
<ValuePointer>_str</ValuePointer>
|
|
</ArrayItems>
|
|
</Expand>
|
|
</Type>
|
|
|
|
<Type Name="Common::SharedPtr<*>">
|
|
<DisplayString Condition="_pointer == 0">nullptr</DisplayString>
|
|
<DisplayString Condition="_pointer != 0">{*_pointer}</DisplayString>
|
|
<Expand>
|
|
<Item Condition="_pointer != 0" Name="[ptr]">_pointer</Item>
|
|
<Item Condition="_refCount != 0" Name="[refCount]">*_refCount</Item>
|
|
</Expand>
|
|
</Type>
|
|
</AutoVisualizer>
|