///////////////////////////////////////////// // // // "Christmas Scene" // // - by - // // Bob Bishop // // // // (Designed for 1024x768 graphics mode) // // // ///////////////////////////////////////////// Ultra-SiMPLE hide mouse xc=xpixels()/2; yc=ypixels()-384 // // Draw the Stars // cls; stars @toys // // Draw the Moon // solid color (14) solid circle (xc-300, yc-156, 30) solid color (0) solid circle (xc-314, yc-160, 34) // // Draw the Ground // Do k=0,240 line color (rgb(255-k,255-k,255-(9*k)/10)) line (0, ypixels()-k, xpixels(), ypixels()-k) Loop // // Draw the Horizon // seed (42) lo=ypixels()-240; hi=lo-35 y=(lo+hi)/2 line color (rgb(15,15,39)) Do x=0,xpixels()-1 g=lo-random(lo-hi) If (y>g) y=y-random(2) Else y=y+random(2) line (x, lo, x, y) Loop // // Draw the Snowman // solid color (rgb(144,144,144)) solid circle (xc+340, yc+220, 55) solid circle (xc+340, yc+145, 40) solid circle (xc+340, yc+95, 22) solid color (0) solid ellipse (xc+334, yc+93, 4, 2) solid ellipse (xc+346, yc+93, 4, 2) solid ellipse (xc+340, yc+104, 8, 2) solid color (rgb(32,32,32)) line color (rgb(64,64,64)) filled rectangle (xc+328, yc+77, xc+352, yc+52) line (xc+315, yc+78, xc+365, yc+78) // // Draw the Christmas Trees // Call image (xc-445, yc+140, 0.10, 1) @ Call image (xc-350, yc+140, 0.35, 1) @ Call image (xc-225, yc+140, 0.20, 1) @ Call image (xc+225, yc+140, 0.21, 1) @ Call image (xc+445, yc+140, 0.12, 1) @ Call image (xc, yc, 0.90, 1) @ // // Draw the Frame // frame // phase=0 Do // // Flash the Star of Bethlehem // line color (9+random(7)) line (xc+256, yc-256, xc+276, yc-256) line color (9+random(7)) line (xc+266, yc-266, xc+266, yc-236) line color (9+random(7)) line (xc+262, yc-261, xc+271, yc-251) line color (9+random(7)) line (xc+262, yc-251, xc+271, yc-261) z=128+random(128); solid color (rgb(z,z,z)) solid circle (xc+266, yc-256, 2) // // Flash the Star of David // If (phase<25) solid color (8) Else solid color (15) solid triangle (-15*mag+xc, -335*mag+yc, 15*mag+xc, -335*mag+yc, -1*mag+xc, -358*mag+yc) solid triangle (-15*mag+xc, -350*mag+yc, 14*mag+xc, -350*mag+yc, 0*mag+xc, -326*mag+yc) // // Move the Snowman's Lips // line color (rgb(144,144,144)); solid color (0) If (phase>17 And phase<43) solid ellipse (xc+340, yc+104, 8, 2) Else filled ellipse (xc+340, yc+104, 8, 2) // // Flash the Christmas Tree Lights (which were created with SiMPAINT) // x=xc; y=yc; mag=0.9 line color (0) If phase=12 solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (-23*mag+x, -249*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (-114*mag+x, 316*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (8*mag+x, -298*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (-99*mag+x, 16*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (-158*mag+x, 190*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (75*mag+x, -111*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (35*mag+x, -219*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (-28*mag+x, -175*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (-51*mag+x, 149*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (-28*mag+x, -33*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (-14*mag+x, 320*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (178*mag+x, 318*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (142*mag+x, 154*mag+y, 4*mag) Endif If phase=37 solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (19*mag+x, -108*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (90*mag+x, 292*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (128*mag+x, 251*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (32*mag+x, 247*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (-62*mag+x, 247*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (56*mag+x, 170*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (-94*mag+x, 109*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (7*mag+x, 41*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (102*mag+x, 64*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (56*mag+x, -45*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (-59*mag+x, -88*mag+y, 4*mag) solid color (rgb(74,74,74)); If (random(100)>50) solid color (15) filled circle (32*mag+x, -146*mag+y, 4*mag) Endif // If (readkey(27)) Break //Was the 'Esc' key pressed? phase=(phase+1)%50 delay (10) Loop // // Explode the Snowman! // explode (xc+340, yc+95) @toys quit // // Christmas Tree Task // (Made with SiMPAINT) // Task image (Int x, Int y, Float mag, Int flag) If (flag) zz=mag Else zz=1.0 line size (1*zz+0.5) line color (rgb(128,128,128)) solid color (rgb(128,128,128)) point color (rgb(128,128,128)) solid color (rgb(0,120,20)) solid triangle (-40*mag+x, -275*mag+y, 40*mag+x, -275*mag+y, 0*mag+x, -335*mag+y) solid triangle (55*mag+x, -225*mag+y, -55*mag+x, -225*mag+y, 0*mag+x, -325*mag+y) solid triangle (-76*mag+x, -175*mag+y, 76*mag+x, -175*mag+y, 0*mag+x, -301*mag+y) solid triangle (-95*mag+x, -100*mag+y, 95*mag+x, -100*mag+y, 0*mag+x, -275*mag+y) solid triangle (-110*mag+x, -37*mag+y, 110*mag+x, -37*mag+y, 0*mag+x, -225*mag+y) solid triangle (-125*mag+x, 25*mag+y, 125*mag+x, 25*mag+y, 0*mag+x, -188*mag+y) solid triangle (-150*mag+x, 102*mag+y, 150*mag+x, 102*mag+y, 0*mag+x, -172*mag+y) solid triangle (-175*mag+x, 200*mag+y, 175*mag+x, 200*mag+y, 0*mag+x, -165*mag+y) solid triangle (-200*mag+x, 267*mag+y, 200*mag+x, 267*mag+y, 0*mag+x, -49*mag+y) solid triangle (-205*mag+x, 333*mag+y, 205*mag+x, 333*mag+y, 0*mag+x, -107*mag+y) solid color (rgb(110,57,2)) solid rectangle (-15*mag+x, 333*mag+y, 15*mag+x, 375*mag+y) line color (rgb(0,0,0)) solid color (rgb(247,16,8)) filled circle (-95*mag+x, 167*mag+y, 10*mag) filled circle (57*mag+x, -79*mag+y, 10*mag) filled circle (85*mag+x, 246*mag+y, 10*mag) solid color (rgb(72,66,243)) filled circle (-40*mag+x, -198*mag+y, 10*mag) filled circle (33*mag+x, 88*mag+y, 10*mag) filled circle (-57*mag+x, 294*mag+y, 10*mag) solid color (rgb(36,255,0)) filled circle (-63*mag+x, -11*mag+y, 10*mag) filled circle (150*mag+x, 299*mag+y, 10*mag) filled circle (-10*mag+x, 172*mag+y, 10*mag) filled circle (16*mag+x, -242*mag+y, 10*mag) solid color (rgb(218,255,0)) filled circle (96*mag+x, 122*mag+y, 10*mag) filled circle (-149*mag+x, 292*mag+y, 10*mag) filled circle (-24*mag+x, -124*mag+y, 10*mag) filled circle (-73*mag+x, 68*mag+y, 10*mag) solid color (rgb(171,2,84)) filled circle (15*mag+x, -4*mag+y, 10*mag) filled circle (-14*mag+x, 227*mag+y, 10*mag) filled circle (23*mag+x, -179*mag+y, 10*mag) solid color (rgb(255,140,0)) filled circle (29*mag+x, 292*mag+y, 10*mag) filled circle (118*mag+x, 188*mag+y, 10*mag) filled circle (-99*mag+x, 230*mag+y, 10*mag) filled circle (77*mag+x, -3*mag+y, 10*mag) filled circle (-36*mag+x, 103*mag+y, 10*mag) filled circle (-26*mag+x, -64*mag+y, 10*mag) filled circle (-105*mag+x, -28*mag+y, 10*mag) filled circle (-146*mag+x, 106*mag+y, 10*mag) solid color (rgb(247,16,8)) filled circle (-74*mag+x, -170*mag+y, 10*mag) filled circle (-194*mag+x, 272*mag+y, 10*mag) filled circle (142*mag+x, 106*mag+y, 10*mag) solid color (rgb(0,0,253)) filled circle (105*mag+x, -28*mag+y, 10*mag) filled circle (192*mag+x, 275*mag+y, 10*mag) solid color (rgb(218,255,0)) filled circle (69*mag+x, -168*mag+y, 10*mag) filled circle (-30*mag+x, -273*mag+y, 10*mag) solid color (rgb(247,16,8)) filled circle (33*mag+x, -271*mag+y, 10*mag) filled circle (202*mag+x, 338*mag+y, 10*mag) solid color (rgb(36,255,0)) filled circle (-199*mag+x, 340*mag+y, 10*mag) solid color (rgb(12,6,243)) filled circle (75*mag+x, 340*mag+y, 10*mag) solid color (rgb(218,255,0)) filled circle (-82*mag+x, 342*mag+y, 10*mag)