Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The simpilest way to show a bitmap image?
#1
I've nearly lost my mind trying to figure out how to show a bitmap image in QBasic 4.5 by positining it with variables.
Could somone link me to a tut or give me the source code x.x?
Reply
#2
Look in the tutorials section of this site http://www.qbasicnews.com ... You'll find what you want Smile
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#3
Here's an example Big Grin :

Code:
SCREEN 13
FOR Y% = 0 TO 4
FOR X% = 0 TO 4
READ Col%
PSET (X%, Y%), Col%
NEXT
NEXT

DATA 2, 2, 2, 2, 2
DATA 2, 2, 1, 2, 2
DATA 2, 1, 1, 1, 2
DATA 2, 2, 1, 2, 2
DATA 2, 2, 2, 2, 2
Reply
#4
Naaa, I think he ment a real bitmap,..., you know: a ".bmp" file...

Is this right Elite??
B 4 EVER
Reply
#5
Quote:Naaa, I think he ment a real bitmap,..., you know: a ".bmp" file...
Yes thats exactly what I meant :b
I also heard that QB has two default sounds...
How do I play them?
Reply
#6
Not two default sounds, but two default ways to produce sound.

One is PLAY which takes a string with notes to be played and some control commands. For example, to play an octave:

Code:
PLAY "L 16 O2 CDEFGAB O3 C"

The other one is SOUND, which plays a pitch during some time, measured with ticks (a tick is 1/18 of a second, if nobody changed the internal timer).

Code:
SOUND 440,18

Will play a middle "A" during 1 second.

For more info on syntax, check our beloved QB help Smile
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#7
Check this out: http://forum.qbasicnews.com/viewtopic.ph...8&start=12
Reply
#8
>_< dumb question, how do I set text BG transparency >_<?
Reply
#9
There are a lot of viewers available in the QB world, some being faster than the others.

I found it easier to learn first how to write a .BMP. Displaying them is another story: the size of the pic can be greater than the screen, and, most of all, you can generate fairly easily a 24bits .BMP (i.e. a photographic quality image) with QB, while displaying them is really a "complex" issue.

There are basically 3 types of BMP:

1) the poor formats (monochrome for example)
2) the palet based bitmaps (16 or 256 colours, knowing the 256 colours format can handle the 16 colours)
3) the 24 bits format, which is in fact the easiest to understand, since it has no palet.

Beside these BMP considerations, I can only recommend the following URL:

http://www.myfileformats.com/

You will find there everything you need about the various formats specs (bmp, pcx, gif, etc...)
hink Global, Make Symp' All ! ®
[Image: Banner.gif]
Reply
#10
Quote:>_< dumb question, how do I set text BG transparency >_<?
You don't... at least not with QB's builtin PRINT statement. Unless I'm wrong... but otherwise, you have to write your own text drawing routine.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)