This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
primitive_getter = { | |
'float32' : lambda int address: (<float*>address)[0], | |
'float64' : lambda int address: (<double*>address)[0], | |
'int8' : lambda int address: (<int8_t*>address)[0], | |
'int16' : lambda int address: (<int16_t*>address)[0], | |
'int32' : lambda int address: (<int32_t*>address)[0], | |
'int64' : lambda int address: (<int64_t*>address)[0], | |
'uint8' : lambda int address: (<uint8_t*>address)[0], | |
'uint16' : lambda int address: (<uint16_t*>address)[0], | |
'uint32' : lambda int address: (<uint32_t*>address)[0], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
primitive_getter = { | |
'float32' : lambda int address: (<float*>address)[0], | |
'float64' : lambda int address: (<double*>address)[0], | |
'int8' : lambda int address: (<int8_t*>address)[0], | |
'int16' : lambda int address: (<int16_t*>address)[0], | |
'int32' : lambda int address: (<int32_t*>address)[0], | |
'int64' : lambda int address: (<int64_t*>address)[0], | |
'uint8' : lambda int address: (<uint8_t*>address)[0], | |
'uint16' : lambda int address: (<uint16_t*>address)[0], | |
'uint32' : lambda int address: (<uint32_t*>address)[0], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def g_float32(int address): return (<float*>address)[0] | |
def g_float64(int address): return (<double*>address)[0] | |
def g_int8(int address): return (<int8_t*>address)[0] | |
def g_int16(int address): return (<int16_t*>address)[0] | |
def g_int32(int address): return (<int32_t*>address)[0] | |
def g_int64(int address): return (<int64_t*>address)[0] | |
def g_uint8(int address): return (<uint8_t*>address)[0] | |
def g_uint16(int address): return (<uint16_t*>address)[0] | |
def g_uint32(int address): return (<uint32_t*>address)[0] | |
def g_uint64(int address): return (<uint64_t*>address)[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename T, typename P> | |
void ZGSearchWithFunctionHelperDirect( | |
T *searchValue, | |
bool (*comparisonFunction)(ZGSearchData *, T *, T *), | |
ZGSearchData * __unsafe_unretained searchData, | |
ZGMemorySize dataIndex, | |
ZGMemorySize dataSize, | |
ZGMemorySize dataAlignment, | |
ZGMemorySize endLimit, | |
P pointerSize, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename T, typename P> | |
void ZGSearchWithFunctionHelperRegular( | |
T *searchValue, | |
bool (*comparisonFunction)(ZGSearchData *, T *, T *), | |
ZGSearchData * __unsafe_unretained searchData, | |
ZGMemorySize dataIndex, | |
ZGMemorySize dataAlignment, | |
ZGMemorySize endLimit, | |
P pointerSize, | |
NSMutableData * __unsafe_unretained resultSet, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<DockPanel Grid.Row="1"> | |
<Menu DockPanel.Dock="Top" | |
IsMainMenu="True" | |
SnapsToDevicePixels="True" | |
Margin="2,0,0,0"> | |
<MenuItem Header="_File" > | |
<MenuItem Header="_Open Map" Click="Open_Click" /> | |
<MenuItem Header="_Open From Memory" Click="OpenFromMemory_Click" /> | |
<MenuItem Header="_Exit" Click="Exit_Click"/> | |
</MenuItem> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Window.Template> | |
<ControlTemplate TargetType="{x:Type Controls:MetroWindow}"> | |
<Grid Background="{TemplateBinding Background}"> | |
<AdornerDecorator> | |
<ContentControl IsTabStop="False" FocusVisualStyle="{x:Null}"> | |
<Grid> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto"/> | |
<RowDefinition Height="*"/> | |
</Grid.RowDefinitions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin name="obje"> | |
<reference name="model" offset="0x28" /> | |
<reference name="animation" offset="0x38" /> | |
<reference name="collision" offset="0x70" /> | |
<reference name="physics" offset="0x80" /> | |
</plugin> | |
<plugin name="weap" parent="obje" struct_size="0x504"> | |
<reflexive name="magazines" offset="0x4F0" struct_size='112'> | |
<uint16 name="rounds_recharged" offset="0x4" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class obje(HaloStruct): | |
model = reference(offset=0x28) | |
animation = reference(offset=0x38) | |
collision = reference(offset=0x70) | |
physics = reference(offset=0x80) | |
class weap(obje): | |
magazines = reflexive[offset=0x4F0, size=112, | |
rounds_recharged = uint16(offset=0x4) | |
rounds_total_initial = uint16(offset=0x6) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dictionary layouts, with inheritance | |
obje = HaloStruct(layout={ | |
'model': reference(offset=0x28), | |
'animation': reference(offset=0x38), | |
'collision': reference(offset=0x70), | |
'physics': reference(offset=0x80), | |
}) | |
weap = HaloStruct(parent=obje, layout={ |