mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-27 23:37:04 -05:00
patterns/includes: Update standard library and patterns to support the new bitfields (#102)
* Add `current_bit_offset()` and `read_bits(...)` to `std::mem` * Replace deprecated BitfieldOrder enum values with new clearer names This adds new options named `MostToLeastSignificant` and `LeastToMostSignificant` to replace the old `LeftToRight` and `RightToLeft` names. These names should be much clearer about what they affect and how. * Throw errors when `std::core::(get|set)_bitfield_order()` are called * Update all patterns to work with the new bitfield behaviors
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#pragma MIME application/x-dosexec
|
||||
#pragma MIME application/x-msdownload
|
||||
#pragma bitfield_order right_to_left
|
||||
#pragma pattern_limit 0x400000
|
||||
|
||||
#include <std/string.pat>
|
||||
@@ -378,7 +377,7 @@ fn architecture() {
|
||||
bitfield OrdinalFlagByte {
|
||||
flag : 1;
|
||||
padding : 7;
|
||||
} [[left_to_right]];
|
||||
};
|
||||
|
||||
struct NameTableEntry {
|
||||
u16 hint;
|
||||
@@ -1278,4 +1277,4 @@ struct StringTable {
|
||||
StringTableString strings[while($ < addressof(this) + size)];
|
||||
} [[inline]];
|
||||
|
||||
StringTable stringTable[checkForDebugInformation] @ addressof(symbolTable) + sizeof(symbolTable);
|
||||
StringTable stringTable[checkForDebugInformation] @ addressof(symbolTable) + sizeof(symbolTable);
|
||||
Reference in New Issue
Block a user