Author Topic: how to use an image as .bas file inside freebasic  (Read 3962 times)

0 Members and 1 Guest are viewing this topic.

Offline bikerboy

  • Amiga 1200
  • ****
  • Posts: 349
  • Karma: 12
    • View Profile
i have converted my image using bin2bas and in the code i put #include "imagename.bas"

but i don't know what else to put in the code to display the image

the image before conversion was a .png file 8bit 256 colors

Ps.i'm trying to use the image as a background

thanx guys :)

EDIT: i'll first try this ->http://www.dbfinteractive.com/forum/index.php/topic,3788.0.html

and if i have any questions i'll ask :)

EDIT: how do i convert "screen.bmp.raw" and "screen.bmp.pal" to .bas files?

i'm asking b/c in the example it has this -> #INCLUDE "screenpal.bas"
#INCLUDE "screenraw.bas" , i'm guessing with bin2bas , i'll go try if it works
« Last Edit: December 25, 2008 by bikerboy »


Offline va!n

  • Pentium
  • *****
  • Posts: 1432
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: how to use an image as .bas file inside freebasic
« Reply #1 on: December 25, 2008 »
@bikerboy:
On the first post you can find a d/l link with complete example... just take a closer look to the source ^^
http://www.dbfinteractive.com/forum/index.php/topic,3788.0.html
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Offline bikerboy

  • Amiga 1200
  • ****
  • Posts: 349
  • Karma: 12
    • View Profile
Re: how to use an image as .bas file inside freebasic
« Reply #2 on: December 25, 2008 »
@bikerboy:
On the first post you can find a d/l link with complete example... just take a closer look to the source ^^

yes that's what i did but it's a bit confusing for someone that uses this the first time and has little knowledge of codes

and that's b/c in the example shockwave uses 2 images and a starfield

yes i know "it's easy,read some manuals, etc." but without practice reading is nothing.


Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: how to use an image as .bas file inside freebasic
« Reply #3 on: December 25, 2008 »
Really, everything you need is inside that tutorial and only one source image is used, not two.

Have a slow read through it, read it again, then try it.

Then if you get an error, read it again, then again.

If you're still stuck, ask for help. The tutorial is step by step, my girlfriend follwed it and she has never coded.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline bikerboy

  • Amiga 1200
  • ****
  • Posts: 349
  • Karma: 12
    • View Profile
Re: how to use an image as .bas file inside freebasic
« Reply #4 on: December 25, 2008 »
i think i've found the problem, it's the buffer again

image loader uses it and the ASCII scroller uses it and there's a conflict

if i comment one of the two buffers i get an error if i leave them i get a duplicate error.

Quote
my girlfriend follwed it and she has never coded.

then you are a lucky man for having a smart girlfriend ;)


Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: how to use an image as .bas file inside freebasic
« Reply #5 on: December 26, 2008 »
All you need to do is put your own program away, download the tutorial and follow it step by step until you understand it.

The tutorial is designed for use with tinyptc, don't bother trying to use it with Fbgfx, it's not made for that.

So the problem is that you're not following the tutorial at the moment.

The mists will clear for you I am sure but what I'm not going to do is re-write that tutorial again when it's fine and you haven't followed it properly. Sorry.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline bikerboy

  • Amiga 1200
  • ****
  • Posts: 349
  • Karma: 12
    • View Profile
Re: how to use an image as .bas file inside freebasic
« Reply #6 on: December 26, 2008 »
The tutorial is designed for use with tinyptc, don't bother trying to use it with Fbgfx, it's not made for that.

that covers everything :)

thanx for the answer man :)

you may close this post if you like, i've got a complete answer :)