QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

why wont my pic load??

This is a discussion on why wont my pic load?? within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; yes another question from me but hey i'm new anywho i believe ive goten it all right and no errors ...

Reply
 
LinkBack Thread Tools
Old 10-20-2005, 04:41 PM   #1

Developer
 
slicer4ever's Avatar
 
Join Date: Jul 2005
Location: everywhere
Posts: 3,357
Trader Feedback: 0
Default why wont my pic load??

yes another question from me but hey i'm new anywho i believe ive goten it all right and no errors but my dam image will not load!! i saved it as png maybe im putting it in the wrong line but this is what i write:

System.usbDiskModeActivat e()

green=Color.new(0,255,0)
orange=Color.new(255,128, 0)
teal=Color.new(64,128,128 )
blue=Color.new(0,0,255)
red=Color.new(255,0,0)
black=Color.new(0,0,0)
lightgreen=Color.new(18,6 1,36)
lightyellow=Color.new(165 ,157,67)

textX = 300
textY = 100
textColor=blue

background = Image.load("pic/background")

while true do
screen:clear()
pad=Controls.read()
if pad:cross() then textColor=green
elseif pad:triangle() then textColor=orange
elseif pad:circle() then textColor=blue
elseif pad:square() then textColor=red
elseif pad:start() then textColor=teal
elseif pad:l() then textColor=lightgreen
elseif pad:r() then textColor=lightyellow
end

if pad:up() then textY=textY-5
elseif pad:down() then textY=textY+5
elseif pad:left() then textX=textX-5
elseif pad:right() then textX=textX+5
end

screenrint(textX, textY, "hello people here!",textColor)
screen.waitVblankStart()
screen.flip()
end

i made it in paint and its just a yellow background i also made a folder named pic right where my script is and threw my pic background in the i just dont no why it wont work can some1 help me

p.s. i use lua
__________________
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
slicer4ever is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-20-2005, 04:53 PM   #2
 
TheMysteriousThug's Avatar
 
Join Date: Jun 2005
Location: Fascination Street
Posts: 7,215
Trader Feedback: 0
Default

pic.background
__________________
[SIZE=2][FONT=Verdana][SIZE=3][U][B]3 YEAR VETERAN[/B][/U][/SIZE][SIZE=3][FONT=Arial Black]
[/FONT][/SIZE][/FONT][/SIZE]Thanks to the following whose ever made me a sig/av.
[U][I][FONT=Impact]
[/FONT][/I][/U]
TheMysteriousThug is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-20-2005, 05:03 PM   #3
Developer
 
Join Date: Jun 2005
Posts: 32
Trader Feedback: 0
Default

try this:

Code:
System.usbDiskModeActivate()

green=Color.new(0,255,0)
orange=Color.new(255,128, 0)
teal=Color.new(64,128,128 )
blue=Color.new(0,0,255)
red=Color.new(255,0,0)
black=Color.new(0,0,0)
lightgreen=Color.new(18,6 1,36)
lightyellow=Color.new(165 ,157,67)

textX = 300
textY = 100
textColor=blue

background = Image.load("pic/background.png") --make sure this is the correct path

while true do
screen:clear()
pad=Controls.read()
if pad:cross() then textColor=green
elseif pad:triangle() then textColor=orange
elseif pad:circle() then textColor=blue
elseif pad:square() then textColor=red
elseif pad:start() then textColor=teal
elseif pad:l() then textColor=lightgreen
elseif pad:r() then textColor=lightyellow
end

if pad:up() then textY=textY-5
elseif pad:down() then textY=textY+5
elseif pad:left() then textX=textX-5
elseif pad:right() then textX=textX+5
end
screen:blit(0, 0, background, 0, 0, background:width(), background:height(), false)
screen:print(textX, textY, "hello people here!",textColor)
screen.waitVblankStart()
screen.flip()
end
Image.load() only loads the image into VRAM, you need to then blit the image to screen.

Last edited by Dark Killer; 10-20-2005 at 05:05 PM..
Dark Killer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-20-2005, 05:51 PM   #4

Developer
 
slicer4ever's Avatar
 
Join Date: Jul 2005
Location: everywhere
Posts: 3,357
Trader Feedback: 0
Talking

thanks a ton that really helps but now 2 questions one what does blit the line blit tell the psp with all the 00's and everything that well really help me so i know what i am doing and how do i make it to take up the whole screen not just a portian

thanks
__________________
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
slicer4ever is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-20-2005, 06:51 PM   #5
Developer
 
Join Date: Jun 2005
Posts: 32
Trader Feedback: 0
Default

nil image:blit(x, y, Image source, [sourcex, sourcey, width, height], [alpha = true])

If you want the image to take up the whole screen, just make it 480x272.
Dark Killer is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
load , pic

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 07:05 PM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us