![]() |
Show all 14 posts from this thread on one page |
VWBB (https://volitionwatch.game-warden.com/vwbb/index.php)
- FreeSpace 1/2 MODs Discussion (https://volitionwatch.game-warden.com/vwbb/forumdisplay.php?forumid=40)
-- A question about the source code... (https://volitionwatch.game-warden.com/vwbb/showthread.php?threadid=6058)
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?
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.
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.
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.
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.
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]
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]
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]!
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]!
quote:well if its on the engine's side of things, there should be a way to stick into the engine code right?
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.
__________________
[url="http://www.3dap.com/hlp/hosted/the158th/"]158th Banshee Squadron[/url]
quote:well if its on the engine's side of things, there should be a way to stick into the engine code right?
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.
__________________
[url="http://www.3dap.com/hlp/hosted/the158th/"]158th Banshee Squadron[/url]
Yeah, for D3D anyway. You're really only limited by the card's driver.
Yeah, for D3D anyway. You're really only limited by the card's driver.
thinks of a remapped Erinyes...*drools*
__________________
[url="http://www.3dap.com/hlp/hosted/the158th/"]158th Banshee Squadron[/url]
| All times are EST. The time now is 02:05 PM. | Show all 14 posts from this thread on one page |
Powered by: vBulletin Version 2.2.6
Copyright © Jelsoft Enterprises Limited 2000, 2001.