Quote:
Originally Posted by Rubini
Yes, Seeadler, how you found the tga ID reference as an ID on the game engine?
|
I implement some loggers in my dll, one of these logger logs the creating of quads for 2D textures at startup.
it looks like:
Code:
myMatrix._11 = 2.000000 myMatrix._12 = 0.000000 myMatrix._13 = 0.000000 myMatrix._14 = 0.000000
myMatrix._21 = 0.000000 myMatrix._22 = 3.200000 myMatrix._23 = 0.000000 myMatrix._24 = 0.000000
myMatrix._31 = 0.000000 myMatrix._32 = 0.000000 myMatrix._33 = 1.002506 myMatrix._34 = 1.000000
myMatrix._41 = 0.000000 myMatrix._42 = 0.000000 myMatrix._43 = -0.050125 myMatrix._44 = 0.000000
Logging Vector: 840.00 525.00 -0.05 -> Stride = 0
myMatrix._11 = 1.250000 myMatrix._12 = 0.000000 myMatrix._13 = 0.000000 myMatrix._14 = 0.000000
myMatrix._21 = 0.000000 myMatrix._22 = 2.000000 myMatrix._23 = 0.000000 myMatrix._24 = 0.000000
myMatrix._31 = 0.000000 myMatrix._32 = 0.000000 myMatrix._33 = 1.000080 myMatrix._34 = 1.000000
myMatrix._41 = 0.000000 myMatrix._42 = 0.000000 myMatrix._43 = -0.080006 myMatrix._44 = 0.000000
Logging Vector: 840.00 525.00 1.63 -> Stride = 60
In a DX9 game, 2D textures like loading screens, backgrounds etc. are also 3D objects.
A simple vertex quad is created

and on this quad the texture is mapped.
Before this mapping the quad is scaled and moved in screen space, this gives the advantage to set size and position of a texture without resizing the texture itself.
My log now tells me that the loading texture has Stride_nr = 0 and the main menu Stride_nr = 60.
The rest is some "dirty" cooding stuff (also used by cheat developers to make wall hacks, aim-bots etc.)
in short:
- detect when a particular stride is prepared to display
- manipulate the matrix