(gid uint32, pt engo.Point)
| 370 | } |
| 371 | |
| 372 | func (l *Level) tileFromGID(gid uint32, pt engo.Point) *Tile { |
| 373 | ret := &Tile{} |
| 374 | tex := l.resourceMap[gid] |
| 375 | ret.Image = &tex |
| 376 | ret.Point = pt |
| 377 | |
| 378 | drawables, frames := []Drawable{}, []int{} |
| 379 | for i, id := range l.framesMap[gid] { |
| 380 | drawables = append(drawables, l.resourceMap[id]) |
| 381 | frames = append(frames, i) |
| 382 | } |
| 383 | ret.Drawables = drawables |
| 384 | ret.Animation = &Animation{Name: "Tile", Frames: frames, Loop: true} |
| 385 | |
| 386 | return ret |
| 387 | } |
| 388 | |
| 389 | func convertFlipToRotation(flipping uint32) float32 { |
| 390 | flip_h := (flipping % tmx.HorizontalFlipFlag) != 0 |
no outgoing calls
no test coverage detected