Merge remote-tracking branch 'upstream/master' into handlerhash-block

This commit is contained in:
jonisavo
2020-09-06 07:02:03 +03:00
234 changed files with 1516 additions and 1536 deletions

Binary file not shown.

View File

@@ -87,8 +87,8 @@ NO_SIGNPOSTS = []
# * The maximum length, in characters, that the player's name can be. # * The maximum length, in characters, that the player's name can be.
#=============================================================================== #===============================================================================
INITIAL_MONEY = 3000 INITIAL_MONEY = 3000
MAX_MONEY = 999999 MAX_MONEY = 999_999
MAX_COINS = 99999 MAX_COINS = 99_999
MAX_PLAYER_NAME_SIZE = 10 MAX_PLAYER_NAME_SIZE = 10
#=============================================================================== #===============================================================================
@@ -97,9 +97,9 @@ MAX_PLAYER_NAME_SIZE = 10
# associated trainer type will be named as whatever is in that variable. # associated trainer type will be named as whatever is in that variable.
#=============================================================================== #===============================================================================
RIVAL_NAMES = [ RIVAL_NAMES = [
[:RIVAL1,12], [:RIVAL1, 12],
[:RIVAL2,12], [:RIVAL2, 12],
[:CHAMPION,12] [:CHAMPION, 12]
] ]
#=============================================================================== #===============================================================================
@@ -155,7 +155,7 @@ SCALED_EXP_FORMULA = true
SPLIT_EXP_BETWEEN_GAINERS = false SPLIT_EXP_BETWEEN_GAINERS = false
ENABLE_CRITICAL_CAPTURES = false ENABLE_CRITICAL_CAPTURES = false
GAIN_EXP_FOR_CAPTURE = true GAIN_EXP_FOR_CAPTURE = true
MEGA_RINGS = [:MEGARING,:MEGABRACELET,:MEGACUFF,:MEGACHARM] MEGA_RINGS = [:MEGARING, :MEGABRACELET, :MEGACUFF, :MEGACHARM]
#=============================================================================== #===============================================================================
# * The names of each pocket of the Bag. Leave the first entry blank. # * The names of each pocket of the Bag. Leave the first entry blank.
@@ -166,18 +166,18 @@ MEGA_RINGS = [:MEGARING,:MEGABRACELET,:MEGACUFF,:MEGACHARM]
# first entry (the 0). # first entry (the 0).
#=============================================================================== #===============================================================================
def pbPocketNames; return ["", def pbPocketNames; return ["",
_INTL("Items"), _INTL("Items"),
_INTL("Medicine"), _INTL("Medicine"),
_INTL("Poké Balls"), _INTL("Poké Balls"),
_INTL("TMs & HMs"), _INTL("TMs & HMs"),
_INTL("Berries"), _INTL("Berries"),
_INTL("Mail"), _INTL("Mail"),
_INTL("Battle Items"), _INTL("Battle Items"),
_INTL("Key Items") _INTL("Key Items")
]; end ]; end
BAG_MAX_POCKET_SIZE = [0,-1,-1,-1,-1,-1,-1,-1,-1] BAG_MAX_POCKET_SIZE = [0, -1, -1, -1, -1, -1, -1, -1, -1]
BAG_MAX_PER_SLOT = 999 BAG_MAX_PER_SLOT = 999
BAG_POCKET_AUTO_SORT = [0,false,false,false,true,true,false,false,false] BAG_POCKET_AUTO_SORT = [0, false, false, false, true, true, false, false, false]
#=============================================================================== #===============================================================================
# * A set of arrays each containing details of a graphic to be shown on the # * A set of arrays each containing details of a graphic to be shown on the
@@ -190,8 +190,8 @@ BAG_POCKET_AUTO_SORT = [0,false,false,false,true,true,false,false,false]
# - The graphic will always (true) or never (false) be shown on a wall map. # - The graphic will always (true) or never (false) be shown on a wall map.
#=============================================================================== #===============================================================================
REGION_MAP_EXTRAS = [ REGION_MAP_EXTRAS = [
[0,51,16,15,"mapHiddenBerth",false], [0, 51, 16, 15, "mapHiddenBerth", false],
[0,52,20,14,"mapHiddenFaraday",false] [0, 52, 20, 14, "mapHiddenFaraday", false]
] ]
#=============================================================================== #===============================================================================
@@ -229,9 +229,9 @@ NUM_STORAGE_BOXES = 30
#=============================================================================== #===============================================================================
USE_CURRENT_REGION_DEX = false USE_CURRENT_REGION_DEX = false
def pbDexNames; return [ def pbDexNames; return [
[_INTL("Kanto Pokédex"),0], [_INTL("Kanto Pokédex"), 0],
[_INTL("Johto Pokédex"),1], [_INTL("Johto Pokédex"), 1],
_INTL("National Pokédex") _INTL("National Pokédex")
]; end ]; end
DEX_SHOWS_ALL_FORMS = false DEX_SHOWS_ALL_FORMS = false
DEXES_WITH_OFFSETS = [] DEXES_WITH_OFFSETS = []
@@ -250,27 +250,27 @@ DEXES_WITH_OFFSETS = []
# - Roaming areas specifically for this Pokémon (optional). # - Roaming areas specifically for this Pokémon (optional).
#=============================================================================== #===============================================================================
RoamingAreas = { RoamingAreas = {
5 => [21,28,31,39,41,44,47,66,69], 5 => [ 21, 28, 31, 39, 41, 44, 47, 66, 69],
21 => [5,28,31,39,41,44,47,66,69], 21 => [5, 28, 31, 39, 41, 44, 47, 66, 69],
28 => [5,21,31,39,41,44,47,66,69], 28 => [5, 21, 31, 39, 41, 44, 47, 66, 69],
31 => [5,21,28,39,41,44,47,66,69], 31 => [5, 21, 28, 39, 41, 44, 47, 66, 69],
39 => [5,21,28,31,41,44,47,66,69], 39 => [5, 21, 28, 31, 41, 44, 47, 66, 69],
41 => [5,21,28,31,39,44,47,66,69], 41 => [5, 21, 28, 31, 39, 44, 47, 66, 69],
44 => [5,21,28,31,39,41,47,66,69], 44 => [5, 21, 28, 31, 39, 41, 47, 66, 69],
47 => [5,21,28,31,39,41,44,66,69], 47 => [5, 21, 28, 31, 39, 41, 44, 66, 69],
66 => [5,21,28,31,39,41,44,47,69], 66 => [5, 21, 28, 31, 39, 41, 44, 47, 69],
69 => [5,21,28,31,39,41,44,47,66] 69 => [5, 21, 28, 31, 39, 41, 44, 47, 66 ]
} }
RoamingSpecies = [ RoamingSpecies = [
[:LATIAS, 30, 53, 0, "Battle roaming"], [:LATIAS, 30, 53, 0, "Battle roaming"],
[:LATIOS, 30, 53, 0, "Battle roaming"], [:LATIOS, 30, 53, 0, "Battle roaming"],
[:KYOGRE, 40, 54, 2, nil, { [:KYOGRE, 40, 54, 2, nil, {
2 => [21,31], 2 => [ 21, 31 ],
21 => [2,31,69], 21 => [2, 31, 69],
31 => [2,21,69], 31 => [2, 21, 69],
69 => [21,31] 69 => [ 21, 31 ]
}], }],
[:ENTEI, 40, 55, 1, nil] [:ENTEI, 40, 55, 1, nil]
] ]
#=============================================================================== #===============================================================================
@@ -283,10 +283,10 @@ RoamingSpecies = [
# - Maximum possible level (optional). # - Maximum possible level (optional).
#=============================================================================== #===============================================================================
POKE_RADAR_ENCOUNTERS = [ POKE_RADAR_ENCOUNTERS = [
[5, 20, :STARLY, 12, 15], [5, 20, :STARLY, 12, 15],
[21, 10, :STANTLER, 14], [21, 10, :STANTLER, 14],
[28, 20, :BUTTERFREE, 15, 18], [28, 20, :BUTTERFREE, 15, 18],
[28, 20, :BEEDRILL, 15, 18] [28, 20, :BEEDRILL, 15, 18]
] ]
#=============================================================================== #===============================================================================
@@ -347,7 +347,7 @@ PLANT_SPARKLE_ANIMATION_ID = 7
# message file in the Data folder. Edit only if you have 2 or more # message file in the Data folder. Edit only if you have 2 or more
# languages to choose from. # languages to choose from.
#=============================================================================== #===============================================================================
LANGUAGES = [ LANGUAGES = [
# ["English","english.dat"], # ["English", "english.dat"],
# ["Deutsch","deutsch.dat"] # ["Deutsch", "deutsch.dat"]
] ]

View File

@@ -7,24 +7,20 @@ class Class
end end
end end
#=============================================================================== #===============================================================================
# module Comparable # module Comparable
#=============================================================================== #===============================================================================
unless Comparable.method_defined? :clamp unless Comparable.method_defined? :clamp
module Comparable module Comparable
def clamp(min, max) def clamp(min, max)
if max-min<0 if max - min < 0
raise ArgumentError("min argument must be smaller than max argument") raise ArgumentError("min argument must be smaller than max argument")
end end
return (self>max) ? max : (self<min) ? min : self return (self > max) ? max : (self < min) ? min : self
end end
end end
end end
#=============================================================================== #===============================================================================
# class Boolean # class Boolean
#=============================================================================== #===============================================================================
@@ -34,32 +30,30 @@ class Boolean
end end
end end
#=============================================================================== #===============================================================================
# class String # class String
#=============================================================================== #===============================================================================
class String class String
def starts_with?(str) def starts_with?(str)
proc = (self[0...str.length] == str) if self.length >= str.length proc = (self[0...str.length] == str) if self.length >= str.length
return proc ? proc : false return proc || false
end end
def ends_with?(str) def ends_with?(str)
e = self.length - 1 e = self.length - 1
proc = (self[(e-str.length)...e] == str) if self.length >= str.length proc = (self[(e-str.length)...e] == str) if self.length >= str.length
return proc ? proc : false return proc || false
end end
def starts_with_vowel? def starts_with_vowel?
return ['a','e','i','o','u'].include?(self[0,1].downcase) return ['a', 'e', 'i', 'o', 'u'].include?(self[0, 1].downcase)
end end
def first(n=1) def first(n = 1)
return self[0...n] return self[0...n]
end end
def last(n=1) def last(n = 1)
return self[-n..-1] || self return self[-n..-1] || self
end end
@@ -90,14 +84,14 @@ class String
return blank return blank
end end
def cut(bitmap,width) def cut(bitmap, width)
string = self string = self
width -= bitmap.text_size("...").width width -= bitmap.text_size("...").width
string_width = 0 string_width = 0
text = [] text = []
for char in string.scan(/./) for char in string.scan(/./)
wdh = bitmap.text_size(char).width wdh = bitmap.text_size(char).width
next if (wdh+string_width) > width next if (wdh + string_width) > width
string_width += wdh string_width += wdh
text.push(char) text.push(char)
end end
@@ -110,8 +104,6 @@ class String
end end
end end
#=============================================================================== #===============================================================================
# class Numeric # class Numeric
#=============================================================================== #===============================================================================
@@ -122,21 +114,17 @@ class Numeric
end end
end end
#=============================================================================== #===============================================================================
# class Integer # class Integer
#=============================================================================== #===============================================================================
class Integer class Integer
# Returns an array containing each digit of the number in turn. # Returns an array containing each digit of the number in turn.
def digits(base=10) def digits(base = 10)
quotient, remainder = divmod(base) quotient, remainder = divmod(base)
(quotient==0) ? [remainder] : quotient.digits(base).push(remainder) return (quotient == 0) ? [remainder] : quotient.digits(base).push(remainder)
end end
end end
#=============================================================================== #===============================================================================
# class Array # class Array
#=============================================================================== #===============================================================================
@@ -150,7 +138,7 @@ class Array
end end
def ^(other) # xor of two arrays def ^(other) # xor of two arrays
return (self|other)-(self&other) return (self|other) - (self&other)
end end
def shuffle def shuffle
@@ -158,15 +146,14 @@ class Array
end unless method_defined? :shuffle end unless method_defined? :shuffle
def shuffle! def shuffle!
(size-1).times do |i| (size - 1).times do |i|
r = i+rand(size-i) r = i + rand(size - i)
self[i], self[r] = self[r], self[i] self[i], self[r] = self[r], self[i]
end end
self self
end unless method_defined? :shuffle! end unless method_defined? :shuffle!
end end
#=============================================================================== #===============================================================================
# module Enumerable # module Enumerable
#=============================================================================== #===============================================================================
@@ -178,8 +165,6 @@ module Enumerable
end end
end end
#=============================================================================== #===============================================================================
# Kernel methods # Kernel methods
#=============================================================================== #===============================================================================
@@ -208,4 +193,4 @@ end
def nil_or_empty?(string) def nil_or_empty?(string)
return string.nil? || !string.is_a?(String) || string.size == 0 return string.nil? || !string.is_a?(String) || string.size == 0
end end

View File

@@ -32,8 +32,8 @@ class Win32API
def call(*args) def call(*args)
if @w32name!="GetAsyncKeyState" if @w32name!="GetAsyncKeyState"
File.open("winapi.txt","ab") { |f| File.open("winapi.txt","ab") { |f|
f.write("call(#{@w32dll},#{@w32name},#{args.inspect})\r\n") f.write("call(#{@w32dll},#{@w32name},#{args.inspect})\r\n")
} }
end end
debug_call(*args) debug_call(*args)
@@ -605,4 +605,4 @@ module RPG
# def play # def play
# end # end
end end
end end

View File

@@ -22,7 +22,7 @@ class Win32API
wndthreadid = @@GetWindowThreadProcessId.call(nextwindow,processid) wndthreadid = @@GetWindowThreadProcessId.call(nextwindow,processid)
if wndthreadid==threadid if wndthreadid==threadid
@@RGSSWINDOW = nextwindow @@RGSSWINDOW = nextwindow
return @@RGSSWINDOW return @@RGSSWINDOW
end end
end end
end until nextwindow==0 end until nextwindow==0
@@ -62,7 +62,7 @@ class Win32API
hWnd = pbFindRgssWindow hWnd = pbFindRgssWindow
window.call(hWnd,9) window.call(hWnd,9)
end end
def Win32API.fillScreen def Win32API.fillScreen
setWindowLong = Win32API.new('user32','SetWindowLong','LLL','L') setWindowLong = Win32API.new('user32','SetWindowLong','LLL','L')
setWindowPos = Win32API.new('user32','SetWindowPos','LLIIIII','I') setWindowPos = Win32API.new('user32','SetWindowPos','LLIIIII','I')
@@ -75,8 +75,8 @@ class Win32API
Win32API.focusWindow Win32API.focusWindow
return [width,height] return [width,height]
end end
def Win32API.restoreScreen def Win32API.restoreScreen
setWindowLong = Win32API.new('user32','SetWindowLong','LLL','L') setWindowLong = Win32API.new('user32','SetWindowLong','LLL','L')
setWindowPos = Win32API.new('user32','SetWindowPos','LLIIIII','I') setWindowPos = Win32API.new('user32','SetWindowPos','LLIIIII','I')
metrics = Win32API.new('user32','GetSystemMetrics','I','I') metrics = Win32API.new('user32','GetSystemMetrics','I','I')
@@ -101,4 +101,4 @@ end
# Well done for finding this place. # Well done for finding this place.
# DO NOT EDIT THESE # DO NOT EDIT THESE
ESSENTIALS_VERSION = "18" ESSENTIALS_VERSION = "18"
ERROR_TEXT = "" ERROR_TEXT = ""

View File

@@ -3,7 +3,7 @@ module Win32
buf = "\0" * len buf = "\0" * len
Win32API.new("kernel32", "RtlMoveMemory", "ppl", "").call(buf, self, len) Win32API.new("kernel32", "RtlMoveMemory", "ppl", "").call(buf, self, len)
buf buf
end end
end end
@@ -41,13 +41,13 @@ module Winsock
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
def self.closesocket(*args) def self.closesocket(*args)
Win32API.new(DLL, "closesocket", "p", "l").call(*args) Win32API.new(DLL, "closesocket", "p", "l").call(*args)
end end
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# * Connect # * Connect
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
def self.connect(*args) def self.connect(*args)
Win32API.new(DLL, "connect", "ppl", "l").call(*args) Win32API.new(DLL, "connect", "ppl", "l").call(*args)
end end
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# * Get host (Using Adress) # * Get host (Using Adress)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@@ -95,7 +95,7 @@ module Winsock
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
def self.inet_ntoa(*args) def self.inet_ntoa(*args)
Win32API.new(DLL, "inet_ntoa", "l", "p").call(*args) Win32API.new(DLL, "inet_ntoa", "l", "p").call(*args)
end end
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# * Listen # * Listen
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@@ -125,7 +125,7 @@ module Winsock
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
def self.setsockopt(*args) def self.setsockopt(*args)
Win32API.new(DLL, "setsockopt", "pllpl", "l").call(*args) Win32API.new(DLL, "setsockopt", "pllpl", "l").call(*args)
end end
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# * Shutdown # * Shutdown
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@@ -136,7 +136,7 @@ module Winsock
# * Socket # * Socket
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
def self.socket(*args) def self.socket(*args)
Win32API.new(DLL, "socket", "lll", "l").call(*args) Win32API.new(DLL, "socket", "lll", "l").call(*args)
end end
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# * Get Last Error # * Get Last Error
@@ -162,12 +162,12 @@ class Socket
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# * Constants # * Constants
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
AF_UNSPEC = 0 AF_UNSPEC = 0
AF_UNIX = 1 AF_UNIX = 1
AF_INET = 2 AF_INET = 2
AF_IPX = 6 AF_IPX = 6
AF_APPLETALK = 16 AF_APPLETALK = 16
PF_UNSPEC = 0 PF_UNSPEC = 0
PF_UNIX = 1 PF_UNIX = 1
PF_INET = 2 PF_INET = 2
PF_IPX = 6 PF_IPX = 6
@@ -244,13 +244,13 @@ class Socket
AI_V4MAPPED = 2048 AI_V4MAPPED = 2048
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Returns the associated IP address for the given hostname. # * Returns the associated IP address for the given hostname.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def self.getaddress(host) def self.getaddress(host)
gethostbyname(host)[3].unpack("C4").join(".") gethostbyname(host)[3].unpack("C4").join(".")
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Returns the associated IP address for the given hostname. # * Returns the associated IP address for the given hostname.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def self.getservice(serv) def self.getservice(serv)
case serv case serv
when Numeric when Numeric
@@ -271,7 +271,7 @@ class Socket
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Returns the user's hostname. # * Returns the user's hostname.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def self.gethostname def self.gethostname
buf = "\0" * 256 buf = "\0" * 256
Winsock.gethostname(buf, 256) Winsock.gethostname(buf, 256)
@@ -305,7 +305,7 @@ class Socket
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Creates an INET-sockaddr struct. # * Creates an INET-sockaddr struct.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def self.sockaddr_in(port, host) def self.sockaddr_in(port, host)
begin begin
[AF_INET, getservice(port)].pack("sn") + gethostbyname(host)[3] + [].pack("x8") [AF_INET, getservice(port)].pack("sn") + gethostbyname(host)[3] + [].pack("x8")
@@ -319,7 +319,7 @@ class Socket
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Creates a new socket and connects it to the given host and port. # * Creates a new socket and connects it to the given host and port.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def self.open(*args) def self.open(*args)
socket = new(*args) socket = new(*args)
if block_given? if block_given?
@@ -333,14 +333,14 @@ class Socket
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Creates a new socket. # * Creates a new socket.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def initialize(domain, type, protocol) def initialize(domain, type, protocol)
SocketError.check if (@fd = Winsock.socket(domain, type, protocol)) == -1 SocketError.check if (@fd = Winsock.socket(domain, type, protocol)) == -1
@fd @fd
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Accepts incoming connections. # * Accepts incoming connections.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def accept(flags = 0) def accept(flags = 0)
buf = "\0" * 16 buf = "\0" * 16
SocketError.check if Winsock.accept(@fd, buf, flags) == -1 SocketError.check if Winsock.accept(@fd, buf, flags) == -1
@@ -348,21 +348,21 @@ class Socket
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Binds a socket to the given sockaddr. # * Binds a socket to the given sockaddr.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def bind(sockaddr) def bind(sockaddr)
SocketError.check if (ret = Winsock.bind(@fd, sockaddr, sockaddr.size)) == -1 SocketError.check if (ret = Winsock.bind(@fd, sockaddr, sockaddr.size)) == -1
ret ret
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Closes a socket. # * Closes a socket.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def close def close
SocketError.check if (ret = Winsock.closesocket(@fd)) == -1 SocketError.check if (ret = Winsock.closesocket(@fd)) == -1
ret ret
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Connects a socket to the given sockaddr. # * Connects a socket to the given sockaddr.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def connect(sockaddr) def connect(sockaddr)
#return if Network.testing? == 2 #return if Network.testing? == 2
SocketError.check if (ret = Winsock.connect(@fd, sockaddr, sockaddr.size)) == -1 SocketError.check if (ret = Winsock.connect(@fd, sockaddr, sockaddr.size)) == -1
@@ -370,28 +370,28 @@ class Socket
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Listens for incoming connections. # * Listens for incoming connections.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def listen(backlog) def listen(backlog)
SocketError.check if (ret = Winsock.listen(@fd, backlog)) == -1 SocketError.check if (ret = Winsock.listen(@fd, backlog)) == -1
ret ret
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Checks waiting data's status. # * Checks waiting data's status.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def select(timeout) # timeout in seconds def select(timeout) # timeout in seconds
SocketError.check if (ret = Winsock.select(1, [1, @fd].pack("ll"), 0, 0, [timeout.to_i, SocketError.check if (ret = Winsock.select(1, [1, @fd].pack("ll"), 0, 0, [timeout.to_i,
(timeout * 1000000).to_i].pack("ll"))) == -1 (timeout * 1000000).to_i].pack("ll"))) == -1
ret ret
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Checks if data is waiting. # * Checks if data is waiting.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def ready? def ready?
not select(0) == 0 not select(0) == 0
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Reads data from socket. # * Reads data from socket.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def read(len) def read(len)
buf = "\0" * len buf = "\0" * len
Win32API.new("msvcrt", "_read", "lpl", "l").call(@fd, buf, len) Win32API.new("msvcrt", "_read", "lpl", "l").call(@fd, buf, len)
@@ -399,7 +399,7 @@ class Socket
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Returns received data. # * Returns received data.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def recv(len, flags = 0) def recv(len, flags = 0)
retString="" retString=""
remainLen=len remainLen=len
@@ -415,7 +415,7 @@ class Socket
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Sends data to a host. # * Sends data to a host.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def send(data, flags = 0) def send(data, flags = 0)
SocketError.check if (ret = Winsock.send(@fd, data, data.size, flags)) == -1 SocketError.check if (ret = Winsock.send(@fd, data, data.size, flags)) == -1
ret ret
@@ -423,7 +423,7 @@ class Socket
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Recieves file from a socket # * Recieves file from a socket
# size : file size # size : file size
# scene : update scene boolean # scene : update scene boolean
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def recv_file(size,scene=false,file="") def recv_file(size,scene=false,file="")
data = [] data = []
@@ -464,12 +464,12 @@ class Socket
break if ch == "\n" break if ch == "\n"
message += ch message += ch
end end
# Return recieved data # Return recieved data
return message return message
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Writes data to socket. # * Writes data to socket.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def write(data) def write(data)
Win32API.new("msvcrt", "_write", "lpl", "l").call(@fd, data, 1) Win32API.new("msvcrt", "_write", "lpl", "l").call(@fd, data, 1)
end end
@@ -490,7 +490,7 @@ end
class TCPSocket < Socket class TCPSocket < Socket
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Creates a new socket and connects it to the given host and port. # * Creates a new socket and connects it to the given host and port.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def self.open(*args) def self.open(*args)
socket = new(*args) socket = new(*args)
if block_given? if block_given?
@@ -504,7 +504,7 @@ class TCPSocket < Socket
end end
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
# * Creates a new socket and connects it to the given host and port. # * Creates a new socket and connects it to the given host and port.
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def initialize(host, port) def initialize(host, port)
super(AF_INET, SOCK_STREAM, IPPROTO_TCP) super(AF_INET, SOCK_STREAM, IPPROTO_TCP)
connect(Socket.sockaddr_in(port, host)) connect(Socket.sockaddr_in(port, host))
@@ -526,7 +526,7 @@ class SocketError < StandardError
#if not Network.testing? == 1 #if not Network.testing? == 1
raise Errno.const_get(Errno.constants.detect { |c| Errno.const_get(c).new.errno == errno }) raise Errno.const_get(Errno.constants.detect { |c| Errno.const_get(c).new.errno == errno })
#else #else
# errno != 0 ? (Network.testresult(true)) : (Network.testresult(false)) # errno != 0 ? (Network.testresult(true)) : (Network.testresult(false))
#end #end
end end
end end
@@ -669,7 +669,7 @@ def pbDownloadToString(url)
return data return data
rescue rescue
return "" return ""
end end
end end
def pbDownloadToFile(url, file) def pbDownloadToFile(url, file)
@@ -685,7 +685,7 @@ def pbPostToString(url, postdata)
return data return data
rescue rescue
return "" return ""
end end
end end
def pbPostToFile(url, postdata, file) def pbPostToFile(url, postdata, file)
@@ -693,4 +693,4 @@ def pbPostToFile(url, postdata, file)
pbPostData(url, postdata,file) pbPostData(url, postdata,file)
rescue rescue
end end
end end

View File

@@ -3,7 +3,7 @@ module Console
GENERIC_READ = 0x80000000 GENERIC_READ = 0x80000000
GENERIC_WRITE = 0x40000000 GENERIC_WRITE = 0x40000000
FILE_SHARE_READ = 0x00000001 FILE_SHARE_READ = 0x00000001
FILE_SHARE_WRITE = 0x00000002 FILE_SHARE_WRITE = 0x00000002
CONSOLE_TEXTMODE_BUFFER = 0x00000001 CONSOLE_TEXTMODE_BUFFER = 0x00000001
def Console::AllocConsole def Console::AllocConsole
@@ -76,7 +76,7 @@ module Console
echo "Debug Output:\n" echo "Debug Output:\n"
echo "-------------------------------\n\n" echo "-------------------------------\n\n"
SetConsoleActiveScreenBuffer(@bufferHandle) SetConsoleActiveScreenBuffer(@bufferHandle)
end end
def self.readInput def self.readInput
length=20 length=20
@@ -113,7 +113,7 @@ module Console
def self.readInput2 def self.readInput2
buffer=0.chr buffer=0.chr
done=false done=false
input="" input=""
eventsread=0.chr*4 eventsread=0.chr*4
while !done while !done
if ReadConsole(buffer)==0 if ReadConsole(buffer)==0
@@ -155,4 +155,4 @@ module Kernel
echo(string) echo(string)
echo("\r\n") echo("\r\n")
end end
end end

View File

@@ -665,7 +665,7 @@ class Bitmap
SwapRgb = Win32API.new('./rubyscreen.dll', 'SwapRgb', 'pi', '') rescue nil SwapRgb = Win32API.new('./rubyscreen.dll', 'SwapRgb', 'pi', '') rescue nil
def setData(x) def setData(x)
RtlMoveMemory_ip.call(self.address, x, x.length) RtlMoveMemory_ip.call(self.address, x, x.length)
end end
def getData def getData
@@ -677,7 +677,7 @@ class Bitmap
def swap32(x) def swap32(x)
return ((x>>24)&0x000000FF)| return ((x>>24)&0x000000FF)|
((x>>8)&0x0000FF00)| ((x>>8)&0x0000FF00)|
((x<<8)&0x00FF0000)| ((x<<8)&0x00FF0000)|
((x<<24)&0xFF000000) ((x<<24)&0xFF000000)
end end
@@ -716,7 +716,7 @@ class Bitmap
b=0;c=2;while b!=len b=0;c=2;while b!=len
data2[b]=data[c] data2[b]=data[c]
data2[c]=data[b] data2[c]=data[b]
b+=4;c+=4; b+=4;c+=4;
end end
end end
#$times.push(Time.now-ttt) #$times.push(Time.now-ttt)
@@ -754,4 +754,4 @@ class Bitmap
end end
return @address return @address
end end
end end

View File

@@ -340,7 +340,7 @@ module PluginManager
return if !installed?(plugin_name) return if !installed?(plugin_name)
return @@Plugins[plugin_name][:link] return @@Plugins[plugin_name][:link]
end end
# Returns the credits of the specified plugin. # Returns the credits of the specified plugin.
def self.credits(plugin_name) def self.credits(plugin_name)
return if !installed?(plugin_name) return if !installed?(plugin_name)
@@ -373,4 +373,4 @@ module PluginManager
end end
return 0 return 0
end end
end end

View File

@@ -33,4 +33,4 @@ class Game_Switches
@data[switch_id] = value @data[switch_id] = value
end end
end end
end end

View File

@@ -33,4 +33,4 @@ class Game_Variables
@data[variable_id] = value @data[variable_id] = value
end end
end end
end end

View File

@@ -13,7 +13,7 @@ class Game_SelfSwitches
@data = {} @data = {}
end end
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# * Get Self Switch # * Get Self Switch
# key : key # key : key
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
def [](key) def [](key)
@@ -27,4 +27,4 @@ class Game_SelfSwitches
def []=(key, value) def []=(key, value)
@data[key] = value @data[key] = value
end end
end end

View File

@@ -153,4 +153,4 @@ class Game_Screen
end end
end end
end end
end end

View File

@@ -2,7 +2,7 @@
# ** Game_System # ** Game_System
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# This class handles data surrounding the system. Backround music, etc. # This class handles data surrounding the system. Backround music, etc.
# is managed here as well. Refer to "$game_system" for the instance of # is managed here as well. Refer to "$game_system" for the instance of
# this class. # this class.
#============================================================================== #==============================================================================
@@ -47,7 +47,7 @@ class Game_System
################################################################################ ################################################################################
def bgm_play(bgm) def bgm_play(bgm)
bgm_play_internal(bgm,0) bgm_play_internal(bgm,0)
end end
@@ -226,7 +226,7 @@ class Game_System
end end
def getPlayingBGS def getPlayingBGS
return (@playing_bgs) ? @playing_bgs.clone : nil return (@playing_bgs) ? @playing_bgs.clone : nil
end end
################################################################################ ################################################################################
@@ -286,4 +286,4 @@ class Game_System
event.start event.start
end end
end end
end end

View File

@@ -153,4 +153,4 @@ class Game_Picture
@angle %= 360 @angle %= 360
end end
end end
end end

View File

@@ -78,4 +78,4 @@ class Game_CommonEvent
@interpreter.update @interpreter.update
end end
end end
end end

View File

@@ -866,4 +866,4 @@ class Game_Character
@pattern = (@pattern + 1) % 4 @pattern = (@pattern + 1) % 4
@anime_count -= frames_per_pattern @anime_count -= frames_per_pattern
end end
end end

View File

@@ -244,4 +244,4 @@ class Game_Event < Game_Character
@interpreter.update @interpreter.update
end end
end end
end end

View File

@@ -55,7 +55,7 @@ class Game_Player < Game_Character
end end
def pbHasDependentEvents? def pbHasDependentEvents?
return $PokemonGlobal.dependentEvents.length>0 return $PokemonGlobal.dependentEvents.length>0
end end
def bump_into_object def bump_into_object
@@ -486,7 +486,7 @@ def pbCanUseBike?(mapid)
return true if pbGetMetadata(mapid,MetadataBicycleAlways) return true if pbGetMetadata(mapid,MetadataBicycleAlways)
val = pbGetMetadata(mapid,MetadataBicycle) val = pbGetMetadata(mapid,MetadataBicycle)
val = pbGetMetadata(mapid,MetadataOutdoor) if val==nil val = pbGetMetadata(mapid,MetadataOutdoor) if val==nil
return (val) ? true : false return (val) ? true : false
end end
def pbMountBike def pbMountBike
@@ -502,4 +502,4 @@ def pbDismountBike
$PokemonGlobal.bicycle = false $PokemonGlobal.bicycle = false
pbUpdateVehicle pbUpdateVehicle
$game_map.autoplayAsCue $game_map.autoplayAsCue
end end

View File

@@ -100,4 +100,4 @@ class Game_Character
update_old2 update_old2
end end
end end
=end =end

View File

@@ -435,4 +435,4 @@ class Game_Map
@fog_opacity_duration -= 1 @fog_opacity_duration -= 1
end end
end end
end end

View File

@@ -12,61 +12,61 @@
normal event command requires a direction and number of tiles to scroll, normal event command requires a direction and number of tiles to scroll,
Map Autoscroll scrolls the map to center on the tile whose x and y Map Autoscroll scrolls the map to center on the tile whose x and y
coordinates are given. coordinates are given.
FEATURES FEATURES
- automatic map scrolling to given x,y coordinate (or player) - automatic map scrolling to given x,y coordinate (or player)
- destination is fixed, so it's possible to scroll to same place even if - destination is fixed, so it's possible to scroll to same place even if
origin is variable (e.g. moving NPC) origin is variable (e.g. moving NPC)
- variable speed (just like "Scroll Map" event command) - variable speed (just like "Scroll Map" event command)
- diagonal scrolling supported - diagonal scrolling supported
SETUP SETUP
Instead of a "Scroll Map" event command, use the "Call Script" command Instead of a "Scroll Map" event command, use the "Call Script" command
and enter on the following on the first line: and enter on the following on the first line:
autoscroll(x,y) autoscroll(x,y)
(replacing "x" and "y" with the x and y coordinates of the tile to scroll to) (replacing "x" and "y" with the x and y coordinates of the tile to scroll to)
To specify a scroll speed other than the default (4), use: To specify a scroll speed other than the default (4), use:
autoscroll(x,y,speed) autoscroll(x,y,speed)
(now also replacing "speed" with the scroll speed from 1-6) (now also replacing "speed" with the scroll speed from 1-6)
Diagonal scrolling happens automatically when the destination is diagonal Diagonal scrolling happens automatically when the destination is diagonal
relative to the starting point (i.e., not directly up, down, left or right). relative to the starting point (i.e., not directly up, down, left or right).
To scroll to the player, instead use the following: To scroll to the player, instead use the following:
autoscroll_player(speed) autoscroll_player(speed)
Note: because of how the interpreter and the "Call Script" event command Note: because of how the interpreter and the "Call Script" event command
are setup, the call to autoscroll(...) can only be on the first line of are setup, the call to autoscroll(...) can only be on the first line of
the "Call Script" event command (and not flowing down to subsequent lines). the "Call Script" event command (and not flowing down to subsequent lines).
For example, the following call may not work as expected: For example, the following call may not work as expected:
autoscroll($game_variables[1], autoscroll($game_variables[1],
$game_variables[2]) $game_variables[2])
(since the long argument names require dropping down to a second line) (since the long argument names require dropping down to a second line)
A work-around is to setup new variables with shorter names in a preceding A work-around is to setup new variables with shorter names in a preceding
(separate) "Call Script" event command: (separate) "Call Script" event command:
@x = $game_variables[1] @x = $game_variables[1]
@y = $game_variables[2] @y = $game_variables[2]
and then use those as arguments: and then use those as arguments:
autoscroll(@x,@y) autoscroll(@x,@y)
The renaming must be in a separate "Call Script" because otherwise The renaming must be in a separate "Call Script" because otherwise
the call to autoscroll(...) isn't on the first line. the call to autoscroll(...) isn't on the first line.
Originally requested by militantmilo80: Originally requested by militantmilo80:
http://www.rmxp.net/forums/index.php?showtopic=29519 http://www.rmxp.net/forums/index.php?showtopic=29519
=end =end
class Interpreter class Interpreter
@@ -154,9 +154,9 @@ class Game_Map
end end
def scroll_downleft(distance) def scroll_downleft(distance)
@display_x = [@display_x - distance, 0].max @display_x = [@display_x - distance, 0].max
@display_y = [@display_y + distance, @display_y = [@display_y + distance,
(self.height - Graphics.height*1.0/TILE_HEIGHT) * REAL_RES_Y].min (self.height - Graphics.height*1.0/TILE_HEIGHT) * REAL_RES_Y].min
end end
def scroll_upright(distance) def scroll_upright(distance)
@@ -185,10 +185,10 @@ class Game_Map
when 6; scroll_right(distance) when 6; scroll_right(distance)
when 7; scroll_upleft(distance) when 7; scroll_upleft(distance)
when 8; scroll_up(distance) when 8; scroll_up(distance)
when 9; scroll_upright(distance) when 9; scroll_upright(distance)
end end
# Subtract distance scrolled # Subtract distance scrolled
@scroll_rest -= distance @scroll_rest -= distance
end end
end end
end end

View File

@@ -169,7 +169,7 @@ class PokemonMapFactory
return false if !map.valid?(x,y) return false if !map.valid?(x,y)
return true if thisEvent.through return true if thisEvent.through
if thisEvent==$game_player if thisEvent==$game_player
return false unless ($DEBUG && Input.press?(Input::CTRL)) || return false unless ($DEBUG && Input.press?(Input::CTRL)) ||
map.passable?(x,y,0,thisEvent) map.passable?(x,y,0,thisEvent)
else else
return false unless map.passable?(x,y,0,thisEvent) return false unless map.passable?(x,y,0,thisEvent)
@@ -269,7 +269,7 @@ class PokemonMapFactory
def getThisAndOtherPosRelativePos(thisEvent,otherMapID,otherX,otherY) def getThisAndOtherPosRelativePos(thisEvent,otherMapID,otherX,otherY)
return [0,0] if !thisEvent return [0,0] if !thisEvent
return getRelativePos( return getRelativePos(
thisEvent.map.map_id,thisEvent.x,thisEvent.y,otherMapID,otherX,otherY) thisEvent.map.map_id,thisEvent.x,thisEvent.y,otherMapID,otherX,otherY)
end end
def getOffsetEventPos(event,xOffset,yOffset) def getOffsetEventPos(event,xOffset,yOffset)
@@ -363,7 +363,7 @@ class PokemonMapFactory
for i in 0...@maps.length for i in 0...@maps.length
next if MapFactoryHelper.mapInRange?(@maps[i]) next if MapFactoryHelper.mapInRange?(@maps[i])
@maps[i] = nil @maps[i] = nil
deleted = true deleted = true
end end
if deleted if deleted
@maps.compact! @maps.compact!
@@ -485,4 +485,4 @@ def updateTilesets
for map in maps for map in maps
map.updateTileset if map map.updateTileset if map
end end
end end

View File

@@ -55,4 +55,4 @@ class Sprite_Picture
@sprite.angle = @picture.angle @sprite.angle = @picture.angle
@sprite.tone = @picture.tone @sprite.tone = @picture.tone
end end
end end

View File

@@ -41,4 +41,4 @@ class Sprite_Timer
@timer.visible=false if @timer @timer.visible=false if @timer
end end
end end
end end

View File

@@ -33,10 +33,10 @@ class BushBitmap
for i in 0...4 for i in 0...4
y = i*charheight y = i*charheight
if cy>=0 if cy>=0
ret.blt(0,y,bitmap,Rect.new(0,y,ret.width,cy)) ret.blt(0,y,bitmap,Rect.new(0,y,ret.width,cy))
ret.blt(0,y+cy,bitmap,Rect.new(0,y+cy,ret.width,2),170) ret.blt(0,y+cy,bitmap,Rect.new(0,y+cy,ret.width,2),170)
end end
ret.blt(0,y+cy+2,bitmap,Rect.new(0,y+cy+2,ret.width,2),85) if cy+2>=0 ret.blt(0,y+cy+2,bitmap,Rect.new(0,y+cy+2,ret.width,2),85) if cy+2>=0
end end
return ret return ret
end end
@@ -47,10 +47,10 @@ class BushBitmap
cy = charheight-depth-2 cy = charheight-depth-2
y = charheight y = charheight
if cy>=0 if cy>=0
ret.blt(0,y,bitmap,Rect.new(0,y,ret.width,cy)) ret.blt(0,y,bitmap,Rect.new(0,y,ret.width,cy))
ret.blt(0,y+cy,bitmap,Rect.new(0,y+cy,ret.width,2),170) ret.blt(0,y+cy,bitmap,Rect.new(0,y+cy,ret.width,2),170)
end end
ret.blt(0,y+cy+2,bitmap,Rect.new(0,y+cy+2,ret.width,2),85) if cy+2>=0 ret.blt(0,y+cy+2,bitmap,Rect.new(0,y+cy+2,ret.width,2),85) if cy+2>=0
return ret return ret
end end
end end
@@ -171,4 +171,4 @@ class Sprite_Character < RPG::Sprite
@reflection.update if @reflection @reflection.update if @reflection
@surfbase.update if @surfbase @surfbase.update if @surfbase
end end
end end

View File

@@ -40,7 +40,7 @@ class Sprite_Reflection
return if disposed? return if disposed?
shouldShow = @rsprite.visible shouldShow = @rsprite.visible
if !shouldShow if !shouldShow
# Just-in-time disposal of sprite # Just-in-time disposal of sprite
if @sprite if @sprite
@sprite.dispose @sprite.dispose
@sprite = nil @sprite = nil
@@ -87,4 +87,4 @@ class Sprite_Reflection
@sprite.src_rect = @rsprite.src_rect @sprite.src_rect = @rsprite.src_rect
end end
end end
end end

View File

@@ -38,7 +38,7 @@ class Sprite_SurfBase
def update def update
return if disposed? return if disposed?
if !$PokemonGlobal.surfing && !$PokemonGlobal.diving if !$PokemonGlobal.surfing && !$PokemonGlobal.diving
# Just-in-time disposal of sprite # Just-in-time disposal of sprite
if @sprite if @sprite
@sprite.dispose @sprite.dispose
@sprite = nil @sprite = nil
@@ -74,4 +74,4 @@ class Sprite_SurfBase
@sprite.opacity = @rsprite.opacity @sprite.opacity = @rsprite.opacity
end end
end end
end end

View File

@@ -164,4 +164,4 @@ class Spriteset_Map
@@viewport1.update @@viewport1.update
@@viewport3.update @@viewport3.update
end end
end end

View File

@@ -31,4 +31,4 @@ class Spriteset_Global
end end
@timer_sprite.update @timer_sprite.update
end end
end end

View File

@@ -91,4 +91,4 @@ class Spriteset_Map
@usersprites[i].update if !@usersprites[i].disposed? @usersprites[i].update if !@usersprites[i].disposed?
end end
end end
end end

View File

@@ -8,7 +8,7 @@ SHADOW_WARN = true
class Sprite_Shadow < RPG::Sprite class Sprite_Shadow < RPG::Sprite
attr_accessor :character attr_accessor :character
def initialize(viewport, character = nil,params=[]) def initialize(viewport, character = nil,params=[])
super(viewport) super(viewport)
@source = params[0] @source = params[0]
@@ -104,7 +104,7 @@ class Sprite_Shadow < RPG::Sprite
if (@angle_trigo < @anglemin and @angle_trigo > @anglemax) and @anglemin > @anglemax if (@angle_trigo < @anglemin and @angle_trigo > @anglemax) and @anglemin > @anglemax
self.opacity = 0 self.opacity = 0
return return
end end
end end
end end
@@ -179,7 +179,7 @@ end
#=================================================== #===================================================
class Spriteset_Map class Spriteset_Map
attr_accessor :shadows attr_accessor :shadows
alias shadow_initialize initialize alias shadow_initialize initialize
def initialize(map=nil) def initialize(map=nil)
@shadows = [] @shadows = []
@@ -201,7 +201,7 @@ class Spriteset_Map
sprite.setShadows(map, @shadows) sprite.setShadows(map, @shadows)
end end
$scene.spritesetGlobal.playersprite.setShadows(map, @shadows) $scene.spritesetGlobal.playersprite.setShadows(map, @shadows)
end end
end end
@@ -252,4 +252,4 @@ def XPML_read(map,markup,event,max_param_number=0)
end end
end end
return parameter_list return parameter_list
end end

View File

@@ -33,12 +33,12 @@ class Particle_Engine
return if disposed? return if disposed?
for particle in @effect for particle in @effect
next if particle.nil? next if particle.nil?
particle.dispose particle.dispose
end end
@effect.clear @effect.clear
@map = nil @map = nil
@disposed = true @disposed = true
end end
def disposed? def disposed?
return @disposed return @disposed
@@ -64,7 +64,7 @@ class Particle_Engine
cls = @effects[type] cls = @effects[type]
if cls.nil? if cls.nil?
particle.dispose if particle particle.dispose if particle
return nil return nil
end end
if !particle || !particle.is_a?(cls) if !particle || !particle.is_a?(cls)
particle.dispose if particle particle.dispose if particle
@@ -94,7 +94,7 @@ class Particle_Engine
particle = realloc_effect(event,particle) particle = realloc_effect(event,particle)
@effect[i] = particle @effect[i] = particle
end end
particle.update if particle particle.update if particle
end end
end end
end end
@@ -208,7 +208,7 @@ class ParticleEffect_Event < ParticleEffect
@opacity = [] @opacity = []
@startingx = self.x + @xoffset @startingx = self.x + @xoffset
@startingy = self.y + @yoffset @startingy = self.y + @yoffset
@screen_x = self.x @screen_x = self.x
@screen_y = self.y @screen_y = self.y
@real_x = @event.real_x @real_x = @event.real_x
@real_y = @event.real_y @real_y = @event.real_y
@@ -299,7 +299,7 @@ class ParticleEffect_Event < ParticleEffect
@particles[i].x = @startingx + @xoffset @particles[i].x = @startingx + @xoffset
@particlex[i] = 0.0 @particlex[i] = 0.0
@particley[i] = 0.0 @particley[i] = 0.0
end end
if @fade == 0 if @fade == 0
if @opacity[i] <= 0 if @opacity[i] <= 0
@opacity[i] = @originalopacity @opacity[i] = @originalopacity
@@ -307,7 +307,7 @@ class ParticleEffect_Event < ParticleEffect
@particles[i].x = @startingx + @xoffset @particles[i].x = @startingx + @xoffset
@particlex[i] = 0.0 @particlex[i] = 0.0
@particley[i] = 0.0 @particley[i] = 0.0
end end
else else
if @opacity[i] <= 0 if @opacity[i] <= 0
@opacity[i] = 250 @opacity[i] = 250
@@ -315,7 +315,7 @@ class ParticleEffect_Event < ParticleEffect
@particles[i].x = @startingx + @xoffset @particles[i].x = @startingx + @xoffset
@particlex[i] = 0.0 @particlex[i] = 0.0
@particley[i] = 0.0 @particley[i] = 0.0
end end
end end
calcParticlePos(i) calcParticlePos(i)
if @randomhue == 1 if @randomhue == 1
@@ -349,7 +349,7 @@ class ParticleEffect_Event < ParticleEffect
def dispose def dispose
for particle in @particles for particle in @particles
particle.dispose particle.dispose
end end
for bitmap in @bitmaps.values for bitmap in @bitmaps.values
bitmap.dispose bitmap.dispose
@@ -558,7 +558,7 @@ class Particle_Engine::Splash < ParticleEffect_Event
super super
for i in 0...@maxparticless for i in 0...@maxparticless
@particles[i].opacity = 50 @particles[i].opacity = 50
@particles[i].update @particles[i].update
end end
end end
end end
@@ -574,7 +574,7 @@ class Game_Event < Game_Character
begin begin
nf_particles_game_map_initialize(map_id, event, map) nf_particles_game_map_initialize(map_id, event, map)
rescue ArgumentError rescue ArgumentError
nf_particles_game_map_initialize(map_id, event) nf_particles_game_map_initialize(map_id, event)
end end
end end
@@ -583,4 +583,4 @@ class Game_Event < Game_Character
nf_particles_game_map_refresh nf_particles_game_map_refresh
@pe_refresh = true @pe_refresh = true
end end
end end

View File

@@ -17,7 +17,7 @@ end
def passable?(passages,tile_id) def passable?(passages,tile_id)
return false if tile_id == nil return false if tile_id == nil
passage = passages[tile_id] passage = passages[tile_id]
return (passage && passage<15) return (passage && passage<15)
end end
def getPassabilityMinimap(mapid) def getPassabilityMinimap(mapid)
@@ -222,7 +222,7 @@ class Draw_Tilemap # This class controls a set of sprites, with
end end
if @flash_data if @flash_data
@sprites.push([]) @sprites.push([])
@contentstrips.push([]) @contentstrips.push([])
end end
end end
@@ -444,4 +444,4 @@ class Sprite_Character
self.z=ScreenPosHelper.pbScreenZ(@character,@ch) self.z=ScreenPosHelper.pbScreenZ(@character,@ch)
end end
end end
end end

View File

@@ -1,5 +1,5 @@
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class SynchronizedTilemapAutotilesInternal class SynchronizedTilemapAutotilesInternal
def initialize(oldat) def initialize(oldat)
@@ -115,4 +115,4 @@ class SynchronizedTilemap < Tilemap
@autotiles.sync @autotiles.sync
super super
end end
end end

View File

@@ -67,4 +67,4 @@ class TilemapLoader
def ox=(v); @tilemap.ox = v; end def ox=(v); @tilemap.ox = v; end
def oy; @tilemap.oy; end def oy; @tilemap.oy; end
def oy=(v); @tilemap.oy = v; end def oy=(v); @tilemap.oy = v; end
end end

View File

@@ -16,7 +16,7 @@ class TileDrawingHelper
[ [37, 38, 43, 44], [37, 6, 43, 44], [13, 18, 19, 24], [13, 14, 43, 44], [ [37, 38, 43, 44], [37, 6, 43, 44], [13, 18, 19, 24], [13, 14, 43, 44],
[37, 42, 43, 48], [17, 18, 47, 48], [13, 18, 43, 48], [ 1, 2, 7, 8] ] [37, 42, 43, 48], [17, 18, 47, 48], [13, 18, 43, 48], [ 1, 2, 7, 8] ]
] ]
# converts neighbors returned from tableNeighbors to tile indexes # converts neighbors returned from tableNeighbors to tile indexes
NeighborsToTiles = [ NeighborsToTiles = [
46, 44, 46, 44, 43, 41, 43, 40, 46, 44, 46, 44, 43, 41, 43, 40, 46, 44, 46, 44, 43, 41, 43, 40, 46, 44, 46, 44, 43, 41, 43, 40,
@@ -98,7 +98,7 @@ class TileDrawingHelper
for i in 0...4 for i in 0...4
tile_position = tiles[i] - 1 tile_position = tiles[i] - 1
src.set(tile_position % 6 * 16 + anim, tile_position / 6 * 16, 16, 16) src.set(tile_position % 6 * 16 + anim, tile_position / 6 * 16, 16, 16)
bitmap.stretch_blt(Rect.new(i % 2 * cxTile + x, i / 2 * cyTile + y, cxTile, cyTile), bitmap.stretch_blt(Rect.new(i % 2 * cxTile + x, i / 2 * cyTile + y, cxTile, cyTile),
autotile, src) autotile, src)
end end
end end
@@ -115,7 +115,7 @@ class TileDrawingHelper
bltSmallRegularTile(bitmap, x, y, cxTile, cyTile, id) bltSmallRegularTile(bitmap, x, y, cxTile, cyTile, id)
elsif id > 0 elsif id > 0
bltSmallAutotile(bitmap, x, y, cxTile, cyTile, id, frame) bltSmallAutotile(bitmap, x, y, cxTile, cyTile, id, frame)
end end
end end
def bltAutotile(bitmap,x,y,id,frame) def bltAutotile(bitmap,x,y,id,frame)
@@ -131,6 +131,6 @@ class TileDrawingHelper
bltRegularTile(bitmap, x, y, id) bltRegularTile(bitmap, x, y, id)
elsif id > 0 elsif id > 0
bltAutotile(bitmap, x, y, id, frame) bltAutotile(bitmap, x, y, id, frame)
end end
end end
end end

View File

@@ -1466,4 +1466,4 @@ class Interpreter
result = pbExecuteScript(script) result = pbExecuteScript(script)
return true return true
end end
end end

View File

@@ -1,7 +1,7 @@
#=============================================================================== #===============================================================================
# ** Modified Scene_Map class for Pokémon. # ** Modified Scene_Map class for Pokémon.
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# #
#=============================================================================== #===============================================================================
class Scene_Map class Scene_Map
attr_reader :spritesetGlobal attr_reader :spritesetGlobal
@@ -103,7 +103,7 @@ class Scene_Map
$game_player.straighten $game_player.straighten
$game_map.update $game_map.update
sscene = PokemonPauseMenu_Scene.new sscene = PokemonPauseMenu_Scene.new
sscreen = PokemonPauseMenu.new(sscene) sscreen = PokemonPauseMenu.new(sscene)
sscreen.pbStartPokemonMenu sscreen.pbStartPokemonMenu
$game_temp.in_menu = false $game_temp.in_menu = false
end end
@@ -236,4 +236,4 @@ class Scene_Map
Graphics.freeze Graphics.freeze
end end
end end
end end

View File

@@ -52,7 +52,7 @@ class Event
end end
end end
end end
# Triggers the event and calls all its event handlers. Normally called only # Triggers the event and calls all its event handlers. Normally called only
# by the code where the event occurred. The first argument is the sender of # by the code where the event occurred. The first argument is the sender of
# the event, the other arguments are the event's parameters. # the event, the other arguments are the event's parameters.
@@ -175,4 +175,4 @@ class MoveHandlerHash < HandlerHash
def initialize def initialize
super(:PBMoves) super(:PBMoves)
end end
end end

View File

@@ -179,12 +179,12 @@ module RTP
# Gets the absolute RGSS paths for the given file name # Gets the absolute RGSS paths for the given file name
def self.eachPathFor(filename) def self.eachPathFor(filename)
return if !filename return if !filename
if filename[/^[A-Za-z]\:[\/\\]/] || filename[/^[\/\\]/] if filename[/^[A-Za-z]\:[\/\\]/] || filename[/^[\/\\]/]
# filename is already absolute # filename is already absolute
yield filename yield filename
else else
# relative path # relative path
RTP.eachPath { |path| RTP.eachPath { |path|
if path=="./" if path=="./"
yield filename yield filename
else else
@@ -423,7 +423,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
module MiniRegistry module MiniRegistry
HKEY_CLASSES_ROOT = 0x80000000 HKEY_CLASSES_ROOT = 0x80000000
@@ -455,7 +455,7 @@ module MiniRegistry
def self.close(hkey); check(RegCloseKey.call(hkey)) if hkey; end def self.close(hkey); check(RegCloseKey.call(hkey)) if hkey; end
def self.get(hkey,subkey,name,defaultValue=nil,bit64=false) 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 self.read(key,name) rescue defaultValue
} }
return defaultValue return defaultValue
@@ -654,4 +654,4 @@ module ::Marshal
end end
end end
end end
end end

View File

@@ -160,4 +160,4 @@ end
class StringOutput class StringOutput
include FileOutputMixin include FileOutputMixin
end end

View File

@@ -52,7 +52,7 @@ def pbSetTextMessages
lastitem.gsub!(/([^\.\!\?])\s\s+/) { |m| $1+" " } lastitem.gsub!(/([^\.\!\?])\s\s+/) { |m| $1+" " }
items.push(lastitem) items.push(lastitem)
lastitem="" lastitem=""
end end
neednewline=false neednewline=false
end end
if list.code == 101 if list.code == 101
@@ -84,7 +84,7 @@ def pbSetTextMessages
if lastitem!="" if lastitem!=""
items.push(lastitem) items.push(lastitem)
lastitem="" lastitem=""
end end
end end
end end
end end
@@ -128,7 +128,7 @@ def pbSetTextMessages
lastitem.gsub!(/([^\.\!\?])\s\s+/) { |m| $1+" " } lastitem.gsub!(/([^\.\!\?])\s\s+/) { |m| $1+" " }
items.push(lastitem) items.push(lastitem)
lastitem="" lastitem=""
end end
neednewline=false neednewline=false
end end
if list.code == 101 if list.code == 101
@@ -160,7 +160,7 @@ def pbSetTextMessages
if lastitem!="" if lastitem!=""
items.push(lastitem) items.push(lastitem)
lastitem="" lastitem=""
end end
end end
end end
end end
@@ -196,7 +196,7 @@ def pbEachIntlSection(file)
if !line[/^\#/] && !line[/^\s*$/] if !line[/^\#/] && !line[/^\s*$/]
if line[re] if line[re]
if havesection if havesection
yield lastsection,sectionname yield lastsection,sectionname
end end
lastsection.clear lastsection.clear
sectionname=$~[1] sectionname=$~[1]
@@ -214,13 +214,13 @@ def pbEachIntlSection(file)
end end
} }
if havesection if havesection
yield lastsection,sectionname yield lastsection,sectionname
end end
end end
def pbGetText(infile) def pbGetText(infile)
begin begin
file=File.open(infile,"rb") file=File.open(infile,"rb")
rescue rescue
raise _INTL("Can't find {1}",infile) raise _INTL("Can't find {1}",infile)
end end
@@ -773,4 +773,4 @@ def _MAPISPRINTF(mapid,*arg)
} }
end end
return string return string
end end

View File

@@ -20,7 +20,7 @@ module PBDebug
if $DEBUG && $INTERNAL && @@log.length>0 if $DEBUG && $INTERNAL && @@log.length>0
File.open("Data/debuglog.txt", "a+b") { |f| f.write("#{@@log}") } File.open("Data/debuglog.txt", "a+b") { |f| f.write("#{@@log}") }
end end
@@log.clear @@log.clear
end end
def self.log(msg) def self.log(msg)
@@ -37,4 +37,4 @@ module PBDebug
File.open("Data/dumplog.txt", "a+b") { |f| f.write("#{msg}\r\n") } File.open("Data/dumplog.txt", "a+b") { |f| f.write("#{msg}\r\n") }
end end
end end
end end

View File

@@ -62,10 +62,12 @@ end
##################################### #####################################
# Works around a problem with FileTest.exist # Works around a problem with FileTest.exist
# if directory contains accent marks # if directory contains accent marks
def safeExists?(f) if !defined?(safeExists?)
ret=false def safeExists?(f)
File.open(f,"rb") { ret=true } rescue nil ret=false
return ret File.open(f,"rb") { ret=true } rescue nil
return ret
end
end end
@@ -144,7 +146,7 @@ module AudioState
def self.pitch; @pitch; end def self.pitch; @pitch; end
def self.volume; @volume; end def self.volume; @volume; end
def self.waitingBGM=(value); def self.waitingBGM=(value);
Thread.exclusive { @waitingBGM=value; } Thread.exclusive { @waitingBGM=value; }
end end
@@ -245,7 +247,7 @@ def Audio_me_fade(ms)
end end
def Audio_me_stop() def Audio_me_stop()
AudioState::AudioContextStop.call(AudioState.meContext) AudioState::AudioContextStop.call(AudioState.meContext)
end end
def Audio_bgs_play(name, volume, pitch, position = 0) def Audio_bgs_play(name, volume, pitch, position = 0)
@@ -264,7 +266,7 @@ def Audio_bgs_fade(ms)
end end
def Audio_bgs_stop() def Audio_bgs_stop()
AudioState::AudioContextStop.call(AudioState.bgsContext) AudioState::AudioContextStop.call(AudioState.bgsContext)
end end
def Audio_se_play(name, volume, pitch, position = 0) def Audio_se_play(name, volume, pitch, position = 0)
@@ -279,7 +281,7 @@ def Audio_se_play(name, volume, pitch, position = 0)
end end
def Audio_se_stop() def Audio_se_stop()
AudioState::AudioContextStop.call(AudioState.seContext) AudioState::AudioContextStop.call(AudioState.seContext)
end end

View File

@@ -13,7 +13,7 @@ def pbStringToAudioFile(str)
end end
end end
# Converts an object to an audio file. # Converts an object to an audio file.
# str -- Either a string showing the filename or an RPG::AudioFile object. # str -- Either a string showing the filename or an RPG::AudioFile object.
# Possible formats for _str_: # Possible formats for _str_:
# filename volume and pitch 100 # filename volume and pitch 100
@@ -41,7 +41,7 @@ end
################################################################################ ################################################################################
# Plays a BGM file. # Plays a BGM file.
# param -- Either a string showing the filename # param -- Either a string showing the filename
# (relative to Audio/BGM/) or an RPG::AudioFile object. # (relative to Audio/BGM/) or an RPG::AudioFile object.
# Possible formats for _param_: # Possible formats for _param_:
# filename volume and pitch 100 # filename volume and pitch 100
@@ -91,7 +91,7 @@ end
################################################################################ ################################################################################
# Plays an ME file. # Plays an ME file.
# param -- Either a string showing the filename # param -- Either a string showing the filename
# (relative to Audio/ME/) or an RPG::AudioFile object. # (relative to Audio/ME/) or an RPG::AudioFile object.
# Possible formats for _param_: # Possible formats for _param_:
# filename volume and pitch 100 # filename volume and pitch 100
@@ -140,7 +140,7 @@ end
################################################################################ ################################################################################
# Plays a BGS file. # Plays a BGS file.
# param -- Either a string showing the filename # param -- Either a string showing the filename
# (relative to Audio/BGS/) or an RPG::AudioFile object. # (relative to Audio/BGS/) or an RPG::AudioFile object.
# Possible formats for _param_: # Possible formats for _param_:
# filename volume and pitch 100 # filename volume and pitch 100
@@ -189,7 +189,7 @@ end
################################################################################ ################################################################################
# Plays an SE file. # Plays an SE file.
# param -- Either a string showing the filename # param -- Either a string showing the filename
# (relative to Audio/SE/) or an RPG::AudioFile object. # (relative to Audio/SE/) or an RPG::AudioFile object.
# Possible formats for _param_: # Possible formats for _param_:
# filename volume and pitch 100 # filename volume and pitch 100
@@ -289,4 +289,4 @@ def pbPlayCloseMenuSE
if FileTest.audio_exist?("Audio/SE/GUI menu close") if FileTest.audio_exist?("Audio/SE/GUI menu close")
pbSEPlay("GUI menu close",80) pbSEPlay("GUI menu close",80)
end end
end end

View File

@@ -17,7 +17,7 @@ Parameters:
freq - the frequency of the sound in Hz. The higher the frequency, freq - the frequency of the sound in Hz. The higher the frequency,
the higher the pitch. If 0, no sound will be generated. the higher the pitch. If 0, no sound will be generated.
The module Audio::Note contains useful frequencies for tones. The module Audio::Note contains useful frequencies for tones.
freq can also be a SoundEnvelope or an array of two element arrays, freq can also be a SoundEnvelope or an array of two element arrays,
as follows: as follows:
freq[0] - time in ms to apply the specified frequency freq[0] - time in ms to apply the specified frequency
freq[1] - frequency to apply. In between, values will be interpolated freq[1] - frequency to apply. In between, values will be interpolated
@@ -26,7 +26,7 @@ Parameters:
async - specifies whether the function will return immediately async - specifies whether the function will return immediately
without waiting for the sound to finish (stands for asynchronous) without waiting for the sound to finish (stands for asynchronous)
timbre - specifies the timbre of the tone; from 0.0 through 1.0 timbre - specifies the timbre of the tone; from 0.0 through 1.0
timbre can also be a SoundEnvelope or an array of two element arrays, timbre can also be a SoundEnvelope or an array of two element arrays,
as follows: as follows:
volume[0] - time in ms to apply the specified timbre volume[0] - time in ms to apply the specified timbre
volume[1] - timbre to apply. In between, values will be interpolated volume[1] - timbre to apply. In between, values will be interpolated
@@ -206,7 +206,7 @@ class NoteEnvelope
def sweeping(duration,sweepDuration) def sweeping(duration,sweepDuration)
return self if duration<=0 return self if duration<=0
return steady(duration) if sweepDuration<=0 return steady(duration) if sweepDuration<=0
@envelope.changeDiscrete(0,@maxPoint) @envelope.changeDiscrete(0,@maxPoint)
falling=true falling=true
while duration>0 while duration>0
dur=duration>sweepDuration ? sweepDuration : duration dur=duration>sweepDuration ? sweepDuration : duration
@@ -368,13 +368,13 @@ class SoundEnvelope; include Enumerable
# duration - duration of the sound # duration - duration of the sound
# attack - attack time (in ms), or time between the start of the sound # attack - attack time (in ms), or time between the start of the sound
# and the time where the sound reaches its maximum volume. # and the time where the sound reaches its maximum volume.
# If this value is less than 0, the sound will decay from silence to # If this value is less than 0, the sound will decay from silence to
# the sustain volume instead (see below). # the sustain volume instead (see below).
# decay - decay time (in ms), or time after the attack phase until # decay - decay time (in ms), or time after the attack phase until
# the time where the sound reaches its sustain volume # the time where the sound reaches its sustain volume
# sustain - sustain volume, or normal volume of sound (0-100) # sustain - sustain volume, or normal volume of sound (0-100)
# release - release time (in ms), or amount of time to fade out the # release - release time (in ms), or amount of time to fade out the
# sound when it reaches its end. The sound's duration includes its # sound when it reaches its end. The sound's duration includes its
# release time. # release time.
def self.attackDecayRelease(duration,attack,decay,sustain,release) def self.attackDecayRelease(duration,attack,decay,sustain,release)
env=self.new env=self.new
@@ -396,7 +396,7 @@ class SoundEnvelope; include Enumerable
return self.new.addValueChanges( return self.new.addValueChanges(
value,onDuration,0,offDuration).repeat(totalDuration) value,onDuration,0,offDuration).repeat(totalDuration)
end end
def change(delta,volume) def change(delta,volume)
return self if delta<0 return self if delta<0
velength=@e.length velength=@e.length
@@ -528,7 +528,7 @@ class SoundEnvelopeIterator# :nodoc:
def getValue(frame) def getValue(frame)
value=0 value=0
if @envIndex==@env.length if @envIndex==@env.length
value=@env[@envIndex-1][1] value=@env[@envIndex-1][1]
elsif @envIndex==0 elsif @envIndex==0
value=@env[@envIndex][1] value=@env[@envIndex][1]
else else
@@ -539,7 +539,7 @@ class SoundEnvelopeIterator# :nodoc:
thisVolume=@env[@envIndex][1] thisVolume=@env[@envIndex][1]
value=(thisVolume-lastVolume)*(frame-lastPos)/(thisPos-lastPos)+lastVolume value=(thisVolume-lastVolume)*(frame-lastPos)/(thisPos-lastPos)+lastVolume
else else
value=@env[@envIndex][1] value=@env[@envIndex][1]
end end
end end
while @envIndex+1<=@env.length && @env[@envIndex][0]==frame.to_i while @envIndex+1<=@env.length && @env[@envIndex][0]==frame.to_i
@@ -652,7 +652,7 @@ class WaveForm# :nodoc:
@exactCounter+=@step @exactCounter+=@step
while @exactCounter>1.0; @exactCounter-=1.0; end while @exactCounter>1.0; @exactCounter-=1.0; end
end end
def mixSamples(other) def mixSamples(other)
for i in 0...other.sampleCount for i in 0...other.sampleCount
newSamp=((@samples[i]-0x80)+(other.samples[i]-0x80))/2+0x80 newSamp=((@samples[i]-0x80)+(other.samples[i]-0x80))/2+0x80
@@ -806,7 +806,7 @@ module Audio
timbre1,timbre2,@@sineProc2,@@sineProc2,async) timbre1,timbre2,@@sineProc2,@@sineProc2,async)
end end
@@noiseProc2 = proc { |i,timbre| @@noiseProc2 = proc { |i,timbre|
n = (rand(256)/255.0)*0.1 n = (rand(256)/255.0)*0.1
next (rand(2)==0) ? 1-n : -1+n next (rand(2)==0) ? 1-n : -1+n
} }
@@ -1293,7 +1293,7 @@ end
############################### ###############################
begin begin
MciSendString = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','l') MciSendString = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','l')
MciErrorString = Win32API.new('winmm','mciGetErrorString','%w(l,p,l)','l') MciErrorString = Win32API.new('winmm','mciGetErrorString','%w(l,p,l)','l')
rescue rescue
MciSendString = nil MciSendString = nil
@@ -1347,4 +1347,4 @@ def endRecord(file)
MciSendString.call("close RECORDER",0,0,0) MciSendString.call("close RECORDER",0,0,0)
end end
#Audio.sine(140,SoundEnvelope.initial(6400).change(140,11400),50) #Audio.sine(140,SoundEnvelope.initial(6400).change(140,11400),50)

View File

@@ -22,7 +22,7 @@ def canonicalize(c)
if x=="." if x=="."
elsif x==".." elsif x==".."
if pos>=0 if pos>=0
ret.delete_at(pos) ret.delete_at(pos)
pos -= 1 pos -= 1
end end
else else
@@ -141,7 +141,7 @@ class WeakHashtable
def [](key) def [](key)
o=@hash[key] o=@hash[key]
return o if !o return o if !o
if o.weakref_alive? if o.weakref_alive?
o=o.__getobj__ o=o.__getobj__
else else
@hash.delete(key) @hash.delete(key)
@@ -494,4 +494,4 @@ module BitmapCache
@cache = {} @cache = {}
GC.start GC.start
end end
end end

View File

@@ -414,7 +414,7 @@ class Window
@sprites["cursor"].visible=false @sprites["cursor"].visible=false
end end
for i in @sprites for i in @sprites
i[1].z=@z i[1].z=@z
end end
if @rpgvx if @rpgvx
@sprites["cursor"].z=@z # For Compatibility @sprites["cursor"].z=@z # For Compatibility
@@ -526,23 +526,23 @@ class Window
@cursorbitmap.clear @cursorbitmap.clear
@sprites["cursor"].bitmap=@cursorbitmap @sprites["cursor"].bitmap=@cursorbitmap
@sprites["cursor"].src_rect.set(0,0,width,height) @sprites["cursor"].src_rect.set(0,0,width,height)
rect = Rect.new(margin,margin, rect = Rect.new(margin,margin,
width - fullmargin, height - fullmargin) width - fullmargin, height - fullmargin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[8]) @cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[8])
@cursorbitmap.blt(0, 0, @_windowskin, cursorrects[4])# top left @cursorbitmap.blt(0, 0, @_windowskin, cursorrects[4])# top left
@cursorbitmap.blt(width-margin, 0, @_windowskin, cursorrects[5]) # top right @cursorbitmap.blt(width-margin, 0, @_windowskin, cursorrects[5]) # top right
@cursorbitmap.blt(0, height-margin, @_windowskin, cursorrects[6]) # bottom right @cursorbitmap.blt(0, height-margin, @_windowskin, cursorrects[6]) # bottom right
@cursorbitmap.blt(width-margin, height-margin, @_windowskin, cursorrects[7]) # bottom left @cursorbitmap.blt(width-margin, height-margin, @_windowskin, cursorrects[7]) # bottom left
rect = Rect.new(margin, 0, rect = Rect.new(margin, 0,
width - fullmargin, margin) width - fullmargin, margin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[0]) @cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[0])
rect = Rect.new(0, margin, rect = Rect.new(0, margin,
margin, height - fullmargin) margin, height - fullmargin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[1]) @cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[1])
rect = Rect.new(width - margin, margin, rect = Rect.new(width - margin, margin,
margin, height - fullmargin) margin, height - fullmargin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[2]) @cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[2])
rect = Rect.new(margin, height-margin, rect = Rect.new(margin, height-margin,
width - fullmargin, margin) width - fullmargin, margin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[3]) @cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[3])
else else
@@ -605,4 +605,4 @@ class Window
sprite.oy=(sprite.zoom_y<=0) ? 0 : (i-y)/sprite.zoom_y sprite.oy=(sprite.zoom_y<=0) ? 0 : (i-y)/sprite.zoom_y
end end
end end
end end

View File

@@ -208,7 +208,7 @@ def pbRepositionMessageWindow(msgwindow, linecount=2)
case $game_message.background case $game_message.background
when 1; msgwindow.opacity=0 # dim when 1; msgwindow.opacity=0 # dim
when 2; msgwindow.opacity=0 # transparent when 2; msgwindow.opacity=0 # transparent
end end
end end
end end
@@ -218,7 +218,7 @@ def pbUpdateMsgWindowPos(msgwindow,event,eventChanged=false)
if eventChanged if eventChanged
msgwindow.resizeToFit2(msgwindow.text,Graphics.width*2/3,msgwindow.height) msgwindow.resizeToFit2(msgwindow.text,Graphics.width*2/3,msgwindow.height)
end end
msgwindow.y=event.screen_y-48-msgwindow.height msgwindow.y=event.screen_y-48-msgwindow.height
if msgwindow.y<0 if msgwindow.y<0
msgwindow.y=event.screen_y+24 msgwindow.y=event.screen_y+24
end end
@@ -231,7 +231,7 @@ def pbUpdateMsgWindowPos(msgwindow,event,eventChanged=false)
curwidth=msgwindow.width curwidth=msgwindow.width
if curwidth!=Graphics.width if curwidth!=Graphics.width
msgwindow.width=Graphics.width msgwindow.width=Graphics.width
msgwindow.width=Graphics.width msgwindow.width=Graphics.width
end end
end end
end end
@@ -467,7 +467,7 @@ end
def pbUpdateSpriteHash(windows) def pbUpdateSpriteHash(windows)
for i in windows for i in windows
window=i[1] window=i[1]
if window if window
if window.is_a?(Sprite) || window.is_a?(Window) if window.is_a?(Sprite) || window.is_a?(Window)
window.update if !pbDisposed?(window) window.update if !pbDisposed?(window)
elsif window.is_a?(Plane) elsif window.is_a?(Plane)
@@ -636,7 +636,7 @@ def pbFadeInAndShow(sprites,visiblesprites=nil)
for j in 0..numFrames for j in 0..numFrames
pbSetSpritesToColor(sprites,Color.new(0,0,0,((numFrames-j)*alphaDiff))) pbSetSpritesToColor(sprites,Color.new(0,0,0,((numFrames-j)*alphaDiff)))
(block_given?) ? yield : pbUpdateSpriteHash(sprites) (block_given?) ? yield : pbUpdateSpriteHash(sprites)
end end
} }
end end
@@ -754,7 +754,7 @@ if !defined?(_INTL)
for i in 1...args.length for i in 1...args.length
string.gsub!(/\{#{i}\}/,"#{args[i]}") string.gsub!(/\{#{i}\}/,"#{args[i]}")
end end
return string return string
end end
end end
@@ -776,6 +776,6 @@ if !defined?(_MAPINTL)
for i in 2...args.length for i in 2...args.length
string.gsub!(/\{#{i}\}/,"#{args[i+1]}") string.gsub!(/\{#{i}\}/,"#{args[i+1]}")
end end
return string return string
end end
end end

View File

@@ -1,5 +1,5 @@
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class SpriteWindowCursorRect < Rect class SpriteWindowCursorRect < Rect
def initialize(window) def initialize(window)
@@ -95,7 +95,7 @@ class SpriteWindow < Window
# Flags used to preserve compatibility # Flags used to preserve compatibility
# with RGSS/RGSS2's version of Window # with RGSS/RGSS2's version of Window
module CompatBits module CompatBits
CorrectZ = 1 CorrectZ = 1
ExpandBack = 2 ExpandBack = 2
ShowScrollArrows = 4 ShowScrollArrows = 4
@@ -437,7 +437,7 @@ class SpriteWindow < Window
def skinformat=(value) def skinformat=(value)
if @skinformat!=value if @skinformat!=value
@skinformat=value @skinformat=value
privRefresh(true) privRefresh(true)
end end
end end
@@ -573,9 +573,9 @@ class SpriteWindow < Window
hascontents=(@contents && !@contents.disposed?) hascontents=(@contents && !@contents.disposed?)
@sprites["back"].visible=@visible @sprites["back"].visible=@visible
@sprites["contents"].visible=@visible && @openness==255 @sprites["contents"].visible=@visible && @openness==255
@sprites["pause"].visible=supported && @visible && @pause && @sprites["pause"].visible=supported && @visible && @pause &&
(@combat & CompatBits::ShowPause) (@combat & CompatBits::ShowPause)
@sprites["cursor"].visible=supported && @visible && @openness==255 && @sprites["cursor"].visible=supported && @visible && @openness==255 &&
(@combat & CompatBits::ShowCursor) (@combat & CompatBits::ShowCursor)
@sprites["scroll0"].visible = false @sprites["scroll0"].visible = false
@sprites["scroll1"].visible = false @sprites["scroll1"].visible = false
@@ -698,7 +698,7 @@ class SpriteWindow < Window
@sprites["contents"].y=@y+trimStartY @sprites["contents"].y=@y+trimStartY
if (@compat & CompatBits::ShowScrollArrows)>0 && @skinformat==0 if (@compat & CompatBits::ShowScrollArrows)>0 && @skinformat==0
# Compatibility mode: Make scroll arrows visible # Compatibility mode: Make scroll arrows visible
if @skinformat==0 && @_windowskin && !@_windowskin.disposed? && if @skinformat==0 && @_windowskin && !@_windowskin.disposed? &&
@contents && !@contents.disposed? @contents && !@contents.disposed?
@sprites["scroll0"].visible = @visible && hascontents && @oy > 0 @sprites["scroll0"].visible = @visible && hascontents && @oy > 0
@sprites["scroll1"].visible = @visible && hascontents && @ox > 0 @sprites["scroll1"].visible = @visible && hascontents && @ox > 0
@@ -887,7 +887,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class SpriteWindow_Base < SpriteWindow class SpriteWindow_Base < SpriteWindow
TEXTPADDING=4 # In pixels TEXTPADDING=4 # In pixels
@@ -970,7 +970,7 @@ class SpriteWindow_Base < SpriteWindow
@sysframe=AnimatedBitmap.new(@curframe) @sysframe=AnimatedBitmap.new(@curframe)
@resolvedFrame=nil @resolvedFrame=nil
__setWindowskin(@sysframe.bitmap) __setWindowskin(@sysframe.bitmap)
__resolveSystemFrame() __resolveSystemFrame()
end end
begin begin
refresh refresh
@@ -1000,7 +1000,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
# Represents a window with no formatting capabilities. Its text color can be set, # 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. # though, and line breaks are supported, but the text is generally unformatted.
@@ -1110,7 +1110,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class Window_AdvancedTextPokemon < SpriteWindow_Base class Window_AdvancedTextPokemon < SpriteWindow_Base
attr_reader :text attr_reader :text
@@ -1386,7 +1386,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
return 0 if @lastDrawnChar<0 return 0 if @lastDrawnChar<0
return @numtextchars if @lastDrawnChar>=@fmtchars.length return @numtextchars if @lastDrawnChar>=@fmtchars.length
# index after the last character's index # index after the last character's index
return @fmtchars[@lastDrawnChar][14]+1 return @fmtchars[@lastDrawnChar][14]+1
end end
def maxPosition def maxPosition
@@ -1590,7 +1590,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
refresh if !@frameskipChanged refresh if !@frameskipChanged
updateInternal updateInternal
# following line needed to allow "textspeed=-999" to work seamlessly # following line needed to allow "textspeed=-999" to work seamlessly
refresh if @frameskipChanged refresh if @frameskipChanged
end end
@frameskipChanged = false @frameskipChanged = false
end end
@@ -1611,7 +1611,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class Window_InputNumberPokemon < SpriteWindow_Base class Window_InputNumberPokemon < SpriteWindow_Base
attr_reader :number attr_reader :number
@@ -1724,7 +1724,7 @@ class Window_InputNumberPokemon < SpriteWindow_Base
self.contents.font.color=@shadowColor self.contents.font.color=@shadowColor
pbDrawShadow(self.contents,x+(12-textwidth/2),y, textwidth+4, 32, text) pbDrawShadow(self.contents,x+(12-textwidth/2),y, textwidth+4, 32, text)
self.contents.font.color=@baseColor 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 if @index==i && @active && @frame/15==0
colors=getDefaultTextColors(self.windowskin) colors=getDefaultTextColors(self.windowskin)
self.contents.fill_rect(x+(12-textwidth/2),y+30,textwidth,2,colors[0]) self.contents.fill_rect(x+(12-textwidth/2),y+30,textwidth,2,colors[0])
@@ -1735,7 +1735,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class SpriteWindow_Selectable < SpriteWindow_Base class SpriteWindow_Selectable < SpriteWindow_Base
attr_reader :index attr_reader :index
@@ -1942,7 +1942,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
# self.top_row = row - (self.page_row_max - 1) # self.top_row = row - (self.page_row_max - 1)
# dorefresh=true # dorefresh=true
# end # 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 # self.top_row+=1
# end # end
# self.top_row = [self.top_row, self.row_max - self.page_row_max].min # self.top_row = [self.top_row, self.row_max - self.page_row_max].min
@@ -1966,7 +1966,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
module UpDownArrowMixin module UpDownArrowMixin
def initUpDownArrow def initUpDownArrow
@@ -1997,7 +1997,7 @@ module UpDownArrowMixin
@uparrow.color = value @uparrow.color = value
@downarrow.color = value @downarrow.color = value
end end
def adjustForZoom(sprite) def adjustForZoom(sprite)
sprite.zoom_x = self.zoom_x sprite.zoom_x = self.zoom_x
sprite.zoom_y = self.zoom_y sprite.zoom_y = self.zoom_y
@@ -2029,7 +2029,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class SpriteWindow_SelectableEx < SpriteWindow_Selectable class SpriteWindow_SelectableEx < SpriteWindow_Selectable
include UpDownArrowMixin include UpDownArrowMixin
@@ -2043,7 +2043,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class Window_DrawableCommand < SpriteWindow_SelectableEx class Window_DrawableCommand < SpriteWindow_SelectableEx
attr_reader :baseColor attr_reader :baseColor
@@ -2149,7 +2149,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class Window_CommandPokemon < Window_DrawableCommand class Window_CommandPokemon < Window_DrawableCommand
attr_reader :commands attr_reader :commands
@@ -2198,7 +2198,7 @@ class Window_CommandPokemon < Window_DrawableCommand
def commands=(value) def commands=(value)
@commands=value @commands=value
@item_max=commands.length @item_max=commands.length
self.update_cursor_rect self.update_cursor_rect
self.refresh self.refresh
end end
@@ -2241,14 +2241,14 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class Window_CommandPokemonEx < Window_CommandPokemon class Window_CommandPokemonEx < Window_CommandPokemon
end end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class Window_AdvancedCommandPokemon < Window_DrawableCommand class Window_AdvancedCommandPokemon < Window_DrawableCommand
attr_reader :commands attr_reader :commands
@@ -2363,7 +2363,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class Window_AdvancedCommandPokemonEx < Window_AdvancedCommandPokemon class Window_AdvancedCommandPokemonEx < Window_AdvancedCommandPokemon
end end

View File

@@ -58,7 +58,7 @@ end
class PngAnimatedBitmap class PngAnimatedBitmap
# Creates an animated bitmap from a PNG file. # Creates an animated bitmap from a PNG file.
def initialize(file,hue=0) def initialize(file,hue=0)
@frames=[] @frames=[]
@currentFrame=0 @currentFrame=0
@@ -91,9 +91,9 @@ class PngAnimatedBitmap
end end
def width; self.bitmap.width; end def width; self.bitmap.width; end
def height; self.bitmap.height; end def height; self.bitmap.height; end
def deanimate def deanimate
for i in 1...@frames.length for i in 1...@frames.length
@frames[i].dispose @frames[i].dispose
@@ -207,7 +207,7 @@ class GifBitmap
#File.open("debug.txt","ab") { |f| f.puts("rejecting bitmap") } #File.open("debug.txt","ab") { |f| f.puts("rejecting bitmap") }
bitmap.dispose bitmap.dispose
bitmap=nil bitmap=nil
end end
if bitmap if bitmap
#File.open("debug.txt","ab") { |f| f.puts("reusing bitmap") } #File.open("debug.txt","ab") { |f| f.puts("reusing bitmap") }
# Have a regular non-animated bitmap # Have a regular non-animated bitmap
@@ -348,7 +348,7 @@ end
def pbGetTileBitmap(filename, tile_id, hue) 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; AnimatedBitmap.new("Graphics/Tilesets/"+filename).deanimate;
} }
end end
@@ -482,7 +482,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class AnimatedSprite < SpriteWrapper class AnimatedSprite < SpriteWrapper
attr_reader :frame attr_reader :frame
@@ -597,7 +597,7 @@ class AnimatedSprite < SpriteWrapper
if @playing if @playing
@realframes+=1 @realframes+=1
if @realframes==@frameskip if @realframes==@frameskip
@realframes=0 @realframes=0
self.frame+=1 self.frame+=1
self.frame%=self.framecount self.frame%=self.framecount
end end
@@ -838,7 +838,7 @@ class PictureWindow < SpriteWindow_Base
else else
@_iconbitmap=AnimatedBitmap.new(pathOrBitmap,hue) @_iconbitmap=AnimatedBitmap.new(pathOrBitmap,hue)
self.contents=@_iconbitmap ? @_iconbitmap.bitmap : nil 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 32+self.borderX
self.height=@_iconbitmap ? @_iconbitmap.bitmap.height+self.borderY : self.height=@_iconbitmap ? @_iconbitmap.bitmap.height+self.borderY :
32+self.borderY 32+self.borderY
@@ -854,7 +854,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class Plane class Plane
def update; end def update; end
@@ -900,14 +900,14 @@ class LargePlane < Plane
def ox; @__ox; end def ox; @__ox; end
def oy; @__oy; end def oy; @__oy; end
def ox=(value); def ox=(value);
return if @__ox==value return if @__ox==value
@__ox = value @__ox = value
refresh refresh
end end
def oy=(value); def oy=(value);
return if @__oy==value return if @__oy==value
@__oy = value @__oy = value
refresh refresh
@@ -944,13 +944,13 @@ class LargePlane < Plane
def color; @__sprite.color; end def color; @__sprite.color; end
def tone; @__sprite.tone; end def tone; @__sprite.tone; end
def zoom_x=(v); def zoom_x=(v);
return if @__sprite.zoom_x==v return if @__sprite.zoom_x==v
@__sprite.zoom_x = v @__sprite.zoom_x = v
refresh refresh
end end
def zoom_y=(v); def zoom_y=(v);
return if @__sprite.zoom_y==v return if @__sprite.zoom_y==v
@__sprite.zoom_y = v @__sprite.zoom_y = v
refresh refresh
@@ -1082,4 +1082,4 @@ class AnimatedPlane < LargePlane
return if file==nil return if file==nil
@bitmap=AnimatedBitmap.new(file,hue) @bitmap=AnimatedBitmap.new(file,hue)
end end
end end

View File

@@ -837,13 +837,13 @@ def getFormattedText(bitmap,xDst,yDst,widthDst,heightDst,text,lineheight=32,
for i in 0...characters.length for i in 0...characters.length
c=characters[i] c=characters[i]
if i>0 && (charactersInternal[i][0]!=lastalign || if i>0 && (charactersInternal[i][0]!=lastalign ||
charactersInternal[i][1]!=lasty) charactersInternal[i][1]!=lasty)
# Found end of run # Found end of run
widthblocks.push([runstart,i,lastalign,totalwidth,lasty]) widthblocks.push([runstart,i,lastalign,totalwidth,lasty])
runstart=i runstart=i
totalwidth=0 totalwidth=0
end end
lastalign=charactersInternal[i][0] lastalign=charactersInternal[i][0]
lasty=charactersInternal[i][1] lasty=charactersInternal[i][1]
extraspace=(charactersInternal[i][4]) ? charactersInternal[i][4] : 0 extraspace=(charactersInternal[i][4]) ? charactersInternal[i][4] : 0
totalwidth+=c[3]-extraspace totalwidth+=c[3]-extraspace
@@ -1209,4 +1209,4 @@ def pbDrawImagePositions(bitmap,textpos)
bitmap.blt(x,y,srcbitmap.bitmap,srcrect) bitmap.blt(x,y,srcbitmap.bitmap,srcrect)
srcbitmap.dispose srcbitmap.dispose
end end
end end

View File

@@ -29,7 +29,7 @@ class Game_Message
def visible def visible
return @visible || false return @visible || false
end end
def background def background
return @background || 0 return @background || 0
end end
@@ -48,7 +48,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class Scene_Map class Scene_Map
def updatemini def updatemini
@@ -96,7 +96,7 @@ class Scene_Battle
$game_screen.update $game_screen.update
else else
$game_map.screen.update $game_map.screen.update
end end
# If timer has reached 0 # If timer has reached 0
if $game_system.timer_working and $game_system.timer == 0 if $game_system.timer_working and $game_system.timer == 0
# Abort battle # Abort battle
@@ -158,7 +158,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
def pbEventCommentInput(*args) def pbEventCommentInput(*args)
parameters = [] parameters = []
@@ -284,7 +284,7 @@ module InterpreterMixin
i = (newI>i) ? newI : i+1 i = (newI>i) ? newI : i+1
else else
return i return i
end end
end end
end end
@@ -635,7 +635,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class ChooseNumberParams class ChooseNumberParams
def initialize def initialize
@@ -795,15 +795,15 @@ def pbChooseNumber(msgwindow,params)
end end
cmdwindow.dispose cmdwindow.dispose
Input.update Input.update
return ret return ret
end end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class FaceWindowVX < SpriteWindow_Base class FaceWindowVX < SpriteWindow_Base
def initialize(face) def initialize(face)
super(0,0,128,128) super(0,0,128,128)
faceinfo=face.split(",") faceinfo=face.split(",")
@@ -841,7 +841,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
def pbGetBasicMapNameFromId(id) def pbGetBasicMapNameFromId(id)
begin begin
@@ -877,7 +877,7 @@ def pbCsvField!(str)
end end
end end
str[0,fieldbytes]="" 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) raise _INTL("Invalid quoted field (in: {1})",ret)
end end
str[0,str.length]=$~.post_match str[0,str.length]=$~.post_match
@@ -915,7 +915,7 @@ def pbGetGoldString
if $data_system.respond_to?("words") if $data_system.respond_to?("words")
moneyString=_INTL("{1} {2}",$game_party.gold,$data_system.words.gold) moneyString=_INTL("{1} {2}",$game_party.gold,$data_system.words.gold)
else else
moneyString=_INTL("{1} {2}",$game_party.gold,Vocab.gold) moneyString=_INTL("{1} {2}",$game_party.gold,Vocab.gold)
end end
end end
return moneyString return moneyString
@@ -956,7 +956,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
def pbCreateStatusWindow(viewport=nil) def pbCreateStatusWindow(viewport=nil)
msgwindow=Window_AdvancedTextPokemon.new("") msgwindow=Window_AdvancedTextPokemon.new("")
@@ -1026,7 +1026,7 @@ def pbMessageDisplay(msgwindow,message,letterbyletter=true,commandProc=nil)
text.gsub!(/\\\\/,"\5") text.gsub!(/\\\\/,"\5")
text.gsub!(/\\1/,"\1") text.gsub!(/\\1/,"\1")
if $game_actors if $game_actors
text.gsub!(/\\n\[([1-8])\]/i) { text.gsub!(/\\n\[([1-8])\]/i) {
m = $1.to_i m = $1.to_i
next $game_actors[m].name 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!(/\\b/i,"<c3=3050C8,D0D0C8>")
text.gsub!(/\\r/i,"<c3=E00808,D0D0C8>") text.gsub!(/\\r/i,"<c3=E00808,D0D0C8>")
isDarkSkin = isDarkWindowskin(msgwindow.windowskin) isDarkSkin = isDarkWindowskin(msgwindow.windowskin)
text.gsub!(/\\[Cc]\[([0-9]+)\]/) { text.gsub!(/\\[Cc]\[([0-9]+)\]/) {
m = $1.to_i m = $1.to_i
next getSkinColor(msgwindow.windowskin,m,isDarkSkin) next getSkinColor(msgwindow.windowskin,m,isDarkSkin)
} }
@@ -1054,9 +1054,9 @@ def pbMessageDisplay(msgwindow,message,letterbyletter=true,commandProc=nil)
end until text == last_text end until text == last_text
begin begin
last_text = text.clone last_text = text.clone
text.gsub!(/\\l\[([0-9]+)\]/i) { text.gsub!(/\\l\[([0-9]+)\]/i) {
linecount = [1,$1.to_i].max linecount = [1,$1.to_i].max
next "" next ""
} }
end until text == last_text end until text == last_text
colortag = "" colortag = ""
@@ -1428,4 +1428,4 @@ def pbMessageWaitForInput(msgwindow,frames,showPause=false)
yield if block_given? yield if block_given?
end end
msgwindow.stopPause if msgwindow && showPause msgwindow.stopPause if msgwindow && showPause
end end

View File

@@ -1,5 +1,5 @@
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class Window_CharacterEntry < Window_DrawableCommand class Window_CharacterEntry < Window_DrawableCommand
XSIZE=13 XSIZE=13
@@ -67,12 +67,12 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class CharacterEntryHelper class CharacterEntryHelper
attr_reader :text attr_reader :text
attr_reader :maxlength attr_reader :maxlength
attr_reader :passwordChar attr_reader :passwordChar
attr_accessor :cursor attr_accessor :cursor
def initialize(text) def initialize(text)
@@ -163,7 +163,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class Window_TextEntry < SpriteWindow_Base class Window_TextEntry < SpriteWindow_Base
def initialize(text,x,y,width,height,heading=nil,usedarkercolor=false) def initialize(text,x,y,width,height,heading=nil,usedarkercolor=false)
@@ -205,7 +205,7 @@ class Window_TextEntry < SpriteWindow_Base
end end
def maxlength=(value) def maxlength=(value)
@helper.maxlength=value @helper.maxlength=value
self.refresh self.refresh
end end
@@ -281,7 +281,7 @@ class Window_TextEntry < SpriteWindow_Base
for i in startpos...scanlength for i in startpos...scanlength
c=(@helper.passwordChar!="") ? @helper.passwordChar : textscan[i] c=(@helper.passwordChar!="") ? @helper.passwordChar : textscan[i]
textwidth=bitmap.text_size(c).width textwidth=bitmap.text_size(c).width
next if c=="\n" next if c=="\n"
# Draw text # Draw text
pbDrawShadowText(bitmap,x,y, textwidth+4, 32, c,@baseColor,@shadowColor) pbDrawShadowText(bitmap,x,y, textwidth+4, 32, c,@baseColor,@shadowColor)
# Draw cursor if necessary # Draw cursor if necessary
@@ -300,7 +300,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
def getLineBrokenText(bitmap,value,width,dims) def getLineBrokenText(bitmap,value,width,dims)
x=0 x=0
@@ -367,7 +367,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class Window_MultilineTextEntry < SpriteWindow_Base class Window_MultilineTextEntry < SpriteWindow_Base
def initialize(text,x,y,width,height) def initialize(text,x,y,width,height)
@@ -412,7 +412,7 @@ class Window_MultilineTextEntry < SpriteWindow_Base
end end
def maxlength=(value) def maxlength=(value)
@helper.maxlength=value @helper.maxlength=value
@textchars=nil @textchars=nil
self.refresh self.refresh
end end
@@ -728,7 +728,7 @@ class Window_MultilineTextEntry < SpriteWindow_Base
thispos=textchars[i][6] thispos=textchars[i][6]
thiscolumn=textchars[i][7] thiscolumn=textchars[i][7]
thislength=textchars[i][8] thislength=textchars[i][8]
if thisline==@cursorLine && @cursorColumn>=thiscolumn && if thisline==@cursorLine && @cursorColumn>=thiscolumn &&
@cursorColumn<=thiscolumn+thislength @cursorColumn<=thiscolumn+thislength
cursorY=textchars[i][2]-startY cursorY=textchars[i][2]-startY
cursorX=textchars[i][1] cursorX=textchars[i][1]
@@ -751,7 +751,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class Window_TextEntry_Keyboard < Window_TextEntry class Window_TextEntry_Keyboard < Window_TextEntry
def update def update
@@ -1021,14 +1021,14 @@ class PokemonEntryScene
@sprites["entry2"].setOtherCharset(@@Characters[@symtype][1]) @sprites["entry2"].setOtherCharset(@@Characters[@symtype][1])
else # Insert given character else # Insert given character
if @sprites["entry"].insert(@sprites["entry2"].character) if @sprites["entry"].insert(@sprites["entry2"].character)
pbPlayDecisionSE() pbPlayDecisionSE()
else else
pbPlayBuzzerSE() pbPlayBuzzerSE()
end end
end end
next next
end end
end end
Input.update Input.update
return ret return ret
end end
@@ -1141,7 +1141,7 @@ class PokemonEntryScene2
end end
def update def update
updateInternal updateInternal
end end
def dispose def dispose
@@ -1599,7 +1599,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
def pbEnterText(helptext,minlength,maxlength,initialText="",mode=0,pokemon=nil,nofadeout=false) def pbEnterText(helptext,minlength,maxlength,initialText="",mode=0,pokemon=nil,nofadeout=false)
ret="" ret=""
@@ -1673,4 +1673,4 @@ def pbMessageFreeText(message,currenttext,passwordbox,maxlength,width=240,&block
},&block) },&block)
pbDisposeMessageWindow(msgwindow) pbDisposeMessageWindow(msgwindow)
return retval return retval
end end

View File

@@ -1,32 +1,15 @@
def getCubicPoint2(src,t) class PictureOrigin
x0 = src[0]; y0 = src[1] TopLeft = 0
cx0 = src[2]; cy0 = src[3] Center = 1
cx1 = src[4]; cy1 = src[5] TopRight = 2
x1 = src[6]; y1 = src[7] BottomLeft = 3
LowerLeft = 3
x1 = cx1+(x1-cx1)*t BottomRight = 4
x0 = x0+(cx0-x0)*t LowerRight = 4
cx0 = cx0+(cx1-cx0)*t Top = 5
cx1 = cx0+(x1-cx0)*t Bottom = 6
cx0 = x0+(cx0-x0)*t Left = 7
cx = cx0+(cx1-cx0)*t Right = 8
# a = x1 - 3 * cx1 + 3 * cx0 - x0
# b = 3 * (cx1 - 2 * cx0 + x0)
# c = 3 * (cx0 - x0)
# d = x0
# cx = a*t*t*t + b*t*t + c*t + d
y1 = cy1+(y1-cy1)*t
y0 = y0+(cy0-y0)*t
cy0 = cy0+(cy1-cy0)*t
cy1 = cy0+(y1-cy0)*t
cy0 = y0+(cy0-y0)*t
cy = cy0+(cy1-cy0)*t
# a = y1 - 3 * cy1 + 3 * cy0 - y0
# b = 3 * (cy1 - 2 * cy0 + y0)
# c = 3 * (cy0 - y0)
# d = y0
# cy = a*t*t*t + b*t*t + c*t + d
return [cx,cy]
end end
@@ -54,6 +37,42 @@ end
def getCubicPoint2(src,t)
x0 = src[0]; y0 = src[1]
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
cx1 = cx0+(x1-cx0)*t
cx0 = x0+(cx0-x0)*t
cx = cx0+(cx1-cx0)*t
# a = x1 - 3 * cx1 + 3 * cx0 - x0
# b = 3 * (cx1 - 2 * cx0 + x0)
# c = 3 * (cx0 - x0)
# d = x0
# cx = a*t*t*t + b*t*t + c*t + d
y1 = cy1+(y1-cy1)*t
y0 = y0+(cy0-y0)*t
cy0 = cy0+(cy1-cy0)*t
cy1 = cy0+(y1-cy0)*t
cy0 = y0+(cy0-y0)*t
cy = cy0+(cy1-cy0)*t
# a = y1 - 3 * cy1 + 3 * cy0 - y0
# b = 3 * (cy1 - 2 * cy0 + y0)
# c = 3 * (cy0 - y0)
# d = y0
# cy = a*t*t*t + b*t*t + c*t + d
return [cx,cy]
end
#===============================================================================
# PictureEx
#===============================================================================
class PictureEx class PictureEx
attr_accessor :x # x-coordinate attr_accessor :x # x-coordinate
attr_accessor :y # y-coordinate attr_accessor :y # y-coordinate
@@ -429,6 +448,9 @@ end
#===============================================================================
#
#===============================================================================
def setPictureSprite(sprite, picture, iconSprite=false) def setPictureSprite(sprite, picture, iconSprite=false)
return if picture.frameUpdates.length==0 return if picture.frameUpdates.length==0
for i in 0...picture.frameUpdates.length for i in 0...picture.frameUpdates.length
@@ -495,215 +517,3 @@ end
def setPictureIconSprite(sprite, picture) def setPictureIconSprite(sprite, picture)
setPictureSprite(sprite,picture,true) setPictureSprite(sprite,picture,true)
end end
class PictureOrigin
TopLeft = 0
Center = 1
TopRight = 2
BottomLeft = 3
LowerLeft = 3
BottomRight = 4
LowerRight = 4
Top = 5
Bottom = 6
Left = 7
Right = 8
end
def pbTextBitmap(text, maxwidth=Graphics.width)
dims = []
tmp = Bitmap.new(maxwidth,Graphics.height)
pbSetSystemFont(tmp)
drawFormattedTextEx(tmp,0,0,maxwidth,text,Color.new(248,248,248),Color.new(168,184,184))
return tmp
end
class PictureSprite < SpriteWrapper
def initialize(viewport, picture)
super(viewport)
@picture = picture
@pictureBitmap = nil
@customBitmap = nil
@customBitmapIsBitmap = true
@hue = 0
update
end
def dispose
@pictureBitmap.dispose if @pictureBitmap
super
end
# Doesn't free the bitmap
def setCustomBitmap(bitmap)
@customBitmap = bitmap
@customBitmapIsBitmap = @customBitmap.is_a?(Bitmap)
end
def update
super
@pictureBitmap.update if @pictureBitmap
# If picture file name is different from current one
if @customBitmap && @picture.name==""
self.bitmap = (@customBitmapIsBitmap) ? @customBitmap : @customBitmap.bitmap
elsif @picture_name != @picture.name || @picture.hue.to_i != @hue.to_i
# Remember file name to instance variables
@picture_name = @picture.name
@hue = @picture.hue.to_i
# If file name is not empty
if @picture_name == ""
@pictureBitmap.dispose if @pictureBitmap
@pictureBitmap = nil
self.visible = false
return
end
# Get picture graphic
@pictureBitmap.dispose if @pictureBitmap
@pictureBitmap = AnimatedBitmap.new(@picture_name, @hue)
self.bitmap = (@pictureBitmap) ? @pictureBitmap.bitmap : nil
elsif @picture_name == ""
# Set sprite to invisible
self.visible = false
return
end
setPictureSprite(self,@picture)
end
end
class EventScene
attr_accessor :onCTrigger,:onBTrigger,:onUpdate
def initialize(viewport=nil)
@viewport = viewport
@onCTrigger = Event.new
@onBTrigger = Event.new
@onUpdate = Event.new
@pictures = []
@picturesprites = []
@usersprites = []
@disposed = false
end
def dispose
return if disposed?
for sprite in @picturesprites
sprite.dispose
end
for sprite in @usersprites
sprite.dispose
end
@onCTrigger.clear
@onBTrigger.clear
@onUpdate.clear
@pictures.clear
@picturesprites.clear
@usersprites.clear
@disposed = true
end
def disposed?
return @disposed
end
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
num = @pictures.length
picture = PictureEx.new(num)
picture.setXY(0,x,y)
picture.setVisible(0,true)
@pictures[num] = picture
@picturesprites[num] = PictureSprite.new(@viewport,picture)
@picturesprites[num].setCustomBitmap(bitmap)
return picture
end
def addLabel(x, y, width, text)
addBitmap(x,y,pbTextBitmap(text,width))
end
def addImage(x, y, name)
num = @pictures.length
picture = PictureEx.new(num)
picture.name = name
picture.setXY(0,x,y)
picture.setVisible(0,true)
@pictures[num] = picture
@picturesprites[num] = PictureSprite.new(@viewport,picture)
return picture
end
def addUserSprite(sprite)
@usersprites.push(sprite)
end
def getPicture(num)
return @pictures[num]
end
def wait(frames)
frames.times { update }
end
def pictureWait(extraframes=0)
loop do
hasRunning = false
for pic in @pictures
hasRunning = true if pic.running?
end
break if !hasRunning
update
end
extraframes.times { update }
end
def update
return if disposed?
Graphics.update
Input.update
for picture in @pictures
picture.update
end
for sprite in @picturesprites
sprite.update
end
for sprite in @usersprites
next if !sprite || sprite.disposed? || !sprite.is_a?(Sprite)
sprite.update
end
@onUpdate.trigger(self)
if Input.trigger?(Input::B)
@onBTrigger.trigger(self)
elsif Input.trigger?(Input::C)
@onCTrigger.trigger(self)
end
end
def main
while !disposed?
update
end
end
end
def pbEventScreen(cls)
pbFadeOutIn {
viewport = Viewport.new(0,0,Graphics.width,Graphics.height)
viewport.z = 99999
PBDebug.logonerr {
cls.new(viewport).main
}
viewport.dispose
}
end

View File

@@ -169,4 +169,4 @@ class PointInterpolator
@y = ry1+t*(ry2-ry1) @y = ry1+t*(ry2-ry1)
@curframe += 1 @curframe += 1
end end
end end

View File

@@ -42,7 +42,7 @@ module Graphics
end end
=end =end
@@transition.update if @@transition && !@@transition.disposed? @@transition.update if @@transition && !@@transition.disposed?
@@transition = nil if @@transition && @@transition.disposed? @@transition = nil if @@transition && @@transition.disposed?
end end
def self.judge_special_transition(duration,filename) def self.judge_special_transition(duration,filename)
@@ -97,7 +97,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class BreakingGlass class BreakingGlass
def initialize(numframes) def initialize(numframes)
@@ -161,7 +161,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class ShrinkingPieces class ShrinkingPieces
def initialize(numframes,rotation) def initialize(numframes,rotation)
@@ -228,7 +228,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class SplashTransition class SplashTransition
SPLASH_SIZE = 32 SPLASH_SIZE = 32
@@ -327,7 +327,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class RandomStripeTransition class RandomStripeTransition
RAND_STRIPE_SIZE = 2 RAND_STRIPE_SIZE = 2
@@ -349,7 +349,7 @@ class RandomStripeTransition
@viewport.z = 99999 @viewport.z = 99999
@sprite = Sprite.new(@viewport) @sprite = Sprite.new(@viewport)
@sprite.bitmap = Bitmap.new(Graphics.width,Graphics.height) @sprite.bitmap = Bitmap.new(Graphics.width,Graphics.height)
########## ##########
@direction = direction @direction = direction
size = RAND_STRIPE_SIZE size = RAND_STRIPE_SIZE
bands = ((@direction==0) ? Graphics.width : Graphics.height)/size bands = ((@direction==0) ? Graphics.width : Graphics.height)/size
@@ -412,7 +412,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class ZoomInTransition class ZoomInTransition
def initialize(numframes) def initialize(numframes)
@@ -467,7 +467,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class ScrollScreen class ScrollScreen
def initialize(numframes,direction) def initialize(numframes,direction)
@@ -538,7 +538,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class MosaicTransition class MosaicTransition
def initialize(numframes) def initialize(numframes)
@@ -594,7 +594,7 @@ end
#=============================================================================== #===============================================================================
# #
#=============================================================================== #===============================================================================
class FadeTransition class FadeTransition
def initialize(numframes) def initialize(numframes)
@@ -1614,4 +1614,4 @@ class FourBallBurst
end end
@duration -= 1 @duration -= 1
end end
end end

View File

@@ -0,0 +1,199 @@
class PictureSprite < SpriteWrapper
def initialize(viewport, picture)
super(viewport)
@picture = picture
@pictureBitmap = nil
@customBitmap = nil
@customBitmapIsBitmap = true
@hue = 0
update
end
def dispose
@pictureBitmap.dispose if @pictureBitmap
super
end
# Doesn't free the bitmap
def setCustomBitmap(bitmap)
@customBitmap = bitmap
@customBitmapIsBitmap = @customBitmap.is_a?(Bitmap)
end
def update
super
@pictureBitmap.update if @pictureBitmap
# If picture file name is different from current one
if @customBitmap && @picture.name==""
self.bitmap = (@customBitmapIsBitmap) ? @customBitmap : @customBitmap.bitmap
elsif @picture_name != @picture.name || @picture.hue.to_i != @hue.to_i
# Remember file name to instance variables
@picture_name = @picture.name
@hue = @picture.hue.to_i
# If file name is not empty
if @picture_name == ""
@pictureBitmap.dispose if @pictureBitmap
@pictureBitmap = nil
self.visible = false
return
end
# Get picture graphic
@pictureBitmap.dispose if @pictureBitmap
@pictureBitmap = AnimatedBitmap.new(@picture_name, @hue)
self.bitmap = (@pictureBitmap) ? @pictureBitmap.bitmap : nil
elsif @picture_name == ""
# Set sprite to invisible
self.visible = false
return
end
setPictureSprite(self,@picture)
end
end
def pbTextBitmap(text, maxwidth=Graphics.width)
dims = []
tmp = Bitmap.new(maxwidth,Graphics.height)
pbSetSystemFont(tmp)
drawFormattedTextEx(tmp,0,0,maxwidth,text,Color.new(248,248,248),Color.new(168,184,184))
return tmp
end
#===============================================================================
# EventScene
#===============================================================================
class EventScene
attr_accessor :onCTrigger,:onBTrigger,:onUpdate
def initialize(viewport=nil)
@viewport = viewport
@onCTrigger = Event.new
@onBTrigger = Event.new
@onUpdate = Event.new
@pictures = []
@picturesprites = []
@usersprites = []
@disposed = false
end
def dispose
return if disposed?
for sprite in @picturesprites
sprite.dispose
end
for sprite in @usersprites
sprite.dispose
end
@onCTrigger.clear
@onBTrigger.clear
@onUpdate.clear
@pictures.clear
@picturesprites.clear
@usersprites.clear
@disposed = true
end
def disposed?
return @disposed
end
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
num = @pictures.length
picture = PictureEx.new(num)
picture.setXY(0,x,y)
picture.setVisible(0,true)
@pictures[num] = picture
@picturesprites[num] = PictureSprite.new(@viewport,picture)
@picturesprites[num].setCustomBitmap(bitmap)
return picture
end
def addLabel(x, y, width, text)
addBitmap(x,y,pbTextBitmap(text,width))
end
def addImage(x, y, name)
num = @pictures.length
picture = PictureEx.new(num)
picture.name = name
picture.setXY(0,x,y)
picture.setVisible(0,true)
@pictures[num] = picture
@picturesprites[num] = PictureSprite.new(@viewport,picture)
return picture
end
def addUserSprite(sprite)
@usersprites.push(sprite)
end
def getPicture(num)
return @pictures[num]
end
def wait(frames)
frames.times { update }
end
def pictureWait(extraframes=0)
loop do
hasRunning = false
for pic in @pictures
hasRunning = true if pic.running?
end
break if !hasRunning
update
end
extraframes.times { update }
end
def update
return if disposed?
Graphics.update
Input.update
for picture in @pictures
picture.update
end
for sprite in @picturesprites
sprite.update
end
for sprite in @usersprites
next if !sprite || sprite.disposed? || !sprite.is_a?(Sprite)
sprite.update
end
@onUpdate.trigger(self)
if Input.trigger?(Input::B)
@onBTrigger.trigger(self)
elsif Input.trigger?(Input::C)
@onCTrigger.trigger(self)
end
end
def main
while !disposed?
update
end
end
end
#===============================================================================
#
#===============================================================================
def pbEventScreen(cls)
pbFadeOutIn {
viewport = Viewport.new(0,0,Graphics.width,Graphics.height)
viewport.z = 99999
PBDebug.logonerr {
cls.new(viewport).main
}
viewport.dispose
}
end

View File

@@ -131,4 +131,4 @@ class Scene_Intro
@eventscene.main @eventscene.main
Graphics.freeze Graphics.freeze
end end
end end

View File

@@ -43,4 +43,4 @@ class ButtonEventScene < EventScene
scene.dispose scene.dispose
Graphics.transition(20) Graphics.transition(20)
end end
end end

View File

@@ -228,4 +228,4 @@ _END_
@realOY += @oyChangePerFrame @realOY += @oyChangePerFrame
@credit_sprite.oy = @realOY @credit_sprite.oy = @realOY
end end
end end

View File

@@ -32,7 +32,7 @@ class Scene_Movie
end end
status = " " * 255 status = " " * 255
x=movie.call("play FILE",0,0,0) x=movie.call("play FILE",0,0,0)
loop do loop do
sleep(0.1) sleep(0.1)
@message.call(@temp.to_i,11,0,0) @message.call(@temp.to_i,11,0,0)
Graphics.update Graphics.update
@@ -43,10 +43,10 @@ class Scene_Movie
break if true_status.to_s != "play" break if true_status.to_s != "play"
if Input.trigger?(Input::B) if Input.trigger?(Input::B)
movie.call("close FILE",0,0,0) movie.call("close FILE",0,0,0)
$scene = Scene_Map.new $scene = Scene_Map.new
break break
end end
end end
$scene = Scene_Map.new $scene = Scene_Map.new
end end
end end

View File

@@ -29,7 +29,7 @@ module PhoneMsgType
Generic = 0 Generic = 0
Greeting = 1 Greeting = 1
Body = 2 Body = 2
BattleRequest = 3 BattleRequest = 3
end end
@@ -190,7 +190,7 @@ module PokemonSpeciesData
end end
return ret return ret
end end
def self.optionalValues(compilingForms=false) def self.optionalValues(compilingForms=false)
ret = { ret = {
"Type2" => [SpeciesType2, "e",:PBTypes], "Type2" => [SpeciesType2, "e",:PBTypes],
@@ -469,4 +469,4 @@ def pbClearData
if pbRgssExists?("Data/Tilesets.rvdata") if pbRgssExists?("Data/Tilesets.rvdata")
$data_tilesets = load_data("Data/Tilesets.rvdata") $data_tilesets = load_data("Data/Tilesets.rvdata")
end end
end end

View File

@@ -101,4 +101,4 @@ class PBMove
maxPP = pbGetMoveData(@id,MOVE_TOTAL_PP) || 0 maxPP = pbGetMoveData(@id,MOVE_TOTAL_PP) || 0
return maxPP+maxPP*@ppup/5 return maxPP+maxPP*@ppup/5
end end
end end

View File

@@ -25,4 +25,4 @@ rescue Exception
if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset"
raise $! raise $!
end end
end end

View File

@@ -87,4 +87,4 @@ class PBTypes
e = PBTypes.getCombinedEffectiveness(attackType,targetType1,targetType2,targetType3) e = PBTypes.getCombinedEffectiveness(attackType,targetType1,targetType2,targetType3)
return e>PBTypeEffectiveness::NORMAL_EFFECTIVE return e>PBTypeEffectiveness::NORMAL_EFFECTIVE
end end
end end

View File

@@ -84,4 +84,4 @@ module PBNatures
end end
return ret return ret
end end
end end

View File

@@ -21,4 +21,4 @@ module PBGenderRates
end end
return 255 # Default value (genderless) return 255 # Default value (genderless)
end end
end end

View File

@@ -98,7 +98,7 @@ module PBExperience
# Erratic (600000): # Erratic (600000):
# For levels 0-50: n**3([100-n]/50) # For levels 0-50: n**3([100-n]/50)
# For levels 51-68: n**3([150-n]/100) # For levels 51-68: n**3([150-n]/100)
# For levels 69-98: n**3(1.274-[1/50][n/3]-p(n mod 3)) # For levels 69-98: n**3(1.274-[1/50][n/3]-p(n mod 3))
# where p(x) = array(0.000,0.008,0.014)[x] # where p(x) = array(0.000,0.008,0.014)[x]
# For levels 99-100: n**3([160-n]/100) # For levels 99-100: n**3([160-n]/100)
# Fluctuating (1640000): # Fluctuating (1640000):
@@ -114,7 +114,7 @@ module PBExperience
# Level 101+, use formulae # Level 101+, use formulae
case growth case growth
when PBGrowthRates::Medium # 1000000 when PBGrowthRates::Medium # 1000000
return level ** 3 return level ** 3
when PBGrowthRates::Erratic # 600000 when PBGrowthRates::Erratic # 600000
# Different formula that causes 600000 EXP at level 100 # Different formula that causes 600000 EXP at level 100
return ((level ** 4) * 0.6 / 100).floor return ((level ** 4) * 0.6 / 100).floor
@@ -194,4 +194,4 @@ module PBExperience
end end
return mLevel return mLevel
end end
end end

View File

@@ -63,4 +63,4 @@ rescue Exception
if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset"
raise $! raise $!
end end
end end

View File

@@ -256,4 +256,4 @@ module PBRibbons
] ]
return desc[id] return desc[id]
end end
end end

View File

@@ -39,4 +39,4 @@ module PBEggGroups
] ]
return names[id] return names[id]
end end
end end

View File

@@ -30,4 +30,4 @@ module PBColors
] ]
return names[id] return names[id]
end end
end end

View File

@@ -29,4 +29,4 @@ module PBHabitats
] ]
return names[id] return names[id]
end end
end end

View File

@@ -662,4 +662,4 @@ class PokeBattle_Battler
end end
return @battle.battlers[(@index^1)] return @battle.battlers[(@index^1)]
end end
end end

View File

@@ -323,4 +323,4 @@ class PokeBattle_Battler
@participants.push(b.pokemonIndex) if !@participants.include?(b.pokemonIndex) @participants.push(b.pokemonIndex) if !@participants.include?(b.pokemonIndex)
end end
end end
end end

View File

@@ -298,4 +298,4 @@ class PokeBattle_Battler
end end
def pbHyperMode; end def pbHyperMode; end
end end

View File

@@ -570,4 +570,4 @@ class PokeBattle_Battler
return if hasActiveAbility?(:INNERFOCUS) && !@battle.moldBreaker return if hasActiveAbility?(:INNERFOCUS) && !@battle.moldBreaker
@effects[PBEffects::Flinch] = true @effects[PBEffects::Flinch] = true
end end
end end

View File

@@ -307,4 +307,4 @@ class PokeBattle_Battler
def pbResetStatStages def pbResetStatStages
PBStats.eachBattleStat { |s| @stages[s] = 0 } PBStats.eachBattleStat { |s| @stages[s] = 0 }
end end
end end

View File

@@ -319,4 +319,4 @@ class PokeBattle_Battler
pbHeldItemTriggered(@item) pbHeldItemTriggered(@item)
end end
end end
end end

View File

@@ -190,4 +190,4 @@ class PokeBattle_Battler
pbAddTarget(targets,user,choices[@battle.pbRandom(choices.length)],nearOnly) pbAddTarget(targets,user,choices[@battle.pbRandom(choices.length)],nearOnly)
end end
end end
end end

View File

@@ -127,13 +127,13 @@ class PokeBattle_Battler
@effects[PBEffects::Rage] = false @effects[PBEffects::Rage] = false
# Do nothing if using Snore/Sleep Talk # Do nothing if using Snore/Sleep Talk
if @status==PBStatuses::SLEEP && move.usableWhenAsleep? if @status==PBStatuses::SLEEP && move.usableWhenAsleep?
@battle.pbDisplay(_INTL("{1} ignored orders and kept sleeping!",pbThis)) @battle.pbDisplay(_INTL("{1} ignored orders and kept sleeping!",pbThis))
return false return false
end end
b = ((@level+badgeLevel)*@battle.pbRandom(256)/256).floor b = ((@level+badgeLevel)*@battle.pbRandom(256)/256).floor
# Use another move # Use another move
if b<badgeLevel if b<badgeLevel
@battle.pbDisplay(_INTL("{1} ignored orders!",pbThis)) @battle.pbDisplay(_INTL("{1} ignored orders!",pbThis))
return false if !@battle.pbCanShowFightMenu?(@index) return false if !@battle.pbCanShowFightMenu?(@index)
otherMoves = [] otherMoves = []
eachMoveWithIndex do |m,i| eachMoveWithIndex do |m,i|
@@ -275,7 +275,7 @@ class PokeBattle_Battler
@battle.pbDisplay(_INTL("{1} is in love with {2}!",pbThis, @battle.pbDisplay(_INTL("{1} is in love with {2}!",pbThis,
@battle.battlers[@effects[PBEffects::Attract]].pbThis(true))) @battle.battlers[@effects[PBEffects::Attract]].pbThis(true)))
if @battle.pbRandom(100)<50 if @battle.pbRandom(100)<50
@battle.pbDisplay(_INTL("{1} is immobilized by love!",pbThis)) @battle.pbDisplay(_INTL("{1} is immobilized by love!",pbThis))
@lastMoveFailed = true @lastMoveFailed = true
return false return false
end end
@@ -405,7 +405,7 @@ class PokeBattle_Battler
if move.pbDamagingMove? && PBTypes.ineffective?(typeMod) if move.pbDamagingMove? && PBTypes.ineffective?(typeMod)
PBDebug.log("[Target immune] #{target.pbThis}'s type immunity") PBDebug.log("[Target immune] #{target.pbThis}'s type immunity")
@battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true))) @battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true)))
return false return false
end end
# Dark-type immunity to moves made faster by Prankster # Dark-type immunity to moves made faster by Prankster
if NEWEST_BATTLE_MECHANICS && user.effects[PBEffects::Prankster] && if NEWEST_BATTLE_MECHANICS && user.effects[PBEffects::Prankster] &&
@@ -535,4 +535,4 @@ class PokeBattle_Battler
@battle.pbDisplay(_INTL("{1}'s attack missed!",user.pbThis)) @battle.pbDisplay(_INTL("{1}'s attack missed!",user.pbThis))
end end
end end
end end

View File

@@ -72,7 +72,7 @@ class PokeBattle_Battler
next if b.status!=PBStatuses::FROZEN next if b.status!=PBStatuses::FROZEN
# NOTE: Non-Fire-type moves that thaw the user will also thaw the # NOTE: Non-Fire-type moves that thaw the user will also thaw the
# target (in Gen 6+). # target (in Gen 6+).
if isConst?(move.calcType,PBTypes,:FIRE) || if isConst?(move.calcType,PBTypes,:FIRE) ||
(NEWEST_BATTLE_MECHANICS && move.thawsUser?) (NEWEST_BATTLE_MECHANICS && move.thawsUser?)
b.pbCureStatus b.pbCureStatus
end end
@@ -185,4 +185,4 @@ class PokeBattle_Battler
end end
end end
end end
end end

View File

@@ -27,4 +27,4 @@ rescue Exception
if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset"
raise $! raise $!
end end
end end

View File

@@ -89,7 +89,7 @@ class PokeBattle_Move
def damagingMove?; return @category!=2; end def damagingMove?; return @category!=2; end
def statusMove?; return @category==2; end def statusMove?; return @category==2; end
def usableWhenAsleep?; return false; end def usableWhenAsleep?; return false; end
def unusableInGravity?; return false; end def unusableInGravity?; return false; end
def healingMove?; return false; end def healingMove?; return false; end
@@ -137,4 +137,4 @@ class PokeBattle_Move
end end
return false return false
end end
end end

View File

@@ -23,7 +23,7 @@ class PokeBattle_Move
def pbMissMessage(user,target); return false; end def pbMissMessage(user,target); return false; end
#============================================================================= #=============================================================================
# #
#============================================================================= #=============================================================================
# Whether the move is currently in the "charging" turn of a two turn attack. # Whether the move is currently in the "charging" turn of a two turn attack.
# Is false if Power Herb or another effect lets a two turn move charge and # Is false if Power Herb or another effect lets a two turn move charge and
@@ -347,4 +347,4 @@ class PokeBattle_Move
target.lastFoeAttacker.push(user.index) # For Metal Burst target.lastFoeAttacker.push(user.index) # For Metal Burst
end end
end end
end end

View File

@@ -711,4 +711,4 @@ class PokeBattle_PledgeMove < PokeBattle_Move
id = @overrideAnim if @overrideAnim!=nil id = @overrideAnim if @overrideAnim!=nil
return super return super
end end
end end

View File

@@ -376,13 +376,13 @@ class PokeBattle_Move_094 < PokeBattle_Move
end end
def pbBaseDamage(baseDmg,user,target) def pbBaseDamage(baseDmg,user,target)
return @presentDmg return @presentDmg
end end
def pbEffectAgainstTarget(user,target) def pbEffectAgainstTarget(user,target)
return if @presentDmg>0 return if @presentDmg>0
target.pbRecoverHP(target.totalhp/4) target.pbRecoverHP(target.totalhp/4)
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis)) @battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
end end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
@@ -622,7 +622,7 @@ class PokeBattle_Move_09B < PokeBattle_Move
if n>=5; ret = 120 if n>=5; ret = 120
elsif n>=4; ret = 100 elsif n>=4; ret = 100
elsif n>=3; ret = 80 elsif n>=3; ret = 80
elsif n>=2; ret = 60 elsif n>=2; ret = 60
end end
return ret return ret
end end
@@ -638,7 +638,7 @@ class PokeBattle_Move_09C < PokeBattle_Move
def pbFailsAgainstTarget?(user,target) def pbFailsAgainstTarget?(user,target)
if target.fainted? || target.effects[PBEffects::HelpingHand] if target.fainted? || target.effects[PBEffects::HelpingHand]
@battle.pbDisplay(_INTL("But it failed!")) @battle.pbDisplay(_INTL("But it failed!"))
return true return true
end end
return true if pbMoveFailedTargetAlreadyMoved?(target) return true if pbMoveFailedTargetAlreadyMoved?(target)
@@ -2729,7 +2729,7 @@ class PokeBattle_Move_0DF < PokeBattle_Move
hpGain = (target.totalhp*3/4.0).round hpGain = (target.totalhp*3/4.0).round
end end
target.pbRecoverHP(hpGain) target.pbRecoverHP(hpGain)
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis)) @battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
end end
end end
@@ -2996,15 +2996,15 @@ class PokeBattle_Move_0EB < PokeBattle_Move
if target.hasActiveAbility?(:SUCTIONCUPS) && !@battle.moldBreaker if target.hasActiveAbility?(:SUCTIONCUPS) && !@battle.moldBreaker
@battle.pbShowAbilitySplash(target) @battle.pbShowAbilitySplash(target)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
@battle.pbDisplay(_INTL("{1} anchors itself!",target.pbThis)) @battle.pbDisplay(_INTL("{1} anchors itself!",target.pbThis))
else else
@battle.pbDisplay(_INTL("{1} anchors itself with {2}!",target.pbThis,target.abilityName)) @battle.pbDisplay(_INTL("{1} anchors itself with {2}!",target.pbThis,target.abilityName))
end end
@battle.pbHideAbilitySplash(target) @battle.pbHideAbilitySplash(target)
return true return true
end end
if target.effects[PBEffects::Ingrain] if target.effects[PBEffects::Ingrain]
@battle.pbDisplay(_INTL("{1} anchored itself with its roots!",target.pbThis)) @battle.pbDisplay(_INTL("{1} anchored itself with its roots!",target.pbThis))
return true return true
end end
if @battle.wildBattle? && target.level>user.level if @battle.wildBattle? && target.level>user.level

View File

@@ -278,7 +278,7 @@ class PokeBattle_Move_10D < PokeBattle_Move
def pbFailsAgainstTarget?(user,target) def pbFailsAgainstTarget?(user,target)
if user.pbHasType?(:GHOST) && target.effects[PBEffects::Curse] if user.pbHasType?(:GHOST) && target.effects[PBEffects::Curse]
@battle.pbDisplay(_INTL("But it failed!")) @battle.pbDisplay(_INTL("But it failed!"))
return true return true
end end
return false return false
@@ -1401,7 +1401,7 @@ end
class PokeBattle_Move_142 < PokeBattle_Move class PokeBattle_Move_142 < PokeBattle_Move
def pbFailsAgainstTarget?(user,target) def pbFailsAgainstTarget?(user,target)
if !hasConst?(PBTypes,:GHOST) || target.pbHasType?(:GHOST) || !target.canChangeType? if !hasConst?(PBTypes,:GHOST) || target.pbHasType?(:GHOST) || !target.canChangeType?
@battle.pbDisplay(_INTL("But it failed!")) @battle.pbDisplay(_INTL("But it failed!"))
return true return true
end end
return false return false
@@ -1423,7 +1423,7 @@ end
class PokeBattle_Move_143 < PokeBattle_Move class PokeBattle_Move_143 < PokeBattle_Move
def pbFailsAgainstTarget?(user,target) def pbFailsAgainstTarget?(user,target)
if !hasConst?(PBTypes,:GRASS) || target.pbHasType?(:GRASS) || !target.canChangeType? if !hasConst?(PBTypes,:GRASS) || target.pbHasType?(:GRASS) || !target.canChangeType?
@battle.pbDisplay(_INTL("But it failed!")) @battle.pbDisplay(_INTL("But it failed!"))
return true return true
end end
return false return false
@@ -1547,7 +1547,7 @@ class PokeBattle_Move_148 < PokeBattle_Move
def pbEffectAgainstTarget(user,target) def pbEffectAgainstTarget(user,target)
target.effects[PBEffects::Powder] = true target.effects[PBEffects::Powder] = true
@battle.pbDisplay(_INTL("{1} is covered in powder!",user.pbThis)) @battle.pbDisplay(_INTL("{1} is covered in powder!",user.pbThis))
end end
end end
@@ -2208,7 +2208,7 @@ class PokeBattle_Move_165 < PokeBattle_Move
@battle.choices[target.index][0]==:Shift) && target.movedThisRound?) @battle.choices[target.index][0]==:Shift) && target.movedThisRound?)
target.effects[PBEffects::GastroAcid] = true target.effects[PBEffects::GastroAcid] = true
target.effects[PBEffects::Truant] = false target.effects[PBEffects::Truant] = false
@battle.pbDisplay(_INTL("{1}'s Ability was suppressed!",target.pbThis)) @battle.pbDisplay(_INTL("{1}'s Ability was suppressed!",target.pbThis))
target.pbOnAbilityChanged(target.ability) target.pbOnAbilityChanged(target.ability)
end end
end end
@@ -2434,7 +2434,7 @@ class PokeBattle_Move_16E < PokeBattle_Move
hpGain = (target.totalhp/2.0).round hpGain = (target.totalhp/2.0).round
hpGain = (target.totalhp*2/3.0).round if @battle.field.terrain==PBBattleTerrains::Grassy hpGain = (target.totalhp*2/3.0).round if @battle.field.terrain==PBBattleTerrains::Grassy
target.pbRecoverHP(hpGain) target.pbRecoverHP(hpGain)
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis)) @battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
end end
end end
@@ -2476,7 +2476,7 @@ class PokeBattle_Move_16F < PokeBattle_Move
def pbEffectAgainstTarget(user,target) def pbEffectAgainstTarget(user,target)
return if !@healing return if !@healing
target.pbRecoverHP(target.totalhp/2) target.pbRecoverHP(target.totalhp/2)
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis)) @battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
end end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true) def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
@@ -2623,4 +2623,4 @@ end
# NOTE: If you're inventing new move effects, use function code 176 and onwards. # NOTE: If you're inventing new move effects, use function code 176 and onwards.
# Actually, you might as well use high numbers like 500+ (up to FFFF), # Actually, you might as well use high numbers like 500+ (up to FFFF),
# just to make sure later additions to Essentials don't clash with your # just to make sure later additions to Essentials don't clash with your
# new effects. # new effects.

View File

@@ -29,4 +29,4 @@ rescue Exception
if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset" if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset"
raise $! raise $!
end end
end end

View File

@@ -599,7 +599,7 @@ class PokeBattle_Battle
end end
#============================================================================= #=============================================================================
# #
#============================================================================= #=============================================================================
# Returns the battler representing the Pokémon at index idxParty in its party, # Returns the battler representing the Pokémon at index idxParty in its party,
# on the same side as a battler with battler index of idxBattlerOther. # on the same side as a battler with battler index of idxBattlerOther.
@@ -650,7 +650,7 @@ class PokeBattle_Battle
return if @field.weather==newWeather return if @field.weather==newWeather
@field.weather = newWeather @field.weather = newWeather
duration = (fixedDuration) ? 5 : -1 duration = (fixedDuration) ? 5 : -1
if duration>0 && user && user.itemActive? if duration>0 && user && user.itemActive?
duration = BattleHandlers.triggerWeatherExtenderItem(user.item, duration = BattleHandlers.triggerWeatherExtenderItem(user.item,
@field.weather,duration,user,self) @field.weather,duration,user,self)
end end
@@ -708,7 +708,7 @@ class PokeBattle_Battle
return if @field.terrain==newTerrain return if @field.terrain==newTerrain
@field.terrain = newTerrain @field.terrain = newTerrain
duration = (fixedDuration) ? 5 : -1 duration = (fixedDuration) ? 5 : -1
if duration>0 && user && user.itemActive? if duration>0 && user && user.itemActive?
duration = BattleHandlers.triggerTerrainExtenderItem(user.item, duration = BattleHandlers.triggerTerrainExtenderItem(user.item,
newTerrain,duration,user,self) newTerrain,duration,user,self)
end end
@@ -778,4 +778,4 @@ class PokeBattle_Battle
return if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH return if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
@scene.pbReplaceAbilitySplash(battler) @scene.pbReplaceAbilitySplash(battler)
end end
end end

View File

@@ -376,7 +376,7 @@ class PokeBattle_Battle
moneyLost = oldMoney-pbPlayer.money moneyLost = oldMoney-pbPlayer.money
if moneyLost>0 if moneyLost>0
if trainerBattle? if trainerBattle?
pbDisplayPaused(_INTL("You gave ${1} to the winner...",moneyLost.to_s_formatted)) pbDisplayPaused(_INTL("You gave ${1} to the winner...",moneyLost.to_s_formatted))
else else
pbDisplayPaused(_INTL("You panicked and dropped ${1}...",moneyLost.to_s_formatted)) pbDisplayPaused(_INTL("You panicked and dropped ${1}...",moneyLost.to_s_formatted))
end end
@@ -534,4 +534,4 @@ class PokeBattle_Battle
elsif fainted2; @decision = 1 # Win elsif fainted2; @decision = 1 # Win
end end
end end
end end

View File

@@ -188,7 +188,7 @@ class PokeBattle_Battle
curLevel += 1 curLevel += 1
if curLevel>newLevel if curLevel>newLevel
# Gained all the Exp now, end the animation # Gained all the Exp now, end the animation
pkmn.calcStats pkmn.calcStats
battler.pbUpdate(false) if battler battler.pbUpdate(false) if battler
@scene.pbRefreshOne(battler.index) if battler @scene.pbRefreshOne(battler.index) if battler
break break
@@ -260,4 +260,4 @@ class PokeBattle_Battle
end end
end end
end end
end end

View File

@@ -251,4 +251,4 @@ class PokeBattle_Battle
end end
return ret return ret
end end
end end

View File

@@ -189,7 +189,7 @@ class PokeBattle_Battle
switched.push(idxBattler) switched.push(idxBattler)
else # Player's Pokémon has fainted in a wild battle else # Player's Pokémon has fainted in a wild battle
switch = false switch = false
if !pbDisplayConfirm(_INTL("Use next Pokémon?")) if !pbDisplayConfirm(_INTL("Use next Pokémon?"))
switch = (pbRun(idxBattler,true)<=0) switch = (pbRun(idxBattler,true)<=0)
else else
switch = true switch = true
@@ -408,4 +408,4 @@ class PokeBattle_Battle
battler.pbCheckForm battler.pbCheckForm
return true return true
end end
end end

Some files were not shown because too many files have changed in this diff Show More