T.R | Title | User | Personal Name | Date | Lines |
---|
3989.1 | | WJG::GUINEAU | | Fri Aug 03 1990 11:48 | 6 |
| Well, from C those are modes known as JAM1 and JAM2. You are writing in
JAM2 mode (force both FG anf BG) and need to get into JAM1 (force FG only).
Not sure how you do that in BASIC...
john
|
3989.2 | The C code will do | SIOG::OBRIEN_PAUL | Point and Grunt | Fri Aug 03 1990 11:54 | 10 |
|
Its much the same in BASIC, I call the library routine and make
sure I pass the parameters in the correct format. So if you could
tell me what you do in C to switch from JAM2 to JAM1 and what data
types are used for arguments and return values I can probably translate
it into BASIC.
(Thanks for the fast response)
pob
|
3989.3 | | WJG::GUINEAU | | Fri Aug 03 1990 12:15 | 36 |
| here is some code from CM.C (wjg::amiga:cm.arc)
.
.
.
/* pointer text for ShowMouse() */
char pbuf[80];
struct IntuiText pos_txt = {
WHTPEN,BLKPEN, /* FrontPen, BackPen */
JAM2, /* DrawMode */
7,2, /* LeftEdge, TopEdge */
&TxtAt_Plain, /* TextAttr */
pbuf, /* IText */
NULL /* NextText */
};
.
.
.
ShowMouse(x,y)
SHORT x,y;
{
if(x<0||y<0) return(0);
sprintf(pbuf," %.3e , %.3e",
(double)(x)*SI.ds,(double)(w->GZZHeight-y+1)*SI.ds);
PrintIText(prp,&pos_txt,0,0);
return(0);
}
|
3989.4 | SetDrMode? | TLE::RMEYERS | Randy Meyers | Fri Aug 03 1990 18:46 | 16 |
| Reply .3 shows an Intuition call that establishes the proper
graphics modes and prints the text. The Intuition call could be
replaced by "more primitive" calls to the graphics library.
The graphics library has the idea of a foreground pen, background
pen, and drawing mode. Once you establish the mode, it affects
all the graphics calls (including the text output call) until
you change it.
Depending on your program and what BASIC might be doing behind your
back, you my find it easier to call the graphics library routine
that sets the mode: setting the mode may have the proper effect
on the current way you output text.
The routine you want has some name like "Set Draw Mode," but
I think the name is spelled something like SetDrMode.
|
3989.5 | Get "Amiga Tricks and Tips" | RGB::ROSE | | Fri Aug 03 1990 23:28 | 25 |
| The Abacus book "Amiga Tricks and Tips" tells how to access library
functions from BASIC. If you want to extend your capability within
BASIC, I recommend you get it. Then you will want the ROM Kernal
Manual. Then you will want a C compiler...
At the beginning of the program, put in a statement
LIBRARY "graphics.library"
When you want to set the drawmode put in the statement
SetDrMd(WINDOW(8),Mode)
Where Mode =
0 = jam1 (transparent)
1 = jam2 (writes foreground and background)
2 = inversevid (jam2 with colors reversed)
3 = complement (jam1 with color register 0 complemented)
At the end of your program include the statement
LIBRARY CLOSE
|
3989.6 | SetDrMd works fine! | SIOG::OBRIEN_PAUL | Point and Grunt | Tue Aug 07 1990 06:50 | 16 |
| SetDrMd(WINDOW(8),0) works perfectly.
I've gone and bought Amiga Tricks & Tips, full of useful stuff but
(like all Abacus books) its use of English is very bad. I presume it
was written in German by someone who knew what they were talking about
but was then translated into English by a non-techie garbling some of
the meaning.
Still have not solved the problem of incomplete deletion of characters
when using large fonts; The only workaround that seems robust is to
redisplay the entire line after blanking the region with a rectangle.
But that destroys my background graphic -- back to square 1!
Many thanks for your replies,
pob
|
3989.7 | They aren't perfect, but the get the job done | RGB::ROSE | | Tue Aug 07 1990 09:45 | 6 |
| Yes, Abacus books tend to have a lot of bad grammer and
occasionally some programming errors. But I still find them useful.
I have found at least one case in the advanced C book where their
example code evokes the GURU. It's a good idea to have the ROM Kernal
Manual as a back up reference. Especially when you get around to
trying out C.
|