DronCode / ReHitman

Hitman Blood Money Reverse Project
http://rehitman.online
29 stars 5 forks source link

[DebugMenu] Add wireframe draw mode #13

Closed DronCode closed 4 years ago

DronCode commented 4 years ago

As experimental debug feature we could add wireframe rendering option in debug menu. It could be enabled by this code g_d3d_device->SetRenderState(D3DRS_FILLMODE,D3DFILL_WIREFRAME); And disabled by this code g_d3d_device->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);

Reference https://www.drunkenhyena.com/cgi-bin/view_cpp_article.pl?chapter=2;article=22

Also we must think about how to apply this mode for specific model (instance). Glacier presents this feature (they are using instancing concept) and the idea could be implemented through vftable proxy hook (find method "draw" and insert logic in it).

As perfect solution we can implement ray tracing from player camera by the angle to find object to draw in wireframe mode but it's impossible (looks like a challenge).

DronCode commented 4 years ago

Task delayed.

DronCode commented 4 years ago

For the project we will implement 3 modes:

  1. Wireframe mode
  2. Normal mode
  3. Wireframe & Normal mode