| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 5 |
| 经验 | |
| 最后登录 | 2021-9-15 |
| 在线时间 | 828 小时 |
- 梦石
- 0
- 星屑
- 466
- 在线时间
- 828 小时
- 注册时间
- 2009-5-31
- 回帖
- 71
|
发表于 2013-2-13 20:49:59
|
显示全部楼层
本人也说不好那个好用 任选其一插入 Main 上方即可………………
- #============================================================================
- # ■ VX_事件图形刷新简化 —— By 诡异の猫
- #============================================================================
- # 脚本内容: 只刷新视野内的事件图形,改善大地图事件过多卡机情况.
- #============================================================================
- class Sprite_Character < Sprite_Base
- #--------------------------------------------------------------------------
- # ● 判定图形是否再视野内
- #--------------------------------------------------------------------------
- def in_view?
- add_x = (self.width-32)*4 + 384#256
- add_y = self.height*8
- begin_x = $game_map.display_x - add_x
- begin_y = $game_map.display_y - add_y
- end_x = $game_map.display_x + 4352 + add_x
- end_y = $game_map.display_y + 3328 + add_y
- limit_x = $game_map.width * 256 - 256 + add_x
- limit_y = $game_map.height * 256 - 256 + add_y
- char_x = @character.real_x
- char_y = @character.real_y
- if end_x <= limit_x
- return false if char_x < begin_x or char_x > end_x
- end
- if end_y <= limit_y
- return false if char_y < begin_y or char_y > end_y
- end
- if end_x > limit_x and end_y > limit_y
- return false if char_x < begin_x and char_x > end_x - limit_x
- return false if char_y < begin_y and char_y > end_y - limit_y
- end
- return true
- end
- #--------------------------------------------------------------------------
- # ● 更新画面
- #--------------------------------------------------------------------------
- def update
- super
- if in_view?
- update_bitmap
- self.visible = (not @character.transparent)
- update_src_rect
- self.x = @character.screen_x
- self.y = @character.screen_y
- self.z = @character.screen_z
- self.opacity = @character.opacity
- self.blend_type = @character.blend_type
- self.bush_depth = @character.bush_depth
- end
- update_balloon
- if @character.animation_id != 0
- animation = $data_animations[@character.animation_id]
- start_animation(animation)
- @character.animation_id = 0
- end
- if @character.balloon_id != 0
- @balloon_id = @character.balloon_id
- start_balloon
- @character.balloon_id = 0
- end
- end
- end
- #==============================================================================
- #==============================================================================
- # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
- #==============================================================================
复制代码
- #==============================================================================
- # Módulo AntiLag 超级防卡脚本
- #==============================================================================
- module AntiLag
- SPC = Win32API.new("kernel32", "SetPriorityClass", "pi", "i")
- @@high_priority = false
- def self.high_priority ; @@high_priority; end
- def self.high_priority?; @@high_priority; end
- def self.high_priority=(valor)
- return if @@high_priority == valor
- @@high_priority = valor
- if @@high_priority
- SPC.call(-1, 0x80)
- return
- end
- SPC.call(-1, 0x20)
- end
- end
- AntiLag.high_priority = true
复制代码 |
评分
-
查看全部评分
|