Fixes issue with possible uninitialized dyed items map when opening clothing menus

This commit is contained in:
chardub
2025-03-11 14:04:42 -04:00
parent 701ea9ab11
commit 7358d67e7e
18 changed files with 167 additions and 6 deletions

View File

@@ -12,9 +12,14 @@ class CustomSpriteExtracter < PIFSpriteExtracter
def load_bitmap_from_spritesheet(pif_sprite)
body_id = pif_sprite.body_id
spritesheet_file = getSpritesheetPath(pif_sprite)
echoln spritesheet_file
spritesheet_bitmap = AnimatedBitmap.new(spritesheet_file).bitmap
sprite_x_position,sprite_y_position =get_sprite_position_on_spritesheet(body_id,SPRITE_SIZE,COLUMNS)
echoln sprite_x_position
echoln sprite_y_position
src_rect = Rect.new(sprite_x_position, sprite_y_position, SPRITE_SIZE, SPRITE_SIZE)
sprite_bitmap = Bitmap.new(SPRITE_SIZE, SPRITE_SIZE)