// Draws the motion's active bitmap at the given coordinates func (m *Motion) Draw(screen *sdl.Surface, x, y int) { if m == nil { return } // don't blit if the tile is nil. active := m.active if active == nil { return } // don't blit if no frame there yet. screen.Blit(active, x, y) }