Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

roby65

Member Since 08 Aug 2007
Offline Last Active Jan 07 2013 11:22 AM
-----

Posts I've Made

In Topic: Detecting game state from rendering calls within directx hook

06 January 2013 - 06:12 AM

Hmm. Never did anything like this myself. Depending on the loaded stuff and the version of the application (defining offset in the heap to where the menu-related stuff is kept),
there's bound to be a byte that changes back and forth when you enter/exit the menu.
Try to grab a dump of the memory allocated for the application in and outside the menu several times to find it,
then look into means of accessing this place from your app.

But I've got no idea whether it would work. Just seems less hackish than looking at loaded textures...

This would be my 2nd idea, but it's not reliable too:

this game has a lot of versions and the user could be using one of these, so i should find the offset for every game version, and if the game gets a new update, this would break the state detection until i find the new offset.

Also the uk, eu and usa version has different offsets too, so for every version i should do the offset find 3 times.

 

Roby


In Topic: [C++] Name above other players

29 August 2012 - 02:06 PM

yes, why not with a little upscaling according to linear Z.

otherwise the position of the point in 2D is:
(you can use glm library)

vec4 proj = mul(vec4(vec3(worldPosition), 1), viewProjectionMatrix);
proj *= (1. / 2 * proj.w);
proj += vec4(0.5, 0.5, 0, 0);
vec2 screenPos = vec2(proj) * resolution; // resolution is a vec2.


I liked your code, but it's not working, maybe i made something wrong?

D3DXVECTOR3 worldPosition(100,100,500);
  D3DMATRIX viewProjectionMatrix=lastProjection;
  D3DXVECTOR4 proj;
  D3DXVec4Transform(&proj,&D3DXVECTOR4(worldPosition,1),&(D3DXMATRIX(viewProjectionMatrix)));
  proj *= (1. / 2 * proj.w);
  proj += D3DXVECTOR4(0.5, 0.5, 0, 0);
  D3DXVECTOR2 screenPos = D3DXVECTOR2(proj.x,proj.y) * 1680 * 1050;

PARTNERS