How can I do this?
https://www.youtube.com/watch?v=9fdjw7lBtP0
C64 Loading screen?
Re: C64 Loading screen?
Hi,
one posibillity:
Picture:
http://assets2.ignimgs.com/2009/02/26/t ... 766725.jpg
Bernd
one posibillity:
Code: Select all
UseJPEGImageDecoder()
OpenWindow(0, 0, 0, 640, 400, "C64 loading", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
CanvasGadget(0, 0, 0, 640, 400)
LoadImage(0, "c:\tmp\C64.jpg")
AddWindowTimer(0, 1, 25)
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Timer
GrabImage(0, 1, x, y, 20, 20)
StartDrawing(CanvasOutput(0))
DrawImage(ImageID(1), x, y)
StopDrawing()
FreeImage(1)
x + 20
If x = 640
x = 0
y + 20
EndIf
If y = 400
RemoveWindowTimer(0, 1)
FreeImage(0)
EndIf
EndIf
Until Event = #PB_Event_CloseWindow
http://assets2.ignimgs.com/2009/02/26/t ... 766725.jpg
Bernd
Last edited by infratec on Thu Oct 01, 2015 7:18 am, edited 1 time in total.
Re: C64 Loading screen?
Nice one
thanks and I would like do full screen without CanvasGadget...
do I have change open screen setting?

do I have change open screen setting?
Re: C64 Loading screen?
Hey,
you are a programmer
Bernd
you are a programmer

Code: Select all
EnableExplicit
#WindowedScreen = #True
Define.i x, y, Event, Exit, ScreenOk
UseJPEGImageDecoder()
If InitSprite()
If InitKeyboard()
If #WindowedScreen
If ExamineScreenModes()
While NextScreenMode()
Debug Str(ScreenModeWidth())+"x"+Str(ScreenModeHeight())+"x"+Str(ScreenModeDepth())+"@"+Str(ScreenModeRefreshRate())+"Hz"
Wend
EndIf
MessageRequester("Pause", "Click to go")
If OpenWindow(0, 0, 0, 640, 400, "Test", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
If OpenWindowedScreen(WindowID(0), 0, 0, 640, 400)
ScreenOk = #True
EndIf
EndIf
Else
If OpenScreen(640, 480, 32, "C64 loading")
ScreenOk = #True
EndIf
EndIf
If ScreenOk
If LoadImage(0, "c:\tmp\C64.jpg")
If CreateSprite(0, 640, 480)
Repeat
If #WindowedScreen
Repeat
Event = WindowEvent()
If Event = #PB_Event_CloseWindow
Exit = #True
EndIf
Until Event = 0
EndIf
ClearScreen(0)
If IsImage(0)
GrabImage(0, 1, x, y, 20, 20)
If StartDrawing(SpriteOutput(0))
DrawImage(ImageID(1), x, y)
StopDrawing()
x + 20
If x = 640
x = 0
y + 20
If y = 400
FreeImage(0)
EndIf
EndIf
EndIf
FreeImage(1)
EndIf
DisplaySprite(0, 0, 0)
FlipBuffers()
ExamineKeyboard()
Until KeyboardReleased(#PB_Key_Escape) Or Exit
Else
MessageRequester("Error", "CreateSprite() failed")
EndIf
Else
MessageRequester("Error", "LoadImage() failed")
EndIf
Else
MessageRequester("Error", "OpenScreen() failed")
EndIf
Else
MessageRequester("Error", "InitKeyboard() failed")
EndIf
Else
MessageRequester("Error", "InitSprite() failed")
EndIf
Last edited by infratec on Fri Oct 02, 2015 7:03 am, edited 4 times in total.
Re: C64 Loading screen?
Hi,
that's strange.
At home I have also a fault.
At home I use PB 5.40b8 x86 on Win7 x64.
On my office PC it works like expected.
I changed the example to make it 'bullet proof', but it even than I get in trouble.
OpenScreen() fails in my case, but I don't know why.
Bernd
that's strange.
At home I have also a fault.
At home I use PB 5.40b8 x86 on Win7 x64.
On my office PC it works like expected.
I changed the example to make it 'bullet proof', but it even than I get in trouble.
OpenScreen() fails in my case, but I don't know why.
Bernd
Re: C64 Loading screen?
Found it:
640x400 is not supported by my graphics card.
I have to use 640x480.
Try the listing above.
I extended it to show the possible sizes.
But I still don't know why the code stucks with OpenWindowedScreen().
Bernd
640x400 is not supported by my graphics card.
I have to use 640x480.
Try the listing above.
I extended it to show the possible sizes.
But I still don't know why the code stucks with OpenWindowedScreen().
Bernd
Re: C64 Loading screen?
Excellent man and it work so well....
MY PC is AMD 10 7100 Laptop
MY PC is AMD 10 7100 Laptop

Re: C64 Loading screen?
Now also the OpenWindowedScreen() version works.
If you use it, you need an event loop.
Bernd
If you use it, you need an event loop.
Bernd