Need C++ help to finish fix for cartographic view

Post here if you want to help developing something for FAF.

Re: Need C++ help to finish fix for cartographic view

Postby nine2 » 17 Jan 2015, 13:42

my apologies abstract and aurion. i was trying to be jokeful, not offensive. my apologies if i caused any trouble for anyone.
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: Need C++ help to finish fix for cartographic view

Postby ABSTRACT » 17 Jan 2015, 14:40

partytime wrote:thanks for letting me know you have no intention of helping me :)

I said: " If i would have more time". I will have more time but not now.
We are talking about decompiling this exe or parts of it to C (!), understand the global structure, and find the corresponding funtions/modify them, and then compile it, and distribute the exe to the community. We are talking about work that is several orders of magnitude higher than this cartographic view. Nevertheless ur work looks very nice, yes, but u should keep that in mind.
Decompiling and distributing a modified exe is illegal btw.
Last edited by ABSTRACT on 17 Jan 2015, 17:34, edited 1 time in total.
User avatar
ABSTRACT
Avatar-of-War
 
Posts: 110
Joined: 03 Nov 2014, 13:39
Location: Germany
Has liked: 11 times
Been liked: 5 times
FAF User Name: ABSTRACT

Re: Need C++ help to finish fix for cartographic view

Postby rootbeer23 » 17 Jan 2015, 16:39

make available a tutorial how shaders are used in supcom and list the parameters which you can give currently.
rootbeer23
Supreme Commander
 
Posts: 1001
Joined: 18 May 2012, 15:38
Has liked: 0 time
Been liked: 31 times
FAF User Name: root2342

Re: Need C++ help to finish fix for cartographic view

Postby nine2 » 18 Jan 2015, 07:21

edited the original post with good strings to look for to find where the shader is filled in by c++.

however, we also need to get the right data out of the map file. unfortunately there aren't any known strings to find the right bit of code easily. I know the map file format well and I know what the values are for certain maps. Is it possible to decompile the exe and then run it again and step through it? If someone could get me stepping through C functions around the right place (where it loads map), I could pinpoint the correct bit of data.

i'll get back to you on legality.
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

Re: Need C++ help to finish fix for cartographic view

Postby visionik » 18 Jan 2015, 07:34

On the questioned "legality":

decompilation - is legal in any country where it's important for the purposes of interoperability with new software (ie, improved minimap software) or bug fixing (one could argue the minimap should work right in the first place). We are easily covered by both cases.

distribution: we will be distributing patches to .EXE's, not EXE's themselves. Also fine.

In short, no problems.

-Visionik
visionik
Avatar-of-War
 
Posts: 127
Joined: 04 Aug 2014, 23:03
Has liked: 0 time
Been liked: 152 times
FAF User Name: visionik

Re: Need C++ help to finish fix for cartographic view

Postby pilot538 » 19 Jan 2015, 04:54

I can try my best and give it a shot. I don't have a ton of time, but I'll try.
Timezone: GMT -6, Central US
Playtime: 4:00-7:00 p.m., Central US
pilot538
Crusader
 
Posts: 11
Joined: 23 Dec 2014, 21:31
Has liked: 2 times
Been liked: 0 time
FAF User Name: pilot538

Re: Need C++ help to finish fix for cartographic view

Postby ABSTRACT » 19 Jan 2015, 14:44

visionik wrote:On the questioned "legality":

decompilation - is legal in any country where it's important for the purposes of interoperability with new software (ie, improved minimap software) or bug fixing (one could argue the minimap should work right in the first place). We are easily covered by both cases.

distribution: we will be distributing patches to .EXE's, not EXE's themselves. Also fine.

In short, no problems.

-Visionik


Ok its my fault, in the german version of THQ Inc. PC Software License Agreement has been no exception for the case of decompilation.
Ohne vorherige schriftliche Einwilligung von THQ und/oder ihrer Lizenzgeber dürfen deren Produkte weder vervielfältigt noch abgeändert, übersetzt, zurückentwickelt, dekompiliert, dem 'reverse engineering' unterzogen oder deassembliert werden, noch abgeleitete Werke davon erstellt werden.

But the english version is a bit different regarding the legal framework.

[...] except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.


Btw, why not ask the right owner to give FAForever the source code and/or the autorisation to modify the game. That would make many things easier. This sworn community is the only reason why the game is still played and purchased
Last edited by ABSTRACT on 19 Jan 2015, 15:04, edited 1 time in total.
User avatar
ABSTRACT
Avatar-of-War
 
Posts: 110
Joined: 03 Nov 2014, 13:39
Location: Germany
Has liked: 11 times
Been liked: 5 times
FAF User Name: ABSTRACT

Re: Need C++ help to finish fix for cartographic view

Postby rootbeer23 » 19 Jan 2015, 14:53

there are many float values passed to the shader.
you can try and piggyback the value you need in the fractional part.
if you can modify one of the existing arguments:
arg = arg + 0.0001 * water_level
in the shader you do the reverse.

or you can generate one shader file for each map and put the water level in as a constant.
rootbeer23
Supreme Commander
 
Posts: 1001
Joined: 18 May 2012, 15:38
Has liked: 0 time
Been liked: 31 times
FAF User Name: root2342

Re: Need C++ help to finish fix for cartographic view

Postby The Mak » 20 Jan 2015, 03:17

If you want to take a stab at decompiling, there are a number of free tools online. There was one that worked for the FA executable in my searches, REC Studio 4. If you use this tool it generates a text file that is about 35 MB and just under 1 million lines of code: FAF v3639 (right-click and save the link as it will just open a very long text file)

I had wanted to try Hex-Rays Decompiler but it is about 4,000 USD. I was hoping to find a company or someone with this tool and see if they would try the FA executable to see what came out, but was not able to find someone :cry:
User avatar
The Mak
Contributor
 
Posts: 342
Joined: 03 Mar 2012, 21:09
Location: New York, NY, USA
Has liked: 5 times
Been liked: 39 times
FAF User Name: The_Mak

Re: Need C++ help to finish fix for cartographic view

Postby nine2 » 20 Jan 2015, 03:57

rootbeer23 wrote:you can try and piggyback the value you need in the fractional part.


well that is a creative idea and i'll keep it in mind, but still requires the hard bits: finding water level value and modifying the c++ code to pass it in

but if creating a new hlsl param turns out to be hard then we should consider your idea

or you can generate one shader file for each map and put the water level in as a constant


well i'm not sure but that doesn't sound like a very good idea to me :)
nine2
Councillor - Promotion
 
Posts: 2416
Joined: 16 Apr 2013, 10:10
Has liked: 285 times
Been liked: 515 times
FAF User Name: Anihilnine

PreviousNext

Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest