someone pls compile this for me

For all coding issues - MODers and programmers, HTML and more.

Moderators: Jeff250, fliptw

Post Reply
User avatar
roid
DBB Master
DBB Master
Posts: 9990
Joined: Sun Dec 09, 2001 3:01 am
Location: Brisbane, Australia
Contact:

someone pls compile this for me

Post by roid »

i'd like a descent3 mod that enlarges the FOV greatly. unfortuantely i suck at setting up compilers, so i can't compile it.

ok, so i have already downloaded the D3 code and edited the code that i need to. all that i need to do now is recompile, but that's too complex for me :(

can anyone who is setup to recompile descent3, (or just recompile it into a mod, or something, I DON'T KNOW!) can i please give you my code for you to compile and then send back the executable (or whatever comes out) to me?

if someone can tell me \"ok mate i can help you out!\" it would be most appreciated. :)
it should take like... a few minutes

(or if i've got something wrong - and it isn't as easy as this... then please tell me how i am mis-speaking)





---------------


ok, in the file lib\\descent.h it's simply:

Code: Select all

// This is the default FOV 
 #define D3_DEFAULT_FOV     72.0 
 //This is the default zoom factor to be used for the game 3D view. 
 #define D3_DEFAULT_ZOOM     0.726f 

changed to:

Code: Select all

// This is the default FOV 
 #define D3_DEFAULT_FOV 105.0 
 //This is the default zoom factor to be used for the game 3D view. 
 #define D3_DEFAULT_ZOOM     1.303f 
maybe also some other FOV angles as well.
But to keep it simple since i barely know what i'm doing (instead of making an ingame selectable FOV) we'll just make up lots of seperate compiles with various FOV settings.

if anyone can help, please reply :)
this whole thing should take only a few minutes.
User avatar
CDN_Merlin
DBB_Master
DBB_Master
Posts: 9747
Joined: Thu Nov 05, 1998 12:01 pm
Location: Capital Of Canada

Post by CDN_Merlin »

D3 source code was released?
User avatar
roid
DBB Master
DBB Master
Posts: 9990
Joined: Sun Dec 09, 2001 3:01 am
Location: Brisbane, Australia
Contact:

Post by roid »

i dunno, there was tons of source code included in the D3edit1.1 source. probabaly for making mods.
if so, then it be a mod i be seekin to be makin!
User avatar
Grendel
3d Pro Master
3d Pro Master
Posts: 4390
Joined: Mon Oct 28, 2002 3:01 am
Location: Corvallis OR, USA

Post by Grendel »

The value is hardcoded into the game -- can change it only w/ the source code or by finding & patching all places where it's being used in the binary..
User avatar
aldel
DBB Ace
DBB Ace
Posts: 345
Joined: Sun May 28, 2000 2:01 am
Location: Boston, MA, USA
Contact:

Post by aldel »

roid wrote:this whole thing should take only a few minutes.
Famous last words.
User avatar
roid
DBB Master
DBB Master
Posts: 9990
Joined: Sun Dec 09, 2001 3:01 am
Location: Brisbane, Australia
Contact:

Post by roid »

Grendel wrote:The value is hardcoded into the game -- can change it only w/ the source code or by finding & patching all places where it's being used in the binary..
(highlighting by me)

*nod*
as i understand it, to make ANY compiled d3 mod you have to do exactly that. that's what mods are - edited and recompiled d3 code.

thus:

the descent.h file (included in the D3SDK) seems to have the FOV settings in it. If a mod can be compiled to include my modified descent.h file (simple modifications code-quoted in original post), then this should result in the mod having a modified FOV.

i don't know if any other mod has actually used a modified descent.h file before.
User avatar
Grendel
3d Pro Master
3d Pro Master
Posts: 4390
Joined: Mon Oct 28, 2002 3:01 am
Location: Corvallis OR, USA

Post by Grendel »

roid wrote:*nod*
as i understand it, to make ANY compiled d3 mod you have to do exactly that. that's what mods are - edited and recompiled d3 code.

thus:

the descent.h file (included in the D3SDK) seems to have the FOV settings in it. If a mod can be compiled to include my modified descent.h file (simple modifications code-quoted in original post), then this should result in the mod having a modified FOV.

i don't know if any other mod has actually used a modified descent.h file before.
No. Would be nice tho :) Mods are small programs that do things related to the game play getting information about the game status from the Descent program and relaying new information back. For that to work there needs to be consens about how the data is formated and what it means -- these definitions are written down in so called header files, descent.h is such a header file. It's part of the source code but only contains definitions that the actual code (eg. descent.c) includes during compile time.

So, descent.h defines the FOV setting during compile time and can be used by mods as a reference only. If you change the value you will have to recompile the Descent program (which is not included in the SDK :cry:) for it to have an effect.
User avatar
roid
DBB Master
DBB Master
Posts: 9990
Joined: Sun Dec 09, 2001 3:01 am
Location: Brisbane, Australia
Contact:

Post by roid »

that is useful to know thanks.

there is a lot more D3 source code (ie: more source than is included in the SDK) included with the D3Edit source download.
would it be possible to recompile D3 with a higher FOV using that code?

it's just that... i was told that it's relatively simple to change D3's FOV setting via tweaking it's code and recompiling. So i'm lead to beleive that there is enough source code publicly available online to perform such a feat - have i perhaps been fooled?
User avatar
SuperSheep
DBB Benefactor
DBB Benefactor
Posts: 935
Joined: Sun Jun 03, 2001 2:01 am
Location: Illinois

Post by SuperSheep »

Sorry Roid. If only that were the case, things would be a lot easier.

As Grendel said, those files are including as a reference. They are only header files and only enough .c and .cpp files to compile d3edit, not d3.

To actually change the FOV, you'll have to use a HEX editor and actually search for the hexadecimal representation of the floating point value 72.0. You'll have to find and replace this value in the main.exe file.

No mod has the ability to change hard coded values. Mod's only have access to that which they are given access which is the event system. Look at d3events.h to see what I'm talking about.

What you would need to actually compile the game would be every .cpp file. e.g., descent.cpp, aimain.cpp, etc.,.
Post Reply