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

Project1

 找回密码
 注册会员
搜索
查看: 920|回复: 0
打印 上一主题 下一主题

[已经解决] 对话脚本的某些问题~

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
284 小时
注册时间
2012-9-9
帖子
24
跳转到指定楼层
1
发表于 2013-6-9 06:49:37 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 陌鸢 于 2013-6-14 09:34 编辑

请问下咱用这个脚本设置头像的时候,因为头像比较大,显示不全,于是咱想调一下脸图高度……结果怎么调高度也不行……orz  还有在对话的时候如果不小心按了ESC键还会挑错……希望有人帮忙解决下啊
RUBY 代码复制
  1. # ▼▲▼ XRXS 9. 真对话加强脚本 ver.2 ▼▲▼
  2. # by 桜雅 在土
  3. #
  4. # update 2006/ 6/ 7
  5. #
  6. # SixRice 改造双重对话框功能  2006/ 8/ 18
  7. #==============================================================================
  8. # □ 使用习惯
  9. #==============================================================================
  10. class Window_Message < Window_Selectable
  11.   #--------------------------------------------------------------------------
  12.   # 字体相关设定
  13.   #--------------------------------------------------------------------------
  14.   DEFAULT_FONT_NAME      = "黑体"       # 字体  ( ""为系统默认 )
  15.   DEFAULT_FONT_SIZE      =  20     # 字号  (默认22)
  16.   DEFAULT_LINE_SPACE     =  22      # 字间距(默认32)
  17.   #--------------------------------------------------------------------------
  18.   # 基本设定
  19.   #--------------------------------------------------------------------------
  20.   DEFAULT_BG_PICTURE     = "对话框"       # 背景SKIN ( "" 为系统默认 )
  21.   DEFAULT_BG_X           =   0      # 背景SKIN X 位置
  22.   DEFAULT_BG_Y           =   0      # 背景SKIN Y 位置
  23.   DEFAULT_RECT           = Rect.new(55, 350, 700, 150) #矩形
  24.   DEFAULT_BACK_OPACITY   = 192      # 底图的不透明度
  25.   DEFAULT_STRETCH_ENABLE = true     # 五行以上自动翻页
  26.   #--------------------------------------------------------------------------
  27.   # インフォメーションウィンドウ
  28.   #--------------------------------------------------------------------------
  29.   INFO_RECT              = Rect.new(0, 0, 640, DEFAULT_LINE_SPACE + 38)
  30.   #--------------------------------------------------------------------------
  31.   # 逐字显示 (false时直接显示一页)
  32.   #--------------------------------------------------------------------------
  33.   DEFAULT_TYPING_ENABLE = true # 逐字显示
  34.   DEFAULT_TYPING_SPEED  = 0.8    # 显示速度,越小越快
  35.   #--------------------------------------------------------------------------
  36.   # 高速跳过显示
  37.   #--------------------------------------------------------------------------
  38.   KEY_SHOW_ALL          = Input::C # 瞬间显示完当前页文章
  39.   KEY_MESSAGE_SKIP      = Input::CTRL # 高速跳过(文章不完全显示)
  40.   #
  41.   # 高速スキップを有効にするスイッチのID.( 0 は常時可能)
  42.   #
  43.   HISKIP_ENABLE_SWITCH_ID = 0
  44.   #
  45.   # 高速スキップ・タイピングスキップを共に禁止するスイッチのID. ( 0 は常時可能)
  46.   #
  47.   SKIP_BAN_SWITCH_ID      = 400
  48.   #--------------------------------------------------------------------------
  49.   # 顔グラフィック
  50.   #--------------------------------------------------------------------------
  51.   FACE_STRETCH_ENABLE    =  false     # 顔グラフィックを↓指定のサイズに拡大する。
  52.   FACE_WIDTH             =  116      # 拡大後の「幅」
  53.   FACE_HEIGHT            =  0     # 拡大後の「高さ」
  54.   #--------------------------------------------------------------------------
  55.   # キャラポップ
  56.   #--------------------------------------------------------------------------
  57.   CHARPOP_HEIGHT         =  48      # キャラポップの高さ
  58. end
  59. module XRXS9
  60.   #--------------------------------------------------------------------------
  61.   # ネームウィンドウ
  62.   #--------------------------------------------------------------------------
  63.   NAME_WINDOW_TEXT_COLOR  = Color.new(192,240,255,255) # \name ウィンドウ文字色
  64.   NAME_WINDOW_TEXT_SIZE   =  20     # \name ウィンドウの文字サイズ
  65.   NAME_WINDOW_SPACE       =  22     # \name ウィンドウの余白
  66.   NAME_WINDOW_OFFSET_X    =  20     # \name ウィンドウのオフセット位置 X
  67.   NAME_WINDOW_OFFSET_Y    =  5     # \name ウィンドウのオフセット位置 Y
  68.   #--------------------------------------------------------------------------
  69.   # 終了時フェードアウト (Fade Out Before Terminate)
  70.   #--------------------------------------------------------------------------
  71.   FOBT_DURATION           =  20     # \fade を指定した時のフェード持続時間
  72. end
  73. #==============================================================================
  74. # --- セリフ効果音 ---
  75. #        $game_system.speak_se = RPG::AudioFile.new("")と設定し使用します。
  76. #==============================================================================
  77. class Game_System
  78.   attr_accessor :speak_se
  79.   def speak_se_play
  80.     self.se_play(self.speak_se) if self.speak_se != nil
  81.   end
  82. end
  83. class Window_Message < Window_Selectable
  84.   # 文字描画SE除外文字
  85.   NOT_SOUND_CHARACTERS = [" ", " ", "・", "、", "。", "─"]
  86. end
  87. #==============================================================================
  88. # □ Sprite_Pause
  89. #==============================================================================
  90. class Sprite_Pause < Sprite
  91.   def initialize
  92.     super
  93.     self.bitmap = RPG::Cache.windowskin("pause")
  94.     self.x = 570
  95.     self.y = 390
  96.     self.z = 9999
  97.     @count = 0
  98.     @wait_count = 0
  99.     update
  100.   end
  101.   def update
  102.     super
  103.     if @wait_count > 0
  104.       @wait_count -= 1
  105.     else
  106.       @count = (@count + 1)% 8
  107.       x = 80 * @count
  108.       self.src_rect.set(x, 0, 80, 80)
  109.       @wait_count = 2
  110.     end
  111.   end
  112. end
  113. #==============================================================================
  114. # ■ Window_Message
  115. #==============================================================================
  116. class Window_Message < Window_Selectable
  117.   # 定数
  118.   LEFT   = 0
  119.   CENTER = 1
  120.   RIGHT  = 2
  121.   #--------------------------------------------------------------------------
  122.   # ○ line_height : 行の高さ(@y増加値)を返します。
  123.   #--------------------------------------------------------------------------
  124.   def line_height
  125.     return DEFAULT_LINE_SPACE
  126.   end
  127.   #--------------------------------------------------------------------------
  128.   # ● オブジェクト初期化
  129.   #--------------------------------------------------------------------------
  130.   alias xrxs9_initialize initialize
  131.   def initialize
  132.     # 初期化
  133.     @stand_pictuers = []
  134.     @held_windows = []
  135.     @extra_windows = []
  136. #======================↓双重对话框功能↓====================================   
  137.     @held_windows2 = []
  138.     @extra_windows2 = []
  139. #======================↑双重对话框功能↑====================================     
  140.     @extra_sprites = []
  141.     # ポーズサイン
  142.     $pause = Sprite_Pause.new
  143.     $pause.visible = false
  144.     # 呼び戻す
  145.     xrxs9_initialize
  146.   end
  147.   #--------------------------------------------------------------------------
  148.   # ● 解放
  149.   #--------------------------------------------------------------------------
  150.   alias xrxs9_dispose dispose
  151.   def dispose   
  152.     # ホールドされたウィンドウを開放
  153.     @held_windows.each {|window| window.dispose}
  154.     @held_windows.clear
  155. #======================↓双重对话框功能↓====================================
  156.     @held_windows2.each {|window| window.dispose}
  157.     @held_windows2.clear
  158. #======================↑双重对话框功能↑====================================   
  159.     # ポーズサイン
  160.     $pause.dispose
  161.     # 外字キャッシュ開放
  162.     if @gaiji_cache != nil
  163.       @gaiji_cache.dispose
  164.       @gaiji_cache = nil
  165.     end
  166.     # 呼び戻す
  167.     xrxs9_dispose
  168.   end
  169.   #--------------------------------------------------------------------------
  170.   # ● メッセージ終了処理
  171.   #--------------------------------------------------------------------------
  172.   alias xrxs9_terminate_message terminate_message
  173.   def terminate_message
  174.     # 素通りフラグをクリア
  175.     @passable = false
  176.     $game_player.messaging_moving = false
  177.     # 背景ピクチャを解放
  178.     if $bgframe_sprite != nil
  179.       $bgframe_sprite.dispose
  180.     end   
  181.     # ウィンドウホールド
  182.     if @window_hold
  183.       # ウィンドウやスプライトの複製を作成
  184.       @held_windows.push(Window_Copy.new(self))
  185.       for window in @extra_windows
  186.         next if window.disposed?
  187.         @held_windows.push(Window_Copy.new(window))
  188.       end
  189.       for sprite in @extra_sprites
  190.         next if sprite.disposed?
  191.         @held_windows.push(Sprite_Copy.new(sprite))
  192.       end
  193.       # 設定をクリア
  194.       self.opacity = 0
  195.       self.contents_opacity = 0
  196.       @extra_windows.clear
  197.       @extra_sprites.clear
  198.     else
  199.       # ホールドされたウィンドウを開放
  200.       @held_windows.each {|object| object.dispose}
  201.       @held_windows.clear
  202.     end  
  203. #======================↓双重对话框功能↓====================================   
  204.     # ウィンドウホールド2
  205.     if @window_hol2
  206.       # ウィンドウやスプライトの複製を作成
  207.       @held_windows2.push(Window_Copy2.new(self))
  208.       for window in @extra_windows2
  209.         next if window.disposed?
  210.         @held_windows2.push(Window_Copy2.new(window))
  211.       end
  212.       for sprite in @extra_sprites
  213.         next if sprite.disposed?
  214.         @held_windows.push(Sprite_Copy.new(sprite))
  215.       end
  216.       # 設定をクリア
  217.       self.opacity = 0
  218.       self.contents_opacity = 0
  219.       @extra_windows2.clear
  220.       @extra_sprites.clear
  221.     else
  222.       # ホールドされたウィンドウを開放
  223.       @held_windows2.each {|object| object.dispose}
  224.       @held_windows2.clear
  225.     end
  226. #======================↑双重对话框功能↑====================================   
  227.     # ネームウィンドウらを解放
  228.     if @name_window_frame != nil
  229.       @name_window_frame.dispose
  230.       @name_window_frame = nil
  231.     end
  232.     if @name_window_text  != nil
  233.       @name_window_text.dispose
  234.       @name_window_text  = nil
  235.     end
  236.     # 呼び戻す
  237.     xrxs9_terminate_message
  238.   end
  239.   #--------------------------------------------------------------------------
  240.   # ○ ポップキャラクターの設定と取得
  241.   #--------------------------------------------------------------------------
  242.   def pop_character=(character_id)
  243.     @pop_character = character_id
  244.   end
  245.   def pop_character
  246.     return @pop_character
  247.   end
  248.   #--------------------------------------------------------------------------
  249.   # ○ クリア
  250.   #--------------------------------------------------------------------------
  251.   def clear
  252.     self.contents.clear
  253.     self.contents.font.color = normal_color
  254.     self.contents.font.size  = DEFAULT_FONT_SIZE
  255.     self.contents.font.name = DEFAULT_FONT_NAME if DEFAULT_FONT_NAME != ""
  256.     self.opacity          = 0 #【天圣】透明度更改
  257.     self.back_opacity     = DEFAULT_BACK_OPACITY
  258.     self.contents_opacity = 255  
  259.     Window_Copy
  260.     @mid_stop     = false       # \!      の中断中フラグ
  261.     @face_file    = nil         # \f      の顔ファイル
  262.     @current_name = nil         # \name   のネーム保持
  263. #======================↓双重对话框功能↓====================================   
  264.     @window_hold  = false       # \hold   のウィンドウホールドのフラグ
  265.     @window_hol2  = false
  266. #======================↑双重对话框功能↑====================================   
  267.     @stand_pictuer_hold = false # \picthold のスタンドピクチャの保持フラグ
  268.     @passable     = false       # \pass   の素通り可能フラグ
  269.     @inforesize   = false       # \info   のインフォリサイズ
  270.     # あと残りのここらへんのものを全て 0 で初期化
  271.     @x = @y = @indent = @line_index = 0
  272.     @cursor_width = @write_wait = @lines_max = 0
  273.     # タイピングスピードを取得
  274.     @write_speed = DEFAULT_TYPING_SPEED
  275.     # 各行の描画幅&位置揃え設定初期化
  276.     @line_widths = []
  277.     @line_aligns = []
  278.     # self.pop_character が nil の場合、標準位置。-1の場合、文字センター。
  279.     # 0以上の場合 キャラポップ。0は主人公、1以降はイベント。
  280.     self.pop_character = nil
  281.   end
  282.   #--------------------------------------------------------------------------
  283.   # ● リフレッシュ [再定義]
  284.   #--------------------------------------------------------------------------
  285.   def refresh
  286.     # ビットマップの取得と設定
  287.     if DEFAULT_BG_PICTURE != ""
  288.       bitmap = RPG::Cache.picture(DEFAULT_BG_PICTURE)
  289.       $bgframe_sprite = Sprite.new
  290.       $bgframe_sprite.x = DEFAULT_BG_X
  291.       $bgframe_sprite.y = DEFAULT_BG_Y
  292.       $bgframe_sprite.bitmap = bitmap
  293.       $bgframe_sprite.z = 8888
  294.     if $game_switches[10] == true
  295.       $bgframe_sprite.opacity = 0
  296.     $pause.opacity = 0
  297.     else
  298.       $bgframe_sprite.opacity = 255
  299.      $pause.opacity = 255
  300.     end
  301.     end
  302.     # 初期化
  303.     self.clear
  304.     # 表示待ちのメッセージがある場合
  305.     if $game_temp.message_text != nil
  306.       @now_text = $game_temp.message_text
  307.       # 改行削除指定\_があるか?
  308.       if (/\\_\n/.match(@now_text)) != nil
  309.         $game_temp.choice_start -= 1
  310.         @now_text.gsub!(/\\_\n/) { "" }
  311.       end
  312.       # 顔表示指定\Fがあるか?
  313.       if (/\\[Ff]\[(.+?)(?:,(\d+))?\]/.match(@now_text)) != nil
  314.         # ファイルチェック
  315.         if FileTest.exist?("Graphics/pictures/" + $1 + ".png")
  316.           # フェイスファイルを設定
  317.           @face_file = $1 + ".png"
  318.           @face_index = $2.to_i
  319.           # 全行インデントを入れる。
  320.           src = RPG::Cache.picture(@face_file)
  321.           self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
  322.           if FACE_STRETCH_ENABLE
  323.             @indent += FACE_WIDTH
  324.           elsif $2 == nil
  325.             @indent += src.width
  326.             @face_index = -1
  327.           else
  328.             @indent += src.width/4
  329.           end
  330.         end
  331.         @now_text.gsub!(/\\[Ff]\[(.*?)\]/) { "" }
  332.       end
  333.       # インフォ判定
  334.       @inforesize = (@now_text.gsub!(/\\info/) { "" } != nil)
  335. #======================↓双重对话框功能↓====================================      
  336.       # ウィンドウ保持指定\holdがあるか?
  337.       @window_hold = (@now_text.gsub!(/\\hold/) { "" } != nil)
  338.             # ウィンドウ保持指定\holdがあるか?
  339.       @window_hol2 = (@now_text.gsub!(/\\hol2/) { "" } != nil)
  340. #======================↑双重对话框功能↑====================================      
  341.       # \vの即時変換
  342.       @now_text.gsub!(/\\[v]\[([0-9]+)\]/) { $game_variables[$1.to_i].to_s }
  343.       # \Vを独自ルーチンに変更(追加部分)
  344.       begin
  345.         last_text = @now_text.clone
  346.         @now_text.gsub!(/\\[V]\[([IiWwAaSs]?)([0-9]+)\]/) { convart_value($1, $2.to_i) }
  347.       end until @now_text == last_text
  348.       @now_text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  349.         $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  350.       end
  351.       # \name 判定
  352.       if @now_text.sub!(/\\[Nn]ame\[(.*?)\]/) { "" }
  353.         @current_name = $1
  354.       end
  355.       # ウィンドウポップ判定
  356.       if @now_text.gsub!(/\\[Pp]\[([0-9]+)\]/) { "" }
  357.         self.pop_character = $1.to_i
  358.       end
  359.       # 改行指定
  360.       if (/\\n/.match(@now_text)) != nil
  361.         $game_temp.choice_start += 1
  362.         @now_text.gsub!(/\\n/) { "\n" }
  363.       end
  364.       # フェード判定
  365.       if @now_text.gsub!(/\\fade/) { "" }
  366.         @fade_count_before_terminate = XRXS9::FOBT_DURATION
  367.       end
  368.       # 素通り判定
  369.       if @now_text.gsub!(/\\pass/) { "" }
  370.         @passable = true
  371.         $game_player.messaging_moving = true
  372.       end
  373.       # 末尾連続改行を削除
  374.       nil while( @now_text.sub!(/\n\n\z/) { "\n" } )
  375.       # 行数の取得
  376.       @lines_max = @now_text.scan(/\n/).size
  377.       # 現在搭載されている制御文字を配列化
  378.       rxs = [/\\\w\[(\w+)\]/, /\\[.]/, /\\[|]/, /\\[>]/, /\\[<]/, /\\[!]/,
  379.               /\\[~]/, /\\/, /\\[Oo]\[([0-9]+)\]/, /\\[Hh]\[([0-9]+)\]/,
  380.               /\\\[([0-9]+)\]/, /\\[Rr]\[(.*?)\]/, /\\[B]/, /\\[I]/]
  381.       @max_choice_x = 0
  382.       # インフォウィンドウの強制センタリング
  383.       @line_aligns[0] = CENTER if @inforesize
  384.       #
  385.       # [行ごとの設定]
  386.       #
  387.       lines = @now_text.split(/\n/)
  388.       for i in 0..@lines_max
  389.         # 行の取得 (インデックスは逆順)
  390.         line = lines[@lines_max - i]
  391.         # 空白行の場合は次へ
  392.         next if line == nil
  393.         # 制御文字を削る
  394.         line.gsub!(/\\[Ee]\[([0-9]+)\]/) { "\022[#{$1}]" }
  395.         for rx in rxs
  396.           line.gsub!(rx) { "" }
  397.         end
  398.         # 位置揃えを取得
  399.         @line_aligns[@lines_max - i] =
  400.           line.sub!(/\\center/) {""} ? CENTER :
  401.           line.sub!(/\\right/)  {""} ? RIGHT :
  402.                                        LEFT
  403.         # 行の横幅の取得と設定
  404.         cx = contents.text_size(line).width
  405.         @line_widths[@lines_max - i] = cx
  406.       end
  407.       # 選択肢行以降の最大横幅を取得
  408.       choices = @line_widths[$game_temp.choice_start, @line_widths.size]
  409.       @max_choice_x = choices == nil ? 0 : choices.max + 8
  410.       # 位置揃え制御文字の削除
  411.       @now_text.gsub!(/\\center/) {""}
  412.       @now_text.gsub!(/\\right/) {""}
  413.       # キャラポップ時のウィンドウリサイズ
  414.       if self.pop_character != nil and self.pop_character >= 0
  415.         max_x = @line_widths.max
  416.         self.width = max_x + 32 + @indent + DEFAULT_FONT_SIZE/2
  417.         self.height = [@lines_max * line_height, @indent].max  + 32
  418.       end
  419.       #
  420.       # 「変換」
  421.       #
  422.       # 便宜上、"\\\\" を "\000" に変換
  423.       @now_text.gsub!(/\\\\/) { "\000" }
  424.       # "\\C" を "\001" に、"\\G" を "\002" に、
  425.       # "\\S" を "\003" に、"\\A" を "\004" に変換
  426.       @now_text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  427.       @now_text.gsub!(/\\[Gg]/) { "\002" }
  428.       @now_text.gsub!(/\\[Ss]\[([0-9]+)\]/) { "\003[#{$1}]" }
  429.       @now_text.gsub!(/\\[Aa]\[(.*?)\]/) { "\004[#{$1}]" }
  430.       @now_text.gsub!(/\\[.]/) { "\005" }
  431.       @now_text.gsub!(/\\[|]/) { "\006" }
  432.       # 競合すると何かと気まずいので、\016以降を使用する
  433.       @now_text.gsub!(/\\[>]/) { "\016" }
  434.       @now_text.gsub!(/\\[<]/) { "\017" }
  435.       @now_text.gsub!(/\\[!]/) { "\020" }
  436.       @now_text.gsub!(/\\[~]/) { "\021" }
  437.       @now_text.gsub!(/\\[Ee]\[([0-9]+)\]/) { "\022[#{$1}]" }
  438.       # インデント設定(追加部分)
  439.       @now_text.gsub!(/\\/) { "\023" }
  440.       # テキスト透過率指定(追加部分)
  441.       @now_text.gsub!(/\\[Oo]\[([0-9]+)\]/) { "\024[#{$1}]" }
  442.       # テキストサイズ指定(追加部分)
  443.       @now_text.gsub!(/\\[Hh]\[([0-9]+)\]/) { "\025[#{$1}]" }
  444.       # 空白挿入(追加部分)
  445.       @now_text.gsub!(/\\\[([0-9]+)\]/) { "\026[#{$1}]" }
  446.       # ルビ表示(追加部分)
  447.       @now_text.gsub!(/\\[Rr]\[(.*?)\]/) { "\027[#{$1}]" }
  448.       # Font.bold
  449.       @now_text.gsub!(/\\[B]/) { "\031" }
  450.       # Font.italic
  451.       @now_text.gsub!(/\\[I]/) { "\032" }
  452.       # ここで一旦ウィンドウ位置更新
  453.       reset_window
  454.       #
  455.       # \nameがあるか?~「ネームウィンドウの作成」
  456.       #
  457.       if @current_name != nil
  458.         # フォントを一時設定
  459.         self.contents.font.size = XRXS9::NAME_WINDOW_TEXT_SIZE
  460.         # 枠だけウィンドウの作成
  461.         x = self.x + XRXS9::NAME_WINDOW_OFFSET_X
  462.         y = self.y + XRXS9::NAME_WINDOW_OFFSET_Y
  463.         w = self.contents.text_size(@current_name).width + 16 + XRXS9::NAME_WINDOW_SPACE
  464.         h = 40 + XRXS9::NAME_WINDOW_SPACE
  465.         @name_window_frame = Window_Base.new(x, y, w, h)
  466.         @name_window_frame.opacity = 0 #【天圣】透明度更改(名字)
  467.         @name_window_frame.z = self.z + 2
  468.         # 擬似的な空中文字描写(ウィンドウ使用)を作成
  469.         x = self.x + XRXS9::NAME_WINDOW_OFFSET_X + 3 + XRXS9::NAME_WINDOW_SPACE / 2
  470.         y = self.y + XRXS9::NAME_WINDOW_OFFSET_Y + 1 + XRXS9::NAME_WINDOW_SPACE / 2
  471.         @name_window_text = Air_Text.new(x,y, @current_name, XRXS9::NAME_WINDOW_TEXT_SIZE, XRXS9::NAME_WINDOW_TEXT_COLOR)
  472.         @name_window_text.z = self.z + 3
  473.         # フォントを復旧
  474.         self.contents.font.size = DEFAULT_FONT_SIZE
  475.         # エクストラウィンドウに登録
  476.         @extra_windows.push(@name_window_frame)
  477.         @extra_windows.push(@name_window_text)
  478.       end
  479.     end
  480.     # ウィンドウを更新
  481.     reset_window
  482.     # コンテンツの再作成
  483.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  484.     self.contents.font.color = normal_color
  485.     self.contents.font.name = DEFAULT_FONT_NAME if DEFAULT_FONT_NAME != ""
  486.     unless @face_file.nil?
  487.       # 顔グラを描画
  488.       src = RPG::Cache.picture(@face_file)
  489.       if @face_index == -1
  490.         w = src.width
  491.         h = src.height
  492.         x = 0
  493.         y = 0
  494.       else
  495.         w = src.width/4
  496.         h = src.height/4
  497.        x = (@face_index-1) % 4 * w
  498.        y = (@face_index-1) / 4 * h
  499.       end
  500.       if FACE_STRETCH_ENABLE
  501.         self.contents.stretch_blt(Rect.new(0,0,FACE_WIDTH,FACE_HEIGHT), src, Rect.new(x, y, w, h))
  502.       else
  503.         self.contents.blt(6, 6, src, Rect.new(x, y, w, h))
  504.       end
  505.     end
  506.     #
  507.     # 選択肢の場合
  508.     #
  509.     if $game_temp.choice_max > 0
  510.       $game_switches[400] = true
  511.       @item_max = $game_temp.choice_max
  512.       self.active = true
  513.       self.index = 0
  514.     else
  515.       $game_switches[400] = false
  516.     end
  517.     #
  518.     # 数値入力の場合
  519.     #
  520.     if $game_temp.num_input_variable_id > 0
  521.       digits_max = $game_temp.num_input_digits_max
  522.       number = $game_variables[$game_temp.num_input_variable_id]
  523.       @input_number_window = Window_InputNumber.new(digits_max)
  524.       @input_number_window.number = number
  525.       @input_number_window.x = self.x + 8 + @indent
  526.       @input_number_window.y = self.y + $game_temp.num_input_start * 32
  527.     end
  528.     # フォントサイズを再設定
  529.     self.contents.font.size  = DEFAULT_FONT_SIZE
  530.     # 行初期化
  531.     line_reset
  532.     # 瞬間表示の場合はこのままフレーム更新へ
  533.     update unless DEFAULT_TYPING_ENABLE
  534.   end
  535.   #--------------------------------------------------------------------------
  536.   # ○ 行初期化
  537.   #--------------------------------------------------------------------------
  538.   def line_reset
  539.     # 位置揃えの取得
  540.     case @line_aligns[@line_index]
  541.     when LEFT
  542.       @x  = @indent
  543.       @x += 8 if $game_temp.choice_start <= @line_index
  544.     when CENTER
  545.       @x = self.width / 2 - 16 - @line_widths[@line_index].to_i / 2
  546.     when RIGHT
  547.       @x = self.width - 40 - @line_widths[@line_index].to_i
  548.     end
  549.   end
  550.   #--------------------------------------------------------------------------
  551.   # ● フレーム更新 [再定義]
  552.   #--------------------------------------------------------------------------
  553.   def update
  554.     # メッセージ素通り中にイベントが開始した場合
  555.     if @passable and not $game_player.messaging_moving
  556.       self.opacity = 0
  557.       terminate_message
  558.       return
  559.     end
  560.     # ポーズサイン
  561.     $pause.update if $pause.visible
  562.     # 呼び戻す
  563.     super
  564.     # フレーム更新↓
  565.     update_main
  566.   end
  567.   #--------------------------------------------------------------------------
  568.   # ○ フレーム更新
  569.   #--------------------------------------------------------------------------
  570.   def update_main
  571.     # 動きに対応
  572.     if !self.pop_character.nil? and self.pop_character >= 0
  573.       update_reset_window
  574.     end
  575.     # フェードインの場合
  576.     if skippable_now? and Input.press?(KEY_MESSAGE_SKIP)
  577.       self.contents_opacity = 255
  578.       @fade_in = false
  579.     elsif @fade_in
  580.       self.contents_opacity += 24
  581.       if @input_number_window != nil
  582.         @input_number_window.contents_opacity += 24
  583.       end
  584.       if self.contents_opacity == 255
  585.         @fade_in = false
  586.       end
  587.       return
  588.     end
  589.     @now_text = nil if @now_text == "" # 変換
  590.     # 表示待ちのメッセージがある場合
  591.     if @now_text != nil and @mid_stop == false
  592.       if @write_wait > 0
  593.         @write_wait -= 1
  594.         return
  595.       end
  596.       text_not_skip = DEFAULT_TYPING_ENABLE
  597.       while true
  598.         # c に 1 文字を取得 (文字が取得できなくなるまでループ)
  599.         if (c = @now_text.slice!(/./m)) != nil
  600.           # \\ の場合
  601.           if c == "\000"
  602.             # 本来の文字に戻す
  603.             c = "\\"
  604.           end
  605.           # \C[n] の場合
  606.           if c == "\001"
  607.             # 文字色を変更
  608.             @now_text.sub!(/\[([0-9]+)\]/, "")
  609.             color = $1.to_i
  610.             if color >= 0 and color <= 7
  611.               self.contents.font.color = text_color(color)
  612.               if @opacity != nil
  613.                 color = self.contents.font.color
  614.                 self.contents.font.color = Color.new(color.red, color.green, color.blue, color.alpha * @opacity / 255)
  615.               end
  616.             end
  617.             # 次の文字へ
  618.             c = ""
  619.           end
  620.           # \G の場合
  621.           if c == "\002"
  622.             # ゴールドウィンドウを作成
  623.             if @gold_window == nil
  624.               @gold_window = Window_Gold.new
  625.               @gold_window.x = 560 - @gold_window.width
  626.               if $game_temp.in_battle
  627.                 @gold_window.y = 192
  628.               else
  629.                 @gold_window.y = self.y >= 128 ? 32 : 384
  630.               end
  631.               @gold_window.opacity = self.opacity
  632.               @gold_window.back_opacity = self.back_opacity
  633.             end
  634.             # 次の文字へ
  635.             c = ""
  636.           end
  637.           # \S[n] の場合
  638.           if c == "\003"
  639.             # 文字色を変更
  640.             @now_text.sub!(/\[([0-9]+)\]/, "")
  641.             speed = $1.to_i
  642.             if speed >= 0 and speed <= 19
  643.               @write_speed = speed
  644.             end
  645.             # 次の文字へ
  646.             c = ""
  647.           end
  648.           # \. の場合
  649.           if c == "\005"
  650.             @write_wait += 5
  651.             c = ""
  652.           end
  653.           # \| の場合
  654.           if c == "\006"
  655.             @write_wait += 20
  656.             c = ""
  657.           end
  658.           # \> の場合
  659.           if c == "\016"
  660.             text_not_skip = false
  661.             c = ""
  662.           end
  663.           # \<の場合
  664.           if c == "\017"
  665.             text_not_skip = true
  666.             c = ""
  667.           end
  668.           # \!の場合
  669.           if c == "\020"
  670.             @mid_stop = true
  671.             c = ""
  672.           end
  673.           # \~の場合
  674.           if c == "\021"
  675.             terminate_message
  676.             return
  677.           end
  678.           # \Iの場合(追加部分)
  679.           if c == "\023"
  680.             # 今の@xをインデント位置に設定
  681.             @indent = @x
  682.             c = ""
  683.           end
  684.           # \Oの場合(追加部分)
  685.           if c == "\024"
  686.             @now_text.sub!(/\[([0-9]+)\]/, "")
  687.             @opacity = $1.to_i
  688.             color = self.contents.font.color
  689.             self.contents.font.color = Color.new(color.red, color.green, color.blue, color.alpha * @opacity / 255)
  690.             c = ""
  691.           end
  692.           # \Hの場合(追加部分)
  693.           if c == "\025"
  694.             @now_text.sub!(/\[([0-9]+)\]/, "")
  695.             self.contents.font.size = [[$1.to_i, 6].max, 32].min
  696.             c = ""
  697.           end
  698.           # \Bの場合(追加部分)
  699.           if c == "\026"
  700.             @now_text.sub!(/\[([0-9]+)\]/, "")
  701.             @x += $1.to_i
  702.             c = ""
  703.           end
  704.           # \Rの場合「ルビ」
  705.           if c == "\027"
  706.             process_ruby
  707.             # 文字描写のSEを演奏
  708.             $game_system.speak_se_play
  709.             c = ""
  710.           end
  711.           # アイコン描画用シーケンスの場合(追加部分)
  712.           if c == "\030"
  713.             # アイコンファイル名を取得
  714.             @now_text.sub!(/\[(.*?)\]/, "")
  715.             # アイコンを描画
  716.             self.contents.blt(@x , @y * line_height + 8, RPG::Cache.icon($1), Rect.new(0, 0, 24, 24))
  717.             @x += 24
  718.             # 次の文字へ
  719.             c = ""
  720.           end
  721.           #
  722.           # 改行文字の場合
  723.           #
  724.           if c == "\n"
  725.             # y に 1 を加算
  726.             @y += 1
  727.             #
  728.             # 次の行へ (改行処理 + X位置設定)
  729.             #
  730.             @line_index += 1
  731.             line_reset
  732.             # 選択肢ならカーソルの更新
  733.             if @line_index >= $game_temp.choice_start
  734.               @cursor_width = @max_choice_x
  735.             end
  736.             # 次の文字へ
  737.             c = ""
  738.           end
  739.           # 外字表示の場合
  740.           if c == "\022"
  741.             # []部分の除去
  742.             @now_text.sub!(/\[([0-9]+)\]/, "")
  743.             # 外字を表示(sr)
  744.             @x += draw_gaiji(16 + 4 + @x, 6+@y * line_height + (line_height - self.contents.font.size), $1.to_i)
  745.             # 次の文字へ
  746.             c = ""
  747.           end
  748.           # Font.boldの場合 (排他的論理和での反転)
  749.           if c == "\031"
  750.             self.contents.font.bold ^= true
  751.             c = ""
  752.           end
  753.           # Font.italicの場合
  754.           if c == "\032"
  755.             self.contents.font.italic ^= true
  756.             c = ""
  757.           end
  758.           if c != ""
  759.             # 文字を描画(sr)
  760.             self.contents.draw_text(16 + 4 +@x, 6+line_height * @y, 40, line_height, c)
  761.             @x += self.contents.text_size(c).width
  762.             # 文字描写のSEを演奏
  763.             unless NOT_SOUND_CHARACTERS.include?(c)
  764.               $game_system.speak_se_play
  765.             end
  766.           end
  767.           # Bボタンが押された場合
  768.           if skippable_now? and
  769.             (Input.press?(KEY_SHOW_ALL) or Input.press?(KEY_MESSAGE_SKIP)) and
  770.             (SKIP_BAN_SWITCH_ID == 0 ? true : !$game_switches[SKIP_BAN_SWITCH_ID])
  771.             text_not_skip = false
  772.           end
  773.         else
  774.           text_not_skip = true
  775.           break
  776.         end
  777.         # 終了判定
  778.         break if text_not_skip
  779.       end
  780.       @write_wait += @write_speed
  781.       return
  782.     end
  783.     # 数値入力中の場合
  784.     if @input_number_window != nil
  785.       @input_number_window.update
  786.       # 決定
  787.       if Input.trigger?(Input::C)
  788.         $game_system.se_play($data_system.decision_se)
  789.         $game_variables[$game_temp.num_input_variable_id] = @input_number_window.number
  790.         $game_map.need_refresh = true
  791.         # 数値入力ウィンドウを解放
  792.         @input_number_window.dispose
  793.         @input_number_window = nil
  794.         terminate_message
  795.       end
  796.       return
  797.     end
  798.     #
  799.     # メッセージ表示中の場合
  800.     #
  801.     if @contents_showing
  802.       # 終了前フェーズでない場合
  803.       unless @fade_phase_before_terminate
  804.         # 選択肢の表示中でなければポーズサインを表示
  805.         if $game_temp.choice_max == 0
  806.           $pause.visible = true
  807.         end
  808.         # キャンセル
  809.       if Input.trigger?(Input::B)
  810.      unless  $game_system.menu_disabled
  811.      $game_system.map_interpreter.index -= 1 unless $game_system.map_interpreter.index <= 0 #BB:事件解释器index往前跳
  812.       while($game_system.map_interpreter.list[$game_system.map_interpreter.index].code == 401)
  813.         $game_system.map_interpreter.index -= 1
  814.       end
  815.       while($game_system.map_interpreter.list[$game_system.map_interpreter.index].code == 402)
  816.         $game_system.map_interpreter.index -= 1
  817.       end
  818.          $scene = Scene_Menu.new
  819.          return
  820.        end
  821.        end
  822.         # 決定
  823.         if Input.trigger?(Input::C) or
  824.            (skippable_now? and Input.press?(KEY_MESSAGE_SKIP))
  825.           if $game_temp.choice_max > 0
  826.             $game_system.se_play($data_system.decision_se)
  827.             $game_temp.choice_proc.call(self.index)
  828.           end
  829.           if @mid_stop
  830.             @mid_stop = false
  831.             $pause.visible = false
  832.             return
  833.           elsif @fade_count_before_terminate.to_i > 0
  834.             # 終了前フェーズへ
  835.             @fade_phase_before_terminate = true
  836.           else
  837.             terminate_message
  838.           end
  839.           $pause.visible = false
  840.         end
  841.       end
  842.       # 終了前:カウント + フェードアウト
  843.       if @fade_phase_before_terminate
  844.         # 例外補正
  845.         @fade_count_before_terminate  = 0 if @fade_count_before_terminate == nil
  846.         # カウント
  847.         @fade_count_before_terminate -= 1
  848.         # 不透明度を計算・設定
  849.         opacity = @fade_count_before_terminate * (256 / XRXS9::FOBT_DURATION)
  850.         self.contents_opacity = opacity
  851.         # 終了判定
  852.         if @fade_count_before_terminate <= 0
  853.           @fade_count_before_terminate = 0
  854.           @fade_phase_before_terminate = false
  855.           terminate_message
  856.         end
  857.       end
  858.       return
  859.     end
  860.     #
  861.     # 以下、メッセージ表示中でない場合
  862.     #
  863.     # フェードアウト中以外で表示待ちのメッセージか選択肢がある場合
  864.     if @fade_out == false and $game_temp.message_text != nil
  865.       @contents_showing = true
  866.       $game_temp.message_window_showing = true
  867.       refresh
  868.       Graphics.frame_reset
  869.       self.visible = true
  870.       self.contents_opacity = 0
  871.       if @input_number_window != nil
  872.         @input_number_window.contents_opacity = 0
  873.       end
  874.       @fade_in = true
  875.       return
  876.     end
  877.     # 表示すべきメッセージがないが、ウィンドウが可視状態の場合
  878.     if self.visible
  879.       @fade_out = true
  880.       self.opacity -= 48
  881.       if self.opacity == 0
  882.         self.visible = false
  883.         @fade_out = false
  884.         $game_temp.message_window_showing = false
  885.       end
  886.       return
  887.     end
  888.   end
  889.   #--------------------------------------------------------------------------
  890.   # ● 设置窗口位置与不透明度[再定義]
  891.   #--------------------------------------------------------------------------
  892.   def reset_window
  893.     if @inforesize
  894.       RectalCopy.copy(self, INFO_RECT)
  895.     elsif self.pop_character != nil and self.pop_character >= 0
  896.       update_reset_window
  897.     else
  898.       RectalCopy.copy(self, DEFAULT_RECT)
  899.       #
  900.       case ($game_temp.in_battle ? 0 : $game_system.message_position)
  901.       when 0  # 上 (戦闘中は上扱い)
  902.         self.y = [16, -XRXS9::NAME_WINDOW_OFFSET_Y + 4].max
  903.  
  904.       when 1  # 中
  905.         self.y = 200
  906.  
  907.       end
  908.       # 自動リサイズ
  909.       if DEFAULT_STRETCH_ENABLE and @lines_max >= 4
  910.         # 拡張する差分を計算
  911.         d = @lines_max * DEFAULT_LINE_SPACE + 32 - self.height
  912.         if d > 0
  913.           self.height += d
  914.           case $game_system.message_position
  915.           when 1  # 中
  916.             self.y -= d/2
  917.  
  918.           when 2  # 下
  919.             self.y -= d
  920.  
  921.           end
  922.         end
  923.       end
  924.       if @face_file != nil
  925.         self.width += FACE_WIDTH
  926.         self.x -= FACE_WIDTH/2
  927.       end
  928.     end
  929.     if $game_system.message_frame == 0
  930.       self.back_opacity = DEFAULT_BACK_OPACITY
  931.       @name_window_frame.back_opacity = DEFAULT_BACK_OPACITY unless @name_window_frame.nil?
  932.     else
  933.       self.opacity = 0
  934.       @name_window_frame.back_opacity = 0 unless @name_window_frame.nil?
  935.     end
  936.   end
  937.   #--------------------------------------------------------------------------
  938.   # ○ ウィンドウの位置と不透明度の設定 (キャラポップ)
  939.   #--------------------------------------------------------------------------
  940.   def update_reset_window
  941.     #
  942.     # 「キャラポップ」
  943.     #
  944.     if self.pop_character == 0 or $game_map.events[self.pop_character] != nil
  945.       character = get_character(self.pop_character)
  946.       x = character.screen_x - self.width / 2
  947.       case $game_system.message_position
  948.       when 0
  949.         if @name_window_frame != nil and @name_window_frame.y <= 4
  950.           y = 4 - XRXS9::NAME_WINDOW_OFFSET_Y
  951.         else
  952.           y = character.screen_y - CHARPOP_HEIGHT - self.height
  953.         end
  954.       else
  955.         y = character.screen_y
  956.       end
  957.       self.x = [[x, 4].max, 636 - self.width ].min
  958.       self.y = [[y, 4].max, 476 - self.height].min
  959.       if  @name_window_frame != nil
  960.         @name_window_frame.x = self.x + XRXS9::NAME_WINDOW_OFFSET_X
  961.         @name_window_frame.y = self.y + XRXS9::NAME_WINDOW_OFFSET_Y
  962.         @name_window_text.x  = self.x + XRXS9::NAME_WINDOW_OFFSET_X + 1 + XRXS9::NAME_WINDOW_SPACE/2 - 16
  963.         @name_window_text.y  = self.y + XRXS9::NAME_WINDOW_OFFSET_Y + 1 + XRXS9::NAME_WINDOW_SPACE/2 - 16
  964.       end
  965.     end
  966.   end
  967.   #--------------------------------------------------------------------------
  968.   # ○ カーソルの矩形更新 [オーバーライド]
  969.   #--------------------------------------------------------------------------
  970.   def update_cursor_rect
  971.     if @index >= 0
  972.       n = $game_temp.choice_start + @index #【天圣】选择项间距
  973.       self.cursor_rect.set(16 + 8 + @indent, 6 + (n * line_height), @cursor_width, line_height)
  974.     else
  975.       self.cursor_rect.empty
  976.     end
  977.   end
  978.   #--------------------------------------------------------------------------
  979.   # ○ キャラクターの取得
  980.   #     parameter : パラメータ
  981.   #--------------------------------------------------------------------------
  982.   def get_character(parameter)
  983.     # パラメータで分岐
  984.     case parameter
  985.     when 0  # プレイヤー
  986.       return $game_player
  987.     else  # 特定のイベント
  988.       events = $game_map.events
  989.       return events == nil ? nil : events[parameter]
  990.     end
  991.   end
  992.   #--------------------------------------------------------------------------
  993.   # ○ 現在キースキップが可能か?
  994.   #--------------------------------------------------------------------------
  995.   def skippable_now?
  996.     return ((SKIP_BAN_SWITCH_ID == 0 ? true : !$game_switches[SKIP_BAN_SWITCH_ID]) and
  997.        (HISKIP_ENABLE_SWITCH_ID == 0 ? true : $game_switches[HISKIP_ENABLE_SWITCH_ID]))
  998.   end
  999.   #--------------------------------------------------------------------------
  1000.   # ○ 可視状態
  1001.   #--------------------------------------------------------------------------
  1002.   def visible=(b)
  1003.     @name_window_frame.visible = b unless @name_window_frame.nil?
  1004.     @name_window_text.visible  = b unless @name_window_text.nil?
  1005.     @input_number_window.visible  = b unless @input_number_window.nil?
  1006.     super
  1007.   end
  1008.   #--------------------------------------------------------------------------
  1009.   # メソッド テンプレート
  1010.   #--------------------------------------------------------------------------
  1011.   def process_ruby
  1012.   end
  1013.   def draw_gaiji(x, y, num)
  1014.   end
  1015.   def convart_value(option, index)
  1016.   end
  1017. end
  1018. #==============================================================================
  1019. # □ Air_Text (何も無いところに文字描写 = 枠の無い瞬間表示メッセージウィンドウ)
  1020. #==============================================================================
  1021. class Air_Text < Window_Base
  1022.   #--------------------------------------------------------------------------
  1023.   # ○ オブジェクト初期化
  1024.   #--------------------------------------------------------------------------
  1025.   def initialize(x, y, designate_text, size, text_color)
  1026.     super(x-16, y-16, 32 + designate_text.size * 12, 56)
  1027.     self.opacity      = 0
  1028.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  1029.     w = self.contents.width
  1030.     h = self.contents.height
  1031.     self.contents.font.size = size
  1032.     self.contents.font.color = text_color
  1033.     self.contents.draw_text(0, 0, w, h, designate_text)
  1034.   end
  1035. end
  1036. #==============================================================================
  1037. # □ Window_Copy
  1038. #------------------------------------------------------------------------------
  1039. #   指定のウィンドウのコピーを作成します。
  1040. #==============================================================================
  1041. class Window_Copy < Window_Base
  1042.   #--------------------------------------------------------------------------
  1043.   # ○ オブジェクト初期化
  1044.   #--------------------------------------------------------------------------
  1045.   def initialize(window)
  1046.     super(window.x, window.y, window.width, window.height)
  1047.     self.contents = window.contents.dup unless window.contents.nil?
  1048.     self.opacity = window.opacity
  1049.     self.back_opacity = window.back_opacity
  1050.     self.z = window.z
  1051.   end
  1052. end
  1053. #======================↓双重对话框功能↓====================================
  1054. class Window_Copy2 < Window_Base
  1055.   #--------------------------------------------------------------------------
  1056.   # ○ オブジェクト初期化
  1057.   #--------------------------------------------------------------------------
  1058.   def initialize(window)
  1059.     super(window.x, window.y, window.width, window.height)
  1060.     self.contents = window.contents.dup unless window.contents.nil?
  1061.     self.opacity = window.opacity
  1062.     self.back_opacity = window.back_opacity
  1063.     self.z = window.z
  1064.   end
  1065. end
  1066. #======================↑双重对话框功能↑=====================================
  1067. #==============================================================================
  1068. # □ Sprite_Copy
  1069. #------------------------------------------------------------------------------
  1070. #   指定のスプライトのコピーを作成します。
  1071. #==============================================================================
  1072. class Sprite_Copy < Sprite
  1073.   #--------------------------------------------------------------------------
  1074.   # ○ オブジェクト初期化
  1075.   #--------------------------------------------------------------------------
  1076.   def initialize(sprite)
  1077.     super()
  1078.     self.bitmap = sprite.bitmap.dup unless sprite.bitmap.nil?
  1079.     self.opacity = sprite.opacity
  1080.     self.x = sprite.x
  1081.     self.y = sprite.y
  1082.     self.z = sprite.z
  1083.     self.ox = sprite.ox
  1084.     self.oy = sprite.oy
  1085.   end
  1086. end
  1087. #==============================================================================
  1088. # ■ Interpreter
  1089. #==============================================================================
  1090. class Interpreter
  1091.   #--------------------------------------------------------------------------
  1092.   # ● 文章の表示
  1093.   #--------------------------------------------------------------------------
  1094.   def command_101
  1095.     # ほかの文章が message_text に設定済みの場合
  1096.     if $game_temp.message_text != nil
  1097.       # 終了
  1098.       return false
  1099.     end
  1100.     # メッセージ終了待機中フラグおよびコールバックを設定
  1101.     @message_waiting = true
  1102.     $game_temp.message_proc = Proc.new { @message_waiting = false }
  1103.     # message_text に 1 行目を設定
  1104.     $game_temp.message_text = @list[@index].parameters[0] + "\n"
  1105.     line_count = 1
  1106.     # ループ
  1107.     loop do
  1108.       # 次のイベントコマンドが文章 2 行目以降の場合
  1109.       if @list[@index+1].code == 401
  1110.         # message_text に 2 行目以降を追加
  1111.         $game_temp.message_text += @list[@index+1].parameters[0] + "\n"
  1112.         line_count += 1
  1113.       # イベントコマンドが文章 2 行目以降ではない場合
  1114.       else
  1115.         # 次のイベントコマンドが文章の表示の場合
  1116.         if @list[@index+1].code == 101
  1117.           if (/\\next\Z/.match($game_temp.message_text)) != nil
  1118.             $game_temp.message_text.gsub!(/\\next/) { "" }
  1119.             $game_temp.message_text += @list[@index+1].parameters[0] + "\n"
  1120.             # インデックスを進める
  1121.             @index += 1
  1122.             next
  1123.           end
  1124.         # 次のイベントコマンドが選択肢の表示の場合
  1125.         elsif @list[@index+1].code == 102
  1126.           # 選択肢が画面に収まる場合
  1127.           if @list[@index+1].parameters[0].size <= 4 - line_count
  1128.             # インデックスを進める
  1129.             @index += 1
  1130.             # 選択肢のセットアップ
  1131.             $game_temp.choice_start = line_count
  1132.             setup_choices(@list[@index].parameters)
  1133.           end
  1134.         # 次のイベントコマンドが数値入力の処理の場合
  1135.         elsif @list[@index+1].code == 103
  1136.           # 数値入力ウィンドウが画面に収まる場合
  1137.           if line_count < 4
  1138.             # インデックスを進める
  1139.             @index += 1
  1140.             # 数値入力のセットアップ
  1141.             $game_temp.num_input_start = line_count
  1142.             $game_temp.num_input_variable_id = @list[@index].parameters[0]
  1143.             $game_temp.num_input_digits_max = @list[@index].parameters[1]
  1144.           end
  1145.         end
  1146.         # 継続
  1147.         return true
  1148.       end
  1149.       # インデックスを進める
  1150.       @index += 1
  1151.     end
  1152.   end
  1153. end
  1154. #==============================================================================
  1155. # --- メッセージ中移動許可 ---
  1156. #==============================================================================
  1157. class Game_Player < Game_Character
  1158.   attr_accessor :messaging_moving
  1159. end
  1160. #==============================================================================
  1161. # --- 範囲コピー ---
  1162. #==============================================================================
  1163. module RectalCopy
  1164.   def self.copy(rect1, rect2)
  1165.     rect1.x      = rect2.x
  1166.     rect1.y      = rect2.y
  1167.     rect1.width  = rect2.width
  1168.     rect1.height = rect2.height
  1169.   end
  1170. end
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

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

GMT+8, 2024-4-23 22:23

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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