Transparent Color PUT without library

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators:Administrator, Global Moderator

Post Reply
ScotCompMan
Newbie
Posts:6
Joined:Mon Sep 02, 2002 3:56 am
Location:Berlin, NY
Contact:
Transparent Color PUT without library

Post by ScotCompMan » Sat Sep 28, 2002 8:19 pm

How do you do it?
I don't know to much assembly.
DOS Programing Will Last Forever!!

ScotCompMan
Newbie
Posts:6
Joined:Mon Sep 02, 2002 3:56 am
Location:Berlin, NY
Contact:

Re: Transparent Color PUT without library

Post by ScotCompMan » Sat Sep 28, 2002 9:15 pm

Me again, also I would like to have the PUT be able to put them off the screen
DOS Programing Will Last Forever!!


Guest

Re: Transparent Color PUT without library

Post by Guest » Tue Oct 29, 2002 10:50 pm

You can do it witout any of that nuts.  I don't know it off hand because I made a sub to do it for me.  Download a graphics tutorial from somwere and it will tell you.

if you want to do it by yourself, this is kind of how it goes:

'mask is invert of sprite
'back is background

put (x,y),sprite,pset
put (x,y),back,xor
put (x,y),mask,xor

Guest

Re: Transparent Color PUT without library

Post by Guest » Wed Nov 06, 2002 8:41 am

He said "off- the screen" and PUT can't do that.

User avatar
frankiebaby
Global Moderator
Posts:95
Joined:Tue Apr 30, 2002 1:38 am
Location:Pennsylvania
Contact:

Re: Transparent Color PUT without library

Post by frankiebaby » Mon Nov 18, 2002 3:21 pm

Well, Here's the deal:
           You Cant. At least not very well. Iv'e tried. What you can do, is to make a sub that takes in an X, a Y and a the Array with the picture, make it go through the array and put the pixels one by one, except when they are black. This saves a lot of memory becuase you do not need mask arrays. and of course, DO NOT use pset if you are in Mode 13h! Set the Def Seg to the Screen ( i cant remember the seg) and use "POKE y * 320& + x, COLR" To put pixels faster. AND, if ya get creative, you can put the image sideways, in reverse, upside down and whatever else you want, then you only need one array per sprite, period.

            Here's The Catch:
LOT OF FLICKER and it is somewhat slow, so the best way to go, is a library with an ASM or sum other routine.
goodluck!

P.S.
My Apologies to Relsoft, about the ASM being neccessary, it is not. A library is already compiled routines, AND it would run much faster compiled. I have only tried it in QuickBasic, before compiling, and with the routine just being a regular sub. This explains the flicker. I assumed he wanted to avoid libraries, and so may have been a bit in error.

Guest

Re: Transparent Color PUT without library

Post by Guest » Thu Nov 21, 2002 7:22 am

well the one I posted above won't have flickers and its pure QB.

it does all what a lib should do but in pure QB.

in case you forgot..

http://auraflow.curvehead.com/files/relgfx.zip

Try the MINIRPG to see the results....

Post Reply