/ld27

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

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2015-09-05 20:31:03 UTC
  • Revision ID: josh@9ix.org-20150905203103-hgxn36kuk5fm739l
catch <1080p scaling case

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
STRICT = true
 
1
STRICT = false
2
2
DEBUG = false
3
 
LOVEBIRD = false
4
3
 
5
4
if SDL then
6
5
  print = SDL.log
7
6
end
8
7
 
 
8
--lovebird = require 'lovebird'
9
9
require 'zoetrope'
10
10
--require 'pepperprof'
11
11
--inspect = require 'inspect'
181
181
 
182
182
           end,
183
183
   onUpdate = function(self, elapsed)
184
 
                 if the.keys:allJustPressed() then
185
 
                    the.app.view = GameView:new()
186
 
                 end
187
 
              end
 
184
     if the.keys:allJustPressed() or the.mouse:pressed() then
 
185
       the.app.view = GameView:new()
 
186
     end
 
187
   end
188
188
}
189
189
 
190
190
the.app = App:new {
213
213
                 end
214
214
              end,
215
215
   update = function(self, dt)
216
 
     if LOVEBIRD then
217
 
       require('lovebird').update()
 
216
     if lovebird then
 
217
       fps = love.timer.getFPS()
 
218
       lovebird.update()
218
219
     end
219
220
     App.update(self, dt)
220
221
   end,
236
237
         self.scale = 1.5
237
238
       elseif winh < the.app.height then
238
239
         self.scale = winh / the.app.height
 
240
       else
 
241
         self.scale = 1
239
242
       end
240
243
       view.realTranslate.x = math.floor((winw - self.width * self.scale) / 2)
241
244
       view.realTranslate.y = math.floor((winh - self.height * self.scale) / 2)