Speed up drawing and experiment with using rotation on the draw operation to get the right coordinates
This commit is contained in:
@@ -19,6 +19,7 @@ type Sprite struct {
|
||||
Height int
|
||||
|
||||
Pic *pixel.PictureData
|
||||
Spr *pixel.Sprite
|
||||
}
|
||||
|
||||
type Object struct {
|
||||
@@ -33,10 +34,12 @@ func ConvertObject(rawObj *data.Object, name string) *Object {
|
||||
}
|
||||
|
||||
for i, rawSpr := range rawObj.Sprites {
|
||||
pic := spriteToPic(rawSpr)
|
||||
out.Sprites[i] = Sprite{
|
||||
Width: int(rawSpr.Width),
|
||||
Height: int(rawSpr.Height),
|
||||
Pic: spriteToPic(rawSpr),
|
||||
Pic: pic,
|
||||
Spr: pixel.NewSprite(pic, pic.Bounds()),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user