Ways of storing media?
BlitzMax Forums/BlitzMax Beginners Area/Ways of storing media?
| ||
Hi! 1. I'm having problems with getting the INCBIN command working: The following source compiles without error, but when I want to access the image the debugger states its a NULL object and terminates the program. Any ideas what's causing this? {Codebox} Incbin "Data\panel_main.png" Graphics 800,600,0 Global Panel_Main=LoadImage("incbin::Data\panel_main.png", Maskedimage) {/Codebox} 2. Has anyone written some kind of datapacker for bmax yet? I need to store a large amount of media files in one! external! file, that I can be used (extracted) by my program. No compressen or encryption needed! Any hints are welcome. :( |
| ||
Use forward slashes? |
| ||
Grisu, Sorry for giving you the runaround but I didn't realise you were using a sub-directory. You'll have to use data/panel_main.png (forward rather than back slash). |
| ||
yepp.. that was it for no. 1. Thanks! |
| ||
2. BM has zlib support so you can use zip files for external packaging ( see pub.zlib ) |
| ||
Sounds great! As always the docs reference isn't that.... complete / understandable. How would I uncompress a single file within a Zip so I can load it up in bmax? uncompress( dest:Byte Ptr,dest_len Var,source:Byte Ptr,source_len )?!? |
| ||
Have a look for TommyBear's helper ZLib module. That will make things just that much easier... |
| ||
Yepp, found it: http://www.blitzbasic.com/Community/posts.php?topic=41626 Only one problem left: How do I read extracted data stored in RAM? |