AGS 3.3. beta 10 DynamicSprite.CreateFromFile broken?

Started by abstauber, Thu 14/11/2013 09:20:38

Previous topic - Next topic

abstauber

Am I doing it wrong or is this function broken?

Code: AGS
  
  String fs = "myimage.bmp";
  if (File.Exists(fs)) {
    DynamicSprite* sprite = DynamicSprite.CreateFromFile(fs);
    DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
    surface.DrawImage(100, 80, sprite.Graphic);
    surface.Release();
    sprite.Delete();
  }

This works fine in AGS 3.2.1, but in AGS 3.3 the dynamic sprite stays null and DrawImage fails.

Crimson Wizard

Bitmap loading function returns error even if succeeded, so DynamicSprite is never initialized :-[.
Fixed now, will update beta soon.

abstauber

Great, thanks!
Btw. just in case bmp and pcx are treated differently - please fix it for pcx is well :)

SMF spam blocked by CleanTalk