mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-12 07:35:00 +00:00
6.7.1 patch fixes
This commit is contained in:
@@ -139,29 +139,30 @@ def getCurrentPokeball(allowEasterEgg=true)
|
||||
return nil
|
||||
end
|
||||
|
||||
def generate_front_trainer_sprite_bitmap_from_appearance(trainerAppearance)
|
||||
def generate_front_trainer_sprite_bitmap_from_appearance(trainerAppearance,is_trainer=true)
|
||||
echoln trainerAppearance.hat
|
||||
return generate_front_trainer_sprite_bitmap(false,nil,trainerAppearance.clothes,trainerAppearance.hat,trainerAppearance.hat2,
|
||||
trainerAppearance.hair,trainerAppearance.skin_color,
|
||||
trainerAppearance.hair_color,trainerAppearance.hat_color,trainerAppearance.clothes_color,
|
||||
trainerAppearance.hat2_color)
|
||||
trainerAppearance.hat2_color,
|
||||
is_trainer)
|
||||
end
|
||||
|
||||
def generate_front_trainer_sprite_bitmap(allowEasterEgg=true, pokeball = nil,
|
||||
clothes_id = nil, hat_id = nil, hat2_id=nil, hair_id = nil,
|
||||
skin_tone_id = nil, hair_color = nil, hat_color = nil, clothes_color = nil,
|
||||
hat2_color = nil)
|
||||
hat2_color = nil, is_trainer=true)
|
||||
|
||||
clothes_id = $Trainer.clothes if !clothes_id
|
||||
hat_id = $Trainer.hat if !hat_id
|
||||
hat2_id = $Trainer.hat2 if !hat2_id
|
||||
clothes_id = $Trainer.clothes if !clothes_id && is_trainer
|
||||
hat_id = $Trainer.hat if !hat_id && is_trainer
|
||||
hat2_id = $Trainer.hat2 if !hat2_id && is_trainer
|
||||
|
||||
hair_id = $Trainer.hair if !hair_id
|
||||
skin_tone_id = $Trainer.skin_tone if !skin_tone_id
|
||||
hair_color = $Trainer.hair_color if !hair_color
|
||||
hat_color = $Trainer.hat_color if !hat_color
|
||||
hat2_color = $Trainer.hat2_color if !hat2_color
|
||||
clothes_color = $Trainer.clothes_color if !clothes_color
|
||||
hair_id = $Trainer.hair if !hair_id && is_trainer
|
||||
skin_tone_id = $Trainer.skin_tone if !skin_tone_id && is_trainer
|
||||
hair_color = $Trainer.hair_color if !hair_color && is_trainer
|
||||
hat_color = $Trainer.hat_color if !hat_color && is_trainer
|
||||
hat2_color = $Trainer.hat2_color if !hat2_color && is_trainer
|
||||
clothes_color = $Trainer.clothes_color if !clothes_color && is_trainer
|
||||
|
||||
hairFilename = getTrainerSpriteHairFilename(hair_id) #_INTL(Settings::PLAYER_GRAPHICS_FOLDER + Settings::PLAYER_HAIR_FOLDER + "/hair_trainer_{1}", $Trainer.hair)
|
||||
outfitFilename = getTrainerSpriteOutfitFilename(clothes_id) #_INTL(Settings::PLAYER_GRAPHICS_FOLDER + Settings::PLAYER_CLOTHES_FOLDER + "/clothes_trainer_{1}", $Trainer.clothes)
|
||||
@@ -375,13 +376,14 @@ def duplicateHatForFrames(hatBitmap, frame_count)
|
||||
return duplicatedBitmap
|
||||
end
|
||||
|
||||
def add_hat_to_bitmap(bitmap, hat_id, x_pos, y_pos, scale = 1, mirrored = false)
|
||||
def add_hat_to_bitmap(bitmap, hat_id, x_pos, y_pos, scale = 1, mirrored_horizontal = false, mirrored_vertical = false)
|
||||
base_scale = 1.5 #coz hat & poke sprites aren't the same size
|
||||
adjusted_scale = base_scale * scale
|
||||
hat_filename = getTrainerSpriteHatFilename(hat_id)
|
||||
hatBitmapWrapper = AnimatedBitmap.new(hat_filename, 0) if pbResolveBitmap(hat_filename)
|
||||
hatBitmapWrapper.scale_bitmap(adjusted_scale) if hatBitmapWrapper
|
||||
hatBitmapWrapper.mirror if hatBitmapWrapper && mirrored
|
||||
hatBitmapWrapper.mirror_horizontally if hatBitmapWrapper && mirrored_horizontal
|
||||
hatBitmapWrapper.mirror_vertically if hatBitmapWrapper && mirrored_vertical
|
||||
bitmap.blt(x_pos * adjusted_scale, y_pos * adjusted_scale, hatBitmapWrapper.bitmap, hatBitmapWrapper.bitmap.rect) if hatBitmapWrapper
|
||||
end
|
||||
|
||||
|
||||
@@ -24,6 +24,10 @@ CLOTHES_WAITER = "butler"
|
||||
CLOTHES_LASS_YELLOW ="lass"
|
||||
CLOTHES_LASS_BLUE ="lass2"
|
||||
|
||||
CLOTHES_ROCKET_WHITE_M ="RocketJames"
|
||||
CLOTHES_ROCKET_WHITE_F ="RocketJessie"
|
||||
|
||||
|
||||
DEFAULT_OUTFIT_MALE = "red"
|
||||
DEFAULT_OUTFIT_FEMALE = "leaf"
|
||||
STARTING_OUTFIT = "pikajamas"
|
||||
@@ -47,7 +51,7 @@ HAT_ORAN = "orange"
|
||||
HAT_FLOWERS = "grassexpert"
|
||||
HAT_LUCHA = "hawluchamask"
|
||||
|
||||
|
||||
HAT_EEVEE_EARS = "eeveeears"
|
||||
HAT_PARASHROOM = "parashroom"
|
||||
HAT_AERODACTYL = "aerodactylSkull"
|
||||
HAT_DUSKULL_MASK = "duskullmask"
|
||||
|
||||
@@ -21,7 +21,8 @@ class PokemonHatPresenter
|
||||
@min_y, @max_y = -120, 120 # Safe symmetric range
|
||||
|
||||
@hatBitmapWrapper = AnimatedBitmap.new(@hatFilename, 0) if pbResolveBitmap(@hatFilename)
|
||||
|
||||
@hatBitmapWrapper.mirror_horizontally if @hatBitmapWrapper && @hat_mirrored_horizontal
|
||||
@hatBitmapWrapper.mirror_vertically if @hatBitmapWrapper && @hat_mirrored_vertical
|
||||
end
|
||||
|
||||
def pbStartScreen
|
||||
@@ -66,7 +67,7 @@ class PokemonHatPresenter
|
||||
return false if Input.trigger?(Input::BACK)
|
||||
@view.update()
|
||||
end
|
||||
@pokemon.hat = @hat_id
|
||||
updatePokemonHatPosition
|
||||
@view.hide_select_arrows
|
||||
|
||||
end
|
||||
@@ -89,13 +90,21 @@ class PokemonHatPresenter
|
||||
return false if Input.trigger?(Input::BACK)
|
||||
@view.update()
|
||||
end
|
||||
resetHatVisualFlip
|
||||
@view.hide_move_arrows
|
||||
return true
|
||||
end
|
||||
|
||||
#Let the sprite display stuff handle the actual flipping
|
||||
def resetHatVisualFlip
|
||||
return unless @hatBitmapWrapper
|
||||
@hatBitmapWrapper.mirror_horizontally if @hat_mirrored_horizontal
|
||||
@hatBitmapWrapper.mirror_vertically if @hat_mirrored_vertical
|
||||
end
|
||||
|
||||
|
||||
def flipHatHorizontally()
|
||||
return unless @hatBitmapWrapper
|
||||
@hat_mirrored_horizontal = !@hat_mirrored_horizontal
|
||||
pbSEPlay("GUI storage pick up")
|
||||
@hatBitmapWrapper.mirror_horizontally
|
||||
@@ -104,6 +113,7 @@ class PokemonHatPresenter
|
||||
|
||||
|
||||
def flipHatVertically()
|
||||
return unless @hatBitmapWrapper
|
||||
pbSEPlay("GUI storage pick up")
|
||||
@hat_mirrored_vertical = !@hat_mirrored_vertical
|
||||
@hatBitmapWrapper.mirror_vertically
|
||||
|
||||
Reference in New Issue
Block a user