Changed: PokemonField @@ -1274,1 +1274,1 @@ - Kernel.pbMessage(_INTL("{1} scurried to a Pokemon Center, protecting the exhausted and fainted Pokemon from further harm.",$Trainer.name)) + Kernel.pbMessage(_INTL("\\w[]\\wm\\c[8]\\l[3]{1} scurried to a Pokemon Center, protecting the exhausted and fainted Pokemon from further harm.",$Trainer.name)) @@ -1284,1 +1284,1 @@ - Kernel.pbMessage(_INTL("{1} scurried home, protecting the exhausted and fainted Pokemon from further harm.",$Trainer.name)) + Kernel.pbMessage(_INTL("\\w[]\\wm\\c[8]\\l[3]{1} scurried home, protecting the exhausted and fainted Pokemon from further harm.",$Trainer.name)) Changed: PokemonMessages @@ -518,1 +518,5 @@ - cmdwindow.y-=msgwindow.height + if msgwindow.y==0 + cmdwindow.y=msgwindow.height + else + cmdwindow.y-=msgwindow.height + end @@ -705,0 +709,20 @@ +def pbRepositionMessageWindow + if $game_temp && $game_temp.in_battle + msgwindow.y=0 + elsif $game_system && $game_system.respond_to?("message_position") + case $game_system.message_position + when 0 # up + msgwindow.y=0 + when 1 # middle + msgwindow.y=(Graphics.height/2)-(msgwindow.height/2) + when 2 + msgwindow.y=(Graphics.height)-(msgwindow.height) + end + end + if $game_system && $game_system.respond_to?("message_frame") + if $game_system.message_frame != 0 + msgwindow.opacity = 0 + end + end +end + @@ -725,21 +749,1 @@ - msgwindow.height=32*2+msgwindow.borderY - facetop=false - if $game_temp && $game_temp.in_battle - msgwindow.y=0 - facetop=true - elsif $game_system && $game_system.respond_to?("message_position") - case $game_system.message_position - when 0 # up - msgwindow.y=0 - facetop=true - when 1 # middle - msgwindow.y=(Graphics.height/2)-(msgwindow.height/2) - when 2 - msgwindow.y=(Graphics.height)-(msgwindow.height) - end - end - if $game_system && $game_system.respond_to?("message_frame") - if $game_system.message_frame != 0 - msgwindow.opacity = 0 - end - end + linecount=(Graphics.height>420) ? 3 : 2 @@ -774,0 +778,7 @@ + begin + last_text = text.clone + text.gsub!(/\\[Ll]\[([0-9]+)\]/) { + linecount=[1,$1.to_i].max; + next "" + } + end until text == last_text @@ -777,1 +788,1 @@ - while text[/(?:\\([WwFf]|[Mm][Ee]|[Ss][Ee]|[Ww][Tt]|[Ww][Tt][Nn][Pp]|[Cc][Hh])\[([^\]]*)\]|\\([Gg])())/] + while text[/(?:\\([WwFf]|[Mm][Ee]|[Ss][Ee]|[Ww][Tt]|[Ww][Tt][Nn][Pp]|[Cc][Hh])\[([^\]]*)\]|\\([Gg]|[Ww][Dd]|[Ww][Mm]|[Ww][Uu])())/i] @@ -800,0 +811,1 @@ + facewindow.dispose if facewindow @@ -801,8 +813,0 @@ - pbBottomLeft(facewindow) - if facetop - facewindow.y=msgwindow.height - else - facewindow.y-=msgwindow.height - end - facewindow.viewport=msgwindow.viewport - facewindow.z=msgwindow.z @@ -822,0 +826,33 @@ + ########## Position message window ############## + msgwindow.height=32*linecount+msgwindow.borderY + facetop=false + if $game_temp && $game_temp.in_battle + msgwindow.y=0 + facetop=true + elsif $game_system && $game_system.respond_to?("message_position") + case $game_system.message_position + when 0 # up + msgwindow.y=0 + facetop=true + when 1 # middle + msgwindow.y=(Graphics.height/2)-(msgwindow.height/2) + when 2 + msgwindow.y=(Graphics.height)-(msgwindow.height) + end + end + if $game_system && $game_system.respond_to?("message_frame") + if $game_system.message_frame != 0 + msgwindow.opacity = 0 + end + end + if facewindow + pbBottomLeft(facewindow) + if facetop + facewindow.y=msgwindow.height + else + facewindow.y-=msgwindow.height + end + facewindow.viewport=msgwindow.viewport + facewindow.z=msgwindow.z + end + ########## Show text ############################# @@ -843,0 +880,6 @@ + elsif control=="wu" + msgwindow.y=0 + elsif control=="wm" + msgwindow.y=(Graphics.height/2)-(msgwindow.height/2) + elsif control=="wd" + msgwindow.y=(Graphics.height)-(msgwindow.height) @@ -1170,0 +1213,7 @@ +def pbToneChangeAll(tone, duration) + $game_screen.start_tone_change(tone,duration * 2) + for picture in $game_screen.pictures + picture.start_tone_change(tone,duration * 2) if picture + end +end + Changed: SpriteWindow @@ -17,1 +17,5 @@ - return "Audio/SE/Choose.wav" + if $data_system.decision_se.name=="" + return "Audio/SE/Choose.wav" + else + return "Audio/SE/"+$data_system.decision_se.name + end @@ -323,0 +327,2 @@ + sprites[planename]=Plane.new(viewport) + havebitmap=false @@ -325,0 +331,1 @@ + havebitmap=true @@ -326,7 +333,10 @@ - return - end - sprites[planename]=Plane.new(viewport) - sprites[planename].bitmap=bitmap - for spr in sprites.values - if spr.is_a?(Window) - spr.windowskin=nil + # Plane should exist in any case + sprites[planename].bitmap=nil + sprites[planename].visible=false + end + if havebitmap + sprites[planename].bitmap=bitmap + for spr in sprites.values + if spr.is_a?(Window) + spr.windowskin=nil + end @@ -1860,0 +1870,1 @@ + @lastDrawnChar=-1 @@ -1920,0 +1931,1 @@ + @nodraw=@letterbyletter @@ -1959,0 +1971,1 @@ + @nodraw=false @@ -1964,0 +1977,2 @@ + @lastDrawnChar=-1 + @fmtchars=[] @@ -2043,0 +2058,4 @@ + if @nodraw + @nodraw=false + return + end @@ -2046,6 +2065,7 @@ - next if i>=@fmtchars.length - if !self.letterbyletter - next if @fmtchars[i][1]>=maxX - next if @fmtchars[i][2]>=maxY - end - drawSingleFormattedChar(self.contents,@fmtchars[i]) + next if i>=@fmtchars.length + if !self.letterbyletter + next if @fmtchars[i][1]>=maxX + next if @fmtchars[i][2]>=maxY + end + drawSingleFormattedChar(self.contents,@fmtchars[i]) + @lastDrawnChar=i @@ -2065,2 +2085,4 @@ - if @drawncurchar>=@fmtchars.length - fch=@textlength + if @lastDrawnChar<0 + return 0 + elsif @lastDrawnChar>=@fmtchars.length + return @numtextchars @@ -2068,1 +2090,2 @@ - fch=@fmtchars[@drawncurchar][14] + # index after the last character's index + return @fmtchars[@lastDrawnChar][14]+1 Changed: PokemonField Changed: PokemonMessages Changed: SpriteWindow