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

Project1

 找回密码
 注册会员
搜索
楼主: Goldencolor
打印 上一主题 下一主题

[原创发布] 全球天气系统

   关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
21 小时
注册时间
2010-5-1
帖子
9
21
发表于 2010-5-1 07:49:19 | 只看该作者
最后一个- -

RMB- -发财了!!
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
340
在线时间
2 小时
注册时间
2010-6-13
帖子
3
22
发表于 2010-6-13 15:10:20 | 只看该作者
是件好东西耶!!!
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
398
在线时间
972 小时
注册时间
2007-12-31
帖子
2137
23
发表于 2010-6-13 16:23:33 | 只看该作者
见过这个,没想到竟然有这么多人买…………:funk:
新天气系统
  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 = 0
  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 = false
  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. #设天气为最高层
  62. sprite.z = 10000000
  63. sprite.visible = false
  64. sprite.opacity = 0
  65. @sprites.push(sprite)
  66. @current_pose.push(0)
  67. @info.push(rand(50))
  68. @countarray.push(rand(15))
  69. end
  70. end

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

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

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

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

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

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

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

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

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


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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



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

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

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

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

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

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

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

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

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

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

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

  773. @sparkle_bitmaps = []

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

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

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

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

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

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

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

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

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

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

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

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



复制代码
附:此脚本是AVG精装版里掏出来的,很明显的:天气层调高了,自己调回去啊~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
70
在线时间
17 小时
注册时间
2009-7-3
帖子
64
24
发表于 2010-6-20 16:28:09 | 只看该作者
虽然很贵,但物超所值
有了RPG,就等于有了整个世界!
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
77 小时
注册时间
2008-5-16
帖子
194
25
发表于 2010-6-21 00:59:09 | 只看该作者
那个自定义太囧了。。。。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
229
在线时间
596 小时
注册时间
2010-6-21
帖子
1218
26
发表于 2010-6-21 09:51:08 | 只看该作者
看看
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
301
在线时间
573 小时
注册时间
2005-10-27
帖子
1164
27
发表于 2010-6-23 01:36:15 | 只看该作者
一咬牙~100点经验也好了
认真地猥琐,猥琐地认真
回复 支持 反对

使用道具 举报

Lv1.梦旅人

超级囧神 无尽的灌水

梦石
0
星屑
144
在线时间
784 小时
注册时间
2010-6-27
帖子
2065
28
发表于 2010-6-26 16:23:47 | 只看该作者
新手可怜,没有钱~呜呜呜~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
1 小时
注册时间
2006-10-9
帖子
73
29
发表于 2010-6-28 08:51:54 | 只看该作者
我倒.好贵噢~~~~
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2010-7-1
帖子
14
30
发表于 2010-7-1 14:10:44 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-19 20:20

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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