PDA

View Full Version : Wellington - ReadBifBuf_v22a



barocca
12-14-2002, 09:32
Wellington,
your request has been answered...
http://www.totalwar.org/forum/non-cgi/emoticons/pat.gif

Hi barocca,
One new option added.
ex: readbif -c7 -i act act (use 7FFF for the color table)

Default color table used FFFF now.

Have fun
RSW

New Version 22a - download (http://www.totalwar.org/Downloads/Mtw_Uploads/MTWupload/RSW_read_bif_buf_v22a.zip)
http://www.totalwar.org/forum/non-cgi/emoticons/wave.gif

Wellington
12-15-2002, 00:41
Barocca,

Looks good so far. The default appears to work ok (in respect the colours/palette) when importing BMPs. The new option -c7 also works - not that I'll be using this option.

One thing, when you export all BMPs and then import them (with no changes) the BIF becomes slightly smaller in size (by 5k or so). This may be explained by the reformatting of the frame headers bit I'll test a few re-constructed BIF's in game play to make sure nothings been 'lost' - I expect not, but there's no subsistute for testing (CA staff - are you listening? http://www.totalwar.org/forum/non-cgi/emoticons/wink.gif )

I'll let you know after testing. Many thanks B and pass my thanks on to RSW.

barocca
12-15-2002, 02:02
oh that was harsh Welly,
CA testing is limited to what Activision tell them they can do,
they do not like limited testing any more than we do,
they take pride in their work and would love to spend the time to make the game 100% stable and bug free,
At least there appears to be more testing done on what is a comprehensively more complex game than EA allowed them to do on Shogun.
Lets just hope that Activision allow them to continue with patches for the latest bugs...
(or some of them fall in love wth the online experience and make some unnoficial patches in their own time...)
we can dream, ay?

Wellington
12-15-2002, 09:23
Your quite right B,

Mind you it WAS a very tongue in cheek remark - note the smiley - http://www.totalwar.org/forum/non-cgi/emoticons/wink.gif

MTW is a very complex game and all kudo's to CA for what they produced (regardless of the incessant whining I've read in some threads on other forums). Then again, regardless of Activisions involvement testing is a bit like charity ...

... it start's at home

Wellington
12-15-2002, 09:27
... which reminds me of a joke

Q: How do you know when a British Airways jet has landed at Tullamarine ?

A: When they turn off the engines you can still hear the whining

(being Aussie I thought you'd like that http://www.totalwar.org/forum/non-cgi/emoticons/biggrin.gif )

barocca
12-15-2002, 09:52
um
Wellington,
i'm not sure how to tell you this...

i was born in the UK.
http://www.totalwar.org/forum/non-cgi/emoticons/biggrin.gif
(but i still like the joke, it was one of my mums favourites)
http://www.totalwar.org/forum/non-cgi/emoticons/biggrin.gif

Wellington
12-19-2002, 21:42
Barocca,

Ok, I've tested it in full now and it works fine - except for one minor "problem" with parsing the command line interface.

If either of your path names (for the BIFs or the extracted BMPs) contain spaces the parsing fails as it splits the parameters via spaces. Therefore, if your using Windows long path names AND any folder or file contains a space it will fail. Obviously this is'nt a problem with DOS short path names.

The workaround is to -
- use the DOS short path name for the BIFs locations (most programming languages can easily access this)
- either use the DOS short poath name for the extracted BMPs location or replace all spaces for this path with "_" (for example). After extracting the BMPs you can then rename the extracted BMP file names replacing the "_" with space characters.

Note: this is'nt a problem with figure image BIFs due to the naming convention (eg: 'PEASANT_H.BIF&#39http://www.totalwar.org/forum/non-cgi/emoticons/wink.gif, but is a problem with some other MTW BIF's (eg: the building BIF - 'Master Horse Breeder.BIF&#39http://www.totalwar.org/forum/non-cgi/emoticons/wink.gif.

Hope all that makes sense.

Thanks again,
Welly

barocca
12-19-2002, 21:49
Welly,
can you make your util check file names and if spaces are found rename them using underscores, and export a table of such file renames,
then
once the bif is built, import the table, rename the files and delete the table?

Wellington
12-19-2002, 23:13
B,

Don't quite follow you here. For what I'm doing Bifreader 2.2a does the job. Basically my utility extracts BMP frames from several BIF's (figure BIFs, building BIFs ect) but seldom re-builds the BIF. Within the util there are a few processes that can be run to extract/convert certain BIFs to BMPs. The util then uses the extracted/converted BMPs for its own purposes (eg: displaying building BMPs for any units tech tree, extracting figure image rectangles from the BMPs, displaying these figure image rectangles for units, superimposing weapons/shields on figure image rectangles etc).

The only occasion (at present&#33http://www.totalwar.org/forum/non-cgi/emoticons/wink.gif where a BIF requires rebuilding from BMPs is for figure images, if the user is copying weapons/shields from one place to another (one BMP to another). In this case the util rebuilds the hi res and lo res BIFs (after adding the new weapon/shield image into the extracted BMPs) and it's only at this point that I really need to ensure the MTW folder path for the BIFs is correct. Therefore I ALWAYS use the DOS short path name for this operation. As the figure BIFs never contain spaces - it does'nt matter - it always works (the util knows that the lo res BIF name will become 'peasan~1.bif' and the hi res 'peasen~2.bif&#39http://www.totalwar.org/forum/non-cgi/emoticons/wink.gif.

When the util runs a process for the first time to BMPs from BIFs, however, its a different story as there is no 'extracted BMP folder' to begin with - hence no DOS short path name Therefore thats when I play about replacing spaces in file names (as the util knows where the extracted folder should be it can work it out) - but as these extracted BMPs are only the utils 'internal usage' it's of no concern (I think&#33http://www.totalwar.org/forum/non-cgi/emoticons/wink.gif to the user.

Does that clarify things a little.