Jump to content
Heads Up! This website is no longer maintained, if your a member from our era, consider joining the discord to say hello.
Sign in to follow this  

Sending game text to all users

Recommended Posts

I'm preaty sure your X and Y is are mixed up it's push y mov esi, x. Try again and change the order of the cordinents. Also is it printing anything at all?

Share this post


Link to post
I'm preaty sure your X and Y is are mixed up it's push y mov esi, x. Try again and change the order of the cordinents. Also is it printing anything at all?

 

To answer you: Yes, it is printing what I wanted, but not in the proper location...

For some reason, the compiler was compiling it wrong, and the stack was off by 8 bytes.

But it's ok! It doesn't really matter, I've got it all sorted out and working now.

 

I also found the screen refreshing function (on my own!)... but, I did have some help.

Somebody who had the offsets told me I was "on the right trail," and then told me the jump-back offset.

He didn't tell me the refresh function, but when I asked him if it was it (412D0), he said "Yes." :'(

 

So now I'm REALLY happy I've learned what I always wanted to, and all I can say is: Thank you!! <3

 

I'm pretty sure you don't care but, this is what I have:

 

- Function offsets

const int BWFXN_HUD = 0x04202B0;
const int BWFXN_RetHud = 0x048CF85;

const int BWFXN_Refresh = 0x41E0D0; // I found this!
const int BWFXN_RetRefresh = 0x041E28D; // I was told this (and I'm STILL confused as to how to find it..)

 

- My functions in C++

void BW_RefreshScreen(int TopY, int LeftX, int BottomY, int RightX) {

__asm {
	pushad
		push RightX
		mov eax, TopY
		mov edx, BottomY
		mov ecx, LeftX
		call dword ptr cs:[BWFXN_Refresh]
	popad
}
}

void __declspec(naked) BW_RefreshScreenHook() {

__asm {
	MOV EDI,DWORD PTR DS:[6CEFF4h]
	jmp BWFXN_RetRefresh
}
}

void BW_DrawHudText(int x, int y, const char *szText) {

__asm {
	pushad
		push y;
		mov esi, x;
		mov eax, szText;
		call DWORD PTR [BWFXN_HUD]
	popad
}
}

void __declspec(naked) BW_DrawHudTextHook() {

BW_RefreshScreen(0, 0, 0x480, 0x640); // Refresh the WHOLE screen!
BW_DrawHudText(50, 50, "x6Hello World!");

__asm {
	mov dword ptr ss:[ebp-4h],0Bh
	jmp BWFXN_RetHud
}
}

 

- Screen shot of it working

15fswoo.jpg

 

Again: Thank you, very much for the support, and help, and hints... :)

Share this post


Link to post

Your welcome. Anyway cya around!

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  

×