Valhalla Legends Forums Archive | Battle.net Bot Development | Icons.bni

AuthorMessageTime
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.
April 27, 2005, 3:42 AM
Myndfyr
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.
April 27, 2005, 3:59 AM
UserLoser.
[quote author=Networks link=topic=11401.msg110097#msg110097 date=1114573340]
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.
[/quote]

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.
April 27, 2005, 4:50 AM
Arta
It's on BnetDocs too.
April 27, 2005, 1:14 PM
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 =\
April 27, 2005, 5:09 PM
Myndfyr
Not a problem ;)  If you have trouble with the posts or information you have found, link it here, and ask specific questions about it.  :)
April 27, 2005, 7:08 PM
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.
April 28, 2005, 6:00 AM
Ban
[quote]
We should make sure that our algorithms do not ...fail... under such occurances.
[/quote]
*gasp*
April 28, 2005, 2:53 PM
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)
April 28, 2005, 5:19 PM
UserLoser.
[quote author=Networks link=topic=11401.msg110277#msg110277 date=1114708785]
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)
[/quote]

that's listbox issue, not icon
April 28, 2005, 5:20 PM
QwertyMonster
[quote author=Networks link=topic=11401.msg110277#msg110277 date=1114708785]
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)
[/quote]

I get that on Starcraft too. Just scroll over again and they come back. I got use to it. :P
April 28, 2005, 7:24 PM
Networks
[quote author=QwertyMonster link=topic=11401.msg110286#msg110286 date=1114716249]
[quote author=Networks link=topic=11401.msg110277#msg110277 date=1114708785]
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)
[/quote]

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

Ugh, it's so annoying though.
April 28, 2005, 9:54 PM
Ban
You'll get over it.
April 29, 2005, 2:46 PM

Search