MPacker Free pak for bmax (Beta)

BlitzMax Forums/BlitzMax Programming/MPacker Free pak for bmax (Beta)

Filax(Posted 2005) [#1]
HI :)

This is a free version of my hown packer for bmax, you can use it for
free :) But if you have problem with some files please tell me here :)

Installation :
Open the rar file and copy : 'mpacker.mod' in your mod directory

and use 'MPacker.bmx' for example.

http://www.blitz3dfr.com/tempo/Mpacker.rar


Filax(Posted 2005) [#2]
Hi :)

The packer now can use exe file for packing and depacking.


ziggy(Posted 2005) [#3]
Do you mean it can create self-extracting EXEs???


Sarge(Posted 2005) [#4]
I get a error using you example code.

Unhandled Exception: Illegal bank offset


Filax(Posted 2005) [#5]
Ziggy : Yes of course !

Sarge : Can you post you code ? because my example work only
at my home :) you must convert the file with your hown media and
directory.

first create a pak (change the pak name and media of couse)

MPK_CreatePak("C:\Filou\Test.mpk")
MPK_AddFileToPak("C:\Filou\test01.jpg")
MPK_AddFileToPak("C:\Filou\test02.jpg")
MPK_AddFileToPak("C:\Filou\test03.jpg")
MPK_ClosePak()


Next example with image loading.

' ------------------------------------------------
' You can use multi transparent pak for load image
' ------------------------------------------------
MPK_InitPak("C:\Filou\Test.mpk")
Local img:Timage=LoadImage(ResizePixmap(MPK_LoadPixmap("IMG_1721.JPG"),GraphicsWidth(),GraphicsHeight()),DYNAMICIMAGE)
MPK_ClosePak()

And next draw your image ...

DrawImage img,0,0
Flip
waitkey

download this example with code+pak file
http://www.blitz3dfr.com/tempo/MPacker-Example.rar


Sarge(Posted 2005) [#6]
Very strange when i run the .exe it works perfect but when i run the code its not so good. And the code i was trying before is from your MPacker.bmx.

Hope you fix this i am really intrested in using it with my ide.


Filax(Posted 2005) [#7]
Hi

I have try on a fresh 1.06 bmax install (witout previous mpacker
mod) there is no problem ? ?? i don't see how i can fix this ?
one solution is :

- First, upgrade your bmax to 1.06 ! and (maybe re-build module ?)

- Exit BMax

- Re-download the last version
http://www.blitz3dfr.com/tempo/Mpacker.rar

- Erase the previous mpacker.mod

- Copy the new one, relauch bmax

And please can you post a bugged example (with media) ?


flaith(Posted 2005) [#8]
Great job Filax !

just one thing, when i use

MPK_ExtractPak("G:\BMAX\packer\Test.mpk","G:\BMAX\packer\test")


if the directory "test" doesn't exist, there is no extract !!!
I must create manually the directory !


Filax(Posted 2005) [#9]
Thanks for report ! i will add auto creating directory !


Filax(Posted 2005) [#10]
Released please re download :)


Filax(Posted 2005) [#11]
I have corrected some little bugs and i have add support to read file
directly under ram without disk dump !