6 #include <exec/types.h>
7 #include <exec/memory.h>
8 #include <dos/dostags.h>
10 #include <dos/anchorpath.h>
12 #include <graphics/gfx.h>
13 #if defined(__amigaos4__)
14 #include <graphics/blitattr.h>
15 #endif //defined(__amigaos4__)
16 #include <intuition/intuition.h>
17 #include <utility/tagitem.h>
18 #include <datatypes/pictureclass.h>
25 #include <proto/dos.h>
26 #include <proto/exec.h>
27 #include <proto/graphics.h>
28 #include <proto/intuition.h>
29 #include <proto/datatypes.h>
30 #include <proto/layers.h>
31 #include <proto/utility.h>
32 #include <proto/timer.h>
34 #include <proto/scalos.h>
36 #include <clib/alib_protos.h>
39 #include <Year.h> // +jmc+
41 #include <scalos/scalos.h>
43 #include "scalos_structures.h"
44 #include "functions.h"
45 #include "Variables.h"
47 #define PDTA_AlphaChannel (DTA_Dummy + 256) /* Alphachannel input */
49 //----------------------------------------------------------------------------
53 static void FreeDatatypesImage(struct DatatypesImage
*dti
);
54 static struct DatatypesImage
*NewDatatypesImage(CONST_STRPTR ImageName
, ULONG Flags
);
55 static struct DatatypesImage
*FindDatatypesImage(CONST_STRPTR ImageName
, ULONG Flags
);
56 static LONG
CreateTempFile(CONST_STRPTR TempFileName
, CONST_STRPTR DtFileName
);
57 static void DtImageNotify(struct internalScaWindowTask
*iwt
, struct NotifyMessage
*msg
);
58 static void CleanupTempFiles(void);
59 #if defined(__amigaos4__)
60 static BOOL
DtImageCreateAlpha(struct DatatypesImage
*dti
);
61 #endif //defined(__amigaos4__)
63 //----------------------------------------------------------------------------
67 static struct List DataTypesImageList
;
68 static BOOL Initialized
= FALSE
;
70 //----------------------------------------------------------------------------
72 BOOL
InitDataTypesImage(void)
74 NewList(&DataTypesImageList
);
84 void CleanupDataTypesImage(void)
88 struct DatatypesImage
*dti
;
90 while ((dti
= (struct DatatypesImage
*) RemHead(&DataTypesImageList
)))
92 d1(kprintf("%s/%s/%ld: Freeing dti(%lx)\n", __FILE__
, __FUNC__
, __LINE__
, dti
));
93 FreeDatatypesImage(dti
);
99 void DisposeDatatypesImage(struct DatatypesImage
**dti
)
103 if (0 == --(*dti
)->dti_UseCount
)
106 Remove(&(*dti
)->dti_Node
);
107 FreeDatatypesImage(*dti
);
115 struct DatatypesImage
*CreateDatatypesImage(CONST_STRPTR ImageName
, ULONG Flags
)
117 struct DatatypesImage
*dti
;
119 dti
= FindDatatypesImage(ImageName
, Flags
);
123 dti
= NewDatatypesImage(ImageName
, Flags
);
125 d1(kprintf("%s/%s/%ld: Create image %s dti(%lx)\n", __FILE__
, __FUNC__
, __LINE__
,
132 void FillBackground(struct RastPort
*rp
, struct DatatypesImage
*dtImage
,
133 WORD MinX
, WORD MinY
, WORD MaxX
, WORD MaxY
,
134 ULONG XStart
, ULONG YStart
)
136 if (dtImage
&& dtImage
->dti_BitMap
)
141 LONG bmHeight
= dtImage
->dti_BitMapHeader
->bmh_Height
;
142 LONG bmWidth
= dtImage
->dti_BitMapHeader
->bmh_Width
;
144 d1(KPrintF("%s/%s/%ld: MinX=%ld MinY=%ld MaxX=%ld MaxY=%ld XStart=%ld YStart=%ld\n", \
145 __FILE__
, __FUNC__
, __LINE__
, MinX
, MinY
, MaxX
, MaxY
, XStart
, YStart
));
147 d1(KPrintF("%s/%s/%ld: Image w=%ld h=%ld\n", \
148 __FILE__
, __FUNC__
, __LINE__
, bmWidth
, bmHeight
));
154 SrcY
= bmHeight
- (-YStart
% bmHeight
);
161 for (y
= MinY
; y
<= MaxY
; )
166 SrcX
= bmWidth
- (-XStart
% bmWidth
);
177 d1(kprintf("%s/%s/%ld: SrcX=%ld y=%ld h=%ld\n", __FILE__
, __FUNC__
, __LINE__
, SrcX
, y
, h
));
179 for (x
= MinX
; x
<= MaxX
; )
184 d1(KPrintF("%s/%s/%ld: x=%ld y=%ld w=%ld h=%ld\n", __FILE__
, __FUNC__
, __LINE__
, x
, y
, w
, h
));
186 BltBitMapRastPort(dtImage
->dti_BitMap
,
205 SetAPen(rp
, iInfos
.xii_iinfos
.ii_DrawInfo
->dri_Pens
[BACKGROUNDPEN
]);
208 RectFill(rp
, MinX
, MinY
, MaxX
, MaxY
);
213 static void FreeDatatypesImage(struct DatatypesImage
*dti
)
215 if (dti
->dti_ImageObj
)
217 Object
*ImageObject
= dti
->dti_ImageObj
;
218 struct ExtGadget
*gg
= (struct ExtGadget
*) ImageObject
;
219 struct DTSpecialInfo
*si
= (struct DTSpecialInfo
*) gg
->SpecialInfo
;
221 dti
->dti_ImageObj
= NULL
;
222 dti
->dti_BitMap
= NULL
;
224 if (dti
->dti_NotifyNode
)
226 RemFromMainNotifyList(dti
->dti_NotifyNode
);
227 dti
->dti_NotifyNode
= NULL
;
230 d1(KPrintF("%s/%s/%ld: \n", __FILE__
, __FUNC__
, __LINE__
));
232 // wait for pending PROCLAYOUT to complete
233 while (si
&& si
->si_Flags
& DTSIF_LAYOUTPROC
)
236 DisposeDTObject(ImageObject
);
238 // now temporary image file can be deleted
239 DeleteFile(dti
->dti_TempFilename
);
241 d1(KPrintF("%s/%s/%ld: \n", __FILE__
, __FUNC__
, __LINE__
));
245 ScalosFree(dti
->dti_ARGB
);
246 dti
->dti_ARGB
= NULL
;
248 if (dti
->dti_Filename
)
250 d1(KPrintF("%s/%s/%ld: FileName=%08lx <%s>\n", __FILE__
, __FUNC__
, __LINE__
, dti
->dti_Filename
, dti
->dti_Filename
));
251 FreeCopyString(dti
->dti_Filename
);
252 dti
->dti_Filename
= NULL
;
254 if (dti
->dti_TempFilename
)
256 FreePathBuffer(dti
->dti_TempFilename
);
257 dti
->dti_TempFilename
= NULL
;
265 static struct DatatypesImage
*NewDatatypesImage(CONST_STRPTR ImageName
, ULONG Flags
)
267 struct DatatypesImage
*dti
;
268 BOOL Success
= FALSE
;
275 d1(KPrintF("%s/%s/%ld: START ImageName=<%s>\n", __FILE__
, __FUNC__
, __LINE__
, ImageName
));
277 dti
= ScalosAlloc(sizeof(struct DatatypesImage
));
280 d1(KPrintF("%s/%s/%ld: dti=%08lx\n", __FILE__
, __FUNC__
, __LINE__
, dti
));
284 d1(KPrintF("%s/%s/%ld: dti=%08lx\n", __FILE__
, __FUNC__
, __LINE__
, dti
));
286 memset(dti
, 0, sizeof(struct DatatypesImage
));
288 dti
->dti_Filename
= AllocCopyString(ImageName
);
289 if (NULL
== dti
->dti_Filename
)
291 d1(KPrintF("%s/%s/%ld: dti_Filename=%08lx\n", __FILE__
, __FUNC__
, __LINE__
, dti
->dti_Filename
));
295 dti
->dti_TempFilename
= AllocPathBuffer();
296 if (NULL
== dti
->dti_TempFilename
)
298 d1(KPrintF("%s/%s/%ld: dti_TempFilename=%08lx\n", __FILE__
, __FUNC__
, __LINE__
, dti
->dti_TempFilename
));
302 d1(KPrintF("%s/%s/%ld: \n", __FILE__
, __FUNC__
, __LINE__
));
304 // Create pseudo-random name for temp. file
305 if (!TempName(dti
->dti_TempFilename
, Max_PathLen
))
307 d1(KPrintF("%s/%s/%ld: TempName() failed\n", __FILE__
, __FUNC__
, __LINE__
));
311 d1(KPrintF("%s/%s/%ld: \n", __FILE__
, __FUNC__
, __LINE__
));
313 // create a temporary copy of the datatypes image
314 // work around datatypes keeping a lock on the image file
315 if (RETURN_OK
!= CreateTempFile(dti
->dti_TempFilename
, dti
->dti_Filename
))
317 d1(KPrintF("%s/%s/%ld: CreateTempFile() failed\n", __FILE__
, __FUNC__
, __LINE__
));
321 dti
->dti_MaskPlane
= NULL
;
322 dti
->dti_BitMap
= NULL
;
323 dti
->dti_BitMapHeader
= NULL
;
324 dti
->dti_UseCount
= 0;
325 dti
->dti_Flags
= Flags
;
327 d1(KPrintF("%s/%s/%ld: dti=%08lx Temp=<%s> Orig=<%s>\n", \
328 __FILE__
, __FUNC__
, __LINE__
, dti
, dti
->dti_TempFilename
, dti
->dti_Filename
));
330 dti
->dti_NotifyTab
.nft_FileName
= dti
->dti_Filename
;
331 dti
->dti_NotifyTab
.nft_Entry
= DtImageNotify
;
333 /* +dm+ Do not use a friend bitmap for 8bit or less screens */
334 UseFriendBM
= !(Flags
& DTI_NoFriendBitMap
) && (GetBitMapAttr(iInfos
.xii_iinfos
.ii_Screen
->RastPort
.BitMap
, BMA_DEPTH
) > 8);
335 DoRemap
= !(Flags
& DTIFLAG_NoRemap
);
338 dti
->dti_ImageObj
= NewDTObject(dti
->dti_TempFilename
,
339 DTA_SourceType
, DTST_FILE
,
340 DTA_GroupID
, GID_PICTURE
,
341 PDTA_DestMode
, PMODE_V43
,
343 DoRemap
? PDTA_Screen
: TAG_IGNORE
, (IPTR
) iInfos
.xii_iinfos
.ii_Screen
,
344 PDTA_UseFriendBitMap
, UseFriendBM
,
346 d1(KPrintF("%s/%s/%ld: dti_ImageObj=%08lx\n", __FILE__
, __FUNC__
, __LINE__
, dti
->dti_ImageObj
));
347 if (NULL
== dti
->dti_ImageObj
)
349 d1(KPrintF("%s/%s/%ld: dti_ImageObj=%08lx\n", __FILE__
, __FUNC__
, __LINE__
, dti
->dti_ImageObj
));
354 if (!DoDTMethod(dti
->dti_ImageObj
, NULL
, NULL
, DTM_PROCLAYOUT
, NULL
, TRUE
))
356 d1(KPrintF("%s/%s/%ld: DTM_PROCLAYOUT failed\n", __FILE__
, __FUNC__
, __LINE__
));
360 Result
= GetDTAttrs(dti
->dti_ImageObj
,
361 PDTA_DestBitMap
, (IPTR
) &dti
->dti_BitMap
,
362 PDTA_BitMapHeader
, (IPTR
) &dti
->dti_BitMapHeader
,
365 d1(KPrintF("%s/%s/%ld: Result=%ld dti_BitMap=%08lx dti_BitMapHeader=%08lx\n", \
366 __FILE__
, __FUNC__
, __LINE__
, Result
, dti
->dti_BitMap
, dti
->dti_BitMapHeader
));
369 d1(KPrintF("%s/%s/%ld: GetDTAttrs failed\n", __FILE__
, __FUNC__
, __LINE__
));
370 d1(KPrintF("%s/%s/%ld: Result=%ld dti_BitMap=%08lx dti_BitMapHeader=%08lx\n", \
371 __FILE__
, __FUNC__
, __LINE__
, Result
, dti
->dti_BitMap
, dti
->dti_BitMapHeader
));
375 if (NULL
== dti
->dti_BitMap
|| NULL
== dti
->dti_BitMapHeader
)
378 switch (dti
->dti_BitMapHeader
->bmh_Masking
)
381 #if defined(__amigaos4__)
382 DtImageCreateAlpha(dti
);
383 #endif //defined(__amigaos4__)
385 case mskHasTransparentColor
:
386 GetDTAttrs(dti
->dti_ImageObj
,
387 PDTA_MaskPlane
, (IPTR
) &dti
->dti_MaskPlane
,
391 dti
->dti_MaskPlane
= NULL
;
395 d1(kprintf("%s/%s/%ld: <%s> Masking=%ld MaskPlane=%08lx\n", __FILE__
, __FUNC__
, __LINE__
, \
396 ImageName
, dti
->dti_BitMapHeader
->bmh_Masking
, dti
->dti_MaskPlane
));
398 dti
->dti_NotifyNode
= AddToMainNotifyList(&dti
->dti_NotifyTab
, 0);
405 AddTail(&DataTypesImageList
, &dti
->dti_Node
);
410 FreeDatatypesImage(dti
);
414 d1(KPrintF("%s/%s/%ld: END dti=%08lx\n", __FILE__
, __FUNC__
, __LINE__
, dti
));
420 static struct DatatypesImage
*FindDatatypesImage(CONST_STRPTR ImageName
, ULONG Flags
)
422 struct DatatypesImage
*dti
;
424 for (dti
= (struct DatatypesImage
*) DataTypesImageList
.lh_Head
;
425 dti
!= (struct DatatypesImage
*) &DataTypesImageList
.lh_Tail
;
426 dti
= (struct DatatypesImage
*) dti
->dti_Node
.ln_Succ
)
428 if ((dti
->dti_Flags
== Flags
) && (0 == Stricmp(ImageName
, dti
->dti_Filename
)))
436 BOOL
TempName(STRPTR Buffer
, size_t MaxLen
)
443 if (MaxLen
<= strlen(CurrentPrefs
.pref_ImageCacheDir
))
446 stccpy(Buffer
, CurrentPrefs
.pref_ImageCacheDir
, MaxLen
);
448 snprintf(TimeBuffer
, sizeof(TimeBuffer
), "Scalos%08lx%08lx", (unsigned long) tv
.tv_secs
, (unsigned long) tv
.tv_micro
);
450 return AddPart(Buffer
, TimeBuffer
, MaxLen
);
454 static LONG
CreateTempFile(CONST_STRPTR TempFileName
, CONST_STRPTR DtFileName
)
456 LONG Result
= RETURN_OK
;
459 STRPTR CopyBuffer
= NULL
;
460 const size_t BuffSize
= 8192;
463 fdOrig
= Open(DtFileName
, MODE_OLDFILE
);
467 d1(KPrintF("%s/%s/%ld: Result=%ld\n", __FILE__
, __FUNC__
, __LINE__
, Result
));
470 fdCopy
= Open(TempFileName
, MODE_NEWFILE
);
474 d1(KPrintF("%s/%s/%ld: Result=%ld\n", __FILE__
, __FUNC__
, __LINE__
, Result
));
477 CopyBuffer
= ScalosAlloc(BuffSize
);
478 if (NULL
== CopyBuffer
)
480 Result
= ERROR_NO_FREE_STORE
;
481 d1(KPrintF("%s/%s/%ld: Result=%ld\n", __FILE__
, __FUNC__
, __LINE__
, Result
));
489 actualLength
= Read(fdOrig
, CopyBuffer
, BuffSize
);
490 if (actualLength
<= 0)
492 if (actualLength
< 0)
495 d1(KPrintF("%s/%s/%ld: Result=%ld\n", __FILE__
, __FUNC__
, __LINE__
, Result
));
500 if (actualLength
!= Write(fdCopy
, CopyBuffer
, actualLength
))
503 d1(KPrintF("%s/%s/%ld: Result=%ld\n", __FILE__
, __FUNC__
, __LINE__
, Result
));
510 ScalosFree(CopyBuffer
);
516 if (RETURN_OK
!= Result
)
517 DeleteFile(TempFileName
);
523 static void DtImageNotify(struct internalScaWindowTask
*iwt
, struct NotifyMessage
*msg
)
525 struct DatatypesImage
*dti
;
526 struct DatatypesImage
*dtiNew
;
528 // original file of <dti> has been modified
529 // try to create Datatypes object from new image file
530 // if we succeed, replace old datatypes image by new one
531 // if we fail, continue using old datatypes object
533 dti
= (struct DatatypesImage
*) (msg
->nm_NReq
->nr_UserData
- offsetof(struct DatatypesImage
, dti_NotifyTab
));
535 d1(KPrintF("%s/%s/%ld: nr_Name=<%s> nr_UserData=%08lx dti=%08lx\n", \
536 __FILE__
, __FUNC__
, __LINE__
, msg
->nm_NReq
->nr_Name
, msg
->nm_NReq
->nr_UserData
, dti
));
541 d1(KPrintF("%s/%s/%ld: \n", __FILE__
, __FUNC__
, __LINE__
));
543 dtiNew
= ScalosAlloc(sizeof(struct DatatypesImage
));
547 d1(KPrintF("%s/%s/%ld: dtiNew=%08lx\n", __FILE__
, __FUNC__
, __LINE__
, dtiNew
));
549 memset(dtiNew
, 0, sizeof(struct DatatypesImage
));
551 dtiNew
->dti_Filename
= AllocCopyString(dti
->dti_Filename
);
552 if (NULL
== dtiNew
->dti_Filename
)
555 dtiNew
->dti_TempFilename
= AllocPathBuffer();
556 if (NULL
== dtiNew
->dti_TempFilename
)
559 d1(KPrintF("%s/%s/%ld: \n", __FILE__
, __FUNC__
, __LINE__
));
561 // Create pseudo-random name for temp. file
562 if (!TempName(dtiNew
->dti_TempFilename
, Max_PathLen
))
565 d1(KPrintF("%s/%s/%ld: \n", __FILE__
, __FUNC__
, __LINE__
));
567 // create a temporary copy of the datatypes image
568 // work around datatypes keeping a lock on the image file
569 if (RETURN_OK
!= CreateTempFile(dtiNew
->dti_TempFilename
, dtiNew
->dti_Filename
))
572 d1(KPrintF("%s/%s/%ld: \n", __FILE__
, __FUNC__
, __LINE__
));
574 // Try to create datatypes image from new file
576 dtiNew
->dti_ImageObj
= NewDTObject(dtiNew
->dti_TempFilename
,
577 DTA_SourceType
, DTST_FILE
,
578 DTA_GroupID
, GID_PICTURE
,
579 PDTA_DestMode
, PMODE_V43
,
581 PDTA_Screen
, (IPTR
) iInfos
.xii_iinfos
.ii_Screen
,
582 PDTA_UseFriendBitMap
, (GetBitMapAttr(iInfos
.xii_iinfos
.ii_Screen
->RastPort
.BitMap
, BMA_DEPTH
) <= 8 ? FALSE
: TRUE
), /* +dm+ Do not use a friend bitmap for 8bit or less screens */
584 d1(KPrintF("%s/%s/%ld: dti_ImageObj=%08lx\n", __FILE__
, __FUNC__
, __LINE__
, dtiNew
->dti_ImageObj
));
585 if (NULL
== dtiNew
->dti_ImageObj
)
588 // dispose old datatypes object
589 DisposeDTObject(dti
->dti_ImageObj
);
591 // remove old temp image file
592 DeleteFile(dti
->dti_TempFilename
);
593 strcpy(dti
->dti_TempFilename
, dtiNew
->dti_TempFilename
);
594 strcpy(dtiNew
->dti_TempFilename
, "");
596 // use new Datatypes object
597 dti
->dti_ImageObj
= dtiNew
->dti_ImageObj
;
598 dtiNew
->dti_ImageObj
= NULL
;
600 // Update information from new Datatypes object
603 if (!DoDTMethod(dti
->dti_ImageObj
, NULL
, NULL
, DTM_PROCLAYOUT
, NULL
, TRUE
))
606 Result
= GetDTAttrs(dti
->dti_ImageObj
,
607 PDTA_DestBitMap
, (IPTR
) &dti
->dti_BitMap
,
608 PDTA_BitMapHeader
, (IPTR
) &dti
->dti_BitMapHeader
,
614 if (NULL
== dti
->dti_BitMap
|| NULL
== dti
->dti_BitMapHeader
)
617 switch (dti
->dti_BitMapHeader
->bmh_Masking
)
621 case mskHasTransparentColor
:
622 GetDTAttrs(dti
->dti_ImageObj
,
623 PDTA_MaskPlane
, (IPTR
) &dti
->dti_MaskPlane
,
627 dti
->dti_MaskPlane
= NULL
;
632 FreeDatatypesImage(dtiNew
);
636 static void CleanupTempFiles(void)
639 struct AnchorPath
*ap
;
641 d1(KPrintF("%s/%s/%ld: START\n", __FILE__
, __FUNC__
, __LINE__
));
646 ap
= ScalosAllocAnchorPath(APF_DOWILD
| APF_ITSWILD
, Max_PathLen
);
647 d1(KPrintF("%s/%s/%ld: ap=%08lx\n", __FILE__
, __FUNC__
, __LINE__
, ap
));
651 Path
= AllocPathBuffer();
652 d1(KPrintF("%s/%s/%ld: Path=%08lx\n", __FILE__
, __FUNC__
, __LINE__
, Path
));
656 stccpy(Path
, CurrentPrefs
.pref_ImageCacheDir
, Max_PathLen
);
658 if (!AddPart(Path
, "Scalos#?", Max_PathLen
))
661 d1(KPrintF("%s/%s/%ld: Path=<%s>\n", __FILE__
, __FUNC__
, __LINE__
, Path
));
663 rc
= MatchFirst(Path
, ap
);
664 d1(KPrintF("%s/%s/%ld: MatchFirst rc=%ld\n", __FILE__
, __FUNC__
, __LINE__
, rc
));
665 while (RETURN_OK
== rc
)
668 d1(KPrintF("%s/%s/%ld: ap_Buf=<%s>\n", __FILE__
, __FUNC__
, __LINE__
, ap
->ap_Buf
));
669 (void) DeleteFile(ap
->ap_Buf
);
671 d1(KPrintF("%s/%s/%ld: ap_Buf=<%s>\n", __FILE__
, __FUNC__
, __LINE__
, ap
->ap_Buffer
));
672 (void) DeleteFile(ap
->ap_Buffer
);
676 d1(KPrintF("%s/%s/%ld: MatchNext rc=%ld\n", __FILE__
, __FUNC__
, __LINE__
, rc
));
683 ScalosFreeAnchorPath(ap
);
686 FreePathBuffer(Path
);
688 d1(KPrintF("%s/%s/%ld: END\n", __FILE__
, __FUNC__
, __LINE__
));
692 #if defined(__amigaos4__)
693 static BOOL
DtImageCreateAlpha(struct DatatypesImage
*dti
)
695 BOOL success
= FALSE
;
698 size_t BytesPerPixel
= dti
->dti_BitMapHeader
->bmh_Width
* sizeof(ULONG
);
700 if (mskHasAlpha
!= dti
->dti_BitMapHeader
->bmh_Masking
)
703 dti
->dti_ARGB
= ScalosAlloc(BytesPerPixel
* dti
->dti_BitMapHeader
->bmh_Height
);
704 if (NULL
== dti
->dti_ARGB
)
707 DoMethod(dti
->dti_ImageObj
,
714 dti
->dti_BitMapHeader
->bmh_Width
,
715 dti
->dti_BitMapHeader
->bmh_Height
723 #endif //defined(__amigaos4__)
726 void DtImageDraw(struct DatatypesImage
*dti
, struct RastPort
*rp
,
727 LONG Left
, LONG Top
, LONG Width
, LONG Height
)
729 d1(kprintf("%s/%s/%ld: START\n", __FILE__
, __FUNC__
, __LINE__
));
730 #if defined(__amigaos4__)
735 d1(kprintf("%s/%s/%ld: \n", __FILE__
, __FUNC__
, __LINE__
));
738 BLITA_Source
, dti
->dti_ARGB
,
745 BLITA_Height
, Height
,
746 BLITA_SrcType
, BLITT_ARGB32
,
747 BLITA_DestType
, BLITT_RASTPORT
,
748 BLITA_SrcBytesPerRow
, dti
->dti_BitMapHeader
->bmh_Width
* sizeof(ULONG
),
749 BLITA_UseSrcAlpha
, TRUE
,
752 d1(kprintf("%s/%s/%ld: rc=%ld\n", __FILE__
, __FUNC__
, __LINE__
, rc
));
755 #endif //defined(__amigaos4__)
759 d1(kprintf("%s/%s/%ld: \n", __FILE__
, __FUNC__
, __LINE__
));
760 // returns 1 if successful, 0 on error
761 rc
= DoMethod(dti
->dti_ImageObj
,
771 d1(kprintf("%s/%s/%ld: rc=%ld\n", __FILE__
, __FUNC__
, __LINE__
, rc
));
775 if (dti
->dti_MaskPlane
)
777 d1(kprintf("%s/%s/%ld: \n", __FILE__
, __FUNC__
, __LINE__
));
778 BltMaskBitMapRastPort(dti
->dti_BitMap
,
788 d1(kprintf("%s/%s/%ld: \n", __FILE__
, __FUNC__
, __LINE__
));
789 BltBitMapRastPort(dti
->dti_BitMap
,
798 d1(kprintf("%s/%s/%ld: END\n", __FILE__
, __FUNC__
, __LINE__
));