🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

GTA San Andreas and attempt to disable pre-lighting (hacking)

Started by
5 comments, last by who_say_pawno 3 years, 7 months ago

Hello. The question of course is little related to the theme of the forum, but you never know someone here knows.

Engine RenderWare.

I need to disable prelit (rpGEOMETRYPRELIT) and enable modulate material color (rpGEOMETRYMODULATEMATERIALCOLOR) on objects. Disable it programmatically.

I hook CObject::Render (0x0059F180) and before call original CObject::Render disable flag rpGEOMETRYPRELIT in RpGeometry (after call i return original flags) (IT WORKS!), but there was a problem. The game crashes after some time on the address 0x00757D6E (D3D9AtomicDefaultInstanceCallback) or 0x007F5A3A (RwD3D9DynamicVertexBufferCreate).

What could be the problem? It seems to me that this is due to the lighting data in the vertex buffer. But how can this be fixed?

Thank all!

I'll have two number 9s, a number 9 large, a number 6 with extra dip, a number 7, two number 45s, one with cheese, and a large soda.

Advertisement

Closed.

I'll have two number 9s, a number 9 large, a number 6 with extra dip, a number 7, two number 45s, one with cheese, and a large soda.

Did you find our what caused the crash? Were there more stuff in the VB than you initially expected, and how did you find out (are you using a shader debugger, for instance)?

In D3D9AtomicDefaultInstanceCallback there was a check for the presence of the flag and the creation of a declaration VB for lighting data. I should have changed it.

I'll have two number 9s, a number 9 large, a number 6 with extra dip, a number 7, two number 45s, one with cheese, and a large soda.

who_say_pawno said:

In D3D9AtomicDefaultInstanceCallback there was a check for the presence of the flag and the creation of a declaration VB for lighting data. I should have changed it.

Ahh. Glad to know it wasn't something obscure you could have spent the whole weekend finding! ?

When it comes to a question on the forum, it means that more weekends have already been spent :\

I'll have two number 9s, a number 9 large, a number 6 with extra dip, a number 7, two number 45s, one with cheese, and a large soda.

This topic is closed to new replies.

Advertisement