S7 Pro
Seasoned Member
Don't see the point of holding on to these as I'm done with modding and I'd toss the community one final bone.
you're welcome
note: there is no font int on BO2. Pass the lower 16 bits of the text int to the settext function.
credits: teh1337 for releasing his hud prop setting funcs, as his method of setting elem properties was MUCH more user friendly than mine where I created the whole hud struct then set mem.
Code:
public void setIcon(uint elem, uint shader, int width, int height, float x, float y, uint align, float sort = 0, int r = 255, int g = 255, int b = 255, int a = 255)
{
byte[] myelem = new byte[] { 0x42, 0x48, 0x00, 0x00, 0x42, 0xF6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x03, 0xFF, 0x00, 0x00, 0x01, 0xF4, 0x00, 0x00, 0x00, 0x46, 0x00, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x21, 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
SetMem(myelem, elem);
byte[] sorts = ReverseBytes(BitConverter.GetBytes(sort));
SetMem(new byte[] { sorts[0], sorts[1] }, elem + gameAddresses.sort);
SetMem(new byte[] { (byte)5 }, elem + gameAddresses.relativeOffset);
SetMem(new byte[] { (byte)align }, elem + gameAddresses.relativeOffset + 1);
byte[] heights = BitConverter.GetBytes(height);
SetMem(ReverseBytes(heights), elem + gameAddresses.heightOffset - 2);
byte[] widths = BitConverter.GetBytes(width);
SetMem(ReverseBytes(widths), elem + gameAddresses.widthOffset - 2);
SetMem(new byte[] { (byte)shader }, elem + gameAddresses.shaderOffset);
SetMem(new byte[] { BitConverter.GetBytes(r)[0], BitConverter.GetBytes(g)[0], BitConverter.GetBytes(b)[0], BitConverter.GetBytes(a)[0] }, elem + gameAddresses.colorOffset);
SetMem(ReverseBytes(BitConverter.GetBytes(sort)), elem + gameAddresses.textOffset + 4);
SetMem(ReverseBytes(BitConverter.GetBytes(x)), elem + gameAddresses.xOffset);
SetMem(ReverseBytes(BitConverter.GetBytes(y)), elem + gameAddresses.yOffset);
}
Code:
public void SetText(uint elem, byte[] text, uint font, float fontScale, float x, float y, uint align, int r = 255, int g = 255, int b = 255, int a = 255)
{
byte[] myelem = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x42, 0x8F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x6B, 0x08, 0x00, 0x01, 0x80, 0x00, 0x03, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x64, 0xEA, 0x60, 0x03, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x21, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
SetMem(myelem, elem);
//SetMem(new byte[] { 0x00, 0x00, 0x00, 0x02 }, elem + gameAddresses.type);
SetMem(new byte[] { (byte)0x0a, (byte)0xff }, gameAddresses.sort + elem);
SetMem(text, elem + gameAddresses.textOffset + 2);
SetMem(new byte[] { (byte)5 }, elem + gameAddresses.relativeOffset);
SetMem(new byte[] { (byte)align }, elem + gameAddresses.relativeOffset + 1);
SetMem(new byte[] { 0x40, 0x00 }, elem + gameAddresses.textOffset + 4);
SetMem(ReverseBytes(BitConverter.GetBytes(fontScale)), elem + gameAddresses.fontSizeOffset);
SetMem(ReverseBytes(BitConverter.GetBytes(x)), elem + gameAddresses.xOffset);
SetMem(ReverseBytes(BitConverter.GetBytes(y)), elem + gameAddresses.yOffset);
SetMem(new byte[] { BitConverter.GetBytes(r)[0], BitConverter.GetBytes(g)[0], BitConverter.GetBytes(b)[0], BitConverter.GetBytes(a)[0] }, elem + gameAddresses.colorOffset);
}
Code:
gameAddresses.entityBase = 0x83375240; //
gameAddresses.entityMultiplier = 0x280;
gameAddresses.nameOffset = 0x54AC; //
gameAddresses.locString = 0x82382CB0;
gameAddresses.material = 0x82382ED0;
gameAddresses.elem = 0x82325138;
gameAddresses.type = 0x6D;
gameAddresses.xOffset = 0x00;
gameAddresses.yOffset = 0x04;
gameAddresses.textOffset = 0x62;
gameAddresses.sort = 32;
gameAddresses.fontSizeOffset = 0xC;
gameAddresses.clientOffset = 0x7C;
gameAddresses.colorOffset = 0x18;
gameAddresses.relativeOffset = 0x72;
gameAddresses.widthOffset = 0x58;
gameAddresses.heightOffset = 0x5A;
gameAddresses.shaderOffset = 0x74;
gameAddresses.alignOffset = 0x72;
you're welcome
note: there is no font int on BO2. Pass the lower 16 bits of the text int to the settext function.
credits: teh1337 for releasing his hud prop setting funcs, as his method of setting elem properties was MUCH more user friendly than mine where I created the whole hud struct then set mem.