/traderous

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

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2013-06-10 23:27:19 UTC
  • Revision ID: josh@9ix.org-20130610232719-52jhef5f8t57534p
indicators for where the planets are

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
              self:add(the.planets)
110
110
 
111
111
              --the.player = CrystalPlayer:new{x=400,y=300}
112
 
              the.player = SpacePlayer:new{x=the.bg.width / 2, y=the.bg.height / 2}
 
112
              the.player = SpacePlayer:new{x=1366,y=768}
113
113
              self:add(the.player)
114
114
              self:add(the.player.thrust)
115
115
 
245
245
                       planet.indicator.visible = true
246
246
 
247
247
                       if math.abs(pvec.x) / math.abs(pvec.y) > the.app.width / the.app.height then
248
 
                          indx = (the.app.width / 2 - 10) * util.signOf(pvec.x) + 8
249
 
                          indy = (the.app.width / 2 - 10) * pvec.y / math.abs(pvec.x)
 
248
                          indx = the.app.width / 2 * util.signOf(pvec.x) + 8
 
249
                          indy = the.app.width / 2 * pvec.y / math.abs(pvec.x)
250
250
                       else
251
 
                          indy = (the.app.height / 2 - 10) * util.signOf(pvec.y) + 8
252
 
                          indx = (the.app.height / 2 - 10) * pvec.x / math.abs(pvec.y)
 
251
                          indy = the.app.height / 2 * util.signOf(pvec.y) + 8
 
252
                          indx = the.app.height / 2 * pvec.x / math.abs(pvec.y)
253
253
                       end
254
254
 
255
255
                       planet.indicator.x = the.player.x + indx
312
312
 
313
313
              self.view = GameView:new()
314
314
 
 
315
              -- should fail silently if it can't go to fullscreen...
 
316
              love.graphics.toggleFullscreen()
 
317
 
315
318
              if DEBUG then
316
319
                 self.console:watch('VERSION', 'VERSION')
317
320
                 self.console:watch('updateTook', 'the.updateTook')
354
357
               end
355
358
            end
356
359
}
357
 
 
358
 
realRun = love.run
359
 
function love.run()
360
 
   -- should fail silently if it can't go to fullscreen...
361
 
   love.graphics.toggleFullscreen()
362
 
 
363
 
   realRun()
364
 
end
 
 
b'\\ No newline at end of file'