What's new

BO2 Hud Elems

S

S7 Pro

Seasoned Member
Messages
2,511
Reaction score
1,603
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.
 
I

Im4eversmart

The hacks are real
Messages
2,161
Reaction score
1,903
Great release!
 
H

Hacksorce

Enthusiast
Messages
585
Reaction score
401
Omg, this is amazing, it saves me hours of disassembling.
 
S

S7 Pro

Seasoned Member
Messages
2,511
Reaction score
1,603
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.
 
S

S7 Pro

Seasoned Member
Messages
2,511
Reaction score
1,603
Omg, this is amazing, it saves me hours of disassembling.
You wouldn't have figured this out with IDA btw, requires actual console work as well.
 
V

VinceZampella

Enthusiast
Messages
566
Reaction score
278
This is actually terrible.
 
C

Chromized

Agent Tucker - Get Money Motherf**ker
Messages
252
Reaction score
146
:biggrin:
This saved me a lot of time
 
S

S7 Pro

Seasoned Member
Messages
2,511
Reaction score
1,603
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.
 
S

S7 Pro

Seasoned Member
Messages
2,511
Reaction score
1,603
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?
 
V

VinceZampella

Enthusiast
Messages
566
Reaction score
278
Should see him flaming me on aim "you released it as one last **** you to those who actually learned"

Hey matt goml and umad?
Sorry, not one for going backwards...
 
C

CAPiiX

Getting There
Messages
1,159
Reaction score
275
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.
 
Z

Zephyr

Contributor
Messages
1,611
Reaction score
731


GuTu's H4x :3
 
Last edited:
T

teh1337

Some call me the Dear Leader-most just say teh1337
Messages
1,553
Reaction score
2,214
You wouldn't have figured this out with IDA btw, requires actual console work as well.
Not true, I didn't do any console work :tongue:
 
I

iM ShARk xX

Contributor
Messages
1,832
Reaction score
831
[quote="Lampr3y, post: 65053]
[/quote]

can't see your image :/
 
Top Bottom