设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1757|回复: 4
打印 上一主题 下一主题

[RMVA发布] 【VX移植】扩张天气效果

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
42 小时
注册时间
2016-11-27
帖子
30
跳转到指定楼层
1
发表于 2017-1-26 14:28:33 | 只看该作者 |只看大图 回帖奖励 |正序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 Pickstar2 于 2017-3-5 09:43 编辑

现在VA也可以用它了!
使用方法:
# 事件 → 脚本 → 插入语句:screen.change_weather(天气类别,强度,改变时间)
# example1:screen.change_weather(9, 25, 30)
# 如此将在地图上产生一个绿色、会翻转的落叶的效果。
# 21种预设效果在第105~144行查看
# 取消脚本效果请在事件中将天气设置为"无"


Spriteset Weather.zip

1.72 MB, 下载次数: 287

范例工程

Lv2.观梦者

梦石
0
星屑
483
在线时间
94 小时
注册时间
2019-6-10
帖子
34
4
发表于 2020-1-1 21:53:42 | 只看该作者
可以用于商业游戏吗?
<font color=&quot;RoyalBlue&quot;>furry<font color=&quot;Black&quot;>画师一个
WWW
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
110
在线时间
81 小时
注册时间
2017-1-22
帖子
16
3
发表于 2017-1-26 17:36:04 | 只看该作者
很给力的脚本,刚好最近在天气上做文章,然而事件并不好用,感谢分享脚本!
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
42 小时
注册时间
2016-11-27
帖子
30
2
 楼主| 发表于 2017-1-26 14:30:47 | 只看该作者
[ 本帖最后由 Pickstar2 于 2017-1-26 14:38 编辑 ]\n\n
RUBY 代码复制
  1. #==============================================================================
  2. # ■ Spriteset_Weather
  3. #------------------------------------------------------------------------------
  4. # 通过脚本内建位图强化天气效果,默认无需任何图片素材。当然也可以使用自定义图片。
  5. # RGSS3 by:Pickstar2
  6. #==============================================================================
  7.  
  8. $WEATHER_UPDATE = false   #
  9. $WEATHER_IMAGES = []      # 自定义图片名称数组
  10. $WEATHER_X = 0            # 图像的像素数水平位移调整(正/右,负=左)
  11. $WEATHER_Y = 0            # 图像的像素数垂直位移调整(正=下,负=上)
  12. $WEATHER_FADE = 0         # 每次更新多少图像应该褪色(0 =不褪色,255 =立即消失)
  13. $WEATHER_ANIMATED = false # 图像循环
  14.  
  15. # 使用方法:事件 → 脚本 → 插入语句:screen.change_weather(天气类别,强度,改变时间)
  16. # example1:screen.change_weather(9, 25, 30)
  17. # 如此将在地图上产生一个绿色、会翻转的落叶的效果。
  18. # 21种预设效果在第105~144行查看
  19. # 取消脚本效果请在事件中将天气设置为"无"
  20.  
  21.   HEIGHT = 416 # 游戏窗口大小
  22.   WIDTH = 544 # 游戏窗口大小
  23.  
  24.  
  25.  
  26. class Spriteset_Weather
  27.   #--------------------------------------------------------------------------
  28.   # ● 定义实例变量
  29.   #--------------------------------------------------------------------------
  30.   attr_reader :type
  31.   attr_reader :power
  32.   attr_reader :ox
  33.   attr_reader :oy
  34.   #--------------------------------------------------------------------------
  35.   # ● 初始化对象
  36.   #--------------------------------------------------------------------------
  37.   def initialize(viewport = nil)
  38.     @type = 0
  39.     [url=home.php?mod=space&uid=28342]@power[/url] = 0
  40.     @ox = 0
  41.     @oy = 0
  42.  
  43.     @count = 0
  44.     @current_pose = []
  45.     @info = []
  46.     @countarray = []
  47.  
  48.     make_bitmaps
  49.  
  50.     @sprites = []
  51.  
  52.     for i in 1..500
  53.       sprite = Sprite.new(viewport)
  54.       sprite.visible = false
  55.       sprite.opacity = 0
  56.       @sprites.push(sprite)
  57.       @current_pose.push(0)
  58.       @info.push(rand(50))
  59.       @countarray.push(rand(15))
  60.     end
  61.  
  62.   end
  63.   #--------------------------------------------------------------------------
  64.   # ● 释放
  65.   #--------------------------------------------------------------------------
  66.   def dispose
  67.     for sprite in @sprites
  68.       sprite.dispose
  69.     end
  70.     @rain_bitmap.dispose
  71.     @storm_bitmap.dispose
  72.     @snow_bitmap.dispose
  73.     @hail_bitmap.dispose
  74.     @petal_bitmap.dispose
  75.     @blood_rain_bitmap.dispose
  76.     for image in @autumn_leaf_bitmaps
  77.       image.dispose
  78.     end
  79.     for image in @green_leaf_bitmaps
  80.       image.dispose
  81.     end
  82.     for image in @rose_bitmaps
  83.       image.dispose
  84.     end
  85.     for image in @feather_bitmaps
  86.       image.dispose
  87.     end
  88.     for image in @sparkle_bitmaps
  89.       image.dispose
  90.     end
  91.     for image in @user_bitmaps
  92.       image.dispose
  93.     end
  94.     $WEATHER_UPDATE = true
  95.   end
  96.   #--------------------------------------------------------------------------
  97.   # ● 设定天气类型
  98.   #     type : 新的天气类型
  99.   #--------------------------------------------------------------------------
  100.   def type=(type)
  101.     return if @type == type
  102.     @type = type
  103.     case @type
  104.     when 1 # 雨
  105.       bitmap = @rain_bitmap
  106.     when 2 # 暴风雨
  107.       bitmap = @storm_bitmap
  108.     when 3 # 雪
  109.       bitmap = @snow_bitmap
  110.     when 4 # 冰雹
  111.       bitmap = @hail_bitmap
  112.     when 5 # 雨/雷电
  113.       bitmap = @rain_bitmap
  114.       [url=home.php?mod=space&uid=34616]@thunder[/url] = true
  115.     when 6 # 秋天的落叶
  116.       bitmap = @autumn_leaf_bitmaps[0]
  117.     when 7 # 吹的秋天的落叶
  118.       bitmap = @autumn_leaf_bitmaps[0]
  119.     when 8 # 旋转的秋天的落叶
  120.       bitmap = @autumn_leaf_bitmaps[0]
  121.     when 9 # 下落的绿色落叶
  122.       bitmap = @green_leaf_bitmaps[0]
  123.     when 10 # 樱花的花瓣
  124.       bitmap = @petal_bitmap
  125.     when 11 # 玫瑰花瓣
  126.       bitmap = @rose_bitmaps[0]
  127.     when 12 # 羽毛
  128.       bitmap = @feather_bitmaps[0]
  129.     when 13 # 雨血
  130.       bitmap = @blood_rain_bitmap
  131.     when 14 # 火花
  132.       bitmap = @sparkle_bitmaps[0]
  133.     when 15 # 自定义
  134.         bitmap = @user_bitmaps[rand(@user_bitmaps.size)]
  135.     when 16 # 吹雪
  136.       bitmap = @snow_bitmap
  137.     when 17 # 流星
  138.       bitmap = @meteor_bitmap
  139.     when 18 # 落灰
  140.       bitmap = @ash_bitmaps[rand(@ash_bitmaps.size)]
  141.     when 19 # 泡沫
  142.       bitmap = @bubble_bitmaps[rand(@bubble_bitmaps.size)]
  143.     when 21 # 点燃的火花
  144.       bitmap = @sparkle_bitmaps[0]
  145.     else
  146.       bitmap = nil # 没有的
  147.     end
  148.  
  149.     if @type != 5
  150.       @thunder = false
  151.     end
  152.  
  153.     for i in 0...@sprites.size
  154.       sprite = @sprites[i]
  155.       sprite.visible = (i <= @power)
  156.       if @type == 19
  157.         sprite.bitmap = @bubble_bitmaps[rand(@bubble_bitmaps.size)]
  158.       elsif @type == 20
  159.         sprite.bitmap = @bubble2_bitmaps[rand(@bubble2_bitmaps.size)]
  160.       elsif @type == 3
  161.         r = rand(@snow_bitmaps.size)
  162.         @info[i] = r
  163.         sprite.bitmap = @snow_bitmaps[r]
  164.       else
  165.         sprite.bitmap = bitmap
  166.       end
  167.     end
  168.   end
  169.   #--------------------------------------------------------------------------
  170.   # ● 原点 X 座標の設定
  171.   #     ox : 原点 X 座標
  172.   #--------------------------------------------------------------------------
  173.   def ox=(ox)
  174.     return if @ox == ox;
  175.     @ox = ox
  176.     for sprite in @sprites
  177.       sprite.ox = @ox
  178.     end
  179.   end
  180.   #--------------------------------------------------------------------------
  181.   # ● 原点 Y 座標の設定
  182.   #     oy : 原点 Y 座標
  183.   #--------------------------------------------------------------------------
  184.   def oy=(oy)
  185.     return if @oy == oy;
  186.     @oy = oy
  187.     for sprite in @sprites
  188.       sprite.oy = @oy
  189.     end
  190.   end
  191.   #--------------------------------------------------------------------------
  192.   # ● スプライト最大数の設定
  193.   #     power : スプライト最大数
  194.   #--------------------------------------------------------------------------
  195.   def power=(power)
  196.     return if @power == power;
  197.     @power = [[power, 0].max, 40].min
  198.     for i in 1..40
  199.       sprite = @sprites[i]
  200.       sprite.visible = (i <= @power) if sprite != nil
  201.       if @type == 19
  202.           sprite.bitmap = @bubble_bitmaps[rand(@bubble_bitmaps.size)]
  203.         elsif @type == 20
  204.           sprite.bitmap = @bubble2_bitmaps[rand(@bubble2_bitmaps.size)]
  205.         elsif @type == 3
  206.           r = rand(@snow_bitmaps.size)
  207.           @info[i] = r
  208.           sprite.bitmap = @snow_bitmaps[r]
  209.         end
  210.     end
  211.   end
  212.   #--------------------------------------------------------------------------
  213.   # ● 更新
  214.   #--------------------------------------------------------------------------
  215.   def update
  216.     return if @type == 0
  217.     for i in 1..@power
  218.       sprite = @sprites[i]
  219.       if @type == 1 or @type == 5 or @type == 13 # rain
  220.         if sprite.opacity <= 150
  221.           if @current_pose[i] == 0
  222.             sprite.y += @rain_bitmap.height
  223.             sprite.x -= @rain_bitmap.width
  224.             if @type == 1 or @type == 5
  225.               sprite.bitmap = @rain_splash
  226.             else
  227.               sprite.bitmap = @blood_rain_splash
  228.             end
  229.             @current_pose[i] = 1
  230.           end
  231.         else
  232.           if @current_pose[i] == 1
  233.             if @type == 1 or @type == 5
  234.               sprite.bitmap = @rain_bitmap
  235.             else
  236.               sprite.bitmap = @blood_rain_bitmap
  237.             end
  238.             @current_pose[i] = 0
  239.           end
  240.           sprite.x -= 2
  241.           sprite.y += 16
  242.           if @thunder and (rand(8000 - @power) == 0)
  243.             $game_map.screen.start_flash(Color.new(255, 255, 255, 255), 5)
  244.             Audio.se_play("Audio/SE/Thunder1")
  245.           end
  246.         end
  247.         sprite.opacity -= 8
  248.       end
  249.       if @type == 2 # 暴雨
  250.         sprite.x -= 8
  251.         sprite.y += 16
  252.         sprite.opacity -= 12
  253.       end
  254.       if @type == 3 # sn雪
  255.         case @info[i]
  256.         when 0 # 最小的片状碎花物体,最慢的下落速度
  257.           sprite.y += 1
  258.         when 1
  259.           sprite.y += 3
  260.         when 2
  261.           sprite.y += 5
  262.         when 3
  263.           sprite.y += 7
  264.         end
  265.         sprite.opacity -= 3
  266.       end
  267.       if @type == 4 # 冰雹
  268.         sprite.x -= 1
  269.         sprite.y += 18
  270.         sprite.opacity -= 15
  271.       end
  272.       if @type == 6 # falling autumn leaves
  273.         @count = rand(20)
  274.         if @count == 0
  275.           sprite.bitmap = @autumn_leaf_bitmaps[@current_pose[i]]
  276.           @current_pose[i] = (@current_pose[i] + 1) % @autumn_leaf_bitmaps.size
  277.         end
  278.         sprite.x -= 1
  279.         sprite.y += 1
  280.       end
  281.       if @type == 7 # blowing autumn leaves
  282.         @count = rand(20)
  283.         if @count == 0
  284.           sprite.bitmap = @autumn_leaf_bitmaps[@current_pose[i]]
  285.           @current_pose[i] = (@current_pose[i] + 1) % @autumn_leaf_bitmaps.size
  286.         end
  287.         sprite.x -= 10
  288.         sprite.y += (rand(4) - 2)
  289.       end
  290.       if @type == 8 # swirling autumn leaves
  291.         @count = rand(20)
  292.         if @count == 0
  293.           sprite.bitmap = @autumn_leaf_bitmaps[@current_pose[i]]
  294.           @current_pose[i] = (@current_pose[i] + 1) % @autumn_leaf_bitmaps.size
  295.         end
  296.         if @info[i] != 0
  297.           if @info[i] >= 1 and @info[i] <= 10
  298.             sprite.x -= 3
  299.             sprite.y -= 1
  300.           elsif @info[i] >= 11 and @info[i] <= 16
  301.             sprite.x -= 1
  302.             sprite.y -= 2
  303.           elsif @info[i] >= 17 and @info[i] <= 20
  304.             sprite.y -= 3
  305.           elsif @info[i] >= 21 and @info[i] <= 30
  306.             sprite.y -= 2
  307.             sprite.x += 1
  308.           elsif @info[i] >= 31 and @info[i] <= 36
  309.             sprite.y -= 1
  310.             sprite.x += 3
  311.           elsif @info[i] >= 37 and @info[i] <= 40
  312.             sprite.x += 5
  313.           elsif @info[i] >= 41 and @info[i] <= 46
  314.             sprite.y += 1
  315.             sprite.x += 3
  316.           elsif @info[i] >= 47 and @info[i] <= 58
  317.             sprite.y += 2
  318.             sprite.x += 1
  319.           elsif @info[i] >= 59 and @info[i] <= 64
  320.             sprite.y += 3
  321.           elsif @info[i] >= 65 and @info[i] <= 70
  322.             sprite.x -= 1
  323.             sprite.y += 2
  324.           elsif @info[i] >= 71 and @info[i] <= 81
  325.             sprite.x -= 3
  326.             sprite.y += 1
  327.           elsif @info[i] >= 82 and @info[i] <= 87
  328.             sprite.x -= 5
  329.           end
  330.           @info[i] = (@info[i] + 1) % 88
  331.         else
  332.           if rand(200) == 0
  333.             @info[i] = 1
  334.           end
  335.           sprite.x -= 5
  336.           sprite.y += 1
  337.         end
  338.       end
  339.       if @type == 9 # 下落的绿色落叶
  340.         if @countarray[i] == 0
  341.           @current_pose[i] = (@current_pose[i] + 1) % @green_leaf_bitmaps.size
  342.           sprite.bitmap = @green_leaf_bitmaps[@current_pose[i]]
  343.           @countarray[i] = rand(15)
  344.         end
  345.         @countarray[i] = (@countarray[i] + 1) % 15
  346.         sprite.y += 1
  347.       end
  348.       if @type == 10 # sakura petals
  349.         if @info[i] < 25
  350.           sprite.x -= 1
  351.         else
  352.           sprite.x += 1
  353.         end
  354.         @info[i] = (@info[i] + 1) % 50
  355.         sprite.y += 1
  356.       end
  357.       if @type == 11 # rose petals
  358.         @count = rand(20)
  359.         if @count == 0
  360.           sprite.bitmap = @rose_bitmaps[@current_pose[i]]
  361.           @current_pose[i] = (@current_pose[i] + 1) % @rose_bitmaps.size
  362.         end
  363.         if @info[i] % 2 == 0
  364.           if @info[i] < 10
  365.             sprite.x -= 1
  366.           elsif
  367.             sprite.x += 1
  368.           end
  369.         end
  370.         sprite.y += 1
  371.       end
  372.       if @type == 12 # feathers
  373.         if @countarray[i] == 0
  374.           @current_pose[i] = (@current_pose[i] + 1) % @feather_bitmaps.size
  375.           sprite.bitmap = @feather_bitmaps[@current_pose[i]]
  376.         end
  377.         @countarray[i] = (@countarray[i] + 1) % 15
  378.         if rand(100) == 0
  379.           sprite.x -= 1
  380.         end
  381.         if rand(100) == 0
  382.           sprite.y -= 1
  383.         end
  384.         if @info[i] < 50
  385.           if rand(2) == 0
  386.             sprite.x -= 1
  387.           else
  388.             sprite.y -= 1
  389.           end
  390.         else
  391.           if rand(2) == 0
  392.             sprite.x += 1
  393.           else
  394.             sprite.y += 1
  395.           end
  396.         end
  397.         @info[i] = (@info[i] + 1) % 100
  398.       end
  399.       if @type == 14 # sparkles
  400.         if @countarray[i] == 0
  401.           @current_pose[i] = (@current_pose[i] + 1) % @sparkle_bitmaps.size
  402.           sprite.bitmap = @sparkle_bitmaps[@current_pose[i]]
  403.         end
  404.         @countarray[i] = (@countarray[i] + 1) % 15
  405.         sprite.y += 1
  406.         sprite.opacity -= 1
  407.       end
  408.       if @type == 15 # user-defined
  409.         if $WEATHER_UPDATE
  410.           update_user_defined
  411.           $WEATHER_UPDATE = false
  412.         end
  413.         if $WEATHER_ANIMATED and @countarray[i] == 0
  414.           @current_pose[i] = (@current_pose[i] + 1) % @user_bitmaps.size
  415.           sprite.bitmap = @user_bitmaps[@current_pose[i]]
  416.         end
  417.         sprite.x += $WEATHER_X
  418.         sprite.y += $WEATHER_Y
  419.         sprite.opacity -= $WEATHER_FADE
  420.       end
  421.       if @type == 16 # blowing snow
  422.         sprite.x -= 10
  423.         sprite.y += 6
  424.         sprite.opacity -= 4
  425.       end
  426.       if @type == 17 # meteors
  427.         if @countarray[i] > 0
  428.           if rand(20) == 0
  429.             sprite.bitmap = @impact_bitmap
  430.             @countarray[i] = -5
  431.           else
  432.             sprite.x -= 6
  433.             sprite.y += 10
  434.           end
  435.         else
  436.           @countarray[i] += 1
  437.           if @countarray[i] == 0
  438.             sprite.bitmap = @meteor_bitmap
  439.             sprite.opacity = 0
  440.             @count_array = 1
  441.           end
  442.         end
  443.       end
  444.       if @type == 18 # ash
  445.         sprite.y += 2
  446.         case @countarray[i] % 3
  447.         when 0
  448.           sprite.x -= 1
  449.         when 1
  450.           sprite.x += 1
  451.         end
  452.       end
  453.       if @type == 19 or @type == 20 # bubbles
  454.         switch = rand(75) + rand(75) + 1
  455.         if @info[i] < switch / 2
  456.           sprite.x -= 1
  457.         else
  458.           sprite.x += 1
  459.         end
  460.         @info[i] = (@info[i] + 1) % switch
  461.         sprite.y -= 1
  462.         if switch % 2 == 0
  463.           sprite.opacity -= 1
  464.         end
  465.       end
  466.       if @type == 21 # sparkles up
  467.         if @countarray[i] == 0
  468.           @current_pose[i] = (@current_pose[i] + 1) % @sparkle_bitmaps.size
  469.           sprite.bitmap = @sparkle_bitmaps[@current_pose[i]]
  470.         end
  471.         @countarray[i] = (@countarray[i] + 1) % 15
  472.         sprite.y -= 1
  473.         sprite.opacity -= 1
  474.       end
  475.       x = sprite.x - @ox
  476.       y = sprite.y - @oy
  477.       if sprite.opacity < 64 or x < -50 or x > 750 or y < -300 or y > 500
  478.         sprite.x = rand(800) - 100 + @ox
  479.         sprite.y = rand(600) - 200 + @oy
  480.         if [13, 14, 16, 5, 2, 1].include?(@type)
  481.           sprite.opacity = rand(100) + 155
  482.         else
  483.           sprite.opacity = 255
  484.         end
  485.       end
  486.     end
  487.   end
  488.  
  489.   def make_bitmaps
  490.     color1 = Color.new(255, 255, 255, 255)
  491.     color2 = Color.new(255, 255, 255, 128)
  492.     @rain_bitmap = Bitmap.new(7, 56)
  493.     for i in 0..6
  494.       @rain_bitmap.fill_rect(6-i, i*8, 1, 8, color1)
  495.     end
  496.     @rain_splash = Bitmap.new(8, 5)
  497.     @rain_splash.fill_rect(1, 0, 6, 1, color2)
  498.     @rain_splash.fill_rect(1, 4, 6, 1, color2)
  499.     @rain_splash.fill_rect(0, 1, 1, 3, color2)
  500.     @rain_splash.fill_rect(7, 1, 1, 3, color2)
  501.     @rain_splash.set_pixel(1, 0, color1)
  502.     @rain_splash.set_pixel(0, 1, color1)
  503.  
  504.     @storm_bitmap = Bitmap.new(34, 64)
  505.     for i in 0..31
  506.       @storm_bitmap.fill_rect(33-i, i*2, 1, 2, color2)
  507.       @storm_bitmap.fill_rect(32-i, i*2, 1, 2, color1)
  508.       @storm_bitmap.fill_rect(31-i, i*2, 1, 2, color2)
  509.     end
  510.     @snow_bitmap = Bitmap.new(6, 6)
  511.     @snow_bitmap.fill_rect(0, 1, 6, 4, color2)
  512.     @snow_bitmap.fill_rect(1, 0, 4, 6, color2)
  513.     @snow_bitmap.fill_rect(1, 2, 4, 2, color1)
  514.     @snow_bitmap.fill_rect(2, 1, 2, 4, color1)
  515.     @sprites = []
  516.  
  517.     @snow_bitmaps = []
  518.  
  519.     color3 = Color.new(255, 255, 255, 204)
  520.     @snow_bitmaps[0] = Bitmap.new(3, 3)
  521.     @snow_bitmaps[0].fill_rect(0, 0, 3, 3, color2)
  522.     @snow_bitmaps[0].fill_rect(0, 1, 3, 1, color3)
  523.     @snow_bitmaps[0].fill_rect(1, 0, 1, 3, color3)
  524.     @snow_bitmaps[0].set_pixel(1, 1, color1)
  525.  
  526.     @snow_bitmaps[1] = Bitmap.new(4, 4)
  527.     @snow_bitmaps[1].fill_rect(0, 1, 4, 2, color2)
  528.     @snow_bitmaps[1].fill_rect(1, 0, 2, 4, color2)
  529.     @snow_bitmaps[1].fill_rect(1, 1, 2, 2, color1)
  530.  
  531.     @snow_bitmaps[2] = Bitmap.new(5, 5)
  532.     @snow_bitmaps[1].fill_rect(0, 1, 5, 3, color3)
  533.     @snow_bitmaps[1].fill_rect(1, 0, 3, 5, color3)
  534.     @snow_bitmaps[1].fill_rect(1, 1, 3, 3, color2)
  535.     @snow_bitmaps[1].fill_rect(2, 1, 3, 1, color1)
  536.     @snow_bitmaps[1].fill_rect(1, 2, 1, 3, color1)
  537.  
  538.     @snow_bitmaps[3] = Bitmap.new(7, 7)
  539.     @snow_bitmaps[1].fill_rect(1, 1, 5, 5, color3)
  540.     @snow_bitmaps[1].fill_rect(2, 0, 7, 3, color3)
  541.     @snow_bitmaps[1].fill_rect(0, 2, 3, 7, color3)
  542.     @snow_bitmaps[1].fill_rect(2, 1, 5, 3, color2)
  543.     @snow_bitmaps[1].fill_rect(1, 2, 3, 5, color2)
  544.     @snow_bitmaps[1].fill_rect(2, 2, 3, 3, color1)
  545.     @snow_bitmaps[1].fill_rect(3, 1, 5, 1, color1)
  546.     @snow_bitmaps[1].fill_rect(1, 3, 1, 5, color1)
  547.  
  548.     blueGrey  = Color.new(215, 227, 227, 150)
  549.     grey      = Color.new(214, 217, 217, 150)
  550.     lightGrey = Color.new(233, 233, 233, 250)
  551.     lightBlue = Color.new(222, 239, 243, 250)
  552.     @hail_bitmap = Bitmap.new(4, 4)
  553.     @hail_bitmap.fill_rect(1, 0, 2, 1, blueGrey)
  554.     @hail_bitmap.fill_rect(0, 1, 1, 2, blueGrey)
  555.     @hail_bitmap.fill_rect(3, 1, 1, 2, grey)
  556.     @hail_bitmap.fill_rect(1, 3, 2, 1, grey)
  557.     @hail_bitmap.fill_rect(1, 1, 2, 2, lightGrey)
  558.     @hail_bitmap.set_pixel(1, 1, lightBlue)
  559.  
  560.  
  561.     color3 = Color.new(255, 167, 192, 255) # light pink
  562.     color4 = Color.new(213, 106, 136, 255) # dark pink
  563.     @petal_bitmap = Bitmap.new(4, 4) #This creates a new bitmap that is 4 x 4 pixels
  564.     @petal_bitmap.fill_rect(0, 3, 1, 1, color3) # this makes a 1x1 pixel "rectangle" at the 0, 3 pixel of the image (upper left corner is 0, 0)
  565.     @petal_bitmap.fill_rect(1, 2, 1, 1, color3)
  566.     @petal_bitmap.fill_rect(2, 1, 1, 1, color3)
  567.     @petal_bitmap.fill_rect(3, 0, 1, 1, color3)
  568.     @petal_bitmap.fill_rect(1, 3, 1, 1, color4)
  569.     @petal_bitmap.fill_rect(2, 2, 1, 1, color4)
  570.     @petal_bitmap.fill_rect(3, 1, 1, 1, color4)
  571.  
  572.  
  573.     brightOrange = Color.new(248, 88, 0, 255)   
  574.     orangeBrown  = Color.new(144, 80, 56, 255)
  575.     burntRed     = Color.new(152, 0, 0, 255)
  576.     paleOrange   = Color.new(232, 160, 128, 255)
  577.     darkBrown    = Color.new(72, 40, 0, 255)
  578.     @autumn_leaf_bitmaps = []
  579.     @autumn_leaf_bitmaps.push(Bitmap.new(8, 8))
  580.     # draw the first of the leaf1 bitmaps
  581.     @autumn_leaf_bitmaps[0].set_pixel(5, 1, orangeBrown)
  582.     @autumn_leaf_bitmaps[0].set_pixel(6, 1, brightOrange)
  583.     @autumn_leaf_bitmaps[0].set_pixel(7, 1, paleOrange)
  584.     @autumn_leaf_bitmaps[0].set_pixel(3, 2, orangeBrown)
  585.     @autumn_leaf_bitmaps[0].fill_rect(4, 2, 2, 1, brightOrange)
  586.     @autumn_leaf_bitmaps[0].set_pixel(6, 2, paleOrange)
  587.     @autumn_leaf_bitmaps[0].set_pixel(2, 3, orangeBrown)
  588.     @autumn_leaf_bitmaps[0].set_pixel(3, 3, brightOrange)
  589.     @autumn_leaf_bitmaps[0].fill_rect(4, 3, 2, 1, paleOrange)
  590.     @autumn_leaf_bitmaps[0].set_pixel(1, 4, orangeBrown)
  591.     @autumn_leaf_bitmaps[0].set_pixel(2, 4, brightOrange)
  592.     @autumn_leaf_bitmaps[0].set_pixel(3, 4, paleOrange)
  593.     @autumn_leaf_bitmaps[0].set_pixel(1, 5, brightOrange)
  594.     @autumn_leaf_bitmaps[0].set_pixel(2, 5, paleOrange)
  595.     @autumn_leaf_bitmaps[0].set_pixel(0, 6, orangeBrown)
  596.     @autumn_leaf_bitmaps[0].set_pixel(1, 6, paleOrange)
  597.     @autumn_leaf_bitmaps[0].set_pixel(0, 7, paleOrange)
  598.  
  599.     # draw the 2nd of the leaf1 bitmaps
  600.     @autumn_leaf_bitmaps.push(Bitmap.new(8, 8))
  601.     @autumn_leaf_bitmaps[1].set_pixel(3, 0, brightOrange)
  602.     @autumn_leaf_bitmaps[1].set_pixel(7, 0, brightOrange)
  603.     @autumn_leaf_bitmaps[1].set_pixel(3, 1, orangeBrown)
  604.     @autumn_leaf_bitmaps[1].set_pixel(4, 1, burntRed)
  605.     @autumn_leaf_bitmaps[1].set_pixel(6, 1, brightOrange)
  606.     @autumn_leaf_bitmaps[1].set_pixel(0, 2, paleOrange)
  607.     @autumn_leaf_bitmaps[1].set_pixel(1, 2, brightOrange)
  608.     @autumn_leaf_bitmaps[1].set_pixel(2, 2, orangeBrown)
  609.     @autumn_leaf_bitmaps[1].set_pixel(3, 2, burntRed)
  610.     @autumn_leaf_bitmaps[1].set_pixel(4, 2, orangeBrown)
  611.     @autumn_leaf_bitmaps[1].set_pixel(5, 2, brightOrange)
  612.     @autumn_leaf_bitmaps[1].fill_rect(1, 3, 3, 1, orangeBrown)
  613.     @autumn_leaf_bitmaps[1].fill_rect(4, 3, 2, 1, brightOrange)
  614.     @autumn_leaf_bitmaps[1].set_pixel(6, 3, orangeBrown)
  615.     @autumn_leaf_bitmaps[1].set_pixel(2, 4, burntRed)
  616.     @autumn_leaf_bitmaps[1].fill_rect(3, 4, 3, 1, brightOrange)
  617.     @autumn_leaf_bitmaps[1].set_pixel(6, 4, burntRed)
  618.     @autumn_leaf_bitmaps[1].set_pixel(7, 4, darkBrown)
  619.     @autumn_leaf_bitmaps[1].set_pixel(1, 5, orangeBrown)
  620.     @autumn_leaf_bitmaps[1].fill_rect(2, 5, 2, 1, brightOrange)
  621.     @autumn_leaf_bitmaps[1].set_pixel(4, 5, orangeBrown)
  622.     @autumn_leaf_bitmaps[1].set_pixel(5, 5, burntRed)
  623.     @autumn_leaf_bitmaps[1].fill_rect(1, 6, 2, 1, brightOrange)
  624.     @autumn_leaf_bitmaps[1].fill_rect(4, 6, 2, 1, burntRed)
  625.     @autumn_leaf_bitmaps[1].set_pixel(0, 7, brightOrange)
  626.     @autumn_leaf_bitmaps[1].set_pixel(5, 7, darkBrown)
  627.  
  628.     # draw the 3rd of the leaf1 bitmaps
  629.     @autumn_leaf_bitmaps.push(Bitmap.new(8, 8))
  630.     @autumn_leaf_bitmaps[2].set_pixel(7, 1, paleOrange)
  631.     @autumn_leaf_bitmaps[2].set_pixel(6, 2, paleOrange)
  632.     @autumn_leaf_bitmaps[2].set_pixel(7, 2, orangeBrown)
  633.     @autumn_leaf_bitmaps[2].set_pixel(5, 3, paleOrange)
  634.     @autumn_leaf_bitmaps[2].set_pixel(6, 3, brightOrange)
  635.     @autumn_leaf_bitmaps[2].set_pixel(4, 4, paleOrange)
  636.     @autumn_leaf_bitmaps[2].set_pixel(5, 4, brightOrange)
  637.     @autumn_leaf_bitmaps[2].set_pixel(6, 4, orangeBrown)
  638.     @autumn_leaf_bitmaps[2].fill_rect(2, 5, 2, 1, paleOrange)
  639.     @autumn_leaf_bitmaps[2].set_pixel(4, 5, brightOrange)
  640.     @autumn_leaf_bitmaps[2].set_pixel(5, 5, orangeBrown)
  641.     @autumn_leaf_bitmaps[2].set_pixel(1, 6, paleOrange)
  642.     @autumn_leaf_bitmaps[2].fill_rect(2, 6, 2, 1, brightOrange)
  643.     @autumn_leaf_bitmaps[2].set_pixel(4, 6, orangeBrown)
  644.     @autumn_leaf_bitmaps[2].set_pixel(0, 7, paleOrange)
  645.     @autumn_leaf_bitmaps[2].set_pixel(1, 7, brightOrange)
  646.     @autumn_leaf_bitmaps[2].set_pixel(2, 7, orangeBrown)
  647.  
  648.     # draw the 4th of the leaf1 bitmaps
  649.     @autumn_leaf_bitmaps.push(Bitmap.new(8, 8))
  650.     @autumn_leaf_bitmaps[3].set_pixel(3, 0, brightOrange)
  651.     @autumn_leaf_bitmaps[3].set_pixel(7, 0, brightOrange)
  652.     @autumn_leaf_bitmaps[3].set_pixel(3, 1, orangeBrown)
  653.     @autumn_leaf_bitmaps[3].set_pixel(4, 1, burntRed)
  654.     @autumn_leaf_bitmaps[3].set_pixel(6, 1, brightOrange)
  655.     @autumn_leaf_bitmaps[3].set_pixel(0, 2, paleOrange)
  656.     @autumn_leaf_bitmaps[3].set_pixel(1, 2, brightOrange)
  657.     @autumn_leaf_bitmaps[3].set_pixel(2, 2, orangeBrown)
  658.     @autumn_leaf_bitmaps[3].set_pixel(3, 2, burntRed)
  659.     @autumn_leaf_bitmaps[3].set_pixel(4, 2, orangeBrown)
  660.     @autumn_leaf_bitmaps[3].set_pixel(5, 2, brightOrange)
  661.     @autumn_leaf_bitmaps[3].fill_rect(1, 3, 3, 1, orangeBrown)
  662.     @autumn_leaf_bitmaps[3].fill_rect(4, 3, 2, 1, brightOrange)
  663.     @autumn_leaf_bitmaps[3].set_pixel(6, 3, orangeBrown)
  664.     @autumn_leaf_bitmaps[3].set_pixel(2, 4, burntRed)
  665.     @autumn_leaf_bitmaps[3].fill_rect(3, 4, 3, 1, brightOrange)
  666.     @autumn_leaf_bitmaps[3].set_pixel(6, 4, burntRed)
  667.     @autumn_leaf_bitmaps[3].set_pixel(7, 4, darkBrown)
  668.     @autumn_leaf_bitmaps[3].set_pixel(1, 5, orangeBrown)
  669.     @autumn_leaf_bitmaps[3].fill_rect(2, 5, 2, 1, brightOrange)
  670.     @autumn_leaf_bitmaps[3].set_pixel(4, 5, orangeBrown)
  671.     @autumn_leaf_bitmaps[3].set_pixel(5, 5, burntRed)
  672.     @autumn_leaf_bitmaps[3].fill_rect(1, 6, 2, 1, brightOrange)
  673.     @autumn_leaf_bitmaps[3].fill_rect(4, 6, 2, 1, burntRed)
  674.     @autumn_leaf_bitmaps[3].set_pixel(0, 7, brightOrange)
  675.     @autumn_leaf_bitmaps[3].set_pixel(5, 7, darkBrown)
  676.  
  677.     @green_leaf_bitmaps = []
  678.     darkGreen  = Color.new(62, 76, 31, 255)
  679.     midGreen   = Color.new(76, 91, 43, 255)
  680.     khaki      = Color.new(105, 114, 66, 255)
  681.     lightGreen = Color.new(128, 136, 88, 255)
  682.     mint       = Color.new(146, 154, 106, 255)
  683.  
  684.     # 1st leaf bitmap
  685.     @green_leaf_bitmaps[0] = Bitmap.new(8, 8)
  686.     @green_leaf_bitmaps[0].set_pixel(1, 0, darkGreen)
  687.     @green_leaf_bitmaps[0].set_pixel(1, 1, midGreen)
  688.     @green_leaf_bitmaps[0].set_pixel(2, 1, darkGreen)
  689.     @green_leaf_bitmaps[0].set_pixel(2, 2, khaki)
  690.     @green_leaf_bitmaps[0].set_pixel(3, 2, darkGreen)
  691.     @green_leaf_bitmaps[0].set_pixel(4, 2, khaki)
  692.     @green_leaf_bitmaps[0].fill_rect(2, 3, 3, 1, midGreen)
  693.     @green_leaf_bitmaps[0].set_pixel(5, 3, khaki)
  694.     @green_leaf_bitmaps[0].fill_rect(2, 4, 2, 1, midGreen)
  695.     @green_leaf_bitmaps[0].set_pixel(4, 4, darkGreen)
  696.     @green_leaf_bitmaps[0].set_pixel(5, 4, lightGreen)
  697.     @green_leaf_bitmaps[0].set_pixel(6, 4, khaki)
  698.     @green_leaf_bitmaps[0].set_pixel(3, 5, midGreen)
  699.     @green_leaf_bitmaps[0].set_pixel(4, 5, darkGreen)
  700.     @green_leaf_bitmaps[0].set_pixel(5, 5, khaki)
  701.     @green_leaf_bitmaps[0].set_pixel(6, 5, lightGreen)
  702.     @green_leaf_bitmaps[0].set_pixel(4, 6, midGreen)
  703.     @green_leaf_bitmaps[0].set_pixel(5, 6, darkGreen)
  704.     @green_leaf_bitmaps[0].set_pixel(6, 6, lightGreen)
  705.     @green_leaf_bitmaps[0].set_pixel(6, 7, khaki)
  706.  
  707.     # 2nd leaf bitmap
  708.     @green_leaf_bitmaps[1] = Bitmap.new(8, 8)
  709.     @green_leaf_bitmaps[1].fill_rect(1, 1, 1, 2, midGreen)
  710.     @green_leaf_bitmaps[1].fill_rect(2, 2, 2, 1, khaki)
  711.     @green_leaf_bitmaps[1].set_pixel(4, 2, lightGreen)
  712.     @green_leaf_bitmaps[1].fill_rect(2, 3, 2, 1, darkGreen)
  713.     @green_leaf_bitmaps[1].fill_rect(4, 3, 2, 1, lightGreen)
  714.     @green_leaf_bitmaps[1].set_pixel(2, 4, midGreen)
  715.     @green_leaf_bitmaps[1].set_pixel(3, 4, darkGreen)
  716.     @green_leaf_bitmaps[1].set_pixel(4, 4, khaki)
  717.     @green_leaf_bitmaps[1].fill_rect(5, 4, 2, 1, lightGreen)
  718.     @green_leaf_bitmaps[1].set_pixel(3, 5, midGreen)
  719.     @green_leaf_bitmaps[1].set_pixel(4, 5, darkGreen)
  720.     @green_leaf_bitmaps[1].set_pixel(5, 5, khaki)
  721.     @green_leaf_bitmaps[1].set_pixel(6, 5, lightGreen)
  722.     @green_leaf_bitmaps[1].set_pixel(5, 6, darkGreen)
  723.     @green_leaf_bitmaps[1].fill_rect(6, 6, 2, 1, khaki)
  724.  
  725.     # 3rd leaf bitmap
  726.     @green_leaf_bitmaps[2] = Bitmap.new(8, 8)
  727.     @green_leaf_bitmaps[2].set_pixel(1, 1, darkGreen)
  728.     @green_leaf_bitmaps[2].fill_rect(1, 2, 2, 1, midGreen)
  729.     @green_leaf_bitmaps[2].set_pixel(2, 3, midGreen)
  730.     @green_leaf_bitmaps[2].set_pixel(3, 3, darkGreen)
  731.     @green_leaf_bitmaps[2].set_pixel(4, 3, midGreen)
  732.     @green_leaf_bitmaps[2].fill_rect(2, 4, 2, 1, midGreen)
  733.     @green_leaf_bitmaps[2].set_pixel(4, 4, darkGreen)
  734.     @green_leaf_bitmaps[2].set_pixel(5, 4, lightGreen)
  735.     @green_leaf_bitmaps[2].set_pixel(3, 5, midGreen)
  736.     @green_leaf_bitmaps[2].set_pixel(4, 5, darkGreen)
  737.     @green_leaf_bitmaps[2].fill_rect(5, 5, 2, 1, khaki)
  738.     @green_leaf_bitmaps[2].fill_rect(4, 6, 2, 1, midGreen)
  739.     @green_leaf_bitmaps[2].set_pixel(6, 6, lightGreen)
  740.     @green_leaf_bitmaps[2].set_pixel(6, 7, khaki)
  741.  
  742.     # 4th leaf bitmap
  743.     @green_leaf_bitmaps[3] = Bitmap.new(8, 8)
  744.     @green_leaf_bitmaps[3].fill_rect(0, 3, 1, 2, darkGreen)
  745.     @green_leaf_bitmaps[3].set_pixel(1, 4, midGreen)
  746.     @green_leaf_bitmaps[3].set_pixel(2, 4, khaki)
  747.     @green_leaf_bitmaps[3].set_pixel(3, 4, lightGreen)
  748.     @green_leaf_bitmaps[3].set_pixel(4, 4, darkGreen)
  749.     @green_leaf_bitmaps[3].set_pixel(7, 4, midGreen)
  750.     @green_leaf_bitmaps[3].set_pixel(1, 5, darkGreen)
  751.     @green_leaf_bitmaps[3].set_pixel(2, 5, midGreen)
  752.     @green_leaf_bitmaps[3].set_pixel(3, 5, lightGreen)
  753.     @green_leaf_bitmaps[3].set_pixel(4, 5, mint)
  754.     @green_leaf_bitmaps[3].set_pixel(5, 5, lightGreen)
  755.     @green_leaf_bitmaps[3].set_pixel(6, 5, khaki)
  756.     @green_leaf_bitmaps[3].set_pixel(7, 5, midGreen)
  757.     @green_leaf_bitmaps[3].fill_rect(2, 6, 2, 1, midGreen)
  758.     @green_leaf_bitmaps[3].set_pixel(4, 6, lightGreen)
  759.     @green_leaf_bitmaps[3].set_pixel(5, 6, khaki)
  760.     @green_leaf_bitmaps[3].set_pixel(6, 6, midGreen)
  761.  
  762.     # 5th leaf bitmap
  763.     @green_leaf_bitmaps[4] = Bitmap.new(8, 8)
  764.     @green_leaf_bitmaps[4].set_pixel(6, 2, midGreen)
  765.     @green_leaf_bitmaps[4].set_pixel(7, 2, darkGreen)
  766.     @green_leaf_bitmaps[4].fill_rect(4, 3, 2, 1, midGreen)
  767.     @green_leaf_bitmaps[4].set_pixel(6, 3, khaki)
  768.     @green_leaf_bitmaps[4].set_pixel(2, 4, darkGreen)
  769.     @green_leaf_bitmaps[4].fill_rect(3, 4, 2, 1, khaki)
  770.     @green_leaf_bitmaps[4].set_pixel(5, 4, lightGreen)
  771.     @green_leaf_bitmaps[4].set_pixel(6, 4, khaki)
  772.     @green_leaf_bitmaps[4].set_pixel(1, 5, midGreen)
  773.     @green_leaf_bitmaps[4].set_pixel(2, 5, khaki)
  774.     @green_leaf_bitmaps[4].set_pixel(3, 5, lightGreen)
  775.     @green_leaf_bitmaps[4].set_pixel(4, 5, mint)
  776.     @green_leaf_bitmaps[4].set_pixel(5, 5, midGreen)
  777.     @green_leaf_bitmaps[4].set_pixel(2, 6, darkGreen)
  778.     @green_leaf_bitmaps[4].fill_rect(3, 6, 2, 1, midGreen)
  779.  
  780.     # 6th leaf bitmap
  781.     @green_leaf_bitmaps[5] = Bitmap.new(8, 8)
  782.     @green_leaf_bitmaps[5].fill_rect(6, 2, 2, 1, midGreen)
  783.     @green_leaf_bitmaps[5].fill_rect(4, 3, 2, 1, midGreen)
  784.     @green_leaf_bitmaps[5].set_pixel(6, 3, khaki)
  785.     @green_leaf_bitmaps[5].set_pixel(3, 4, midGreen)
  786.     @green_leaf_bitmaps[5].set_pixel(4, 4, khaki)
  787.     @green_leaf_bitmaps[5].set_pixel(5, 4, lightGreen)
  788.     @green_leaf_bitmaps[5].set_pixel(6, 4, mint)
  789.     @green_leaf_bitmaps[5].set_pixel(1, 5, midGreen)
  790.     @green_leaf_bitmaps[5].set_pixel(2, 5, khaki)
  791.     @green_leaf_bitmaps[5].fill_rect(3, 5, 2, 1, mint)
  792.     @green_leaf_bitmaps[5].set_pixel(5, 5, lightGreen)
  793.     @green_leaf_bitmaps[5].set_pixel(2, 6, midGreen)
  794.     @green_leaf_bitmaps[5].set_pixel(3, 6, khaki)
  795.     @green_leaf_bitmaps[5].set_pixel(4, 6, lightGreen)
  796.  
  797.     # 7th leaf bitmap
  798.     @green_leaf_bitmaps[6] = Bitmap.new(8, 8)
  799.     @green_leaf_bitmaps[6].fill_rect(6, 1, 1, 2, midGreen)
  800.     @green_leaf_bitmaps[6].fill_rect(4, 2, 2, 1, midGreen)
  801.     @green_leaf_bitmaps[6].fill_rect(6, 2, 1, 2, darkGreen)
  802.     @green_leaf_bitmaps[6].fill_rect(3, 3, 2, 1, midGreen)
  803.     @green_leaf_bitmaps[6].set_pixel(5, 3, khaki)
  804.     @green_leaf_bitmaps[6].set_pixel(2, 4, midGreen)
  805.     @green_leaf_bitmaps[6].set_pixel(3, 4, khaki)
  806.     @green_leaf_bitmaps[6].set_pixel(4, 4, lightGreen)
  807.     @green_leaf_bitmaps[6].set_pixel(5, 4, midGreen)
  808.     @green_leaf_bitmaps[6].set_pixel(1, 5, midGreen)
  809.     @green_leaf_bitmaps[6].set_pixel(2, 5, khaki)
  810.     @green_leaf_bitmaps[6].fill_rect(3, 5, 2, 1, midGreen)
  811.     @green_leaf_bitmaps[6].set_pixel(1, 6, darkGreen)
  812.     @green_leaf_bitmaps[6].set_pixel(2, 6, midGreen)
  813.  
  814.     # 8th leaf bitmap
  815.     @green_leaf_bitmaps[7] = Bitmap.new(8, 8)
  816.     @green_leaf_bitmaps[7].set_pixel(6, 1, midGreen)
  817.     @green_leaf_bitmaps[7].fill_rect(4, 2, 3, 2, midGreen)
  818.     @green_leaf_bitmaps[7].set_pixel(3, 3, darkGreen)
  819.     @green_leaf_bitmaps[7].set_pixel(2, 4, darkGreen)
  820.     @green_leaf_bitmaps[7].set_pixel(3, 4, midGreen)
  821.     @green_leaf_bitmaps[7].fill_rect(4, 4, 2, 1, khaki)
  822.     @green_leaf_bitmaps[7].set_pixel(1, 5, darkGreen)
  823.     @green_leaf_bitmaps[7].set_pixel(2, 5, midGreen)
  824.     @green_leaf_bitmaps[7].fill_rect(3, 5, 2, 1, lightGreen)
  825.     @green_leaf_bitmaps[7].set_pixel(2, 6, midGreen)
  826.     @green_leaf_bitmaps[7].set_pixel(3, 6, lightGreen)
  827.  
  828.     # 9th leaf bitmap
  829.     @green_leaf_bitmaps[8] = Bitmap.new(8, 8)
  830.     @green_leaf_bitmaps[8].fill_rect(6, 1, 1, 2, midGreen)
  831.     @green_leaf_bitmaps[8].fill_rect(4, 2, 2, 1, midGreen)
  832.     @green_leaf_bitmaps[8].fill_rect(6, 2, 1, 2, darkGreen)
  833.     @green_leaf_bitmaps[8].fill_rect(3, 3, 2, 1, midGreen)
  834.     @green_leaf_bitmaps[8].set_pixel(5, 3, khaki)
  835.     @green_leaf_bitmaps[8].set_pixel(2, 4, midGreen)
  836.     @green_leaf_bitmaps[8].set_pixel(3, 4, khaki)
  837.     @green_leaf_bitmaps[8].set_pixel(4, 4, lightGreen)
  838.     @green_leaf_bitmaps[8].set_pixel(5, 4, midGreen)
  839.     @green_leaf_bitmaps[8].set_pixel(1, 5, midGreen)
  840.     @green_leaf_bitmaps[8].set_pixel(2, 5, khaki)
  841.     @green_leaf_bitmaps[8].fill_rect(3, 5, 2, 1, midGreen)
  842.     @green_leaf_bitmaps[8].set_pixel(1, 6, darkGreen)
  843.     @green_leaf_bitmaps[8].set_pixel(2, 6, midGreen)
  844.  
  845.     # 10th leaf bitmap
  846.     @green_leaf_bitmaps[9] = Bitmap.new(8, 8)
  847.     @green_leaf_bitmaps[9].fill_rect(6, 2, 2, 1, midGreen)
  848.     @green_leaf_bitmaps[9].fill_rect(4, 3, 2, 1, midGreen)
  849.     @green_leaf_bitmaps[9].set_pixel(6, 3, khaki)
  850.     @green_leaf_bitmaps[9].set_pixel(3, 4, midGreen)
  851.     @green_leaf_bitmaps[9].set_pixel(4, 4, khaki)
  852.     @green_leaf_bitmaps[9].set_pixel(5, 4, lightGreen)
  853.     @green_leaf_bitmaps[9].set_pixel(6, 4, mint)
  854.     @green_leaf_bitmaps[9].set_pixel(1, 5, midGreen)
  855.     @green_leaf_bitmaps[9].set_pixel(2, 5, khaki)
  856.     @green_leaf_bitmaps[9].fill_rect(3, 5, 2, 1, mint)
  857.     @green_leaf_bitmaps[9].set_pixel(5, 5, lightGreen)
  858.     @green_leaf_bitmaps[9].set_pixel(2, 6, midGreen)
  859.     @green_leaf_bitmaps[9].set_pixel(3, 6, khaki)
  860.     @green_leaf_bitmaps[9].set_pixel(4, 6, lightGreen)
  861.  
  862.     # 11th leaf bitmap
  863.     @green_leaf_bitmaps[10] = Bitmap.new(8, 8)
  864.     @green_leaf_bitmaps[10].set_pixel(6, 2, midGreen)
  865.     @green_leaf_bitmaps[10].set_pixel(7, 2, darkGreen)
  866.     @green_leaf_bitmaps[10].fill_rect(4, 3, 2, 1, midGreen)
  867.     @green_leaf_bitmaps[10].set_pixel(6, 3, khaki)
  868.     @green_leaf_bitmaps[10].set_pixel(2, 4, darkGreen)
  869.     @green_leaf_bitmaps[10].fill_rect(3, 4, 2, 1, khaki)
  870.     @green_leaf_bitmaps[10].set_pixel(5, 4, lightGreen)
  871.     @green_leaf_bitmaps[10].set_pixel(6, 4, khaki)
  872.     @green_leaf_bitmaps[10].set_pixel(1, 5, midGreen)
  873.     @green_leaf_bitmaps[10].set_pixel(2, 5, khaki)
  874.     @green_leaf_bitmaps[10].set_pixel(3, 5, lightGreen)
  875.     @green_leaf_bitmaps[10].set_pixel(4, 5, mint)
  876.     @green_leaf_bitmaps[10].set_pixel(5, 5, midGreen)
  877.     @green_leaf_bitmaps[10].set_pixel(2, 6, darkGreen)
  878.     @green_leaf_bitmaps[10].fill_rect(3, 6, 2, 1, midGreen)
  879.  
  880.     # 12th leaf bitmap
  881.     @green_leaf_bitmaps[11] = Bitmap.new(8, 8)
  882.     @green_leaf_bitmaps[11].fill_rect(0, 3, 1, 2, darkGreen)
  883.     @green_leaf_bitmaps[11].set_pixel(1, 4, midGreen)
  884.     @green_leaf_bitmaps[11].set_pixel(2, 4, khaki)
  885.     @green_leaf_bitmaps[11].set_pixel(3, 4, lightGreen)
  886.     @green_leaf_bitmaps[11].set_pixel(4, 4, darkGreen)
  887.     @green_leaf_bitmaps[11].set_pixel(7, 4, midGreen)
  888.     @green_leaf_bitmaps[11].set_pixel(1, 5, darkGreen)
  889.     @green_leaf_bitmaps[11].set_pixel(2, 5, midGreen)
  890.     @green_leaf_bitmaps[11].set_pixel(3, 5, lightGreen)
  891.     @green_leaf_bitmaps[11].set_pixel(4, 5, mint)
  892.     @green_leaf_bitmaps[11].set_pixel(5, 5, lightGreen)
  893.     @green_leaf_bitmaps[11].set_pixel(6, 5, khaki)
  894.     @green_leaf_bitmaps[11].set_pixel(7, 5, midGreen)
  895.     @green_leaf_bitmaps[11].fill_rect(2, 6, 2, 1, midGreen)
  896.     @green_leaf_bitmaps[11].set_pixel(4, 6, lightGreen)
  897.     @green_leaf_bitmaps[11].set_pixel(5, 6, khaki)
  898.     @green_leaf_bitmaps[11].set_pixel(6, 6, midGreen)
  899.  
  900.     # 13th leaf bitmap
  901.     @green_leaf_bitmaps[12] = Bitmap.new(8, 8)
  902.     @green_leaf_bitmaps[12].set_pixel(1, 1, darkGreen)
  903.     @green_leaf_bitmaps[12].fill_rect(1, 2, 2, 1, midGreen)
  904.     @green_leaf_bitmaps[12].set_pixel(2, 3, midGreen)
  905.     @green_leaf_bitmaps[12].set_pixel(3, 3, darkGreen)
  906.     @green_leaf_bitmaps[12].set_pixel(4, 3, midGreen)
  907.     @green_leaf_bitmaps[12].fill_rect(2, 4, 2, 1, midGreen)
  908.     @green_leaf_bitmaps[12].set_pixel(4, 4, darkGreen)
  909.     @green_leaf_bitmaps[12].set_pixel(5, 4, lightGreen)
  910.     @green_leaf_bitmaps[12].set_pixel(3, 5, midGreen)
  911.     @green_leaf_bitmaps[12].set_pixel(4, 5, darkGreen)
  912.     @green_leaf_bitmaps[12].fill_rect(5, 5, 2, 1, khaki)
  913.     @green_leaf_bitmaps[12].fill_rect(4, 6, 2, 1, midGreen)
  914.     @green_leaf_bitmaps[12].set_pixel(6, 6, lightGreen)
  915.     @green_leaf_bitmaps[12].set_pixel(6, 7, khaki)
  916.  
  917.     @rose_bitmaps = []
  918.     brightRed = Color.new(255, 0, 0, 255)
  919.     midRed    = Color.new(179, 17, 17, 255)
  920.     darkRed   = Color.new(141, 9, 9, 255)
  921.  
  922.     # 1st rose petal bitmap
  923.     @rose_bitmaps[0] = Bitmap.new(3, 3)
  924.     @rose_bitmaps[0].fill_rect(1, 0, 2, 1, brightRed)
  925.     @rose_bitmaps[0].fill_rect(0, 1, 1, 2, brightRed)
  926.     @rose_bitmaps[0].fill_rect(1, 1, 2, 2, midRed)
  927.     @rose_bitmaps[0].set_pixel(2, 2, darkRed)
  928.  
  929.     # 2nd rose petal bitmap
  930.     @rose_bitmaps[1] = Bitmap.new(3, 3)
  931.     @rose_bitmaps[1].set_pixel(0, 1, midRed)
  932.     @rose_bitmaps[1].set_pixel(1, 1, brightRed)
  933.     @rose_bitmaps[1].fill_rect(1, 2, 1, 2, midRed)
  934.  
  935.     @feather_bitmaps = []
  936.     white = Color.new(255, 255, 255, 255)
  937.  
  938.     # 1st feather bitmap
  939.     @feather_bitmaps[0] = Bitmap.new(3, 3)
  940.     @feather_bitmaps[0].set_pixel(0, 2, white)
  941.     @feather_bitmaps[0].set_pixel(1, 2, grey)
  942.     @feather_bitmaps[0].set_pixel(2, 1, grey)
  943.  
  944.     # 2nd feather bitmap
  945.     @feather_bitmaps[0] = Bitmap.new(3, 3)
  946.     @feather_bitmaps[0].set_pixel(0, 0, white)
  947.     @feather_bitmaps[0].set_pixel(0, 1, grey)
  948.     @feather_bitmaps[0].set_pixel(1, 2, grey)
  949.  
  950.     # 3rd feather bitmap
  951.     @feather_bitmaps[0] = Bitmap.new(3, 3)
  952.     @feather_bitmaps[0].set_pixel(2, 0, white)
  953.     @feather_bitmaps[0].set_pixel(1, 0, grey)
  954.     @feather_bitmaps[0].set_pixel(0, 1, grey)
  955.  
  956.     # 4th feather bitmap
  957.     @feather_bitmaps[0] = Bitmap.new(3, 3)
  958.     @feather_bitmaps[0].set_pixel(2, 2, white)
  959.     @feather_bitmaps[0].set_pixel(2, 1, grey)
  960.     @feather_bitmaps[0].set_pixel(1, 0, grey)
  961.  
  962.     @blood_rain_bitmap = Bitmap.new(7, 56)
  963.     for i in 0..6
  964.       @blood_rain_bitmap.fill_rect(6-i, i*8, 1, 8, darkRed)
  965.     end
  966.     @blood_rain_splash = Bitmap.new(8, 5)
  967.     @blood_rain_splash.fill_rect(1, 0, 6, 1, darkRed)
  968.     @blood_rain_splash.fill_rect(1, 4, 6, 1, darkRed)
  969.     @blood_rain_splash.fill_rect(0, 1, 1, 3, darkRed)
  970.     @blood_rain_splash.fill_rect(7, 1, 1, 3, darkRed)
  971.  
  972.     @sparkle_bitmaps = []
  973.  
  974.     lightBlue = Color.new(181, 244, 255, 255)
  975.     midBlue   = Color.new(126, 197, 235, 255)
  976.     darkBlue  = Color.new(77, 136, 225, 255)
  977.  
  978.     # 1st sparkle bitmap
  979.     @sparkle_bitmaps[0] = Bitmap.new(7, 7)
  980.     @sparkle_bitmaps[0].set_pixel(3, 3, darkBlue)
  981.  
  982.     # 2nd sparkle bitmap
  983.     @sparkle_bitmaps[1] = Bitmap.new(7, 7)
  984.     @sparkle_bitmaps[1].fill_rect(3, 2, 1, 3, darkBlue)
  985.     @sparkle_bitmaps[1].fill_rect(2, 3, 3, 1, darkBlue)
  986.     @sparkle_bitmaps[1].set_pixel(3, 3, midBlue)
  987.  
  988.     # 3rd sparkle bitmap
  989.     @sparkle_bitmaps[2] = Bitmap.new(7, 7)
  990.     @sparkle_bitmaps[2].set_pixel(1, 1, darkBlue)
  991.     @sparkle_bitmaps[2].set_pixel(5, 1, darkBlue)
  992.     @sparkle_bitmaps[2].set_pixel(2, 2, midBlue)
  993.     @sparkle_bitmaps[2].set_pixel(4, 2, midBlue)
  994.     @sparkle_bitmaps[2].set_pixel(3, 3, lightBlue)
  995.     @sparkle_bitmaps[2].set_pixel(2, 4, midBlue)
  996.     @sparkle_bitmaps[2].set_pixel(4, 4, midBlue)
  997.     @sparkle_bitmaps[2].set_pixel(1, 5, darkBlue)
  998.     @sparkle_bitmaps[2].set_pixel(5, 5, darkBlue)
  999.  
  1000.     # 4th sparkle bitmap
  1001.     @sparkle_bitmaps[3] = Bitmap.new(7, 7)
  1002.     @sparkle_bitmaps[3].fill_rect(3, 1, 1, 5, darkBlue)
  1003.     @sparkle_bitmaps[3].fill_rect(1, 3, 5, 1, darkBlue)
  1004.     @sparkle_bitmaps[3].fill_rect(3, 2, 1, 3, midBlue)
  1005.     @sparkle_bitmaps[3].fill_rect(2, 3, 3, 1, midBlue)
  1006.     @sparkle_bitmaps[3].set_pixel(3, 3, lightBlue)
  1007.  
  1008.     # 5th sparkle bitmap
  1009.     @sparkle_bitmaps[4] = Bitmap.new(7, 7)
  1010.     @sparkle_bitmaps[4].fill_rect(2, 2, 3, 3, midBlue)
  1011.     @sparkle_bitmaps[4].fill_rect(3, 2, 1, 3, darkBlue)
  1012.     @sparkle_bitmaps[4].fill_rect(2, 3, 3, 1, darkBlue)
  1013.     @sparkle_bitmaps[4].set_pixel(3, 3, lightBlue)
  1014.     @sparkle_bitmaps[4].set_pixel(1, 1, darkBlue)
  1015.     @sparkle_bitmaps[4].set_pixel(5, 1, darkBlue)
  1016.     @sparkle_bitmaps[4].set_pixel(1, 5, darkBlue)
  1017.     @sparkle_bitmaps[4].set_pixel(5, 1, darkBlue)
  1018.  
  1019.     # 6th sparkle bitmap
  1020.     @sparkle_bitmaps[5] = Bitmap.new(7, 7)
  1021.     @sparkle_bitmaps[5].fill_rect(2, 1, 3, 5, darkBlue)
  1022.     @sparkle_bitmaps[5].fill_rect(1, 2, 5, 3, darkBlue)
  1023.     @sparkle_bitmaps[5].fill_rect(2, 2, 3, 3, midBlue)
  1024.     @sparkle_bitmaps[5].fill_rect(3, 1, 1, 5, midBlue)
  1025.     @sparkle_bitmaps[5].fill_rect(1, 3, 5, 1, midBlue)
  1026.     @sparkle_bitmaps[5].fill_rect(3, 2, 1, 3, lightBlue)
  1027.     @sparkle_bitmaps[5].fill_rect(2, 3, 3, 1, lightBlue)
  1028.     @sparkle_bitmaps[5].set_pixel(3, 3, white)
  1029.  
  1030.     # 7th sparkle bitmap
  1031.     @sparkle_bitmaps[6] = Bitmap.new(7, 7)
  1032.     @sparkle_bitmaps[6].fill_rect(2, 1, 3, 5, midBlue)
  1033.     @sparkle_bitmaps[6].fill_rect(1, 2, 5, 3, midBlue)
  1034.     @sparkle_bitmaps[6].fill_rect(3, 0, 1, 7, darkBlue)
  1035.     @sparkle_bitmaps[6].fill_rect(0, 3, 7, 1, darkBlue)
  1036.     @sparkle_bitmaps[6].fill_rect(2, 2, 3, 3, lightBlue)
  1037.     @sparkle_bitmaps[6].fill_rect(3, 2, 1, 3, midBlue)
  1038.     @sparkle_bitmaps[6].fill_rect(2, 3, 3, 1, midBlue)
  1039.     @sparkle_bitmaps[6].set_pixel(3, 3, white)
  1040.  
  1041.     # Meteor bitmap
  1042.     @meteor_bitmap = Bitmap.new(14, 12)
  1043.     @meteor_bitmap.fill_rect(0, 8, 5, 4, paleOrange)
  1044.     @meteor_bitmap.fill_rect(1, 7, 6, 4, paleOrange)
  1045.     @meteor_bitmap.set_pixel(7, 8, paleOrange)
  1046.     @meteor_bitmap.fill_rect(1, 8, 2, 2, brightOrange)
  1047.     @meteor_bitmap.set_pixel(2, 7, brightOrange)
  1048.     @meteor_bitmap.fill_rect(3, 6, 2, 1, brightOrange)
  1049.     @meteor_bitmap.set_pixel(3, 8, brightOrange)
  1050.     @meteor_bitmap.set_pixel(3, 10, brightOrange)
  1051.     @meteor_bitmap.set_pixel(4, 9, brightOrange)
  1052.     @meteor_bitmap.fill_rect(5, 5, 1, 5, brightOrange)
  1053.     @meteor_bitmap.fill_rect(6, 4, 1, 5, brightOrange)
  1054.     @meteor_bitmap.fill_rect(7, 3, 1, 5, brightOrange)
  1055.     @meteor_bitmap.fill_rect(8, 6, 1, 2, brightOrange)
  1056.     @meteor_bitmap.set_pixel(9, 5, brightOrange)
  1057.     @meteor_bitmap.set_pixel(3, 8, midRed)
  1058.     @meteor_bitmap.fill_rect(4, 7, 1, 2, midRed)
  1059.     @meteor_bitmap.set_pixel(4, 5, midRed)
  1060.     @meteor_bitmap.set_pixel(5, 4, midRed)
  1061.     @meteor_bitmap.set_pixel(5, 6, midRed)
  1062.     @meteor_bitmap.set_pixel(6, 5, midRed)
  1063.     @meteor_bitmap.set_pixel(6, 7, midRed)
  1064.     @meteor_bitmap.fill_rect(7, 4, 1, 3, midRed)
  1065.     @meteor_bitmap.fill_rect(8, 3, 1, 3, midRed)
  1066.     @meteor_bitmap.fill_rect(9, 2, 1, 3, midRed)
  1067.     @meteor_bitmap.fill_rect(10, 1, 1, 3, midRed)
  1068.     @meteor_bitmap.fill_rect(11, 0, 1, 3, midRed)
  1069.     @meteor_bitmap.fill_rect(12, 0, 1, 2, midRed)
  1070.     @meteor_bitmap.set_pixel(13, 0, midRed)
  1071.  
  1072.     # impact bitmap
  1073.     @impact_bitmap = Bitmap.new(22, 11)
  1074.     @impact_bitmap.fill_rect(0, 5, 1, 2, brightOrange)
  1075.     @impact_bitmap.set_pixel(1, 4, brightOrange)
  1076.     @impact_bitmap.set_pixel(1, 6, brightOrange)
  1077.     @impact_bitmap.set_pixel(2, 3, brightOrange)
  1078.     @impact_bitmap.set_pixel(2, 7, brightOrange)
  1079.     @impact_bitmap.set_pixel(3, 2, midRed)
  1080.     @impact_bitmap.set_pixel(3, 7, midRed)
  1081.     @impact_bitmap.set_pixel(4, 2, brightOrange)
  1082.     @impact_bitmap.set_pixel(4, 8, brightOrange)
  1083.     @impact_bitmap.set_pixel(5, 2, midRed)
  1084.     @impact_bitmap.fill_rect(5, 8, 3, 1, brightOrange)
  1085.     @impact_bitmap.set_pixel(6, 1, midRed)
  1086.     @impact_bitmap.fill_rect(7, 1, 8, 1, brightOrange)
  1087.     @impact_bitmap.fill_rect(7, 9, 8, 1, midRed)
  1088.  
  1089.  
  1090.     # Ash bitmaps
  1091.     @ash_bitmaps = []
  1092.     @ash_bitmaps[0] = Bitmap.new(3, 3)
  1093.     @ash_bitmaps[0].fill_rect(0, 1, 1, 3, lightGrey)
  1094.     @ash_bitmaps[0].fill_rect(1, 0, 3, 1, lightGrey)
  1095.     @ash_bitmaps[0].set_pixel(1, 1, white)
  1096.     @ash_bitmaps[1] = Bitmap.new(3, 3)
  1097.     @ash_bitmaps[1].fill_rect(0, 1, 1, 3, grey)
  1098.     @ash_bitmaps[1].fill_rect(1, 0, 3, 1, grey)
  1099.     @ash_bitmaps[1].set_pixel(1, 1, lightGrey)
  1100.  
  1101.     # Bubble bitmaps
  1102.     @bubble_bitmaps = []
  1103.     darkBlue  = Color.new(77, 136, 225, 160)
  1104.     aqua = Color.new(197, 253, 254, 160)
  1105.     lavender = Color.new(225, 190, 244, 160)
  1106.  
  1107.     # first bubble bitmap
  1108.     @bubble_bitmaps[0] = Bitmap.new(24, 24)
  1109.     @bubble_bitmaps[0].fill_rect(0, 9, 24, 5, darkBlue)
  1110.     @bubble_bitmaps[0].fill_rect(1, 6, 22, 11, darkBlue)
  1111.     @bubble_bitmaps[0].fill_rect(2, 5, 20, 13, darkBlue)
  1112.     @bubble_bitmaps[0].fill_rect(3, 4, 18, 15, darkBlue)
  1113.     @bubble_bitmaps[0].fill_rect(4, 3, 16, 17, darkBlue)
  1114.     @bubble_bitmaps[0].fill_rect(5, 2, 14, 19, darkBlue)
  1115.     @bubble_bitmaps[0].fill_rect(6, 1, 12, 21, darkBlue)
  1116.     @bubble_bitmaps[0].fill_rect(9, 0, 5, 24, darkBlue)
  1117.     @bubble_bitmaps[0].fill_rect(2, 11, 20, 4, aqua)
  1118.     @bubble_bitmaps[0].fill_rect(3, 7, 18, 10, aqua)
  1119.     @bubble_bitmaps[0].fill_rect(4, 6, 16, 12, aqua)
  1120.     @bubble_bitmaps[0].fill_rect(5, 5, 14, 14, aqua)
  1121.     @bubble_bitmaps[0].fill_rect(6, 4, 12, 16, aqua)
  1122.     @bubble_bitmaps[0].fill_rect(9, 2, 4, 20, aqua)
  1123.     @bubble_bitmaps[0].fill_rect(5, 10, 1, 7, lavender)
  1124.     @bubble_bitmaps[0].fill_rect(6, 14, 1, 5, lavender)
  1125.     @bubble_bitmaps[0].fill_rect(7, 15, 1, 4, lavender)
  1126.     @bubble_bitmaps[0].fill_rect(8, 16, 1, 4, lavender)
  1127.     @bubble_bitmaps[0].fill_rect(9, 17, 1, 3, lavender)
  1128.     @bubble_bitmaps[0].fill_rect(10, 18, 4, 3, lavender)
  1129.     @bubble_bitmaps[0].fill_rect(14, 18, 1, 2, lavender)
  1130.     @bubble_bitmaps[0].fill_rect(13, 5, 4, 4, white)
  1131.     @bubble_bitmaps[0].fill_rect(14, 4, 2, 1, white)
  1132.     @bubble_bitmaps[0].set_pixel(17, 6, white)
  1133.  
  1134.     # second bubble bitmap
  1135.     @bubble_bitmaps[1] = Bitmap.new(14, 15)
  1136.     @bubble_bitmaps[1].fill_rect(0, 4, 14, 7, darkBlue)
  1137.     @bubble_bitmaps[1].fill_rect(1, 3, 12, 9, darkBlue)
  1138.     @bubble_bitmaps[1].fill_rect(2, 2, 10, 11, darkBlue)
  1139.     @bubble_bitmaps[1].fill_rect(3, 1, 8, 13, darkBlue)
  1140.     @bubble_bitmaps[1].fill_rect(5, 0, 4, 15, darkBlue)
  1141.     @bubble_bitmaps[1].fill_rect(1, 5, 12, 4, aqua)
  1142.     @bubble_bitmaps[1].fill_rect(2, 4, 10, 6, aqua)
  1143.     @bubble_bitmaps[1].fill_rect(3, 3, 8, 8, aqua)
  1144.     @bubble_bitmaps[1].fill_rect(4, 2, 6, 10, aqua)
  1145.     @bubble_bitmaps[1].fill_rect(1, 5, 12, 4, aqua)
  1146.     @bubble_bitmaps[1].fill_rect(3, 9, 1, 2, lavender)
  1147.     @bubble_bitmaps[1].fill_rect(4, 10, 1, 2, lavender)
  1148.     @bubble_bitmaps[1].fill_rect(5, 11, 4, 1, lavender)
  1149.     @bubble_bitmaps[1].fill_rect(6, 12, 2, 1, white)
  1150.     @bubble_bitmaps[1].fill_rect(8, 3, 2, 2, white)
  1151.     @bubble_bitmaps[1].set_pixel(7, 4, white)
  1152.     @bubble_bitmaps[1].set_pixel(8, 5, white)
  1153.  
  1154.     # Other option for bubbles
  1155.     @bubble2_bitmaps = Array.new
  1156.     darkSteelGray = Color.new(145, 150, 155, 160)
  1157.     midSteelGray = Color.new(180, 180, 185, 160)
  1158.     lightSteelGray = Color.new(225, 225, 235, 160)
  1159.     steelBlue = Color.new(145, 145, 165, 160)
  1160.     lightSteelBlue = Color.new(165, 170, 180, 160)
  1161.     transparentWhite = Color.new(255, 255, 255, 160)
  1162.  
  1163.     # first bubble 2 bitmap
  1164.     @bubble2_bitmaps[0] = Bitmap.new(6, 6)
  1165.     @bubble2_bitmaps[0].fill_rect(0, 0, 6, 6, darkSteelGray)
  1166.     @bubble2_bitmaps[0].fill_rect(0, 2, 6, 2, midSteelGray)
  1167.     @bubble2_bitmaps[0].fill_rect(2, 0, 2, 6, midSteelGray)
  1168.     @bubble2_bitmaps[0].fill_rect(2, 2, 2, 2, lightSteelGray)
  1169.  
  1170.     # second bubble 2 bitmap
  1171.     @bubble2_bitmaps[1] = Bitmap.new(8, 8)
  1172.     @bubble2_bitmaps[1].fill_rect(0, 2, 2, 4, steelBlue)
  1173.     @bubble2_bitmaps[1].fill_rect(2, 0, 4, 2, darkSteelGray)
  1174.     @bubble2_bitmaps[1].fill_rect(6, 2, 2, 2, darkSteelGray)
  1175.     @bubble2_bitmaps[1].fill_rect(2, 6, 2, 2, darkSteelGray)
  1176.     @bubble2_bitmaps[1].fill_rect(6, 4, 2, 2, midSteelGray)
  1177.     @bubble2_bitmaps[1].fill_rect(4, 6, 2, 2, midSteelGray)
  1178.     @bubble2_bitmaps[1].fill_rect(4, 4, 2, 2, lightSteelBlue)
  1179.     @bubble2_bitmaps[1].fill_rect(2, 4, 2, 2, lightSteelGray)
  1180.     @bubble2_bitmaps[1].fill_rect(4, 2, 2, 2, lightSteelGray)
  1181.     @bubble2_bitmaps[1].fill_rect(2, 2, 2, 2, transparentWhite)
  1182.  
  1183.     # third bubble 2 bitmap
  1184.     @bubble2_bitmaps[2] = Bitmap.new(8, 10)
  1185.     @bubble2_bitmaps[2].fill_rect(8, 2, 2, 4, steelBlue)
  1186.     @bubble2_bitmaps[2].fill_rect(2, 0, 8, 2, darkSteelGray)
  1187.     @bubble2_bitmaps[2].fill_rect(2, 6, 8, 2, darkSteelGray)
  1188.     @bubble2_bitmaps[2].fill_rect(4, 0, 2, 2, midSteelGray)
  1189.     @bubble2_bitmaps[2].fill_rect(4, 6, 2, 2, midSteelGray)
  1190.     @bubble2_bitmaps[2].fill_rect(0, 2, 2, 2, midSteelGray)
  1191.     @bubble2_bitmaps[2].fill_rect(0, 4, 2, 2, lightSteelBlue)
  1192.     @bubble2_bitmaps[2].fill_rect(2, 2, 6, 4, lightSteelGray)
  1193.     @bubble2_bitmaps[2].fill_rect(2, 2, 4, 2, transparentWhite)
  1194.     @bubble2_bitmaps[2].fill_rect(4, 4, 2, 2, transparentWhite)
  1195.  
  1196.     # fourth bubble 2 bitmap
  1197.     @bubble2_bitmaps[3] = Bitmap.new(14, 14)
  1198.     @bubble2_bitmaps[3].fill_rect(4, 0, 4, 2, steelBlue)
  1199.     @bubble2_bitmaps[3].fill_rect(0, 4, 2, 4, steelBlue)
  1200.     @bubble2_bitmaps[3].fill_rect(12, 4, 2, 4, steelBlue)
  1201.     @bubble2_bitmaps[3].fill_rect(8, 0, 2, 2, darkSteelGray)
  1202.     @bubble2_bitmaps[3].fill_rect(0, 6, 2, 2, darkSteelGray)
  1203.     @bubble2_bitmaps[3].fill_rect(12, 6, 2, 2, darkSteelGray)
  1204.     @bubble2_bitmaps[3].fill_rect(4, 12, 6, 2, darkSteelGray)
  1205.     @bubble2_bitmaps[3].fill_rect(8, 0, 2, 2, darkSteelGray)
  1206.     @bubble2_bitmaps[3].fill_rect(2, 2, 10, 10, midSteelGray)
  1207.     @bubble2_bitmaps[3].fill_rect(6, 12, 2, 2, midSteelGray)
  1208.     @bubble2_bitmaps[3].fill_rect(2, 4, 10, 6, lightSteelGray)
  1209.     @bubble2_bitmaps[3].fill_rect(4, 2, 2, 2, lightSteelGray)
  1210.     @bubble2_bitmaps[3].fill_rect(6, 10, 4, 2, lightSteelGray)
  1211.     @bubble2_bitmaps[3].fill_rect(6, 4, 2, 2, transparentWhite)
  1212.     @bubble2_bitmaps[3].fill_rect(4, 6, 2, 2, transparentWhite)
  1213.  
  1214.     @user_bitmaps = []
  1215.     update_user_defined
  1216.   end
  1217.  
  1218.   def update_user_defined
  1219.     for image in @user_bitmaps
  1220.       image.dispose
  1221.     end
  1222.  
  1223.     #user-defined bitmaps
  1224.     for name in $WEATHER_IMAGES
  1225.       @user_bitmaps.push(RPG::Cache.picture(name))
  1226.     end
  1227.     for sprite in @sprites
  1228.       sprite.bitmap = @user_bitmaps[rand(@user_bitmaps.size)]
  1229.     end
  1230.   end
  1231. end

点评

修正一个范例中的错误: 范例中第15行调用方法的注释应为 screen.change_weathe 而不是screen.weather。这里已经修改错误  发表于 2017-1-26 14:42
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-11 20:38

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表