Dump known material argument hashes

This commit is contained in:
Jan
2022-04-09 19:07:24 +02:00
parent 13c5ea2986
commit 7d2ca46cb1
8 changed files with 507 additions and 61 deletions

View File

@ -7,6 +7,20 @@ namespace IW4
class Common
{
public:
static constexpr uint32_t R_HashString(const char* string, const uint32_t hash)
{
const char* v2 = string; // edx@1
char v3 = *string; // cl@1
uint32_t result = hash;
for (; *v2; v3 = *v2)
{
++v2;
result = 33 * result ^ (v3 | 0x20);
}
return result;
}
static int StringTable_HashString(const char* str);
static PackedTexCoords Vec2PackTexCoords(const vec2_t* in);

View File

@ -1125,7 +1125,7 @@ namespace IW4
struct CodeConstantSource
{
const char* name;
unsigned char source;
MaterialConstantSource source;
CodeConstantSource* subtable;
int arrayCount;
int arrayStride;