CPolyLine::SetSemiTransparent

This commit is contained in:
krystalgamer 2024-05-25 19:49:58 +02:00
parent 90cd6664cf
commit cd7a41b6f5
3 changed files with 31 additions and 0 deletions

View File

@ -24,6 +24,17 @@ void CGLine::SetRGB1(unsigned char a2, unsigned char a3, unsigned char a4)
this->field_40 = a2 | (a4 << 16) | (a3 << 8);
}
// @NotOk
// figure out what the ptr is
void CPolyLine::SetSemiTransparent(void)
{
for (int i = 0; i < this->field_40; i++)
{
unsigned char * ptr = reinterpret_cast<unsigned char*>(this->field_44);
ptr[0x10*i] |= 2;
}
}
void validate_CGPolyLine(void){
VALIDATE_SIZE(CGPolyLine, 0x58);
@ -51,3 +62,11 @@ void validate_CGLine(void)
VALIDATE(CGLine, field_54, 0x54);
VALIDATE(CGLine, field_58, 0x58);
}
void validate_CPolyLine(void)
{
VALIDATE_SIZE(CPolyLine, 0x48);
VALIDATE(CPolyLine, field_40, 0x40);
VALIDATE(CPolyLine, field_44, 0x44);
}

11
bit2.h
View File

@ -41,7 +41,18 @@ class CGLine : public CBit
int field_58;
};
class CPolyLine : public CBit
{
public:
EXPORT void SetSemiTransparent(void);
unsigned char topPad;
int field_40;
int field_44;
};
void validate_CGPolyLine(void);
void validate_CPolyLine(void);
void validate_CGLine(void);
#endif

View File

@ -268,6 +268,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
validate_SControl();
validate_Bitmap256();
validate_WeirdTextureHolder();
validate_CPolyLine();
puts("[*] Validation done!");