Profile | Register | Calendar | FAQ | Search | Home 

VWBB : Powered by vBulletin version 2.2.6 VWBB > FreeSpace Watch > FreeSpace 1/2 MODs Discussion > A question about the source code...
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
YodaSean
I'm New! Laugh At Me!

Registered: Apr 2002
Location:
Posts: 5

A question about the source code...

I thought I knew a little about directX, but the freespace2 code is extremely confusing to me. Could anyone point out around where could I find the code that sets things like the window resolution, bit depth, etc. for the direct3D game window?

Last edited by YodaSean on 04-26-2002 at 12:55 AM

Report this post to a moderator | IP: Logged

Old Post 04-26-2002 12:55 AM
YodaSean is offline Click Here to See the Profile for YodaSean Click here to Send YodaSean a Private Message Visit YodaSean's homepage! Find more posts by YodaSean Add YodaSean to your buddy list Edit/Delete Message Reply w/Quote
EdrickV
Face

Registered: Apr 2002
Location:
Posts: 57

The starting function of the D3D code seems to be gr_d3d_init() in GrD3D.cpp. The display resolutions themselves seem to be defined in 2d.cpp's gr_init() using max_w and max_h which eventually gets passed to the video card. (After bouncing through functions and variables.) I'd say it's partly confusing because a lot of the same code is used by multiple programs. FRED2 and POFView both seem to use 2d.cpp for example.

__________________
The three most dangerous things in the world are a programmer with a sodering iron, a hardware type with a program patch, and a user with an idea.

Report this post to a moderator | IP: Logged

Old Post 04-26-2002 01:26 AM
EdrickV is offline Click Here to See the Profile for EdrickV Click here to Send EdrickV a Private Message Visit EdrickV's homepage! Find more posts by EdrickV Add EdrickV to your buddy list Edit/Delete Message Reply w/Quote
EdrickV
Face

Registered: Apr 2002
Location:
Posts: 57

The starting function of the D3D code seems to be gr_d3d_init() in GrD3D.cpp. The display resolutions themselves seem to be defined in 2d.cpp's gr_init() using max_w and max_h which eventually gets passed to the video card. (After bouncing through functions and variables.) I'd say it's partly confusing because a lot of the same code is used by multiple programs. FRED2 and POFView both seem to use 2d.cpp for example.

__________________
The three most dangerous things in the world are a programmer with a sodering iron, a hardware type with a program patch, and a user with an idea.

Report this post to a moderator | IP: Logged

Old Post 04-26-2002 01:26 AM
EdrickV is offline Click Here to See the Profile for EdrickV Click here to Send EdrickV a Private Message Visit EdrickV's homepage! Find more posts by EdrickV Add EdrickV to your buddy list Edit/Delete Message Reply w/Quote
daveb
Volition

Registered: Jul 2000
Location:
Posts: 105

Keep in mind, this is DirectX 5, not 7 or 8. Initializing it is a much more complicated process. Plus, FS2 is a game which has to be compatible across many different video cards. Safely initializing and setting things up for general compatibility is significantly more complicated than your average "learn DirectX in 2.5 minutes" book would lead you to believe

In addition to fiddling with grd3d.cpp, there's some things you'll need to change in the OsApi folder (window creation, etc).

And if you haven't done so yet - make sure to grab the newest zip file (posted ~3:45 pm today) which contains proper copyright info.

Last edited by daveb on 04-26-2002 at 02:15 AM

Report this post to a moderator | IP: Logged

Old Post 04-26-2002 02:13 AM
daveb is offline Click Here to See the Profile for daveb Click here to Send daveb a Private Message Find more posts by daveb Add daveb to your buddy list Edit/Delete Message Reply w/Quote
daveb
Volition

Registered: Jul 2000
Location:
Posts: 105

Keep in mind, this is DirectX 5, not 7 or 8. Initializing it is a much more complicated process. Plus, FS2 is a game which has to be compatible across many different video cards. Safely initializing and setting things up for general compatibility is significantly more complicated than your average "learn DirectX in 2.5 minutes" book would lead you to believe

In addition to fiddling with grd3d.cpp, there's some things you'll need to change in the OsApi folder (window creation, etc).

And if you haven't done so yet - make sure to grab the newest zip file (posted ~3:45 pm today) which contains proper copyright info.

Last edited by daveb on 04-26-2002 at 02:15 AM

Report this post to a moderator | IP: Logged

Old Post 04-26-2002 02:13 AM
daveb is offline Click Here to See the Profile for daveb Click here to Send daveb a Private Message Find more posts by daveb Add daveb to your buddy list Edit/Delete Message Reply w/Quote
ltnarol
Murdock

Registered: Dec 2001
Location: GTD Haydon
Posts: 357

hey dave, is it possible to change the resolution of the maps from 256 colors to say 512 or 1028 without hacking the 3d accelerator's registry? some way to hard code it into the game engine itself?

__________________
[url="http://www.3dap.com/hlp/hosted/the158th/"]158th Banshee Squadron[/url]

Report this post to a moderator | IP: Logged

Old Post 04-26-2002 02:53 AM
ltnarol is offline Click Here to See the Profile for ltnarol Click here to Send ltnarol a Private Message Visit ltnarol's homepage! Find more posts by ltnarol Add ltnarol to your buddy list Edit/Delete Message Reply w/Quote
ltnarol
Murdock

Registered: Dec 2001
Location: GTD Haydon
Posts: 357

hey dave, is it possible to change the resolution of the maps from 256 colors to say 512 or 1028 without hacking the 3d accelerator's registry? some way to hard code it into the game engine itself?

__________________
[url="http://www.3dap.com/hlp/hosted/the158th/"]158th Banshee Squadron[/url]

Report this post to a moderator | IP: Logged

Old Post 04-26-2002 02:53 AM
ltnarol is offline Click Here to See the Profile for ltnarol Click here to Send ltnarol a Private Message Visit ltnarol's homepage! Find more posts by ltnarol Add ltnarol to your buddy list Edit/Delete Message Reply w/Quote
ZylonBane
Face

Registered: Apr 2002
Location: Kansas City, KS
Posts: 134

The registry hack to get Freespace to use hires textures is to Freespace's registry keys, not the 3D card's.

__________________
ZylonBane's opinions do not reflect those of the management.
That's [url=http://home.att.net/~clay.h/fs2/violition.htm]VOLITION[/url]!

Report this post to a moderator | IP: Logged

Old Post 04-26-2002 03:19 AM
ZylonBane is offline Click Here to See the Profile for ZylonBane Find more posts by ZylonBane Add ZylonBane to your buddy list Edit/Delete Message Reply w/Quote
ZylonBane
Face

Registered: Apr 2002
Location: Kansas City, KS
Posts: 134

The registry hack to get Freespace to use hires textures is to Freespace's registry keys, not the 3D card's.

__________________
ZylonBane's opinions do not reflect those of the management.
That's [url=http://home.att.net/~clay.h/fs2/violition.htm]VOLITION[/url]!

Report this post to a moderator | IP: Logged

Old Post 04-26-2002 03:19 AM
ZylonBane is offline Click Here to See the Profile for ZylonBane Find more posts by ZylonBane Add ZylonBane to your buddy list Edit/Delete Message Reply w/Quote
ltnarol
Murdock

Registered: Dec 2001
Location: GTD Haydon
Posts: 357

quote:
Originally posted by ZylonBane
The registry hack to get Freespace to use hires textures is to Freespace's registry keys, not the 3D card's.
well if its on the engine's side of things, there should be a way to stick into the engine code right?

__________________
[url="http://www.3dap.com/hlp/hosted/the158th/"]158th Banshee Squadron[/url]

Report this post to a moderator | IP: Logged

Old Post 04-26-2002 03:27 AM
ltnarol is offline Click Here to See the Profile for ltnarol Click here to Send ltnarol a Private Message Visit ltnarol's homepage! Find more posts by ltnarol Add ltnarol to your buddy list Edit/Delete Message Reply w/Quote
ltnarol
Murdock

Registered: Dec 2001
Location: GTD Haydon
Posts: 357

quote:
Originally posted by ZylonBane
The registry hack to get Freespace to use hires textures is to Freespace's registry keys, not the 3D card's.
well if its on the engine's side of things, there should be a way to stick into the engine code right?

__________________
[url="http://www.3dap.com/hlp/hosted/the158th/"]158th Banshee Squadron[/url]

Report this post to a moderator | IP: Logged

Old Post 04-26-2002 03:27 AM
ltnarol is offline Click Here to See the Profile for ltnarol Click here to Send ltnarol a Private Message Visit ltnarol's homepage! Find more posts by ltnarol Add ltnarol to your buddy list Edit/Delete Message Reply w/Quote
daveb
Volition

Registered: Jul 2000
Location:
Posts: 105

Yeah, for D3D anyway. You're really only limited by the card's driver.

Report this post to a moderator | IP: Logged

Old Post 04-26-2002 03:28 AM
daveb is offline Click Here to See the Profile for daveb Click here to Send daveb a Private Message Find more posts by daveb Add daveb to your buddy list Edit/Delete Message Reply w/Quote
daveb
Volition

Registered: Jul 2000
Location:
Posts: 105

Yeah, for D3D anyway. You're really only limited by the card's driver.

Report this post to a moderator | IP: Logged

Old Post 04-26-2002 03:28 AM
daveb is offline Click Here to See the Profile for daveb Click here to Send daveb a Private Message Find more posts by daveb Add daveb to your buddy list Edit/Delete Message Reply w/Quote
ltnarol
Murdock

Registered: Dec 2001
Location: GTD Haydon
Posts: 357

thinks of a remapped Erinyes...*drools*

__________________
[url="http://www.3dap.com/hlp/hosted/the158th/"]158th Banshee Squadron[/url]

Report this post to a moderator | IP: Logged

Old Post 04-26-2002 03:35 AM
ltnarol is offline Click Here to See the Profile for ltnarol Click here to Send ltnarol a Private Message Visit ltnarol's homepage! Find more posts by ltnarol Add ltnarol to your buddy list Edit/Delete Message Reply w/Quote
All times are EST. The time now is 02:16 PM. Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Subscribe to this Thread

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 
Contact Us - Volition Watch >
Powered by: vBulletin Version 2.2.6 - Copyright ©2000-2002, Jelsoft Enterprises Limited.