Restored from previous forum. Originally posted by Skipsy.
Hi all,
I don't understand how to use "something" unpacked by nextpackfile.
First Am I right with the following code :
if OpenPack("Pack1")= 0
MessageRequester("Problem","Impossible d'ouvrir le fichier pack",0)
End
EndIf
result = NextPackFile ()
I should have in result the mem address where is stored the unpacked
file (?)
If it is correct, how can I use the unpacked file the this use :
StartDrawing(ScreenOutput())
DrawImage(result , 0, 0 )
StopDrawing()
It displays a dark screen...
Thks guys
"If you want to touch the sky,
**** a duck and try to fly"
unpack....what ?
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by plouf.
Since NextPackFile() uncompress and return memory address of the uncompresse data you can Use it like this
Christos
Since NextPackFile() uncompress and return memory address of the uncompresse data you can Use it like this
Code: Select all
OpenPack("MyPack.pak")
CatchImage(0,NextPackFile())
OpenWindow(0,200,200,200,200, #PB_Window_SystemMenu,"Window")
StartDrawing(WindowOutput())
DrawImage(UseImage(0),0,0)
StopDrawing()
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm