forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

very weird blitting problem

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
the underminer



Joined: 03 Oct 2005
Posts: 124
Location: Netherlands

PostPosted: Tue Apr 18, 2006 4:01 am    Post subject: very weird blitting problem Reply with quote

There is this problem I can't solve and I started to think that lua just skipped a line. For testing, I tried to overwrite the image 'field' with itself. To do this, I first copied field to tempfield, then cleared field and blitted the copy to field again. The function TempRender shows me the contents of field. The first time TempRender is called, the field looks good and filled with color. The second time, only BufferX is visible. Frustrating! Can someone tell me why BufferX is [i/] and field isn't blitted or visible?

Code:

tempfield = field
TempRender()
field:clear()
field:blit(0,0,tempfield,0,0,480,256) -- this line has no effect at all
CameraPos[1] = CameraPos[1] - 1
FillBufferXLeft()
field:blit(0,0,BufferX,0,0,32,256)
TempRender()


Code:

function TempRender()
screen:clear()
screen:fillRect(0, 0, 480, 272, skyblue)
screen:blit(0,0,field,0,0,480,256)
screen.flip()
System.sleep(1250)
end

_________________
Behold! The Underminer got hold of a PSP
Back to top
View user's profile Send private message
the underminer



Joined: 03 Oct 2005
Posts: 124
Location: Netherlands

PostPosted: Wed Apr 19, 2006 6:22 pm    Post subject: Reply with quote

Code:
field:blit(0,0,field,0,0,448,256)
does work, but field:blit(32,0,field,0,0,448,256) doesn't. I guess the first parameter can't be positive? The field is 480x256 so there shouldn't be a problem(32+448=480).
This is very weird indeed.[/code]
_________________
Behold! The Underminer got hold of a PSP
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group