Added: TilemapXP Changed: PokemonMap @@ -579,2 +579,2 @@ - return false if dispx>=map.width*128+768 - return false if dispy>=map.height*128+768 + return false if dispx>=map.width*Game_Map.realResX+768 + return false if dispy>=map.height*Game_Map.realResY+768 @@ -587,2 +587,2 @@ - return false if dispx>=dims[0]*128+768 - return false if dispy>=dims[1]*128+768 + return false if dispx>=dims[0]*Game_Map.realResX+768 + return false if dispy>=dims[1]*Game_Map.realResY+768 @@ -840,2 +840,2 @@ - newdispx=(conn[4]-conn[1]) * 128 + mapA.display_x - newdispy=(conn[5]-conn[2]) * 128 + mapA.display_y + newdispx=(conn[4]-conn[1]) * Game_Map.realResX + mapA.display_x + newdispy=(conn[5]-conn[2]) * Game_Map.realResY + mapA.display_y @@ -849,2 +849,2 @@ - newdispx=(conn[1]-conn[4]) * 128 + mapA.display_x - newdispy=(conn[2]-conn[5]) * 128 + mapA.display_y + newdispx=(conn[1]-conn[4]) * Game_Map.realResX + mapA.display_x + newdispy=(conn[2]-conn[5]) * Game_Map.realResY + mapA.display_y Changed: PokeBattle_Effects @@ -47,0 +47,1 @@ + @battle.pbCommonAnimation("Poison",attacker,self) @@ -54,0 +55,1 @@ + @battle.pbCommonAnimation("Burn",attacker,self) @@ -61,0 +63,1 @@ + @battle.pbCommonAnimation("Paralysis",attacker,self) @@ -70,0 +73,1 @@ + @battle.pbCommonAnimation("Sleep",self,nil) @@ -75,0 +79,1 @@ + @battle.pbCommonAnimation("Frozen",self,nil) @@ -79,0 +84,1 @@ + @battle.pbCommonAnimation("Confusion",self,nil) @@ -319,2 +325,2 @@ - abilityname=PBAbilities.getName(ability) - @battle.pbDisplay(_INTL("{1}'s {2} prevents Accuracy loss!",pbThis,abilityname)) if showMessages + abilityname=PBAbilities.getName(ability) + @battle.pbDisplay(_INTL("{1}'s {2} prevents Accuracy loss!",pbThis,abilityname)) if showMessages @@ -359,0 +365,1 @@ + @battle.pbCommonAnimation("StatDown",attacker,self) @@ -389,0 +396,1 @@ + @battle.pbCommonAnimation("StatDown",opponent,self) Changed: PokeBattle_MoveEffects @@ -129,0 +129,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -143,0 +144,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -161,0 +163,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -182,0 +185,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -676,0 +680,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -691,0 +696,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -706,0 +712,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -721,0 +728,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -736,0 +744,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -935,0 +944,1 @@ + @battle.pbCommonAnimation("Confusion",attacker,opponent) @@ -1237,1 +1247,1 @@ - types[types.length]=i if PokeBattle_Move::PBTypeChart[atype+otype]<2 + types[types.length]=i if PBTypes::PBTypeChart[atype+otype]<2 @@ -1253,1 +1263,1 @@ - @battle.pbAnimation(@id,attacker,nil) + @battle.pbAnimation(@id,attacker,opponent) @@ -1503,0 +1513,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -1522,0 +1533,1 @@ + @battle.pbCommonAnimation("StatDown",attacker,nil) @@ -1528,0 +1540,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -1534,0 +1547,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -1692,0 +1706,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,opponent) @@ -1697,0 +1712,1 @@ + @battle.pbCommonAnimation("Confusion",attacker,opponent) @@ -2013,0 +2029,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -2023,0 +2040,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -2031,0 +2049,1 @@ + haveanim=false @@ -2033,0 +2052,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) if !haveanim; haveanim=true @@ -2037,0 +2057,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) if !haveanim; haveanim=true @@ -2041,0 +2062,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) if !haveanim; haveanim=true @@ -2045,0 +2067,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) if !haveanim; haveanim=true @@ -2049,0 +2072,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) if !haveanim; haveanim=true @@ -2072,0 +2096,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -2117,0 +2142,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -2313,0 +2339,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -2464,0 +2491,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,opponent) @@ -2469,0 +2497,1 @@ + @battle.pbCommonAnimation("Confusion",attacker,opponent) @@ -2511,0 +2540,1 @@ + @battle.pbCommonAnimation("StatDown",attacker,opponent) if fail==-1 @@ -2518,0 +2548,1 @@ + @battle.pbCommonAnimation("StatDown",attacker,opponent) if fail==-1 @@ -2782,0 +2813,1 @@ + @battle.pbCommonAnimation("StatDown",attacker,nil) @@ -2786,0 +2818,1 @@ + @battle.pbCommonAnimation("StatDown",attacker,nil) @@ -3027,0 +3060,1 @@ + @battle.pbCommonAnimation("Confusion",attacker,opponent) @@ -3056,0 +3090,1 @@ + @battle.pbCommonAnimation("Confusion",attacker,opponent) @@ -3121,0 +3156,1 @@ + @battle.pbCommonAnimation("StatDown",attacker,nil) @@ -3151,0 +3187,1 @@ + @battle.pbCommonAnimation("StatDown",attacker,opponent) @@ -3158,0 +3195,1 @@ + @battle.pbCommonAnimation("StatDown",attacker,opponent) @@ -3172,0 +3210,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -3195,1 +3234,2 @@ - if !attacker.pbTooHigh?(PBStats::ATTACK) + @battle.pbCommonAnimation("StatUp",attacker,nil) + if !attacker.pbTooHigh?(PBStats::ATTACK) @@ -3241,0 +3281,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -3245,0 +3286,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -3260,0 +3302,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) @@ -3264,0 +3307,1 @@ + @battle.pbCommonAnimation("StatUp",attacker,nil) Changed: PokeBattle_Move @@ -643,222 +643,5 @@ - function=movedata.function - moveclasses=[ - PokeBattle_Move_00, - PokeBattle_Move_01, - PokeBattle_Move_02, - PokeBattle_Move_03, - PokeBattle_Move_04, - PokeBattle_Move_05, - PokeBattle_Move_06, - PokeBattle_Move_07, - PokeBattle_Move_08, - PokeBattle_Move_09, - PokeBattle_Move_0A, - PokeBattle_Move_0B, - PokeBattle_Move_0C, - PokeBattle_Move_0D, - PokeBattle_Move_0E, - PokeBattle_Move_0F, - PokeBattle_Move_10, - PokeBattle_Move_11, - PokeBattle_Move_12, - PokeBattle_Move_13, - PokeBattle_Move_14, - PokeBattle_Move_15, - PokeBattle_Move_16, - PokeBattle_Move_17, - PokeBattle_Move_18, - PokeBattle_Move_19, - PokeBattle_Move_1A, - PokeBattle_Move_1B, - PokeBattle_Move_1C, - PokeBattle_Move_1D, - PokeBattle_Move_1E, - PokeBattle_Move_1F, - PokeBattle_Move_20, - PokeBattle_Move_21, - PokeBattle_Move_22, - PokeBattle_Move_23, - PokeBattle_Move_24, - PokeBattle_Move_25, - PokeBattle_Move_26, - PokeBattle_Move_27, - PokeBattle_Move_28, - PokeBattle_Move_29, - PokeBattle_Move_2A, - PokeBattle_Move_2B, - PokeBattle_Move_2C, - PokeBattle_Move_2D, - PokeBattle_Move_2E, - PokeBattle_Move_2F, - PokeBattle_Move_30, - PokeBattle_Move_31, - PokeBattle_Move_32, - PokeBattle_Move_33, - PokeBattle_Move_34, - PokeBattle_Move_35, - PokeBattle_Move_36, - PokeBattle_Move_37, - PokeBattle_Move_38, - PokeBattle_Move_39, - PokeBattle_Move_3A, - PokeBattle_Move_3B, - PokeBattle_Move_3C, - PokeBattle_Move_3D, - PokeBattle_Move_3E, - PokeBattle_Move_3F, - PokeBattle_Move_40, - PokeBattle_Move_41, - PokeBattle_Move_42, - PokeBattle_Move_43, - PokeBattle_Move_44, - PokeBattle_Move_45, - PokeBattle_Move_46, - PokeBattle_Move_47, - PokeBattle_Move_48, - PokeBattle_Move_49, - PokeBattle_Move_4A, - PokeBattle_Move_4B, - PokeBattle_Move_4C, - PokeBattle_Move_4D, - PokeBattle_Move_4E, - PokeBattle_Move_4F, - PokeBattle_Move_50, - PokeBattle_Move_51, - PokeBattle_Move_52, - PokeBattle_Move_53, - PokeBattle_Move_54, - PokeBattle_Move_55, - PokeBattle_Move_56, - PokeBattle_Move_57, - PokeBattle_Move_58, - PokeBattle_Move_59, - PokeBattle_Move_5A, - PokeBattle_Move_5B, - PokeBattle_Move_5C, - PokeBattle_Move_5D, - PokeBattle_Move_5E, - PokeBattle_Move_5F, - PokeBattle_Move_60, - PokeBattle_Move_61, - PokeBattle_Move_62, - PokeBattle_Move_63, - PokeBattle_Move_64, - PokeBattle_Move_65, - PokeBattle_Move_66, - PokeBattle_Move_67, - PokeBattle_Move_68, - PokeBattle_Move_69, - PokeBattle_Move_6A, - PokeBattle_Move_6B, - PokeBattle_Move_6C, - PokeBattle_Move_6D, - PokeBattle_Move_6E, - PokeBattle_Move_6F, - PokeBattle_Move_70, - PokeBattle_Move_71, - PokeBattle_Move_72, - PokeBattle_Move_73, - PokeBattle_Move_74, - PokeBattle_Move_75, - PokeBattle_Move_76, - PokeBattle_Move_77, - PokeBattle_Move_78, - PokeBattle_Move_79, - PokeBattle_Move_7A, - PokeBattle_Move_7B, - PokeBattle_Move_7C, - PokeBattle_Move_7D, - PokeBattle_Move_7E, - PokeBattle_Move_7F, - PokeBattle_Move_80, - PokeBattle_Move_81, - PokeBattle_Move_82, - PokeBattle_Move_83, - PokeBattle_Move_84, - PokeBattle_Move_85, - PokeBattle_Move_86, - PokeBattle_Move_87, - PokeBattle_Move_88, - PokeBattle_Move_89, - PokeBattle_Move_8A, - PokeBattle_Move_8B, - PokeBattle_Move_8C, - PokeBattle_Move_8D, - PokeBattle_Move_8E, - PokeBattle_Move_8F, - PokeBattle_Move_90, - PokeBattle_Move_91, - PokeBattle_Move_92, - PokeBattle_Move_93, - PokeBattle_Move_94, - PokeBattle_Move_95, - PokeBattle_Move_96, - PokeBattle_Move_97, - PokeBattle_Move_98, - PokeBattle_Move_99, - PokeBattle_Move_9A, - PokeBattle_Move_9B, - PokeBattle_Move_9C, - PokeBattle_Move_9D, - PokeBattle_Move_9E, - PokeBattle_Move_9F, - PokeBattle_Move_A0, - PokeBattle_Move_A1, - PokeBattle_Move_A2, - PokeBattle_Move_A3, - PokeBattle_Move_A4, - PokeBattle_Move_A5, - PokeBattle_Move_A6, - PokeBattle_Move_A7, - PokeBattle_Move_A8, - PokeBattle_Move_A9, - PokeBattle_Move_AA, - PokeBattle_Move_AB, - PokeBattle_Move_AC, - PokeBattle_Move_AD, - PokeBattle_Move_AE, - PokeBattle_Move_AF, - PokeBattle_Move_B0, - PokeBattle_Move_B1, - PokeBattle_Move_B2, - PokeBattle_Move_B3, - PokeBattle_Move_B4, - PokeBattle_Move_B5, - PokeBattle_Move_B6, - PokeBattle_Move_B7, - PokeBattle_Move_B8, - PokeBattle_Move_B9, - PokeBattle_Move_BA, - PokeBattle_Move_BB, - PokeBattle_Move_BC, - PokeBattle_Move_BD, - PokeBattle_Move_BE, - PokeBattle_Move_BF, - PokeBattle_Move_C0, - PokeBattle_Move_C1, - PokeBattle_Move_C2, - PokeBattle_Move_C3, - PokeBattle_Move_C4, - PokeBattle_Move_C5, - PokeBattle_Move_C6, - PokeBattle_Move_C7, - PokeBattle_Move_C8, - PokeBattle_Move_C9, - PokeBattle_Move_CA, - PokeBattle_Move_CB, - PokeBattle_Move_CC, - PokeBattle_Move_CD, - PokeBattle_Move_CE, - PokeBattle_Move_CF, - PokeBattle_Move_D0, - PokeBattle_Move_D1, - PokeBattle_Move_D2, - PokeBattle_Move_D3, - PokeBattle_Move_D4, - PokeBattle_Move_D5 - ] - return moveclasses[function].new(battle,move) -end - - -end + return eval(sprintf("PokeBattle_Move_%02X.new(battle,move)",movedata.function)) +end + + +end Changed: AnimationSprite @@ -14,2 +14,2 @@ - self.x=((@tileX*128)-@map.display_x+3)/4+16 - self.y=((@tileY*128)-@map.display_y+3)/4+32 + self.x=((@tileX*Game_Map.realResX)-@map.display_x+3)/4+(Game_Map::TILEWIDTH/2) + self.y=((@tileY*Game_Map.realResY)-@map.display_y+3)/4+(Game_Map::TILEHEIGHT) @@ -24,2 +24,2 @@ - self.x=((@tileX*128)-@map.display_x+3)/4+16 - self.y=((@tileY*128)-@map.display_y+3)/4+32 + self.x=((@tileX*Game_Map.realResX)-@map.display_x+3)/4+(Game_Map::TILEWIDTH/2) + self.y=((@tileY*Game_Map.realResY)-@map.display_y+3)/4+(Game_Map::TILEHEIGHT) Changed: Resolution* @@ -1,12 +1,0 @@ -class Game_Player < Game_Character -def center(x, y) - center_x = (Graphics.width/2 - 16) * 4 # X coordinate in the center of the screen - center_y = (Graphics.height/2 - 16) * 4 # Y coordinate in the center of the screen - max_x = ($game_map.width - Graphics.width/32.0) * 128 - max_y = ($game_map.height - Graphics.height/32.0) * 128 - dispx=x * 128 - center_x - dispy=y * 128 - center_y - $game_map.display_x = dispx#[0, [dispx, max_x].min].max - $game_map.display_y = dispy#[0, [dispy, max_y].min].max -end -end @@ -15,0 +3,8 @@ +TILEWIDTH = 32 +TILEHEIGHT = 32 +def self.realResX + return 4 * TILEWIDTH +end +def self.realResY + return 4 * TILEHEIGHT +end @@ -23,-1 +19,8 @@ +def start_scroll(direction, distance, speed) + @scroll_direction = direction + if direction==2 || direction==8 + @scroll_rest = distance * Game_Map.realResY + else + @scroll_rest = distance * Game_Map.realResX + end + @scroll_speed = speed @@ -35,1 +40,14 @@ -end +end + +class Game_Player < Game_Character +def center(x, y) + center_x = (Graphics.width/2 - Game_Map::TILEWIDTH/2) * 4 # X coordinate in the center of the screen + center_y = (Graphics.height/2 - Game_Map::TILEHEIGHT/2) * 4 # Y coordinate in the center of the screen + max_x = ($game_map.width - Graphics.width*1.0/Game_Map::TILEWIDTH) * Game_Map.realResX + max_y = ($game_map.height - Graphics.height*1.0/Game_Map::TILEHEIGHT) * Game_Map.realResY + dispx=x * Game_Map.realResX - center_x + dispy=y * Game_Map.realResY - center_y + $game_map.display_x = dispx#[0, [dispx, max_x].min].max + $game_map.display_y = dispy#[0, [dispy, max_y].min].max +end +end Added: TilemapLoader Changed: PerspectiveTilemap @@ -126,1 +126,1 @@ - Pitch = 10 + Pitch = 5 Changed: Sprite_Character @@ -58,2 +58,2 @@ - self.ox = 16 - self.oy = 32 + self.ox = Game_Map::TILEWIDTH/2 + self.oy = Game_Map::TILEHEIGHT Changed: PokemonField @@ -362,8 +362,4 @@ - if pbInSafari? - return pbSafariBattle(species,level) - end - if pbInBugContest? - return pbBugContestBattle(species,level) - end - if Input.press?(Input::CTRL) && $DEBUG - Kernel.pbMessage(_INTL("SKIPPING BATTLE...")) + if (Input.press?(Input::CTRL) && $DEBUG) || $Trainer.pokemonCount==0 + if $Trainer.pokemonCount>0 + Kernel.pbMessage(_INTL("SKIPPING BATTLE...")) + end @@ -443,1 +439,1 @@ - if Input.press?(Input::CTRL) && $DEBUG + if (Input.press?(Input::CTRL) && $DEBUG) || $Trainer.pokemonCount==0 Changed: PokeBattle_ActualScene @@ -1419,0 +1419,2 @@ + @battleboxvp=Viewport.new(0,0,Graphics.width,Graphics.height) + @battleboxvp.z=99999 @@ -1420,1 +1422,1 @@ - @msgviewport.z=100000 + @msgviewport.z=100001 @@ -1457,2 +1459,2 @@ - @sprites["battler0"]=PokemonDataBox.new(battle.battlers[0],battle.doublebattle,@viewport) - @sprites["battler1"]=PokemonDataBox.new(battle.battlers[1],battle.doublebattle,@viewport) + @sprites["battler0"]=PokemonDataBox.new(battle.battlers[0],battle.doublebattle,@battleboxvp) + @sprites["battler1"]=PokemonDataBox.new(battle.battlers[1],battle.doublebattle,@battleboxvp) @@ -1460,2 +1462,2 @@ - @sprites["battler2"]=PokemonDataBox.new(battle.battlers[2],battle.doublebattle,@viewport) - @sprites["battler3"]=PokemonDataBox.new(battle.battlers[3],battle.doublebattle,@viewport) + @sprites["battler2"]=PokemonDataBox.new(battle.battlers[2],battle.doublebattle,@battleboxvp) + @sprites["battler3"]=PokemonDataBox.new(battle.battlers[3],battle.doublebattle,@battleboxvp) @@ -2288,0 +2290,11 @@ +def pbCommonAnimation(animname,attacker,opponent,side=true) + animations=load_data("Data/PkmnAnimations.rxdata") + for i in 0...animations.length + if animations[i] && animations[i].name=="Common:"+animname + pbAnimationCore(animations[i],attacker,opponent,side) + return + end + end +end + + @@ -2289,1 +2302,8 @@ - if !attacker + animid=pbFindAnimation(moveid) + return if !animid + animations=load_data("Data/PkmnAnimations.rxdata") + pbAnimationCore(animations[animid],attacker,opponent,side) +end + +def pbAnimationCore(animation,attacker,opponent,side=true) + if !attacker || !animation @@ -2299,3 +2319,0 @@ - animations=load_data("Data/PkmnAnimations.rxdata") - animid=pbFindAnimation(moveid) - return if !animid @@ -2304,1 +2321,1 @@ - animations[animid],user,user,@viewport + animation,user,user,@viewport @@ -2317,1 +2334,1 @@ - animations[animid],user,target,@viewport + animation,user,target,@viewport Changed: PokemonTrainers @@ -335,0 +335,6 @@ + if $Trainer.pokemonCount==0 + if $DEBUG + Kernel.pbMessage(_INTL("SKIPPING BATTLE...")) + end + return false + end Deleted: WindowAndTilemap Changed: PokemonWeather @@ -9,2 +9,4 @@ - @sandstormBitmap1=Bitmap.new(128,128) - @sandstormBitmap2=Bitmap.new(128,128) + bmwidth=200 + bmheight=200 + @sandstormBitmap1=Bitmap.new(bmwidth,bmheight) + @sandstormBitmap2=Bitmap.new(bmwidth,bmheight) @@ -20,3 +22,3 @@ - for i in 0..256 - @sandstormBitmap1.fill_rect(rand(64)*2, rand(64)*2, 2,2,sandstormColors[rand(7)]) - @sandstormBitmap2.fill_rect(rand(64)*2, rand(64)*2, 2,2,sandstormColors[rand(7)]) + for i in 0..600 + @sandstormBitmap1.fill_rect(rand(bmwidth/2)*2, rand(bmheight/2)*2, 2,2,sandstormColors[rand(7)]) + @sandstormBitmap2.fill_rect(rand(bmwidth/2)*2, rand(bmheight/2)*2, 2,2,sandstormColors[rand(7)]) @@ -102,0 +104,5 @@ + if @type==4 + sprite.mirror=(rand(2)==0) ? true : false + else + sprite.mirror=false + end @@ -180,0 +187,5 @@ + if @type==4 + sprite.mirror=(rand(2)==0) ? true : false + else + sprite.mirror=false + end Changed: Game_System @@ -49,1 +49,3 @@ - print "BGM File not found, game will continue playing.\nFile : " + bgm.name + if $DEBUG + print "BGM File not found, game will continue playing.\nFile : " + bgm.name + end @@ -95,1 +97,3 @@ - print "BGS File not found, game will continue playing. \nFile : " + bgs.name + if $DEBUG + print "BGS File not found, game will continue playing. \nFile : " + bgs.name + end @@ -140,0 +144,1 @@ + if $DEBUG @@ -141,0 +146,1 @@ + end @@ -155,0 +161,1 @@ + if $DEBUG @@ -156,0 +163,1 @@ + end Changed: PBAnimation @@ -123,0 +123,58 @@ +class RPG::Animation + def self.fromOther(otherAnim,id) + ret=RPG::Animation.new + ret.id=id + ret.name=otherAnim.name.clone + ret.animation_name=otherAnim.animation_name.clone + ret.animation_hue=otherAnim.animation_hue + ret.position=otherAnim.position + return ret + end + def addSound(frame,se) + timing=RPG::Animation::Timing.new + timing.frame=frame + timing.se=RPG::AudioFile.new(se,100) + self.timings.push(timing) + end + def addAnimation(otherAnim,frame,x,y) # frame is zero-based + if frame+otherAnim.frames.length>=self.frames.length + totalframes=frame+otherAnim.frames.length+1 + for i in self.frames.length...totalframes + self.frames.push(RPG::Animation::Frame.new) + end + end + self.frame_max=self.frames.length + for i in 0...otherAnim.frame_max + thisframe=self.frames[frame+i] + otherframe=otherAnim.frames[i] + cellStart=thisframe.cell_max + thisframe.cell_max+=otherframe.cell_max + thisframe.cell_data.resize(thisframe.cell_max,8) + for j in 0...otherframe.cell_max + thisframe.cell_data[cellStart+j,0]=otherframe.cell_data[j,0] + thisframe.cell_data[cellStart+j,1]=otherframe.cell_data[j,1]+x + thisframe.cell_data[cellStart+j,2]=otherframe.cell_data[j,2]+y + thisframe.cell_data[cellStart+j,3]=otherframe.cell_data[j,3] + thisframe.cell_data[cellStart+j,4]=otherframe.cell_data[j,4] + thisframe.cell_data[cellStart+j,5]=otherframe.cell_data[j,5] + thisframe.cell_data[cellStart+j,6]=otherframe.cell_data[j,6] + thisframe.cell_data[cellStart+j,7]=otherframe.cell_data[j,7] + end + end + for i in 0...otherAnim.timings.length + timing=RPG::Animation::Timing.new + othertiming=otherAnim.timings[i] + timing.frame=frame+othertiming.frame + timing.se=RPG::AudioFile.new( + othertiming.se.name.clone, + othertiming.se.volume, + othertiming.se.pitch) + timing.flash_scope=othertiming.flash_scope + timing.flash_color=othertiming.flash_color.clone + timing.flash_duration=othertiming.flash_duration + timing.condition=othertiming.condition + self.timings.push(timing) + end + self.timings.sort!{|a,b| a.frame<=>b.frame } + end +end Changed: Audio @@ -120,25 +120,34 @@ - end - at_exit { w32_FL.call(@handle) } - AudioContextIsActive=Win32API.new("audio.dll","AudioContextIsActive","l","l") - AudioContextPlay=Win32API.new("audio.dll","AudioContextPlay","lpllll","") - AudioContextStop=Win32API.new("audio.dll","AudioContextStop","l","") - AudioContextFadeOut=Win32API.new("audio.dll","AudioContextFadeOut","ll","") - AudioContextGetPosition=Win32API.new("audio.dll","AudioContextGetPosition","l","l") - AudioContextFadeIn=Win32API.new("audio.dll","AudioContextFadeIn","ll","") - AudioContextSetVolume=bgmstop=Win32API.new("audio.dll","AudioContextSetVolume","ll","") - AudioContextSEPlay=Win32API.new("audio.dll","AudioContextSEPlay","lplll","") - if !@MEContext - @MEContext=AudioContext.new - at_exit { @MEContext.dispose } - end - if !@BGMContext - @BGMContext=AudioContext.new - at_exit { @BGMContext.dispose } - end - if !@BGSContext - @BGSContext=AudioContext.new - at_exit { @BGSContext.dispose } - end - if !@SEContext - @SEContext=AudioContext.new - at_exit { @SEContext.dispose } + at_exit { w32_FL.call(@handle) } + AudioContextIsActive=Win32API.new("audio.dll","AudioContextIsActive","l","l") + AudioContextPlay=Win32API.new("audio.dll","AudioContextPlay","lpllll","") + AudioContextStop=Win32API.new("audio.dll","AudioContextStop","l","") + AudioContextFadeOut=Win32API.new("audio.dll","AudioContextFadeOut","ll","") + AudioContextGetPosition=Win32API.new("audio.dll","AudioContextGetPosition","l","l") + AudioContextFadeIn=Win32API.new("audio.dll","AudioContextFadeIn","ll","") + AudioContextSetVolume=bgmstop=Win32API.new("audio.dll","AudioContextSetVolume","ll","") + AudioContextSEPlay=Win32API.new("audio.dll","AudioContextSEPlay","lplll","") + if !@MEContext + @MEContext=AudioContext.new + at_exit { @MEContext.dispose } + end + if !@BGMContext + @BGMContext=AudioContext.new + at_exit { @BGMContext.dispose } + end + if !@BGSContext + @BGSContext=AudioContext.new + at_exit { @BGSContext.dispose } + end + if !@SEContext + @SEContext=AudioContext.new + at_exit { @SEContext.dispose } + end + else + AudioContextIsActive=nil + AudioContextPlay=nil + AudioContextStop=nil + AudioContextFadeOut=nil + AudioContextGetPosition=nil + AudioContextFadeIn=nil + AudioContextSetVolume=bgmstop=nil + AudioContextSEPlay=nil Changed: Map Scroll @@ -75,3 +75,0 @@ - CENTER_X = (320 - 16) * 4 - CENTER_Y = (240 - 16) * 4 - @@ -94,4 +91,6 @@ - max_x = ($game_map.width - 20) * 128 - max_y = ($game_map.height - 15) * 128 - count_x = ($game_map.display_x - [0,[x*128-CENTER_X,max_x].min].max)/128 - count_y = ($game_map.display_y - [0,[y*128-CENTER_Y,max_y].min].max)/128 + center_x = (Graphics.width/2 - Game_Map::TILEWIDTH/2) * 4 # X coordinate in the center of the screen + center_y = (Graphics.height/2 - Game_Map::TILEHEIGHT/2) * 4 # Y coordinate in the center of the screen + max_x = ($game_map.width - Graphics.width*1.0/Game_Map::TILEWIDTH) * 4 * Game_Map::TILEWIDTH + max_y = ($game_map.height - Graphics.height*1.0/Game_Map::TILEHEIGHT) * 4 * Game_Map::TILEHEIGHT + count_x = ($game_map.display_x - [0,[x*Game_Map.realResX-center_x,max_x].min].max)/Game_Map.realResX + count_y = ($game_map.display_y - [0,[y*Game_Map.realResY-center_y,max_y].min].max)/Game_Map.realResY @@ -154,2 +153,2 @@ - @display_x = [@display_x + distance, (self.width - 20) * 128].min - @display_y = [@display_y + distance, (self.height - 15) * 128].min + @display_x = [@display_x + distance, (self.width - Graphics.width*1.0/Game_Map::TILEWIDTH) * Game_Map.realResX].min + @display_y = [@display_y + distance, (self.height - Graphics.height*1.0/Game_Map::TILEHEIGHT) * Game_Map.realResY].min @@ -160,1 +159,1 @@ - @display_y = [@display_y + distance, (self.height - 15) * 128].min + @display_y = [@display_y + distance, (self.height - Graphics.height*1.0/Game_Map::TILEHEIGHT) * Game_Map.realResY].min @@ -164,1 +163,1 @@ - @display_x = [@display_x + distance, (self.width - 20) * 128].min + @display_x = [@display_x + distance, (self.width - Graphics.width*1.0/Game_Map::TILEWIDTH) * Game_Map.realResX].min Changed: Spriteset_Map @@ -68,1 +68,1 @@ - currentY=@event.real_y.to_i/128 + currentY=@event.real_y.to_i/(4*Game_Map::TILEHEIGHT) @@ -73,1 +73,1 @@ - while i<@rsprite.src_rect.height+32 + while i<@rsprite.src_rect.height+Game_Map::TILEHEIGHT @@ -76,1 +76,1 @@ - limit= ((nextY * 128)-@event.map.display_y+3).to_i/4 + limit= ((nextY * (4*Game_Map::TILEHEIGHT))-@event.map.display_y+3).to_i/4 @@ -82,1 +82,1 @@ - i+=32 + i+=Game_Map::TILEHEIGHT @@ -122,1 +122,1 @@ - currentY=@event.real_y.to_i/128 + currentY=@event.real_y.to_i/(4*Game_Map::TILEHEIGHT) @@ -216,1 +216,1 @@ - [@tilemap.map_data.xsize*32-tmox,Graphics.width].min + [@tilemap.map_data.xsize*Game_Map::TILEWIDTH-tmox,Graphics.width].min @@ -218,1 +218,1 @@ - [@tilemap.map_data.ysize*32-tmoy,Graphics.height].min + [@tilemap.map_data.ysize*Game_Map::TILEHEIGHT-tmoy,Graphics.height].min Changed: Game_Character 1 @@ -84,1 +84,1 @@ - return (@real_x != @x * 128 or @real_y != @y * 128) + return (@real_x != @x * 4 * Game_Map::TILEWIDTH or @real_y != @y * 4 * Game_Map::TILEHEIGHT) @@ -203,2 +203,2 @@ - @real_x = @x * 128 - @real_y = @y * 128 + @real_x = @x * Game_Map.realResX + @real_y = @y * Game_Map.realResY @@ -208,1 +208,1 @@ - return (@real_x - self.map.display_x + 3) / 4 + 16 + return (@real_x - self.map.display_x + 3) / 4 + (Game_Map::TILEWIDTH/2) @@ -211,1 +211,1 @@ - y = (@real_y - self.map.display_y + 3) / 4 + 32 + y = (@real_y - self.map.display_y + 3) / 4 + (Game_Map::TILEHEIGHT) Changed: Game_Character 2 @@ -73,2 +73,2 @@ - @real_x = (@real_x * @jump_count + @x * 128) / (@jump_count + 1) - @real_y = (@real_y * @jump_count + @y * 128) / (@jump_count + 1) + @real_x = (@real_x * @jump_count + @x * Game_Map.realResX) / (@jump_count + 1) + @real_y = (@real_y * @jump_count + @y * Game_Map.realResY) / (@jump_count + 1) @@ -80,1 +80,0 @@ - # 移動速度からマップ座標系での移動距離に変換 @@ -82,21 +81,14 @@ - # 論理座標が実座標より下の場合 - if @y * 128 > @real_y - # 下に移動 - @real_y = [@real_y + distance, @y * 128].min - end - # 論理座標が実座標より左の場合 - if @x * 128 < @real_x - # 左に移動 - @real_x = [@real_x - distance, @x * 128].max - end - # 論理座標が実座標より右の場合 - if @x * 128 > @real_x - # 右に移動 - @real_x = [@real_x + distance, @x * 128].min - end - # 論理座標が実座標より上の場合 - if @y * 128 < @real_y - # 上に移動 - @real_y = [@real_y - distance, @y * 128].max - end - # 移動時アニメが ON の場合 + realResX=Game_Map.realResX + realResY=Game_Map.realResY + if @y * realResY > @real_y + @real_y = [@real_y + distance, @y * realResY].min + end + if @x * realResX < @real_x + @real_x = [@real_x - distance, @x * realResX].max + end + if @x * realResX > @real_x + @real_x = [@real_x + distance, @x * realResX].min + end + if @y * realResY < @real_y + @real_y = [@real_y - distance, @y * realResY].max + end @@ -104,1 +96,0 @@ - # アニメカウントを 1.5 増やす @@ -106,1 +97,0 @@ - # 移動時アニメが OFF で、停止時アニメが ON の場合 @@ -108,1 +98,0 @@ - # アニメカウントを 1 増やす Changed: PBDebug @@ -12,1 +12,1 @@ - pbPrintException($!) + #pbPrintException($!) Changed: SpriteWindow @@ -116,1 +116,1 @@ -def pbEnsureBitmap(bitmap,dwidth,dheight) +def pbDoEnsureBitmap(bitmap,dwidth,dheight) @@ -684,0 +684,1 @@ + attr_reader :contents_blend_type @@ -709,1 +710,2 @@ - @contents=nil + @blankcontents=Bitmap.new(1,1) # RGSS2 requires this + @contents=@blankcontents @@ -727,0 +729,1 @@ + @contents_blend_type=0 @@ -749,0 +752,1 @@ + @blankcontents.dispose @@ -1058,1 +1062,1 @@ - @sprites["contents"].blend_type=0 + @sprites["contents"].blend_type=@contents_blend_type @@ -1068,1 +1072,1 @@ - @sprites["cursor"].visible=supported && @visible + @sprites["cursor"].visible=supported && @visible && @openness==255 @@ -1082,1 +1086,1 @@ -# @sprites["contents"].blend_type=@blend_type + @sprites["contents"].blend_type=@contents_blend_type @@ -1352,0 +1356,5 @@ + else + for k in @spritekeys + sprite=@sprites[k] + sprite.zoom_y=1.0 + end @@ -1646,1 +1655,4 @@ - self.contents=pbEnsureBitmap(self.contents,dwidth,dheight) + self.contents=pbDoEnsureBitmap(self.contents,dwidth,dheight) + if @starting + pbSetSystemFont(self.contents) + end @@ -1782,1 +1794,1 @@ - self.contents=pbEnsureBitmap(self.contents,dwidth,dheight) + self.contents=pbDoEnsureBitmap(self.contents,dwidth,dheight) @@ -1852,1 +1864,1 @@ - self.contents=pbEnsureBitmap(self.contents,self.width-32,self.height-32) + self.contents=pbDoEnsureBitmap(self.contents,self.width-32,self.height-32) @@ -2053,1 +2065,1 @@ - self.contents=pbEnsureBitmap(oldcontents,@bitmapwidth,@bitmapheight) + self.contents=pbDoEnsureBitmap(oldcontents,@bitmapwidth,@bitmapheight) Changed: PokemonUtilities @@ -769,1 +769,1 @@ -def pbDebugPokemonOld(player,btpokemon) +def pbDebugPokemon(player) @@ -771,1 +771,1 @@ - if false + if true @@ -792,2 +792,2 @@ -=begin -def pbDebugPokemon(player) + +def pbDebugPokemonBT(player) @@ -836,1 +836,0 @@ -=end @@ -1122,1 +1121,1 @@ - +#pbDebugBattles Changed: PokeBattle_Battle @@ -2306,0 +2306,6 @@ +def pbCommonAnimation(name,attacker,opponent,side=true) + if @battlescene + @scene.pbCommonAnimation(name,attacker,opponent,side) + end +end + @@ -2691,0 +2697,1 @@ + pbCommonAnimation("Poison",i,nil) @@ -2705,0 +2712,1 @@ + pbCommonAnimation("Burn",i,nil) @@ -2770,0 +2778,1 @@ + pbCommonAnimation("Confusion",i,nil) Changed: PokeBattle_Battler @@ -599,0 +599,1 @@ + @battle.pbCommonAnimation("Confusion",self,nil) @@ -1579,0 +1580,1 @@ + @battle.pbCommonAnimation("Sleep",self,nil) @@ -1585,1 +1587,1 @@ - if self.status==PBStatuses::FROZEN && thismove.function!=0x7D # FLAME WHEEL + if self.status==PBStatuses::FROZEN @@ -1589,1 +1591,1 @@ - else + elsif thismove.function!=0x7D # FLAME WHEEL @@ -1591,0 +1593,1 @@ + @battle.pbCommonAnimation("Frozen",self,nil) @@ -1646,0 +1649,1 @@ + @battle.pbCommonAnimation("Confusion",self,nil) @@ -1656,0 +1660,1 @@ + @battle.pbCommonAnimation("Paralysis",self,nil) Added: Window Changed: PokeBattle_Scene @@ -706,0 +706,12 @@ +def pbCommonAnimation(moveid,attacker,opponent,side=true) + if attacker + if opponent + PBDebug.log("[pbCommonAnimation #{moveid} (#{attacker.pbThis}, #{opponent.pbThis}]") + else + PBDebug.log("[pbCommonAnimation #{moveid} (#{attacker.pbThis}]") + end + else + PBDebug.log("[pbCommonAnimation #{moveid}]") + end +end + Changed: PokemonDebug @@ -765,0 +765,2 @@ + Kernel.pbDisplayMessageFancy(msgwindow, + _INTL("Alternatively, rename the \"intl.dat\" file to \"messages.dat\" and put the file in the project's Data folder.")) Changed: PokemonBugContest @@ -371,2 +371,4 @@ - if Input.press?(Input::CTRL) && $DEBUG - Kernel.pbMessage(_INTL("SKIPPING BATTLE...")) + if (Input.press?(Input::CTRL) && $DEBUG) || $Trainer.pokemonCount==0 + if $Trainer.pokemonCount>0 + Kernel.pbMessage(_INTL("SKIPPING BATTLE...")) + end Added: TilemapXP Changed: PokemonMap Changed: PokeBattle_Effects Changed: PokeBattle_MoveEffects Changed: PokeBattle_Move Changed: AnimationSprite Changed: Resolution* Added: TilemapLoader Changed: PerspectiveTilemap Changed: Sprite_Character Changed: PokemonField Changed: PokeBattle_ActualScene Changed: PokemonTrainers Deleted: WindowAndTilemap Changed: PokemonWeather Changed: Game_System Changed: PBAnimation Changed: Audio Changed: Map Scroll Changed: Spriteset_Map Changed: Game_Character 1 Changed: Game_Character 2 Changed: PBDebug Changed: SpriteWindow Changed: PokemonUtilities Changed: PokeBattle_Battle Changed: PokeBattle_Battler Added: Window Changed: PokeBattle_Scene Changed: PokemonDebug Changed: PokemonBugContest