16 animation.PlayFrame(image);
18 surface = temp.GetSurface(0,0,null);
21 surface.Stretch(image, 0,0,0,0, temp.width, temp.height, image.width, image.height);
24 surface.Blit(image, 0,0,0,0, image.width, image.height);
27 if(animation.frame >= animation.numFrames)
36 property char * animation
41 if(!(animation.Load(value)))
42 Logf("Couldn't load animation %s.\n", value);
45 image.Allocate(null, animation.width, animation.height, 0, pixelFormat8, true);
46 temp.Allocate(null, animation.width, animation.height, 0, pixelFormat888, true);
49 animation.PlayFrame(image);
50 timer.delay = animation.speed;
60 void OnResize(int w, int h)
64 // temp.Allocate(null, w, h, 0, PixelFormatRGBA, false);
65 temp.Allocate(null, w, h, 0, PixelFormat888, false);
66 surface = temp.GetSurface(0,0,null);
67 surface.Stretch(image, 0,0,0,0, temp.width, temp.height,
68 image.width, image.height);
73 void OnRedraw(Surface surface)
75 if(animation.palUpdate)
77 display.SetPalette(animation.palette, false);
78 animation.palUpdate = false;
80 //surface.Blit(temp, 0,0,0,0,temp.width,temp.height);
81 // surface.Blit(image, 0,0,0,0,image.width,image.height);
82 surface.Stretch(temp, 0,0,0,0, clientSize.w, clientSize.h, temp.width,temp.height);
84 //surface.Stretch(image, 0,0,0,0, clientSize.w, clientSize.h, image.width,image.height);
93 bool OnKeyDown(Key key, unichar ch)