#=========================================================================== # ◆ A1 Scripts ◆ # 立ち絵表示(RGSS3) # # バージョン : 1.20 (2012/01/09) # 作者 : A1 # URL     : http://a1tktk.web.fc2.com/ #--------------------------------------------------------------------------- # 機能: # ・「ピクチャの表示」などを使わなくても立ち絵を表示・非表示・移動します #--------------------------------------------------------------------------- # 更新履歴   :2011/12/15 Ver1.00 リリース #    :2012/01/02 Ver1.10 A1共通スクリプトVer3.30対応 #    :2012/01/09 Ver1.20 高さ指定機能追加 #    :2012/01/09 Ver1.20 名前の置き換え指定方法変更 #--------------------------------------------------------------------------- # 設置場所 #  A1共通スクリプトより下 # (ネームウィンドウ以下) # # 必要スクリプト # A1共通スクリプトVer3.30以上 #--------------------------------------------------------------------------- # 使い方 # ■ 設定項目 を設定 #  顔グラフィックに対応した立ち絵を #  Picturesフォルダにインポートすれば機能します # #  対応する立ち絵のファイル名は #  [顔グラフィックファイル名]_[顔グラフィックスインデックス]_[0 or 1] #   #  例:顔グラフィック Actor1 のIndex 0 (ラルフ) の場合 #    Actor1_0_0 が対応立ち絵になります #    Actor1_0_1 があれば口パクします # #  立ち絵表示フラグをOnにすると、立ち絵が表示されるようになります #  立ち絵表示フラグの番号は設定項目で設定できます # # 名前の置き換え #  設定項目の「名前の置き換え」を設定することで #  顔グラフィックファイル名と、表示する立ちグラフィックの関連付けができます # #  例1(1つの顔グラフィックファイルを複数キャラで使用する場合) # "Actor1_0" => ["ラルフ",0], # "Actor1_1" => ["アリシア",0], # #   顔グラフィックファイル「Actor1」のIndex0を表示した際 #   ラルフ_0_0 が対応立ち絵になります #   ラルフ_0_1 があれば口パクします # #   「Actor1」のIndex1を表示した際は #   アリシア_0_0 が対応立ち絵になります #   アリシア_0_1 があれば口パクします # #  例2(複数の顔グラフィックファイルを1キャラで使用する場合) #   "ラルフ" => ["ラルフ",0] (省略可能) #   "ラルフ_ex" => ["ラルフ",1] # #   顔グラフィックファイル「ラルフ」「ラルフ_ex」に対応した #   全ての立ち絵を、「ラルフ」の立ち絵として扱います #--------------------------------------------------------------------------- # 追加文章中コマンド # # \TURN[direction] 立ち絵を左右反転させます # direction = 向きを指定します (L or R) # # L : 元の立ち絵を反転させます # R : 反転を元の立ち絵に戻します # 使用例:\TURN[L] # # \RETURN[duration] 立ち絵を所定の位置に戻します # duration = 移動完了までの時間(フレーム) # # \ERASE 立ち絵を消去します # # \SHOW 消去した立ち絵を表示させます # # \TONE[duration,red,green,blue,gray] # 立ち絵の色調を変更します # duration = 色調変更完了までの時間(フレーム) # red = 色調の赤要素 # green = 色調の緑要素 # blue = 色調の青要素 # gray = 色調のグレー要素(省略可) # # \MV[x,y,duration] 立ち絵を移動します(絶対座標) # x = 移動先のx座標 # y = 移動先のy座標 # duration = 移動完了までの時間(フレーム) # # \MVA[x,y,duration] 立ち絵を移動します(相対座標) # x = x方向の移動距離 # y = y方向の移動距離 # duration = 移動完了までの時間(フレーム) # # \OP[opacity,duration] 立ち絵の透明度を変更します # opacity = 透明度 # duration = 透明度変更完了までの時間(フレーム) # # # \BYE[direction,duration] 立ち絵を画面外に移動させます # direction = 向きを指定します (L or R or D) # duration = 移動完了までの時間(フレーム) # # L : 画面左に退場します # R : 画面右に退場します # D : 画面下に退場します # 使用例:\BYE[L,60] #============================================================================== $imported ||= {} $imported["A1_Stand_Picture"] = true if $imported["A1_Common_Script"] old_common_script("立ち絵表示", "3.30") if common_version < 3.30 #============================================================================== # ■ 設定項目 #============================================================================== module A1_System::StandPicture #-------------------------------------------------------------------------- # オートy座標指定 # 画面下 :画面の一番下に合わせます # ウィンドウ上:メッセージウィンドウの上に合わせます #-------------------------------------------------------------------------- AUTO_Y = "画面下" #-------------------------------------------------------------------------- # y座標個別指定 #-------------------------------------------------------------------------- PERSONAL_Y = { "Actor1_0" => 128, "Actor1_1" => 128, } #-------------------------------------------------------------------------- # 名前の置き換え #-------------------------------------------------------------------------- NAME_CHANGE = { "Actor1_0" => ["ラルフ",0], "Actor1_1" => ["アリシア",0], } end #============================================================================== # ■ Window_Message #------------------------------------------------------------------------------ #  文章表示に使うメッセージウィンドウです。 #============================================================================== class Window_Message < Window_Base #-------------------------------------------------------------------------- # ○ 定数 #-------------------------------------------------------------------------- LEFT = 0 RIGHT = 1 BYE_DURATION = 30 MOVE_DURATION = 30 #-------------------------------------------------------------------------- # ☆ オブジェクト初期化 #-------------------------------------------------------------------------- alias a1_stand_picture_window_message_initialize initialize def initialize @stand_pic = {} @show_pos = [] @prev_name = "" @pre_message = false a1_stand_picture_window_message_initialize end #-------------------------------------------------------------------------- # ☆ 改ページ処理 #-------------------------------------------------------------------------- alias a1_stand_picture_window_message_new_page new_page def new_page(text, pos) file_name = $game_message.face_name file_index = $game_message.face_index file_info = find_name(file_name, file_index) name = file_info[0] index = file_info[1] # 顔グラフィックがない return a1_stand_picture_window_message_new_page(text, pos) if name.empty? # 立ち絵作成(新顔なら表示) new_face = false new_face = create_stand_pic(file_name, name, index) if @stand_pic[name] == nil # 立ち絵がない return a1_stand_picture_window_message_new_page(text, pos) unless stand_pic_enable?(name) # 新顔以外は立ち絵変更 change_picture(file_name, index, name) unless new_face # 顔グラフィックスを一度emptyにする $game_message.face_name = "" if @stand_pic[name].enable_bitmap?(index) # 従来の改ページ処理 a1_stand_picture_window_message_new_page(text, pos) # 顔グラフィックスを戻す $game_message.face_name = file_name # 直前に話した名前を入れる @prev_name = name # ネームウィンドウの処理 proc_name_window(file_name, file_index, name) if $imported["A1_Name_Window"] end #-------------------------------------------------------------------------- # ○ ネームウィンドウの処理 #-------------------------------------------------------------------------- def proc_name_window(file_name, file_index, name) pos = show_pos(name) return show_name_window(file_name, file_index, 0) unless stand_pic_enable?(name) bitmap_width = @stand_pic[name].pic_sprite.bitmap.width x = bitmap_width / 2 if pos == 0 x = Graphics.width - bitmap_width / 2 if pos == 1 show_name_window(file_name, file_index, x, 0) end #-------------------------------------------------------------------------- # ○ 立ち絵変更 #-------------------------------------------------------------------------- def change_picture(file_name, index, name) return @stand_pic[name].change_face(file_name, index) if show_pos(name) > -1 return change_character(file_name, name, index) if @show_pos.size == 2 create_stand_pic(file_name, name, index) end #-------------------------------------------------------------------------- # ☆ 改行処理 #-------------------------------------------------------------------------- alias a1_stand_picture_window_message_new_line_x new_line_x def new_line_x file_name = $game_message.face_name file_index = $game_message.face_index file_info = find_name(file_name, file_index) name = file_info[0] index = file_info[1] # 顔グラフィックがない return a1_stand_picture_window_message_new_line_x if name.empty? # 立ち絵がない return a1_stand_picture_window_message_new_line_x unless stand_pic_enable?(name) # 顔グラフィックスを一度emptyにする $game_message.face_name = "" if @stand_pic[name].enable_bitmap?(index) # 従来の改行処理 ret = a1_stand_picture_window_message_new_line_x # 顔グラフィックスを戻す $game_message.face_name = file_name return ret end #-------------------------------------------------------------------------- # ○ 立ち絵作成 #-------------------------------------------------------------------------- def create_stand_pic(file_name, name, index, duration = MOVE_DURATION) @stand_pic[name] = Game_StandPic.new(name, index, self.height) return if @stand_pic[name].pic_sprite == nil return unless $game_system.show_stand_picture if @show_pos.size == 0 pos = LEFT @show_pos[0] = name elsif @show_pos.size == 1 pos = RIGHT @show_pos[1] = name else change_character(file_name, name, index) return true end @stand_pic[name].show(file_name, pos,index, duration) return true end #-------------------------------------------------------------------------- # ○ 表示する立ち絵の変更 #-------------------------------------------------------------------------- def change_character(file_name, name, index, duration = MOVE_DURATION) return if @stand_pic[name].pic_sprite == nil return unless $game_system.show_stand_picture no_index = no_prev_index no_prev_name = @show_pos[no_index] case no_index when 0 @stand_pic[no_prev_name].bye("L",BYE_DURATION) if stand_pic_enable?(no_prev_name) pos = LEFT @show_pos[0] = name when 1 @stand_pic[no_prev_name].bye("R",BYE_DURATION) if stand_pic_enable?(no_prev_name) pos = RIGHT @show_pos[1] = name end @stand_pic[name].show(file_name, pos,index, duration) if stand_pic_enable?(name) end #-------------------------------------------------------------------------- # ○ 直前に話していないIndexを取得 #-------------------------------------------------------------------------- def no_prev_index return 0 if @show_pos[0] != @prev_name return 1 if @show_pos[1] != @prev_name end #-------------------------------------------------------------------------- # ○ 表示されているか調べる #-------------------------------------------------------------------------- def show_pos(name) return 0 if @show_pos[0] == name return 1 if @show_pos[1] == name return -1 end #-------------------------------------------------------------------------- # ☆ フレーム更新 #-------------------------------------------------------------------------- alias a1_stand_pic_window_message_update update def update update_stand_pic a1_stand_pic_window_message_update end #-------------------------------------------------------------------------- # ○ 立ち絵のアップデート #-------------------------------------------------------------------------- def update_stand_pic for name in @stand_pic.keys @stand_pic[name].update end end #-------------------------------------------------------------------------- # ○ 文章のチェック #-------------------------------------------------------------------------- alias a1_stand_pic_wm_chk_text chk_text def chk_text(text) text.gsub!(/\eERASE/,"") text.gsub!(/\eSHOW/,"") return a1_stand_pic_wm_chk_text(text) end #-------------------------------------------------------------------------- # ☆ 制御文字の処理 # code : 制御文字の本体部分(「\C[1]」なら「C」) # text : 描画処理中の文字列バッファ(必要なら破壊的に変更) # pos : 描画位置 {:x, :y, :new_x, :height} #-------------------------------------------------------------------------- alias a1_stand_pic_wm_process_escape_character process_escape_character def process_escape_character(code, text, pos) file_name = $game_message.face_name file_index = $game_message.face_index file_info = find_name(file_name, file_index) name = file_info[0] index = file_info[1] case code.upcase when 'TURN' text.slice!(/\[(.)\]/) rescue 0 if stand_bitmap_enable?(name, index) case $1 when 'L' @stand_pic[name].pic_sprite.mirror = true when 'R' @stand_pic[name].pic_sprite.mirror = false end end return true when 'RETURN' text.slice!(/\[(\d+)\]/) rescue 0 if stand_bitmap_enable?(name, index) index = show_pos(name) return if index == -1 duration = $1.to_i @stand_pic[name].return_pos(index, duration) end when 'SHOW' if stand_bitmap_enable?(name, index) return if @stand_pic[name].pic_sprite == nil or name.empty? @stand_pic[name].pic_sprite.visible = true end when 'ERASE' if stand_bitmap_enable?(name, index) return if @stand_pic[name].pic_sprite == nil or name.empty? @stand_pic[name].pic_sprite.visible = false end when 'TONE' text.slice!(/\[(.+)\]/) rescue 0 if stand_bitmap_enable?(name, index) params = $1.to_s.split(",") duration = params[0].to_i red = $a1_common.minus_to_i(params[1]) green = $a1_common.minus_to_i(params[2]) blue = $a1_common.minus_to_i(params[3]) gray = $a1_common.minus_to_i(params[4]) unless params[4] == nil if gray == nil tone = Tone.new(red, green, blue) else tone = Tone.new(red, green, blue, gray) end @stand_pic[name].start_tone_change(tone, duration) end when 'MV' text.slice!(/\[([-]*\d+)[,]([-]*\d+)[,](\d+)\]/) rescue 0 if stand_bitmap_enable?(name, index) x = $a1_common.minus_to_i($1) y = $a1_common.minus_to_i($2) duration = $3.to_i @stand_pic[name].move(x, y, duration) end when 'MVA' text.slice!(/\[([-]*\d+)[,]([-]*\d+)[,](\d+)\]/) rescue 0 if stand_bitmap_enable?(name, index) x = $a1_common.minus_to_i($1) y = $a1_common.minus_to_i($2) duration = $3.to_i @stand_pic[name].move_plus(x, y, duration) end when 'OP' text.slice!(/\[(\d+)[,](\d+)\]/) rescue 0 if stand_bitmap_enable?(name, index) @stand_pic[name].change_opacity($1.to_i,$2.to_i) end when 'BYE' text.slice!(/^\[(.)[,](\d+)\]/) rescue 0 if stand_bitmap_enable?(name, index) @show_pos.delete_at(show_pos(name)) @stand_pic[name].bye($1,$2.to_i) end else a1_stand_pic_wm_process_escape_character(code, text, pos) end end #-------------------------------------------------------------------------- # ☆ 通常文字の処理 #-------------------------------------------------------------------------- alias a1_stand_pic_wm_process_normal_character process_normal_character def process_normal_character(c, pos) file_name = $game_message.face_name file_index = $game_message.face_index file_info = find_name(file_name, file_index) name = file_info[0] index = file_info[1] if stand_bitmap_enable?(name, index) @stand_pic[name].mouth_move end a1_stand_pic_wm_process_normal_character(c, pos) end #-------------------------------------------------------------------------- # ○ 立ち絵が有効? #-------------------------------------------------------------------------- def stand_pic_enable?(name) return false if name.empty? return false if @stand_pic[name] == nil return false if @stand_pic[name].pic_sprite == nil return false unless $game_system.show_stand_picture return true end #-------------------------------------------------------------------------- # ○ ビットマップが有効? #-------------------------------------------------------------------------- def stand_bitmap_enable?(name, index) return false if name.empty? return false if @stand_pic[name].pic_sprite == nil return false unless @stand_pic[name].enable_bitmap?(index) return false unless $game_system.show_stand_picture return true end #-------------------------------------------------------------------------- # ☆ 解放 #-------------------------------------------------------------------------- alias a1_stand_pic_window_message_dispose dispose def dispose a1_stand_pic_window_message_dispose dispose_stand_picture end #-------------------------------------------------------------------------- # ○ 立ち絵の解放 #-------------------------------------------------------------------------- def dispose_stand_picture for name in @stand_pic.keys next if @stand_pic[name] == nil next if @stand_pic[name].bitmap == nil @stand_pic[name].erase end end #-------------------------------------------------------------------------- # ○ 名前の検索 #-------------------------------------------------------------------------- def find_name(filename, fileindex) list = A1_System::StandPicture::NAME_CHANGE["#{filename}_#{fileindex}"] list = A1_System::StandPicture::NAME_CHANGE[filename] unless list return [filename, fileindex] unless list return list end end #============================================================================== # ■ Game_StandPic #============================================================================== class Game_StandPic #-------------------------------------------------------------------------- # ○ 定数 #-------------------------------------------------------------------------- LEFT = 0 RIGHT = 1 MOVE_DURATION = 30 MOUTH_MOVE_DURATION = 4 AUTO_Y = A1_System::StandPicture::AUTO_Y PERSONAL_Y = A1_System::StandPicture::PERSONAL_Y #-------------------------------------------------------------------------- # ○ 公開インスタンス変数 #-------------------------------------------------------------------------- attr_reader :x # X 座標 attr_reader :y # Y 座標 attr_reader :opacity # 不透明度 attr_reader :tone # 色調 attr_reader :mirror # 左右反転 attr_reader :pic_sprite # スプライト attr_reader :bitmap # ビットマップの配列 #-------------------------------------------------------------------------- # ○ オブジェクト初期化 #-------------------------------------------------------------------------- def initialize(name, index, window_height) @name = name @duration = 0 @target_opacity = 255.0 @tone = Tone.new(0, 0, 0, 0) @tone_target = Tone.new(0, 0, 0, 0) @tone_duration = 0 @mirror = false @pic_sprite = nil @window_height = window_height @face_index = index @face_index = 0 @mouth_index = 0 @mouth_move_duration = 0 @pos = -1 @bitmap = [] @bitmap_test = [] plus = (index / 8) * 8 create_bitmap(name, plus) @pic_sprite = create_sprite if @bitmap.size > 0 end #-------------------------------------------------------------------------- # ○ スプライトの作成 #-------------------------------------------------------------------------- def create_sprite pic_sprite = Sprite.new pic_sprite.visible = false return pic_sprite end #-------------------------------------------------------------------------- # ○ ビットマップの作成 #-------------------------------------------------------------------------- def create_bitmap(name, plus = 0) file = sprintf("Graphics/Pictures/%s",name) Dir::glob(sprintf("%s*.*",file)).each {|f| next unless f =~ /#{file}_(\d+)_(\d+)/i next unless FileTest.file?(f) next unless file_ext(f) index = $1.to_i + plus @bitmap[index] = [] if @bitmap[index] == nil file_name = File.basename(f,".*") @bitmap[index][$2.to_i] = Cache.picture(file_name) @bitmap_test[index] = true } end #-------------------------------------------------------------------------- # ○ 拡張子を調べる #-------------------------------------------------------------------------- def file_ext(f) return true if File::extname(f) == ".png" return true if File::extname(f) == ".bmp" return false end #-------------------------------------------------------------------------- # ○ ビットマップの存在を調べる #-------------------------------------------------------------------------- def enable_bitmap?(index) return false if @bitmap[index] == nil return true end #-------------------------------------------------------------------------- # ○ 代替ビットマップの検索 #-------------------------------------------------------------------------- def search_bitmap for bitmap in @bitmap next if bitmap == nil return bitmap[0] end end #-------------------------------------------------------------------------- # ○ ピクチャの表示 #-------------------------------------------------------------------------- def show(file_name, pos, index, duration, opacity = 255) @face_index = index @pos = pos if @bitmap[@face_index] == nil and @bitmap_test[@face_index] != true plus = (@face_index / 8) * 8 create_bitmap(file_name, plus) end if @bitmap[@face_index] == nil or $game_system.show_stand_picture == false @pic_sprite.bitmap = nil @pic_sprite.visible = false bitmap = search_bitmap else @pic_sprite.visible = true @pic_sprite.bitmap = @bitmap[@face_index][0] bitmap = @pic_sprite.bitmap end fix_pos(pos, duration, bitmap, opacity) return true end #-------------------------------------------------------------------------- # ○ 場所確定 #-------------------------------------------------------------------------- def fix_pos(pos, duration, bitmap, opacity) case pos when LEFT @pic_sprite.x = (0 - bitmap.width).to_f @target_x = 0.0 @duration = duration @pic_sprite.mirror = false when RIGHT @pic_sprite.x = Graphics.width.to_f @target_x = (Graphics.width - bitmap.width).to_f @duration = duration @pic_sprite.mirror = true end @pic_sprite.opacity = opacity.to_f @pic_sprite.visible = true @pic_sprite.y = set_basic_y(bitmap.height).to_f @target_y = @pic_sprite.y end #-------------------------------------------------------------------------- # ○ 基本y座標の設定 #-------------------------------------------------------------------------- def set_basic_y(height) by = PERSONAL_Y["#{@name}_#{@face_index}"] return by if by by = PERSONAL_Y[@name] return by if by return Graphics.height - height - @window_height if AUTO_Y == "ウィンドウ上" return Graphics.height - height end #-------------------------------------------------------------------------- # ○ 定位置に戻る #-------------------------------------------------------------------------- def return_pos(pos, duration) case pos when LEFT @target_x = 0.0 @duration = duration @pic_sprite.mirror = false when RIGHT @target_x = (Graphics.width - @pic_sprite.bitmap.width).to_f @duration = duration @pic_sprite.mirror = true end @target_y = set_basic_y(@pic_sprite.bitmap.height).to_f end #-------------------------------------------------------------------------- # ○ 顔変更 #-------------------------------------------------------------------------- def change_face(name, index) @face_index = index if @bitmap[@face_index] == nil and @bitmap_test[@face_index] != true plus = (@face_index / 8) * 8 create_bitmap(name, plus) end if @bitmap[@face_index] == nil or $game_system.show_stand_picture == false @pic_sprite.bitmap = nil @pic_sprite.visible = false else @pic_sprite.bitmap = @bitmap[@face_index][0] case @pos when LEFT @pic_sprite.x = 0.0 when RIGHT @pic_sprite.x = (Graphics.width - @pic_sprite.bitmap.width).to_f end @pic_sprite.y = set_basic_y(@pic_sprite.bitmap.height).to_f @target_x = @pic_sprite.x @target_y = @pic_sprite.y @pic_sprite.visible = true end end #-------------------------------------------------------------------------- # ○ 口パク #-------------------------------------------------------------------------- def mouth_move return if @mouth_move_duration > 0 return if bitmap[@face_index] == nil return if bitmap[@face_index].size == 1 @mouth_move_duration = MOUTH_MOVE_DURATION if @mouth_index == 0 and bitmap[@face_index][1] != nil @mouth_index = 1 elsif @mouth_index == 1 @mouth_index = 0 end @pic_sprite.bitmap = bitmap[@face_index][@mouth_index] end #-------------------------------------------------------------------------- # ○ ピクチャの移動 #-------------------------------------------------------------------------- def move(x, y, duration) @target_x = x @target_y = y @duration = duration end #-------------------------------------------------------------------------- # ○ 透明度変更 #-------------------------------------------------------------------------- def change_opacity(opacity, duration) @target_opacity = opacity @duration = duration end #-------------------------------------------------------------------------- # ○ 相対移動 #-------------------------------------------------------------------------- def move_plus(x, y, duration) @target_x = @pic_sprite.x + x @target_y = @pic_sprite.y + y @duration = duration end #-------------------------------------------------------------------------- # ○ 退場 #-------------------------------------------------------------------------- def bye(direction, duration) return if @pic_sprite.bitmap == nil case direction when "D" @target_y = Graphics.height when "R" @target_x = Graphics.width when "L" @target_x = 0 - @pic_sprite.bitmap.width end @duration = duration end #-------------------------------------------------------------------------- # ○ 色調変更の開始 #-------------------------------------------------------------------------- def start_tone_change(tone, duration) @tone_target = tone.clone @tone_duration = duration if @tone_duration == 0 @tone = @tone_target.clone end end #-------------------------------------------------------------------------- # ○ ピクチャの消去 #-------------------------------------------------------------------------- def erase for arr in @bitmap next if arr == nil for bitmap in arr next if bitmap == nil bitmap.dispose end end @bitmap = nil return if @pic_sprite == nil @pic_sprite.dispose @pic_sprite = nil end #-------------------------------------------------------------------------- # ○ フレーム更新 #-------------------------------------------------------------------------- def update return if @pic_sprite == nil @mouth_move_duration -= 1 if @mouth_move_duration > 0 if @duration >= 1 d = @duration @pic_sprite.x = (@pic_sprite.x * (d - 1) + @target_x) / d @pic_sprite.y = (@pic_sprite.y * (d - 1) + @target_y) / d @pic_sprite.opacity = (@pic_sprite.opacity * (d - 1) + @target_opacity) / d @duration -= 1 end if @tone_duration >= 1 d = @tone_duration @tone.red = (@tone.red * (d - 1) + @tone_target.red) / d @tone.green = (@tone.green * (d - 1) + @tone_target.green) / d @tone.blue = (@tone.blue * (d - 1) + @tone_target.blue) / d @tone.gray = (@tone.gray * (d - 1) + @tone_target.gray) / d @tone_duration -= 1 @pic_sprite.tone = @tone end end end #============================================================================== # ■ Game_System #------------------------------------------------------------------------------ #  システム周りのデータを扱うクラスです。乗り物や BGM などの管理も行います。 # このクラスのインスタンスは $game_system で参照されます。 #============================================================================== class Game_System #-------------------------------------------------------------------------- # ○ 公開インスタンス変数 #-------------------------------------------------------------------------- attr_accessor :show_stand_picture # 立ち絵表示フラグ #-------------------------------------------------------------------------- # ☆ オブジェクト初期化 #-------------------------------------------------------------------------- alias a1_stand_picture_game_system_initialize initialize def initialize a1_stand_picture_game_system_initialize @show_stand_picture = false end end #============================================================================== # ■ A1_System::CommonModule #============================================================================== class A1_System::CommonModule #-------------------------------------------------------------------------- # ☆ 注釈コマンド定義 #-------------------------------------------------------------------------- alias a1_stand_picture_define_command define_command def define_command a1_stand_picture_define_command @cmd_108["立ち絵表示"] = :stand_picture end end #============================================================================== # ■ Game_Interpreter #------------------------------------------------------------------------------ #  イベントコマンドを実行するインタプリタです。このクラスは Game_Map クラス、 # Game_Troop クラス、Game_Event クラスの内部で使用されます。 #============================================================================== class Game_Interpreter #-------------------------------------------------------------------------- # ○ 立ち絵表示 #-------------------------------------------------------------------------- def stand_picture(params) $game_system.show_stand_picture = params[0] == "on" ? true : false end end end