rebf-gaiden/Scripts/_.46.rb
2025-04-26 17:06:34 -05:00

69 lines
No EOL
2.3 KiB
Ruby
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

=begin
ピクチャ消去後の処理軽量化 トリス 更新回数2
・一斉に「ピクチャの消去」を行った後、ある程度の間隔ごとにゲームが少し止まる
この不具合を防止する
このスクリプト導入時、
CACAO SOFT様「拡張 ピクチャの操作」 (http://cacaosoft.web.fc2.com/)
の機能に影響を及ぼす可能性があります。影響がないか確認してください。
=end
module Picture_Erase
# このスクリプトの軽量化効果を適用しないピクチャ番号
# 「<拡張> ピクチャの操作」への影響はなくなるが、動作が重くなる
NO_USE = []
# NO_USE = [11, 12, 13, 14]
end
#==============================================================================
# ■ Sprite_Picture
#==============================================================================
class Sprite_Picture < Sprite
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
alias :picture_erase_initialize :initialize
def initialize(viewport, picture)
picture_erase_initialize(viewport, picture)
@erase_flag = false
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
alias :picture_erase_update :update
def update
if not Picture_Erase::NO_USE.include?(@picture.number)
return_flag = false
return_flag = true if @picture.name == "" and
(@picture.type == :picture or @picture.type == :none)
if return_flag
return if @erase_flag
@erase_flag = true
else
@erase_flag = false
end
end
picture_erase_update
end
end
#==============================================================================
# ■ Game_Picture
#==============================================================================
class Game_Picture
alias :picture_erase_show_window :show_window
def show_window(*args)
@type = :window
picture_erase_show_window(*args)
end
end