[Problem]Image moving x coordinate

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Locked
Pihas
Posts: 53
Joined: Sat Oct 25, 2008 10:26 pm
Location: Lithuania
Contact:

[Problem]Image moving x coordinate

Post by Pihas »

I want to make moving image x coordinate.

Code: Select all

         int y = 50;
         int i
         for&#40;i=30;i<120;i++&#41; 

         blitAlphaImageToScreen&#40;0 ,0 , 26, 8, bar, &#91;i&#93;, y&#41;;
what is wrong ? :/

I'm new at C programing, older i were programing in lua and my code looked
while true do
screen.startDraw()
screen.clear(0)

if BarX > 350 then BarX = 130 end

BarX = BarX + 1
Image.blit(BarX,215,BootBar)


screen.endDraw()
screen.flipscreen()
screen.waitVblankStart()
end
[/qoute]
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

There are already plenty of examples of this on the site. Do a little searching before asking. If you want a little hint, search for "cursortest" and you'll find not just code showing that kind of blitting but also TV support and gif handling.
Pihas
Posts: 53
Joined: Sat Oct 25, 2008 10:26 pm
Location: Lithuania
Contact:

Post by Pihas »

I don't want to load gif i just need to move image by x corrdinate like x++ for exaple bar.png ... i need gif lib for this actions :/ ?

Founded Topics:
1)[Problem]Image moving x coordinate
2)[SOLVED] TV Out - garbage on screen?
3)GIF library
4)PSP Slim can't output double-buffered 720x480
Locked