Go Back   BWHacks > Development > Reverse Engineering

Reverse Engineering Game hacking discussion and open source development.

Reply
 
LinkBack Thread Tools

Old 08-17-2008, 01:19 AM   #1 (permalink)
hellinsect

Deviant
 
hellinsect's Avatar
 
Join Date: Dec 2007
Posts: 115
hellinsect will become famous soon enough
Default Messed up starcraft's screen

I was hacking starcraft's screen data and made a mistake. This what happened. It works perfect except for the size and the mini-screen in the corner. Usually it crashes, but this time I couldn't believe my eyes.
__________________

hellinsect 15 0FF11|\|3   Reply With Quote
Advertisement
 
Advertisement
Advertisement Sponsored links


Old 08-17-2008, 08:17 AM   #2 (permalink)
K? Pŕo?ćtiόnŹ
=)
Senior Member
Retired Staff Member

Messiah
 
K? Pŕo?ćtiόnŹ's Avatar
 
Join Date: Oct 2004
Location: Okinawa
Posts: 9,347
K? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond repute
Send a message via AIM to K? Pŕo?ćtiόnŹ
Default

Neat
__________________
K? Pŕo?ćtiόnŹ 15 0FF11|\|3   Reply With Quote

Old 08-17-2008, 11:13 PM   #3 (permalink)
Sheppard
Banned

Deviant
 
Join Date: Oct 2005
Location: www.w3jsp.com
Posts: 49
Sheppard will become famous soon enough
Default

What's so cool about hacking such a old game, I seriously don't understand why you keep hacking it. Isn't it dead yet?
Sheppard 15 0FF11|\|3   Reply With Quote

Old 08-17-2008, 11:15 PM   #4 (permalink)
OmegaMatrix

Zealot
 
OmegaMatrix's Avatar
 
Join Date: Aug 2007
Location: Alberta.
Posts: 728
OmegaMatrix is just really niceOmegaMatrix is just really nice
Send a message via AIM to OmegaMatrix Send a message via MSN to OmegaMatrix
Default

That was a pretty stupid thing to say, if it were dead, nobody would play it, so nobody would be hacking it.

Anyway, nifty screen fux up, what are you planning on using it for?
__________________
Quote:
Originally Posted by AnAlbinoAligator View Post
On contray I think that Degausser is the ONLY good admin here
OmegaMatrix 15 0FF11|\|3   Reply With Quote

Old 08-18-2008, 01:17 AM   #5 (permalink)
Sheppard
Banned

Deviant
 
Join Date: Oct 2005
Location: www.w3jsp.com
Posts: 49
Sheppard will become famous soon enough
Default

Quote:
Originally Posted by OmegaMatrix View Post
That was a pretty stupid thing to say, if it were dead, nobody would play it, so nobody would be hacking it.
I'm just curious. I, for myself, don't see any motivation in hacking starcraft because this game is basicly reversed. Every kind of hack has been out for this game. However, I didn't try to offend anyone, I am just a bit confused. ;)
Sheppard 15 0FF11|\|3   Reply With Quote

Old 08-18-2008, 01:23 AM   #6 (permalink)
ViperSRT3g

Zealot
 
ViperSRT3g's Avatar
 
Join Date: Feb 2006
Location: Jacksonville, NC
Posts: 856
ViperSRT3g has a spectacular aura about
Send a message via AIM to ViperSRT3g Send a message via MSN to ViperSRT3g Send a message via Skype™ to ViperSRT3g
Default

Every hack has not been out yet. Have you ever seen many of these?
Clicky

And I've done something similar to that with unit sprites, which goes to show, it definitely is possible to change the game's resolution. But my sprite thing made the sprites get stretched out sideways like they were getting torn apart.
ViperSRT3g 15 0|\|11|\|3 |\|0\/\/   Reply With Quote

Old 08-18-2008, 01:31 AM   #7 (permalink)
Avalon[FR]

Deviant
 
Avalon[FR]'s Avatar
 
Join Date: Jul 2008
Location: Harrisonburg, VA
Posts: 127
Avalon[FR] is on a distinguished road
Send a message via AIM to Avalon[FR] Send a message via MSN to Avalon[FR]
Default yeaa

Quote:
Originally Posted by Sheppard View Post
What's so cool about hacking such a old game, I seriously don't understand why you keep hacking it. Isn't it dead yet?
That has to be the stupidest thing to say in a StarCraft hacking forum.
__________________
TF2 = Boot-Record[FR]
PvKii = Boot-Record[FR]
BW@US-east = l_Ol_
BW@US-west = l[ActiOn]l
BW@Europe = l[ActiOn]l
Avalon[FR] 15 0FF11|\|3   Reply With Quote

Old 08-18-2008, 02:01 AM   #8 (permalink)
hellinsect

Deviant
 
hellinsect's Avatar
 
Join Date: Dec 2007
Posts: 115
hellinsect will become famous soon enough
Default

Quote:
Originally Posted by OmegaMatrix View Post
That was a pretty stupid thing to say, if it were dead, nobody would play it, so nobody would be hacking it.

Anyway, nifty screen fux up, what are you planning on using it for?
It will make it possible to write whatever you want on the screen without overwriting the mouse. This hack will double the system requirements as far as printing the screen.

I finished the screen data hook and now my functions print the screen. I just need to plug the correct data into the discrepancy arrays.
__________________

hellinsect 15 0FF11|\|3   Reply With Quote

Old 08-18-2008, 02:23 AM   #9 (permalink)
Sheppard
Banned

Deviant
 
Join Date: Oct 2005
Location: www.w3jsp.com
Posts: 49
Sheppard will become famous soon enough
Default

Quote:
Originally Posted by Avalon[FR] View Post
That has to be the stupidest thing to say in a StarCraft hacking forum.
Actually, we are in the "Reverse Engineering". I am only here because this forum has the most active warcraft 3 hacking board. However, nevermind what I said. I wasn't aware that you guys would end up getting rough.

Just by the way, why don't you call starcraft's own draw routines? Even better, why don't you write your own Starcraft client?
Sheppard 15 0FF11|\|3   Reply With Quote

Old 08-18-2008, 02:47 AM   #10 (permalink)
hellinsect

Deviant
 
hellinsect's Avatar
 
Join Date: Dec 2007
Posts: 115
hellinsect will become famous soon enough
Default

Quote:
Originally Posted by Sheppard View Post
Actually, we are in the "Reverse Engineering". I am only here because this forum has the most active warcraft 3 hacking board. However, nevermind what I said. I wasn't aware that you guys would end up getting rough.

Just by the way, why don't you call starcraft's own draw routines? Even better, why don't you write your own Starcraft client?
LOL, been there tried that, too hard. I find it much easier to call API functions and lock the data on the screen. Besides, I will have to anyways to restore screen under the mouse.
__________________

hellinsect 15 0FF11|\|3   Reply With Quote

Old 08-18-2008, 02:57 AM   #11 (permalink)
Sheppard
Banned

Deviant
 
Join Date: Oct 2005
Location: www.w3jsp.com
Posts: 49
Sheppard will become famous soon enough
Default

Quote:
Originally Posted by hellinsect View Post
LOL, been there tried that, too hard. I find it much easier to call API functions and lock the data on the screen. Besides, I will have to anyways to restore screen under the mouse.
Well, what about just hooking at a location before the mouse gets drawn? And why is it harder to call starcraft's draw functions? Isn't like all info you need public already?
Sheppard 15 0FF11|\|3   Reply With Quote

Old 08-18-2008, 03:22 AM   #12 (permalink)
hellinsect

Deviant
 
hellinsect's Avatar
 
Join Date: Dec 2007
Posts: 115
hellinsect will become famous soon enough
Default

Quote:
Originally Posted by Sheppard View Post
Well, what about just hooking at a location before the mouse gets drawn? And why is it harder to call starcraft's draw functions? Isn't like all info you need public already?
Like I said, hooking the mouse is a given. However the some of starcraft's ddraw functions are way out there and have 10 locations that print stuff that has invisible surface locks and have about 9 arguments.

However by changing 2 pointers the screen is all configured in my off-screen array and the rectangle that is being updated at the time is mine.

One of starcraft's ddraw functions was written in ASM by hand. This function stops the game play screen from writing over the command bar. I am basically using it a as blue print.
__________________

hellinsect 15 0FF11|\|3   Reply With Quote

Old 08-18-2008, 04:28 AM   #13 (permalink)
K? Pŕo?ćtiόnŹ
=)
Senior Member
Retired Staff Member

Messiah
 
K? Pŕo?ćtiόnŹ's Avatar
 
Join Date: Oct 2004
Location: Okinawa
Posts: 9,347
K? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond reputeK? Pŕo?ćtiόnŹ has a reputation beyond repute
Send a message via AIM to K? Pŕo?ćtiόnŹ
Default

Starcraft is good practice.
__________________
K? Pŕo?ćtiόnŹ 15 0FF11|\|3   Reply With Quote

Old 08-18-2008, 04:56 AM   #14 (permalink)
hellinsect

Deviant
 
hellinsect's Avatar
 
Join Date: Dec 2007
Posts: 115
hellinsect will become famous soon enough
Default

Here is a basic structure of how my hacks will print stuff on the screen.
Code:
void MakeHackScreen()
{
if(!FindWND) 
{
hWnd = FindWindowA(TheClassName,TheWindowName);
GetClientRect(hWnd,&ClientRect);
FindWND = TRUE;
}


// ADD to screen.
hDC = GetDC(hWnd);
// printing fuctions go here
DrawTextA( hDC,"hey",-1,&ClientRect,(DT_CENTER | DT_TOP | DT_SINGLELINE));// Must be called 2 times to lock.
LoadAndMark_Screen(&ClientRect); // Loads data to array2 and ORs the lowest red bit.
// printing fuctions go here
DrawTextA( hDC,"hey",-1,&ClientRect,(DT_CENTER | DT_TOP | DT_SINGLELINE));// Must be called 2 times to lock.
TestAndUnMark_Screen(&ClientRect); // Marks everything equal in discrepancies1 and ORs the lowest red bit.
ReleaseDC(hWnd,hDC);


// DELETE from screen.
Reset_UpdateScreen(&ClientRect); // Removes hack data from the screen.

return;
__________________


Last edited by hellinsect : 08-18-2008 at 06:12 AM.
hellinsect 15 0FF11|\|3   Reply With Quote

Old 08-18-2008, 09:17 AM   #15 (permalink)
SC_Modder
Loading javascript...
Senior Member
Moderator

Inquisitor
 
SC_Modder's Avatar
 
Join Date: Nov 2004
Posts: 4,523
SC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond reputeSC_Modder has a reputation beyond repute
Send a message via AIM to SC_Modder
Default

Quote:
Originally Posted by hellinsect View Post
Like I said, hooking the mouse is a given. However the some of starcraft's ddraw functions are way out there and have 10 locations that print stuff that has invisible surface locks and have about 9 arguments.

However by changing 2 pointers the screen is all configured in my off-screen array and the rectangle that is being updated at the time is mine.

One of starcraft's ddraw functions was written in ASM by hand. This function stops the game play screen from writing over the command bar. I am basically using it a as blue print.
The new compiler they are using makes it appear that the assembly is written by hand. But really they are just really good compiler optimizations. Don't forget that Starcraft is a cross-platform game. Writing any function purely in assembly would be stupid.
__________________
AaronOpfer.com - My music
SC_Modder 15 0FF11|\|3   Reply With Quote

Old 08-20-2008, 03:48 AM   #16 (permalink)
hellinsect

Deviant
 
hellinsect's Avatar
 
Join Date: Dec 2007
Posts: 115
hellinsect will become famous soon enough
Default

Starcraft DEFINES all of its colors in the graphics card. The way they are defined is very wired. Like I was going down the list printing each one, a lot of the blue ones blink. This is for the water believe it of not. API calls work, but the colors are all out of whack and you have to play with them until you get the correct colors you want. Apart from that, the locking code works great.
__________________

hellinsect 15 0FF11|\|3   Reply With Quote