Dump iw3 materials

This commit is contained in:
Jan
2022-04-21 19:58:31 +02:00
parent ebb13e18da
commit c91d71e809
7 changed files with 926 additions and 10 deletions

View File

@ -7,6 +7,20 @@ namespace IW3
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 PackedTexCoords Vec2PackTexCoords(const vec2_t* in);
static PackedUnitVec Vec3PackUnitVec(const vec3_t* in);
static GfxColor Vec4PackGfxColor(const vec4_t* in);