Page 1 of 1

LibGrf

Posted: 23 Oct 2003 14:39
by ChrisCF
Find attached some source code, which may or may not work, depending on where you are. So far, only support for action 8 pseudo-sprites is implemented (it was only 2-3 hours work - including testing, commenting, and de-fleaing*).

LibGrf is intended to be a set of tools and libraries for those dealing with grf files (most specifically the .nfo files). Its design goal is to provide a means by which people can write tools which take natural definitions (e.g. "Name:" or "Capacity:" etc.) and form the relevant stream of byte values that grfcodec expects in its .nfo format.

If anyone wants to contribute stuff, feel free. Patches against existing source files should be in unified diff format ("diff -ubr > myfile.diff"). If you don't have diff, and you're on Windows, go to http://www.cygwin.com and grab some stuff. Any modifications should also include changes to LibGrf.java in the places specified (namely to constants LIBGRF_VERSION and STATUS - the latter should be "CONTRIB").

Javadoc output is already included, for those that might be looking at developing other things based on LibGrf (not that there's anytyhing there right now).

Notes:

1. LibGrf is GPL'd. No reason why anyone else's code based on it shouldn't be either.

2. Patches should be in the correct format. On a good day, I might hack your incorrectly-submitted patch into a developent copy of code. On a bad day, I might reject it out of hand. You have been warned :)

3. I don't guarantee that this will work. import java.lang.Disclaimer; :)

Have fun.

* flea = a really small, but highly irritating bug

Posted: 23 Oct 2003 15:00
by orudge
Java? Bleh... I was hoping it'd be in a decent language like C. I could have made good use of it if it was. Ah well, never mind...

Posted: 23 Oct 2003 15:04
by ChrisCF
And you can't make use of it now because ... ?

Posted: 23 Oct 2003 15:17
by orudge
Because I can't be bothered to convert it. Even though it's probably mostly compatible. ;)

Posted: 23 Oct 2003 15:22
by ChrisCF
Maybe at some point, (when most of it is done) someone can write necessary command-line interfaces for it. Those that have downloaded it may find that there is already (very) basic support for dumping action 8 on the command line.

That said, if people went and wrote code in whatever language they use (assembler excepted), translated it into an natural-language algorithm that I could implement in Java, I'd still be happy to add them to the contributors list :).

I really could do with some other people to help work on this, some of the actions are still very confusing to me (I can't get my head around 2 or 3).

Posted: 23 Oct 2003 15:45
by troopper5
Sorry, but what is LibGrf?

Posted: 23 Oct 2003 15:47
by ChrisCF
Oops - IE crashed so many times, I just got sick and tired of typing the whole lot out again and again and again and again and ... you get the picture :)

Note to self - put things on CD for use on the Linux machines instead of Zip disks ...

Edited the top post with the information.

Incidentally, any suggestions on which action to tackle next, and who's volunteering to do them? :P

Posted: 20 Nov 2003 00:00
by mp3Pro
ummm how do you use this??

Great

Posted: 01 Jan 2004 09:08
by nwl4891
It is good to use java~~~~~

I want to join~~^_^

Posted: 06 Jan 2004 20:46
by ChrisCF
There is no "join", only "contribute". "Join" sounds too much like commitment :)
Feel free to write some code, preferably using what I've already done as a guide for coding standards, etc. Don't forget to read the Javadoc output handily included.
Ideally, some of the other actions I haven't done would be useful. In fact, I've already forgotten what I had done...

Ideally, if you change existing files I'd rather a patch than a full duplicate file, but I'm feeling generous. Haven't really had the time to work on this for a while.