7 * (C) Copyright 1998 Manuel Lemos.
8 * (C) Copyright 1996-1997 Ian J. Einman.
9 * (C) Copyright 1993-1996 Jaba Development.
10 * (C) Copyright 1993-1996 Jan van den Baard.
11 * All Rights Reserved.
14 * Revision 42.6 2004/06/16 20:16:48 verhaegs
15 * Use METHODPROTO, METHOD_END and REGFUNCPROTOn where needed.
17 * Revision 42.5 2003/01/18 19:09:56 chodorowski
18 * Instead of using the _AROS or __AROS preprocessor symbols, use __AROS__.
20 * Revision 42.4 2000/08/09 11:45:57 chodorowski
21 * Removed a lot of #ifdefs that disabled the AROS_LIB* macros when not building on AROS. This is now handled in contrib/bgui/include/bgui_compilerspecific.h.
23 * Revision 42.3 2000/05/29 00:40:23 bergers
24 * Update to compile with AROS now. Should also still compile with SASC etc since I only made changes that test the define __AROS__. The compilation is still very noisy but it does the trick for the main directory. Maybe members of the BGUI team should also have a look at the compiler warnings because some could also cause problems on other systems... (Comparison always TRUE due to datatype (or something like that)). And please compile it on an Amiga to see whether it still works... Thanks.
26 * Revision 42.2 2000/05/15 19:27:01 stegerg
27 * another hundreds of REG() macro replacements in func headers/protos.
29 * Revision 42.1 2000/05/14 23:32:47 stegerg
30 * changed over 200 function headers which all use register
31 * parameters (oh boy ...), because the simple REG() macro
32 * doesn't work with AROS. And there are still hundreds
33 * of headers left to be fixed :(
35 * Many of these functions would also work with stack
36 * params, but since i have fixed every single one
37 * I encountered up to now, I guess will have to do
38 * the same for the rest.
40 * Revision 42.0 2000/05/09 22:09:05 mlemos
41 * Bumped to revision 42.0 before handing BGUI to AROS team
43 * Revision 41.11 2000/05/09 19:54:20 mlemos
44 * Merged with the branch Manuel_Lemos_fixes.
46 * Revision 41.10.2.2 1999/07/04 05:16:05 mlemos
47 * Added a debuging version of the function BRectFill.
49 * Revision 41.10.2.1 1998/07/05 19:26:58 mlemos
50 * Added debugging code to trap invalid RectFill calls.
52 * Revision 41.10 1998/02/25 21:12:07 mlemos
55 * Revision 1.1 1998/02/25 17:08:24 mlemos
61 #include "include/classdefs.h"
64 * Default drawinfo pens.
66 makeproto UWORD DefDriPens
[12] = { 0, 1, 1, 2, 1, 3, 1, 0, 2, 1, 2, 1 };
71 STATIC UWORD DisPat
[2] = { 0x2222, 0x8888 };
74 * Calculate the text width.
76 //makeproto ASM ULONG TextWidth(REG(a1) struct RastPort *rp, REG(a0) UBYTE *text)
77 makeproto ASM
REGFUNC2(ULONG
, TextWidth
,
78 REGPARAM(A1
, struct RastPort
*, rp
),
79 REGPARAM(A0
, UBYTE
*, text
))
81 return TextWidthNum(rp
, text
, strlen(text
));
85 //makeproto ASM ULONG TextWidthNum(REG(a1) struct RastPort *rp, REG(a0) UBYTE *text, REG(d0) ULONG len)
86 makeproto ASM
REGFUNC3(ULONG
, TextWidthNum
,
87 REGPARAM(A1
, struct RastPort
*, rp
),
88 REGPARAM(A0
, UBYTE
*, text
),
89 REGPARAM(D0
, ULONG
, len
))
95 * Call TextExtent to find out the text width.
97 TextExtent(rp
, text
, len
, &te
);
100 * Figure out extent width.
102 extent
= te
.te_Extent
.MaxX
- te
.te_Extent
.MinX
+ 1;
105 * Return which ever is bigger.. extent or te.te_Width.
107 return( extent
/*( extent > te.te_Width ) ? extent : te.te_Width */);
112 * Disable the given area.
114 //makeproto ASM VOID BDisableBox(REG(a0) struct BaseInfo *bi, REG(a1) struct IBox *area)
115 makeproto ASM
REGFUNC2(VOID
, BDisableBox
,
116 REGPARAM(A0
, struct BaseInfo
*, bi
),
117 REGPARAM(A1
, struct IBox
*, area
))
119 BSetAfPt(bi
, DisPat
, 1);
121 BSetDPenA(bi
, SHADOWPEN
);
128 * Render a frame/separator title.
130 makeproto VOID
RenderTitle(Object
*title
, struct BaseInfo
*bi
, WORD l
, WORD t
, WORD w
, BOOL highlight
, BOOL center
, UWORD place
)
139 DoMethod(title
, TEXTM_DIMENSIONS
, bi
->bi_RPort
, &box
.Width
, &box
.Height
);
142 * Figure out where to render.
144 if (box
.Width
> w
) box
.Width
= w
;
152 box
.Left
= l
+ w
- box
.Width
;
155 box
.Left
= l
+ ((w
- box
.Width
) >> 1);
158 if (box
.Left
< l
) box
.Left
= l
;
161 * Figure out y position.
163 if (center
) box
.Top
= t
- (box
.Height
>> 1);
164 else box
.Top
= t
- bi
->bi_RPort
->TxBaseline
;
169 BSetDPenA(bi
, BACKGROUNDPEN
);
176 BRectFill(bi
, box
.Left
- 4, box
.Top
, box
.Left
+ box
.Width
+ 4, box
.Top
+ box
.Height
);
178 BSetDPenA(bi
, highlight
? HIGHLIGHTTEXTPEN
: TEXTPEN
);
179 DoMethod(title
, TEXTM_RENDER
, bi
, &box
);
183 //makeproto VOID ASM SetDashedLine(REG(a0) struct BaseInfo *bi, REG(d0) UWORD offset)
184 makeproto ASM
REGFUNC2(VOID
, SetDashedLine
,
185 REGPARAM(A0
, struct BaseInfo
*, bi
),
186 REGPARAM(D0
, UWORD
, offset
))
189 * Render a SHINE/SHADOW pen, dotted box or,
190 * when the two pens are equal a SHADOW/BACKGROUND
193 BSetDPenA(bi
, SHINEPEN
);
194 BSetDPenB(bi
, SHADOWPEN
);
196 BSetDrPt(bi
, 0xF0F0F0F0 >> offset
);
198 if (bi
->bi_RPort
->FgPen
== bi
->bi_RPort
->BgPen
)
199 BSetDPenA(bi
, BACKGROUNDPEN
);
204 * Quickly render a bevelled box.
206 makeproto VOID
RenderBevelBox(struct BaseInfo
*bi
, WORD l
, WORD t
, WORD r
, WORD b
, UWORD state
, BOOL recessed
, BOOL thin
)
208 struct RastPort
*rp
= bi
->bi_RPort
;
211 * Selected or normal?
213 if ((state
== IDS_SELECTED
) || (state
== IDS_INACTIVESELECTED
))
215 recessed
= !recessed
;
221 BSetDPenA(bi
, recessed
? SHADOWPEN
: SHINEPEN
);
224 VLine(rp
, l
, t
, b
- 1);
225 if (!thin
) VLine(rp
, l
+ 1, t
+ 1, b
- 1);
230 BSetDPenA(bi
, recessed
? SHINEPEN
: SHADOWPEN
);
233 VLine(rp
, r
, t
+ 1, b
);
234 if (!thin
) VLine(rp
, r
- 1, t
+ 1, b
- 1);
238 //makeproto ASM VOID SRectFillDebug(REG(a0) struct RastPort *rp, REG(d0) LONG l, REG(d1) LONG t, REG(d2) LONG r, REG(d3) LONG b,REG(a1) STRPTR file,REG(d4) ULONG line)
239 makeproto ASM
REGFUNC7(VOID
, SRectFillDebug
,
240 REGPARAM(A0
, struct RastPort
*, rp
),
241 REGPARAM(D0
, LONG
, l
),
242 REGPARAM(D1
, LONG
, t
),
243 REGPARAM(D2
, LONG
, r
),
244 REGPARAM(D3
, LONG
, b
),
245 REGPARAM(A1
, STRPTR
, file
),
246 REGPARAM(D4
, ULONG
, line
))
248 //ASM VOID SRectFill(REG(a0) struct RastPort *rp, REG(d0) LONG l, REG(d1) LONG t, REG(d2) LONG r, REG(d3) LONG b)
249 ASM
REGFUNC5(VOID
, SRectFill
,
250 REGPARAM(A0
, struct RastPort
*, rp
),
251 REGPARAM(D0
, LONG
, l
),
252 REGPARAM(D1
, LONG
, t
),
253 REGPARAM(D2
, LONG
, r
),
254 REGPARAM(D3
, LONG
, b
))
257 if ((r
>= l
) && (b
>= t
))
258 RectFill(rp
, l
, t
, r
, b
);
261 D(bug("***Invalid RectFill (%lx,%ld,%ld,%ld,%ld) (%s,%lu)\n",rp
,l
,t
,r
,b
,file
? file
: (STRPTR
)"Unknown file",line
));
267 * Do a safe rect-fill.
270 //makeproto ASM VOID BRectFillDebug(REG(a0) struct BaseInfo *bi, REG(d0) LONG l, REG(d1) LONG t, REG(d2) LONG r, REG(d3) LONG b,REG(a1) STRPTR file,REG(d4) ULONG line)
271 makeproto ASM
REGFUNC7(VOID
, BRectFillDebug
,
272 REGPARAM(A0
, struct BaseInfo
*, bi
),
273 REGPARAM(D0
, LONG
, l
),
274 REGPARAM(D1
, LONG
, t
),
275 REGPARAM(D2
, LONG
, r
),
276 REGPARAM(D3
, LONG
, b
),
277 REGPARAM(A1
, STRPTR
, file
),
278 REGPARAM(D4
, ULONG
, line
))
280 SRectFillDebug(bi
->bi_RPort
, l
, t
, r
, b
,file
,line
);
284 //ASM VOID BRectFill(REG(a0) struct BaseInfo *bi, REG(d0) LONG l, REG(d1) LONG t, REG(d2) LONG r, REG(d3) LONG b)
285 ASM
REGFUNC5(VOID
, BRectFill
,
286 REGPARAM(A0
, struct BaseInfo
*, bi
),
287 REGPARAM(D0
, LONG
, l
),
288 REGPARAM(D1
, LONG
, t
),
289 REGPARAM(D2
, LONG
, r
),
290 REGPARAM(D3
, LONG
, b
))
292 SRectFill(bi
->bi_RPort
, l
, t
, r
, b
);
297 //makeproto ASM VOID BRectFillA(REG(a0) struct BaseInfo *bi, REG(a1) struct Rectangle *rect)
298 makeproto ASM
REGFUNC2(VOID
, BRectFillA
,
299 REGPARAM(A0
, struct BaseInfo
*, bi
),
300 REGPARAM(A1
, struct Rectangle
*, rect
))
302 BRectFill(bi
, rect
->MinX
, rect
->MinY
, rect
->MaxX
, rect
->MaxY
);
306 //makeproto ASM VOID BBoxFill(REG(a0) struct BaseInfo *bi, REG(d0) LONG l, REG(d1) LONG t, REG(d2) LONG w, REG(d3) LONG h)
307 makeproto ASM
REGFUNC5(VOID
, BBoxFill
,
308 REGPARAM(A0
, struct BaseInfo
*, bi
),
309 REGPARAM(D0
, LONG
, l
),
310 REGPARAM(D1
, LONG
, t
),
311 REGPARAM(D2
, LONG
, w
),
312 REGPARAM(D3
, LONG
, h
))
314 SRectFill(bi
->bi_RPort
, l
, t
, l
+ w
- 1, t
+ h
- 1);
318 //makeproto ASM VOID BBoxFillA(REG(a0) struct BaseInfo *bi, REG(a1) struct IBox *box)
319 makeproto ASM
REGFUNC2(VOID
, BBoxFillA
,
320 REGPARAM(A0
, struct BaseInfo
*, bi
),
321 REGPARAM(A1
, struct IBox
*, box
))
323 BBoxFill(bi
, box
->Left
, box
->Top
, box
->Width
, box
->Height
);
328 * Background filling.
331 //makeproto ASM VOID RenderBackFill(REG(a0) struct RastPort *rp, REG(a1) struct IBox *ib, REG(a2) UWORD *pens, REG(d0) ULONG type)
332 makeproto ASM
REGFUNC4(VOID
, RenderBackFill
,
333 REGPARAM(A0
, struct RastPort
*, rp
),
334 REGPARAM(A1
, struct IBox
*, ib
),
335 REGPARAM(A2
, UWORD
*, pens
),
336 REGPARAM(D0
, ULONG
, type
))
340 if (!pens
) pens
= DefDriPens
;
349 bpen
= BACKGROUNDPEN
;
354 bpen
= BACKGROUNDPEN
;
357 case SHINE_SHADOW_RASTER
:
364 bpen
= BACKGROUNDPEN
;
367 case SHINE_FILL_RASTER
:
372 case SHADOW_FILL_RASTER
:
388 apen
= BACKGROUNDPEN
;
392 RenderBackFillRaster(rp
, ib
, pens
[apen
], pens
[bpen
]);
397 //makeproto ASM VOID RenderBackFillRasterDebug(REG(a0) struct RastPort *rp, REG(a1) struct IBox *ib, REG(d0) UWORD apen, REG(d1) UWORD bpen,REG(a2) STRPTR file, REG(d2) ULONG line)
398 makeproto ASM
REGFUNC6(VOID
, RenderBackFillRasterDebug
,
399 REGPARAM(A0
, struct RastPort
*, rp
),
400 REGPARAM(A1
, struct IBox
*, ib
),
401 REGPARAM(D0
, UWORD
, apen
),
402 REGPARAM(D1
, UWORD
, bpen
),
403 REGPARAM(A2
, STRPTR
, file
),
404 REGPARAM(D2
, ULONG
, line
))
406 //ASM VOID RenderBackFillRaster(REG(a0) struct RastPort *rp, REG(a1) struct IBox *ib, REG(d0) UWORD apen, REG(d1) UWORD bpen)
407 ASM
REGFUNC4(VOID
, RenderBackFillRaster
,
408 REGPARAM(A0
, struct RastPort
*, rp
),
409 REGPARAM(A1
, struct IBox
*, ib
),
410 REGPARAM(D0
, UWORD
, apen
),
411 REGPARAM(D1
, UWORD
, bpen
))
414 static UWORD pat
[] = { 0x5555, 0xAAAA };
419 FSetABPenDrMd(rp
, apen
, bpen
, JAM2
);
435 SRectFillDebug(rp
, ib
->Left
, ib
->Top
, ib
->Left
+ ib
->Width
- 1, ib
->Top
+ ib
->Height
- 1,file
,line
);
437 SRectFill(rp
, ib
->Left
, ib
->Top
, ib
->Left
+ ib
->Width
- 1, ib
->Top
+ ib
->Height
- 1);
441 * Clear area pattern.
450 //makeproto ASM VOID DottedBox(REG(a0) struct BaseInfo *bi, REG(a1) struct IBox *ibx)
451 makeproto ASM
REGFUNC2(VOID
, DottedBox
,
452 REGPARAM(A0
, struct BaseInfo
*, bi
),
453 REGPARAM(A1
, struct IBox
*, ibx
))
456 int x2
= ibx
->Left
+ ibx
->Width
- 1;
458 int y2
= ibx
->Top
+ ibx
->Height
- 1;
460 ULONG secs
, micros
, hundredths
;
462 struct RastPort
*rp
= bi
->bi_RPort
;
465 * We clear any thick framing which may be
468 BSetDPenA(bi
, BACKGROUNDPEN
);
469 Move(rp
, x1
+ 1, y1
+ 1);
470 Draw(rp
, x1
+ 1, y2
- 1);
471 Draw(rp
, x2
- 1, y2
- 1);
472 Draw(rp
, x2
- 1, y1
+ 1);
473 Draw(rp
, x1
+ 2, y1
+ 1);
475 CurrentTime(&secs
, µs
);
476 hundredths
= ((secs
& 0xFFFFFF) * 100) + (micros
/ 10000);
477 SetDashedLine(bi
, (hundredths
/ 5) % 8);
486 Draw(rp
, x1
, y1
+ 1);
491 * Find out rendering state.
493 //makeproto ASM ULONG GadgetState(REG(a0) struct BaseInfo *bi, REG(a1) Object *obj, REG(d0) BOOL norec)
494 makeproto ASM
REGFUNC3(ULONG
, GadgetState
,
495 REGPARAM(A0
, struct BaseInfo
*, bi
),
496 REGPARAM(A1
, Object
*, obj
),
497 REGPARAM(D0
, BOOL
, norec
))
499 BOOL active
= !(GADGET(obj
)->Activation
& BORDERMASK
) || (bi
->bi_IWindow
->Flags
& WFLG_WINDOWACTIVE
);
500 BOOL normal
= !(GADGET(obj
)->Flags
& GFLG_SELECTED
) || norec
;
502 return active
? (ULONG
)(normal
? IDS_NORMAL
: IDS_SELECTED
)
503 : (ULONG
)(normal
? IDS_INACTIVENORMAL
: IDS_INACTIVESELECTED
);
509 AROS_LH6(VOID
, BGUI_FillRectPattern
,
510 AROS_LHA(struct RastPort
*, r
, A1
),
511 AROS_LHA(struct bguiPattern
*, bp
, A0
),
512 AROS_LHA(ULONG
, x1
, D0
),
513 AROS_LHA(ULONG
, y1
, D1
),
514 AROS_LHA(ULONG
, x2
, D2
),
515 AROS_LHA(ULONG
, y2
, D3
),
516 struct Library
*, BGUIBase
, 22, BGUI
)
518 makeproto SAVEDS ASM VOID
BGUI_FillRectPattern(REG(a1
) struct RastPort
*r
, REG(a0
) struct bguiPattern
*bp
,
519 REG(d0
) ULONG x1
, REG(d1
) ULONG y1
, REG(d2
) ULONG x2
, REG(d3
) ULONG y2
)
526 int x0
= bp
->bp_Left
;
528 int w
= bp
->bp_Width
;
529 int h
= bp
->bp_Height
;
531 int col_min
, col_max
;
532 int row_min
, row_max
;
534 int from_x
, to_x1
, to_x2
, to_w
;
535 int from_y
, to_y1
, to_y2
, to_h
;
537 struct BitMap
*bm
= bp
->bp_BitMap
;
543 col_max
= x2
++ / w
+ 1;
544 row_max
= y2
++ / h
+ 1;
546 for (i
= col_min
; i
<= col_max
; i
++)
553 from_x
= x0
+ x1
- to_x1
;
564 if ((to_w
= to_x2
- to_x1
) > 0)
566 for (j
= row_min
; j
<= row_max
; j
++)
573 from_y
= y0
+ y1
- to_y1
;
584 if ((to_h
= to_y2
- to_y1
) > 0)
586 BltBitMapRastPort(bm
, from_x
, from_y
, r
, to_x1
, to_y1
, to_w
, to_h
, 0xC0);
596 //makeproto VOID ASM HLine(REG(a1) struct RastPort *rp, REG(d0) UWORD l, REG(d1) UWORD t, REG(d2) UWORD r)
597 makeproto ASM
REGFUNC4(VOID
, HLine
,
598 REGPARAM(A1
, struct RastPort
*, rp
),
599 REGPARAM(D0
, UWORD
, l
),
600 REGPARAM(D1
, UWORD
, t
),
601 REGPARAM(D2
, UWORD
, r
))
608 //makeproto VOID ASM VLine(REG(a1) struct RastPort *rp, REG(d0) UWORD l, REG(d1) UWORD t, REG(d2) UWORD b)
609 makeproto ASM
REGFUNC4(VOID
, VLine
,
610 REGPARAM(A1
, struct RastPort
*, rp
),
611 REGPARAM(D0
, UWORD
, l
),
612 REGPARAM(D1
, UWORD
, t
),
613 REGPARAM(D2
, UWORD
, b
))
620 //makeproto ASM ULONG FGetAPen(REG(a1) struct RastPort *rp)
621 makeproto ASM
REGFUNC1(ULONG
, FGetAPen
,
622 REGPARAM(A1
, struct RastPort
*,rp
))
627 if (OS30
) return GetAPen(rp
);
633 //makeproto ASM ULONG FGetBPen(REG(a1) struct RastPort *rp)
634 makeproto ASM
REGFUNC1(ULONG
, FGetBPen
,
635 REGPARAM(A1
, struct RastPort
*,rp
))
640 if (OS30
) return GetBPen(rp
);
646 //makeproto ASM ULONG FGetDrMd(REG(a1) struct RastPort *rp)
647 makeproto ASM
REGFUNC1(ULONG
, FGetDrMd
,
648 REGPARAM(A1
, struct RastPort
*,rp
))
653 if (OS30
) return GetDrMd(rp
);
659 //makeproto ASM ULONG FGetDepth(REG(a1) struct RastPort *rp)
660 makeproto ASM
REGFUNC1(ULONG
, FGetDepth
,
661 REGPARAM(A1
, struct RastPort
*, rp
))
664 return GetBitMapAttr(rp
->BitMap
, BMA_DEPTH
);
666 if (OS30
) return GetBitMapAttr(rp
->BitMap
, BMA_DEPTH
);
667 return rp
->BitMap
->Depth
;
672 //makeproto ASM VOID FSetAPen(REG(a1) struct RastPort *rp, REG(d0) ULONG pen)
673 makeproto ASM
REGFUNC2(VOID
, FSetAPen
,
674 REGPARAM(A1
, struct RastPort
*, rp
),
675 REGPARAM(D0
, ULONG
, pen
))
678 SetRPAttrs(rp
, RPTAG_APen
, pen
, TAG_END
);
680 if (OS30
) SetRPAttrs(rp
, RPTAG_APen
, pen
, TAG_END
);
681 else if (rp
->FgPen
!= pen
) SetAPen(rp
, pen
);
686 //makeproto ASM VOID FSetBPen(REG(a1) struct RastPort *rp, REG(d0) ULONG pen)
687 makeproto ASM
REGFUNC2(VOID
, FSetBPen
,
688 REGPARAM(A1
, struct RastPort
*, rp
),
689 REGPARAM(D0
, ULONG
, pen
))
692 SetRPAttrs(rp
, RPTAG_BPen
, pen
, TAG_END
);
694 if (OS30
) SetRPAttrs(rp
, RPTAG_BPen
, pen
, TAG_END
);
695 else if (rp
->BgPen
!= pen
) SetBPen(rp
, pen
);
700 //makeproto ASM VOID FSetDrMd(REG(a1) struct RastPort *rp, REG(d0) ULONG drmd)
701 makeproto ASM
REGFUNC2(VOID
, FSetDrMd
,
702 REGPARAM(A1
, struct RastPort
*, rp
),
703 REGPARAM(D0
, ULONG
, drmd
))
706 SetRPAttrs(rp
, RPTAG_DrMd
, drmd
, TAG_END
);
708 if (OS30
) SetRPAttrs(rp
, RPTAG_DrMd
, drmd
, TAG_END
);
709 else if (rp
->DrawMode
!= drmd
) SetDrMd(rp
, drmd
);
714 //makeproto ASM VOID FSetABPenDrMd(REG(a1) struct RastPort *rp, REG(d0) ULONG apen, REG(d1) ULONG bpen, REG(d2) ULONG mode)
715 makeproto ASM
REGFUNC4(VOID
, FSetABPenDrMd
,
716 REGPARAM(A1
, struct RastPort
*, rp
),
717 REGPARAM(D0
, ULONG
, apen
),
718 REGPARAM(D1
, ULONG
, bpen
),
719 REGPARAM(D2
, ULONG
, mode
))
722 SetABPenDrMd(rp
, apen
, bpen
, mode
);
724 if (OS30
) SetABPenDrMd(rp
, apen
, bpen
, mode
);
735 //makeproto ASM VOID FSetFont(REG(a1) struct RastPort *rp, REG(a0) struct TextFont *tf)
736 makeproto ASM
REGFUNC2(VOID
, FSetFont
,
737 REGPARAM(A1
, struct RastPort
*, rp
),
738 REGPARAM(A0
, struct TextFont
*, tf
))
741 SetRPAttrs(rp
, RPTAG_Font
, tf
, TAG_END
);
743 if (OS30
) SetRPAttrs(rp
, RPTAG_Font
, tf
, TAG_END
);
746 if (rp
->Font
!= tf
) SetFont(rp
, tf
);
752 //makeproto ASM VOID FSetFontStyle(REG(a1) struct RastPort *rp, REG(d0) ULONG style)
753 makeproto ASM
REGFUNC2(VOID
, FSetFontStyle
,
754 REGPARAM(A1
, struct RastPort
*, rp
),
755 REGPARAM(D0
, ULONG
, style
))
757 SetSoftStyle(rp
, style
, AskSoftStyle(rp
));
761 //makeproto ASM VOID FClearAfPt(REG(a1) struct RastPort *rp)
762 makeproto ASM
REGFUNC1(VOID
, FClearAfPt
,
763 REGPARAM(A1
, struct RastPort
*, rp
))
765 SetAfPt(rp
, NULL
, 0);
772 //makeproto ASM VOID BSetDPenA(REG(a0) struct BaseInfo *bi, REG(d0) LONG pen)
773 makeproto ASM
REGFUNC2(VOID
, BSetDPenA
,
774 REGPARAM(A0
, struct BaseInfo
*, bi
),
775 REGPARAM(D0
, LONG
, pen
))
777 FSetAPen(bi
->bi_RPort
, bi
->bi_Pens
[pen
]);
781 //makeproto ASM VOID BSetPenA(REG(a0) struct BaseInfo *bi, REG(d0) ULONG pen)
782 makeproto ASM
REGFUNC2(VOID
, BSetPenA
,
783 REGPARAM(A0
, struct BaseInfo
*, bi
),
784 REGPARAM(D0
, ULONG
, pen
))
786 FSetAPen(bi
->bi_RPort
, pen
);
790 //makeproto ASM VOID BSetDPenB(REG(a0) struct BaseInfo *bi, REG(d0) LONG pen)
791 makeproto ASM
REGFUNC2(VOID
, BSetDPenB
,
792 REGPARAM(A0
, struct BaseInfo
*, bi
),
793 REGPARAM(D0
, LONG
, pen
))
795 FSetBPen(bi
->bi_RPort
, bi
->bi_Pens
[pen
]);
799 //makeproto ASM VOID BSetPenB(REG(a0) struct BaseInfo *bi, REG(d0) ULONG pen)
800 makeproto ASM
REGFUNC2(VOID
, BSetPenB
,
801 REGPARAM(A0
, struct BaseInfo
*, bi
),
802 REGPARAM(D0
, ULONG
, pen
))
804 FSetBPen(bi
->bi_RPort
, pen
);
808 //makeproto ASM VOID BSetDrMd(REG(a0) struct BaseInfo *bi, REG(d0) ULONG drmd)
809 makeproto ASM
REGFUNC2(VOID
, BSetDrMd
,
810 REGPARAM(A0
, struct BaseInfo
*, bi
),
811 REGPARAM(D0
, ULONG
, drmd
))
813 FSetDrMd(bi
->bi_RPort
, drmd
);
817 //makeproto ASM VOID BSetFont(REG(a0) struct BaseInfo *bi, REG(a1) struct TextFont *tf)
818 makeproto ASM
REGFUNC2(VOID
, BSetFont
,
819 REGPARAM(A0
, struct BaseInfo
*, bi
),
820 REGPARAM(A1
, struct TextFont
*, tf
))
822 FSetFont(bi
->bi_RPort
, tf
);
826 //makeproto ASM VOID BSetFontStyle(REG(a0) struct BaseInfo *bi, REG(d0) ULONG style)
827 makeproto ASM
REGFUNC2(VOID
, BSetFontStyle
,
828 REGPARAM(A0
, struct BaseInfo
*, bi
),
829 REGPARAM(D0
, ULONG
, style
))
831 SetSoftStyle(bi
->bi_RPort
, style
, AskSoftStyle(bi
->bi_RPort
));
835 //makeproto ASM VOID BSetAfPt(REG(a0) struct BaseInfo *bi, REG(a1) UWORD *pat, REG(d0) ULONG size)
836 makeproto ASM
REGFUNC3(VOID
, BSetAfPt
,
837 REGPARAM(A0
, struct BaseInfo
*, bi
),
838 REGPARAM(A1
, UWORD
*, pat
),
839 REGPARAM(D0
, ULONG
, size
))
841 SetAfPt(bi
->bi_RPort
, pat
, size
);
845 //makeproto ASM VOID BClearAfPt(REG(a0) struct BaseInfo *bi)
846 makeproto ASM
REGFUNC1(VOID
, BClearAfPt
,
847 REGPARAM(A0
, struct BaseInfo
*, bi
))
849 SetAfPt(bi
->bi_RPort
, NULL
, 0);
853 //makeproto ASM VOID BSetDrPt(REG(a0) struct BaseInfo *bi, REG(d0) ULONG pat)
854 makeproto ASM
REGFUNC2(VOID
, BSetDrPt
,
855 REGPARAM(A0
, struct BaseInfo
*, bi
),
856 REGPARAM(D0
, ULONG
, pat
))
858 SetDrPt(bi
->bi_RPort
, pat
& 0xFFFF);
862 //makeproto ASM VOID BDrawImageState(REG(a0) struct BaseInfo *bi, REG(a1) Object *image,
863 // REG(d0) ULONG x, REG(d1) ULONG y, REG(d2) ULONG state)
864 makeproto ASM
REGFUNC5(VOID
, BDrawImageState
,
865 REGPARAM(A0
, struct BaseInfo
*, bi
),
866 REGPARAM(A1
, Object
*, image
),
867 REGPARAM(D0
, ULONG
, x
),
868 REGPARAM(D1
, ULONG
, y
),
869 REGPARAM(D2
, ULONG
, state
))
871 //tprintf("%08lx %08lx %ld %ld %04lx %08lx\n", /4*
872 DrawImageState(bi
->bi_RPort
, IMAGE(image
), x
, y
, state
, bi
->bi_DrInfo
);