What's new

BO2 Hud Elems

S7 Pro

S7 Pro

Seasoned Member
Modder Programmer
Messages
2,511
Reaction score
1,599
Points
560
Sin$
7
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.

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.
 
S7 Pro

S7 Pro

Seasoned Member
Modder Programmer
Messages
2,511
Reaction score
1,599
Points
560
Sin$
7
align:
Code:
public uint TOP_RIGHT = 0xA8,
            TOPLEFT = 0x88,
            TOP_CENTERED = 0x78,
            BOTTOM_RIGHT = 0xAA,
            BOTTOM_LEFT = 0x8A,
            BOTTOM_CENTER = 0x9A,
            CENTER_MIDDLE = 0x92,
            CENTER_LEFT = 0x82,
            CENTER_RIGHT = 0xA2;

same for all cods.
 
S7 Pro

S7 Pro

Seasoned Member
Modder Programmer
Messages
2,511
Reaction score
1,599
Points
560
Sin$
7
No the code, it's garbage. I could literally slam a rock on a keyboard and get better code than this.
Do it then. I couldn't care to remove the whole struct atm, I don't care for modding anymore. The community has gone to **** bc of people like you.
 
S7 Pro

S7 Pro

Seasoned Member
Modder Programmer
Messages
2,511
Reaction score
1,599
Points
560
Sin$
7
am i alone in thinking that vince zampella is a moronic leech?

(wants to be famous so badly that he uses a treyarch developers name as his alias just to feel known -- LOL)
Should see him flaming me on aim "you released it as one last f*** you to those who actually learned"

Hey matt goml and umad?
 
CAPiiX

CAPiiX

Getting There
Grammar Nazi Seasoned Veteran Grizzled Veteran
Messages
1,158
Reaction score
276
Points
185
Sin$
0
Do it then. I couldn't care to remove the whole struct atm, I don't care for modding anymore. The community has gone to **** bc of people like you.
Agreed. People like him make Se7ensins look like this:

Well, with a bit different replies, but you get the point.
 
uSkeezR

uSkeezR

Enthusiast
Messages
319
Reaction score
217
Points
115
Sin$
0
nice release :smile:
d974531832e15d6ad761921c00f04cbc.png
 
iM ShARk xX

iM ShARk xX

Contributor
Programmer
Messages
1,832
Reaction score
831
Points
270
Sin$
0
[quote="Lampr3y, post: 65053]
cmj2k97
[/quote]

can't see your image :/
cmj2k97
 
Top Bottom
Login
Register