赞 | 0 |
VIP | 40 |
好人卡 | 2 |
积分 | 1 |
经验 | 10932 |
最后登录 | 2016-5-17 |
在线时间 | 462 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 462 小时
- 注册时间
- 2007-7-30
- 帖子
- 643
|
- #--------------------------------------------------------------------------
- # ● 远景图做成
- #--------------------------------------------------------------------------
- def make_panorama
- all_panorama = RPG::Cache.panorama($game_map.panorama_name,$game_map.panorama_hue)
- w = all_panorama.width / $ZOOM
- h = all_panorama.height / $ZOOM
- @pa_w = all_panorama.width / $ZOOM
- @pa_h = all_panorama.height / $ZOOM
- ret_bitmap = Bitmap.new(@all_map.width, @all_map.height)
- src_rect = Rect.new(0, 0, all_panorama.width, all_panorama.height)
- dest_rect = Rect.new(0, 0, w, h)
- ret_bitmap.stretch_blt(dest_rect, all_panorama, src_rect)
- while dest_rect.x < @all_map.width
- dest_rect.y = 0
- while dest_rect.y < @all_map.height
- ret_bitmap.stretch_blt(dest_rect, all_panorama, src_rect)
- dest_rect.y += h
- end
- dest_rect.x += w
- end
- all_panorama.dispose
- return ret_bitmap
- end
复制代码- px = x - $game_map.display_x / 16
复制代码 |
|