This file contains hidden or 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 hidden or 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 loneid(*, offset): | |
| """ | |
| ____ident____ | |
| | | | |
| | E1 75 01 45 | | |
| |_____________| | |
| """ | |
| def fget(self): | |
| buf = self.access.read_bytes(offset, 4) | |
| ident = read_uint32(<int><char*>buf) |
This file contains hidden or 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
| # Defining a class with a property | |
| class Foo(object): | |
| def __init__(self): | |
| self._bar = 0 | |
| @property | |
| def bar(self): | |
| return self._bar | |
| @bar.setter |
This file contains hidden or 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
| index_entries = [IndexEntry( | |
| FileAccess( | |
| IndexEntry.struct_size * i + index_location, | |
| IndexEntry.struct_size), | |
| map_magic, | |
| halomap) for i in range(index_header.tag_count)] |
This file contains hidden or 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 load_map_common(access_type, map_path=None): | |
| # access_type is either 'file' or 'mem' | |
| halomap = { | |
| 'file': lambda: HaloMap(open(map_path, 'r+b')), | |
| 'mem': lambda: HaloMap(None) | |
| }[access_type]() | |
| # class for reading/writing bytes to a delineated area | |
| ByteAccess = { |
This file contains hidden or 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
| index_entries = [] | |
| for i in range(index_header.tag_count): | |
| ie = IndexEntry( | |
| FileAccess( | |
| IndexEntry.struct_size * i + index_location, | |
| IndexEntry.struct_size), | |
| map_magic, | |
| halomap) | |
| index_entries.append(ie) |
This file contains hidden or 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
| D:\Users\Chad\Downloads> .\cloc-1.60.exe .\open-sauce-0260d0c62a2d | |
| 1980 text files. | |
| 1886 unique files. | |
| 836 files ignored. | |
| http://cloc.sourceforge.net v 1.60 T=4.14 s (373.4 files/s, 91464.7 lines/s) | |
| ------------------------------------------------------------------------------- | |
| Language files blank comment code | |
| ------------------------------------------------------------------------------- | |
| C# 593 19588 33592 117596 |
This file contains hidden or 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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Reflection; | |
| using System.Reflection.Emit; | |
| using System.Runtime.InteropServices; | |
| using System.Text; | |
| namespace DevConsole | |
| { |
This file contains hidden or 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
| #include "stdafx.h" | |
| #include <windows.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #define MEMORY_FIX_OFFSET 0x40440000 | |
| // Ensure correct alignment | |
| #pragma pack(push, 1) |
This file contains hidden or 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
| using System; | |
| using System.Collections.Generic; | |
| using System.Windows; | |
| using System.Windows.Controls; | |
| using Quickbeam.Low; | |
| namespace MetroIde.Controls.MetaEditor | |
| { | |
| public class FieldControlSelector : DataTemplateSelector | |
| { |