• Welcome to Valhalla Legends Archive.
 

Icons.bni

Started by Networks, April 26, 2005, 10:42 PM

Previous topic - Next topic

Networks

Does anyone know how to go about extracting the icons and placing them into a listview. Any other advise or information or whatever is appreciated.

MyndFyre

Let me post this before the flame-fest starts.

Use the Search feature.  This is extremely, extremely well-documented and discussed here.  Check out the Search link on top, and there is information at The Disclaimer (http://botdev.valhallalegends.com/) about it.  There's also a link to Kane's description of the process of extraction somewhere.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

UserLoser.

Quote from: Networks on April 26, 2005, 10:42 PM
Does anyone know how to go about extracting the icons and placing them into a listview. Any other advise or information or whatever is appreciated.

Yes, read documentation or figure it out your self.  Using document (or self knowledge), read the bni file and the tga inside it.  After reading the tga, and of course, decompressing it if needed, then you can create an image list, or use an existing one, or just create a dib or bitmap and store it away somewhere.  When that's done, then you will need to simply subclass your list view and set the style to include be fixed owner drawn list view (and whatever else you prefer and/or require, of course).  When you're done with that, then you simply capture the WM_MEASUREITEM and WM_DRAWITEM messages in the subclass function and set the appropriate widths, heights, fonts, colors, etc., and draw the icons needed.  Simple enough, hope this helps.

Arta

It's on BnetDocs too.

Networks

Wow, major mistake. Apparently I did use the search button but it wasn't finding anything? I don't know what happened it was at my house and I was in a rush and I didn't even think of bnetdocs. I found all the posts now all of sudden. *shrugs* Anyhow I am sorry =\

MyndFyre

Not a problem ;)  If you have trouble with the posts or information you have found, link it here, and ask specific questions about it.  :)
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

tA-Kane

It would probably be prudent to review the possibilities of icons.bni. For example, you may recall or notice that no icon contains both a flag value and a product value. In fact, I noted in my document that a product (list) is only included in an icon's header if the flags for it is zero. What if an icon had both a flags value and a product list? I would imagine that the proper way to handle such a thing would be to make sure that the user has both the flags and (one of) the product(s in the list). Also, I have not ever seen a BNI file which contains icons of varying widths or heights (eg one icon being 14 pixels tall and another being 10), nor have I seen a BNI file whose icon headers' widths or heights are too wide or high compared to the embedded TGA file. I think that some filling would be done there -- making the invalid area black (if the icon is too wide or tall for the TGA), or clipping would be done, if the TGA is too wide or tall for the icon. Remember that since the TGA is stored in a run-length compressed format, you must skip the pixels for the clipped area, or else you would end up with a garbage picture (or skewed, at best).

I wonder how Blizzard's clients would react to such occurances? While ultimately we cannot control Blizzard's clients, we can control ours. We should make sure that our algorithms do not ...fail... under such occurances.
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Ban

Quote
We should make sure that our algorithms do not ...fail... under such occurances.
*gasp*

Networks

Does anyone think that maybe Blizzard is screwing up their own icons because I noticed that in the client most of the time you don't see the product icon. This occurs for me at least on Starcraft. You see a couple but as you scroll down you don't. Does this happen to anyone else. (or does anyone even get on the client anymore :P)

UserLoser.

Quote from: Networks on April 28, 2005, 12:19 PM
Does anyone think that maybe Blizzard is screwing up their own icons because I noticed that in the client most of the time you don't see the product icon. This occurs for me at least on Starcraft. You see a couple but as you scroll down you don't. Does this happen to anyone else. (or does anyone even get on the client anymore :P)

that's listbox issue, not icon

QwertyMonster

Quote from: Networks on April 28, 2005, 12:19 PM
Does anyone think that maybe Blizzard is screwing up their own icons because I noticed that in the client most of the time you don't see the product icon. This occurs for me at least on Starcraft. You see a couple but as you scroll down you don't. Does this happen to anyone else. (or does anyone even get on the client anymore :P)

I get that on Starcraft too. Just scroll over again and they come back. I got use to it. :P

Networks

Quote from: QwertyMonster on April 28, 2005, 02:24 PM
Quote from: Networks on April 28, 2005, 12:19 PM
Does anyone think that maybe Blizzard is screwing up their own icons because I noticed that in the client most of the time you don't see the product icon. This occurs for me at least on Starcraft. You see a couple but as you scroll down you don't. Does this happen to anyone else. (or does anyone even get on the client anymore :P)

I get that on Starcraft too. Just scroll over again and they come back. I got use to it. :P

Ugh, it's so annoying though.

Ban

You'll get over it.