diff --git a/Data/Scripts/001_Settings.rb b/Data/Scripts/001_Settings.rb index 6ca61554b..bc8a3c9ee 100644 --- a/Data/Scripts/001_Settings.rb +++ b/Data/Scripts/001_Settings.rb @@ -16,8 +16,13 @@ module Settings NB_POKEMON = 420 CUSTOM_BATTLERS_FOLDER="Graphics/CustomBattlers/" BATTLERS_FOLDER="Graphics/Battlers/" - FRONTSPRITE_POSITION_OFFSET = 75 - BACKSPRITE_POSITION_OFFSET = 60 + FRONTSPRITE_POSITION_OFFSET = 15 + FRONTSPRITE_SCALE = 0.6666666 + BACKRPSPRITE_SCALE = 1 + + BACKSPRITE_POSITION_OFFSET = 20 + + # The generation that the battle system follows. Used throughout the battle # scripts, and also by some other settings which are used in and out of battle # (you can of course change those settings to suit your game). diff --git a/Data/Scripts/007_Objects and windows/008_AnimatedBitmap.rb b/Data/Scripts/007_Objects and windows/008_AnimatedBitmap.rb index aa89f425d..07249ebc0 100644 --- a/Data/Scripts/007_Objects and windows/008_AnimatedBitmap.rb +++ b/Data/Scripts/007_Objects and windows/008_AnimatedBitmap.rb @@ -18,15 +18,6 @@ class AnimatedBitmap end end - # def initialize(file,hue=0) - # raise "filename is nil" if file==nil - # if file[/^\[(\d+)\]/] - # @bitmap=PngAnimatedBitmap.new(file,hue) - # else - # @bitmap=GifBitmap.new(file,hue) - # end - # end - def pbSetColor(r = 0, g = 0, b = 0, a = 255) for i in 0..@bitmap.bitmap.width for j in 0..@bitmap.bitmap.height @@ -90,6 +81,22 @@ class AnimatedBitmap @bitmap.copy; end + def scale_bitmap(scale) + return if scale == 1 + new_width = @bitmap.bitmap.width * scale + new_height = @bitmap.bitmap.height * scale + + destination_rect = Rect.new(0, 0, new_width, new_height) + source_rect = Rect.new(0, 0, @bitmap.bitmap.width, @bitmap.bitmap.height) + new_bitmap = Bitmap.new(new_width,new_height) + new_bitmap.stretch_blt( + destination_rect, + @bitmap.bitmap, + source_rect + ) + @bitmap.bitmap = new_bitmap + end + def mirror for x in 0..@bitmap.bitmap.width / 2 for y in 0..@bitmap.bitmap.height - 2 diff --git a/Data/Scripts/011_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb b/Data/Scripts/011_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb index c73aada38..721e21175 100644 --- a/Data/Scripts/011_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb +++ b/Data/Scripts/011_Battle/005_Battle scene/004_PokeBattle_SceneElements.rb @@ -551,6 +551,12 @@ class PokemonBattlerSprite < RPG::Sprite @_iconBitmap.dispose if @_iconBitmap @_iconBitmap = GameData::Species.sprite_bitmap_from_pokemon(@pkmn, back) @_iconBitmap.mirror if back + if back + @_iconBitmap.scale_bitmap(Settings::BACKRPSPRITE_SCALE) + else + @_iconBitmap.scale_bitmap(Settings::FRONTSPRITE_SCALE) + end + self.bitmap = (@_iconBitmap) ? @_iconBitmap.bitmap : nil pbSetPosition end diff --git a/Data/Scripts/011_Battle/005_Battle scene/006_PokeBattle_Scene.rb b/Data/Scripts/011_Battle/005_Battle scene/006_PokeBattle_Scene.rb index 78e0d09d7..8062535c2 100644 --- a/Data/Scripts/011_Battle/005_Battle scene/006_PokeBattle_Scene.rb +++ b/Data/Scripts/011_Battle/005_Battle scene/006_PokeBattle_Scene.rb @@ -320,8 +320,8 @@ class PokeBattle_Scene pkmnSprite = @sprites["pokemon_#{idxBattler}"] shadowSprite = @sprites["shadow_#{idxBattler}"] back = !@battle.opposes?(idxBattler) - pkmnSprite.setPokemonBitmap(pkmn,back) shadowSprite.setPokemonBitmap(pkmn) + pkmnSprite.setPokemonBitmap(pkmn,back) # Set visibility of battler's shadow shadowSprite.visible = pkmn.species_data.shows_shadow? if shadowSprite && !back end