#4239132 - 03/12/16 02:41 PM
Glide 3 graphics
|
Joined: Jun 2001
Posts: 13,341
Col. Gibbon
A nobody
|
A nobody
Veteran
Joined: Jun 2001
Posts: 13,341
|
I was just wondering, as Glide 3 happily uses BMP files, in 256x256 and 512x512 24bit, do we really need 8bit support in TPC format anymore?
Any old TPC and easily be converted to BMP, and a lot of more modern skins are BMP anyway, and by not loading TPC's a large chunk of memory would be saved, and make the game load faster.
Win, Win?
Supports EAW 1.29.exe, Drop in and Play Technology. 1.29 download
|
|
#4239166 - 03/12/16 06:26 PM
Re: Glide 3 graphics
[Re: Col. Gibbon]
|
Joined: Jun 2001
Posts: 13,341
Col. Gibbon
A nobody
|
A nobody
Veteran
Joined: Jun 2001
Posts: 13,341
|
No Ray, just converting an 8bit PCX to 24bit BMP. You can batch convert files in PSP. But, it would take a code change to stop the exe looking for 8bit TPC/PCX files and only look for BMP. The only snag I can think of are the TRA files, which are not the same as BMP standard 24bit Greyscale Tra. We would have to think of a way of loading them, alongside the BMP skins. I wonder if we could use 24bit screens now?
Supports EAW 1.29.exe, Drop in and Play Technology. 1.29 download
|
|
#4239333 - 03/13/16 10:22 AM
Re: Glide 3 graphics
[Re: Col. Gibbon]
|
Joined: Apr 2002
Posts: 12,497
MrJelly
Veteran
|
Veteran
Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
|
Thanks Allen. That is what I suspected too I wonder if we could use 24bit screens now? The TPC search is part of the sequence of D3D loading routines which then loads the BMP file if available. It is not involved in the display of selection screens. Separate routines do this, based on "*.MNU" files which often reference the screen to be used such as "Main2.pic" and the resolution. This is read from the referenced picture in a routine which reads TPC/PIC/MPC files. The game will CTD if the resolution of the picture does not match the resolution defined in the MNU file. It is a very complex series of inter-related routines, and this is why nobody has ever been able to replace the system with one that reads and displays BMP screens
Fly EAW online at GameRanger: GameRanger SiteFaceBook Pages UAW 160 downloadsEAW ClubMark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.I am now of an age at which I no longer need to suffer fools gladly
|
|
#4239388 - 03/13/16 03:04 PM
Re: Glide 3 graphics
[Re: Col. Gibbon]
|
Joined: Apr 2002
Posts: 12,497
MrJelly
Veteran
|
Veteran
Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
|
Here are some edited code lines:
if (low_res_object_texture)
{
// 3dz files use .pcx extension even though we are using pic/tpc/mpc
len = strlen(P) - 4;
//reads the length of the name of the file referenced in the 3dz header and shortens it by 4 characters
strncpy(texture_name, P, len);
// creates the base file name
strcat(texture_name, "s.tpc");
// adds "s.tpc" to the base filename to define the low-res texture filename
You would recall that most 3dz files have a header with the ".PCX" extension such as "GRND02.PCX" The routine reads it to build a filename four characters shorter, making "GRND02" If it is low res then "s.TPC" is added making "GRND02s.TPC" This is the low res file that the exe will look for when low res is needed, and report missing if not found. Similar routines are used to build hi-res filenames and aircraft texture filenames from the 3dz header. If you make it add ".BMP" instead of ".tpc" the exe compiles, but crashes as soon as it cannot find the ".bmp" file it is looking for. In later routines if it finds the tpc file it checks for a bmp file with the same name and uses it:
len = strlen(texture->Name); // get the length of the file name
strncpy(Mf_name, texture->Name, len); // copy that many charactures to my file name and
// change the extension
Mf_name[len-3] = 'b';
Mf_name[len-2] = 'm';
Mf_name[len-1] = 'p';
Mf_name[ len ] = '\0'; // add an ending null character
if ( (fp = Copen( Mf_name, O_RDONLY | O_BINARY)) != -1) // file FOUND
Fly EAW online at GameRanger: GameRanger SiteFaceBook Pages UAW 160 downloadsEAW ClubMark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.I am now of an age at which I no longer need to suffer fools gladly
|
|
#4239648 - 03/14/16 09:46 AM
Re: Glide 3 graphics
[Re: Col. Gibbon]
|
Joined: Apr 2002
Posts: 12,497
MrJelly
Veteran
|
Veteran
Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
|
An interesting result. There were no Planem.3dz or Planes.3dz files in the folder. It ran perfectly. Then I switched to a previous exe (which has the loading routine for 'm' and 's' files active) and it still ran perfectly. I now realise that the exe only loads a 3dz file if it is present. It only spits the dummy if it loads a 3dz file but cannot find the referenced TPC file. In all I deleted 3104 files from the 140 folder for this test
Fly EAW online at GameRanger: GameRanger SiteFaceBook Pages UAW 160 downloadsEAW ClubMark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.I am now of an age at which I no longer need to suffer fools gladly
|
|
#4239656 - 03/14/16 10:43 AM
Re: Glide 3 graphics
[Re: Col. Gibbon]
|
Joined: Apr 2002
Posts: 12,497
MrJelly
Veteran
|
Veteran
Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
|
I just made this change
if (low_res_object_texture)
{
// 3dz files use .pcx extension even though we are using pic/tpc/mpc
len = strlen(P) - 4;
//reads the length of the name of the file referenced in the 3dz header and shortens it by 4 characters
strncpy(texture_name, P, len);
// creates the base file name
//strcat(texture_name, "s.tpc");
strcat(texture_name, ".tpc");
// Now adds ".tpc" and not "s.tpc" to the base filename to define the low-res texture filename
If a lo-res load occurs and the hi-res file is "MYTEXT.TPC" it loads "MYTEXT.TPC" and not "MYTEXTs.TPC". So it does not spit the dummy if the "MYTEXTs.TPC" file is missing. I temporarily removed several TMod "*.s.3dz" files from "FullMata", and there was no problem. With these changes there seems to be no detrimental effect on display, and if anything it seems better. The big bonus is that (at least for 140) modders no longer need to make these files as they are no longer used
Fly EAW online at GameRanger: GameRanger SiteFaceBook Pages UAW 160 downloadsEAW ClubMark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.I am now of an age at which I no longer need to suffer fools gladly
|
|
#4239676 - 03/14/16 12:23 PM
Re: Glide 3 graphics
[Re: Col. Gibbon]
|
Joined: Apr 2002
Posts: 12,497
MrJelly
Veteran
|
Veteran
Joined: Apr 2002
Posts: 12,497
Montagnac, L'Herault, France
|
Viewing distances were fine That last code I quoted had the change which made the lo-res TMod "s.tpc" unnecessary. I have also remmed out the loading of the TMod L.3dz. It is easy enough for me to put these changes into 1.28 exes The best way is to stop the three 3dzs (Aircraft M, S and TMod L) that we do not want to use from being loaded. Otherwise if you leave one out of a new TMod set of files the 1.28 series exes may use the one in the "3d.CDF" which potentially could cause a problem. If a 3dz is not loaded, then neither is the TPC that it references.
Fly EAW online at GameRanger: GameRanger SiteFaceBook Pages UAW 160 downloadsEAW ClubMark Twain: I am quite sure now that often, very often, in matters concerning religion and politics a man's reasoning powers are not above the monkey's.I am now of an age at which I no longer need to suffer fools gladly
|
|
#4239723 - 03/14/16 03:04 PM
Re: Glide 3 graphics
[Re: Col. Gibbon]
|
Joined: Jun 2001
Posts: 13,341
Col. Gibbon
A nobody
|
A nobody
Veteran
Joined: Jun 2001
Posts: 13,341
|
We discussed this a long time ago when there was a much bigger active community, and at the time the EAW way of distance modelling was found to be best. OK, graphics cards are better, so as long as the FPS are not hit, dropping the M & L 3dz's can be argued as an improvement. but I remember VBH doing a hack with a 1.2 exe, and deleting the L and extending the view range made the FPS run at less than 10 FPS. At the time, the reason was given that the exe used a lot of CPU, and very little Graphics memory, and this caused a blockage, which slowed the game down. Since we went Glide 3, this problem seems to have improved, but I'd like to see how it runs with a maxed out planes formation, set at low level, and flying close to the ground so Tmods are all visible. That will show the effect of dropping all of those Tmods and M/S3dz's.
Supports EAW 1.29.exe, Drop in and Play Technology. 1.29 download
|
|
|
|