mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Removed all excess whitespace and standardized line endings.
This commit is contained in:
@@ -179,12 +179,12 @@ module RTP
|
||||
# Gets the absolute RGSS paths for the given file name
|
||||
def self.eachPathFor(filename)
|
||||
return if !filename
|
||||
if filename[/^[A-Za-z]\:[\/\\]/] || filename[/^[\/\\]/]
|
||||
if filename[/^[A-Za-z]\:[\/\\]/] || filename[/^[\/\\]/]
|
||||
# filename is already absolute
|
||||
yield filename
|
||||
else
|
||||
# relative path
|
||||
RTP.eachPath { |path|
|
||||
RTP.eachPath { |path|
|
||||
if path=="./"
|
||||
yield filename
|
||||
else
|
||||
@@ -423,7 +423,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
module MiniRegistry
|
||||
HKEY_CLASSES_ROOT = 0x80000000
|
||||
@@ -455,7 +455,7 @@ module MiniRegistry
|
||||
def self.close(hkey); check(RegCloseKey.call(hkey)) if hkey; end
|
||||
|
||||
def self.get(hkey,subkey,name,defaultValue=nil,bit64=false)
|
||||
self.open(hkey,subkey,bit64) { |key|
|
||||
self.open(hkey,subkey,bit64) { |key|
|
||||
return self.read(key,name) rescue defaultValue
|
||||
}
|
||||
return defaultValue
|
||||
@@ -654,4 +654,4 @@ module ::Marshal
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -22,7 +22,7 @@ def canonicalize(c)
|
||||
if x=="."
|
||||
elsif x==".."
|
||||
if pos>=0
|
||||
ret.delete_at(pos)
|
||||
ret.delete_at(pos)
|
||||
pos -= 1
|
||||
end
|
||||
else
|
||||
@@ -141,7 +141,7 @@ class WeakHashtable
|
||||
def [](key)
|
||||
o=@hash[key]
|
||||
return o if !o
|
||||
if o.weakref_alive?
|
||||
if o.weakref_alive?
|
||||
o=o.__getobj__
|
||||
else
|
||||
@hash.delete(key)
|
||||
@@ -494,4 +494,4 @@ module BitmapCache
|
||||
@cache = {}
|
||||
GC.start
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -414,7 +414,7 @@ class Window
|
||||
@sprites["cursor"].visible=false
|
||||
end
|
||||
for i in @sprites
|
||||
i[1].z=@z
|
||||
i[1].z=@z
|
||||
end
|
||||
if @rpgvx
|
||||
@sprites["cursor"].z=@z # For Compatibility
|
||||
@@ -526,23 +526,23 @@ class Window
|
||||
@cursorbitmap.clear
|
||||
@sprites["cursor"].bitmap=@cursorbitmap
|
||||
@sprites["cursor"].src_rect.set(0,0,width,height)
|
||||
rect = Rect.new(margin,margin,
|
||||
rect = Rect.new(margin,margin,
|
||||
width - fullmargin, height - fullmargin)
|
||||
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[8])
|
||||
@cursorbitmap.blt(0, 0, @_windowskin, cursorrects[4])# top left
|
||||
@cursorbitmap.blt(width-margin, 0, @_windowskin, cursorrects[5]) # top right
|
||||
@cursorbitmap.blt(0, height-margin, @_windowskin, cursorrects[6]) # bottom right
|
||||
@cursorbitmap.blt(width-margin, height-margin, @_windowskin, cursorrects[7]) # bottom left
|
||||
rect = Rect.new(margin, 0,
|
||||
rect = Rect.new(margin, 0,
|
||||
width - fullmargin, margin)
|
||||
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[0])
|
||||
rect = Rect.new(0, margin,
|
||||
rect = Rect.new(0, margin,
|
||||
margin, height - fullmargin)
|
||||
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[1])
|
||||
rect = Rect.new(width - margin, margin,
|
||||
rect = Rect.new(width - margin, margin,
|
||||
margin, height - fullmargin)
|
||||
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[2])
|
||||
rect = Rect.new(margin, height-margin,
|
||||
rect = Rect.new(margin, height-margin,
|
||||
width - fullmargin, margin)
|
||||
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[3])
|
||||
else
|
||||
@@ -605,4 +605,4 @@ class Window
|
||||
sprite.oy=(sprite.zoom_y<=0) ? 0 : (i-y)/sprite.zoom_y
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -208,7 +208,7 @@ def pbRepositionMessageWindow(msgwindow, linecount=2)
|
||||
case $game_message.background
|
||||
when 1; msgwindow.opacity=0 # dim
|
||||
when 2; msgwindow.opacity=0 # transparent
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -218,7 +218,7 @@ def pbUpdateMsgWindowPos(msgwindow,event,eventChanged=false)
|
||||
if eventChanged
|
||||
msgwindow.resizeToFit2(msgwindow.text,Graphics.width*2/3,msgwindow.height)
|
||||
end
|
||||
msgwindow.y=event.screen_y-48-msgwindow.height
|
||||
msgwindow.y=event.screen_y-48-msgwindow.height
|
||||
if msgwindow.y<0
|
||||
msgwindow.y=event.screen_y+24
|
||||
end
|
||||
@@ -231,7 +231,7 @@ def pbUpdateMsgWindowPos(msgwindow,event,eventChanged=false)
|
||||
curwidth=msgwindow.width
|
||||
if curwidth!=Graphics.width
|
||||
msgwindow.width=Graphics.width
|
||||
msgwindow.width=Graphics.width
|
||||
msgwindow.width=Graphics.width
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -467,7 +467,7 @@ end
|
||||
def pbUpdateSpriteHash(windows)
|
||||
for i in windows
|
||||
window=i[1]
|
||||
if window
|
||||
if window
|
||||
if window.is_a?(Sprite) || window.is_a?(Window)
|
||||
window.update if !pbDisposed?(window)
|
||||
elsif window.is_a?(Plane)
|
||||
@@ -636,7 +636,7 @@ def pbFadeInAndShow(sprites,visiblesprites=nil)
|
||||
for j in 0..numFrames
|
||||
pbSetSpritesToColor(sprites,Color.new(0,0,0,((numFrames-j)*alphaDiff)))
|
||||
(block_given?) ? yield : pbUpdateSpriteHash(sprites)
|
||||
end
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
@@ -754,7 +754,7 @@ if !defined?(_INTL)
|
||||
for i in 1...args.length
|
||||
string.gsub!(/\{#{i}\}/,"#{args[i]}")
|
||||
end
|
||||
return string
|
||||
return string
|
||||
end
|
||||
end
|
||||
|
||||
@@ -776,6 +776,6 @@ if !defined?(_MAPINTL)
|
||||
for i in 2...args.length
|
||||
string.gsub!(/\{#{i}\}/,"#{args[i+1]}")
|
||||
end
|
||||
return string
|
||||
return string
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class SpriteWindowCursorRect < Rect
|
||||
def initialize(window)
|
||||
@@ -95,7 +95,7 @@ class SpriteWindow < Window
|
||||
|
||||
# Flags used to preserve compatibility
|
||||
# with RGSS/RGSS2's version of Window
|
||||
module CompatBits
|
||||
module CompatBits
|
||||
CorrectZ = 1
|
||||
ExpandBack = 2
|
||||
ShowScrollArrows = 4
|
||||
@@ -437,7 +437,7 @@ class SpriteWindow < Window
|
||||
|
||||
def skinformat=(value)
|
||||
if @skinformat!=value
|
||||
@skinformat=value
|
||||
@skinformat=value
|
||||
privRefresh(true)
|
||||
end
|
||||
end
|
||||
@@ -573,9 +573,9 @@ class SpriteWindow < Window
|
||||
hascontents=(@contents && !@contents.disposed?)
|
||||
@sprites["back"].visible=@visible
|
||||
@sprites["contents"].visible=@visible && @openness==255
|
||||
@sprites["pause"].visible=supported && @visible && @pause &&
|
||||
@sprites["pause"].visible=supported && @visible && @pause &&
|
||||
(@combat & CompatBits::ShowPause)
|
||||
@sprites["cursor"].visible=supported && @visible && @openness==255 &&
|
||||
@sprites["cursor"].visible=supported && @visible && @openness==255 &&
|
||||
(@combat & CompatBits::ShowCursor)
|
||||
@sprites["scroll0"].visible = false
|
||||
@sprites["scroll1"].visible = false
|
||||
@@ -698,7 +698,7 @@ class SpriteWindow < Window
|
||||
@sprites["contents"].y=@y+trimStartY
|
||||
if (@compat & CompatBits::ShowScrollArrows)>0 && @skinformat==0
|
||||
# Compatibility mode: Make scroll arrows visible
|
||||
if @skinformat==0 && @_windowskin && !@_windowskin.disposed? &&
|
||||
if @skinformat==0 && @_windowskin && !@_windowskin.disposed? &&
|
||||
@contents && !@contents.disposed?
|
||||
@sprites["scroll0"].visible = @visible && hascontents && @oy > 0
|
||||
@sprites["scroll1"].visible = @visible && hascontents && @ox > 0
|
||||
@@ -887,7 +887,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class SpriteWindow_Base < SpriteWindow
|
||||
TEXTPADDING=4 # In pixels
|
||||
@@ -970,7 +970,7 @@ class SpriteWindow_Base < SpriteWindow
|
||||
@sysframe=AnimatedBitmap.new(@curframe)
|
||||
@resolvedFrame=nil
|
||||
__setWindowskin(@sysframe.bitmap)
|
||||
__resolveSystemFrame()
|
||||
__resolveSystemFrame()
|
||||
end
|
||||
begin
|
||||
refresh
|
||||
@@ -1000,7 +1000,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
# Represents a window with no formatting capabilities. Its text color can be set,
|
||||
# though, and line breaks are supported, but the text is generally unformatted.
|
||||
@@ -1110,7 +1110,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class Window_AdvancedTextPokemon < SpriteWindow_Base
|
||||
attr_reader :text
|
||||
@@ -1386,7 +1386,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
|
||||
return 0 if @lastDrawnChar<0
|
||||
return @numtextchars if @lastDrawnChar>=@fmtchars.length
|
||||
# index after the last character's index
|
||||
return @fmtchars[@lastDrawnChar][14]+1
|
||||
return @fmtchars[@lastDrawnChar][14]+1
|
||||
end
|
||||
|
||||
def maxPosition
|
||||
@@ -1590,7 +1590,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
|
||||
refresh if !@frameskipChanged
|
||||
updateInternal
|
||||
# following line needed to allow "textspeed=-999" to work seamlessly
|
||||
refresh if @frameskipChanged
|
||||
refresh if @frameskipChanged
|
||||
end
|
||||
@frameskipChanged = false
|
||||
end
|
||||
@@ -1611,7 +1611,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class Window_InputNumberPokemon < SpriteWindow_Base
|
||||
attr_reader :number
|
||||
@@ -1724,7 +1724,7 @@ class Window_InputNumberPokemon < SpriteWindow_Base
|
||||
self.contents.font.color=@shadowColor
|
||||
pbDrawShadow(self.contents,x+(12-textwidth/2),y, textwidth+4, 32, text)
|
||||
self.contents.font.color=@baseColor
|
||||
self.contents.draw_text(x+(12-textwidth/2),y, textwidth+4, 32, text)
|
||||
self.contents.draw_text(x+(12-textwidth/2),y, textwidth+4, 32, text)
|
||||
if @index==i && @active && @frame/15==0
|
||||
colors=getDefaultTextColors(self.windowskin)
|
||||
self.contents.fill_rect(x+(12-textwidth/2),y+30,textwidth,2,colors[0])
|
||||
@@ -1735,7 +1735,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class SpriteWindow_Selectable < SpriteWindow_Base
|
||||
attr_reader :index
|
||||
@@ -1942,7 +1942,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
|
||||
# self.top_row = row - (self.page_row_max - 1)
|
||||
# dorefresh=true
|
||||
# end
|
||||
# if oldindex-self.top_item>=((self.page_item_max - 1)/2)
|
||||
# if oldindex-self.top_item>=((self.page_item_max - 1)/2)
|
||||
# self.top_row+=1
|
||||
# end
|
||||
# self.top_row = [self.top_row, self.row_max - self.page_row_max].min
|
||||
@@ -1966,7 +1966,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
module UpDownArrowMixin
|
||||
def initUpDownArrow
|
||||
@@ -1997,7 +1997,7 @@ module UpDownArrowMixin
|
||||
@uparrow.color = value
|
||||
@downarrow.color = value
|
||||
end
|
||||
|
||||
|
||||
def adjustForZoom(sprite)
|
||||
sprite.zoom_x = self.zoom_x
|
||||
sprite.zoom_y = self.zoom_y
|
||||
@@ -2029,7 +2029,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class SpriteWindow_SelectableEx < SpriteWindow_Selectable
|
||||
include UpDownArrowMixin
|
||||
@@ -2043,7 +2043,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class Window_DrawableCommand < SpriteWindow_SelectableEx
|
||||
attr_reader :baseColor
|
||||
@@ -2149,7 +2149,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class Window_CommandPokemon < Window_DrawableCommand
|
||||
attr_reader :commands
|
||||
@@ -2198,7 +2198,7 @@ class Window_CommandPokemon < Window_DrawableCommand
|
||||
|
||||
def commands=(value)
|
||||
@commands=value
|
||||
@item_max=commands.length
|
||||
@item_max=commands.length
|
||||
self.update_cursor_rect
|
||||
self.refresh
|
||||
end
|
||||
@@ -2241,14 +2241,14 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class Window_CommandPokemonEx < Window_CommandPokemon
|
||||
end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class Window_AdvancedCommandPokemon < Window_DrawableCommand
|
||||
attr_reader :commands
|
||||
@@ -2363,7 +2363,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class Window_AdvancedCommandPokemonEx < Window_AdvancedCommandPokemon
|
||||
end
|
||||
end
|
||||
|
||||
@@ -58,7 +58,7 @@ end
|
||||
|
||||
|
||||
class PngAnimatedBitmap
|
||||
# Creates an animated bitmap from a PNG file.
|
||||
# Creates an animated bitmap from a PNG file.
|
||||
def initialize(file,hue=0)
|
||||
@frames=[]
|
||||
@currentFrame=0
|
||||
@@ -91,9 +91,9 @@ class PngAnimatedBitmap
|
||||
end
|
||||
|
||||
def width; self.bitmap.width; end
|
||||
|
||||
|
||||
def height; self.bitmap.height; end
|
||||
|
||||
|
||||
def deanimate
|
||||
for i in 1...@frames.length
|
||||
@frames[i].dispose
|
||||
@@ -207,7 +207,7 @@ class GifBitmap
|
||||
#File.open("debug.txt","ab") { |f| f.puts("rejecting bitmap") }
|
||||
bitmap.dispose
|
||||
bitmap=nil
|
||||
end
|
||||
end
|
||||
if bitmap
|
||||
#File.open("debug.txt","ab") { |f| f.puts("reusing bitmap") }
|
||||
# Have a regular non-animated bitmap
|
||||
@@ -348,7 +348,7 @@ end
|
||||
|
||||
|
||||
def pbGetTileBitmap(filename, tile_id, hue)
|
||||
return BitmapCache.tileEx(filename, tile_id, hue) { |f|
|
||||
return BitmapCache.tileEx(filename, tile_id, hue) { |f|
|
||||
AnimatedBitmap.new("Graphics/Tilesets/"+filename).deanimate;
|
||||
}
|
||||
end
|
||||
@@ -482,7 +482,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class AnimatedSprite < SpriteWrapper
|
||||
attr_reader :frame
|
||||
@@ -597,7 +597,7 @@ class AnimatedSprite < SpriteWrapper
|
||||
if @playing
|
||||
@realframes+=1
|
||||
if @realframes==@frameskip
|
||||
@realframes=0
|
||||
@realframes=0
|
||||
self.frame+=1
|
||||
self.frame%=self.framecount
|
||||
end
|
||||
@@ -838,7 +838,7 @@ class PictureWindow < SpriteWindow_Base
|
||||
else
|
||||
@_iconbitmap=AnimatedBitmap.new(pathOrBitmap,hue)
|
||||
self.contents=@_iconbitmap ? @_iconbitmap.bitmap : nil
|
||||
self.width=@_iconbitmap ? @_iconbitmap.bitmap.width+self.borderX :
|
||||
self.width=@_iconbitmap ? @_iconbitmap.bitmap.width+self.borderX :
|
||||
32+self.borderX
|
||||
self.height=@_iconbitmap ? @_iconbitmap.bitmap.height+self.borderY :
|
||||
32+self.borderY
|
||||
@@ -854,7 +854,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class Plane
|
||||
def update; end
|
||||
@@ -900,14 +900,14 @@ class LargePlane < Plane
|
||||
|
||||
def ox; @__ox; end
|
||||
def oy; @__oy; end
|
||||
|
||||
def ox=(value);
|
||||
|
||||
def ox=(value);
|
||||
return if @__ox==value
|
||||
@__ox = value
|
||||
refresh
|
||||
end
|
||||
|
||||
def oy=(value);
|
||||
def oy=(value);
|
||||
return if @__oy==value
|
||||
@__oy = value
|
||||
refresh
|
||||
@@ -944,13 +944,13 @@ class LargePlane < Plane
|
||||
def color; @__sprite.color; end
|
||||
def tone; @__sprite.tone; end
|
||||
|
||||
def zoom_x=(v);
|
||||
def zoom_x=(v);
|
||||
return if @__sprite.zoom_x==v
|
||||
@__sprite.zoom_x = v
|
||||
refresh
|
||||
end
|
||||
|
||||
def zoom_y=(v);
|
||||
def zoom_y=(v);
|
||||
return if @__sprite.zoom_y==v
|
||||
@__sprite.zoom_y = v
|
||||
refresh
|
||||
@@ -1082,4 +1082,4 @@ class AnimatedPlane < LargePlane
|
||||
return if file==nil
|
||||
@bitmap=AnimatedBitmap.new(file,hue)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -837,13 +837,13 @@ def getFormattedText(bitmap,xDst,yDst,widthDst,heightDst,text,lineheight=32,
|
||||
for i in 0...characters.length
|
||||
c=characters[i]
|
||||
if i>0 && (charactersInternal[i][0]!=lastalign ||
|
||||
charactersInternal[i][1]!=lasty)
|
||||
charactersInternal[i][1]!=lasty)
|
||||
# Found end of run
|
||||
widthblocks.push([runstart,i,lastalign,totalwidth,lasty])
|
||||
runstart=i
|
||||
totalwidth=0
|
||||
end
|
||||
lastalign=charactersInternal[i][0]
|
||||
lastalign=charactersInternal[i][0]
|
||||
lasty=charactersInternal[i][1]
|
||||
extraspace=(charactersInternal[i][4]) ? charactersInternal[i][4] : 0
|
||||
totalwidth+=c[3]-extraspace
|
||||
@@ -1209,4 +1209,4 @@ def pbDrawImagePositions(bitmap,textpos)
|
||||
bitmap.blt(x,y,srcbitmap.bitmap,srcrect)
|
||||
srcbitmap.dispose
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -29,7 +29,7 @@ class Game_Message
|
||||
def visible
|
||||
return @visible || false
|
||||
end
|
||||
|
||||
|
||||
def background
|
||||
return @background || 0
|
||||
end
|
||||
@@ -48,7 +48,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class Scene_Map
|
||||
def updatemini
|
||||
@@ -96,7 +96,7 @@ class Scene_Battle
|
||||
$game_screen.update
|
||||
else
|
||||
$game_map.screen.update
|
||||
end
|
||||
end
|
||||
# If timer has reached 0
|
||||
if $game_system.timer_working and $game_system.timer == 0
|
||||
# Abort battle
|
||||
@@ -158,7 +158,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
def pbEventCommentInput(*args)
|
||||
parameters = []
|
||||
@@ -284,7 +284,7 @@ module InterpreterMixin
|
||||
i = (newI>i) ? newI : i+1
|
||||
else
|
||||
return i
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -635,7 +635,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class ChooseNumberParams
|
||||
def initialize
|
||||
@@ -795,15 +795,15 @@ def pbChooseNumber(msgwindow,params)
|
||||
end
|
||||
cmdwindow.dispose
|
||||
Input.update
|
||||
return ret
|
||||
return ret
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class FaceWindowVX < SpriteWindow_Base
|
||||
class FaceWindowVX < SpriteWindow_Base
|
||||
def initialize(face)
|
||||
super(0,0,128,128)
|
||||
faceinfo=face.split(",")
|
||||
@@ -841,7 +841,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
def pbGetBasicMapNameFromId(id)
|
||||
begin
|
||||
@@ -877,7 +877,7 @@ def pbCsvField!(str)
|
||||
end
|
||||
end
|
||||
str[0,fieldbytes]=""
|
||||
if !str[/\A\s*,/] && !str[/\A\s*$/]
|
||||
if !str[/\A\s*,/] && !str[/\A\s*$/]
|
||||
raise _INTL("Invalid quoted field (in: {1})",ret)
|
||||
end
|
||||
str[0,str.length]=$~.post_match
|
||||
@@ -915,7 +915,7 @@ def pbGetGoldString
|
||||
if $data_system.respond_to?("words")
|
||||
moneyString=_INTL("{1} {2}",$game_party.gold,$data_system.words.gold)
|
||||
else
|
||||
moneyString=_INTL("{1} {2}",$game_party.gold,Vocab.gold)
|
||||
moneyString=_INTL("{1} {2}",$game_party.gold,Vocab.gold)
|
||||
end
|
||||
end
|
||||
return moneyString
|
||||
@@ -956,7 +956,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
def pbCreateStatusWindow(viewport=nil)
|
||||
msgwindow=Window_AdvancedTextPokemon.new("")
|
||||
@@ -1026,7 +1026,7 @@ def pbMessageDisplay(msgwindow,message,letterbyletter=true,commandProc=nil)
|
||||
text.gsub!(/\\\\/,"\5")
|
||||
text.gsub!(/\\1/,"\1")
|
||||
if $game_actors
|
||||
text.gsub!(/\\n\[([1-8])\]/i) {
|
||||
text.gsub!(/\\n\[([1-8])\]/i) {
|
||||
m = $1.to_i
|
||||
next $game_actors[m].name
|
||||
}
|
||||
@@ -1044,7 +1044,7 @@ def pbMessageDisplay(msgwindow,message,letterbyletter=true,commandProc=nil)
|
||||
text.gsub!(/\\b/i,"<c3=3050C8,D0D0C8>")
|
||||
text.gsub!(/\\r/i,"<c3=E00808,D0D0C8>")
|
||||
isDarkSkin = isDarkWindowskin(msgwindow.windowskin)
|
||||
text.gsub!(/\\[Cc]\[([0-9]+)\]/) {
|
||||
text.gsub!(/\\[Cc]\[([0-9]+)\]/) {
|
||||
m = $1.to_i
|
||||
next getSkinColor(msgwindow.windowskin,m,isDarkSkin)
|
||||
}
|
||||
@@ -1054,9 +1054,9 @@ def pbMessageDisplay(msgwindow,message,letterbyletter=true,commandProc=nil)
|
||||
end until text == last_text
|
||||
begin
|
||||
last_text = text.clone
|
||||
text.gsub!(/\\l\[([0-9]+)\]/i) {
|
||||
text.gsub!(/\\l\[([0-9]+)\]/i) {
|
||||
linecount = [1,$1.to_i].max
|
||||
next ""
|
||||
next ""
|
||||
}
|
||||
end until text == last_text
|
||||
colortag = ""
|
||||
@@ -1428,4 +1428,4 @@ def pbMessageWaitForInput(msgwindow,frames,showPause=false)
|
||||
yield if block_given?
|
||||
end
|
||||
msgwindow.stopPause if msgwindow && showPause
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class Window_CharacterEntry < Window_DrawableCommand
|
||||
XSIZE=13
|
||||
@@ -67,12 +67,12 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class CharacterEntryHelper
|
||||
attr_reader :text
|
||||
attr_reader :maxlength
|
||||
attr_reader :passwordChar
|
||||
attr_reader :passwordChar
|
||||
attr_accessor :cursor
|
||||
|
||||
def initialize(text)
|
||||
@@ -163,7 +163,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class Window_TextEntry < SpriteWindow_Base
|
||||
def initialize(text,x,y,width,height,heading=nil,usedarkercolor=false)
|
||||
@@ -205,7 +205,7 @@ class Window_TextEntry < SpriteWindow_Base
|
||||
end
|
||||
|
||||
def maxlength=(value)
|
||||
@helper.maxlength=value
|
||||
@helper.maxlength=value
|
||||
self.refresh
|
||||
end
|
||||
|
||||
@@ -281,7 +281,7 @@ class Window_TextEntry < SpriteWindow_Base
|
||||
for i in startpos...scanlength
|
||||
c=(@helper.passwordChar!="") ? @helper.passwordChar : textscan[i]
|
||||
textwidth=bitmap.text_size(c).width
|
||||
next if c=="\n"
|
||||
next if c=="\n"
|
||||
# Draw text
|
||||
pbDrawShadowText(bitmap,x,y, textwidth+4, 32, c,@baseColor,@shadowColor)
|
||||
# Draw cursor if necessary
|
||||
@@ -300,7 +300,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
def getLineBrokenText(bitmap,value,width,dims)
|
||||
x=0
|
||||
@@ -367,7 +367,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class Window_MultilineTextEntry < SpriteWindow_Base
|
||||
def initialize(text,x,y,width,height)
|
||||
@@ -412,7 +412,7 @@ class Window_MultilineTextEntry < SpriteWindow_Base
|
||||
end
|
||||
|
||||
def maxlength=(value)
|
||||
@helper.maxlength=value
|
||||
@helper.maxlength=value
|
||||
@textchars=nil
|
||||
self.refresh
|
||||
end
|
||||
@@ -728,7 +728,7 @@ class Window_MultilineTextEntry < SpriteWindow_Base
|
||||
thispos=textchars[i][6]
|
||||
thiscolumn=textchars[i][7]
|
||||
thislength=textchars[i][8]
|
||||
if thisline==@cursorLine && @cursorColumn>=thiscolumn &&
|
||||
if thisline==@cursorLine && @cursorColumn>=thiscolumn &&
|
||||
@cursorColumn<=thiscolumn+thislength
|
||||
cursorY=textchars[i][2]-startY
|
||||
cursorX=textchars[i][1]
|
||||
@@ -751,7 +751,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
class Window_TextEntry_Keyboard < Window_TextEntry
|
||||
def update
|
||||
@@ -1021,14 +1021,14 @@ class PokemonEntryScene
|
||||
@sprites["entry2"].setOtherCharset(@@Characters[@symtype][1])
|
||||
else # Insert given character
|
||||
if @sprites["entry"].insert(@sprites["entry2"].character)
|
||||
pbPlayDecisionSE()
|
||||
pbPlayDecisionSE()
|
||||
else
|
||||
pbPlayBuzzerSE()
|
||||
end
|
||||
end
|
||||
next
|
||||
end
|
||||
end
|
||||
end
|
||||
Input.update
|
||||
return ret
|
||||
end
|
||||
@@ -1141,7 +1141,7 @@ class PokemonEntryScene2
|
||||
end
|
||||
|
||||
def update
|
||||
updateInternal
|
||||
updateInternal
|
||||
end
|
||||
|
||||
def dispose
|
||||
@@ -1599,7 +1599,7 @@ end
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#
|
||||
#===============================================================================
|
||||
def pbEnterText(helptext,minlength,maxlength,initialText="",mode=0,pokemon=nil,nofadeout=false)
|
||||
ret=""
|
||||
@@ -1673,4 +1673,4 @@ def pbMessageFreeText(message,currenttext,passwordbox,maxlength,width=240,&block
|
||||
},&block)
|
||||
pbDisposeMessageWindow(msgwindow)
|
||||
return retval
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@ def getCubicPoint2(src,t)
|
||||
cx0 = src[2]; cy0 = src[3]
|
||||
cx1 = src[4]; cy1 = src[5]
|
||||
x1 = src[6]; y1 = src[7]
|
||||
|
||||
|
||||
x1 = cx1+(x1-cx1)*t
|
||||
x0 = x0+(cx0-x0)*t
|
||||
cx0 = cx0+(cx1-cx0)*t
|
||||
@@ -613,7 +613,7 @@ class EventScene
|
||||
return @disposed
|
||||
end
|
||||
|
||||
def addBitmap(x, y, bitmap)
|
||||
def addBitmap(x, y, bitmap)
|
||||
# _bitmap_ can be a Bitmap or an AnimatedBitmap
|
||||
# (update method isn't called if it's animated)
|
||||
# EventScene doesn't take ownership of the passed-in bitmap
|
||||
@@ -628,7 +628,7 @@ class EventScene
|
||||
end
|
||||
|
||||
def addLabel(x, y, width, text)
|
||||
addBitmap(x,y,pbTextBitmap(text,width))
|
||||
addBitmap(x,y,pbTextBitmap(text,width))
|
||||
end
|
||||
|
||||
def addImage(x, y, name)
|
||||
@@ -706,4 +706,4 @@ def pbEventScreen(cls)
|
||||
}
|
||||
viewport.dispose
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -169,4 +169,4 @@ class PointInterpolator
|
||||
@y = ry1+t*(ry2-ry1)
|
||||
@curframe += 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user