Fixes new game crash

This commit is contained in:
chardub
2025-03-09 18:04:48 -04:00
parent 14f99f7efb
commit 0c06b7a6c9
19 changed files with 22 additions and 16 deletions

BIN
.DS_Store vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -13,12 +13,10 @@ class Sprite_Hair < Sprite_Wearable
crop_spritesheet(direction, current_frame, action) crop_spritesheet(direction, current_frame, action)
adjust_layer() adjust_layer()
set_sprite_position(@action, direction, current_frame) set_sprite_position(@action, direction, current_frame)
adjust_position_for_nonAnimated_hairstyles(current_frame)
end end
def crop_spritesheet(direction, current_frame, action) def crop_spritesheet(direction, current_frame, action)
sprite_x = ((current_frame)) * @frameWidth sprite_x = ((current_frame)) * @frameWidth
sprite_x = 0 if @frameWidth == @wearableBitmap.width
# Don't animate surf # Don't animate surf
sprite_x = 0 if action == "surf" sprite_x = 0 if action == "surf"
@@ -26,10 +24,6 @@ class Sprite_Hair < Sprite_Wearable
@sprite.src_rect.set(sprite_x, sprite_y, @frameWidth, @frameHeight) @sprite.src_rect.set(sprite_x, sprite_y, @frameWidth, @frameHeight)
end end
def adjust_position_for_nonAnimated_hairstyles(current_frame)
return if @frameWidth != @wearableBitmap.width
@sprite.y -= 2 if current_frame % 2 == 1
end
def set_sprite_position(action, direction, current_frame) def set_sprite_position(action, direction, current_frame)
@sprite.x = @player_sprite.x - @player_sprite.ox @sprite.x = @player_sprite.x - @player_sprite.ox
@sprite.y = @player_sprite.y - @player_sprite.oy @sprite.y = @player_sprite.y - @player_sprite.oy

View File

@@ -8,14 +8,15 @@ class Sprite_Player < Sprite_Character
hatFilename = "" hatFilename = ""
hairFilename = "" hairFilename = ""
@hair = Sprite_Hair.new(self, hairFilename, @character_name, @viewport)
@hat = Sprite_Hat.new(self, hatFilename, @character_name, @viewport,3) @hat = Sprite_Hat.new(self, hatFilename, @character_name, @viewport,3)
@hat2 = Sprite_Hat.new(self, hatFilename, @character_name, @viewport,2) @hat2 = Sprite_Hat.new(self, hatFilename, @character_name, @viewport,2)
@hair = Sprite_Hair.new(self, hairFilename, @character_name, @viewport)
@previous_skinTone = 0 @previous_skinTone = 0
@current_bitmap = nil @current_bitmap = nil
@previous_action =nil @previous_action =nil
echoln "init playa"
getClothedPlayerSprite(true) getClothedPlayerSprite(true)
end end

Binary file not shown.

View File

@@ -1,7 +1 @@
1741548975 1741556769
1741548979
1741548983
1741548990
1741549010
1741549014
1741549014

View File

@@ -723,3 +723,20 @@ Graphics/CustomBattlers/spritesheets/spritesheets_base/336.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/246/246.png Graphics/CustomBattlers/spritesheets/spritesheets_custom/246/246.png
Graphics/CustomBattlers/spritesheets/spritesheets_base/317.png Graphics/CustomBattlers/spritesheets/spritesheets_base/317.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/317/317.png Graphics/CustomBattlers/spritesheets/spritesheets_custom/317/317.png
Graphics/CustomBattlers/spritesheets/spritesheets_base/358.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/358/358.png
Graphics/CustomBattlers/spritesheets/spritesheets_base/345.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/345/345.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/353/353.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/281/281.png
Graphics/CustomBattlers/spritesheets/spritesheets_base/372.png
Graphics/CustomBattlers/spritesheets/spritesheets_base/464.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/464/464.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/58/58.png
Graphics/CustomBattlers/spritesheets/spritesheets_base/144.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/144/144.png
Graphics/CustomBattlers/spritesheets/spritesheets_base/145.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/145/145.png
Graphics/CustomBattlers/spritesheets/spritesheets_base/431.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/431/431.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/469/469b.png

BIN
Graphics/.DS_Store vendored

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

View File

@@ -699,8 +699,8 @@
691,PINKANBERRY,Pinkan Berry,Pinkan Berries,5,0,"A type of Berry that is only found on Pinkan Island. This berry turns Pokémon that eats it pink.",0,0,5, 691,PINKANBERRY,Pinkan Berry,Pinkan Berries,5,0,"A type of Berry that is only found on Pinkan Island. This berry turns Pokémon that eats it pink.",0,0,5,
692,EMERGENCYWHISTLE,Emergency Whistle,Emergency Whistle,8,0,"A small whistle that emits a loud, high-pitched noise. It can be used to alert others.",0,0,6, 692,EMERGENCYWHISTLE,Emergency Whistle,Emergency Whistle,8,0,"A small whistle that emits a loud, high-pitched noise. It can be used to alert others.",0,0,6,
693,FAVORITEOUTFIT,Favorite Outfit,Favorite Outfits,8,0,"Allows you to quickly switch to the outfit you've marked as your favorite.",2,0,6, 693,FAVORITEOUTFIT,Favorite Outfit,Favorite Outfits,8,0,"Allows you to quickly switch to the outfit you've marked as your favorite.",2,0,6,
694,HATSDYEKIT,Hats Dye Kit,Hats Dye Kits,8,0,"A nifty kit that can be used to dye your hats in different colours from the Outfits menu",2,0,6, 694,HATSDYEKIT,Hat Dye Kit,Hat Dye Kits,8,0,"A nifty kit that can be used to dye your hats in different colours from the Outfits menu",2,0,6,
695,CLOTHESDYEKIT,Clothes Dye Kit,Hats Dye Kits,8,0,"A nifty kit that can be used to dye your clothes in different colours from the Outfits menu",2,0,6, 695,CLOTHESDYEKIT,Clothing Dye Kit,Clothing Dye Kits,8,0,"A nifty kit that can be used to dye your clothes in different colours from the Outfits menu",2,0,6,