Created
June 26, 2015 16:38
-
-
Save continue98/33a6e9743e4f54906db4 to your computer and use it in GitHub Desktop.
This file contains 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
#pragma pack(1) | |
typedef struct _TEXT_DRAW_TRANSMIT | |
{ | |
union | |
{ | |
BYTE byteFlags; | |
struct | |
{ | |
BYTE byteBox : 1; | |
BYTE byteLeft : 1; | |
BYTE byteRight : 1; | |
BYTE byteCenter : 1; | |
BYTE byteProportional : 1; | |
BYTE bytePadding : 3; | |
}; | |
}; | |
float fLetterWidth; | |
float fLetterHeight; | |
DWORD dwLetterColor; | |
float fLineWidth; | |
float fLineHeight; | |
DWORD dwBoxColor; | |
BYTE byteShadow; | |
BYTE byteOutline; | |
DWORD dwBackgroundColor; | |
BYTE byteStyle; | |
BYTE byteSelectable; | |
float fX; | |
float fY; | |
WORD wModelID; | |
float fRotX; | |
float fRotY; | |
float fRotZ; | |
float fZoom; | |
WORD wColor1; | |
WORD wColor2; | |
} | |
TEXT_DRAW_TRANSMIT; | |
if (byteRPCID == RPC_ScrShowTextDraw) | |
{ | |
int len = rpcParams ? rpcParams->numberOfBitsOfData / 8 : 0; | |
BitStream bsData(rpcParams->input, (rpcParams->numberOfBitsOfData / 8) + 1, false); | |
WORD wTextID; | |
TEXT_DRAW_TRANSMIT TextDrawTransmit; | |
CHAR cText[1024]; | |
unsigned short cTextLen = 0; | |
bsData.Read(wTextID); | |
bsData.Read((PCHAR)&TextDrawTransmit, sizeof(TEXT_DRAW_TRANSMIT)); | |
bsData.Read(cTextLen); | |
bsData.Read(cText, cTextLen); | |
cText[cTextLen] = '\0'; | |
Log("TextDraw ID: %d, Text: %s\n", wTextID, cText); | |
Log("Flags: box(%i), left(%i), right(%i), center(%i), proportional(%i), padding(%i)\n", TextDrawTransmit.byteBox, TextDrawTransmit.byteLeft, TextDrawTransmit.byteRight, TextDrawTransmit.byteCenter, TextDrawTransmit.byteProportional, TextDrawTransmit.bytePadding); | |
Log("LetterWidth: %.3f, LetterHeight: %.3f, LetterColor: %X, LineWidth: %.3f, LineHeight: %.3f\n", TextDrawTransmit.fLetterWidth, TextDrawTransmit.fLetterHeight, TextDrawTransmit.dwLetterColor, TextDrawTransmit.fLineWidth, TextDrawTransmit.fLineHeight); | |
Log("BoxColor: %X, Shadow: %i, Outline: %i, BackgroundColor: %X, Style: %i, Selectable: %i\n", TextDrawTransmit.dwBoxColor, TextDrawTransmit.byteShadow, TextDrawTransmit.byteOutline, TextDrawTransmit.dwBackgroundColor, TextDrawTransmit.byteStyle, TextDrawTransmit.byteSelectable); | |
Log("X: %.3f, Y: %.3f, ModelID: %d, RotX: %.3f, RotY: %.3f, RotZ: %.3f, Zoom: %.3f, Colors: %d, %d", TextDrawTransmit.fX, TextDrawTransmit.fY, TextDrawTransmit.wModelID, TextDrawTransmit.fRotX, TextDrawTransmit.fRotY, TextDrawTransmit.fRotZ, TextDrawTransmit.fZoom, TextDrawTransmit.wColor1, TextDrawTransmit.wColor2); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment