Why does this code act werid after 0.9.0?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
feelixe
Prole
Posts: 36
Joined: Tue Aug 20, 2013 10:29 am

Why does this code act werid after 0.9.0?

Post by feelixe »

I've just updated to 0.9.0, the follwing code acts weird, the canvas is draw at the wrong place. I've checked the changelog but it seems neither .scale or .setScissor has been changed. Anyone got a clue?

Code: Select all

		love.graphics.setShader(effect)
		love.graphics.scale(10, 10)
		love.graphics.setScissor( 0, 0, gameWidth, gameHeight)
		love.graphics.draw(canvas, 5, 5)
		love.graphics.setScissor()
		love.graphics.setShader()
Also worth noting is that the code above is between

Code: Select all

love.graphics.push()
and

Code: Select all

love.graphics.pop()
User avatar
veethree
Inner party member
Posts: 877
Joined: Sat Dec 10, 2011 7:18 pm

Re: Why does this code act werid after 0.9.0?

Post by veethree »

Can you post the rest of the code?
feelixe
Prole
Posts: 36
Joined: Tue Aug 20, 2013 10:29 am

Re: Why does this code act werid after 0.9.0?

Post by feelixe »

veethree wrote:Can you post the rest of the code?
It's alot of code, so i really can't.
But this is the draw function and the code i posted before was from drawLighting()

Code: Select all

			love.graphics.push()
				love.graphics.translate(-player.act_x+love.graphics.getWidth()/2, -player.act_y+love.graphics.getHeight()/2)
				drawBlocks()
				drawDetail()	
				drawItems()
				drawEntity()
				enemyZombie.drawEnemy()
				drawInfo()
				drawWeapon()
				drawPlayer(player.grid_x/50, player.grid_y/50)
				love.graphics.draw(cloud, -player.act_x*1.08+time*4, -player.act_y*1.05-1000*0.1,0,69,69)
				drawLighting()
			love.graphics.pop()
				love.graphics.draw(weapons[1].texture,sword[4],100,100)
			drawPlayerHP()
			drawDebug()
			drawHelp()
			drawOnScreenMenu()
i noticed now that when i enter fullscreen it works just fine, the code that i use for entering fullscreen is:

Code: Select all

fullscreenEnabled = true
				love.window.setMode(0, 0, {fullscreen=true})
				love.window.setMode(love.graphics.getWidth(),love.graphics.getHeight(), {fullscreen=true, vsync=false})
updateWidthHeight()
updateWidthHeight() updates the gameWidth and gameHeight that i used in drawLighting()
User avatar
veethree
Inner party member
Posts: 877
Joined: Sat Dec 10, 2011 7:18 pm

Re: Why does this code act werid after 0.9.0?

Post by veethree »

Just upload the .love as an attachment, If i/we could look at the code in context and such we could help more.
User avatar
markgo
Party member
Posts: 190
Joined: Sat Jan 05, 2013 12:21 am
Location: USA

Re: Why does this code act werid after 0.9.0?

Post by markgo »

feelixe
Prole
Posts: 36
Joined: Tue Aug 20, 2013 10:29 am

Re: Why does this code act werid after 0.9.0?

Post by feelixe »

It's excatly as he describe it, i don't understand how he fixed it though? is it a bug in löve?
User avatar
slime
Solid Snayke
Posts: 3147
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Why does this code act werid after 0.9.0?

Post by slime »

Yeah, it's fixed for the next version (0.9.1 probably.)
feelixe
Prole
Posts: 36
Joined: Tue Aug 20, 2013 10:29 am

Re: Why does this code act werid after 0.9.0?

Post by feelixe »

slime wrote:Yeah, it's fixed for the next version (0.9.1 probably.)
Oh. And there's no releasedate for 0.9.1 yet?
PS. I tried the nightly release for löve and it fixed it :) thanks for the help
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests