Created
June 25, 2024 20:00
-
-
Save x4fx77x4f/793d86a5cab2a98da3a23104dc559b35 to your computer and use it in GitHub Desktop.
voice_ban.dt parser for ImHex
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
// informed by https://github.com/tmp64/BugfixedHL-Rebased/blob/7538c9ea954133e6c4dd1ca31ed8579861bace54/src/game/client/voice_banmgr.cpp#L15 | |
#include <std/mem.pat> | |
#include <std/string.pat> | |
#include <std/sys.pat> | |
#pragma endian little | |
struct ban_t { | |
char community_id[32]; | |
// https://developer.valvesoftware.com/wiki/SteamID#Steam_ID_as_a_Steam_Community_ID | |
// consists of "[U:1:", some digits, "]", then null bytes pad the rest. | |
}; | |
struct bans_t { | |
s32 version; | |
std::assert(version == 1, "bad version"); | |
ban_t bans[(std::mem::size()-$)/sizeof(ban_t)]; | |
}; | |
bans_t bans @ 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment