MCPcopy Index your code
hub / github.com/fogleman/nes / Lookup

Method Lookup

ui/texture.go:61–67  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

59}
60
61func (t *Texture) Lookup(path string) (x, y, dx, dy float32) {
62 if index, ok := t.lookup[path]; ok {
63 return t.coord(index)
64 } else {
65 return t.coord(t.load(path))
66 }
67}
68
69func (t *Texture) mark(index int) {
70 t.counter++

Callers 1

UpdateMethod · 0.80

Calls 2

coordMethod · 0.95
loadMethod · 0.95

Tested by

no test coverage detected