 |
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
|
04-26-2002 12:55 AM |
|
|
|  |
 |
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
|
04-26-2002 01:26 AM |
|
|
|  |
 |
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
|
04-26-2002 01:26 AM |
|
|
|  |
 |
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
|
04-26-2002 02:13 AM |
|
|
|  |
 |
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
|
04-26-2002 02:13 AM |
|
|
|  |
 |
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
|
04-26-2002 02:53 AM |
|
|
|  |
 |
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
|
04-26-2002 02:53 AM |
|
|
|  |
 |
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
|
04-26-2002 03:19 AM |
|
|
|  |
 |
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
|
04-26-2002 03:19 AM |
|
|
|  |
 |
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
|
04-26-2002 03:27 AM |
|
|
|  |
 |
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
|
04-26-2002 03:27 AM |
|
|
|  |
 |
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
|
04-26-2002 03:28 AM |
|
|
|  |
 |
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
|
04-26-2002 03:28 AM |
|
|
|  |
 |
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
|
04-26-2002 03:35 AM |
|
|
|  |
 |
| All times are EST. The time now is 08:36 AM. |
 |
|
 |
|
|
|  |
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
|
|
|
|
|
|