How do you do it?
I don't know to much assembly.
Transparent Color PUT without library
Moderators:Administrator, Global Moderator
-
- Newbie
- Posts:6
- Joined:Mon Sep 02, 2002 3:56 am
- Location:Berlin, NY
- Contact:
DOS Programing Will Last Forever!!
-
- Newbie
- Posts:6
- Joined:Mon Sep 02, 2002 3:56 am
- Location:Berlin, NY
- Contact:
Re: Transparent Color PUT without library
Me again, also I would like to have the PUT be able to put them off the screen
DOS Programing Will Last Forever!!
Re: Transparent Color PUT without library
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
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
Re: Transparent Color PUT without library
He said "off- the screen" and PUT can't do that.
- frankiebaby
- Global Moderator
- Posts:95
- Joined:Tue Apr 30, 2002 1:38 am
- Location:Pennsylvania
- Contact:
Re: Transparent Color PUT without library
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.
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.
Re: Transparent Color PUT without library
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....
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....