From 32874d8a382498eabc735de0ce003e2a33460bf3 Mon Sep 17 00:00:00 2001 From: chardub Date: Fri, 7 Mar 2025 09:49:42 -0500 Subject: [PATCH] Adds second hat to continue screen --- Data/MapInfos.rxdata | Bin 42773 -> 42773 bytes .../001_OutfitsMain/LayeredClothes.rb | 23 +++++++++++++----- .../050_Outfits/UI/clothesShop/ClothesShop.rb | 3 --- .../UI/clothesShop/HatsMartAdapter.rb | 1 - Data/Scripts/DownloadedSettings.rb | 2 +- Data/System.rxdata | Bin 31697 -> 31698 bytes 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/Data/MapInfos.rxdata b/Data/MapInfos.rxdata index 4a7aa6f36337f93ccf65e211b34ceaa5f29a1933..c385194af3eb16f53efd0f2aeed6340dbb4d395a 100644 GIT binary patch delta 24 gcmbPwj%n&SrVU#Xn6eosZ%a^Odd|4{R)Vz~0EA!)AOHXW delta 24 gcmbPwj%n&SrVU#Xm@Y6)-j<-m6vDLmR)Vz~0EP4k^Z)<= diff --git a/Data/Scripts/050_Outfits/001_OutfitsMain/LayeredClothes.rb b/Data/Scripts/050_Outfits/001_OutfitsMain/LayeredClothes.rb index c7cb40f81..b4c94167b 100644 --- a/Data/Scripts/050_Outfits/001_OutfitsMain/LayeredClothes.rb +++ b/Data/Scripts/050_Outfits/001_OutfitsMain/LayeredClothes.rb @@ -211,7 +211,6 @@ end def generateNPCClothedBitmapStatic(trainerAppearance,action = "walk") baseBitmapFilename = getBaseOverworldSpriteFilename(action, trainerAppearance.skin_color) - baseSprite = AnimatedBitmap.new(baseBitmapFilename) baseBitmap = baseSprite.bitmap.clone # nekkid sprite @@ -275,6 +274,7 @@ def generateNPCClothedBitmapStatic(trainerAppearance,action = "walk") return baseBitmap end +#for continue screen def generateClothedBitmapStatic(trainer, action = "walk") baseBitmapFilename = getBaseOverworldSpriteFilename(action, trainer.skin_tone) if !pbResolveBitmap(baseBitmapFilename) @@ -288,10 +288,13 @@ def generateClothedBitmapStatic(trainer, action = "walk") outfitFilename = getOverworldOutfitFilename(Settings::PLAYER_TEMP_OUTFIT_FALLBACK) if !pbResolveBitmap(outfitFilename) hairFilename = getOverworldHairFilename(trainer.hair) hatFilename = getOverworldHatFilename(trainer.hat) + hat2Filename = getOverworldHatFilename(trainer.hat2) # Use default values if color shifts are not set hair_color_shift = trainer.hair_color || 0 hat_color_shift = trainer.hat_color || 0 + hat2_color_shift = trainer.hat2_color || 0 + clothes_color_shift = trainer.clothes_color || 0 # Use fallback outfit if the specified outfit cannot be resolved @@ -303,6 +306,7 @@ def generateClothedBitmapStatic(trainer, action = "walk") outfitBitmap = AnimatedBitmap.new(outfitFilename, clothes_color_shift) hairBitmapWrapper = AnimatedBitmap.new(hairFilename, hair_color_shift) if pbResolveBitmap(hairFilename) hatBitmapWrapper = AnimatedBitmap.new(hatFilename, hat_color_shift) if pbResolveBitmap(hatFilename) + hat2BitmapWrapper = AnimatedBitmap.new(hat2Filename, hat2_color_shift) if pbResolveBitmap(hat2Filename) # Blit the outfit onto the base sprite baseBitmap.blt(0, 0, outfitBitmap.bitmap, outfitBitmap.bitmap.rect) if outfitBitmap @@ -310,13 +314,20 @@ def generateClothedBitmapStatic(trainer, action = "walk") current_offset = [0, 0] # Replace this with getCurrentSpriteOffset() if needed positionHair(baseBitmap, hairBitmapWrapper.bitmap, current_offset) if hairBitmapWrapper - # Handle the hat - duplicate it for each frame if necessary + frame_count = 4 + frame_width = baseSprite.bitmap.width / frame_count # Calculate frame width + if hat2BitmapWrapper + hat2_frame_bitmap = duplicateHatForFrames(hat2BitmapWrapper.bitmap, frame_count) + frame_count.times do |i| + # Calculate offset for each frame + frame_offset = [i * frame_width, 0] + # Adjust Y offset if frame index is odd + frame_offset[1] -= 2 if i.odd? + positionHat(baseBitmap, hat2_frame_bitmap, frame_offset, i, frame_width) + end + end if hatBitmapWrapper - frame_count = 4 # Assuming 4 frames for hair animation; adjust as needed hat_frame_bitmap = duplicateHatForFrames(hatBitmapWrapper.bitmap, frame_count) - - frame_width = baseSprite.bitmap.width / frame_count # Calculate frame width - frame_count.times do |i| # Calculate offset for each frame frame_offset = [i * frame_width, 0] diff --git a/Data/Scripts/050_Outfits/UI/clothesShop/ClothesShop.rb b/Data/Scripts/050_Outfits/UI/clothesShop/ClothesShop.rb index 985c83e36..1fca6b067 100644 --- a/Data/Scripts/050_Outfits/UI/clothesShop/ClothesShop.rb +++ b/Data/Scripts/050_Outfits/UI/clothesShop/ClothesShop.rb @@ -164,7 +164,4 @@ def changeOutfit() break end end - - - end \ No newline at end of file diff --git a/Data/Scripts/050_Outfits/UI/clothesShop/HatsMartAdapter.rb b/Data/Scripts/050_Outfits/UI/clothesShop/HatsMartAdapter.rb index 1c7827659..356015b96 100644 --- a/Data/Scripts/050_Outfits/UI/clothesShop/HatsMartAdapter.rb +++ b/Data/Scripts/050_Outfits/UI/clothesShop/HatsMartAdapter.rb @@ -19,7 +19,6 @@ class HatsMartAdapter < OutfitsMartAdapter end def set_secondary_hat(value) - echoln "WOWOWO setting secondary hat value" @is_secondary_hat = value end diff --git a/Data/Scripts/DownloadedSettings.rb b/Data/Scripts/DownloadedSettings.rb index 9a9487a12..00fd40a53 100644 --- a/Data/Scripts/DownloadedSettings.rb +++ b/Data/Scripts/DownloadedSettings.rb @@ -44,7 +44,7 @@ module Settings AI_ENTRIES_RATE_LOG_FILE = 'Data/pokedex/rate_limit.log' # Path to the log file #Spritepack - NEWEST_SPRITEPACK_MONTH = 4 + NEWEST_SPRITEPACK_MONTH = 2 NEWEST_SPRITEPACK_YEAR = 2025 diff --git a/Data/System.rxdata b/Data/System.rxdata index 17ce3170cd078e608be7d39eb30a53704d5d2b9c..33dfcee450dfd02b10489d1b5d4ce64f0f5c8c7b 100644 GIT binary patch delta 20 ccmccko$=Cl#tn~USXpMPUSZk%T;^3A0Btr2;s5{u delta 19 bcmccgo$=y##tn~USeV~1b#Hzl^C}JiW)BI%