English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 29 March 2007, 13:38   #1
oRBIT
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?
oRBIT is offline  
Old 29 March 2007, 14:06   #2
Graham Humphrey
Moderator
 
Graham Humphrey's Avatar
 
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.
Graham Humphrey is offline  
Old 29 March 2007, 14:14   #3
BippyM
Global Moderator
 
BippyM's Avatar
 
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"
BippyM is offline  
Old 31 March 2007, 20:47   #4
oRBIT
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?
oRBIT is offline  
Old 31 March 2007, 21:23   #5
BippyM
Global Moderator
 
BippyM's Avatar
 
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
BippyM is offline  
Old 01 April 2007, 07:03   #6
mrodfr
Registered User
 
mrodfr's Avatar
 
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
mrodfr is offline  
Old 01 April 2007, 09:56   #7
oRBIT
Zone Friend
 
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 345
The "decodeshapes" instruction is not included in my manual.. hmmm..
oRBIT is offline  
Old 01 April 2007, 11:15   #8
Graham Humphrey
Moderator
 
Graham Humphrey's Avatar
 
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.
Graham Humphrey is offline  
Old 01 April 2007, 11:16   #9
BippyM
Global Moderator
 
BippyM's Avatar
 
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.
BippyM is offline  
Old 02 April 2007, 10:30   #10
oRBIT
Zone Friend
 
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 345
Quote:
Originally Posted by Graham Humphrey
What version of Blitz are you using? I know for a fact it's included in version 2.1.
Blitzbasic 2.. Got it from ebay. However when picking the "about" menu says "v1.70".
oRBIT is offline  
Old 02 April 2007, 13:03   #11
BippyM
Global Moderator
 
BippyM's Avatar
 
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
BippyM is offline  
Old 02 April 2007, 14:33   #12
oRBIT
Zone Friend
 
Join Date: Apr 2006
Location: Gothenburg/Sweden
Age: 48
Posts: 345
Quote:
Originally Posted by bippym
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
How do you get upgrades these days without downloading torrents? I had to replace the editor cause the original one crashed instantly. I used something called "SuperTed" from aminet and it actually works, however, when exiting Blitz, all Disk I/O seems to freeze so I have to reboot every time I exit.. Annoying.
oRBIT is offline  
Old 02 April 2007, 14:43   #13
BippyM
Global Moderator
 
BippyM's Avatar
 
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
BippyM is offline  
Old 02 April 2007, 15:49   #14
BippyM
Global Moderator
 
BippyM's Avatar
 
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
BippyM is offline  
Old 02 April 2007, 17:46   #15
oRBIT
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..
oRBIT is offline  
Old 02 April 2007, 19:31   #16
mrodfr
Registered User
 
mrodfr's Avatar
 
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.
mrodfr is offline  
Old 02 April 2007, 19:38   #17
BippyM
Global Moderator
 
BippyM's Avatar
 
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
BippyM is offline  
Old 02 April 2007, 19:57   #18
oRBIT
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..
oRBIT is offline  
Old 03 April 2007, 07:36   #19
mrodfr
Registered User
 
mrodfr's Avatar
 
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.
mrodfr is offline  
Old 03 April 2007, 09:59   #20
oRBIT
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..
oRBIT is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 00:22.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.17554 seconds with 13 queries