Author Topic: Help with program.  (Read 534 times)

0 Members and 1 Guest are viewing this topic.

Offline SAB

  • ZX 81
  • *
  • Posts: 22
  • Karma: 0
    • View Profile
Help with program.
« on: August 08, 2006 »


I was wondering if anyone could help me.

I need to load in lots of .bmp's but I don't wanna do it one by one.
Would someone know how to code up a program that would let me
do it as cells?  maybe, like for every picture it would grab parts of a pic?
but would that limit me to size?

please help if you can
thanks

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 16784
  • Karma: 439
  • evil/good
    • View Profile
    • My Homepage
Re: Help with program.
« Reply #1 on: August 08, 2006 »
The best way to do something like that would be to arrange your graphics in one long strip, for example if you needed to load 10 images and they were 100 X 100, you could arrange them so that they were placed side by side to create an image that was 1000 X 100 and you could grab the 10 frames of animation using a for next loop, have an x co-ordinate and increase it by the width of the image you are taking each frame.

I think that the get function in gfxlib would let you do this quite ok, unless you are using tinyptc which is a little bit more tricky, rbraz made some nice tools to load 256 colour bitmaps.

http://dbfinteractive.com/index.php?topic=370.0

If you are using tinyptc and need some help on this I will write more if you're stuck because I use this for loading my pictures no problems.

The other option is to use Thrawn's png lib, load your image with it and then cut the bits out that you want.

Edit - Fixed link formatting
« Last Edit: August 08, 2006 by Clyde »
Shockwave ^ Codigos
Challenge Trophies Won:

Offline SAB

  • ZX 81
  • *
  • Posts: 22
  • Karma: 0
    • View Profile
Re-Help with program
« Reply #2 on: August 09, 2006 »
Thanks for the ideas the problem I am haveing is that there .tga files
so I can get transperancy.
and the other problems is it's limited to 256X256 file size
is there a way around this?
and there 24-bit files

your idea would work great if I did'nt need transperancy.
I could do it in pure qb code but that way of transperancy if rather difficult.
with masks in all

what's tinypic?
will it do the job?
this needs to be done in opengl too
rather strange mixing up code it is
one thing does this but not that

sorry for the added post if you would like I will just keep adding to this I only hope people would come back

thanks

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 16784
  • Karma: 439
  • evil/good
    • View Profile
    • My Homepage
Re: Help with program.
« Reply #3 on: August 10, 2006 »

[Topic Merged - Sw.]

First of all, I merged the extra topic you made into this original one.

I see that you need your program to do other stuff that wasn't mentioned in your first post so I don't think that tinyptc would be suitable.
Why don't you look into SDL or some other wrapper like that?
Shockwave ^ Codigos
Challenge Trophies Won: