29 March 2007, 13:38 | #1 |
Zone Friend
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 345
|
Embed data in Blitz2 programs
I'm a bit new to BlitzBasic2 (yeah in 2007 ) but I'm curious, is there a way of embedding data within the executable instead of having separate iff/modules/whatever-files on disk? It's not really "hacker-proof" to store titlescreen of your game as an iff-file on disk..
AMOS had some ways of dealing with this but I haven't read about anything similar in Blitz... Hints anyone? |
29 March 2007, 14:06 | #2 |
Moderator
Join Date: Jul 2004
Location: Norwich, Norfolk, UK
Age: 37
Posts: 11,168
|
I think something like the INCBIN command would work, I've never actually felt the need to use it myself though.
Out of interest why aren't you comfortable with using separate IFF files? I hardly think the whole hacking thing is a problem for the Amiga in this day and age. I've never had a problem with my stuff. |
29 March 2007, 14:14 | #3 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
the following code is taken from my swoseditor, I wanted to include a graphic within the exe so I could distribute just that (if ya follow)
Code:
INCDIR "data:programming/swoseditor/data/" pic_dat: IncBin "V1.5_shapes" pal_dat: IncBin "V1.5.pal" |
31 March 2007, 20:47 | #4 |
Zone Friend
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 345
|
Ok, incbin is the way to go. But how do you load the shapes data then? I'm a blitz2-super-newbie so I am really new into this.
The "Loadshape" instruction wants to load a file from disk, right? How do you deal with it since your shape is already included? |
31 March 2007, 21:23 | #5 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
In my source I use
Code:
DecodeShapes 1,7,?pic_dat DecodePalette 1,?pal_dat |
01 April 2007, 07:03 | #6 |
Registered User
Join Date: Jan 2005
Location: 62-France
Age: 57
Posts: 413
|
hello,
on this site: http://www.amiforce.de, there is an english foum for amiblitz where the authors and some amiblitz users can help you. there is also an english ML for amiblitz: http://groups.yahoo.com/group/amiblitz/ you can found the same persons like on the amiforce forum to help you with amiblitz. please increase the ammount of amiblitz users available by joining the forum and/or the ML. amiblitz3 is a actually developped and tested. you can found news about amiblitz3 on amiforce.de |
01 April 2007, 09:56 | #7 |
Zone Friend
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 345
|
The "decodeshapes" instruction is not included in my manual.. hmmm..
|
01 April 2007, 11:15 | #8 |
Moderator
Join Date: Jul 2004
Location: Norwich, Norfolk, UK
Age: 37
Posts: 11,168
|
What version of Blitz are you using? I know for a fact it's included in version 2.1.
|
01 April 2007, 11:16 | #9 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
just type it into blitz and press help for command syntax
from blitz.guide Code:
Syntax : DecodeShapes Shape#[,Shape#],MemoryLocation Library : shapeslib Description: DecodeShapes, similar to DecodeMedModule ensures the data is in chip and then configures the Shape object(s) to point to the data. |
02 April 2007, 10:30 | #10 | |
Zone Friend
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 345
|
Quote:
|
|
02 April 2007, 13:03 | #11 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
you seriously need to upgrade..
I'll chuck together a blitz hdf or similar later if i get time, will include 99% of all the libs etc updated You will need to save all your source as ascii though otherwise alot of commands will balls up |
02 April 2007, 14:33 | #12 | |
Zone Friend
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 345
|
Quote:
|
|
02 April 2007, 14:43 | #13 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
what i'll do is upload my amiblitz folder/dir for you to download, simply unpack it and use it, make sure you save ALL your source as ascii now though.. i'll do this after lunch
|
02 April 2007, 15:49 | #14 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
it's in the zone
Simply unrar and copy over your existing blitz install |
02 April 2007, 17:46 | #15 |
Zone Friend
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 345
|
Thanks works! The editor still sucks btw but it don't crash my computer on exiting..
|
02 April 2007, 19:31 | #16 |
Registered User
Join Date: Jan 2005
Location: 62-France
Age: 57
Posts: 413
|
hello,
amiblitz 2.4x is on aminet. not the verry latest but pratically. the last amiblitz in on amiforce.de. |
02 April 2007, 19:38 | #17 |
Global Moderator
Join Date: Nov 2001
Location: Derby, UK
Age: 48
Posts: 9,355
|
yes my upload is not the lkatest package, but it works.
My acidlibs & deflibs are quite large too, but there will be libs updated and missing still |
02 April 2007, 19:57 | #18 |
Zone Friend
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 345
|
I'll try the aminet one or the one at amiforce.de.. The "compile and run" rarely works btw.. Well a print "hello world" works but anything else seems to lock up..
|
03 April 2007, 07:36 | #19 |
Registered User
Join Date: Jan 2005
Location: 62-France
Age: 57
Posts: 413
|
hello,
what is your amiga hardware ??? the best is to post the conpilation problem on the yahoo ML or on amiforce.de because authors of amiblitz are here. |
03 April 2007, 09:59 | #20 |
Zone Friend
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 345
|
I've got an A1200 with OS3.9 and 68060/50 with 64Mb RAM. Tried the latest beta of AmiBlitz3 but still compile n run rarely works. However generating a working executable seems to work, when the editor doesn't crash..
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Blitz2: Hires laced | BippyM | Coders. Language | 25 | 06 February 2020 01:07 |
Blitz2 keyboard issues | htdreams | Coders. Blitz Basic | 2 | 16 August 2013 15:58 |
Blitz2 Newcommandset | BippyM | Coders. Language | 0 | 21 July 2012 23:59 |
Coding my game in Blitz2 | r0ber7 | Coders. General | 103 | 11 September 2011 20:14 |
Blitz2 Manual | AlfaRomeo | Amiga scene | 18 | 01 May 2009 10:53 |
|
|