IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Pages: (3) 1 2 [3]   ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 Help

 Could not compile C code in VS 2010
 
Swoorup  
Posted: Thursday, Oct 6 2011, 04:20
Quote Post


innovator
Group Icon
Group: Members
Joined: Oct 28, 2008

au.gif

XXXXX



I have to do a lot of hacks for the Vice city for the ECS mod. The mod is public for discussion so I am gonna explain my problems sir.:

Firstly we are combining Vice City and Liberty City in the mod where the game will be set in 1993 incorporating huge changes in both the cities with a way R* could have made.

Apart from the story line and setting we planned to make VC directly above LC floating in the air. It was done due a limitation which no one was able to hack: the Paths Spawn area(Spawning them outside original bounds is almost impossible), though the path node limit has already been hacked.

Also to go with our plan, we need physical and visual water at both of the cities along with the helicopter height limit(How much can the helicopter go up), so I did the dynamic water hack by just editing the memory address of water level but there seems to be some problem with the visual water. Also the same thing was done for the helicopter height limit at both the cities. Currently, one cannot view Vice city just by looking at the sky tounge.gif, That was solved by Almost610 by simply editing some flags of IDE lines and placing a zon over there. Most of the physical problems we have faced that would cause the development to be halted have been solved already.

I was doing all the solutions in VB.net via writeprocessmemory! Now I will be coding them in C++. There are still some left to do hack. They are:

i. Visual water level for Vice City ,its just not showing up(Currently we are using our own textures for it).
ii. Hack the radar by loading a set of Vice city radar textures and Liberty City radar texture dynamically ( I am not sure but I think it can be achieved by reloading the functions which load the radar)
iii. Menu map ( I have thought the same solution like the radar)
iv. HUD ( I need to learn programming with DirectX first)
PMMSNYahoo
  Top
 

 
K^2  
Posted: Thursday, Oct 6 2011, 05:01
Quote Post


Vidi Vici Veni
Group Icon
Group: Zaibatsu
Joined: Apr 14, 2004

us.gif

Member Award




Might be easier to write your own radar and map and render them via custom DirectX code. People have done DirectX hooks for Vice for a long time, so it shouldn't be too much of a problem. By far the simplest solution would be to write your own d3d8.dll. I recall somebody mentioning that this hack does work for Vice. Of course, you need to understand D3D8 programming first, but if you need it for HUD anyways, you might as well.

Once you intercepted renderer with custom d3d8.dll, it also resolves many of your headaches. For one thing, you'll actually get a call every time VC engine goes to render a frame, so any per-frame operations can be done there. You even get a choice to go for pre-frame or post-frame processing. You can also render your own geometry. If you really want, you can render completely custom water with any dx8 effects you want. Hell, you could write your own renderer with DX11 effects if you want, but that would be a lot of work.

Point is, DirectX is probably your next step. And it will definitely be useful for you in many other projects.



I know I have an empty custom d3d9 code sitting somewhere. Let me see if I have one for d3d8 as well.
PMMSN
  Top
 

 
Swoorup  
Posted: Thursday, Oct 6 2011, 05:31
Quote Post


innovator
Group Icon
Group: Members
Joined: Oct 28, 2008

au.gif

XXXXX



I had it in my mind too. But it turns out to be too much work and learning too. I have to make the radar in a way it gets rendered above the 3D game world and below the icons and markers which the normal radar would consist of. Also more to that I would have to learn how the player velocity's affect the radar as it zooms in and out. Currently, I am just in-fact predicting the time it would take.

Can this be done by placing the radar hook in a loop in between the one rendering the world and the other rendering the markers and icons simply?

I thought it would take a very long time. So temporarily I would perhaps just disable the radar only.

Thank you sir, I think now that's how ENB works too by injecting or either intercepting the post and the pre-fames?
Sir, if you have them please do submit it, I had been looking on Squiddy's HUD code to learn how it works, but I could not even compile it. If I could compile and learn how it hooks, I think I would start DirectX programming by playing with it and also correct its major problems!
Thank you sir, for each and every info you have given. You are full of wisedom!
PMMSNYahoo
  Top
 

 
K^2  
Posted: Thursday, Oct 6 2011, 07:37
Quote Post


Vidi Vici Veni
Group Icon
Group: Zaibatsu
Joined: Apr 14, 2004

us.gif

Member Award




With custom d3d8.dll you'd have a great amount of control over how things are rendered. Most games will switch from 3D rendering to 2D rendering by changing projection matrix. You can monitor calls that set projection matrix, and use that to tell you when the game's done rendering 3D stuff.

But I was thinking more of disabling game's HUD all together, including the radar, and custom-rendering everything. You should be able to get active markers from game's script. Then you can zoom the radar and display markings in any way you wish. You can even add some really creative additions, like 3D map on the radar, GPS navigation, etc. Advance programming, all that, but there is no reason why you can't add to it as you go along.

I'm looking at squiddy's code now. What he wrote for d3d8 intercept is exactly what you need. I'd seriously recommend getting his permission to use his code as a base. It will save you a ton of trouble.

As far as compiling it, you might need to have DirectX SDK installed. I'll try compiling it a bit later and see if I can come up with some advice on that.
PMMSN
  Top
 

 
Swoorup  
Posted: Thursday, Oct 6 2011, 12:47
Quote Post


innovator
Group Icon
Group: Members
Joined: Oct 28, 2008

au.gif

XXXXX



Did you compile it successfully sir? I am currently downloading the SDK. I will have a look at it. But I am running to this problem at function pointer declaration:

CODE

void (*Render2DStuffptr)()=0x4A6190;


No matter whatever I try I keep failing. I looked for several tutorials and non of them have declared like this. Its a direct extract from what you have told earlier.
The error states that value of type "int" cannot be used to initialize an entity of type "void (*) ()"

Its a void function with no parameters passed to it.
I have read through the whole forum about D3D and there are things that are may be fully documented!
PMMSNYahoo
  Top
 

 
K^2  
Posted: Thursday, Oct 6 2011, 13:05
Quote Post


Vidi Vici Veni
Group Icon
Group: Zaibatsu
Joined: Apr 14, 2004

us.gif

Member Award




The error states correctly. I'm not entirely sure how it slipped by squiddy's compiler. Try this:

CODE
void (*Render2DStuffptr)(void)=(void(*)(void))0x4A6190;
PMMSN
  Top
 

 
Swoorup  
Posted: Thursday, Oct 6 2011, 13:11
Quote Post


innovator
Group Icon
Group: Members
Joined: Oct 28, 2008

au.gif

XXXXX



Wow, It does not gives any error now. I still have to compile and test it soon. I will get back to you!!!

Thank you sir!

EDIT: I was not able to display the hack I get crashes every time. Squiddy has converted the printstring parameter from unicode to char. How did he do so?

I made the ASI which also includes floating point computation!
Also the ASM code works beautifully, though I have used floating point computations, it didnot affect anything sir
icon14.gif icon14.gif icon14.gif

I download the SDK. There are C headers and cpp files over there. But I cant install the SDK. It always gives me an error. BTW its Directx9.0c summer update SDK. It includes all the needed files that the HUD source has requested but I just cant install from the installer

EDIT EDIT: I linked the Directx files with VS 2010 but I could not get it to work. Still it produces about 10-15 errors that I find hard to debug though.

Then I had a copy of VS 6.0 because my college used to teach me VB 6.0 and then I linked all the DX files and it worked!
But Still dont know how to give a start!

This post has been edited by Swoorup on Friday, Oct 7 2011, 06:22
PMMSNYahoo
  Top
 

 

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

0 Members:

Pages: (3) 1 2 [3] 

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG