jacobpalm / costa

The Costa Graphical User Interface for MS-DOS and compatible systems
https://costa.jacobpalm.dk/
MIT License
103 stars 7 forks source link

add the ability to load icons from the .exe path #42

Closed natlus2 closed 2 months ago

natlus2 commented 6 months ago

Would it be possible to add .ICO files automatically to shortcuts?

That is, if when adding an icon, for example, "game1.exe", could it be done so that if a file called "game1.ico" is detected, the icon would be added?

I really don't know how to convert .ICO files to .BSV, I don't know if there is any program that converts them

or the option to select the .ico manually.

thank you so much

jacobpalm commented 4 months ago

Thanks for the request. It's not possible to use .ICO files directly, as Costa uses its own format for icons. .ICO support could be added, but it would be slow on older machines.

What I could do instead could maybe be to add an import function to the Icon Editor, to allow it to import a .ICO file into the editor and allow it to be saved as a .BSV. That would make it fairly easy to use 16-color .ICO files.

I'll look into this.

Axle-Ozz-i-sofT commented 4 months ago

I like this idea. I was looking into understanding the .BSV format that you are using with the aim of creating a converter in the future. That may be some time away for me though.

jacobpalm commented 2 months ago

I've looked into this and done some proof of concept code, and I am able to load 16-color icons sized 32x32 pixels.

The big challenge, however, is colors. The VGA graphics mode Costa uses has only 16 colors at any given time, and while I can load and display icons, their color palette rarely matches the 16-color palette Costa uses. Different icons even use different palettes, so adapting Costa isn't an option.

I can load the icon and display the colors as is, without changing palettes, but they will look terrible. It might be possible to add some code to find the nearest matching color, but the amount of work needed seems to exceed what I think is reasonable for this feature, and I'm not sure it will ever look truly good.

I'll park this issue for now, but might revisit it in the future.