Skip to content

Commit

Permalink
Process equipment sprites with item_rainbow_enhanced background
Browse files Browse the repository at this point in the history
  • Loading branch information
blead committed Jul 29, 2024
1 parent 0a1c50c commit 6c81016
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions assets/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ var ItemGold []byte

//go:embed item_rainbow.png
var ItemRainbow []byte

//go:embed item_rainbow_enhanced.png
var ItemRainbowEnhanced []byte
Binary file added assets/item_rainbow_enhanced.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 11 additions & 1 deletion pkg/wf/spriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ func NewSpriter(config *SpriterConfig) (*Spriter, error) {
if err != nil {
return nil, err
}
backgrounds[6], err = imaging.Decode(bytes.NewReader(assets.ItemRainbowEnhanced))
if err != nil {
return nil, err
}
for i, img := range backgrounds {
size := int(24 * config.Scale)
backgrounds[i] = imaging.Resize(img, size, size, imaging.NearestNeighbor)
Expand Down Expand Up @@ -293,7 +297,13 @@ func (spriter *Spriter) processSprite(sheet image.Image, params *spriteParams, r
abisoul = true
filename = filename + "_soul"
} else if strings.HasSuffix(params.name, "_lv70") {
filename = filename + "_enhanced"
if rarity == 6 {
filename = filename + "_enhanced99"
} else {
filename = filename + "_enhanced"
// process another file with purple border background
spriter.processSprite(sheet, params, 6)
}
}

dest := addExt(filepath.Join(
Expand Down

0 comments on commit 6c81016

Please # to comment.