Blitz3D and Resource Hack

Blitz3D Forums/Blitz3D Programming/Blitz3D and Resource Hack

FourtyTwo(Posted 2006) [#1]
I'm using Resource Hack to replace the "blitz red rocket" icon of my game to an icon I've created myself.

Now I got a really wierd problem:

The new icon is displayed correctly only when the 32x32 icon is called for. The old "rocket" icon is still displayed as the 16x16 icon of the program, no matter what I do.

Now, here comes the wierd part:

When looking at the executable with an icon extractor, it detects only one icon in the exe file: the new icon. So where does the 16x16 rocket icon comes from?

Any explanation of this mystery would be welcome.


kevin8084(Posted 2006) [#2]
You have both the icon and the icon group...replace the icon group with your new icon.


FourtyTwo(Posted 2006) [#3]
Already did that. Didn't work.


kevin8084(Posted 2006) [#4]
hmmm...worked on mine. You can try changing the icon in the runtime.dll file, as well. Your game might be getting the icon from that file.


FourtyTwo(Posted 2006) [#5]
Where's that file located?


kevin8084(Posted 2006) [#6]
in your blitz3d/bin directory


FourtyTwo(Posted 2006) [#7]
I tried deleting the file (temporarily), and the icon didn't change. So it isn't coming from there.

Not very surprising, though. I wouldn't expect a stand alone executable to fetch icons from external files.


kevin8084(Posted 2006) [#8]
it "could" unless you have your media, etc...packed into the executable. When you use resource hacker to change the icon, do you save/recompile the executable with the resource hacker?
***EDIT***
When you open your executable with a resource hacker, it shows you all of the resources inside of the executable. If you change an icon, for example, inside the executable and yet the icon still pops up, then there are only two possibilities:
1. The icon is still inside the .exe file
2. The icon is in an outside source.


FourtyTwo(Posted 2006) [#9]
Yes, I've saved the executable after changing the icon. Indeed, the new icon does show correctly on my desktop. It is only in the start menu, which uses 16x16 icons, where the old icon pops up.

I'm fully aware of the fact that the two options you've listed are the only possible explanations. That's exactly what's baffling me here.


kevin8084(Posted 2006) [#10]
I'd check the other blitz3d files for the rocket icon. It seems like the operating system is getting the 16x16 icon from somewhere other than your game executable.


FourtyTwo(Posted 2006) [#11]
Okay... this is getting really wierd.

When I rename the game executable, or move it to a different directory, the problem disappears.

What the heck is going on here?!


kevin8084(Posted 2006) [#12]
sounds almost like prefetch or registry...did you install your game and set up registry keys?


b32(Posted 2006) [#13]
Could be windows makes the 16x16 itself and updated it when you renamed/moved it.


Sokurah(Posted 2006) [#14]
FourtyTwo:

Windows has an icon cache where it stores icons, so that's why the problem disappears when you change the filename. It's butt annoying. :-)


Weetbix(Posted 2006) [#15]
Just search google for : Exe Icon replacer.


ShadowTurtle(Posted 2006) [#16]
Do you use an exe-zipper .. erm... data packer?

I think you make this:

1. Compile your program
2. Pack with resource/media/exe packer
3. Edit your resource from generated exe file

This is wrong. You must edit your resource before you convert an program (blitz exe) into an program (media/exe unpacker) :

1. Compile your program
2. Edit your resource from generated exe file
3. Pack with resource/media/exe packer


Jeppe Nielsen(Posted 2006) [#17]
I have also had this problem when changing the icon using resource hacker. In explorer mark the file and press f5, this updates the icon, atleast in explorer, I don't know if it will update it in the startmenu also. Worth a shot :-)


steve_ancell(Posted 2006) [#18]
I would be great if the Blitz3D IDE had a menu item for changing the rocket icon... Hmmm... Hello ! support team... Grovel, Grovel, Grovel. LOL


Jeppe Nielsen(Posted 2006) [#19]
You can alternative use resource hacker to change the icon, in the "runtime.dll", in the bin\ folder. This will them be used everytime you compile an exe.