Coding

 Reply to this postStart new topic

Texture Draw

DK22
post Jun 29 2011, 06:34 PM
Post #1


Member

Posts: 197
From: Liberty City, Shoreside
Joined: 15-July 10



I'm going to make 'little' mod which will show textures on a screen after you start a game (after you launch .exe) So I'm gonna write an dll (asi) to make it (cause with CLEO its impossible/)
But my C++ knowledges are too dab, so I gonna use asm-injectors, I think)
So, as NTAuthority said at GTAF,:
QUOTE
Like all the D3DX surface loading functions (and other functions), you need to use a valid Direct3D device, and call them at the right time. If you're actually in-game, I recommend just using the 'texture drawing' script functions. If you're in the menu or similar, I recommend using RenderWare's functions, and the function at 0x728350 (RwTexture* texture, float* rectangleCoords, DWORD* color).

I looked to .exe how it calls and tried to write some similar. Don't think that it would work, but how I need to do it correctly?
CODE
__asm
{
...
push 0FFh // a
push 0FFh // b
push 0FFh // g
push 0FFh // r
mov  eax, 0x7170C0
call eax // _RGBA__set // returns Color* to eax?
//////////////////////
push eax // Color*
mov eax, 0x5DF290 // I used any adress here. Can I do it??
mov [eax], 320.0
add eax, 4
mov [eax], 224.0
sub eax, 4
push eax // Coords* ??
push 0xC40404 // RwTexture* // _texHandman
mov eax, 0x728350
call eax
}

I believe it will be easily to define this function in C++-style, but I dunno how to work this way for this time.

This post has been edited by DK22: Jun 29 2011, 06:36 PM
Go to the top of the page
 
+Quote Post
Reply to this postStart new topic

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: