Page 1 of 1

Posted: Sat Mar 15, 2003 7:42 pm
by BackupUser
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"

Posted: Sat Mar 15, 2003 8:58 pm
by BackupUser
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

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
Christos

Posted: Sun Mar 16, 2003 9:11 am
by BackupUser
Restored from previous forum. Originally posted by Skipsy.

Damn !!!
It is so obvious... I feel stupid !

Thks.

"If you want to touch the sky,
f**k a duck and try to fly"