/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: 2013-08-26 00:10:14 UTC
  • Revision ID: josh@9ix.org-20130826001014-d7iobtdaet72558t
actually handle multiple goals in one maze

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 length == 'short' then
103
 
                        if not self._library.sound[realPath] then
 
102
                if not self._library.sound[realPath] then
 
103
                        if length == 'short' 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"')
105
109
                        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"')
112
110
                end
 
111
 
 
112
                return self._library.sound[path]
113
113
        end,
114
114
 
115
115
        -- Method: font