Window icons

New updates bring SIEGE to version 0.4.0:

  • initialization has been changed so that it no longer opens a window by itself (thus, the number of parameters has been reduced to 1 – flags)
  • new API added to leverage SIEGE’s image loading functionality directly
  • window icon functionality added (by request from bernardh)

Here’s a short example of the new API:

// old initialization
// sgInit(width, height, bpp, flags);

// new initialization (we'll open the window later)

// image loading
SGImageData* idata = sgImageDataCreateFile("data/sprites/whatever.png");
 * Set the icon (this has to be done *before* the window is opened).
 * Note that in Windows, this is required to be 32x32; also note that there might
 * be some changes in the API in the future.

// now we can finally open the window!
sgWindowOpen(width, height, bpp, flags);

And finally, a screenshot:

Example of the window icon functionality in SIEGE - note the small yellow icon in the top-left.

Posted in SIEGE.