Dark Bit Factory &  Gravity

Dark Bit Factory & Gravity

  • July 30, 2010 *
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Poll

Please Leave Your Vote

Well Above Average
- 5 (83.3%)
Above Average
- 1 (16.7%)
Average
- 0 (0%)
Below Average
- 0 (0%)
Well Below Average
- 0 (0%)

Total Members Voted: 5

Pages: [1] 2   Go Down

Author Topic: Tool - Bin2Bas  (Read 2565 times)

0 Members and 1 Guest are viewing this topic.

rbz

  • MOD
  • Senior Member
  • *******
  • Karma: 272
  • Offline Offline
  • Posts: 2133
    • View Profile
    • WWW
Tool - Bin2Bas
« on: June 25, 2006 »
http://www.rbraz.com/files/tools/Bin2Bas.zip


Bin2Bas V0.22 (DOS version) - by Rbraz (c) 2006
_______________________________________________

Useage:
   Bin2Bas inputfile outputfile

inputfile   = your binary file (music, image etc )
outputfile = your .bas include file


Bin2Bas is a simple tool that will convert your binary file
into Freebasic data format.
This will make easy for you to add binary files, images,
music etc, to your Freebasic project.

Bin2Bas use your filename as "array_symbol".


« Last Edit: July 14, 2006 by Shockwave »
Logged
rbz ^ Codigos

Shockwave

  • good/evil
  • ADMIN
  • Senior Member
  • ********
  • Karma: 356
  • Offline Offline
  • Posts: 15085
  • evil/good
    • View Profile
    • WWW
Re: Tool - Bin2Bas
« Reply #1 on: June 25, 2006 »
Mind if I use this in my next prod?  :)
Logged
Shockwave ^ Codigos....  Error: Keyboard not attached.... Press F1 to continue.

Clyde

  • A Little Fuzzy Wuzzy
  • Contributing Author
  • Senior Member
  • ******
  • Karma: 71
  • Offline Offline
  • Posts: 6965
    • View Profile
Re: Tool - Bin2Bas
« Reply #2 on: June 25, 2006 »
Thats blooming cool dude.

Does it have to always be called "array_symbol"?

Nice one.
Cheers Clyde.
Logged
If only I knew then what I know now.

rbz

  • MOD
  • Senior Member
  • *******
  • Karma: 272
  • Offline Offline
  • Posts: 2133
    • View Profile
    • WWW
Re: Tool - Bin2Bas
« Reply #3 on: June 25, 2006 »
Cheers :)

@Clyde: No, it use your "file name" as "array_symbol".

Eg: Bin2Bas image.bmp image.bas

You'll have: dim shared image.bmp   (0 to ...) as ubyte = { _ ...

It's easy for you to change it to a proper name.

 :cheers:
Logged
rbz ^ Codigos

Shockwave

  • good/evil
  • ADMIN
  • Senior Member
  • ********
  • Karma: 356
  • Offline Offline
  • Posts: 15085
  • evil/good
    • View Profile
    • WWW
Re: Tool - Bin2Bas
« Reply #4 on: June 25, 2006 »
Ok, I've managed to convert some graphics into binary and I have an output file of byte sized stuff
Code: [Select]
&H16,&H18,&H1C,&H13,&H14,&H16,&H09,&H0B, _
&H0B,&H02,&H03,&H03,&H00,&H02,&H02,&H02,&H07,&H08,&H05,&H0A,&H0C,&H08,&H0F,&H13,&H0B,&H14,&H19,&H0D, _
&H18,&H1D,&H10,&H1D,&H23,&H12,&H23,&H2A,&H13,&H29,&H2F,&H11,&H2E,&H32,&H15,&H33,&H36,&H20,&H34,&H3A, _
&H2F,&H35,&H42,&H36,&H32,&H48,&H38,&H30,&H52,&H35,&H2B,&H5A,&H33,&H27,&H62,&H34,&H25,&H66,&H38,&H2B, _
&H6C,&H3A,&H36,&H70,&H3B,&H46,&H73,&H39,&H50,&H70,&H34,&H5D,&H6E,&H25,&H6A,&H6C,&H19,&H77,&H70,&H18, _
&H7B,&H74,&H21,&H7D,&H79,&H25,&H7C,&H7D,&H25,&H7E,&H84,&H21,&H74,&H82,&H1E,&H6B,&H7E,&H1A,&H62,&H79,

Etc.. What do these bytes relate to mate? Are they one byte per pixel?
If so how do I retrieve the colour palette?
Thanks :)

Ps. Just to clarify I will be using this to include a 255 colour logo into a demo using tinyptc.
Logged
Shockwave ^ Codigos....  Error: Keyboard not attached.... Press F1 to continue.

rbz

  • MOD
  • Senior Member
  • *******
  • Karma: 272
  • Offline Offline
  • Posts: 2133
    • View Profile
    • WWW
Re: Tool - Bin2Bas
« Reply #5 on: June 25, 2006 »
For 256 color palette image you will need another tool :) , capable to extract palette and pixel information.

Ok, I'll post that tool in another thread  ;D
Logged
rbz ^ Codigos

Shockwave

  • good/evil
  • ADMIN
  • Senior Member
  • ********
  • Karma: 356
  • Offline Offline
  • Posts: 15085
  • evil/good
    • View Profile
    • WWW
Re: Tool - Bin2Bas
« Reply #6 on: June 25, 2006 »
Thanks Rbraz, you're a diamond geezer!
Logged
Shockwave ^ Codigos....  Error: Keyboard not attached.... Press F1 to continue.

Clyde

  • A Little Fuzzy Wuzzy
  • Contributing Author
  • Senior Member
  • ******
  • Karma: 71
  • Offline Offline
  • Posts: 6965
    • View Profile
Re: Tool - Bin2Bas
« Reply #7 on: June 25, 2006 »
Hehehe, yes he is. However im still stuck on what you mean by Bin2Bas use your filename as "array_symbol"

Do you mean like this dude:

Code: [Select]
dim shared  image.bmp   (0 to Size) as ubyte = { _&H16,&H18,&H1C,&H13,&H14,&H16,&H09,&H0B, _
&H0B,&H02,&H03,&H03,&H00,&H02,&H02,&H02,&H07,&H08,&H05,&H0A,&H0C,&H08,&H0F,&H13,&H0B,&H14,&H19,&H0D, _
&H18,&H1D,&H10,&H1D,&H23,&H12,&H23,&H2A,&H13,&H29,&H2F,&H11,&H2E,&H32,&H15,&H33,&H36,&H20,&H34,&H3A, _
&H2F,&H35,&H42,&H36,&H32,&H48,&H38,&H30,&H52,&H35,&H2B,&H5A,&H33,&H27,&H62,&H34,&H25,&H66,&H38,&H2B, _
&H6C,&H3A,&H36,&H70,&H3B,&H46,&H73,&H39,&H50,&H70,&H34,&H5D,&H6E,&H25,&H6A,&H6C,&H19,&H77,&H70,&H18, _
&H7B,&H74,&H21,&H7D,&H79,&H25,&H7C,&H7D,&H25,&H7E,&H84,&H21,&H74,&H82,&H1E,&H6B,&H7E,&H1A,&H62,&H79 }
« Last Edit: June 25, 2006 by Clyde »
Logged
If only I knew then what I know now.

Shockwave

  • good/evil
  • ADMIN
  • Senior Member
  • ********
  • Karma: 356
  • Offline Offline
  • Posts: 15085
  • evil/good
    • View Profile
    • WWW
Re: Tool - Bin2Bas
« Reply #8 on: June 25, 2006 »
I wonder if Fmod could be included like this.
Logged
Shockwave ^ Codigos....  Error: Keyboard not attached.... Press F1 to continue.

Shockwave

  • good/evil
  • ADMIN
  • Senior Member
  • ********
  • Karma: 356
  • Offline Offline
  • Posts: 15085
  • evil/good
    • View Profile
    • WWW
Re: Tool - Bin2Bas
« Reply #9 on: June 25, 2006 »
Mmm, well I followed the layout in the picture example and I haven't had any problems with it, managed to get an image loaded nicely.
Logged
Shockwave ^ Codigos....  Error: Keyboard not attached.... Press F1 to continue.

rbz

  • MOD
  • Senior Member
  • *******
  • Karma: 272
  • Offline Offline
  • Posts: 2133
    • View Profile
    • WWW
Re: Tool - Bin2Bas
« Reply #10 on: June 26, 2006 »
@Clyde: yeah dude, that's right.

I wonder if Fmod could be included like this.
Yeah, you can do that, and extract it in the same folder of your .exe and before any fmod sound initialization.
Logged
rbz ^ Codigos

Shockwave

  • good/evil
  • ADMIN
  • Senior Member
  • ********
  • Karma: 356
  • Offline Offline
  • Posts: 15085
  • evil/good
    • View Profile
    • WWW
Re: Tool - Bin2Bas
« Reply #11 on: June 26, 2006 »
Cool :)
Logged
Shockwave ^ Codigos....  Error: Keyboard not attached.... Press F1 to continue.

.:] Druid [:.

  • freebasic n00b
  • Pentium
  • *****
  • Karma: 46
  • Offline Offline
  • Posts: 561
    • View Profile
    • WWW
Re: Tool - Bin2Bas
« Reply #12 on: November 11, 2006 »
excellent tool!  I started to learn free-"very"-basic last nite and yet your tool helped...karma boost! :)
Logged
[sheep]: im sure he wants to goto prison.. they didnt get him last time.. he was promised a big cock up his arse.. and no doubt looking forward to it.. lets hope he gets his wish this year.

Shockwave

  • good/evil
  • ADMIN
  • Senior Member
  • ********
  • Karma: 356
  • Offline Offline
  • Posts: 15085
  • evil/good
    • View Profile
    • WWW
Re: Tool - Bin2Bas
« Reply #13 on: November 11, 2006 »
Wahey!! Druid coding in FB, you can have a Karma boost too.. Be sure to post what you make  ;D
Logged
Shockwave ^ Codigos....  Error: Keyboard not attached.... Press F1 to continue.

rbz

  • MOD
  • Senior Member
  • *******
  • Karma: 272
  • Offline Offline
  • Posts: 2133
    • View Profile
    • WWW
Re: Tool - Bin2Bas
« Reply #14 on: November 12, 2006 »
Very cool Druid, looking forward to see your first FB cracktro  :cheers:
Logged
rbz ^ Codigos

.:] Druid [:.

  • freebasic n00b
  • Pentium
  • *****
  • Karma: 46
  • Offline Offline
  • Posts: 561
    • View Profile
    • WWW
Re: Tool - Bin2Bas
« Reply #15 on: November 12, 2006 »
I hear you laughing guys :D

don't worry, you'll see it...did i ever told you i'm the "king of hello world!"? ;)
Logged
[sheep]: im sure he wants to goto prison.. they didnt get him last time.. he was promised a big cock up his arse.. and no doubt looking forward to it.. lets hope he gets his wish this year.

Shockwave

  • good/evil
  • ADMIN
  • Senior Member
  • ********
  • Karma: 356
  • Offline Offline
  • Posts: 15085
  • evil/good
    • View Profile
    • WWW
Re: Tool - Bin2Bas
« Reply #16 on: November 12, 2006 »
You could join speedfisters with skills like that :)
Logged
Shockwave ^ Codigos....  Error: Keyboard not attached.... Press F1 to continue.

.:] Druid [:.

  • freebasic n00b
  • Pentium
  • *****
  • Karma: 46
  • Offline Offline
  • Posts: 561
    • View Profile
    • WWW
Re: Tool - Bin2Bas
« Reply #17 on: November 13, 2006 »
who knows?  I'm always open to talented groups ;)
Logged
[sheep]: im sure he wants to goto prison.. they didnt get him last time.. he was promised a big cock up his arse.. and no doubt looking forward to it.. lets hope he gets his wish this year.

Clyde

  • A Little Fuzzy Wuzzy
  • Contributing Author
  • Senior Member
  • ******
  • Karma: 71
  • Offline Offline
  • Posts: 6965
    • View Profile
Re: Tool - Bin2Bas
« Reply #18 on: August 25, 2007 »
Nice one Rbraz :)
Logged
If only I knew then what I know now.

Clyde

  • A Little Fuzzy Wuzzy
  • Contributing Author
  • Senior Member
  • ******
  • Karma: 71
  • Offline Offline
  • Posts: 6965
    • View Profile
Re: Tool - Bin2Bas
« Reply #19 on: October 26, 2009 »
Any idea where the one that caters for the C family is?
Logged
If only I knew then what I know now.
Pages: [1] 2   Go Up
 

 

B l a c k R a i n V.2 by C r i p

Page created in 0.142 seconds with 22 queries.