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

Project1

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

如何随时调用流星雨标题 谢谢了

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
58 小时
注册时间
2007-8-10
帖子
284
跳转到指定楼层
1
发表于 2008-4-13 10:58:03 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

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

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

x
请问 流星雨标题我想在游戏中唤出 而不是出现在标题里 可以实现吗?
类似的效果也可起 (请个位大侠帮帮忙谢谢了)
版务信息:本贴由楼主自主结贴~
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-3-15
帖子
255
3
发表于 2008-4-13 18:47:30 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

Lv2.观梦者

邪恶米饼殿

梦石
0
星屑
387
在线时间
569 小时
注册时间
2007-12-23
帖子
1584
2
发表于 2008-4-13 16:31:01 | 只看该作者
有个类似的```不过更强大``也能自定义图片
站上找不到这个脚本的网页,我从工程里面导给你吧,不懂的地方后面回复说明就好

  1. #===========================
  2. # ccoa's weather script
  3. # with ideas by ScriptKitty and Mr.DJ

  4. #===========================
  5. # Weather Types:类型
  6. # 1 - rain  雨
  7. # 2 - storm 风
  8. # 3 - snow 雪
  9. # 4 - hail  冰雹
  10. # 5 - rain with thunder and lightning  雷雨
  11. # 6 - falling leaves (autumn) 秋天的落叶
  12. # 7 - blowing leaves (autumn)         秋风扫落叶
  13. # 8 - swirling leaves (autumn) 旋转的树叶
  14. # 9 - falling leaves (green) 绿绿的落叶
  15. # 10 - cherry blossom (sakura) petals 樱花飞舞
  16. # 11 - rose petals 玫瑰花瓣雨
  17. # 12 - feathers 羽毛
  18. # 13 - blood rain 血雨
  19. # 14 - sparkles 闪烁
  20. # 15 - user defined 自己定义
  21. #
  22. # Weather Power:  强度 0-40  0为无天气
  23. # An integer from 0-40. 0 = no weather, 40 = 400 sprites
  24. #
  25. # Usage:使用方法
  26. # Create a call script with the following:
  27. # 调用这个脚本
  28. # $game_screen.weather(type, power, hue)
  29. # 比如:$game_screen.weather(14, 35, 0)
  30. #
  31. # Usage of user-defined weather:
  32. # Look at the following globals:
  33. # 自定义天气看下面的

  34. $WEATHER_UPDATE = false
  35. # the $WEATHER_IMAGES array has changed, please update天气图象改变请改为true
  36. $WEATHER_IMAGES = ""
  37. # the array of picture names to use用到的图片名字,默认无,所以上面不用刷新(他不是小方块!)
  38. $WEATHER_X = -200
  39. # the number of pixels the image should move horizontally (positive = right, negative = left)水平移动,正为右,负为左
  40. $WEATHER_Y = 0
  41. # the number of pizels the image should move vertically (positive = down, negative = up)垂直运动,正为下,负为上
  42. $WEATHER_FADE = 0
  43. # how much the image should fade each update (0 = no fade, 255 = fade instantly)淡出淡入,0为无,255为马上
  44. $WEATHER_ANIMATED = true
  45. # whether or not the image should cycle through all the images是否环绕?

  46. module RPG
  47. class Weather
  48. def initialize(viewport = nil)
  49. @type = 0
  50. @max = 0
  51. @ox = 0
  52. @oy = 0
  53. @count = 0
  54. @current_pose = []
  55. @info = []
  56. @countarray = []

  57. make_bitmaps

  58. # **** ccoa ****
  59. for i in 1..500
  60. sprite = Sprite.new(viewport)
  61. sprite.z = 1000
  62. sprite.visible = false
  63. sprite.opacity = 0
  64. @sprites.push(sprite)
  65. @current_pose.push(0)
  66. @info.push(rand(50))
  67. @countarray.push(rand(15))
  68. end
  69. end

  70. def dispose
  71. for sprite in @sprites
  72. sprite.dispose
  73. end
  74. @rain_bitmap.dispose
  75. @storm_bitmap.dispose
  76. @snow_bitmap.dispose
  77. @hail_bitmap.dispose
  78. @petal_bitmap.dispose
  79. @blood_rain_bitmap.dispose
  80. for image in @autumn_leaf_bitmaps
  81. image.dispose
  82. end
  83. for image in @green_leaf_bitmaps
  84. image.dispose
  85. end
  86. for image in @rose_bitmaps
  87. image.dispose
  88. end
  89. for image in @feather_bitmaps
  90. image.dispose
  91. end
  92. for image in @sparkle_bitmaps
  93. image.dispose
  94. end
  95. for image in @user_bitmaps
  96. image.dispose
  97. end
  98. $WEATHER_UPDATE = true
  99. end

  100. def type=(type)
  101. return if @type == type
  102. @type = type
  103. case @type
  104. when 1 # rain
  105. bitmap = @rain_bitmap
  106. when 2 # storm
  107. bitmap = @storm_bitmap
  108. when 3 # snow
  109. bitmap = @snow_bitmap
  110. when 4 # hail
  111. bitmap = @hail_bitmap
  112. when 5 # rain w/ thunder and lightning
  113. bitmap = @rain_bitmap
  114. @thunder = true
  115. when 6 # falling autumn leaves
  116. bitmap = @autumn_leaf_bitmaps[0]
  117. when 7 # blowing autumn leaves
  118. bitmap = @autumn_leaf_bitmaps[0]
  119. when 8 # swirling autumn leaves
  120. bitmap = @autumn_leaf_bitmaps[0]
  121. when 9 # falling green leaves
  122. bitmap = @green_leaf_bitmaps[0]
  123. when 10 # sakura petals
  124. bitmap = @petal_bitmap
  125. when 11 # rose petals
  126. bitmap = @rose_bitmaps[0]
  127. when 12 # feathers
  128. bitmap = @feather_bitmaps[0]
  129. when 13 # blood rain
  130. bitmap = @blood_rain_bitmap
  131. when 14 # sparkles
  132. bitmap = @sparkle_bitmaps[0]
  133. when 15 # user-defined
  134. bitmap = @user_bitmaps[rand(@user_bitmaps.size)]
  135. else
  136. bitmap = nil
  137. end
  138. if @type != 5
  139. @thunder = false
  140. end
  141. # **** ccoa ****
  142. for i in 1..500
  143. sprite = @sprites[i]
  144. if sprite != nil
  145. sprite.visible = (i <= @max)
  146. sprite.bitmap = bitmap
  147. end
  148. end
  149. end

  150. def ox=(ox)
  151. return if @ox == ox;
  152. @ox = ox
  153. for sprite in @sprites
  154. sprite.ox = @ox
  155. end
  156. end

  157. def oy=(oy)
  158. return if @oy == oy;
  159. @oy = oy
  160. for sprite in @sprites
  161. sprite.oy = @oy
  162. end
  163. end

  164. def max=(max)
  165. return if @max == max;
  166. # **** ccoa ****
  167. @max = [[max, 0].max, 500].min
  168. for i in 1..500
  169. sprite = @sprites[i]
  170. if sprite != nil
  171. sprite.visible = (i <= @max)
  172. end
  173. end
  174. end

  175. def update
  176. return if @type == 0
  177. for i in 1..@max
  178. sprite = @sprites[i]
  179. if sprite == nil
  180. break
  181. end
  182. if @type == 1 or @type == 5 or @type == 13 # rain
  183. sprite.x -= 2
  184. sprite.y += 16
  185. sprite.opacity -= 8
  186. if @thunder and (rand(8000 - @max) == 0)
  187. $game_screen.start_flash(Color.new(255, 255, 255, 255), 5)
  188. Audio.se_play("Audio/SE/061-Thunderclap01")
  189. end
  190. end
  191. if @type == 2 # storm
  192. sprite.x -= 8
  193. sprite.y += 16
  194. sprite.opacity -= 12
  195. end
  196. if @type == 3 # snow
  197. sprite.x -= 2
  198. sprite.y += 8
  199. sprite.opacity -= 8
  200. end
  201. if @type == 4 # hail
  202. sprite.x -= 1
  203. sprite.y += 18
  204. sprite.opacity -= 15
  205. end
  206. if @type == 6 # falling autumn leaves
  207. @count = rand(20)
  208. if @count == 0
  209. sprite.bitmap = @autumn_leaf_bitmaps[@current_pose[i]]
  210. @current_pose[i] = (@current_pose[i] + 1) % @autumn_leaf_bitmaps.size
  211. end
  212. sprite.x -= 1
  213. sprite.y += 1
  214. end
  215. if @type == 7 # blowing autumn leaves
  216. @count = rand(20)
  217. if @count == 0
  218. sprite.bitmap = @autumn_leaf_bitmaps[@current_pose[i]]
  219. @current_pose[i] = (@current_pose[i] + 1) % @autumn_leaf_bitmaps.size
  220. end
  221. sprite.x -= 10
  222. sprite.y += (rand(4) - 2)
  223. end
  224. if @type == 8 # swirling autumn leaves
  225. @count = rand(20)
  226. if @count == 0
  227. sprite.bitmap = @autumn_leaf_bitmaps[@current_pose[i]]
  228. @current_pose[i] = (@current_pose[i] + 1) % @autumn_leaf_bitmaps.size
  229. end
  230. if @info[i] != 0
  231. if @info[i] >= 1 and @info[i] <= 10
  232. sprite.x -= 3
  233. sprite.y -= 1
  234. elsif @info[i] >= 11 and @info[i] <= 16
  235. sprite.x -= 1
  236. sprite.y -= 2
  237. elsif @info[i] >= 17 and @info[i] <= 20
  238. sprite.y -= 3
  239. elsif @info[i] >= 21 and @info[i] <= 30
  240. sprite.y -= 2
  241. sprite.x += 1
  242. elsif @info[i] >= 31 and @info[i] <= 36
  243. sprite.y -= 1
  244. sprite.x += 3
  245. elsif @info[i] >= 37 and @info[i] <= 40
  246. sprite.x += 5
  247. elsif @info[i] >= 41 and @info[i] <= 46
  248. sprite.y += 1
  249. sprite.x += 3
  250. elsif @info[i] >= 47 and @info[i] <= 58
  251. sprite.y += 2
  252. sprite.x += 1
  253. elsif @info[i] >= 59 and @info[i] <= 64
  254. sprite.y += 3
  255. elsif @info[i] >= 65 and @info[i] <= 70
  256. sprite.x -= 1
  257. sprite.y += 2
  258. elsif @info[i] >= 71 and @info[i] <= 81
  259. sprite.x -= 3
  260. sprite.y += 1
  261. elsif @info[i] >= 82 and @info[i] <= 87
  262. sprite.x -= 5
  263. end
  264. @info[i] = (@info[i] + 1) % 88
  265. else
  266. if rand(200) == 0
  267. @info[i] = 1
  268. end
  269. sprite.x -= 5
  270. sprite.y += 1
  271. end
  272. end
  273. if @type == 9 # falling green leaves
  274. if @countarray[i] == 0
  275. @current_pose[i] = (@current_pose[i] + 1) % @green_leaf_bitmaps.size
  276. sprite.bitmap = @green_leaf_bitmaps[@current_pose[i]]
  277. @countarray[i] = rand(15)
  278. end
  279. @countarray[i] = (@countarray[i] + 1) % 15
  280. sprite.y += 1
  281. end
  282. if @type == 10 # sakura petals
  283. if @info[i] < 25
  284. sprite.x -= 1
  285. else
  286. sprite.x += 1
  287. end
  288. @info[i] = (@info[i] + 1) % 50
  289. sprite.y += 1
  290. end
  291. if @type == 11 # rose petals
  292. @count = rand(20)
  293. if @count == 0
  294. sprite.bitmap = @rose_bitmaps[@current_pose[i]]
  295. @current_pose[i] = (@current_pose[i] + 1) % @rose_bitmaps.size
  296. end
  297. if @info[i] % 2 == 0
  298. if @info[i] < 10
  299. sprite.x -= 1
  300. else
  301. sprite.x += 1
  302. end
  303. end
  304. sprite.y += 1
  305. end
  306. if @type == 12 # feathers
  307. if @countarray[i] == 0
  308. @current_pose[i] = (@current_pose[i] + 1) % @feather_bitmaps.size
  309. sprite.bitmap = @feather_bitmaps[@current_pose[i]]
  310. end
  311. @countarray[i] = (@countarray[i] + 1) % 15
  312. if rand(100) == 0
  313. sprite.x -= 1
  314. end
  315. if rand(100) == 0
  316. sprite.y -= 1
  317. end
  318. if @info[i] < 50
  319. if rand(2) == 0
  320. sprite.x -= 1
  321. else
  322. sprite.y -= 1
  323. end
  324. else
  325. if rand(2) == 0
  326. sprite.x += 1
  327. else
  328. sprite.y += 1
  329. end
  330. end
  331. @info[i] = (@info[i] + 1) % 100
  332. end
  333. if @type == 14 # sparkles
  334. if @countarray[i] == 0
  335. @current_pose[i] = (@current_pose[i] + 1) % @sparkle_bitmaps.size
  336. sprite.bitmap = @sparkle_bitmaps[@current_pose[i]]
  337. end
  338. @countarray[i] = (@countarray[i] + 1) % 15
  339. sprite.y += 1
  340. sprite.opacity -= 1
  341. end
  342. if @type == 15 # user-defined
  343. if $WEATHER_UPDATE
  344. update_user_defined
  345. $WEATHER_UPDATE = false
  346. end
  347. if $WEATHER_ANIMATED and @countarray[i] == 0
  348. @current_pose[i] = (@current_pose[i] + 1) % @user_bitmaps.size
  349. sprite.bitmap = @user_bitmaps[@current_pose[i]]
  350. end
  351. @countarray[i] = (@countarray[i] + 1) % 15
  352. sprite.x += $WEATHER_X
  353. sprite.y += $WEATHER_Y
  354. sprite.opacity -= $WEATHER_FADE
  355. end

  356. x = sprite.x - @ox
  357. y = sprite.y - @oy
  358. if sprite.opacity < 64 or x < -50 or x > 750 or y < -300 or y > 500
  359. sprite.x = rand(800) - 50 + @ox
  360. sprite.y = rand(800) - 200 + @oy
  361. sprite.opacity = 255
  362. end
  363. end
  364. end

  365. def make_bitmaps
  366. color1 = Color.new(255, 255, 255, 255)
  367. color2 = Color.new(255, 255, 255, 128)
  368. @rain_bitmap = Bitmap.new(7, 56)
  369. for i in 0..6
  370. @rain_bitmap.fill_rect(6-i, i*8, 1, 8, color1)
  371. end
  372. @storm_bitmap = Bitmap.new(34, 64)
  373. for i in 0..31
  374. @storm_bitmap.fill_rect(33-i, i*2, 1, 2, color2)
  375. @storm_bitmap.fill_rect(32-i, i*2, 1, 2, color1)
  376. @storm_bitmap.fill_rect(31-i, i*2, 1, 2, color2)
  377. end
  378. @snow_bitmap = Bitmap.new(6, 6)
  379. @snow_bitmap.fill_rect(0, 1, 6, 4, color2)
  380. @snow_bitmap.fill_rect(1, 0, 4, 6, color2)
  381. @snow_bitmap.fill_rect(1, 2, 4, 2, color1)
  382. @snow_bitmap.fill_rect(2, 1, 2, 4, color1)
  383. @sprites = []

  384. blueGrey = Color.new(215, 227, 227, 150)
  385. grey = Color.new(214, 217, 217, 150)
  386. lightGrey = Color.new(233, 233, 233, 250)
  387. lightBlue = Color.new(222, 239, 243, 250)
  388. @hail_bitmap = Bitmap.new(4, 4)
  389. @hail_bitmap.fill_rect(1, 0, 2, 1, blueGrey)
  390. @hail_bitmap.fill_rect(0, 1, 1, 2, blueGrey)
  391. @hail_bitmap.fill_rect(3, 1, 1, 2, grey)
  392. @hail_bitmap.fill_rect(1, 3, 2, 1, grey)
  393. @hail_bitmap.fill_rect(1, 1, 2, 2, lightGrey)
  394. @hail_bitmap.set_pixel(1, 1, lightBlue)


  395. color3 = Color.new(255, 167, 192, 255) # light pink
  396. color4 = Color.new(213, 106, 136, 255) # dark pink
  397. @petal_bitmap = Bitmap.new(4, 4) #This creates a new bitmap that is 4 x 4 pixels
  398. @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)
  399. @petal_bitmap.fill_rect(1, 2, 1, 1, color3)
  400. @petal_bitmap.fill_rect(2, 1, 1, 1, color3)
  401. @petal_bitmap.fill_rect(3, 0, 1, 1, color3)
  402. @petal_bitmap.fill_rect(1, 3, 1, 1, color4)
  403. @petal_bitmap.fill_rect(2, 2, 1, 1, color4)
  404. @petal_bitmap.fill_rect(3, 1, 1, 1, color4)


  405. brightOrange = Color.new(248, 88, 0, 255)
  406. orangeBrown = Color.new(144, 80, 56, 255)
  407. burntRed = Color.new(152, 0, 0, 255)
  408. paleOrange = Color.new(232, 160, 128, 255)
  409. darkBrown = Color.new(72, 40, 0, 255)
  410. @autumn_leaf_bitmaps = []
  411. @autumn_leaf_bitmaps.push(Bitmap.new(8, 8))
  412. # draw the first of the leaf1 bitmaps
  413. @autumn_leaf_bitmaps[0].set_pixel(5, 1, orangeBrown)
  414. @autumn_leaf_bitmaps[0].set_pixel(6, 1, brightOrange)
  415. @autumn_leaf_bitmaps[0].set_pixel(7, 1, paleOrange)
  416. @autumn_leaf_bitmaps[0].set_pixel(3, 2, orangeBrown)
  417. @autumn_leaf_bitmaps[0].fill_rect(4, 2, 2, 1, brightOrange)
  418. @autumn_leaf_bitmaps[0].set_pixel(6, 2, paleOrange)
  419. @autumn_leaf_bitmaps[0].set_pixel(2, 3, orangeBrown)
  420. @autumn_leaf_bitmaps[0].set_pixel(3, 3, brightOrange)
  421. @autumn_leaf_bitmaps[0].fill_rect(4, 3, 2, 1, paleOrange)
  422. @autumn_leaf_bitmaps[0].set_pixel(1, 4, orangeBrown)
  423. @autumn_leaf_bitmaps[0].set_pixel(2, 4, brightOrange)
  424. @autumn_leaf_bitmaps[0].set_pixel(3, 4, paleOrange)
  425. @autumn_leaf_bitmaps[0].set_pixel(1, 5, brightOrange)
  426. @autumn_leaf_bitmaps[0].set_pixel(2, 5, paleOrange)
  427. @autumn_leaf_bitmaps[0].set_pixel(0, 6, orangeBrown)
  428. @autumn_leaf_bitmaps[0].set_pixel(1, 6, paleOrange)
  429. @autumn_leaf_bitmaps[0].set_pixel(0, 7, paleOrange)

  430. # draw the 2nd of the leaf1 bitmaps
  431. @autumn_leaf_bitmaps.push(Bitmap.new(8, 8))
  432. @autumn_leaf_bitmaps[1].set_pixel(3, 0, brightOrange)
  433. @autumn_leaf_bitmaps[1].set_pixel(7, 0, brightOrange)
  434. @autumn_leaf_bitmaps[1].set_pixel(3, 1, orangeBrown)
  435. @autumn_leaf_bitmaps[1].set_pixel(4, 1, burntRed)
  436. @autumn_leaf_bitmaps[1].set_pixel(6, 1, brightOrange)
  437. @autumn_leaf_bitmaps[1].set_pixel(0, 2, paleOrange)
  438. @autumn_leaf_bitmaps[1].set_pixel(1, 2, brightOrange)
  439. @autumn_leaf_bitmaps[1].set_pixel(2, 2, orangeBrown)
  440. @autumn_leaf_bitmaps[1].set_pixel(3, 2, burntRed)
  441. @autumn_leaf_bitmaps[1].set_pixel(4, 2, orangeBrown)
  442. @autumn_leaf_bitmaps[1].set_pixel(5, 2, brightOrange)
  443. @autumn_leaf_bitmaps[1].fill_rect(1, 3, 3, 1, orangeBrown)
  444. @autumn_leaf_bitmaps[1].fill_rect(4, 3, 2, 1, brightOrange)
  445. @autumn_leaf_bitmaps[1].set_pixel(6, 3, orangeBrown)
  446. @autumn_leaf_bitmaps[1].set_pixel(2, 4, burntRed)
  447. @autumn_leaf_bitmaps[1].fill_rect(3, 4, 3, 1, brightOrange)
  448. @autumn_leaf_bitmaps[1].set_pixel(6, 4, burntRed)
  449. @autumn_leaf_bitmaps[1].set_pixel(7, 4, darkBrown)
  450. @autumn_leaf_bitmaps[1].set_pixel(1, 5, orangeBrown)
  451. @autumn_leaf_bitmaps[1].fill_rect(2, 5, 2, 1, brightOrange)
  452. @autumn_leaf_bitmaps[1].set_pixel(4, 5, orangeBrown)
  453. @autumn_leaf_bitmaps[1].set_pixel(5, 5, burntRed)
  454. @autumn_leaf_bitmaps[1].fill_rect(1, 6, 2, 1, brightOrange)
  455. @autumn_leaf_bitmaps[1].fill_rect(4, 6, 2, 1, burntRed)
  456. @autumn_leaf_bitmaps[1].set_pixel(0, 7, brightOrange)
  457. @autumn_leaf_bitmaps[1].set_pixel(5, 7, darkBrown)

  458. # draw the 3rd of the leaf1 bitmaps
  459. @autumn_leaf_bitmaps.push(Bitmap.new(8, 8))
  460. @autumn_leaf_bitmaps[2].set_pixel(7, 1, paleOrange)
  461. @autumn_leaf_bitmaps[2].set_pixel(6, 2, paleOrange)
  462. @autumn_leaf_bitmaps[2].set_pixel(7, 2, orangeBrown)
  463. @autumn_leaf_bitmaps[2].set_pixel(5, 3, paleOrange)
  464. @autumn_leaf_bitmaps[2].set_pixel(6, 3, brightOrange)
  465. @autumn_leaf_bitmaps[2].set_pixel(4, 4, paleOrange)
  466. @autumn_leaf_bitmaps[2].set_pixel(5, 4, brightOrange)
  467. @autumn_leaf_bitmaps[2].set_pixel(6, 4, orangeBrown)
  468. @autumn_leaf_bitmaps[2].fill_rect(2, 5, 2, 1, paleOrange)
  469. @autumn_leaf_bitmaps[2].set_pixel(4, 5, brightOrange)
  470. @autumn_leaf_bitmaps[2].set_pixel(5, 5, orangeBrown)
  471. @autumn_leaf_bitmaps[2].set_pixel(1, 6, paleOrange)
  472. @autumn_leaf_bitmaps[2].fill_rect(2, 6, 2, 1, brightOrange)
  473. @autumn_leaf_bitmaps[2].set_pixel(4, 6, orangeBrown)
  474. @autumn_leaf_bitmaps[2].set_pixel(0, 7, paleOrange)
  475. @autumn_leaf_bitmaps[2].set_pixel(1, 7, brightOrange)
  476. @autumn_leaf_bitmaps[2].set_pixel(2, 7, orangeBrown)

  477. # draw the 4th of the leaf1 bitmaps
  478. @autumn_leaf_bitmaps.push(Bitmap.new(8, 8))
  479. @autumn_leaf_bitmaps[3].set_pixel(3, 0, brightOrange)
  480. @autumn_leaf_bitmaps[3].set_pixel(7, 0, brightOrange)
  481. @autumn_leaf_bitmaps[3].set_pixel(3, 1, orangeBrown)
  482. @autumn_leaf_bitmaps[3].set_pixel(4, 1, burntRed)
  483. @autumn_leaf_bitmaps[3].set_pixel(6, 1, brightOrange)
  484. @autumn_leaf_bitmaps[3].set_pixel(0, 2, paleOrange)
  485. @autumn_leaf_bitmaps[3].set_pixel(1, 2, brightOrange)
  486. @autumn_leaf_bitmaps[3].set_pixel(2, 2, orangeBrown)
  487. @autumn_leaf_bitmaps[3].set_pixel(3, 2, burntRed)
  488. @autumn_leaf_bitmaps[3].set_pixel(4, 2, orangeBrown)
  489. @autumn_leaf_bitmaps[3].set_pixel(5, 2, brightOrange)
  490. @autumn_leaf_bitmaps[3].fill_rect(1, 3, 3, 1, orangeBrown)
  491. @autumn_leaf_bitmaps[3].fill_rect(4, 3, 2, 1, brightOrange)
  492. @autumn_leaf_bitmaps[3].set_pixel(6, 3, orangeBrown)
  493. @autumn_leaf_bitmaps[3].set_pixel(2, 4, burntRed)
  494. @autumn_leaf_bitmaps[3].fill_rect(3, 4, 3, 1, brightOrange)
  495. @autumn_leaf_bitmaps[3].set_pixel(6, 4, burntRed)
  496. @autumn_leaf_bitmaps[3].set_pixel(7, 4, darkBrown)
  497. @autumn_leaf_bitmaps[3].set_pixel(1, 5, orangeBrown)
  498. @autumn_leaf_bitmaps[3].fill_rect(2, 5, 2, 1, brightOrange)
  499. @autumn_leaf_bitmaps[3].set_pixel(4, 5, orangeBrown)
  500. @autumn_leaf_bitmaps[3].set_pixel(5, 5, burntRed)
  501. @autumn_leaf_bitmaps[3].fill_rect(1, 6, 2, 1, brightOrange)
  502. @autumn_leaf_bitmaps[3].fill_rect(4, 6, 2, 1, burntRed)
  503. @autumn_leaf_bitmaps[3].set_pixel(0, 7, brightOrange)
  504. @autumn_leaf_bitmaps[3].set_pixel(5, 7, darkBrown)

  505. @green_leaf_bitmaps = []
  506. darkGreen = Color.new(62, 76, 31, 255)
  507. midGreen = Color.new(76, 91, 43, 255)
  508. khaki = Color.new(105, 114, 66, 255)
  509. lightGreen = Color.new(128, 136, 88, 255)
  510. mint = Color.new(146, 154, 106, 255)

  511. # 1st leaf bitmap
  512. @green_leaf_bitmaps[0] = Bitmap.new(8, 8)
  513. @green_leaf_bitmaps[0].set_pixel(1, 0, darkGreen)
  514. @green_leaf_bitmaps[0].set_pixel(1, 1, midGreen)
  515. @green_leaf_bitmaps[0].set_pixel(2, 1, darkGreen)
  516. @green_leaf_bitmaps[0].set_pixel(2, 2, khaki)
  517. @green_leaf_bitmaps[0].set_pixel(3, 2, darkGreen)
  518. @green_leaf_bitmaps[0].set_pixel(4, 2, khaki)
  519. @green_leaf_bitmaps[0].fill_rect(2, 3, 3, 1, midGreen)
  520. @green_leaf_bitmaps[0].set_pixel(5, 3, khaki)
  521. @green_leaf_bitmaps[0].fill_rect(2, 4, 2, 1, midGreen)
  522. @green_leaf_bitmaps[0].set_pixel(4, 4, darkGreen)
  523. @green_leaf_bitmaps[0].set_pixel(5, 4, lightGreen)
  524. @green_leaf_bitmaps[0].set_pixel(6, 4, khaki)
  525. @green_leaf_bitmaps[0].set_pixel(3, 5, midGreen)
  526. @green_leaf_bitmaps[0].set_pixel(4, 5, darkGreen)
  527. @green_leaf_bitmaps[0].set_pixel(5, 5, khaki)
  528. @green_leaf_bitmaps[0].set_pixel(6, 5, lightGreen)
  529. @green_leaf_bitmaps[0].set_pixel(4, 6, midGreen)
  530. @green_leaf_bitmaps[0].set_pixel(5, 6, darkGreen)
  531. @green_leaf_bitmaps[0].set_pixel(6, 6, lightGreen)
  532. @green_leaf_bitmaps[0].set_pixel(6, 7, khaki)

  533. # 2nd leaf bitmap
  534. @green_leaf_bitmaps[1] = Bitmap.new(8, 8)
  535. @green_leaf_bitmaps[1].fill_rect(1, 1, 1, 2, midGreen)
  536. @green_leaf_bitmaps[1].fill_rect(2, 2, 2, 1, khaki)
  537. @green_leaf_bitmaps[1].set_pixel(4, 2, lightGreen)
  538. @green_leaf_bitmaps[1].fill_rect(2, 3, 2, 1, darkGreen)
  539. @green_leaf_bitmaps[1].fill_rect(4, 3, 2, 1, lightGreen)
  540. @green_leaf_bitmaps[1].set_pixel(2, 4, midGreen)
  541. @green_leaf_bitmaps[1].set_pixel(3, 4, darkGreen)
  542. @green_leaf_bitmaps[1].set_pixel(4, 4, khaki)
  543. @green_leaf_bitmaps[1].fill_rect(5, 4, 2, 1, lightGreen)
  544. @green_leaf_bitmaps[1].set_pixel(3, 5, midGreen)
  545. @green_leaf_bitmaps[1].set_pixel(4, 5, darkGreen)
  546. @green_leaf_bitmaps[1].set_pixel(5, 5, khaki)
  547. @green_leaf_bitmaps[1].set_pixel(6, 5, lightGreen)
  548. @green_leaf_bitmaps[1].set_pixel(5, 6, darkGreen)
  549. @green_leaf_bitmaps[1].fill_rect(6, 6, 2, 1, khaki)

  550. # 3rd leaf bitmap
  551. @green_leaf_bitmaps[2] = Bitmap.new(8, 8)
  552. @green_leaf_bitmaps[2].set_pixel(1, 1, darkGreen)
  553. @green_leaf_bitmaps[2].fill_rect(1, 2, 2, 1, midGreen)
  554. @green_leaf_bitmaps[2].set_pixel(2, 3, midGreen)
  555. @green_leaf_bitmaps[2].set_pixel(3, 3, darkGreen)
  556. @green_leaf_bitmaps[2].set_pixel(4, 3, midGreen)
  557. @green_leaf_bitmaps[2].fill_rect(2, 4, 2, 1, midGreen)
  558. @green_leaf_bitmaps[2].set_pixel(4, 4, darkGreen)
  559. @green_leaf_bitmaps[2].set_pixel(5, 4, lightGreen)
  560. @green_leaf_bitmaps[2].set_pixel(3, 5, midGreen)
  561. @green_leaf_bitmaps[2].set_pixel(4, 5, darkGreen)
  562. @green_leaf_bitmaps[2].fill_rect(5, 5, 2, 1, khaki)
  563. @green_leaf_bitmaps[2].fill_rect(4, 6, 2, 1, midGreen)
  564. @green_leaf_bitmaps[2].set_pixel(6, 6, lightGreen)
  565. @green_leaf_bitmaps[2].set_pixel(6, 7, khaki)

  566. # 4th leaf bitmap
  567. @green_leaf_bitmaps[3] = Bitmap.new(8, 8)
  568. @green_leaf_bitmaps[3].fill_rect(0, 3, 1, 2, darkGreen)
  569. @green_leaf_bitmaps[3].set_pixel(1, 4, midGreen)
  570. @green_leaf_bitmaps[3].set_pixel(2, 4, khaki)
  571. @green_leaf_bitmaps[3].set_pixel(3, 4, lightGreen)
  572. @green_leaf_bitmaps[3].set_pixel(4, 4, darkGreen)
  573. @green_leaf_bitmaps[3].set_pixel(7, 4, midGreen)
  574. @green_leaf_bitmaps[3].set_pixel(1, 5, darkGreen)
  575. @green_leaf_bitmaps[3].set_pixel(2, 5, midGreen)
  576. @green_leaf_bitmaps[3].set_pixel(3, 5, lightGreen)
  577. @green_leaf_bitmaps[3].set_pixel(4, 5, mint)
  578. @green_leaf_bitmaps[3].set_pixel(5, 5, lightGreen)
  579. @green_leaf_bitmaps[3].set_pixel(6, 5, khaki)
  580. @green_leaf_bitmaps[3].set_pixel(7, 5, midGreen)
  581. @green_leaf_bitmaps[3].fill_rect(2, 6, 2, 1, midGreen)
  582. @green_leaf_bitmaps[3].set_pixel(4, 6, lightGreen)
  583. @green_leaf_bitmaps[3].set_pixel(5, 6, khaki)
  584. @green_leaf_bitmaps[3].set_pixel(6, 6, midGreen)

  585. # 5th leaf bitmap
  586. @green_leaf_bitmaps[4] = Bitmap.new(8, 8)
  587. @green_leaf_bitmaps[4].set_pixel(6, 2, midGreen)
  588. @green_leaf_bitmaps[4].set_pixel(7, 2, darkGreen)
  589. @green_leaf_bitmaps[4].fill_rect(4, 3, 2, 1, midGreen)
  590. @green_leaf_bitmaps[4].set_pixel(6, 3, khaki)
  591. @green_leaf_bitmaps[4].set_pixel(2, 4, darkGreen)
  592. @green_leaf_bitmaps[4].fill_rect(3, 4, 2, 1, khaki)
  593. @green_leaf_bitmaps[4].set_pixel(5, 4, lightGreen)
  594. @green_leaf_bitmaps[4].set_pixel(6, 4, khaki)
  595. @green_leaf_bitmaps[4].set_pixel(1, 5, midGreen)
  596. @green_leaf_bitmaps[4].set_pixel(2, 5, khaki)
  597. @green_leaf_bitmaps[4].set_pixel(3, 5, lightGreen)
  598. @green_leaf_bitmaps[4].set_pixel(4, 5, mint)
  599. @green_leaf_bitmaps[4].set_pixel(5, 5, midGreen)
  600. @green_leaf_bitmaps[4].set_pixel(2, 6, darkGreen)
  601. @green_leaf_bitmaps[4].fill_rect(3, 6, 2, 1, midGreen)

  602. # 6th leaf bitmap
  603. @green_leaf_bitmaps[5] = Bitmap.new(8, 8)
  604. @green_leaf_bitmaps[5].fill_rect(6, 2, 2, 1, midGreen)
  605. @green_leaf_bitmaps[5].fill_rect(4, 3, 2, 1, midGreen)
  606. @green_leaf_bitmaps[5].set_pixel(6, 3, khaki)
  607. @green_leaf_bitmaps[5].set_pixel(3, 4, midGreen)
  608. @green_leaf_bitmaps[5].set_pixel(4, 4, khaki)
  609. @green_leaf_bitmaps[5].set_pixel(5, 4, lightGreen)
  610. @green_leaf_bitmaps[5].set_pixel(6, 4, mint)
  611. @green_leaf_bitmaps[5].set_pixel(1, 5, midGreen)
  612. @green_leaf_bitmaps[5].set_pixel(2, 5, khaki)
  613. @green_leaf_bitmaps[5].fill_rect(3, 5, 2, 1, mint)
  614. @green_leaf_bitmaps[5].set_pixel(5, 5, lightGreen)
  615. @green_leaf_bitmaps[5].set_pixel(2, 6, midGreen)
  616. @green_leaf_bitmaps[5].set_pixel(3, 6, khaki)
  617. @green_leaf_bitmaps[5].set_pixel(4, 6, lightGreen)

  618. # 7th leaf bitmap
  619. @green_leaf_bitmaps[6] = Bitmap.new(8, 8)
  620. @green_leaf_bitmaps[6].fill_rect(6, 1, 1, 2, midGreen)
  621. @green_leaf_bitmaps[6].fill_rect(4, 2, 2, 1, midGreen)
  622. @green_leaf_bitmaps[6].fill_rect(6, 2, 1, 2, darkGreen)
  623. @green_leaf_bitmaps[6].fill_rect(3, 3, 2, 1, midGreen)
  624. @green_leaf_bitmaps[6].set_pixel(5, 3, khaki)
  625. @green_leaf_bitmaps[6].set_pixel(2, 4, midGreen)
  626. @green_leaf_bitmaps[6].set_pixel(3, 4, khaki)
  627. @green_leaf_bitmaps[6].set_pixel(4, 4, lightGreen)
  628. @green_leaf_bitmaps[6].set_pixel(5, 4, midGreen)
  629. @green_leaf_bitmaps[6].set_pixel(1, 5, midGreen)
  630. @green_leaf_bitmaps[6].set_pixel(2, 5, khaki)
  631. @green_leaf_bitmaps[6].fill_rect(3, 5, 2, 1, midGreen)
  632. @green_leaf_bitmaps[6].set_pixel(1, 6, darkGreen)
  633. @green_leaf_bitmaps[6].set_pixel(2, 6, midGreen)

  634. # 8th leaf bitmap
  635. @green_leaf_bitmaps[7] = Bitmap.new(8, 8)
  636. @green_leaf_bitmaps[7].set_pixel(6, 1, midGreen)
  637. @green_leaf_bitmaps[7].fill_rect(4, 2, 3, 2, midGreen)
  638. @green_leaf_bitmaps[7].set_pixel(3, 3, darkGreen)
  639. @green_leaf_bitmaps[7].set_pixel(2, 4, darkGreen)
  640. @green_leaf_bitmaps[7].set_pixel(3, 4, midGreen)
  641. @green_leaf_bitmaps[7].fill_rect(4, 4, 2, 1, khaki)
  642. @green_leaf_bitmaps[7].set_pixel(1, 5, darkGreen)
  643. @green_leaf_bitmaps[7].set_pixel(2, 5, midGreen)
  644. @green_leaf_bitmaps[7].fill_rect(3, 5, 2, 1, lightGreen)
  645. @green_leaf_bitmaps[7].set_pixel(2, 6, midGreen)
  646. @green_leaf_bitmaps[7].set_pixel(3, 6, lightGreen)

  647. # 9th leaf bitmap
  648. @green_leaf_bitmaps[8] = Bitmap.new(8, 8)
  649. @green_leaf_bitmaps[8].fill_rect(6, 1, 1, 2, midGreen)
  650. @green_leaf_bitmaps[8].fill_rect(4, 2, 2, 1, midGreen)
  651. @green_leaf_bitmaps[8].fill_rect(6, 2, 1, 2, darkGreen)
  652. @green_leaf_bitmaps[8].fill_rect(3, 3, 2, 1, midGreen)
  653. @green_leaf_bitmaps[8].set_pixel(5, 3, khaki)
  654. @green_leaf_bitmaps[8].set_pixel(2, 4, midGreen)
  655. @green_leaf_bitmaps[8].set_pixel(3, 4, khaki)
  656. @green_leaf_bitmaps[8].set_pixel(4, 4, lightGreen)
  657. @green_leaf_bitmaps[8].set_pixel(5, 4, midGreen)
  658. @green_leaf_bitmaps[8].set_pixel(1, 5, midGreen)
  659. @green_leaf_bitmaps[8].set_pixel(2, 5, khaki)
  660. @green_leaf_bitmaps[8].fill_rect(3, 5, 2, 1, midGreen)
  661. @green_leaf_bitmaps[8].set_pixel(1, 6, darkGreen)
  662. @green_leaf_bitmaps[8].set_pixel(2, 6, midGreen)

  663. # 10th leaf bitmap
  664. @green_leaf_bitmaps[9] = Bitmap.new(8, 8)
  665. @green_leaf_bitmaps[9].fill_rect(6, 2, 2, 1, midGreen)
  666. @green_leaf_bitmaps[9].fill_rect(4, 3, 2, 1, midGreen)
  667. @green_leaf_bitmaps[9].set_pixel(6, 3, khaki)
  668. @green_leaf_bitmaps[9].set_pixel(3, 4, midGreen)
  669. @green_leaf_bitmaps[9].set_pixel(4, 4, khaki)
  670. @green_leaf_bitmaps[9].set_pixel(5, 4, lightGreen)
  671. @green_leaf_bitmaps[9].set_pixel(6, 4, mint)
  672. @green_leaf_bitmaps[9].set_pixel(1, 5, midGreen)
  673. @green_leaf_bitmaps[9].set_pixel(2, 5, khaki)
  674. @green_leaf_bitmaps[9].fill_rect(3, 5, 2, 1, mint)
  675. @green_leaf_bitmaps[9].set_pixel(5, 5, lightGreen)
  676. @green_leaf_bitmaps[9].set_pixel(2, 6, midGreen)
  677. @green_leaf_bitmaps[9].set_pixel(3, 6, khaki)
  678. @green_leaf_bitmaps[9].set_pixel(4, 6, lightGreen)

  679. # 11th leaf bitmap
  680. @green_leaf_bitmaps[10] = Bitmap.new(8, 8)
  681. @green_leaf_bitmaps[10].set_pixel(6, 2, midGreen)
  682. @green_leaf_bitmaps[10].set_pixel(7, 2, darkGreen)
  683. @green_leaf_bitmaps[10].fill_rect(4, 3, 2, 1, midGreen)
  684. @green_leaf_bitmaps[10].set_pixel(6, 3, khaki)
  685. @green_leaf_bitmaps[10].set_pixel(2, 4, darkGreen)
  686. @green_leaf_bitmaps[10].fill_rect(3, 4, 2, 1, khaki)
  687. @green_leaf_bitmaps[10].set_pixel(5, 4, lightGreen)
  688. @green_leaf_bitmaps[10].set_pixel(6, 4, khaki)
  689. @green_leaf_bitmaps[10].set_pixel(1, 5, midGreen)
  690. @green_leaf_bitmaps[10].set_pixel(2, 5, khaki)
  691. @green_leaf_bitmaps[10].set_pixel(3, 5, lightGreen)
  692. @green_leaf_bitmaps[10].set_pixel(4, 5, mint)
  693. @green_leaf_bitmaps[10].set_pixel(5, 5, midGreen)
  694. @green_leaf_bitmaps[10].set_pixel(2, 6, darkGreen)
  695. @green_leaf_bitmaps[10].fill_rect(3, 6, 2, 1, midGreen)



  696. # 12th leaf bitmap
  697. @green_leaf_bitmaps[11] = Bitmap.new(8, 8)
  698. @green_leaf_bitmaps[11].fill_rect(0, 3, 1, 2, darkGreen)
  699. @green_leaf_bitmaps[11].set_pixel(1, 4, midGreen)
  700. @green_leaf_bitmaps[11].set_pixel(2, 4, khaki)
  701. @green_leaf_bitmaps[11].set_pixel(3, 4, lightGreen)
  702. @green_leaf_bitmaps[11].set_pixel(4, 4, darkGreen)
  703. @green_leaf_bitmaps[11].set_pixel(7, 4, midGreen)
  704. @green_leaf_bitmaps[11].set_pixel(1, 5, darkGreen)
  705. @green_leaf_bitmaps[11].set_pixel(2, 5, midGreen)
  706. @green_leaf_bitmaps[11].set_pixel(3, 5, lightGreen)
  707. @green_leaf_bitmaps[11].set_pixel(4, 5, mint)
  708. @green_leaf_bitmaps[11].set_pixel(5, 5, lightGreen)
  709. @green_leaf_bitmaps[11].set_pixel(6, 5, khaki)
  710. @green_leaf_bitmaps[11].set_pixel(7, 5, midGreen)
  711. @green_leaf_bitmaps[11].fill_rect(2, 6, 2, 1, midGreen)
  712. @green_leaf_bitmaps[11].set_pixel(4, 6, lightGreen)
  713. @green_leaf_bitmaps[11].set_pixel(5, 6, khaki)
  714. @green_leaf_bitmaps[11].set_pixel(6, 6, midGreen)

  715. # 13th leaf bitmap
  716. @green_leaf_bitmaps[12] = Bitmap.new(8, 8)
  717. @green_leaf_bitmaps[12].set_pixel(1, 1, darkGreen)
  718. @green_leaf_bitmaps[12].fill_rect(1, 2, 2, 1, midGreen)
  719. @green_leaf_bitmaps[12].set_pixel(2, 3, midGreen)
  720. @green_leaf_bitmaps[12].set_pixel(3, 3, darkGreen)
  721. @green_leaf_bitmaps[12].set_pixel(4, 3, midGreen)
  722. @green_leaf_bitmaps[12].fill_rect(2, 4, 2, 1, midGreen)
  723. @green_leaf_bitmaps[12].set_pixel(4, 4, darkGreen)
  724. @green_leaf_bitmaps[12].set_pixel(5, 4, lightGreen)
  725. @green_leaf_bitmaps[12].set_pixel(3, 5, midGreen)
  726. @green_leaf_bitmaps[12].set_pixel(4, 5, darkGreen)
  727. @green_leaf_bitmaps[12].fill_rect(5, 5, 2, 1, khaki)
  728. @green_leaf_bitmaps[12].fill_rect(4, 6, 2, 1, midGreen)
  729. @green_leaf_bitmaps[12].set_pixel(6, 6, lightGreen)
  730. @green_leaf_bitmaps[12].set_pixel(6, 7, khaki)

  731. @rose_bitmaps = []
  732. brightRed = Color.new(255, 0, 0, 255)
  733. midRed = Color.new(179, 17, 17, 255)
  734. darkRed = Color.new(141, 9, 9, 255)

  735. # 1st rose petal bitmap
  736. @rose_bitmaps[0] = Bitmap.new(3, 3)
  737. @rose_bitmaps[0].fill_rect(1, 0, 2, 1, brightRed)
  738. @rose_bitmaps[0].fill_rect(0, 1, 1, 2, brightRed)
  739. @rose_bitmaps[0].fill_rect(1, 1, 2, 2, midRed)
  740. @rose_bitmaps[0].set_pixel(2, 2, darkRed)

  741. # 2nd rose petal bitmap
  742. @rose_bitmaps[1] = Bitmap.new(3, 3)
  743. @rose_bitmaps[1].set_pixel(0, 1, midRed)
  744. @rose_bitmaps[1].set_pixel(1, 1, brightRed)
  745. @rose_bitmaps[1].fill_rect(1, 2, 1, 2, midRed)

  746. @feather_bitmaps = []
  747. white = Color.new(255, 255, 255, 255)

  748. # 1st feather bitmap
  749. @feather_bitmaps[0] = Bitmap.new(3, 3)
  750. @feather_bitmaps[0].set_pixel(0, 2, white)
  751. @feather_bitmaps[0].set_pixel(1, 2, grey)
  752. @feather_bitmaps[0].set_pixel(2, 1, grey)

  753. # 2nd feather bitmap
  754. @feather_bitmaps[0] = Bitmap.new(3, 3)
  755. @feather_bitmaps[0].set_pixel(0, 0, white)
  756. @feather_bitmaps[0].set_pixel(0, 1, grey)
  757. @feather_bitmaps[0].set_pixel(1, 2, grey)

  758. # 3rd feather bitmap
  759. @feather_bitmaps[0] = Bitmap.new(3, 3)
  760. @feather_bitmaps[0].set_pixel(2, 0, white)
  761. @feather_bitmaps[0].set_pixel(1, 0, grey)
  762. @feather_bitmaps[0].set_pixel(0, 1, grey)

  763. # 4th feather bitmap
  764. @feather_bitmaps[0] = Bitmap.new(3, 3)
  765. @feather_bitmaps[0].set_pixel(2, 2, white)
  766. @feather_bitmaps[0].set_pixel(2, 1, grey)
  767. @feather_bitmaps[0].set_pixel(1, 0, grey)

  768. @blood_rain_bitmap = Bitmap.new(7, 56)
  769. for i in 0..6
  770. @blood_rain_bitmap.fill_rect(6-i, i*8, 1, 8, darkRed)
  771. end

  772. @sparkle_bitmaps = []

  773. lightBlue = Color.new(181, 244, 255, 255)
  774. midBlue = Color.new(126, 197, 235, 255)
  775. darkBlue = Color.new(77, 136, 225, 255)

  776. # 1st sparkle bitmap
  777. @sparkle_bitmaps[0] = Bitmap.new(7, 7)
  778. @sparkle_bitmaps[0].set_pixel(3, 3, darkBlue)

  779. # 2nd sparkle bitmap
  780. @sparkle_bitmaps[1] = Bitmap.new(7, 7)
  781. @sparkle_bitmaps[1].fill_rect(3, 2, 1, 3, darkBlue)
  782. @sparkle_bitmaps[1].fill_rect(2, 3, 3, 1, darkBlue)
  783. @sparkle_bitmaps[1].set_pixel(3, 3, midBlue)

  784. # 3rd sparkle bitmap
  785. @sparkle_bitmaps[2] = Bitmap.new(7, 7)
  786. @sparkle_bitmaps[2].set_pixel(1, 1, darkBlue)
  787. @sparkle_bitmaps[2].set_pixel(5, 1, darkBlue)
  788. @sparkle_bitmaps[2].set_pixel(2, 2, midBlue)
  789. @sparkle_bitmaps[2].set_pixel(4, 2, midBlue)
  790. @sparkle_bitmaps[2].set_pixel(3, 3, lightBlue)
  791. @sparkle_bitmaps[2].set_pixel(2, 4, midBlue)
  792. @sparkle_bitmaps[2].set_pixel(4, 4, midBlue)
  793. @sparkle_bitmaps[2].set_pixel(1, 5, darkBlue)
  794. @sparkle_bitmaps[2].set_pixel(5, 5, darkBlue)

  795. # 4th sparkle bitmap
  796. @sparkle_bitmaps[3] = Bitmap.new(7, 7)
  797. @sparkle_bitmaps[3].fill_rect(3, 1, 1, 5, darkBlue)
  798. @sparkle_bitmaps[3].fill_rect(1, 3, 5, 1, darkBlue)
  799. @sparkle_bitmaps[3].fill_rect(3, 2, 1, 3, midBlue)
  800. @sparkle_bitmaps[3].fill_rect(2, 3, 3, 1, midBlue)
  801. @sparkle_bitmaps[3].set_pixel(3, 3, lightBlue)

  802. # 5th sparkle bitmap
  803. @sparkle_bitmaps[4] = Bitmap.new(7, 7)
  804. @sparkle_bitmaps[4].fill_rect(2, 2, 3, 3, midBlue)
  805. @sparkle_bitmaps[4].fill_rect(3, 2, 1, 3, darkBlue)
  806. @sparkle_bitmaps[4].fill_rect(2, 3, 3, 1, darkBlue)
  807. @sparkle_bitmaps[4].set_pixel(3, 3, lightBlue)
  808. @sparkle_bitmaps[4].set_pixel(1, 1, darkBlue)
  809. @sparkle_bitmaps[4].set_pixel(5, 1, darkBlue)
  810. @sparkle_bitmaps[4].set_pixel(1, 5, darkBlue)
  811. @sparkle_bitmaps[4].set_pixel(5, 1, darkBlue)

  812. # 6th sparkle bitmap
  813. @sparkle_bitmaps[5] = Bitmap.new(7, 7)
  814. @sparkle_bitmaps[5].fill_rect(2, 1, 3, 5, darkBlue)
  815. @sparkle_bitmaps[5].fill_rect(1, 2, 5, 3, darkBlue)
  816. @sparkle_bitmaps[5].fill_rect(2, 2, 3, 3, midBlue)
  817. @sparkle_bitmaps[5].fill_rect(3, 1, 1, 5, midBlue)
  818. @sparkle_bitmaps[5].fill_rect(1, 3, 5, 1, midBlue)
  819. @sparkle_bitmaps[5].fill_rect(3, 2, 1, 3, lightBlue)
  820. @sparkle_bitmaps[5].fill_rect(2, 3, 3, 1, lightBlue)
  821. @sparkle_bitmaps[5].set_pixel(3, 3, white)

  822. # 7th sparkle bitmap
  823. @sparkle_bitmaps[6] = Bitmap.new(7, 7)
  824. @sparkle_bitmaps[6].fill_rect(2, 1, 3, 5, midBlue)
  825. @sparkle_bitmaps[6].fill_rect(1, 2, 5, 3, midBlue)
  826. @sparkle_bitmaps[6].fill_rect(3, 0, 1, 7, darkBlue)
  827. @sparkle_bitmaps[6].fill_rect(0, 3, 7, 1, darkBlue)
  828. @sparkle_bitmaps[6].fill_rect(2, 2, 3, 3, lightBlue)
  829. @sparkle_bitmaps[6].fill_rect(3, 2, 1, 3, midBlue)
  830. @sparkle_bitmaps[6].fill_rect(2, 3, 3, 1, midBlue)
  831. @sparkle_bitmaps[6].set_pixel(3, 3, white)

  832. @user_bitmaps = []
  833. update_user_defined
  834. end

  835. def update_user_defined
  836. for image in @user_bitmaps
  837. image.dispose
  838. end

  839. #user-defined bitmaps
  840. for name in $WEATHER_IMAGES
  841. @user_bitmaps.push(RPG::Cache.picture(name))
  842. end
  843. for sprite in @sprites
  844. sprite.bitmap = @user_bitmaps[rand(@user_bitmaps.size)]
  845. end
  846. end

  847. attr_reader :type
  848. attr_reader :max
  849. attr_reader :ox
  850. attr_reader :oy
  851. end
  852. end



复制代码

系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-28 22:32

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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