From 5d4a342415dc3012e309d906e7dcc01092a61590 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Sat, 31 Oct 2020 16:11:50 +0000 Subject: [PATCH] Removed all code relating to RMVX --- .../003_Game classes/002_Game_System.rb | 9 +- Data/Scripts/003_Game classes/009_Game_Map.rb | 6 +- .../004_Sprites/008_Sprite_AnimationSprite.rb | 2 +- .../006_Game processing/001_Interpreter.rb | 28 ++-- .../007_Events and files/003_Intl_Messages.rb | 6 +- .../009_Objects and windows/007_Messages.rb | 120 ------------------ .../009_Objects and windows/008_TextEntry.rb | 22 ---- .../Scripts/013_Overworld/002_PField_Field.rb | 13 +- .../013_Overworld/003_PField_Visuals.rb | 6 +- .../009_PField_RoamingPokemon.rb | 2 +- Data/Scripts/017_UI/013_PScreen_Load.rb | 3 +- Data/Scripts/017_UI/025_PScreen_Mart.rb | 32 +---- .../002_PSystem_System.rb | 6 +- Data/Scripts/021_Debug/002_Debug_Actions.rb | 2 +- Data/Scripts/022_Compiler/002_Compiler_PBS.rb | 12 +- .../003_Compiler_MapsAndEvents.rb | 39 +----- 16 files changed, 41 insertions(+), 267 deletions(-) diff --git a/Data/Scripts/003_Game classes/002_Game_System.rb b/Data/Scripts/003_Game classes/002_Game_System.rb index 7ad6df994..2980e09c0 100644 --- a/Data/Scripts/003_Game classes/002_Game_System.rb +++ b/Data/Scripts/003_Game classes/002_Game_System.rb @@ -23,13 +23,8 @@ class Game_System attr_accessor :bgm_position def initialize - if $RPGVX - @map_interpreter = Game_Interpreter.new(0,true) - @battle_interpreter = Game_Interpreter.new(0,false) - else - @map_interpreter = Interpreter.new(0,true) - @battle_interpreter = Interpreter.new(0,false) - end + @map_interpreter = Interpreter.new(0, true) + @battle_interpreter = Interpreter.new(0, false) @timer = 0 @timer_working = false @save_disabled = false diff --git a/Data/Scripts/003_Game classes/009_Game_Map.rb b/Data/Scripts/003_Game classes/009_Game_Map.rb index fb949c0a0..7cc43cf8f 100644 --- a/Data/Scripts/003_Game classes/009_Game_Map.rb +++ b/Data/Scripts/003_Game classes/009_Game_Map.rb @@ -31,8 +31,8 @@ class Game_Map TILE_WIDTH = 32 TILE_HEIGHT = 32 - X_SUBPIXELS = ($RPGVX) ? 8 : 4 - Y_SUBPIXELS = ($RPGVX) ? 8 : 4 + X_SUBPIXELS = 4 + Y_SUBPIXELS = 4 REAL_RES_X = TILE_WIDTH * X_SUBPIXELS REAL_RES_Y = TILE_HEIGHT * Y_SUBPIXELS @@ -44,7 +44,7 @@ class Game_Map def setup(map_id) @map_id = map_id - @map = load_data(sprintf("Data/Map%03d.%s",map_id,($RPGVX) ? "rvdata" : "rxdata")) + @map = load_data(sprintf("Data/Map%03d.rxdata",map_id)) tileset = $data_tilesets[@map.tileset_id] updateTileset @fog_ox = 0 diff --git a/Data/Scripts/004_Sprites/008_Sprite_AnimationSprite.rb b/Data/Scripts/004_Sprites/008_Sprite_AnimationSprite.rb index f6ab24d60..15965348c 100644 --- a/Data/Scripts/004_Sprites/008_Sprite_AnimationSprite.rb +++ b/Data/Scripts/004_Sprites/008_Sprite_AnimationSprite.rb @@ -76,7 +76,7 @@ class Spriteset_Map def update return if @tilemap.disposed? - if $RPGVX || $PokemonSystem.tilemap==0 + if $PokemonSystem.tilemap==0 if self.map==$game_map pbDayNightTint(@@viewport3) else diff --git a/Data/Scripts/006_Game processing/001_Interpreter.rb b/Data/Scripts/006_Game processing/001_Interpreter.rb index 52cc81c69..d2ad3eee5 100644 --- a/Data/Scripts/006_Game processing/001_Interpreter.rb +++ b/Data/Scripts/006_Game processing/001_Interpreter.rb @@ -266,16 +266,16 @@ class Interpreter when 402; return command_402 # When [**] when 403; return command_403 # When Cancel when 103; return command_103 # Input Number - when 104; return command_104 # Change Text Options [not in VX] - when 105; return command_105 # Button Input Processing [not in VX] - when 106; return command_106 # Wait [in VX: 230] + when 104; return command_104 # Change Text Options + when 105; return command_105 # Button Input Processing + when 106; return command_106 # Wait when 111; return command_111 # Conditional Branch when 411; return command_411 # Else when 112; return command_112 # Loop when 413; return command_413 # Repeat Above when 113; return command_113 # Break Loop when 115; return command_115 # Exit Event Processing - when 116; return command_116 # Erase Event [in VX: 214] + when 116; return command_116 # Erase Event when 117; return command_117 # Call Common Event when 118; return command_118 # Label when 119; return command_119 # Jump to Label @@ -288,7 +288,7 @@ class Interpreter when 127; return command_127 # Change Weapons when 128; return command_128 # Change Armor when 129; return command_129 # Change Party Member - when 131; return command_131 # Change Windowskin [not in VX] + when 131; return command_131 # Change Windowskin when 132; return command_132 # Change Battle BGM when 133; return command_133 # Change Battle End ME when 134; return command_134 # Change Save Access @@ -298,14 +298,14 @@ class Interpreter when 202; return command_202 # Set Event Location when 203; return command_203 # Scroll Map when 204; return command_204 # Change Map Settings - when 205; return command_205 # Change Fog Color Tone [in VX: Set Move Route] - when 206; return command_206 # Change Fog Opacity [in VX: Get on/off Vehicle] - when 207; return command_207 # Show Animation [in VX: 212] - when 208; return command_208 # Change Transparent Flag [in VX: 211] - when 209; return command_209 # Set Move Route [in VX: 205] + when 205; return command_205 # Change Fog Color Tone + when 206; return command_206 # Change Fog Opacity + when 207; return command_207 # Show Animation + when 208; return command_208 # Change Transparent Flag + when 209; return command_209 # Set Move Route when 210; return command_210 # Wait for Move's Completion - when 221; return command_221 # Prepare for Transition [Not in VX, now called Fadeout Screen] - when 222; return command_222 # Execute Transition [Not in VX, now called Fadein Screen] + when 221; return command_221 # Prepare for Transition + when 222; return command_222 # Execute Transition when 223; return command_223 # Change Screen Color Tone when 224; return command_224 # Screen Flash when 225; return command_225 # Screen Shake @@ -319,8 +319,8 @@ class Interpreter when 242; return command_242 # Fade Out BGM when 245; return command_245 # Play BGS when 246; return command_246 # Fade Out BGS - when 247; return command_247 # Memorize BGM/BGS [not in VX] - when 248; return command_248 # Restore BGM/BGS [not in VX] + when 247; return command_247 # Memorize BGM/BGS + when 248; return command_248 # Restore BGM/BGS when 249; return command_249 # Play ME when 250; return command_250 # Play SE when 251; return command_251 # Stop SE diff --git a/Data/Scripts/007_Events and files/003_Intl_Messages.rb b/Data/Scripts/007_Events and files/003_Intl_Messages.rb index cc33c0f39..52ee6b1a2 100644 --- a/Data/Scripts/007_Events and files/003_Intl_Messages.rb +++ b/Data/Scripts/007_Events and files/003_Intl_Messages.rb @@ -56,7 +56,7 @@ def pbSetTextMessages neednewline=false end if list.code == 101 - lastitem+="#{list.parameters[0]}" if !$RPGVX + lastitem+="#{list.parameters[0]}" neednewline=true elsif list.code == 102 for k in 0...list.parameters[0].length @@ -107,7 +107,7 @@ def pbSetTextMessages t = Time.now.to_i Graphics.update end - filename=sprintf("Data/Map%03d.%s",id,$RPGVX ? "rvdata" : "rxdata") + filename=sprintf("Data/Map%03d.rxdata",id) next if !pbRgssExists?(filename) map = load_data(filename) items=[] @@ -132,7 +132,7 @@ def pbSetTextMessages neednewline=false end if list.code == 101 - lastitem+="#{list.parameters[0]}" if !$RPGVX + lastitem+="#{list.parameters[0]}" neednewline=true elsif list.code == 102 for k in 0...list.parameters[0].length diff --git a/Data/Scripts/009_Objects and windows/007_Messages.rb b/Data/Scripts/009_Objects and windows/007_Messages.rb index 4b7d34c97..9dcdc32f5 100644 --- a/Data/Scripts/009_Objects and windows/007_Messages.rb +++ b/Data/Scripts/009_Objects and windows/007_Messages.rb @@ -382,126 +382,6 @@ end -class Game_Interpreter # Used by RMVX - include InterpreterMixin - eval(InterpreterMixin::CustomEventCommands) - @@immediateDisplayAfterWait=false - @buttonInput=false - - def pbParams - return @params - end - - def command_105 - return false if @buttonInput - @buttonInput=true - pbButtonInputProcessing(@list[@index].parameters[0]) - @buttonInput=false - @index+=1 - return true - end - - def command_101 - if $game_temp.message_window_showing - return false - end - $game_message=Game_Message.new if !$game_message - message="" - commands=nil - numInputVar=nil - numInputDigitsMax=nil - text="" - facename=@list[@index].parameters[0] - faceindex=@list[@index].parameters[1] - if facename && facename!="" - text+="\\ff[#{facename},#{faceindex}]" - end - if $game_message - $game_message.background=@list[@index].parameters[2] - end - $game_system.message_position=@list[@index].parameters[3] - message+=text - messageend="" - loop do - nextIndex=pbNextIndex(@index) - code=@list[nextIndex].code - if code == 401 - text=@list[nextIndex].parameters[0] - text+=" " if text!="" && text[text.length-1,1]!=" " - message+=text - @index=nextIndex - else - if code == 102 - commands=@list[nextIndex].parameters - @index=nextIndex - elsif code == 106 && @@immediateDisplayAfterWait - params=@list[nextIndex].parameters - if params[0]<=10 - nextcode=@list[nextIndex+1].code - if nextcode==101||nextcode==102||nextcode==103 - @index=nextIndex - else - break - end - else - break - end - elsif code == 103 - numInputVar=@list[nextIndex].parameters[0] - numInputDigitsMax=@list[nextIndex].parameters[1] - @index=nextIndex - elsif code == 101 - messageend="\1" - end - break - end - end - message=_MAPINTL($game_map.map_id,message) - @message_waiting=true - if commands - cmdlist=[] - for cmd in commands[0] - cmdlist.push(_MAPINTL($game_map.map_id,cmd)) - end - command=pbMessage(message+messageend,cmdlist,commands[1]) - @branch[@list[@index].indent] = command - elsif numInputVar - params=ChooseNumberParams.new - params.setMaxDigits(numInputDigitsMax) - params.setDefaultValue($game_variables[numInputVar]) - $game_variables[numInputVar]=pbMessageChooseNumber(message+messageend,params) - $game_map.need_refresh = true if $game_map - else - pbMessage(message+messageend) - end - @message_waiting=false - return true - end - - def command_102 - @message_waiting=true - command=pbShowCommands(nil,@list[@index].parameters[0],@list[@index].parameters[1]) - @message_waiting=false - @branch[@list[@index].indent] = command - Input.update # Must call Input.update again to avoid extra triggers - return true - end - - def command_103 - varnumber=@list[@index].parameters[0] - @message_waiting=true - params=ChooseNumberParams.new - params.setMaxDigits(@list[@index].parameters[1]) - params.setDefaultValue($game_variables[varnumber]) - $game_variables[varnumber]=pbChooseNumber(nil,params) - $game_map.need_refresh = true if $game_map - @message_waiting=false - return true - end -end - - - class Interpreter # Used by RMXP include InterpreterMixin eval(InterpreterMixin::CustomEventCommands) diff --git a/Data/Scripts/009_Objects and windows/008_TextEntry.rb b/Data/Scripts/009_Objects and windows/008_TextEntry.rb index 7d723b2f1..4f0b41165 100644 --- a/Data/Scripts/009_Objects and windows/008_TextEntry.rb +++ b/Data/Scripts/009_Objects and windows/008_TextEntry.rb @@ -1533,28 +1533,6 @@ end -class Game_Interpreter - def command_303 - if $Trainer - $Trainer.name=pbEnterPlayerName(_INTL("Your name?"),1,@params[1],$Trainer.name) - return true - end - if $game_actors && $data_actors && $data_actors[@params[0]] != nil - # Set battle abort flag - pbFadeOutIn { - sscene=PokemonEntryScene.new - sscreen=PokemonEntry.new(sscene) - $game_actors[@params[0]].name=sscreen.pbStartScreen( - _INTL("Enter {1}'s name.",$game_actors[@params[0]].name), - 1,@params[1],$game_actors[@params[0]].name) - } - end - return true - end -end - - - #=============================================================================== # #=============================================================================== diff --git a/Data/Scripts/013_Overworld/002_PField_Field.rb b/Data/Scripts/013_Overworld/002_PField_Field.rb index 344f38f16..394e1de26 100644 --- a/Data/Scripts/013_Overworld/002_PField_Field.rb +++ b/Data/Scripts/013_Overworld/002_PField_Field.rb @@ -398,7 +398,7 @@ end Events.onMapChanging += proc { |_sender,e| newMapID = e[0] if newMapID>0 - mapinfos = ($RPGVX) ? load_data("Data/MapInfos.rvdata") : load_data("Data/MapInfos.rxdata") + mapinfos = load_data("Data/MapInfos.rxdata") oldWeather = pbGetMetadata($game_map.map_id,MetadataWeather) if $game_map.name!=mapinfos[newMapID].name $game_screen.weather(0,0,0) if oldWeather @@ -418,7 +418,7 @@ Events.onMapChange += proc { |_sender,e| $PokemonEncounters.setup($game_map.map_id) if $PokemonEncounters $PokemonGlobal.visitedMaps[$game_map.map_id] = true if oldid!=0 && oldid!=$game_map.map_id - mapinfos = ($RPGVX) ? load_data("Data/MapInfos.rvdata") : load_data("Data/MapInfos.rxdata") + mapinfos = load_data("Data/MapInfos.rxdata") weather = pbGetMetadata($game_map.map_id,MetadataWeather) if $game_map.name!=mapinfos[oldid].name $game_screen.weather(weather[0],8,20) if weather && rand(100)0 && mapInfos[oldMapID] && mapInfos[oldMapID].name && $game_map.name==mapInfos[oldMapID].name # Make roaming Pokémon roam diff --git a/Data/Scripts/017_UI/013_PScreen_Load.rb b/Data/Scripts/017_UI/013_PScreen_Load.rb index 9db9aaf7d..27c77deef 100644 --- a/Data/Scripts/017_UI/013_PScreen_Load.rb +++ b/Data/Scripts/017_UI/013_PScreen_Load.rb @@ -259,8 +259,7 @@ class PokemonLoadScreen savefile = RTP.getSaveFileName("Game.rxdata") FontInstaller.install data_system = pbLoadRxData("Data/System") - mapfile = ($RPGVX) ? sprintf("Data/Map%03d.rvdata",data_system.start_map_id) : - sprintf("Data/Map%03d.rxdata",data_system.start_map_id) + mapfile = sprintf("Data/Map%03d.rxdata",data_system.start_map_id) if data_system.start_map_id==0 || !pbRgssExists?(mapfile) pbMessage(_INTL("No starting position was set in the map editor.\1")) pbMessage(_INTL("The game cannot continue.")) diff --git a/Data/Scripts/017_UI/025_PScreen_Mart.rb b/Data/Scripts/017_UI/025_PScreen_Mart.rb index ea79f4259..94ad6a0e5 100644 --- a/Data/Scripts/017_UI/025_PScreen_Mart.rb +++ b/Data/Scripts/017_UI/025_PScreen_Mart.rb @@ -84,7 +84,7 @@ end #=============================================================================== -# Abstraction layer for RPG Maker XP/VX +# Abstraction layer for RPG Maker XP # Won't be used if $PokemonBag exists #=============================================================================== class RpgxpMartAdapter @@ -894,33 +894,3 @@ class Interpreter setPrice(item,-1,sellprice) end end - - - -class Game_Interpreter - def getItem(p) - if p[0]==0; return $data_items[p[1]] - elsif p[0]==1; return $data_weapons[p[1]] - elsif p[0]==2; return $data_armors[p[1]] - end - return nil - end - - def command_302 - shop_goods = [getItem(@params)] - # Loop - loop do - # Advance index - @index += 1 - # If next event command has shop on second line or after - if @list[@index].code == 605 - # Add goods list to new item - shop_goods.push(getItem(@list[@index].parameters)) - else - # End - pbPokemonMart(shop_goods.compact,nil,@params[2]) - return true - end - end - end -end diff --git a/Data/Scripts/020_System and utilities/002_PSystem_System.rb b/Data/Scripts/020_System and utilities/002_PSystem_System.rb index c6e07ebd6..cc1b76c4c 100644 --- a/Data/Scripts/020_System and utilities/002_PSystem_System.rb +++ b/Data/Scripts/020_System and utilities/002_PSystem_System.rb @@ -9,11 +9,7 @@ def pbSafeLoad(file) end def pbLoadRxData(file) # :nodoc: - if $RPGVX - return load_data(file+".rvdata") - else - return load_data(file+".rxdata") - end + return load_data(file+".rxdata") end def pbChooseLanguage diff --git a/Data/Scripts/021_Debug/002_Debug_Actions.rb b/Data/Scripts/021_Debug/002_Debug_Actions.rb index b53cb4057..cb7a41659 100644 --- a/Data/Scripts/021_Debug/002_Debug_Actions.rb +++ b/Data/Scripts/021_Debug/002_Debug_Actions.rb @@ -410,7 +410,7 @@ class SpriteWindow_DebugRoamers < Window_DrawableCommand # roaming curmap = $PokemonGlobal.roamPosition[index] if curmap - mapinfos = ($RPGVX) ? load_data("Data/MapInfos.rvdata") : load_data("Data/MapInfos.rxdata") + mapinfos = load_data("Data/MapInfos.rxdata") status = "[ROAMING][#{curmap}: #{mapinfos[curmap].name}]" else status = "[ROAMING][map not set]" diff --git a/Data/Scripts/022_Compiler/002_Compiler_PBS.rb b/Data/Scripts/022_Compiler/002_Compiler_PBS.rb index 951c9d3cc..b82eb9be2 100644 --- a/Data/Scripts/022_Compiler/002_Compiler_PBS.rb +++ b/Data/Scripts/022_Compiler/002_Compiler_PBS.rb @@ -652,21 +652,13 @@ end #=============================================================================== def pbCompileAnimations begin - if $RPGVX - pbanims = load_data("Data/PkmnAnimations.rvdata") - else - pbanims = load_data("Data/PkmnAnimations.rxdata") - end + pbanims = load_data("Data/PkmnAnimations.rxdata") rescue pbanims = PBAnimations.new end move2anim = [[],[]] =begin - if $RPGVX - anims = load_data("Data/Animations.rvdata") - else - anims = load_data("Data/Animations.rxdata") - end + anims = load_data("Data/Animations.rxdata") for anim in anims next if !anim || anim.frames.length==1 found = false diff --git a/Data/Scripts/022_Compiler/003_Compiler_MapsAndEvents.rb b/Data/Scripts/022_Compiler/003_Compiler_MapsAndEvents.rb index 55828207a..4d027bcf4 100644 --- a/Data/Scripts/022_Compiler/003_Compiler_MapsAndEvents.rb +++ b/Data/Scripts/022_Compiler/003_Compiler_MapsAndEvents.rb @@ -6,13 +6,9 @@ def pbImportNewMaps mapfiles = {} # Get IDs of all maps in the Data folder Dir.chdir("Data") { - mapData = sprintf("Map*.%s",$RPGVX ? "rvdata" : "rxdata") + mapData = sprintf("Map*.rxdata") for map in Dir.glob(mapData) - if $RPGVX - mapfiles[$1.to_i(10)] = true if map[/map(\d+)\.rvdata/i] - else - mapfiles[$1.to_i(10)] = true if map[/map(\d+)\.rxdata/i] - end + mapfiles[$1.to_i(10)] = true if map[/map(\d+)\.rxdata/i] end } mapinfos = pbLoadRxData("Data/MapInfos") @@ -38,11 +34,7 @@ def pbImportNewMaps count += 1 end if imported - if $RPGVX - save_data(mapinfos,"Data/MapInfos.rvdata") - else - save_data(mapinfos,"Data/MapInfos.rxdata") - end + save_data(mapinfos,"Data/MapInfos.rxdata") pbMessage(_INTL("{1} new map(s) copied to the Data folder were successfully imported.",count)) end return imported @@ -121,10 +113,6 @@ def pbPushText(list,text,indent=0) textsplit = text.split(/\\m/) for t in textsplit first = true - if $RPGVX - list.push(RPG::EventCommand.new(101,indent,["",0,0,2])) - first = false - end textsplit2 = t.split(/\n/) for i in 0...textsplit2.length textchunk = textsplit2[i].gsub(/\s+$/,"") @@ -265,9 +253,7 @@ class MapData end def mapFilename(mapID) - filename = sprintf("Data/map%03d",mapID) - filename += ($RPGVX) ? ".rvdata" : ".rxdata" - return filename + return sprintf("Data/Map%03d.rxdata",mapID) end def getMap(mapID) @@ -322,7 +308,6 @@ class MapData end def isPassable?(mapID,x,y) - return true if $RPGVX map = getMap(mapID) return false if !map return false if x<0 || x>=map.width || y<0 || y>=map.height @@ -343,7 +328,6 @@ class MapData end def isCounterTile?(mapID,x,y) - return false if $RPGVX map = getMap(mapID) return false if !map passages = getTilesetPassages(map,mapID) @@ -361,7 +345,6 @@ class MapData end def setCounterTile(mapID,x,y) - return if $RPGVX map = getMap(mapID) return if !map passages = getTilesetPassages(map,mapID) @@ -390,11 +373,9 @@ class MapData end def saveTilesets - filename = "Data/Tilesets" - filename += ($RPGVX) ? ".rvdata" : ".rxdata" + filename = "Data/Tilesets.rxdata" save_data(@tilesets,filename) - filename = "Data/System" - filename += ($RPGVX) ? ".rvdata" : ".rxdata" + filename = "Data/System.rxdata" save_data(@system,filename) end end @@ -1455,11 +1436,5 @@ def pbCompileTrainerEvents(_mustcompile) commonEvents[key] = newevent; changed = true end end - if changed - if $RPGVX - save_data(commonEvents,"Data/CommonEvents.rvdata") - else - save_data(commonEvents,"Data/CommonEvents.rxdata") - end - end + save_data(commonEvents,"Data/CommonEvents.rxdata") if changed end