Advertisement
AngryPacman

PAC Weather

Jul 29th, 2011
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 50.19 KB | None | 0 0
  1. #===============================================================================
  2. #
  3. # Pacman Advanced Creative (PAC) Engine -  Weather
  4. # 5/6/2011
  5. # Type: System
  6. # Installation: Optional values, script calls.
  7. # Level: Average, Difficult, Insane
  8. # With: Ccoa
  9. #
  10. #===============================================================================
  11. #
  12. # Description:
  13. # VX offers only three weather effects. I'll take some of the burden off of you
  14. # by giving you this handy comprehensive weather script.
  15. #
  16. #===============================================================================
  17. #
  18. # Instructions:
  19. # INSTALLATION
  20. # Paste above main, below materials, remember to save.
  21. # SCRIPT CALLS
  22. # To change the weather, use the following script call:
  23. # screen.weather(type, power, hue)
  24. # The types are:
  25. #   1 - rain
  26. #   2 - storm
  27. #   3 - snow
  28. #   4 - hail
  29. #   5 - rain with thunder and lightning
  30. #   6 - falling leaves
  31. #   7 - blowing leaves
  32. #   8 - swirling leaves
  33. #   9 - falling green leaves
  34. #   10 - cherry blossom petals
  35. #   11 - rose petals
  36. #   12 - feathers
  37. #   13 - blood rain
  38. #   14 - sparkles
  39. #   15 - user defined
  40. # Power is an integer from 0-40. 0 = no weather, 40 = 400 sprites.
  41. # Hue, of course, is the hue of the weather.
  42. #
  43. # VALUES
  44. # For usage of user-defined weather, look at the following values:
  45. #
  46. #===============================================================================
  47.  
  48. #===============================================================================
  49. # BEGIN EDITING
  50. #===============================================================================
  51.  
  52. $WEATHER_UPDATE = false   # If true, updates the WEATHER_IMAGES array.
  53.  
  54. module PAC                # Don't touch the below line.
  55.   module SYSTEM           # Don't touch the above line.
  56.    
  57. WEATHER_IMAGES = []       # Array of images to use. Place in ""s, use commas.
  58. WEATHER_X = 0             # The number of pixels the image moves horizontally.
  59. WEATHER_Y = 0             # The number of pixels the image moves vertically.
  60. WEATHER_FADE = 0          # How much (0-255) the image should fade per update.
  61. WEATHER_ANIMATED = false  # Cycle through all the images in the array?
  62.  
  63. #===============================================================================
  64. # CEASE EDITING
  65. #===============================================================================
  66.  
  67.   end
  68. end
  69.  
  70. #==============================================================================
  71. # ** Spriteset_Weather
  72. #------------------------------------------------------------------------------
  73. #  Weather effect (rain, storm, snow) class. This class is used within the
  74. # Spriteset_Map class.
  75. #==============================================================================
  76.  
  77. class Spriteset_Weather
  78.   #--------------------------------------------------------------------------
  79.   # * Public Instance Variables
  80.   #--------------------------------------------------------------------------
  81.   attr_reader :type
  82.   attr_reader :max
  83.   attr_reader :ox
  84.   attr_reader :oy
  85.   #--------------------------------------------------------------------------
  86.   # * Object Initialization
  87.   #--------------------------------------------------------------------------
  88.   def initialize(viewport = nil)
  89.     @type = 0; @max = 0; @ox = 0; @oy = 0; @count = 0; @current_pose = []
  90.     @info = []; @countarray = []; make_bitmaps; @sprites = []
  91.     for i in 1..500
  92.       sprite = Sprite.new(viewport); sprite.visible = false; sprite.opacity = 0
  93.       @sprites.push(sprite); @current_pose.push(0); @info.push(rand(50))
  94.       @countarray.push(rand(15))
  95.     end
  96.   end
  97.   #--------------------------------------------------------------------------
  98.   # * Dispose
  99.   #--------------------------------------------------------------------------
  100.   def dispose
  101.     for sprite in @sprites; sprite.dispose; end
  102.     @rain_bitmap.dispose; @storm_bitmap.dispose; @snow_bitmap.dispose
  103.     @hail_bitmap.dispose; @petal_bitmap.dispose; @blood_rain_bitmap.dispose
  104.     for image in @autumn_leaf_bitmaps; image.dispose; end
  105.     for image in @green_leaf_bitmaps; image.dispose; end
  106.     for image in @rose_bitmaps; image.dispose; end
  107.     for image in @feather_bitmaps; image.dispose; end
  108.     for image in @sparkle_bitmaps;image.dispose; end
  109.     for image in @user_bitmaps; image.dispose; end
  110.     $WEATHER_UPDATE = true
  111.   end
  112.   #--------------------------------------------------------------------------
  113.   # * Set weather type
  114.   #     type : new weather type
  115.   #--------------------------------------------------------------------------
  116.   def type=(type)
  117.     return if @type == type
  118.     @type = type
  119.     case @type
  120.     when 1  # Rain
  121.       bitmap = @rain_bitmap
  122.     when 2  # Storm
  123.       bitmap = @storm_bitmap
  124.     when 3  # Snow
  125.       bitmap = @snow_bitmap
  126.     when 4  # Hail
  127.       bitmap = @hail_bitmap
  128.     when 5  # Rain, thunder, lightning
  129.       bitmap = @rain_bitmap; @thunder = true
  130.     when 6,7,8  # Falling, blowing, swirling autumn leaves
  131.       bitmap = @autumn_leaf_bitmaps[0]
  132.     when 9  # Falling green leaves
  133.       bitmap = @green_leaf_bitmaps[0]
  134.     when 10 # Cherry Blossoms
  135.       bitmap = @petal_bitmap
  136.     when 11 # Roses
  137.       bitmap = @rose_bitmaps[0]
  138.     when 12 # Feathers
  139.       bitmap = @feather_bitmaps[0]
  140.     when 13 # Blood Rain
  141.       bitmap = @blood_rain_bitmap
  142.     when 14,21 # Sparkles
  143.       bitmap = @sparkle_bitmaps[0]
  144.     when 15 # User.
  145.         bitmap = @user_bitmaps[rand(@user_bitmaps.size)]
  146.     when 16 # Snow
  147.       bitmap = @snow_bitmap
  148.     when 17 # Meteors
  149.       bitmap = @meteor_bitmap
  150.     when 18 # Ash
  151.       bitmap = @ash_bitmaps[rand(@ash_bitmaps.size)]
  152.     when 19 # BUBBLES
  153.       bitmap = @bubble_bitmaps[rand(@bubble_bitmaps.size)]
  154.     else; bitmap = nil; end
  155.     if @type != 5; @thunder = false; end
  156.     for i in 0...@sprites.size
  157.       sprite = @sprites[i]; sprite.visible = (i <= @max)
  158.       if @type == 19
  159.         sprite.bitmap = @bubble_bitmaps[rand(@bubble_bitmaps.size)]
  160.       elsif @type == 20
  161.         sprite.bitmap = @bubble2_bitmaps[rand(@bubble2_bitmaps.size)]
  162.       elsif @type == 3
  163.         r = rand(@snow_bitmaps.size); @info[i] = r
  164.         sprite.bitmap = @snow_bitmaps[r]
  165.       else
  166.         sprite.bitmap = bitmap
  167.       end
  168.     end
  169.   end
  170.   #--------------------------------------------------------------------------
  171.   # * Set starting point X coordinate
  172.   #     ox : starting point X coordinate
  173.   #--------------------------------------------------------------------------
  174.   def ox=(ox)
  175.     return if @ox == ox
  176.     @ox = ox
  177.     for sprite in @sprites; sprite.ox = @ox; end
  178.   end
  179.   #--------------------------------------------------------------------------
  180.   # * Set starting point Y coordinate
  181.   #     oy : starting point Y coordinate
  182.   #--------------------------------------------------------------------------
  183.   def oy=(oy)
  184.     return if @oy == oy;
  185.     @oy = oy
  186.     for sprite in @sprites; sprite.oy = @oy; end
  187.   end
  188.   #--------------------------------------------------------------------------
  189.   # * Set maximum number of sprites
  190.   #     max : maximum number of sprites
  191.   #--------------------------------------------------------------------------
  192.   def max=(max)
  193.     return if @max == max;
  194.     @max = [[max, 0].max, 40].min
  195.     for i in 1..40
  196.       sprite = @sprites[i]; sprite.visible = (i <= @max) if sprite != nil
  197.       if @type == 19
  198.         sprite.bitmap = @bubble_bitmaps[rand(@bubble_bitmaps.size)]
  199.       elsif @type == 20
  200.         sprite.bitmap = @bubble2_bitmaps[rand(@bubble2_bitmaps.size)]
  201.       elsif @type == 3
  202.         r = rand(@snow_bitmaps.size); @info[i] = r
  203.         sprite.bitmap = @snow_bitmaps[r]
  204.       end
  205.     end
  206.   end
  207.   #--------------------------------------------------------------------------
  208.   # * Frame Update
  209.   #--------------------------------------------------------------------------
  210.   def update
  211.     return if @type == 0
  212.     for i in 1..@max
  213.       sprite = @sprites[i]
  214.       if @type == 1 or @type == 5 or @type == 13 # rain
  215.         if sprite.opacity <= 150
  216.           if @current_pose[i] == 0
  217.             sprite.y += @rain_bitmap.height
  218.             sprite.x -= @rain_bitmap.width
  219.             if @type == 1 or @type == 5
  220.               sprite.bitmap = @rain_splash
  221.             else
  222.               sprite.bitmap = @blood_rain_splash
  223.             end
  224.             @current_pose[i] = 1
  225.           end
  226.         else
  227.           if @current_pose[i] == 1
  228.             if @type == 1 or @type == 5
  229.               sprite.bitmap = @rain_bitmap
  230.             else
  231.               sprite.bitmap = @blood_rain_bitmap
  232.             end
  233.             @current_pose[i] = 0
  234.           end
  235.           sprite.x -= 2
  236.           sprite.y += 16
  237.           if @thunder and (rand(8000 - @max) == 0)
  238.             $game_map.screen.start_flash(Color.new(255, 255, 255, 255), 5)
  239.             Audio.se_play("Audio/SE/Thunder1")
  240.           end
  241.         end
  242.         sprite.opacity -= 8
  243.       end
  244.       if @type == 2 # storm
  245.         sprite.x -= 8
  246.         sprite.y += 16
  247.         sprite.opacity -= 12
  248.       end
  249.       if @type == 3 # snow
  250.         case @info[i]
  251.         when 0 # smallest flake, fall the slowest
  252.           sprite.y += 1
  253.         when 1
  254.           sprite.y += 3
  255.         when 2
  256.           sprite.y += 5
  257.         when 3
  258.           sprite.y += 7
  259.         end
  260.         sprite.opacity -= 3
  261.       end
  262.       if @type == 4 # hail
  263.         sprite.x -= 1
  264.         sprite.y += 18
  265.         sprite.opacity -= 15
  266.       end
  267.       if @type == 6 # falling autumn leaves
  268.         @count = rand(20)
  269.         if @count == 0
  270.           sprite.bitmap = @autumn_leaf_bitmaps[@current_pose[i]]
  271.           @current_pose[i] = (@current_pose[i] + 1) % @autumn_leaf_bitmaps.size
  272.         end
  273.         sprite.x -= 1
  274.         sprite.y += 1
  275.       end
  276.       if @type == 7 # blowing autumn leaves
  277.         @count = rand(20)
  278.         if @count == 0
  279.           sprite.bitmap = @autumn_leaf_bitmaps[@current_pose[i]]
  280.           @current_pose[i] = (@current_pose[i] + 1) % @autumn_leaf_bitmaps.size
  281.         end
  282.         sprite.x -= 10
  283.         sprite.y += (rand(4) - 2)
  284.       end
  285.       if @type == 8 # swirling autumn leaves
  286.         @count = rand(20)
  287.         if @count == 0
  288.           sprite.bitmap = @autumn_leaf_bitmaps[@current_pose[i]]
  289.           @current_pose[i] = (@current_pose[i] + 1) % @autumn_leaf_bitmaps.size
  290.         end
  291.         if @info[i] != 0
  292.           if @info[i] >= 1 and @info[i] <= 10
  293.             sprite.x -= 3
  294.             sprite.y -= 1
  295.           elsif @info[i] >= 11 and @info[i] <= 16
  296.             sprite.x -= 1
  297.             sprite.y -= 2
  298.           elsif @info[i] >= 17 and @info[i] <= 20
  299.             sprite.y -= 3
  300.           elsif @info[i] >= 21 and @info[i] <= 30
  301.             sprite.y -= 2
  302.             sprite.x += 1
  303.           elsif @info[i] >= 31 and @info[i] <= 36
  304.             sprite.y -= 1
  305.             sprite.x += 3
  306.           elsif @info[i] >= 37 and @info[i] <= 40
  307.             sprite.x += 5
  308.           elsif @info[i] >= 41 and @info[i] <= 46
  309.             sprite.y += 1
  310.             sprite.x += 3
  311.           elsif @info[i] >= 47 and @info[i] <= 58
  312.             sprite.y += 2
  313.             sprite.x += 1
  314.           elsif @info[i] >= 59 and @info[i] <= 64
  315.             sprite.y += 3
  316.           elsif @info[i] >= 65 and @info[i] <= 70
  317.             sprite.x -= 1
  318.             sprite.y += 2
  319.           elsif @info[i] >= 71 and @info[i] <= 81
  320.             sprite.x -= 3
  321.             sprite.y += 1
  322.           elsif @info[i] >= 82 and @info[i] <= 87
  323.             sprite.x -= 5
  324.           end
  325.           @info[i] = (@info[i] + 1) % 88
  326.         else
  327.           if rand(200) == 0
  328.             @info[i] = 1
  329.           end
  330.           sprite.x -= 5
  331.           sprite.y += 1
  332.         end
  333.       end
  334.       if @type == 9 # falling green leaves
  335.         if @countarray[i] == 0
  336.           @current_pose[i] = (@current_pose[i] + 1) % @green_leaf_bitmaps.size
  337.           sprite.bitmap = @green_leaf_bitmaps[@current_pose[i]]
  338.           @countarray[i] = rand(15)
  339.         end
  340.         @countarray[i] = (@countarray[i] + 1) % 15
  341.         sprite.y += 1
  342.       end
  343.       if @type == 10 # sakura petals
  344.         if @info[i] < 25
  345.           sprite.x -= 1
  346.         else
  347.           sprite.x += 1
  348.         end
  349.         @info[i] = (@info[i] + 1) % 50
  350.         sprite.y += 1
  351.       end
  352.       if @type == 11 # rose petals
  353.         @count = rand(20)
  354.         if @count == 0
  355.           sprite.bitmap = @rose_bitmaps[@current_pose[i]]
  356.           @current_pose[i] = (@current_pose[i] + 1) % @rose_bitmaps.size
  357.         end
  358.         if @info[i] % 2 == 0
  359.           if @info[i] < 10
  360.             sprite.x -= 1
  361.           elsif
  362.             sprite.x += 1
  363.           end
  364.         end
  365.         sprite.y += 1
  366.       end
  367.       if @type == 12 # feathers
  368.         if @countarray[i] == 0
  369.           @current_pose[i] = (@current_pose[i] + 1) % @feather_bitmaps.size
  370.           sprite.bitmap = @feather_bitmaps[@current_pose[i]]
  371.         end
  372.         @countarray[i] = (@countarray[i] + 1) % 15
  373.         if rand(100) == 0
  374.           sprite.x -= 1
  375.         end
  376.         if rand(100) == 0
  377.           sprite.y -= 1
  378.         end
  379.         if @info[i] < 50
  380.           if rand(2) == 0
  381.             sprite.x -= 1
  382.           else
  383.             sprite.y -= 1
  384.           end
  385.         else
  386.           if rand(2) == 0
  387.             sprite.x += 1
  388.           else
  389.             sprite.y += 1
  390.           end
  391.         end
  392.         @info[i] = (@info[i] + 1) % 100
  393.       end
  394.       if @type == 14 # sparkles
  395.         if @countarray[i] == 0
  396.           @current_pose[i] = (@current_pose[i] + 1) % @sparkle_bitmaps.size
  397.           sprite.bitmap = @sparkle_bitmaps[@current_pose[i]]
  398.         end
  399.         @countarray[i] = (@countarray[i] + 1) % 15
  400.         sprite.y += 1
  401.         sprite.opacity -= 1
  402.       end
  403.       if @type == 15 # user-defined
  404.         if $WEATHER_UPDATE
  405.           update_user_defined
  406.           $WEATHER_UPDATE = false
  407.         end
  408.         if PAC::SYSTEM::WEATHER_ANIMATED and @countarray[i] == 0
  409.           @current_pose[i] = (@current_pose[i] + 1) % @user_bitmaps.size
  410.           sprite.bitmap = @user_bitmaps[@current_pose[i]]
  411.         end
  412.         sprite.x += PAC::SYSTEM::WEATHER_X
  413.         sprite.y += PAC::SYSTEM::WEATHER_Y
  414.         sprite.opacity -= PAC::SYSTEM::WEATHER_FADE
  415.       end
  416.       if @type == 16 # blowing snow
  417.         sprite.x -= 10
  418.         sprite.y += 6
  419.         sprite.opacity -= 4
  420.       end
  421.       if @type == 17 # meteors
  422.         if @countarray[i] > 0
  423.           if rand(20) == 0
  424.             sprite.bitmap = @impact_bitmap
  425.             @countarray[i] = -5
  426.           else
  427.             sprite.x -= 6
  428.             sprite.y += 10
  429.           end
  430.         else
  431.           @countarray[i] += 1
  432.           if @countarray[i] == 0
  433.             sprite.bitmap = @meteor_bitmap
  434.             sprite.opacity = 0
  435.             @count_array = 1
  436.           end
  437.         end
  438.       end
  439.       if @type == 18 # ash
  440.         sprite.y += 2
  441.         case @countarray[i] % 3
  442.         when 0
  443.           sprite.x -= 1
  444.         when 1
  445.           sprite.x += 1
  446.         end
  447.       end
  448.       if @type == 19 or @type == 20 # bubbles
  449.         switch = rand(75) + rand(75) + 1
  450.         if @info[i] < switch / 2
  451.           sprite.x -= 1
  452.         else
  453.           sprite.x += 1
  454.         end
  455.         @info[i] = (@info[i] + 1) % switch
  456.         sprite.y -= 1
  457.         if switch % 2 == 0
  458.           sprite.opacity -= 1
  459.         end
  460.       end
  461.       if @type == 21 # sparkles up
  462.         if @countarray[i] == 0
  463.           @current_pose[i] = (@current_pose[i] + 1) % @sparkle_bitmaps.size
  464.           sprite.bitmap = @sparkle_bitmaps[@current_pose[i]]
  465.         end
  466.         @countarray[i] = (@countarray[i] + 1) % 15
  467.         sprite.y -= 1
  468.         sprite.opacity -= 1
  469.       end
  470.       x = sprite.x - @ox
  471.       y = sprite.y - @oy
  472.       if sprite.opacity < 64 or sprite.x > Graphics.width or sprite.x < 0 or sprite.y > Graphics.height or sprite.y < 0
  473.         sprite.x = rand(800) - 100 + @ox
  474.         sprite.y = rand(600) - 200 + @oy
  475.         if [13, 14, 16, 5, 2, 1].include?(@type)
  476.           sprite.opacity = rand(100) + 155
  477.         else
  478.           sprite.opacity = 255
  479.         end
  480.       end
  481.     end
  482.   end
  483.  
  484.   def make_bitmaps
  485.     color1 = Color.new(255, 255, 255, 255)
  486.     color2 = Color.new(255, 255, 255, 128)
  487.     @rain_bitmap = Bitmap.new(7, 56)
  488.     for i in 0..6
  489.       @rain_bitmap.fill_rect(6-i, i*8, 1, 8, color1)
  490.     end
  491.     @rain_splash = Bitmap.new(8, 5)
  492.     @rain_splash.fill_rect(1, 0, 6, 1, color2)
  493.     @rain_splash.fill_rect(1, 4, 6, 1, color2)
  494.     @rain_splash.fill_rect(0, 1, 1, 3, color2)
  495.     @rain_splash.fill_rect(7, 1, 1, 3, color2)
  496.     @rain_splash.set_pixel(1, 0, color1)
  497.     @rain_splash.set_pixel(0, 1, color1)
  498.     @storm_bitmap = Bitmap.new(34, 64)
  499.     for i in 0..31
  500.       @storm_bitmap.fill_rect(33-i, i*2, 1, 2, color2)
  501.       @storm_bitmap.fill_rect(32-i, i*2, 1, 2, color1)
  502.       @storm_bitmap.fill_rect(31-i, i*2, 1, 2, color2)
  503.     end
  504.     @snow_bitmap = Bitmap.new(6, 6)
  505.     @snow_bitmap.fill_rect(0, 1, 6, 4, color2)
  506.     @snow_bitmap.fill_rect(1, 0, 4, 6, color2)
  507.     @snow_bitmap.fill_rect(1, 2, 4, 2, color1)
  508.     @snow_bitmap.fill_rect(2, 1, 2, 4, color1)
  509.     @sprites = []
  510.    
  511.     @snow_bitmaps = []
  512.    
  513.     color3 = Color.new(255, 255, 255, 204)
  514.     @snow_bitmaps[0] = Bitmap.new(3, 3)
  515.     @snow_bitmaps[0].fill_rect(0, 0, 3, 3, color2)
  516.     @snow_bitmaps[0].fill_rect(0, 1, 3, 1, color3)
  517.     @snow_bitmaps[0].fill_rect(1, 0, 1, 3, color3)
  518.     @snow_bitmaps[0].set_pixel(1, 1, color1)
  519.    
  520.     @snow_bitmaps[1] = Bitmap.new(4, 4)
  521.     @snow_bitmaps[1].fill_rect(0, 1, 4, 2, color2)
  522.     @snow_bitmaps[1].fill_rect(1, 0, 2, 4, color2)
  523.     @snow_bitmaps[1].fill_rect(1, 1, 2, 2, color1)
  524.    
  525.     @snow_bitmaps[2] = Bitmap.new(5, 5)
  526.     @snow_bitmaps[1].fill_rect(0, 1, 5, 3, color3)
  527.     @snow_bitmaps[1].fill_rect(1, 0, 3, 5, color3)
  528.     @snow_bitmaps[1].fill_rect(1, 1, 3, 3, color2)
  529.     @snow_bitmaps[1].fill_rect(2, 1, 3, 1, color1)
  530.     @snow_bitmaps[1].fill_rect(1, 2, 1, 3, color1)
  531.    
  532.     @snow_bitmaps[3] = Bitmap.new(7, 7)
  533.     @snow_bitmaps[1].fill_rect(1, 1, 5, 5, color3)
  534.     @snow_bitmaps[1].fill_rect(2, 0, 7, 3, color3)
  535.     @snow_bitmaps[1].fill_rect(0, 2, 3, 7, color3)
  536.     @snow_bitmaps[1].fill_rect(2, 1, 5, 3, color2)
  537.     @snow_bitmaps[1].fill_rect(1, 2, 3, 5, color2)
  538.     @snow_bitmaps[1].fill_rect(2, 2, 3, 3, color1)
  539.     @snow_bitmaps[1].fill_rect(3, 1, 5, 1, color1)
  540.     @snow_bitmaps[1].fill_rect(1, 3, 1, 5, color1)
  541.    
  542.     blueGrey  = Color.new(215, 227, 227, 150)
  543.     grey      = Color.new(214, 217, 217, 150)
  544.     lightGrey = Color.new(233, 233, 233, 250)
  545.     lightBlue = Color.new(222, 239, 243, 250)
  546.     @hail_bitmap = Bitmap.new(4, 4)
  547.     @hail_bitmap.fill_rect(1, 0, 2, 1, blueGrey)
  548.     @hail_bitmap.fill_rect(0, 1, 1, 2, blueGrey)
  549.     @hail_bitmap.fill_rect(3, 1, 1, 2, grey)
  550.     @hail_bitmap.fill_rect(1, 3, 2, 1, grey)
  551.     @hail_bitmap.fill_rect(1, 1, 2, 2, lightGrey)
  552.     @hail_bitmap.set_pixel(1, 1, lightBlue)
  553.    
  554.    
  555.     color3 = Color.new(255, 167, 192, 255) # light pink
  556.     color4 = Color.new(213, 106, 136, 255) # dark pink
  557.     @petal_bitmap = Bitmap.new(4, 4) #This creates a new bitmap that is 4 x 4 pixels
  558.     @petal_bitmap.fill_rect(0, 3, 1, 1, color3)
  559.     @petal_bitmap.fill_rect(1, 2, 1, 1, color3)
  560.     @petal_bitmap.fill_rect(2, 1, 1, 1, color3)
  561.     @petal_bitmap.fill_rect(3, 0, 1, 1, color3)
  562.     @petal_bitmap.fill_rect(1, 3, 1, 1, color4)
  563.     @petal_bitmap.fill_rect(2, 2, 1, 1, color4)
  564.     @petal_bitmap.fill_rect(3, 1, 1, 1, color4)
  565.    
  566.    
  567.     brightOrange = Color.new(248, 88, 0, 255)  
  568.     orangeBrown  = Color.new(144, 80, 56, 255)
  569.     burntRed     = Color.new(152, 0, 0, 255)
  570.     paleOrange   = Color.new(232, 160, 128, 255)
  571.     darkBrown    = Color.new(72, 40, 0, 255)
  572.     @autumn_leaf_bitmaps = []
  573.     @autumn_leaf_bitmaps.push(Bitmap.new(8, 8))
  574.     # draw the first of the leaf1 bitmaps
  575.     @autumn_leaf_bitmaps[0].set_pixel(5, 1, orangeBrown)
  576.     @autumn_leaf_bitmaps[0].set_pixel(6, 1, brightOrange)
  577.     @autumn_leaf_bitmaps[0].set_pixel(7, 1, paleOrange)
  578.     @autumn_leaf_bitmaps[0].set_pixel(3, 2, orangeBrown)
  579.     @autumn_leaf_bitmaps[0].fill_rect(4, 2, 2, 1, brightOrange)
  580.     @autumn_leaf_bitmaps[0].set_pixel(6, 2, paleOrange)
  581.     @autumn_leaf_bitmaps[0].set_pixel(2, 3, orangeBrown)
  582.     @autumn_leaf_bitmaps[0].set_pixel(3, 3, brightOrange)
  583.     @autumn_leaf_bitmaps[0].fill_rect(4, 3, 2, 1, paleOrange)
  584.     @autumn_leaf_bitmaps[0].set_pixel(1, 4, orangeBrown)
  585.     @autumn_leaf_bitmaps[0].set_pixel(2, 4, brightOrange)
  586.     @autumn_leaf_bitmaps[0].set_pixel(3, 4, paleOrange)
  587.     @autumn_leaf_bitmaps[0].set_pixel(1, 5, brightOrange)
  588.     @autumn_leaf_bitmaps[0].set_pixel(2, 5, paleOrange)
  589.     @autumn_leaf_bitmaps[0].set_pixel(0, 6, orangeBrown)
  590.     @autumn_leaf_bitmaps[0].set_pixel(1, 6, paleOrange)
  591.     @autumn_leaf_bitmaps[0].set_pixel(0, 7, paleOrange)
  592.    
  593.     # draw the 2nd of the leaf1 bitmaps
  594.     @autumn_leaf_bitmaps.push(Bitmap.new(8, 8))
  595.     @autumn_leaf_bitmaps[1].set_pixel(3, 0, brightOrange)
  596.     @autumn_leaf_bitmaps[1].set_pixel(7, 0, brightOrange)
  597.     @autumn_leaf_bitmaps[1].set_pixel(3, 1, orangeBrown)
  598.     @autumn_leaf_bitmaps[1].set_pixel(4, 1, burntRed)
  599.     @autumn_leaf_bitmaps[1].set_pixel(6, 1, brightOrange)
  600.     @autumn_leaf_bitmaps[1].set_pixel(0, 2, paleOrange)
  601.     @autumn_leaf_bitmaps[1].set_pixel(1, 2, brightOrange)
  602.     @autumn_leaf_bitmaps[1].set_pixel(2, 2, orangeBrown)
  603.     @autumn_leaf_bitmaps[1].set_pixel(3, 2, burntRed)
  604.     @autumn_leaf_bitmaps[1].set_pixel(4, 2, orangeBrown)
  605.     @autumn_leaf_bitmaps[1].set_pixel(5, 2, brightOrange)
  606.     @autumn_leaf_bitmaps[1].fill_rect(1, 3, 3, 1, orangeBrown)
  607.     @autumn_leaf_bitmaps[1].fill_rect(4, 3, 2, 1, brightOrange)
  608.     @autumn_leaf_bitmaps[1].set_pixel(6, 3, orangeBrown)
  609.     @autumn_leaf_bitmaps[1].set_pixel(2, 4, burntRed)
  610.     @autumn_leaf_bitmaps[1].fill_rect(3, 4, 3, 1, brightOrange)
  611.     @autumn_leaf_bitmaps[1].set_pixel(6, 4, burntRed)
  612.     @autumn_leaf_bitmaps[1].set_pixel(7, 4, darkBrown)
  613.     @autumn_leaf_bitmaps[1].set_pixel(1, 5, orangeBrown)
  614.     @autumn_leaf_bitmaps[1].fill_rect(2, 5, 2, 1, brightOrange)
  615.     @autumn_leaf_bitmaps[1].set_pixel(4, 5, orangeBrown)
  616.     @autumn_leaf_bitmaps[1].set_pixel(5, 5, burntRed)
  617.     @autumn_leaf_bitmaps[1].fill_rect(1, 6, 2, 1, brightOrange)
  618.     @autumn_leaf_bitmaps[1].fill_rect(4, 6, 2, 1, burntRed)
  619.     @autumn_leaf_bitmaps[1].set_pixel(0, 7, brightOrange)
  620.     @autumn_leaf_bitmaps[1].set_pixel(5, 7, darkBrown)
  621.    
  622.     # draw the 3rd of the leaf1 bitmaps
  623.     @autumn_leaf_bitmaps.push(Bitmap.new(8, 8))
  624.     @autumn_leaf_bitmaps[2].set_pixel(7, 1, paleOrange)
  625.     @autumn_leaf_bitmaps[2].set_pixel(6, 2, paleOrange)
  626.     @autumn_leaf_bitmaps[2].set_pixel(7, 2, orangeBrown)
  627.     @autumn_leaf_bitmaps[2].set_pixel(5, 3, paleOrange)
  628.     @autumn_leaf_bitmaps[2].set_pixel(6, 3, brightOrange)
  629.     @autumn_leaf_bitmaps[2].set_pixel(4, 4, paleOrange)
  630.     @autumn_leaf_bitmaps[2].set_pixel(5, 4, brightOrange)
  631.     @autumn_leaf_bitmaps[2].set_pixel(6, 4, orangeBrown)
  632.     @autumn_leaf_bitmaps[2].fill_rect(2, 5, 2, 1, paleOrange)
  633.     @autumn_leaf_bitmaps[2].set_pixel(4, 5, brightOrange)
  634.     @autumn_leaf_bitmaps[2].set_pixel(5, 5, orangeBrown)
  635.     @autumn_leaf_bitmaps[2].set_pixel(1, 6, paleOrange)
  636.     @autumn_leaf_bitmaps[2].fill_rect(2, 6, 2, 1, brightOrange)
  637.     @autumn_leaf_bitmaps[2].set_pixel(4, 6, orangeBrown)
  638.     @autumn_leaf_bitmaps[2].set_pixel(0, 7, paleOrange)
  639.     @autumn_leaf_bitmaps[2].set_pixel(1, 7, brightOrange)
  640.     @autumn_leaf_bitmaps[2].set_pixel(2, 7, orangeBrown)
  641.    
  642.     # draw the 4th of the leaf1 bitmaps
  643.     @autumn_leaf_bitmaps.push(Bitmap.new(8, 8))
  644.     @autumn_leaf_bitmaps[3].set_pixel(3, 0, brightOrange)
  645.     @autumn_leaf_bitmaps[3].set_pixel(7, 0, brightOrange)
  646.     @autumn_leaf_bitmaps[3].set_pixel(3, 1, orangeBrown)
  647.     @autumn_leaf_bitmaps[3].set_pixel(4, 1, burntRed)
  648.     @autumn_leaf_bitmaps[3].set_pixel(6, 1, brightOrange)
  649.     @autumn_leaf_bitmaps[3].set_pixel(0, 2, paleOrange)
  650.     @autumn_leaf_bitmaps[3].set_pixel(1, 2, brightOrange)
  651.     @autumn_leaf_bitmaps[3].set_pixel(2, 2, orangeBrown)
  652.     @autumn_leaf_bitmaps[3].set_pixel(3, 2, burntRed)
  653.     @autumn_leaf_bitmaps[3].set_pixel(4, 2, orangeBrown)
  654.     @autumn_leaf_bitmaps[3].set_pixel(5, 2, brightOrange)
  655.     @autumn_leaf_bitmaps[3].fill_rect(1, 3, 3, 1, orangeBrown)
  656.     @autumn_leaf_bitmaps[3].fill_rect(4, 3, 2, 1, brightOrange)
  657.     @autumn_leaf_bitmaps[3].set_pixel(6, 3, orangeBrown)
  658.     @autumn_leaf_bitmaps[3].set_pixel(2, 4, burntRed)
  659.     @autumn_leaf_bitmaps[3].fill_rect(3, 4, 3, 1, brightOrange)
  660.     @autumn_leaf_bitmaps[3].set_pixel(6, 4, burntRed)
  661.     @autumn_leaf_bitmaps[3].set_pixel(7, 4, darkBrown)
  662.     @autumn_leaf_bitmaps[3].set_pixel(1, 5, orangeBrown)
  663.     @autumn_leaf_bitmaps[3].fill_rect(2, 5, 2, 1, brightOrange)
  664.     @autumn_leaf_bitmaps[3].set_pixel(4, 5, orangeBrown)
  665.     @autumn_leaf_bitmaps[3].set_pixel(5, 5, burntRed)
  666.     @autumn_leaf_bitmaps[3].fill_rect(1, 6, 2, 1, brightOrange)
  667.     @autumn_leaf_bitmaps[3].fill_rect(4, 6, 2, 1, burntRed)
  668.     @autumn_leaf_bitmaps[3].set_pixel(0, 7, brightOrange)
  669.     @autumn_leaf_bitmaps[3].set_pixel(5, 7, darkBrown)
  670.    
  671.     @green_leaf_bitmaps = []
  672.     darkGreen  = Color.new(62, 76, 31, 255)
  673.     midGreen   = Color.new(76, 91, 43, 255)
  674.     khaki      = Color.new(105, 114, 66, 255)
  675.     lightGreen = Color.new(128, 136, 88, 255)
  676.     mint       = Color.new(146, 154, 106, 255)
  677.    
  678.     # 1st leaf bitmap
  679.     @green_leaf_bitmaps[0] = Bitmap.new(8, 8)
  680.     @green_leaf_bitmaps[0].set_pixel(1, 0, darkGreen)
  681.     @green_leaf_bitmaps[0].set_pixel(1, 1, midGreen)
  682.     @green_leaf_bitmaps[0].set_pixel(2, 1, darkGreen)
  683.     @green_leaf_bitmaps[0].set_pixel(2, 2, khaki)
  684.     @green_leaf_bitmaps[0].set_pixel(3, 2, darkGreen)
  685.     @green_leaf_bitmaps[0].set_pixel(4, 2, khaki)
  686.     @green_leaf_bitmaps[0].fill_rect(2, 3, 3, 1, midGreen)
  687.     @green_leaf_bitmaps[0].set_pixel(5, 3, khaki)
  688.     @green_leaf_bitmaps[0].fill_rect(2, 4, 2, 1, midGreen)
  689.     @green_leaf_bitmaps[0].set_pixel(4, 4, darkGreen)
  690.     @green_leaf_bitmaps[0].set_pixel(5, 4, lightGreen)
  691.     @green_leaf_bitmaps[0].set_pixel(6, 4, khaki)
  692.     @green_leaf_bitmaps[0].set_pixel(3, 5, midGreen)
  693.     @green_leaf_bitmaps[0].set_pixel(4, 5, darkGreen)
  694.     @green_leaf_bitmaps[0].set_pixel(5, 5, khaki)
  695.     @green_leaf_bitmaps[0].set_pixel(6, 5, lightGreen)
  696.     @green_leaf_bitmaps[0].set_pixel(4, 6, midGreen)
  697.     @green_leaf_bitmaps[0].set_pixel(5, 6, darkGreen)
  698.     @green_leaf_bitmaps[0].set_pixel(6, 6, lightGreen)
  699.     @green_leaf_bitmaps[0].set_pixel(6, 7, khaki)
  700.    
  701.     # 2nd leaf bitmap
  702.     @green_leaf_bitmaps[1] = Bitmap.new(8, 8)
  703.     @green_leaf_bitmaps[1].fill_rect(1, 1, 1, 2, midGreen)
  704.     @green_leaf_bitmaps[1].fill_rect(2, 2, 2, 1, khaki)
  705.     @green_leaf_bitmaps[1].set_pixel(4, 2, lightGreen)
  706.     @green_leaf_bitmaps[1].fill_rect(2, 3, 2, 1, darkGreen)
  707.     @green_leaf_bitmaps[1].fill_rect(4, 3, 2, 1, lightGreen)
  708.     @green_leaf_bitmaps[1].set_pixel(2, 4, midGreen)
  709.     @green_leaf_bitmaps[1].set_pixel(3, 4, darkGreen)
  710.     @green_leaf_bitmaps[1].set_pixel(4, 4, khaki)
  711.     @green_leaf_bitmaps[1].fill_rect(5, 4, 2, 1, lightGreen)
  712.     @green_leaf_bitmaps[1].set_pixel(3, 5, midGreen)
  713.     @green_leaf_bitmaps[1].set_pixel(4, 5, darkGreen)
  714.     @green_leaf_bitmaps[1].set_pixel(5, 5, khaki)
  715.     @green_leaf_bitmaps[1].set_pixel(6, 5, lightGreen)
  716.     @green_leaf_bitmaps[1].set_pixel(5, 6, darkGreen)
  717.     @green_leaf_bitmaps[1].fill_rect(6, 6, 2, 1, khaki)
  718.    
  719.     # 3rd leaf bitmap
  720.     @green_leaf_bitmaps[2] = Bitmap.new(8, 8)
  721.     @green_leaf_bitmaps[2].set_pixel(1, 1, darkGreen)
  722.     @green_leaf_bitmaps[2].fill_rect(1, 2, 2, 1, midGreen)
  723.     @green_leaf_bitmaps[2].set_pixel(2, 3, midGreen)
  724.     @green_leaf_bitmaps[2].set_pixel(3, 3, darkGreen)
  725.     @green_leaf_bitmaps[2].set_pixel(4, 3, midGreen)
  726.     @green_leaf_bitmaps[2].fill_rect(2, 4, 2, 1, midGreen)
  727.     @green_leaf_bitmaps[2].set_pixel(4, 4, darkGreen)
  728.     @green_leaf_bitmaps[2].set_pixel(5, 4, lightGreen)
  729.     @green_leaf_bitmaps[2].set_pixel(3, 5, midGreen)
  730.     @green_leaf_bitmaps[2].set_pixel(4, 5, darkGreen)
  731.     @green_leaf_bitmaps[2].fill_rect(5, 5, 2, 1, khaki)
  732.     @green_leaf_bitmaps[2].fill_rect(4, 6, 2, 1, midGreen)
  733.     @green_leaf_bitmaps[2].set_pixel(6, 6, lightGreen)
  734.     @green_leaf_bitmaps[2].set_pixel(6, 7, khaki)
  735.    
  736.     # 4th leaf bitmap
  737.     @green_leaf_bitmaps[3] = Bitmap.new(8, 8)
  738.     @green_leaf_bitmaps[3].fill_rect(0, 3, 1, 2, darkGreen)
  739.     @green_leaf_bitmaps[3].set_pixel(1, 4, midGreen)
  740.     @green_leaf_bitmaps[3].set_pixel(2, 4, khaki)
  741.     @green_leaf_bitmaps[3].set_pixel(3, 4, lightGreen)
  742.     @green_leaf_bitmaps[3].set_pixel(4, 4, darkGreen)
  743.     @green_leaf_bitmaps[3].set_pixel(7, 4, midGreen)
  744.     @green_leaf_bitmaps[3].set_pixel(1, 5, darkGreen)
  745.     @green_leaf_bitmaps[3].set_pixel(2, 5, midGreen)
  746.     @green_leaf_bitmaps[3].set_pixel(3, 5, lightGreen)
  747.     @green_leaf_bitmaps[3].set_pixel(4, 5, mint)
  748.     @green_leaf_bitmaps[3].set_pixel(5, 5, lightGreen)
  749.     @green_leaf_bitmaps[3].set_pixel(6, 5, khaki)
  750.     @green_leaf_bitmaps[3].set_pixel(7, 5, midGreen)
  751.     @green_leaf_bitmaps[3].fill_rect(2, 6, 2, 1, midGreen)
  752.     @green_leaf_bitmaps[3].set_pixel(4, 6, lightGreen)
  753.     @green_leaf_bitmaps[3].set_pixel(5, 6, khaki)
  754.     @green_leaf_bitmaps[3].set_pixel(6, 6, midGreen)
  755.    
  756.     # 5th leaf bitmap
  757.     @green_leaf_bitmaps[4] = Bitmap.new(8, 8)
  758.     @green_leaf_bitmaps[4].set_pixel(6, 2, midGreen)
  759.     @green_leaf_bitmaps[4].set_pixel(7, 2, darkGreen)
  760.     @green_leaf_bitmaps[4].fill_rect(4, 3, 2, 1, midGreen)
  761.     @green_leaf_bitmaps[4].set_pixel(6, 3, khaki)
  762.     @green_leaf_bitmaps[4].set_pixel(2, 4, darkGreen)
  763.     @green_leaf_bitmaps[4].fill_rect(3, 4, 2, 1, khaki)
  764.     @green_leaf_bitmaps[4].set_pixel(5, 4, lightGreen)
  765.     @green_leaf_bitmaps[4].set_pixel(6, 4, khaki)
  766.     @green_leaf_bitmaps[4].set_pixel(1, 5, midGreen)
  767.     @green_leaf_bitmaps[4].set_pixel(2, 5, khaki)
  768.     @green_leaf_bitmaps[4].set_pixel(3, 5, lightGreen)
  769.     @green_leaf_bitmaps[4].set_pixel(4, 5, mint)
  770.     @green_leaf_bitmaps[4].set_pixel(5, 5, midGreen)
  771.     @green_leaf_bitmaps[4].set_pixel(2, 6, darkGreen)
  772.     @green_leaf_bitmaps[4].fill_rect(3, 6, 2, 1, midGreen)
  773.    
  774.     # 6th leaf bitmap
  775.     @green_leaf_bitmaps[5] = Bitmap.new(8, 8)
  776.     @green_leaf_bitmaps[5].fill_rect(6, 2, 2, 1, midGreen)
  777.     @green_leaf_bitmaps[5].fill_rect(4, 3, 2, 1, midGreen)
  778.     @green_leaf_bitmaps[5].set_pixel(6, 3, khaki)
  779.     @green_leaf_bitmaps[5].set_pixel(3, 4, midGreen)
  780.     @green_leaf_bitmaps[5].set_pixel(4, 4, khaki)
  781.     @green_leaf_bitmaps[5].set_pixel(5, 4, lightGreen)
  782.     @green_leaf_bitmaps[5].set_pixel(6, 4, mint)
  783.     @green_leaf_bitmaps[5].set_pixel(1, 5, midGreen)
  784.     @green_leaf_bitmaps[5].set_pixel(2, 5, khaki)
  785.     @green_leaf_bitmaps[5].fill_rect(3, 5, 2, 1, mint)
  786.     @green_leaf_bitmaps[5].set_pixel(5, 5, lightGreen)
  787.     @green_leaf_bitmaps[5].set_pixel(2, 6, midGreen)
  788.     @green_leaf_bitmaps[5].set_pixel(3, 6, khaki)
  789.     @green_leaf_bitmaps[5].set_pixel(4, 6, lightGreen)
  790.    
  791.     # 7th leaf bitmap
  792.     @green_leaf_bitmaps[6] = Bitmap.new(8, 8)
  793.     @green_leaf_bitmaps[6].fill_rect(6, 1, 1, 2, midGreen)
  794.     @green_leaf_bitmaps[6].fill_rect(4, 2, 2, 1, midGreen)
  795.     @green_leaf_bitmaps[6].fill_rect(6, 2, 1, 2, darkGreen)
  796.     @green_leaf_bitmaps[6].fill_rect(3, 3, 2, 1, midGreen)
  797.     @green_leaf_bitmaps[6].set_pixel(5, 3, khaki)
  798.     @green_leaf_bitmaps[6].set_pixel(2, 4, midGreen)
  799.     @green_leaf_bitmaps[6].set_pixel(3, 4, khaki)
  800.     @green_leaf_bitmaps[6].set_pixel(4, 4, lightGreen)
  801.     @green_leaf_bitmaps[6].set_pixel(5, 4, midGreen)
  802.     @green_leaf_bitmaps[6].set_pixel(1, 5, midGreen)
  803.     @green_leaf_bitmaps[6].set_pixel(2, 5, khaki)
  804.     @green_leaf_bitmaps[6].fill_rect(3, 5, 2, 1, midGreen)
  805.     @green_leaf_bitmaps[6].set_pixel(1, 6, darkGreen)
  806.     @green_leaf_bitmaps[6].set_pixel(2, 6, midGreen)
  807.    
  808.     # 8th leaf bitmap
  809.     @green_leaf_bitmaps[7] = Bitmap.new(8, 8)
  810.     @green_leaf_bitmaps[7].set_pixel(6, 1, midGreen)
  811.     @green_leaf_bitmaps[7].fill_rect(4, 2, 3, 2, midGreen)
  812.     @green_leaf_bitmaps[7].set_pixel(3, 3, darkGreen)
  813.     @green_leaf_bitmaps[7].set_pixel(2, 4, darkGreen)
  814.     @green_leaf_bitmaps[7].set_pixel(3, 4, midGreen)
  815.     @green_leaf_bitmaps[7].fill_rect(4, 4, 2, 1, khaki)
  816.     @green_leaf_bitmaps[7].set_pixel(1, 5, darkGreen)
  817.     @green_leaf_bitmaps[7].set_pixel(2, 5, midGreen)
  818.     @green_leaf_bitmaps[7].fill_rect(3, 5, 2, 1, lightGreen)
  819.     @green_leaf_bitmaps[7].set_pixel(2, 6, midGreen)
  820.     @green_leaf_bitmaps[7].set_pixel(3, 6, lightGreen)
  821.    
  822.     # 9th leaf bitmap
  823.     @green_leaf_bitmaps[8] = Bitmap.new(8, 8)
  824.     @green_leaf_bitmaps[8].fill_rect(6, 1, 1, 2, midGreen)
  825.     @green_leaf_bitmaps[8].fill_rect(4, 2, 2, 1, midGreen)
  826.     @green_leaf_bitmaps[8].fill_rect(6, 2, 1, 2, darkGreen)
  827.     @green_leaf_bitmaps[8].fill_rect(3, 3, 2, 1, midGreen)
  828.     @green_leaf_bitmaps[8].set_pixel(5, 3, khaki)
  829.     @green_leaf_bitmaps[8].set_pixel(2, 4, midGreen)
  830.     @green_leaf_bitmaps[8].set_pixel(3, 4, khaki)
  831.     @green_leaf_bitmaps[8].set_pixel(4, 4, lightGreen)
  832.     @green_leaf_bitmaps[8].set_pixel(5, 4, midGreen)
  833.     @green_leaf_bitmaps[8].set_pixel(1, 5, midGreen)
  834.     @green_leaf_bitmaps[8].set_pixel(2, 5, khaki)
  835.     @green_leaf_bitmaps[8].fill_rect(3, 5, 2, 1, midGreen)
  836.     @green_leaf_bitmaps[8].set_pixel(1, 6, darkGreen)
  837.     @green_leaf_bitmaps[8].set_pixel(2, 6, midGreen)
  838.    
  839.     # 10th leaf bitmap
  840.     @green_leaf_bitmaps[9] = Bitmap.new(8, 8)
  841.     @green_leaf_bitmaps[9].fill_rect(6, 2, 2, 1, midGreen)
  842.     @green_leaf_bitmaps[9].fill_rect(4, 3, 2, 1, midGreen)
  843.     @green_leaf_bitmaps[9].set_pixel(6, 3, khaki)
  844.     @green_leaf_bitmaps[9].set_pixel(3, 4, midGreen)
  845.     @green_leaf_bitmaps[9].set_pixel(4, 4, khaki)
  846.     @green_leaf_bitmaps[9].set_pixel(5, 4, lightGreen)
  847.     @green_leaf_bitmaps[9].set_pixel(6, 4, mint)
  848.     @green_leaf_bitmaps[9].set_pixel(1, 5, midGreen)
  849.     @green_leaf_bitmaps[9].set_pixel(2, 5, khaki)
  850.     @green_leaf_bitmaps[9].fill_rect(3, 5, 2, 1, mint)
  851.     @green_leaf_bitmaps[9].set_pixel(5, 5, lightGreen)
  852.     @green_leaf_bitmaps[9].set_pixel(2, 6, midGreen)
  853.     @green_leaf_bitmaps[9].set_pixel(3, 6, khaki)
  854.     @green_leaf_bitmaps[9].set_pixel(4, 6, lightGreen)
  855.    
  856.     # 11th leaf bitmap
  857.     @green_leaf_bitmaps[10] = Bitmap.new(8, 8)
  858.     @green_leaf_bitmaps[10].set_pixel(6, 2, midGreen)
  859.     @green_leaf_bitmaps[10].set_pixel(7, 2, darkGreen)
  860.     @green_leaf_bitmaps[10].fill_rect(4, 3, 2, 1, midGreen)
  861.     @green_leaf_bitmaps[10].set_pixel(6, 3, khaki)
  862.     @green_leaf_bitmaps[10].set_pixel(2, 4, darkGreen)
  863.     @green_leaf_bitmaps[10].fill_rect(3, 4, 2, 1, khaki)
  864.     @green_leaf_bitmaps[10].set_pixel(5, 4, lightGreen)
  865.     @green_leaf_bitmaps[10].set_pixel(6, 4, khaki)
  866.     @green_leaf_bitmaps[10].set_pixel(1, 5, midGreen)
  867.     @green_leaf_bitmaps[10].set_pixel(2, 5, khaki)
  868.     @green_leaf_bitmaps[10].set_pixel(3, 5, lightGreen)
  869.     @green_leaf_bitmaps[10].set_pixel(4, 5, mint)
  870.     @green_leaf_bitmaps[10].set_pixel(5, 5, midGreen)
  871.     @green_leaf_bitmaps[10].set_pixel(2, 6, darkGreen)
  872.     @green_leaf_bitmaps[10].fill_rect(3, 6, 2, 1, midGreen)
  873.    
  874.     # 12th leaf bitmap
  875.     @green_leaf_bitmaps[11] = Bitmap.new(8, 8)
  876.     @green_leaf_bitmaps[11].fill_rect(0, 3, 1, 2, darkGreen)
  877.     @green_leaf_bitmaps[11].set_pixel(1, 4, midGreen)
  878.     @green_leaf_bitmaps[11].set_pixel(2, 4, khaki)
  879.     @green_leaf_bitmaps[11].set_pixel(3, 4, lightGreen)
  880.     @green_leaf_bitmaps[11].set_pixel(4, 4, darkGreen)
  881.     @green_leaf_bitmaps[11].set_pixel(7, 4, midGreen)
  882.     @green_leaf_bitmaps[11].set_pixel(1, 5, darkGreen)
  883.     @green_leaf_bitmaps[11].set_pixel(2, 5, midGreen)
  884.     @green_leaf_bitmaps[11].set_pixel(3, 5, lightGreen)
  885.     @green_leaf_bitmaps[11].set_pixel(4, 5, mint)
  886.     @green_leaf_bitmaps[11].set_pixel(5, 5, lightGreen)
  887.     @green_leaf_bitmaps[11].set_pixel(6, 5, khaki)
  888.     @green_leaf_bitmaps[11].set_pixel(7, 5, midGreen)
  889.     @green_leaf_bitmaps[11].fill_rect(2, 6, 2, 1, midGreen)
  890.     @green_leaf_bitmaps[11].set_pixel(4, 6, lightGreen)
  891.     @green_leaf_bitmaps[11].set_pixel(5, 6, khaki)
  892.     @green_leaf_bitmaps[11].set_pixel(6, 6, midGreen)
  893.    
  894.     # 13th leaf bitmap
  895.     @green_leaf_bitmaps[12] = Bitmap.new(8, 8)
  896.     @green_leaf_bitmaps[12].set_pixel(1, 1, darkGreen)
  897.     @green_leaf_bitmaps[12].fill_rect(1, 2, 2, 1, midGreen)
  898.     @green_leaf_bitmaps[12].set_pixel(2, 3, midGreen)
  899.     @green_leaf_bitmaps[12].set_pixel(3, 3, darkGreen)
  900.     @green_leaf_bitmaps[12].set_pixel(4, 3, midGreen)
  901.     @green_leaf_bitmaps[12].fill_rect(2, 4, 2, 1, midGreen)
  902.     @green_leaf_bitmaps[12].set_pixel(4, 4, darkGreen)
  903.     @green_leaf_bitmaps[12].set_pixel(5, 4, lightGreen)
  904.     @green_leaf_bitmaps[12].set_pixel(3, 5, midGreen)
  905.     @green_leaf_bitmaps[12].set_pixel(4, 5, darkGreen)
  906.     @green_leaf_bitmaps[12].fill_rect(5, 5, 2, 1, khaki)
  907.     @green_leaf_bitmaps[12].fill_rect(4, 6, 2, 1, midGreen)
  908.     @green_leaf_bitmaps[12].set_pixel(6, 6, lightGreen)
  909.     @green_leaf_bitmaps[12].set_pixel(6, 7, khaki)
  910.    
  911.     @rose_bitmaps = []
  912.     brightRed = Color.new(255, 0, 0, 255)
  913.     midRed    = Color.new(179, 17, 17, 255)
  914.     darkRed   = Color.new(141, 9, 9, 255)
  915.    
  916.     # 1st rose petal bitmap
  917.     @rose_bitmaps[0] = Bitmap.new(3, 3)
  918.     @rose_bitmaps[0].fill_rect(1, 0, 2, 1, brightRed)
  919.     @rose_bitmaps[0].fill_rect(0, 1, 1, 2, brightRed)
  920.     @rose_bitmaps[0].fill_rect(1, 1, 2, 2, midRed)
  921.     @rose_bitmaps[0].set_pixel(2, 2, darkRed)
  922.    
  923.     # 2nd rose petal bitmap
  924.     @rose_bitmaps[1] = Bitmap.new(3, 3)
  925.     @rose_bitmaps[1].set_pixel(0, 1, midRed)
  926.     @rose_bitmaps[1].set_pixel(1, 1, brightRed)
  927.     @rose_bitmaps[1].fill_rect(1, 2, 1, 2, midRed)
  928.    
  929.     @feather_bitmaps = []
  930.     white = Color.new(255, 255, 255, 255)
  931.    
  932.     # 1st feather bitmap
  933.     @feather_bitmaps[0] = Bitmap.new(3, 3)
  934.     @feather_bitmaps[0].set_pixel(0, 2, white)
  935.     @feather_bitmaps[0].set_pixel(1, 2, grey)
  936.     @feather_bitmaps[0].set_pixel(2, 1, grey)
  937.    
  938.     # 2nd feather bitmap
  939.     @feather_bitmaps[0] = Bitmap.new(3, 3)
  940.     @feather_bitmaps[0].set_pixel(0, 0, white)
  941.     @feather_bitmaps[0].set_pixel(0, 1, grey)
  942.     @feather_bitmaps[0].set_pixel(1, 2, grey)
  943.    
  944.     # 3rd feather bitmap
  945.     @feather_bitmaps[0] = Bitmap.new(3, 3)
  946.     @feather_bitmaps[0].set_pixel(2, 0, white)
  947.     @feather_bitmaps[0].set_pixel(1, 0, grey)
  948.     @feather_bitmaps[0].set_pixel(0, 1, grey)
  949.    
  950.     # 4th feather bitmap
  951.     @feather_bitmaps[0] = Bitmap.new(3, 3)
  952.     @feather_bitmaps[0].set_pixel(2, 2, white)
  953.     @feather_bitmaps[0].set_pixel(2, 1, grey)
  954.     @feather_bitmaps[0].set_pixel(1, 0, grey)
  955.    
  956.     @blood_rain_bitmap = Bitmap.new(7, 56)
  957.     for i in 0..6
  958.       @blood_rain_bitmap.fill_rect(6-i, i*8, 1, 8, darkRed)
  959.     end
  960.     @blood_rain_splash = Bitmap.new(8, 5)
  961.     @blood_rain_splash.fill_rect(1, 0, 6, 1, darkRed)
  962.     @blood_rain_splash.fill_rect(1, 4, 6, 1, darkRed)
  963.     @blood_rain_splash.fill_rect(0, 1, 1, 3, darkRed)
  964.     @blood_rain_splash.fill_rect(7, 1, 1, 3, darkRed)
  965.    
  966.     @sparkle_bitmaps = []
  967.    
  968.     lightBlue = Color.new(181, 244, 255, 255)
  969.     midBlue   = Color.new(126, 197, 235, 255)
  970.     darkBlue  = Color.new(77, 136, 225, 255)
  971.    
  972.     # 1st sparkle bitmap
  973.     @sparkle_bitmaps[0] = Bitmap.new(7, 7)
  974.     @sparkle_bitmaps[0].set_pixel(3, 3, darkBlue)
  975.    
  976.     # 2nd sparkle bitmap
  977.     @sparkle_bitmaps[1] = Bitmap.new(7, 7)
  978.     @sparkle_bitmaps[1].fill_rect(3, 2, 1, 3, darkBlue)
  979.     @sparkle_bitmaps[1].fill_rect(2, 3, 3, 1, darkBlue)
  980.     @sparkle_bitmaps[1].set_pixel(3, 3, midBlue)
  981.    
  982.     # 3rd sparkle bitmap
  983.     @sparkle_bitmaps[2] = Bitmap.new(7, 7)
  984.     @sparkle_bitmaps[2].set_pixel(1, 1, darkBlue)
  985.     @sparkle_bitmaps[2].set_pixel(5, 1, darkBlue)
  986.     @sparkle_bitmaps[2].set_pixel(2, 2, midBlue)
  987.     @sparkle_bitmaps[2].set_pixel(4, 2, midBlue)
  988.     @sparkle_bitmaps[2].set_pixel(3, 3, lightBlue)
  989.     @sparkle_bitmaps[2].set_pixel(2, 4, midBlue)
  990.     @sparkle_bitmaps[2].set_pixel(4, 4, midBlue)
  991.     @sparkle_bitmaps[2].set_pixel(1, 5, darkBlue)
  992.     @sparkle_bitmaps[2].set_pixel(5, 5, darkBlue)
  993.    
  994.     # 4th sparkle bitmap
  995.     @sparkle_bitmaps[3] = Bitmap.new(7, 7)
  996.     @sparkle_bitmaps[3].fill_rect(3, 1, 1, 5, darkBlue)
  997.     @sparkle_bitmaps[3].fill_rect(1, 3, 5, 1, darkBlue)
  998.     @sparkle_bitmaps[3].fill_rect(3, 2, 1, 3, midBlue)
  999.     @sparkle_bitmaps[3].fill_rect(2, 3, 3, 1, midBlue)
  1000.     @sparkle_bitmaps[3].set_pixel(3, 3, lightBlue)
  1001.    
  1002.     # 5th sparkle bitmap
  1003.     @sparkle_bitmaps[4] = Bitmap.new(7, 7)
  1004.     @sparkle_bitmaps[4].fill_rect(2, 2, 3, 3, midBlue)
  1005.     @sparkle_bitmaps[4].fill_rect(3, 2, 1, 3, darkBlue)
  1006.     @sparkle_bitmaps[4].fill_rect(2, 3, 3, 1, darkBlue)
  1007.     @sparkle_bitmaps[4].set_pixel(3, 3, lightBlue)
  1008.     @sparkle_bitmaps[4].set_pixel(1, 1, darkBlue)
  1009.     @sparkle_bitmaps[4].set_pixel(5, 1, darkBlue)
  1010.     @sparkle_bitmaps[4].set_pixel(1, 5, darkBlue)
  1011.     @sparkle_bitmaps[4].set_pixel(5, 1, darkBlue)
  1012.    
  1013.     # 6th sparkle bitmap
  1014.     @sparkle_bitmaps[5] = Bitmap.new(7, 7)
  1015.     @sparkle_bitmaps[5].fill_rect(2, 1, 3, 5, darkBlue)
  1016.     @sparkle_bitmaps[5].fill_rect(1, 2, 5, 3, darkBlue)
  1017.     @sparkle_bitmaps[5].fill_rect(2, 2, 3, 3, midBlue)
  1018.     @sparkle_bitmaps[5].fill_rect(3, 1, 1, 5, midBlue)
  1019.     @sparkle_bitmaps[5].fill_rect(1, 3, 5, 1, midBlue)
  1020.     @sparkle_bitmaps[5].fill_rect(3, 2, 1, 3, lightBlue)
  1021.     @sparkle_bitmaps[5].fill_rect(2, 3, 3, 1, lightBlue)
  1022.     @sparkle_bitmaps[5].set_pixel(3, 3, white)
  1023.    
  1024.     # 7th sparkle bitmap
  1025.     @sparkle_bitmaps[6] = Bitmap.new(7, 7)
  1026.     @sparkle_bitmaps[6].fill_rect(2, 1, 3, 5, midBlue)
  1027.     @sparkle_bitmaps[6].fill_rect(1, 2, 5, 3, midBlue)
  1028.     @sparkle_bitmaps[6].fill_rect(3, 0, 1, 7, darkBlue)
  1029.     @sparkle_bitmaps[6].fill_rect(0, 3, 7, 1, darkBlue)
  1030.     @sparkle_bitmaps[6].fill_rect(2, 2, 3, 3, lightBlue)
  1031.     @sparkle_bitmaps[6].fill_rect(3, 2, 1, 3, midBlue)
  1032.     @sparkle_bitmaps[6].fill_rect(2, 3, 3, 1, midBlue)
  1033.     @sparkle_bitmaps[6].set_pixel(3, 3, white)
  1034.    
  1035.     # Meteor bitmap
  1036.     @meteor_bitmap = Bitmap.new(14, 12)
  1037.     @meteor_bitmap.fill_rect(0, 8, 5, 4, paleOrange)
  1038.     @meteor_bitmap.fill_rect(1, 7, 6, 4, paleOrange)
  1039.     @meteor_bitmap.set_pixel(7, 8, paleOrange)
  1040.     @meteor_bitmap.fill_rect(1, 8, 2, 2, brightOrange)
  1041.     @meteor_bitmap.set_pixel(2, 7, brightOrange)
  1042.     @meteor_bitmap.fill_rect(3, 6, 2, 1, brightOrange)
  1043.     @meteor_bitmap.set_pixel(3, 8, brightOrange)
  1044.     @meteor_bitmap.set_pixel(3, 10, brightOrange)
  1045.     @meteor_bitmap.set_pixel(4, 9, brightOrange)
  1046.     @meteor_bitmap.fill_rect(5, 5, 1, 5, brightOrange)
  1047.     @meteor_bitmap.fill_rect(6, 4, 1, 5, brightOrange)
  1048.     @meteor_bitmap.fill_rect(7, 3, 1, 5, brightOrange)
  1049.     @meteor_bitmap.fill_rect(8, 6, 1, 2, brightOrange)
  1050.     @meteor_bitmap.set_pixel(9, 5, brightOrange)
  1051.     @meteor_bitmap.set_pixel(3, 8, midRed)
  1052.     @meteor_bitmap.fill_rect(4, 7, 1, 2, midRed)
  1053.     @meteor_bitmap.set_pixel(4, 5, midRed)
  1054.     @meteor_bitmap.set_pixel(5, 4, midRed)
  1055.     @meteor_bitmap.set_pixel(5, 6, midRed)
  1056.     @meteor_bitmap.set_pixel(6, 5, midRed)
  1057.     @meteor_bitmap.set_pixel(6, 7, midRed)
  1058.     @meteor_bitmap.fill_rect(7, 4, 1, 3, midRed)
  1059.     @meteor_bitmap.fill_rect(8, 3, 1, 3, midRed)
  1060.     @meteor_bitmap.fill_rect(9, 2, 1, 3, midRed)
  1061.     @meteor_bitmap.fill_rect(10, 1, 1, 3, midRed)
  1062.     @meteor_bitmap.fill_rect(11, 0, 1, 3, midRed)
  1063.     @meteor_bitmap.fill_rect(12, 0, 1, 2, midRed)
  1064.     @meteor_bitmap.set_pixel(13, 0, midRed)
  1065.    
  1066.     # impact bitmap
  1067.     @impact_bitmap = Bitmap.new(22, 11)
  1068.     @impact_bitmap.fill_rect(0, 5, 1, 2, brightOrange)
  1069.     @impact_bitmap.set_pixel(1, 4, brightOrange)
  1070.     @impact_bitmap.set_pixel(1, 6, brightOrange)
  1071.     @impact_bitmap.set_pixel(2, 3, brightOrange)
  1072.     @impact_bitmap.set_pixel(2, 7, brightOrange)
  1073.     @impact_bitmap.set_pixel(3, 2, midRed)
  1074.     @impact_bitmap.set_pixel(3, 7, midRed)
  1075.     @impact_bitmap.set_pixel(4, 2, brightOrange)
  1076.     @impact_bitmap.set_pixel(4, 8, brightOrange)
  1077.     @impact_bitmap.set_pixel(5, 2, midRed)
  1078.     @impact_bitmap.fill_rect(5, 8, 3, 1, brightOrange)
  1079.     @impact_bitmap.set_pixel(6, 1, midRed)
  1080.     @impact_bitmap.fill_rect(7, 1, 8, 1, brightOrange)
  1081.     @impact_bitmap.fill_rect(7, 9, 8, 1, midRed)
  1082.    
  1083.    
  1084.     # Ash bitmaps
  1085.     @ash_bitmaps = []
  1086.     @ash_bitmaps[0] = Bitmap.new(3, 3)
  1087.     @ash_bitmaps[0].fill_rect(0, 1, 1, 3, lightGrey)
  1088.     @ash_bitmaps[0].fill_rect(1, 0, 3, 1, lightGrey)
  1089.     @ash_bitmaps[0].set_pixel(1, 1, white)
  1090.     @ash_bitmaps[1] = Bitmap.new(3, 3)
  1091.     @ash_bitmaps[1].fill_rect(0, 1, 1, 3, grey)
  1092.     @ash_bitmaps[1].fill_rect(1, 0, 3, 1, grey)
  1093.     @ash_bitmaps[1].set_pixel(1, 1, lightGrey)
  1094.    
  1095.     # Bubble bitmaps
  1096.     @bubble_bitmaps = []
  1097.     darkBlue  = Color.new(77, 136, 225, 160)
  1098.     aqua = Color.new(197, 253, 254, 160)
  1099.     lavender = Color.new(225, 190, 244, 160)
  1100.    
  1101.     # first bubble bitmap
  1102.     @bubble_bitmaps[0] = Bitmap.new(24, 24)
  1103.     @bubble_bitmaps[0].fill_rect(0, 9, 24, 5, darkBlue)
  1104.     @bubble_bitmaps[0].fill_rect(1, 6, 22, 11, darkBlue)
  1105.     @bubble_bitmaps[0].fill_rect(2, 5, 20, 13, darkBlue)
  1106.     @bubble_bitmaps[0].fill_rect(3, 4, 18, 15, darkBlue)
  1107.     @bubble_bitmaps[0].fill_rect(4, 3, 16, 17, darkBlue)
  1108.     @bubble_bitmaps[0].fill_rect(5, 2, 14, 19, darkBlue)
  1109.     @bubble_bitmaps[0].fill_rect(6, 1, 12, 21, darkBlue)
  1110.     @bubble_bitmaps[0].fill_rect(9, 0, 5, 24, darkBlue)
  1111.     @bubble_bitmaps[0].fill_rect(2, 11, 20, 4, aqua)
  1112.     @bubble_bitmaps[0].fill_rect(3, 7, 18, 10, aqua)
  1113.     @bubble_bitmaps[0].fill_rect(4, 6, 16, 12, aqua)
  1114.     @bubble_bitmaps[0].fill_rect(5, 5, 14, 14, aqua)
  1115.     @bubble_bitmaps[0].fill_rect(6, 4, 12, 16, aqua)
  1116.     @bubble_bitmaps[0].fill_rect(9, 2, 4, 20, aqua)
  1117.     @bubble_bitmaps[0].fill_rect(5, 10, 1, 7, lavender)
  1118.     @bubble_bitmaps[0].fill_rect(6, 14, 1, 5, lavender)
  1119.     @bubble_bitmaps[0].fill_rect(7, 15, 1, 4, lavender)
  1120.     @bubble_bitmaps[0].fill_rect(8, 16, 1, 4, lavender)
  1121.     @bubble_bitmaps[0].fill_rect(9, 17, 1, 3, lavender)
  1122.     @bubble_bitmaps[0].fill_rect(10, 18, 4, 3, lavender)
  1123.     @bubble_bitmaps[0].fill_rect(14, 18, 1, 2, lavender)
  1124.     @bubble_bitmaps[0].fill_rect(13, 5, 4, 4, white)
  1125.     @bubble_bitmaps[0].fill_rect(14, 4, 2, 1, white)
  1126.     @bubble_bitmaps[0].set_pixel(17, 6, white)
  1127.    
  1128.     # second bubble bitmap
  1129.     @bubble_bitmaps[1] = Bitmap.new(14, 15)
  1130.     @bubble_bitmaps[1].fill_rect(0, 4, 14, 7, darkBlue)
  1131.     @bubble_bitmaps[1].fill_rect(1, 3, 12, 9, darkBlue)
  1132.     @bubble_bitmaps[1].fill_rect(2, 2, 10, 11, darkBlue)
  1133.     @bubble_bitmaps[1].fill_rect(3, 1, 8, 13, darkBlue)
  1134.     @bubble_bitmaps[1].fill_rect(5, 0, 4, 15, darkBlue)
  1135.     @bubble_bitmaps[1].fill_rect(1, 5, 12, 4, aqua)
  1136.     @bubble_bitmaps[1].fill_rect(2, 4, 10, 6, aqua)
  1137.     @bubble_bitmaps[1].fill_rect(3, 3, 8, 8, aqua)
  1138.     @bubble_bitmaps[1].fill_rect(4, 2, 6, 10, aqua)
  1139.     @bubble_bitmaps[1].fill_rect(1, 5, 12, 4, aqua)
  1140.     @bubble_bitmaps[1].fill_rect(3, 9, 1, 2, lavender)
  1141.     @bubble_bitmaps[1].fill_rect(4, 10, 1, 2, lavender)
  1142.     @bubble_bitmaps[1].fill_rect(5, 11, 4, 1, lavender)
  1143.     @bubble_bitmaps[1].fill_rect(6, 12, 2, 1, white)
  1144.     @bubble_bitmaps[1].fill_rect(8, 3, 2, 2, white)
  1145.     @bubble_bitmaps[1].set_pixel(7, 4, white)
  1146.     @bubble_bitmaps[1].set_pixel(8, 5, white)
  1147.    
  1148.     # Other option for bubbles
  1149.     @bubble2_bitmaps = Array.new
  1150.     darkSteelGray = Color.new(145, 150, 155, 160)
  1151.     midSteelGray = Color.new(180, 180, 185, 160)
  1152.     lightSteelGray = Color.new(225, 225, 235, 160)
  1153.     steelBlue = Color.new(145, 145, 165, 160)
  1154.     lightSteelBlue = Color.new(165, 170, 180, 160)
  1155.     transparentWhite = Color.new(255, 255, 255, 160)
  1156.    
  1157.     # first bubble 2 bitmap
  1158.     @bubble2_bitmaps[0] = Bitmap.new(6, 6)
  1159.     @bubble2_bitmaps[0].fill_rect(0, 0, 6, 6, darkSteelGray)
  1160.     @bubble2_bitmaps[0].fill_rect(0, 2, 6, 2, midSteelGray)
  1161.     @bubble2_bitmaps[0].fill_rect(2, 0, 2, 6, midSteelGray)
  1162.     @bubble2_bitmaps[0].fill_rect(2, 2, 2, 2, lightSteelGray)
  1163.    
  1164.     # second bubble 2 bitmap
  1165.     @bubble2_bitmaps[1] = Bitmap.new(8, 8)
  1166.     @bubble2_bitmaps[1].fill_rect(0, 2, 2, 4, steelBlue)
  1167.     @bubble2_bitmaps[1].fill_rect(2, 0, 4, 2, darkSteelGray)
  1168.     @bubble2_bitmaps[1].fill_rect(6, 2, 2, 2, darkSteelGray)
  1169.     @bubble2_bitmaps[1].fill_rect(2, 6, 2, 2, darkSteelGray)
  1170.     @bubble2_bitmaps[1].fill_rect(6, 4, 2, 2, midSteelGray)
  1171.     @bubble2_bitmaps[1].fill_rect(4, 6, 2, 2, midSteelGray)
  1172.     @bubble2_bitmaps[1].fill_rect(4, 4, 2, 2, lightSteelBlue)
  1173.     @bubble2_bitmaps[1].fill_rect(2, 4, 2, 2, lightSteelGray)
  1174.     @bubble2_bitmaps[1].fill_rect(4, 2, 2, 2, lightSteelGray)
  1175.     @bubble2_bitmaps[1].fill_rect(2, 2, 2, 2, transparentWhite)
  1176.    
  1177.     # third bubble 2 bitmap
  1178.     @bubble2_bitmaps[2] = Bitmap.new(8, 10)
  1179.     @bubble2_bitmaps[2].fill_rect(8, 2, 2, 4, steelBlue)
  1180.     @bubble2_bitmaps[2].fill_rect(2, 0, 8, 2, darkSteelGray)
  1181.     @bubble2_bitmaps[2].fill_rect(2, 6, 8, 2, darkSteelGray)
  1182.     @bubble2_bitmaps[2].fill_rect(4, 0, 2, 2, midSteelGray)
  1183.     @bubble2_bitmaps[2].fill_rect(4, 6, 2, 2, midSteelGray)
  1184.     @bubble2_bitmaps[2].fill_rect(0, 2, 2, 2, midSteelGray)
  1185.     @bubble2_bitmaps[2].fill_rect(0, 4, 2, 2, lightSteelBlue)
  1186.     @bubble2_bitmaps[2].fill_rect(2, 2, 6, 4, lightSteelGray)
  1187.     @bubble2_bitmaps[2].fill_rect(2, 2, 4, 2, transparentWhite)
  1188.     @bubble2_bitmaps[2].fill_rect(4, 4, 2, 2, transparentWhite)
  1189.    
  1190.     # fourth bubble 2 bitmap
  1191.     @bubble2_bitmaps[3] = Bitmap.new(14, 14)
  1192.     @bubble2_bitmaps[3].fill_rect(4, 0, 4, 2, steelBlue)
  1193.     @bubble2_bitmaps[3].fill_rect(0, 4, 2, 4, steelBlue)
  1194.     @bubble2_bitmaps[3].fill_rect(12, 4, 2, 4, steelBlue)
  1195.     @bubble2_bitmaps[3].fill_rect(8, 0, 2, 2, darkSteelGray)
  1196.     @bubble2_bitmaps[3].fill_rect(0, 6, 2, 2, darkSteelGray)
  1197.     @bubble2_bitmaps[3].fill_rect(12, 6, 2, 2, darkSteelGray)
  1198.     @bubble2_bitmaps[3].fill_rect(4, 12, 6, 2, darkSteelGray)
  1199.     @bubble2_bitmaps[3].fill_rect(8, 0, 2, 2, darkSteelGray)
  1200.     @bubble2_bitmaps[3].fill_rect(2, 2, 10, 10, midSteelGray)
  1201.     @bubble2_bitmaps[3].fill_rect(6, 12, 2, 2, midSteelGray)
  1202.     @bubble2_bitmaps[3].fill_rect(2, 4, 10, 6, lightSteelGray)
  1203.     @bubble2_bitmaps[3].fill_rect(4, 2, 2, 2, lightSteelGray)
  1204.     @bubble2_bitmaps[3].fill_rect(6, 10, 4, 2, lightSteelGray)
  1205.     @bubble2_bitmaps[3].fill_rect(6, 4, 2, 2, transparentWhite)
  1206.     @bubble2_bitmaps[3].fill_rect(4, 6, 2, 2, transparentWhite)
  1207.    
  1208.     @user_bitmaps = []
  1209.     update_user_defined
  1210.   end
  1211.  
  1212.   def update_user_defined
  1213.     for image in @user_bitmaps
  1214.       image.dispose
  1215.     end
  1216.     for name in PAC::SYSTEM::WEATHER_IMAGES
  1217.       @user_bitmaps.push(RPG::Cache.picture(name))
  1218.     end
  1219.     for sprite in @sprites
  1220.       sprite.bitmap = @user_bitmaps[rand(@user_bitmaps.size)]
  1221.     end
  1222.   end
  1223. end
  1224.  
  1225. #===============================================================================
  1226. #
  1227. # END OF SCRIPT
  1228. #
  1229. #===============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement