updating deprecated functions

This commit is contained in:
FranciscoG 2014-07-10 14:25:09 -04:00
parent ae0aa391e8
commit 7502070795
8 changed files with 19 additions and 19 deletions

View File

@ -27,7 +27,7 @@ function Bird:update(dt)
end
function Bird:draw()
love.graphics.drawq(imgSprites,bird_frames[math.floor(self.frame)],self.x,self.y)
love.graphics.draw(imgSprites,bird_frames[math.floor(self.frame)],self.x,self.y)
end
function spawnBirds(dt)

View File

@ -27,7 +27,7 @@ function Cloud:draw()
quad = love.graphics.newQuad(48+self.type*32,32,32,16,128,128)
end
if quad ~= nil then
love.graphics.drawq(imgSprites,quad,self.x,self.y)
love.graphics.draw(imgSprites,quad,self.x,self.y)
end
end

View File

@ -22,5 +22,5 @@ function Gorge:update(dt)
end
function Gorge:draw()
love.graphics.drawq(imgTerrain,gorge_quad,self.x-7,92)
love.graphics.draw(imgTerrain,gorge_quad,self.x-7,92)
end

View File

@ -228,7 +228,7 @@ function drawGame()
-- Draw coffee meter
local cquad = love.graphics.newQuad(48+math.floor(coffee)*9,64,9,9,128,128)
if coffee < 5 or pl.frame < 4 then
love.graphics.drawq(imgSprites,cquad,284,7)
love.graphics.draw(imgSprites,cquad,284,7)
end
end
@ -298,7 +298,7 @@ end
function updateScale()
SCRNWIDTH = WIDTH*SCALE
SCRNHEIGHT = HEIGHT*SCALE
love.graphics.setMode(SCRNWIDTH,SCRNHEIGHT,false)
love.window.setMode(SCRNWIDTH,SCRNHEIGHT,{fullscreen=false})
end
function loadResources()

View File

@ -93,14 +93,14 @@ end
function Player:draw()
if self.status == 0 then
if self.invul == false or math.floor(self.frame) % 2 == 0 then
love.graphics.drawq(imgSprites,player_frames[math.floor(self.frame)],self.x,self.y)
love.graphics.draw(imgSprites,player_frames[math.floor(self.frame)],self.x,self.y)
end
elseif self.status == 1 or self.status == 5 then
love.graphics.drawq(imgSprites,player_frames[math.floor(self.frame)],self.x,self.y, -self.x/10, 1,1,7,10)
love.graphics.draw(imgSprites,player_frames[math.floor(self.frame)],self.x,self.y, -self.x/10, 1,1,7,10)
else -- default case
love.graphics.drawq(imgSprites,player_frames[math.floor(self.frame)],self.x,self.y)
love.graphics.draw(imgSprites,player_frames[math.floor(self.frame)],self.x,self.y)
end
end

View File

@ -11,10 +11,10 @@ function updateTerrain(dt)
end
function drawTerrain()
love.graphics.drawq(imgTerrain,back_terrain,0-back_x,0)
love.graphics.drawq(imgTerrain,back_terrain,WIDTH-back_x,0)
love.graphics.drawq(imgTerrain,front_terrain,0-front_x,0)
love.graphics.drawq(imgTerrain,front_terrain,WIDTH-front_x,0)
love.graphics.draw(imgTerrain,back_terrain,0-back_x,0)
love.graphics.draw(imgTerrain,back_terrain,WIDTH-back_x,0)
love.graphics.draw(imgTerrain,front_terrain,0-front_x,0)
love.graphics.draw(imgTerrain,front_terrain,WIDTH-front_x,0)
end
function updateTracks(dt)
@ -26,6 +26,6 @@ end
function drawTracks()
for i=0,2 do
love.graphics.drawq(imgSprites,track_quad,i*121 - track_frame,92)
love.graphics.draw(imgSprites,track_quad,i*121 - track_frame,92)
end
end

View File

@ -52,15 +52,15 @@ function Train:draw()
end
if self.type == 1 then -- closed train
love.graphics.drawq(imgTrains,normal_train_quad,self.x,self.y)
love.graphics.draw(imgTrains,normal_train_quad,self.x,self.y)
elseif self.type == 2 then -- open train
if pl.status == 3 then -- inside
love.graphics.drawq(imgTrains,inside_train_quad,self.x-7,self.y)
love.graphics.draw(imgTrains,inside_train_quad,self.x-7,self.y)
if self.hasCoffee == true then
love.graphics.drawq(imgSprites,coffee_cup_quad,self.x+54,self.y+8)
love.graphics.draw(imgSprites,coffee_cup_quad,self.x+54,self.y+8)
end
else -- outside
love.graphics.drawq(imgTrains,open_train_quad,self.x-7,self.y)
love.graphics.draw(imgTrains,open_train_quad,self.x-7,self.y)
end
end
end

View File

@ -26,12 +26,12 @@ end
function Tunnel:drawBack()
if self.alive == true then
love.graphics.drawq(imgTerrain,tunnel_start_back,self.x-58,0)
love.graphics.draw(imgTerrain,tunnel_start_back,self.x-58,0)
end
end
function Tunnel:drawFront()
if self.alive == true then
love.graphics.drawq(imgTerrain,tunnel_end,self.x,0)
love.graphics.draw(imgTerrain,tunnel_end,self.x,0)
end
end