/ld27

To get this branch, use:
bzr branch http://9ix.org/bzr/ld27

« back to all changes in this revision

Viewing changes to zoetrope/core/cached.lua

  • Committer: Josh C
  • Date: 2015-09-05 20:31:29 UTC
  • Revision ID: josh@9ix.org-20150905203129-0gb7gax8re47zf7m
inculde lovebird in build if it's required

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
 
100
100
                local realPath = self:_absolutePath(path)
101
101
 
102
 
                if not self._library.sound[realPath] then
103
 
                        if length == 'short' then
 
102
                if length == 'short' then
 
103
                        if not self._library.sound[realPath] then
104
104
                                self._library.sound[realPath] = love.sound.newSoundData(realPath)
105
 
                        elseif length == 'long' then
106
 
                                self._library.sound[realPath] = love.sound.newDecoder(realPath)
107
 
                        else
108
 
                                error('length must be either "short" or "long"')
109
105
                        end
 
106
 
 
107
                        return self._library.sound[path]
 
108
                elseif length == 'long' then
 
109
                        return love.sound.newDecoder(realPath)
 
110
                else
 
111
                        error('length must be either "short" or "long"')
110
112
                end
111
 
 
112
 
                return self._library.sound[path]
113
113
        end,
114
114
 
115
115
        -- Method: font