~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to packages/extra/amunits/units/graphics.pas

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{
2
 
    This file is part of the Free Pascal run time library.
3
 
 
4
 
    A file in Amiga system run time library.
5
 
    Copyright (c) 1998-2003 by Nils Sjoholm
6
 
    member of the Amiga RTL development team.
7
 
 
8
 
    See the file COPYING.FPC, included in this distribution,
9
 
    for details about the copyright.
10
 
 
11
 
    This program is distributed in the hope that it will be useful,
12
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
 
 
15
 
 **********************************************************************}
16
 
 
17
 
 {
18
 
    History:
19
 
 
20
 
    Found bugs in,
21
 
    WritePixelArray8,
22
 
    WritePixelLine8,
23
 
    ReadPixelArray8,
24
 
    ReadPixelLine8,
25
 
    WriteChunkyPixels.
26
 
    They all had one argument(array_) defined as pchar,
27
 
    should be pointer, fixed.
28
 
    20 Aug 2000.
29
 
 
30
 
    InitTmpRas had wrong define for the buffer arg.
31
 
    Changed from pchar to PLANEPTR.
32
 
    23 Aug 2000.
33
 
 
34
 
    Compiler had problems with Text, changed to GText.
35
 
    24 Aug 2000.
36
 
    
37
 
    Added functions and procedures with array of const.
38
 
    For use with fpc 1.0.7. They are in systemvartags.
39
 
    11 Nov 2002.
40
 
 
41
 
    Added the defines use_amiga_smartlink and
42
 
    use_auto_openlib.
43
 
    13 Jan 2003.
44
 
    
45
 
    Update for AmifaOS 3.9.
46
 
    Changed start code for unit.
47
 
    Bugs in ChangeSprite, GetRGB32, LoadRGB32,
48
 
    LoadRGB4 and PolyDraw, fixed.
49
 
    01 Feb 2003.
50
 
 
51
 
    Changed integer > smallint,
52
 
            cardinal > longword.
53
 
    09 Feb 2003.
54
 
            
55
 
    nils.sjoholm@mailbox.swipnet.se
56
 
 
57
 
}
58
 
 
59
 
{$I useamigasmartlink.inc}
60
 
{$ifdef use_amiga_smartlink}
61
 
    {$smartlink on}
62
 
{$endif use_amiga_smartlink}
63
 
 
64
 
unit graphics;
65
 
 
66
 
INTERFACE
67
 
 
68
 
uses exec, hardware, utility;
69
 
 
70
 
 
71
 
const
72
 
 
73
 
    BITSET      = $8000;
74
 
    BITCLR      = 0;
75
 
 
76
 
type
77
 
 
78
 
 
79
 
    pRectangle = ^tRectangle;
80
 
    tRectangle = record
81
 
        MinX,MinY       : Word;
82
 
        MaxX,MaxY       : Word;
83
 
    end;
84
 
 
85
 
    pRect32 = ^tRect32;
86
 
    tRect32 = record
87
 
        MinX,MinY       : Longint;
88
 
        MaxX,MaxY       : Longint;
89
 
    end;
90
 
 
91
 
    pPoint = ^tPoint;
92
 
    tPoint = record
93
 
        x,y     : Word;
94
 
    end;
95
 
 
96
 
    PLANEPTR = Pointer;
97
 
 
98
 
    pBitMap = ^tBitMap;
99
 
    tBitMap = record
100
 
        BytesPerRow     : Word;
101
 
        Rows            : Word;
102
 
        Flags           : Byte;
103
 
        Depth           : Byte;
104
 
        pad             : Word;
105
 
        Planes          : Array [0..7] of PLANEPTR;
106
 
    end;
107
 
{* flags for AllocBitMap, etc. *}
108
 
const
109
 
     BMB_CLEAR       = 0;
110
 
     BMB_DISPLAYABLE = 1;
111
 
     BMB_INTERLEAVED = 2;
112
 
     BMB_STANDARD    = 3;
113
 
     BMB_MINPLANES   = 4;
114
 
 
115
 
     BMF_CLEAR       = (1 shl BMB_CLEAR);
116
 
     BMF_DISPLAYABLE = (1 shl BMB_DISPLAYABLE);
117
 
     BMF_INTERLEAVED = (1 shl BMB_INTERLEAVED);
118
 
     BMF_STANDARD    = (1 shl BMB_STANDARD);
119
 
     BMF_MINPLANES   = (1 shl BMB_MINPLANES);
120
 
 
121
 
{* the following are for GetBitMapAttr() *}
122
 
     BMA_HEIGHT      = 0;
123
 
     BMA_DEPTH       = 4;
124
 
     BMA_WIDTH       = 8;
125
 
     BMA_FLAGS       = 12;
126
 
 
127
 
 
128
 
{ structures used by and constructed by windowlib.a }
129
 
{ understood by rom software }
130
 
type
131
 
    pClipRect = ^tClipRect;
132
 
    tClipRect = record
133
 
        Next    : pClipRect;    { roms used to find next ClipRect }
134
 
        prev    : pClipRect;    { ignored by roms, used by windowlib }
135
 
        lobs    : Pointer;      { ignored by roms, used by windowlib (LayerPtr)}
136
 
        BitMap  : pBitMap;
137
 
        bounds  : tRectangle;    { set up by windowlib, used by roms }
138
 
        _p1,
139
 
        _p2     : Pointer;    { system reserved }
140
 
        reserved : Longint;     { system use }
141
 
        Flags   : Longint;      { only exists in layer allocation }
142
 
    end;
143
 
 
144
 
    pLayer = ^tLayer;
145
 
    tLayer = record
146
 
        front,
147
 
        back            : pLayer;       { ignored by roms }
148
 
        ClipRect        : pClipRect;  { read by roms to find first cliprect }
149
 
        rp              : Pointer;      { (RastPortPtr) ignored by roms, I hope }
150
 
        bounds          : tRectangle;    { ignored by roms }
151
 
        reserved        : Array [0..3] of Byte;
152
 
        priority        : Word;        { system use only }
153
 
        Flags           : Word;        { obscured ?, Virtual BitMap? }
154
 
        SuperBitMap     : pBitMap;
155
 
        SuperClipRect   : pClipRect;  { super bitmap cliprects if
156
 
                                                VBitMap != 0}
157
 
                                        { else damage cliprect list for refresh }
158
 
        Window          : Pointer;      { reserved for user interface use }
159
 
        Scroll_X,
160
 
        Scroll_Y        : Word;
161
 
        cr,
162
 
        cr2,
163
 
        crnew           : pClipRect;  { used by dedice }
164
 
        SuperSaveClipRects : pClipRect; { preallocated cr's }
165
 
        cliprects      : pClipRect;  { system use during refresh }
166
 
        LayerInfo       : Pointer;      { points to head of the list }
167
 
        Lock            : tSignalSemaphore;
168
 
        BackFill        : pHook;
169
 
        reserved1       : ULONG;
170
 
        ClipRegion      : Pointer;
171
 
        saveClipRects   : Pointer;      { used to back out when in trouble}
172
 
        Width,
173
 
        Height          : smallint;
174
 
        reserved2       : Array [0..17] of Byte;
175
 
        { this must stay here }
176
 
        DamageList      : Pointer;      { list of rectangles to refresh
177
 
                                                through }
178
 
    end;
179
 
 
180
 
const
181
 
 
182
 
{ internal cliprect flags }
183
 
 
184
 
    CR_NEEDS_NO_CONCEALED_RASTERS       = 1;
185
 
    CR_NEEDS_NO_LAYERBLIT_DAMAGE        = 2;
186
 
 
187
 
 
188
 
{ defines for code values for getcode }
189
 
 
190
 
    ISLESSX     = 1;
191
 
    ISLESSY     = 2;
192
 
    ISGRTRX     = 4;
193
 
    ISGRTRY     = 8;
194
 
 
195
 
 
196
 
{------ Font Styles ------------------------------------------------}
197
 
 
198
 
    FS_NORMAL           = 0;    { normal text (no style bits set) }
199
 
    FSB_EXTENDED        = 3;    { extended face (wider than normal) }
200
 
    FSF_EXTENDED        = 8;
201
 
    FSB_ITALIC          = 2;    { italic (slanted 1:2 right) }
202
 
    FSF_ITALIC          = 4;
203
 
    FSB_BOLD            = 1;    { bold face text (ORed w/ shifted) }
204
 
    FSF_BOLD            = 2;
205
 
    FSB_UNDERLINED      = 0;    { underlined (under baseline) }
206
 
    FSF_UNDERLINED      = 1;
207
 
 
208
 
    FSB_COLORFONT       = 6;       { this uses ColorTextFont structure }
209
 
    FSF_COLORFONT       = $40;
210
 
    FSB_TAGGED          = 7;       { the TextAttr is really an TTextAttr, }
211
 
    FSF_TAGGED          = $80;
212
 
 
213
 
 
214
 
{------ Font Flags -------------------------------------------------}
215
 
    FPB_ROMFONT         = 0;    { font is in rom }
216
 
    FPF_ROMFONT         = 1;
217
 
    FPB_DISKFONT        = 1;    { font is from diskfont.library }
218
 
    FPF_DISKFONT        = 2;
219
 
    FPB_REVPATH         = 2;    { designed path is reversed (e.g. left) }
220
 
    FPF_REVPATH         = 4;
221
 
    FPB_TALLDOT         = 3;    { designed for hires non-interlaced }
222
 
    FPF_TALLDOT         = 8;
223
 
    FPB_WIDEDOT         = 4;    { designed for lores interlaced }
224
 
    FPF_WIDEDOT         = 16;
225
 
    FPB_PROPORTIONAL    = 5;    { character sizes can vary from nominal }
226
 
    FPF_PROPORTIONAL    = 32;
227
 
    FPB_DESIGNED        = 6;    { size is "designed", not constructed }
228
 
    FPF_DESIGNED        = 64;
229
 
    FPB_REMOVED         = 7;    { the font has been removed }
230
 
    FPF_REMOVED         = 128;
231
 
 
232
 
{***** TextAttr node, matches text attributes in RastPort *********}
233
 
 
234
 
type
235
 
 
236
 
    pTextAttr = ^tTextAttr;
237
 
    tTextAttr = record
238
 
        ta_Name : STRPTR;       { name of the font }
239
 
        ta_YSize : Word;       { height of the font }
240
 
        ta_Style : Byte;        { intrinsic font style }
241
 
        ta_Flags : Byte;        { font preferences and flags }
242
 
    end;
243
 
 
244
 
    pTTextAttr = ^tTTextAttr;
245
 
    tTTextAttr = record
246
 
        tta_Name : STRPTR;       { name of the font }
247
 
        tta_YSize : Word;       { height of the font }
248
 
        tta_Style : Byte;        { intrinsic font style }
249
 
        tta_Flags : Byte;        { font preferences AND flags }
250
 
        tta_Tags  : pTagItem;     { extended attributes }
251
 
    end;
252
 
 
253
 
{***** Text Tags **************************************************}
254
 
CONST
255
 
  TA_DeviceDPI  =  (1+TAG_USER);    { Tag value is Point union: }
256
 
                                        { Hi Longint XDPI, Lo Longint YDPI }
257
 
 
258
 
  MAXFONTMATCHWEIGHT  =    32767;   { perfect match from WeighTAMatch }
259
 
 
260
 
 
261
 
 
262
 
{***** TextFonts node *********************************************}
263
 
Type
264
 
 
265
 
    pTextFont = ^tTextFont;
266
 
    tTextFont = record
267
 
        tf_Message      : tMessage;      { reply message for font removal }
268
 
                                        { font name in LN \    used in this }
269
 
        tf_YSize        : Word;        { font height     |    order to best }
270
 
        tf_Style        : Byte;         { font style      |    match a font }
271
 
        tf_Flags        : Byte;         { preferences and flags /    request. }
272
 
        tf_XSize        : Word;        { nominal font width }
273
 
        tf_Baseline     : Word; { distance from the top of char to baseline }
274
 
        tf_BoldSmear    : Word;        { smear to affect a bold enhancement }
275
 
 
276
 
        tf_Accessors    : Word;        { access count }
277
 
 
278
 
        tf_LoChar       : Byte;         { the first character described here }
279
 
        tf_HiChar       : Byte;         { the last character described here }
280
 
        tf_CharData     : Pointer;      { the bit character data }
281
 
 
282
 
        tf_Modulo       : Word; { the row modulo for the strike font data }
283
 
        tf_CharLoc      : Pointer; { ptr to location data for the strike font }
284
 
                                        { 2 words: bit offset then size }
285
 
        tf_CharSpace    : Pointer; { ptr to words of proportional spacing data }
286
 
        tf_CharKern     : Pointer;      { ptr to words of kerning data }
287
 
    end;
288
 
 
289
 
 
290
 
{----- tfe_Flags0 (partial definition) ----------------------------}
291
 
CONST
292
 
 TE0B_NOREMFONT = 0;       { disallow RemFont for this font }
293
 
 TE0F_NOREMFONT = $01;
294
 
 
295
 
Type
296
 
 
297
 
   pTextFontExtension = ^tTextFontExtension;
298
 
   tTextFontExtension = record              { this structure is read-only }
299
 
    tfe_MatchWord  : Word;                { a magic cookie for the extension }
300
 
    tfe_Flags0     : Byte;                 { (system private flags) }
301
 
    tfe_Flags1     : Byte;                 { (system private flags) }
302
 
    tfe_BackPtr    : pTextFont;          { validation of compilation }
303
 
    tfe_OrigReplyPort : pMsgPort;        { original value in tf_Extension }
304
 
    tfe_Tags       : pTagItem;              { Text Tags for the font }
305
 
    tfe_OFontPatchS,                       { (system private use) }
306
 
    tfe_OFontPatchK : Pointer;             { (system private use) }
307
 
    { this space is reserved for future expansion }
308
 
   END;
309
 
 
310
 
{***** ColorTextFont node *****************************************}
311
 
{----- ctf_Flags --------------------------------------------------}
312
 
CONST
313
 
 CT_COLORMASK  =  $000F;  { mask to get to following color styles }
314
 
 CT_COLORFONT  =  $0001;  { color map contains designer's colors }
315
 
 CT_GREYFONT   =  $0002;  { color map describes even-stepped }
316
 
                                { brightnesses from low to high }
317
 
 CT_ANTIALIAS  =  $0004;  { zero background thru fully saturated char }
318
 
 
319
 
 CTB_MAPCOLOR  =  0;      { map ctf_FgColor to the rp_FgPen IF it's }
320
 
 CTF_MAPCOLOR  =  $0001;  { is a valid color within ctf_Low..ctf_High }
321
 
 
322
 
{----- ColorFontColors --------------------------------------------}
323
 
Type
324
 
   pColorFontColors = ^tColorFontColors;
325
 
   tColorFontColors = record
326
 
    cfc_Reserved,                 { *must* be zero }
327
 
    cfc_Count   : Word;          { number of entries in cfc_ColorTable }
328
 
    cfc_ColorTable : Pointer;     { 4 bit per component color map packed xRGB }
329
 
   END;
330
 
 
331
 
{----- ColorTextFont ----------------------------------------------}
332
 
 
333
 
   pColorTextFont = ^tColorTextFont;
334
 
   tColorTextFont = record
335
 
    ctf_TF      : tTextFont;
336
 
    ctf_Flags   : Word;          { extended flags }
337
 
    ctf_Depth,          { number of bit planes }
338
 
    ctf_FgColor,        { color that is remapped to FgPen }
339
 
    ctf_Low,            { lowest color represented here }
340
 
    ctf_High,           { highest color represented here }
341
 
    ctf_PlanePick,      { PlanePick ala Images }
342
 
    ctf_PlaneOnOff : Byte;     { PlaneOnOff ala Images }
343
 
    ctf_ColorFontColors : pColorFontColors; { colors for font }
344
 
    ctf_CharData : Array[0..7] of APTR;    {pointers to bit planes ala tf_CharData }
345
 
   END;
346
 
 
347
 
{***** TextExtent node ********************************************}
348
 
 
349
 
   pTextExtent = ^tTextExtent;
350
 
   tTextExtent = record
351
 
    te_Width,                   { same as TextLength }
352
 
    te_Height : Word;          { same as tf_YSize }
353
 
    te_Extent : tRectangle;      { relative to CP }
354
 
   END;
355
 
 
356
 
 
357
 
const
358
 
 
359
 
    COPPER_MOVE = 0;    { pseude opcode for move #XXXX,dir }
360
 
    COPPER_WAIT = 1;    { pseudo opcode for wait y,x }
361
 
    CPRNXTBUF   = 2;    { continue processing with next buffer }
362
 
    CPR_NT_LOF  = $8000; { copper instruction only for Longint frames }
363
 
    CPR_NT_SHT  = $4000; { copper instruction only for long frames }
364
 
    CPR_NT_SYS  = $2000; { copper user instruction only }
365
 
type
366
 
 
367
 
{ Note: The combination VWaitAddr and HWaitAddr replace a three way
368
 
        union in C.  The three possibilities are:
369
 
 
370
 
        nxtList : CopListPtr;  or
371
 
 
372
 
        VWaitPos : Longint;
373
 
        HWaitPos : Longint;  or
374
 
 
375
 
        DestAddr : Longint;
376
 
        DestData : Longint;
377
 
}
378
 
 
379
 
    pCopIns = ^tCopIns;
380
 
    tCopIns = record
381
 
        OpCode  : smallint; { 0 = move, 1 = wait }
382
 
        VWaitAddr : smallint; { vertical or horizontal wait position }
383
 
        HWaitData : smallint; { destination Pointer or data to send }
384
 
    end;
385
 
 
386
 
{ structure of cprlist that points to list that hardware actually executes }
387
 
 
388
 
    pcprlist = ^tcprlist;
389
 
    tcprlist = record
390
 
        Next    : pcprlist;
391
 
        start   : psmallint;       { start of copper list }
392
 
        MaxCount : smallint;       { number of long instructions }
393
 
    end;
394
 
 
395
 
    pCopList = ^tCopList;
396
 
    tCopList = record
397
 
        Next    : pCopList;     { next block for this copper list }
398
 
        CopList : pCopList;    { system use }
399
 
        ViewPort : Pointer;    { system use }
400
 
        CopIns  : pCopIns;    { start of this block }
401
 
        CopPtr  : pCopIns;    { intermediate ptr }
402
 
        CopLStart : psmallint;     { mrgcop fills this in for Long Frame}
403
 
        CopSStart : psmallint;     { mrgcop fills this in for Longint Frame}
404
 
        Count   : smallint;        { intermediate counter }
405
 
        MaxCount : smallint;       { max # of copins for this block }
406
 
        DyOffset : smallint;       { offset this copper list vertical waits }
407
 
        SLRepeat : Word;
408
 
        Flags    : Word;
409
 
    end;
410
 
 
411
 
    pUCopList = ^tUCopList;
412
 
    tUCopList = record
413
 
        Next    : pUCopList;
414
 
        FirstCopList : pCopList;      { head node of this copper list }
415
 
        CopList : pCopList;           { node in use }
416
 
    end;
417
 
 
418
 
    pcopinit = ^tcopinit;
419
 
    tcopinit = record
420
 
        vsync_hblank : array [0..1] of word;
421
 
        diagstrt : Array [0..11] of word;
422
 
        fm0      : array [0..1] of word;
423
 
        diwstart : array [0..9] of word;
424
 
        bplcon2  : array [0..1] of word;
425
 
        sprfix   : array [0..(2*8)] of word;
426
 
        sprstrtup : Array [0..(2*8*2)] of Word;
427
 
        wait14    : array [0..1] of word;
428
 
        norm_hblank : array [0..1] of word;
429
 
        jump        : array [0..1] of word;
430
 
        wait_forever : array [0..5] of word;
431
 
        sprstop : Array [0..7] of Word;
432
 
    end;
433
 
 
434
 
 
435
 
 
436
 
    pAreaInfo = ^tAreaInfo;
437
 
    tAreaInfo = record
438
 
        VctrTbl : Pointer;      { ptr to start of vector table }
439
 
        VctrPtr : Pointer;      { ptr to current vertex }
440
 
        FlagTbl : Pointer;      { ptr to start of vector flag table }
441
 
        FlagPtr : Pointer;      { ptrs to areafill flags }
442
 
        Count   : smallint;        { number of vertices in list }
443
 
        MaxCount : smallint;       { AreaMove/Draw will not allow Count>MaxCount}
444
 
        FirstX,
445
 
        FirstY  : smallint;        { first point for this polygon }
446
 
    end;
447
 
 
448
 
    pTmpRas = ^tTmpRas;
449
 
    tTmpRas = record
450
 
        RasPtr  : Pointer;
451
 
        Size    : Longint;
452
 
    end;
453
 
 
454
 
{ unoptimized for 32bit alignment of pointers }
455
 
 
456
 
    pGelsInfo = ^tGelsInfo;
457
 
    tGelsInfo = record
458
 
        sprRsrvd        : Shortint; { flag of which sprites to reserve from
459
 
                                  vsprite system }
460
 
        Flags   : Byte;       { system use }
461
 
        gelHead,
462
 
        gelTail : Pointer; { (VSpritePtr) dummy vSprites for list management}
463
 
 
464
 
    { pointer to array of 8 WORDS for sprite available lines }
465
 
 
466
 
        nextLine : Pointer;
467
 
 
468
 
    { pointer to array of 8 pointers for color-last-assigned to vSprites }
469
 
 
470
 
        lastColor : Pointer;
471
 
        collHandler : Pointer;  { (collTablePtr) Pointeres of collision routines }
472
 
        leftmost,
473
 
        rightmost,
474
 
        topmost,
475
 
        bottommost      : smallint;
476
 
        firstBlissObj,
477
 
        lastBlissObj    : Pointer;    { system use only }
478
 
    end;
479
 
 
480
 
    pRastPort = ^tRastPort;
481
 
    tRastPort = record
482
 
        Layer           : pLayer;      { LayerPtr }
483
 
        BitMap          : pBitMap;      { BitMapPtr }
484
 
        AreaPtrn        : Pointer;      { ptr to areafill pattern }
485
 
        TmpRas          : pTmpRas;
486
 
        AreaInfo        : pAreaInfo;
487
 
        GelsInfo        : pGelsInfo;
488
 
        Mask            : Byte;         { write mask for this raster }
489
 
        FgPen           : Shortint;         { foreground pen for this raster }
490
 
        BgPen           : Shortint;         { background pen         }
491
 
        AOlPen          : Shortint;         { areafill outline pen }
492
 
        DrawMode        : Shortint; { drawing mode for fill, lines, and text }
493
 
        AreaPtSz        : Shortint;         { 2^n words for areafill pattern }
494
 
        linpatcnt       : Shortint; { current line drawing pattern preshift }
495
 
        dummy           : Shortint;
496
 
        Flags           : Word;        { miscellaneous control bits }
497
 
        LinePtrn        : Word;        { 16 bits for textured lines }
498
 
        cp_x,
499
 
        cp_y            : smallint;        { current pen position }
500
 
        minterms        : Array [0..7] of Byte;
501
 
        PenWidth        : smallint;
502
 
        PenHeight       : smallint;
503
 
        Font            : pTextFont;      { (TextFontPtr) current font Pointer }
504
 
        AlgoStyle       : Byte;         { the algorithmically generated style }
505
 
        TxFlags         : Byte;         { text specific flags }
506
 
        TxHeight        : Word;        { text height }
507
 
        TxWidth         : Word;        { text nominal width }
508
 
        TxBaseline      : Word;        { text baseline }
509
 
        TxSpacing       : smallint;        { text spacing (per character) }
510
 
        RP_User         : Pointer;
511
 
        longreserved    : Array [0..1] of ULONG;
512
 
        wordreserved    : Array [0..6] of Word;        { used to be a node }
513
 
        reserved        : Array [0..7] of Byte;         { for future use }
514
 
    end;
515
 
 
516
 
const
517
 
 
518
 
{ drawing modes }
519
 
 
520
 
    JAM1        = 0;    { jam 1 color into raster }
521
 
    JAM2        = 1;    { jam 2 colors into raster }
522
 
    COMPLEMENT  = 2;    { XOR bits into raster }
523
 
    INVERSVID   = 4;    { inverse video for drawing modes }
524
 
 
525
 
{ these are the flag bits for RastPort flags }
526
 
 
527
 
    FRST_DOT    = $01;  { draw the first dot of this line ? }
528
 
    ONE_DOT     = $02;  { use one dot mode for drawing lines }
529
 
    DBUFFER     = $04;  { flag set when RastPorts are double-buffered }
530
 
 
531
 
             { only used for bobs }
532
 
 
533
 
    AREAOUTLINE = $08;  { used by areafiller }
534
 
    NOCROSSFILL = $20;  { areafills have no crossovers }
535
 
 
536
 
{ there is only one style of clipping: raster clipping }
537
 
{ this preserves the continuity of jaggies regardless of clip window }
538
 
{ When drawing into a RastPort, if the ptr to ClipRect is nil then there }
539
 
{ is no clipping done, this is dangerous but useful for speed }
540
 
 
541
 
 
542
 
Const
543
 
    CleanUp     = $40;
544
 
    CleanMe     = CleanUp;
545
 
 
546
 
    BltClearWait        = 1;    { Waits for blit to finish }
547
 
    BltClearXY          = 2;    { Use Row/Bytes per row method }
548
 
 
549
 
        { Useful minterms }
550
 
 
551
 
    StraightCopy        = $C0;  { Vanilla copy }
552
 
    InvertAndCopy       = $30;  { Invert the source before copy }
553
 
    InvertDest          = $50;  { Forget source, invert dest }
554
 
 
555
 
 
556
 
 {      mode coercion definitions }
557
 
 
558
 
const
559
 
{  These flags are passed (in combination) to CoerceMode() to determine the
560
 
 * type of coercion required.
561
 
 }
562
 
 
563
 
{  Ensure that the mode coerced to can display just as many colours as the
564
 
 * ViewPort being coerced.
565
 
 }
566
 
    PRESERVE_COLORS = 1;
567
 
 
568
 
{  Ensure that the mode coerced to is not interlaced. }
569
 
    AVOID_FLICKER   = 2;
570
 
 
571
 
{  Coercion should ignore monitor compatibility issues. }
572
 
    IGNORE_MCOMPAT  = 4;
573
 
 
574
 
 
575
 
    BIDTAG_COERCE   = 1; {  Private }
576
 
 
577
 
const
578
 
 
579
 
{ VSprite flags }
580
 
{ user-set VSprite flags: }
581
 
 
582
 
    SUSERFLAGS  = $00FF;        { mask of all user-settable VSprite-flags }
583
 
    VSPRITE_f   = $0001;        { set if VSprite, clear if Bob }
584
 
                                { VSPRITE had to be changed for name conflict }
585
 
    SAVEBACK    = $0002;        { set if background is to be saved/restored }
586
 
    OVERLAY     = $0004;        { set to mask image of Bob onto background }
587
 
    MUSTDRAW    = $0008;        { set if VSprite absolutely must be drawn }
588
 
 
589
 
{ system-set VSprite flags: }
590
 
 
591
 
    BACKSAVED   = $0100;        { this Bob's background has been saved }
592
 
    BOBUPDATE   = $0200;        { temporary flag, useless to outside world }
593
 
    GELGONE     = $0400;        { set if gel is completely clipped (offscreen) }
594
 
    VSOVERFLOW  = $0800;        { VSprite overflow (if MUSTDRAW set we draw!) }
595
 
 
596
 
{ Bob flags }
597
 
{ these are the user flag bits }
598
 
 
599
 
    BUSERFLAGS  = $00FF;        { mask of all user-settable Bob-flags }
600
 
    SAVEBOB     = $0001;        { set to not erase Bob }
601
 
    BOBISCOMP   = $0002;        { set to identify Bob as AnimComp }
602
 
 
603
 
{ these are the system flag bits }
604
 
 
605
 
    BWAITING    = $0100;        { set while Bob is waiting on 'after' }
606
 
    BDRAWN      = $0200;        { set when Bob is drawn this DrawG pass}
607
 
    BOBSAWAY    = $0400;        { set to initiate removal of Bob }
608
 
    BOBNIX      = $0800;        { set when Bob is completely removed }
609
 
    SAVEPRESERVE = $1000;       { for back-restore during double-buffer}
610
 
    OUTSTEP     = $2000;        { for double-clearing if double-buffer }
611
 
 
612
 
{ defines for the animation procedures }
613
 
 
614
 
    ANFRACSIZE  = 6;
615
 
    ANIMHALF    = $0020;
616
 
    RINGTRIGGER = $0001;
617
 
 
618
 
 
619
 
{ UserStuff definitions
620
 
 *  the user can define these to be a single variable or a sub-structure
621
 
 *  if undefined by the user, the system turns these into innocuous variables
622
 
 *  see the manual for a thorough definition of the UserStuff definitions
623
 
 *
624
 
 }
625
 
 
626
 
type
627
 
 
628
 
    VUserStuff  = smallint;        { Sprite user stuff }
629
 
    BUserStuff  = smallint;        { Bob user stuff }
630
 
    AUserStuff  = smallint;        { AnimOb user stuff }
631
 
 
632
 
{********************** GEL STRUCTURES **********************************}
633
 
 
634
 
    pVSprite = ^tVSprite;
635
 
    tVSprite = record
636
 
 
637
 
{ --------------------- SYSTEM VARIABLES ------------------------------- }
638
 
{ GEL linked list forward/backward pointers sorted by y,x value }
639
 
 
640
 
        NextVSprite     : pVSprite;
641
 
        PrevVSprite     : pVSprite;
642
 
 
643
 
{ GEL draw list constructed in the order the Bobs are actually drawn, then
644
 
 *  list is copied to clear list
645
 
 *  must be here in VSprite for system boundary detection
646
 
 }
647
 
 
648
 
        DrawPath        : pVSprite;     { pointer of overlay drawing }
649
 
        ClearPath       : pVSprite;     { pointer for overlay clearing }
650
 
 
651
 
{ the VSprite positions are defined in (y,x) order to make sorting
652
 
 *  sorting easier, since (y,x) as a long Longint
653
 
 }
654
 
 
655
 
        OldY, OldX      : smallint;        { previous position }
656
 
 
657
 
{ --------------------- COMMON VARIABLES --------------------------------- }
658
 
 
659
 
        Flags           : smallint;        { VSprite flags }
660
 
 
661
 
 
662
 
{ --------------------- USER VARIABLES ----------------------------------- }
663
 
{ the VSprite positions are defined in (y,x) order to make sorting
664
 
 *  sorting easier, since (y,x) as a long Longint
665
 
 }
666
 
 
667
 
        Y, X            : smallint;        { screen position }
668
 
 
669
 
        Height  : smallint;
670
 
        Width   : smallint;        { number of words per row of image data }
671
 
        Depth   : smallint;        { number of planes of data }
672
 
 
673
 
        MeMask  : smallint;        { which types can collide with this VSprite}
674
 
        HitMask : smallint;        { which types this VSprite can collide with}
675
 
 
676
 
        ImageData       : Pointer;      { pointer to VSprite image }
677
 
 
678
 
{ borderLine is the one-dimensional logical OR of all
679
 
 *  the VSprite bits, used for fast collision detection of edge
680
 
 }
681
 
 
682
 
        BorderLine      : Pointer; { logical OR of all VSprite bits }
683
 
        CollMask        : Pointer; { similar to above except this is a matrix }
684
 
 
685
 
{ pointer to this VSprite's color definitions (not used by Bobs) }
686
 
 
687
 
        SprColors       : Pointer;
688
 
 
689
 
        VSBob   : Pointer;      { (BobPtr) points home if this VSprite
690
 
                                   is part of a Bob }
691
 
 
692
 
{ planePick flag:  set bit selects a plane from image, clear bit selects
693
 
 *  use of shadow mask for that plane
694
 
 * OnOff flag: if using shadow mask to fill plane, this bit (corresponding
695
 
 *  to bit in planePick) describes whether to fill with 0's or 1's
696
 
 * There are two uses for these flags:
697
 
 *      - if this is the VSprite of a Bob, these flags describe how the Bob
698
 
 *        is to be drawn into memory
699
 
 *      - if this is a simple VSprite and the user intends on setting the
700
 
 *        MUSTDRAW flag of the VSprite, these flags must be set too to describe
701
 
 *        which color registers the user wants for the image
702
 
 }
703
 
 
704
 
        PlanePick       : Shortint;
705
 
        PlaneOnOff      : Shortint;
706
 
 
707
 
        VUserExt        : VUserStuff;   { user definable:  see note above }
708
 
    end;
709
 
 
710
 
 
711
 
 
712
 
 
713
 
{ dBufPacket defines the values needed to be saved across buffer to buffer
714
 
 *  when in double-buffer mode
715
 
 }
716
 
 
717
 
    pDBufPacket = ^tDBufPacket;
718
 
    tDBufPacket = record
719
 
        BufY,
720
 
        BufX    : Word;        { save other buffers screen coordinates }
721
 
        BufPath : pVSprite;   { carry the draw path over the gap }
722
 
 
723
 
{ these pointers must be filled in by the user }
724
 
{ pointer to other buffer's background save buffer }
725
 
 
726
 
        BufBuffer : Pointer;
727
 
    end;
728
 
 
729
 
 
730
 
 
731
 
 
732
 
 
733
 
    pBob = ^tBob;
734
 
    tBob = record
735
 
{ blitter-objects }
736
 
 
737
 
{ --------------------- SYSTEM VARIABLES --------------------------------- }
738
 
 
739
 
{ --------------------- COMMON VARIABLES --------------------------------- }
740
 
 
741
 
        Flags   : smallint; { general purpose flags (see definitions below) }
742
 
 
743
 
{ --------------------- USER VARIABLES ----------------------------------- }
744
 
 
745
 
        SaveBuffer : Pointer;   { pointer to the buffer for background save }
746
 
 
747
 
{ used by Bobs for "cookie-cutting" and multi-plane masking }
748
 
 
749
 
        ImageShadow : Pointer;
750
 
 
751
 
{ pointer to BOBs for sequenced drawing of Bobs
752
 
 *  for correct overlaying of multiple component animations
753
 
 }
754
 
        Before  : pBob; { draw this Bob before Bob pointed to by before }
755
 
        After   : pBob; { draw this Bob after Bob pointed to by after }
756
 
 
757
 
        BobVSprite : pVSprite;        { this Bob's VSprite definition }
758
 
 
759
 
        BobComp : Pointer; { (AnimCompPtr) pointer to this Bob's AnimComp def }
760
 
 
761
 
        DBuffer : Pointer;        { pointer to this Bob's dBuf packet }
762
 
 
763
 
        BUserExt : BUserStuff;  { Bob user extension }
764
 
    end;
765
 
 
766
 
    pAnimComp = ^tAnimComp;
767
 
    tAnimComp = record
768
 
 
769
 
{ --------------------- SYSTEM VARIABLES --------------------------------- }
770
 
 
771
 
{ --------------------- COMMON VARIABLES --------------------------------- }
772
 
 
773
 
        Flags   : smallint;        { AnimComp flags for system & user }
774
 
 
775
 
{ timer defines how long to keep this component active:
776
 
 *  if set non-zero, timer decrements to zero then switches to nextSeq
777
 
 *  if set to zero, AnimComp never switches
778
 
 }
779
 
 
780
 
        Timer   : smallint;
781
 
 
782
 
{ --------------------- USER VARIABLES ----------------------------------- }
783
 
{ initial value for timer when the AnimComp is activated by the system }
784
 
 
785
 
        TimeSet : smallint;
786
 
 
787
 
{ pointer to next and previous components of animation object }
788
 
 
789
 
        NextComp        : pAnimComp;
790
 
        PrevComp        : pAnimComp;
791
 
 
792
 
{ pointer to component component definition of next image in sequence }
793
 
 
794
 
        NextSeq : pAnimComp;
795
 
        PrevSeq : pAnimComp;
796
 
 
797
 
        AnimCRoutine : Pointer; { Pointer of special animation procedure }
798
 
 
799
 
        YTrans  : smallint; { initial y translation (if this is a component) }
800
 
        XTrans  : smallint; { initial x translation (if this is a component) }
801
 
 
802
 
        HeadOb  : Pointer; { AnimObPtr }
803
 
 
804
 
        AnimBob : pBob;
805
 
    end;
806
 
 
807
 
    pAnimOb = ^tAnimOb;
808
 
    tAnimOb = record
809
 
 
810
 
{ --------------------- SYSTEM VARIABLES --------------------------------- }
811
 
 
812
 
        NextOb,
813
 
        PrevOb  : pAnimOb;
814
 
 
815
 
{ number of calls to Animate this AnimOb has endured }
816
 
 
817
 
        Clock   : Longint;
818
 
 
819
 
        AnOldY,
820
 
        AnOldX  : smallint;        { old y,x coordinates }
821
 
 
822
 
{ --------------------- COMMON VARIABLES --------------------------------- }
823
 
 
824
 
        AnY,
825
 
        AnX     : smallint;        { y,x coordinates of the AnimOb }
826
 
 
827
 
{ --------------------- USER VARIABLES ----------------------------------- }
828
 
 
829
 
        YVel,
830
 
        XVel    : smallint;        { velocities of this object }
831
 
        YAccel,
832
 
        XAccel  : smallint;        { accelerations of this object }
833
 
 
834
 
        RingYTrans,
835
 
        RingXTrans      : smallint;        { ring translation values }
836
 
 
837
 
        AnimORoutine    : Pointer;      { Pointer of special animation
838
 
                                          procedure }
839
 
 
840
 
        HeadComp        : pAnimComp;  { pointer to first component }
841
 
 
842
 
        AUserExt        : AUserStuff;       { AnimOb user extension }
843
 
    end;
844
 
 
845
 
    ppAnimOb = ^pAnimOb;
846
 
 
847
 
 
848
 
{ ************************************************************************ }
849
 
 
850
 
const
851
 
 
852
 
    B2NORM      = 0;
853
 
    B2SWAP      = 1;
854
 
    B2BOBBER    = 2;
855
 
 
856
 
{ ************************************************************************ }
857
 
 
858
 
type
859
 
 
860
 
{ a structure to contain the 16 collision procedure addresses }
861
 
 
862
 
    collTable = Array [0..15] of Pointer;
863
 
    pcollTable = ^collTable;
864
 
 
865
 
const
866
 
 
867
 
{   These bit descriptors are used by the GEL collide routines.
868
 
 *  These bits are set in the hitMask and meMask variables of
869
 
 *  a GEL to describe whether or not these types of collisions
870
 
 *  can affect the GEL.  BNDRY_HIT is described further below;
871
 
 *  this bit is permanently assigned as the boundary-hit flag.
872
 
 *  The other bit GEL_HIT is meant only as a default to cover
873
 
 *  any GEL hitting any other; the user may redefine this bit.
874
 
 }
875
 
 
876
 
    BORDERHIT   = 0;
877
 
 
878
 
{   These bit descriptors are used by the GEL boundry hit routines.
879
 
 *  When the user's boundry-hit routine is called (via the argument
880
 
 *  set by a call to SetCollision) the first argument passed to
881
 
 *  the user's routine is the Pointer of the GEL involved in the
882
 
 *  boundry-hit, and the second argument has the appropriate bit(s)
883
 
 *  set to describe which boundry was surpassed
884
 
 }
885
 
 
886
 
    TOPHIT      = 1;
887
 
    BOTTOMHIT   = 2;
888
 
    LEFTHIT     = 4;
889
 
    RIGHTHIT    = 8;
890
 
 
891
 
Type
892
 
 pExtendedNode = ^tExtendedNode;
893
 
 tExtendedNode = record
894
 
  xln_Succ,
895
 
  xln_Pred  : pNode;
896
 
  xln_Type  : Byte;
897
 
  xln_Pri   : Shortint;
898
 
  xln_Name  : STRPTR;
899
 
  xln_Subsystem : Byte;
900
 
  xln_Subtype   : Byte;
901
 
  xln_Library : Longint;
902
 
  xln_Init : Pointer;
903
 
 END;
904
 
 
905
 
CONST
906
 
 SS_GRAPHICS   =  $02;
907
 
 
908
 
 VIEW_EXTRA_TYPE       =  1;
909
 
 VIEWPORT_EXTRA_TYPE   =  2;
910
 
 SPECIAL_MONITOR_TYPE  =  3;
911
 
 MONITOR_SPEC_TYPE     =  4;
912
 
 
913
 
type
914
 
 
915
 
{ structure used by AddTOFTask }
916
 
 
917
 
    pIsrvstr = ^tIsrvstr;
918
 
    tIsrvstr = record
919
 
        is_Node : tNode;
920
 
        Iptr    : pIsrvstr;     { passed to srvr by os }
921
 
        code    : Pointer;
922
 
        ccode   : Pointer;
923
 
        Carg    : Pointer;
924
 
    end;
925
 
 
926
 
Type
927
 
 pAnalogSignalInterval = ^tAnalogSignalInterval;
928
 
 tAnalogSignalInterval = record
929
 
  asi_Start,
930
 
  asi_Stop  : Word;
931
 
 END;
932
 
 
933
 
 pSpecialMonitor = ^tSpecialMonitor;
934
 
 tSpecialMonitor = record
935
 
  spm_Node      : tExtendedNode;
936
 
  spm_Flags     : Word;
937
 
  do_monitor,
938
 
  reserved1,
939
 
  reserved2,
940
 
  reserved3     : Pointer;
941
 
  hblank,
942
 
  vblank,
943
 
  hsync,
944
 
  vsync : tAnalogSignalInterval;
945
 
 END;
946
 
 
947
 
 
948
 
 pMonitorSpec = ^tMonitorSpec;
949
 
 tMonitorSpec = record
950
 
    ms_Node     : tExtendedNode;
951
 
    ms_Flags    : Word;
952
 
    ratioh,
953
 
    ratiov      : Longint;
954
 
    total_rows,
955
 
    total_colorclocks,
956
 
    DeniseMaxDisplayColumn,
957
 
    BeamCon0,
958
 
    min_row     : Word;
959
 
    ms_Special  : pSpecialMonitor;
960
 
    ms_OpenCount : Word;
961
 
    ms_transform,
962
 
    ms_translate,
963
 
    ms_scale    : Pointer;
964
 
    ms_xoffset,
965
 
    ms_yoffset  : Word;
966
 
    ms_LegalView : tRectangle;
967
 
    ms_maxoscan,       { maximum legal overscan }
968
 
    ms_videoscan  : Pointer;      { video display overscan }
969
 
    DeniseMinDisplayColumn : Word;
970
 
    DisplayCompatible      : ULONG;
971
 
    DisplayInfoDataBase    : tList;
972
 
    DisplayInfoDataBaseSemaphore : tSignalSemaphore;
973
 
    ms_MrgCop,
974
 
    ms_LoadView,
975
 
    ms_KillView  : Longint;
976
 
 END;
977
 
 
978
 
const
979
 
  TO_MONITOR            =  0;
980
 
  FROM_MONITOR          =  1;
981
 
  STANDARD_XOFFSET      =  9;
982
 
  STANDARD_YOFFSET      =  0;
983
 
 
984
 
  MSB_REQUEST_NTSC      =  0;
985
 
  MSB_REQUEST_PAL       =  1;
986
 
  MSB_REQUEST_SPECIAL   =  2;
987
 
  MSB_REQUEST_A2024     =  3;
988
 
  MSB_DOUBLE_SPRITES    =  4;
989
 
  MSF_REQUEST_NTSC      =  1;
990
 
  MSF_REQUEST_PAL       =  2;
991
 
  MSF_REQUEST_SPECIAL   =  4;
992
 
  MSF_REQUEST_A2024     =  8;
993
 
  MSF_DOUBLE_SPRITES    =  16;
994
 
 
995
 
 
996
 
{ obsolete, v37 compatible definitions follow }
997
 
  REQUEST_NTSC          =  1;
998
 
  REQUEST_PAL           =  2;
999
 
  REQUEST_SPECIAL       =  4;
1000
 
  REQUEST_A2024         =  8;
1001
 
 
1002
 
  DEFAULT_MONITOR_NAME  : PChar =  'default.monitor';
1003
 
  NTSC_MONITOR_NAME     : PChar =  'ntsc.monitor';
1004
 
  PAL_MONITOR_NAME      : PChar =  'pal.monitor';
1005
 
  STANDARD_MONITOR_MASK =  ( REQUEST_NTSC OR REQUEST_PAL ) ;
1006
 
 
1007
 
  STANDARD_NTSC_ROWS    =  262;
1008
 
  STANDARD_PAL_ROWS     =  312;
1009
 
  STANDARD_COLORCLOCKS  =  226;
1010
 
  STANDARD_DENISE_MAX   =  455;
1011
 
  STANDARD_DENISE_MIN   =  93 ;
1012
 
  STANDARD_NTSC_BEAMCON =  $0000;
1013
 
  STANDARD_PAL_BEAMCON  =  DISPLAYPAL ;
1014
 
 
1015
 
  SPECIAL_BEAMCON       = ( VARVBLANK OR LOLDIS OR VARVSYNC OR VARHSYNC OR VARBEAM OR CSBLANK OR VSYNCTRUE);
1016
 
 
1017
 
  MIN_NTSC_ROW    = 21   ;
1018
 
  MIN_PAL_ROW     = 29   ;
1019
 
  STANDARD_VIEW_X = $81  ;
1020
 
  STANDARD_VIEW_Y = $2C  ;
1021
 
  STANDARD_HBSTRT = $06  ;
1022
 
  STANDARD_HSSTRT = $0B  ;
1023
 
  STANDARD_HSSTOP = $1C  ;
1024
 
  STANDARD_HBSTOP = $2C  ;
1025
 
  STANDARD_VBSTRT = $0122;
1026
 
  STANDARD_VSSTRT = $02A6;
1027
 
  STANDARD_VSSTOP = $03AA;
1028
 
  STANDARD_VBSTOP = $1066;
1029
 
 
1030
 
  VGA_COLORCLOCKS = (STANDARD_COLORCLOCKS/2);
1031
 
  VGA_TOTAL_ROWS  = (STANDARD_NTSC_ROWS*2);
1032
 
  VGA_DENISE_MIN  = 59   ;
1033
 
  MIN_VGA_ROW     = 29   ;
1034
 
  VGA_HBSTRT      = $08  ;
1035
 
  VGA_HSSTRT      = $0E  ;
1036
 
  VGA_HSSTOP      = $1C  ;
1037
 
  VGA_HBSTOP      = $1E  ;
1038
 
  VGA_VBSTRT      = $0000;
1039
 
  VGA_VSSTRT      = $0153;
1040
 
  VGA_VSSTOP      = $0235;
1041
 
  VGA_VBSTOP      = $0CCD;
1042
 
 
1043
 
  VGA_MONITOR_NAME  : PChar    =  'vga.monitor';
1044
 
 
1045
 
{ NOTE: VGA70 definitions are obsolete - a VGA70 monitor has never been
1046
 
 * implemented.
1047
 
 }
1048
 
  VGA70_COLORCLOCKS = (STANDARD_COLORCLOCKS/2) ;
1049
 
  VGA70_TOTAL_ROWS  = 449;
1050
 
  VGA70_DENISE_MIN  = 59;
1051
 
  MIN_VGA70_ROW     = 35   ;
1052
 
  VGA70_HBSTRT      = $08  ;
1053
 
  VGA70_HSSTRT      = $0E  ;
1054
 
  VGA70_HSSTOP      = $1C  ;
1055
 
  VGA70_HBSTOP      = $1E  ;
1056
 
  VGA70_VBSTRT      = $0000;
1057
 
  VGA70_VSSTRT      = $02A6;
1058
 
  VGA70_VSSTOP      = $0388;
1059
 
  VGA70_VBSTOP      = $0F73;
1060
 
 
1061
 
  VGA70_BEAMCON     = (SPECIAL_BEAMCON XOR VSYNCTRUE);
1062
 
  VGA70_MONITOR_NAME  : PChar  =      'vga70.monitor';
1063
 
 
1064
 
  BROADCAST_HBSTRT  =      $01  ;
1065
 
  BROADCAST_HSSTRT  =      $06  ;
1066
 
  BROADCAST_HSSTOP  =      $17  ;
1067
 
  BROADCAST_HBSTOP  =      $27  ;
1068
 
  BROADCAST_VBSTRT  =      $0000;
1069
 
  BROADCAST_VSSTRT  =      $02A6;
1070
 
  BROADCAST_VSSTOP  =      $054C;
1071
 
  BROADCAST_VBSTOP  =      $1C40;
1072
 
  BROADCAST_BEAMCON =      ( LOLDIS OR CSBLANK );
1073
 
  RATIO_FIXEDPART   =      4;
1074
 
  RATIO_UNITY       =      16;
1075
 
 
1076
 
 
1077
 
 
1078
 
Type
1079
 
    pRasInfo = ^tRasInfo;
1080
 
    tRasInfo = record    { used by callers to and InitDspC() }
1081
 
        Next    : pRasInfo;     { used for dualpf }
1082
 
        BitMap  : pBitMap;
1083
 
        RxOffset,
1084
 
        RyOffset : smallint;       { scroll offsets in this BitMap }
1085
 
    end;
1086
 
 
1087
 
 
1088
 
    pView = ^tView;
1089
 
    tView = record
1090
 
        ViewPort        : Pointer;      { ViewPortPtr }
1091
 
        LOFCprList      : pcprlist;   { used for interlaced and noninterlaced }
1092
 
        SHFCprList      : pcprlist;   { only used during interlace }
1093
 
        DyOffset,
1094
 
        DxOffset        : smallint;        { for complete View positioning }
1095
 
                                { offsets are +- adjustments to standard #s }
1096
 
        Modes           : WORD;        { such as INTERLACE, GENLOC }
1097
 
    end;
1098
 
 
1099
 
{ these structures are obtained via GfxNew }
1100
 
{ and disposed by GfxFree }
1101
 
Type
1102
 
       pViewExtra = ^tViewExtra;
1103
 
       tViewExtra = record
1104
 
        n : tExtendedNode;
1105
 
        View     : pView;       { backwards link }   { view in C-Includes }
1106
 
        Monitor : pMonitorSpec; { monitors for this view }
1107
 
        TopLine : Word;
1108
 
       END;
1109
 
 
1110
 
 
1111
 
    pViewPort = ^tViewPort;
1112
 
    tViewPort = record
1113
 
        Next    : pViewPort;
1114
 
        ColorMap : Pointer; { table of colors for this viewport }        { ColorMapPtr }
1115
 
                          { if this is nil, MakeVPort assumes default values }
1116
 
        DspIns  : pCopList;   { user by MakeView() }
1117
 
        SprIns  : pCopList;   { used by sprite stuff }
1118
 
        ClrIns  : pCopList;   { used by sprite stuff }
1119
 
        UCopIns : pUCopList;  { User copper list }
1120
 
        DWidth,
1121
 
        DHeight : smallint;
1122
 
        DxOffset,
1123
 
        DyOffset : smallint;
1124
 
        Modes   : Word;
1125
 
        SpritePriorities : Byte;        { used by makevp }
1126
 
        reserved : Byte;
1127
 
        RasInfo : pRasInfo;
1128
 
    end;
1129
 
 
1130
 
 
1131
 
{ this structure is obtained via GfxNew }
1132
 
{ and disposed by GfxFree }
1133
 
 
1134
 
 pViewPortExtra = ^tViewPortExtra;
1135
 
 tViewPortExtra = record
1136
 
  n : tExtendedNode;
1137
 
  ViewPort     : pViewPort;      { backwards link }   { ViewPort in C-Includes }
1138
 
  DisplayClip  : tRectangle;  { makevp display clipping information }
1139
 
        { These are added for V39 }
1140
 
  VecTable     : Pointer;                { Private }
1141
 
  DriverData   : Array[0..1] of Pointer;
1142
 
  Flags        : WORD;
1143
 
  Origin       : Array[0..1] of tPoint;  { First visible point relative to the DClip.
1144
 
                                         * One for each possible playfield.
1145
 
                                         }
1146
 
  cop1ptr,                  { private }
1147
 
  cop2ptr      : ULONG;   { private }
1148
 
 END;
1149
 
 
1150
 
 
1151
 
    pColorMap = ^tColorMap;
1152
 
    tColorMap = record
1153
 
        Flags   : Byte;
1154
 
        CType   : Byte;         { This is "Type" in C includes }
1155
 
        Count   : Word;
1156
 
        ColorTable      : Pointer;
1157
 
        cm_vpe  : pViewPortExtra;
1158
 
        LowColorBits : Pointer;
1159
 
        TransparencyPlane,
1160
 
        SpriteResolution,
1161
 
        SpriteResDefault,
1162
 
        AuxFlags         : Byte;
1163
 
        cm_vp            : pViewPort;   { ViewPortPtr }
1164
 
        NormalDisplayInfo,
1165
 
        CoerceDisplayInfo : Pointer;
1166
 
        cm_batch_items   : pTagItem;
1167
 
        VPModeID         : ULONG;
1168
 
        PalExtra         : Pointer;
1169
 
        SpriteBase_Even,
1170
 
        SpriteBase_Odd,
1171
 
        Bp_0_base,
1172
 
        Bp_1_base        : Word;
1173
 
    end;
1174
 
 
1175
 
{ if Type == 0 then ColorMap is V1.2/V1.3 compatible }
1176
 
{ if Type != 0 then ColorMap is V36       compatible }
1177
 
{ the system will never create other than V39 type colormaps when running V39 }
1178
 
 
1179
 
CONST
1180
 
 COLORMAP_TYPE_V1_2     = $00;
1181
 
 COLORMAP_TYPE_V1_4     = $01;
1182
 
 COLORMAP_TYPE_V36      = COLORMAP_TYPE_V1_4;    { use this definition }
1183
 
 COLORMAP_TYPE_V39      = $02;
1184
 
 
1185
 
 
1186
 
{ Flags variable }
1187
 
 COLORMAP_TRANSPARENCY   = $01;
1188
 
 COLORPLANE_TRANSPARENCY = $02;
1189
 
 BORDER_BLANKING         = $04;
1190
 
 BORDER_NOTRANSPARENCY   = $08;
1191
 
 VIDEOCONTROL_BATCH      = $10;
1192
 
 USER_COPPER_CLIP        = $20;
1193
 
 
1194
 
 
1195
 
CONST
1196
 
 EXTEND_VSTRUCT = $1000;  { unused bit in Modes field of View }
1197
 
 
1198
 
 
1199
 
{ defines used for Modes in IVPargs }
1200
 
 
1201
 
CONST
1202
 
 GENLOCK_VIDEO  =  $0002;
1203
 
 LACE           =  $0004;
1204
 
 SUPERHIRES     =  $0020;
1205
 
 PFBA           =  $0040;
1206
 
 EXTRA_HALFBRITE=  $0080;
1207
 
 GENLOCK_AUDIO  =  $0100;
1208
 
 DUALPF         =  $0400;
1209
 
 HAM            =  $0800;
1210
 
 EXTENDED_MODE  =  $1000;
1211
 
 VP_HIDE        =  $2000;
1212
 
 SPRITES        =  $4000;
1213
 
 HIRES          =  $8000;
1214
 
 
1215
 
 VPF_A2024      =  $40;
1216
 
 VPF_AGNUS      =  $20;
1217
 
 VPF_TENHZ      =  $20;
1218
 
 
1219
 
 BORDERSPRITES   = $40;
1220
 
 
1221
 
 CMF_CMTRANS   =  0;
1222
 
 CMF_CPTRANS   =  1;
1223
 
 CMF_BRDRBLNK  =  2;
1224
 
 CMF_BRDNTRAN  =  3;
1225
 
 CMF_BRDRSPRT  =  6;
1226
 
 
1227
 
 SPRITERESN_ECS       =   0;
1228
 
{ ^140ns, except in 35ns viewport, where it is 70ns. }
1229
 
 SPRITERESN_140NS     =   1;
1230
 
 SPRITERESN_70NS      =   2;
1231
 
 SPRITERESN_35NS      =   3;
1232
 
 SPRITERESN_DEFAULT   =   -1;
1233
 
 
1234
 
{ AuxFlags : }
1235
 
 CMAB_FULLPALETTE = 0;
1236
 
 CMAF_FULLPALETTE = 1;
1237
 
 CMAB_NO_INTERMED_UPDATE = 1;
1238
 
 CMAF_NO_INTERMED_UPDATE = 2;
1239
 
 CMAB_NO_COLOR_LOAD = 2;
1240
 
 CMAF_NO_COLOR_LOAD = 4;
1241
 
 CMAB_DUALPF_DISABLE = 3;
1242
 
 CMAF_DUALPF_DISABLE = 8;
1243
 
 
1244
 
Type
1245
 
    pPaletteExtra = ^tPaletteExtra;
1246
 
    tPaletteExtra = record                            { structure may be extended so watch out! }
1247
 
        pe_Semaphore  : tSignalSemaphore;                { shared semaphore for arbitration     }
1248
 
        pe_FirstFree,                                   { *private*                            }
1249
 
        pe_NFree,                                       { number of free colors                }
1250
 
        pe_FirstShared,                                 { *private*                            }
1251
 
        pe_NShared    : WORD;                           { *private*                            }
1252
 
        pe_RefCnt     : Pointer;                        { *private*                            }
1253
 
        pe_AllocList  : Pointer;                        { *private*                            }
1254
 
        pe_ViewPort   : pViewPort;                    { back pointer to viewport             }
1255
 
        pe_SharableColors : WORD;                       { the number of sharable colors.       }
1256
 
    end;
1257
 
{ flags values for ObtainPen }
1258
 
Const
1259
 
 PENB_EXCLUSIVE = 0;
1260
 
 PENB_NO_SETCOLOR = 1;
1261
 
 
1262
 
 PENF_EXCLUSIVE = 1;
1263
 
 PENF_NO_SETCOLOR = 2;
1264
 
 
1265
 
{ obsolete names for PENF_xxx flags: }
1266
 
 
1267
 
 PEN_EXCLUSIVE = PENF_EXCLUSIVE;
1268
 
 PEN_NO_SETCOLOR = PENF_NO_SETCOLOR;
1269
 
 
1270
 
{ precision values for ObtainBestPen : }
1271
 
 
1272
 
 PRECISION_EXACT = -1;
1273
 
 PRECISION_IMAGE = 0;
1274
 
 PRECISION_ICON  = 16;
1275
 
 PRECISION_GUI   = 32;
1276
 
 
1277
 
 
1278
 
{ tags for ObtainBestPen: }
1279
 
 OBP_Precision = $84000000;
1280
 
 OBP_FailIfBad = $84000001;
1281
 
 
1282
 
{ From V39, MakeVPort() will return an error if there is not enough memory,
1283
 
 * or the requested mode cannot be opened with the requested depth with the
1284
 
 * given bitmap (for higher bandwidth alignments).
1285
 
 }
1286
 
 
1287
 
 MVP_OK        =  0;       { you want to see this one }
1288
 
 MVP_NO_MEM    =  1;       { insufficient memory for intermediate workspace }
1289
 
 MVP_NO_VPE    =  2;       { ViewPort does not have a ViewPortExtra, and
1290
 
                                 * insufficient memory to allocate a temporary one.
1291
 
                                 }
1292
 
 MVP_NO_DSPINS =  3;       { insufficient memory for intermidiate copper
1293
 
                                 * instructions.
1294
 
                                 }
1295
 
 MVP_NO_DISPLAY = 4;       { BitMap data is misaligned for this viewport's
1296
 
                                 * mode and depth - see AllocBitMap().
1297
 
                                 }
1298
 
 MVP_OFF_BOTTOM = 5;       { PRIVATE - you will never see this. }
1299
 
 
1300
 
{ From V39, MrgCop() will return an error if there is not enough memory,
1301
 
 * or for some reason MrgCop() did not need to make any copper lists.
1302
 
 }
1303
 
 
1304
 
 MCOP_OK       =  0;       { you want to see this one }
1305
 
 MCOP_NO_MEM   =  1;       { insufficient memory to allocate the system
1306
 
                                 * copper lists.
1307
 
                                 }
1308
 
 MCOP_NOP      =  2;       { MrgCop() did not merge any copper lists
1309
 
                                 * (eg, no ViewPorts in the list, or all marked as
1310
 
                                 * hidden).
1311
 
                                 }
1312
 
Type
1313
 
    pDBufInfo = ^tDBufInfo;
1314
 
    tDBufInfo = record
1315
 
        dbi_Link1   : Pointer;
1316
 
        dbi_Count1  : ULONG;
1317
 
        dbi_SafeMessage : tMessage;         { replied to when safe to write to old bitmap }
1318
 
        dbi_UserData1   : Pointer;                     { first user data }
1319
 
 
1320
 
        dbi_Link2   : Pointer;
1321
 
        dbi_Count2  : ULONG;
1322
 
        dbi_DispMessage : tMessage; { replied to when new bitmap has been displayed at least
1323
 
                                                        once }
1324
 
        dbi_UserData2 : Pointer;                  { second user data }
1325
 
        dbi_MatchLong : ULONG;
1326
 
        dbi_CopPtr1,
1327
 
        dbi_CopPtr2,
1328
 
        dbi_CopPtr3   : Pointer;
1329
 
        dbi_BeamPos1,
1330
 
        dbi_BeamPos2  : WORD;
1331
 
    end;
1332
 
 
1333
 
 
1334
 
 
1335
 
   {   include define file for graphics display mode IDs.   }
1336
 
 
1337
 
 
1338
 
const
1339
 
 
1340
 
   INVALID_ID                   =   NOT 0;
1341
 
 
1342
 
{ With all the new modes that are available under V38 and V39, it is highly
1343
 
 * recommended that you use either the asl.library screenmode requester,
1344
 
 * and/or the V39 graphics.library function BestModeIDA().
1345
 
 *
1346
 
 * DO NOT interpret the any of the bits in the ModeID for its meaning. For
1347
 
 * example, do not interpret bit 3 ($4) as meaning the ModeID is interlaced.
1348
 
 * Instead, use GetDisplayInfoData() with DTAG_DISP, and examine the DIPF_...
1349
 
 * flags to determine a ModeID's characteristics. The only exception to
1350
 
 * this rule is that bit 7 ($80) will always mean the ModeID is
1351
 
 * ExtraHalfBright, and bit 11 ($800) will always mean the ModeID is HAM.
1352
 
 }
1353
 
 
1354
 
{ normal identifiers }
1355
 
 
1356
 
   MONITOR_ID_MASK              =   $FFFF1000;
1357
 
 
1358
 
   DEFAULT_MONITOR_ID           =   $00000000;
1359
 
   NTSC_MONITOR_ID              =   $00011000;
1360
 
   PAL_MONITOR_ID               =   $00021000;
1361
 
 
1362
 
{ the following 22 composite keys are for Modes on the default Monitor.
1363
 
 * NTSC & PAL "flavors" of these particular keys may be made by or'ing
1364
 
 * the NTSC or PAL MONITOR_ID with the desired MODE_KEY...
1365
 
 *
1366
 
 * For example, to specifically open a PAL HAM interlaced ViewPort
1367
 
 * (or intuition screen), you would use the modeid of
1368
 
 * (PAL_MONITOR_ID OR HAMLACE_KEY)
1369
 
 }
1370
 
 
1371
 
   LORES_KEY                     =  $00000000;
1372
 
   HIRES_KEY                     =  $00008000;
1373
 
   SUPER_KEY                     =  $00008020;
1374
 
   HAM_KEY                       =  $00000800;
1375
 
   LORESLACE_KEY                 =  $00000004;
1376
 
   HIRESLACE_KEY                 =  $00008004;
1377
 
   SUPERLACE_KEY                 =  $00008024;
1378
 
   HAMLACE_KEY                   =  $00000804;
1379
 
   LORESDPF_KEY                  =  $00000400;
1380
 
   HIRESDPF_KEY                  =  $00008400;
1381
 
   SUPERDPF_KEY                  =  $00008420;
1382
 
   LORESLACEDPF_KEY              =  $00000404;
1383
 
   HIRESLACEDPF_KEY              =  $00008404;
1384
 
   SUPERLACEDPF_KEY              =  $00008424;
1385
 
   LORESDPF2_KEY                 =  $00000440;
1386
 
   HIRESDPF2_KEY                 =  $00008440;
1387
 
   SUPERDPF2_KEY                 =  $00008460;
1388
 
   LORESLACEDPF2_KEY             =  $00000444;
1389
 
   HIRESLACEDPF2_KEY             =  $00008444;
1390
 
   SUPERLACEDPF2_KEY             =  $00008464;
1391
 
   EXTRAHALFBRITE_KEY            =  $00000080;
1392
 
   EXTRAHALFBRITELACE_KEY        =  $00000084;
1393
 
{ New for AA ChipSet (V39) }
1394
 
   HIRESHAM_KEY                  =  $00008800;
1395
 
   SUPERHAM_KEY                  =  $00008820;
1396
 
   HIRESEHB_KEY                  =  $00008080;
1397
 
   SUPEREHB_KEY                  =  $000080a0;
1398
 
   HIRESHAMLACE_KEY              =  $00008804;
1399
 
   SUPERHAMLACE_KEY              =  $00008824;
1400
 
   HIRESEHBLACE_KEY              =  $00008084;
1401
 
   SUPEREHBLACE_KEY              =  $000080a4;
1402
 
{ Added for V40 - may be useful modes for some games or animations. }
1403
 
   LORESSDBL_KEY                 =  $00000008;
1404
 
   LORESHAMSDBL_KEY              =  $00000808;
1405
 
   LORESEHBSDBL_KEY              =  $00000088;
1406
 
   HIRESHAMSDBL_KEY              =  $00008808;
1407
 
 
1408
 
 
1409
 
{ VGA identifiers }
1410
 
 
1411
 
   VGA_MONITOR_ID                =  $00031000;
1412
 
 
1413
 
   VGAEXTRALORES_KEY             =  $00031004;
1414
 
   VGALORES_KEY                  =  $00039004;
1415
 
   VGAPRODUCT_KEY                =  $00039024;
1416
 
   VGAHAM_KEY                    =  $00031804;
1417
 
   VGAEXTRALORESLACE_KEY         =  $00031005;
1418
 
   VGALORESLACE_KEY              =  $00039005;
1419
 
   VGAPRODUCTLACE_KEY            =  $00039025;
1420
 
   VGAHAMLACE_KEY                =  $00031805;
1421
 
   VGAEXTRALORESDPF_KEY          =  $00031404;
1422
 
   VGALORESDPF_KEY               =  $00039404;
1423
 
   VGAPRODUCTDPF_KEY             =  $00039424;
1424
 
   VGAEXTRALORESLACEDPF_KEY      =  $00031405;
1425
 
   VGALORESLACEDPF_KEY           =  $00039405;
1426
 
   VGAPRODUCTLACEDPF_KEY         =  $00039425;
1427
 
   VGAEXTRALORESDPF2_KEY         =  $00031444;
1428
 
   VGALORESDPF2_KEY              =  $00039444;
1429
 
   VGAPRODUCTDPF2_KEY            =  $00039464;
1430
 
   VGAEXTRALORESLACEDPF2_KEY     =  $00031445;
1431
 
   VGALORESLACEDPF2_KEY          =  $00039445;
1432
 
   VGAPRODUCTLACEDPF2_KEY        =  $00039465;
1433
 
   VGAEXTRAHALFBRITE_KEY         =  $00031084;
1434
 
   VGAEXTRAHALFBRITELACE_KEY     =  $00031085;
1435
 
{ New for AA ChipSet (V39) }
1436
 
   VGAPRODUCTHAM_KEY             =  $00039824;
1437
 
   VGALORESHAM_KEY               =  $00039804;
1438
 
   VGAEXTRALORESHAM_KEY          =  VGAHAM_KEY;
1439
 
   VGAPRODUCTHAMLACE_KEY         =  $00039825;
1440
 
   VGALORESHAMLACE_KEY           =  $00039805;
1441
 
   VGAEXTRALORESHAMLACE_KEY      =  VGAHAMLACE_KEY;
1442
 
   VGAEXTRALORESEHB_KEY          =  VGAEXTRAHALFBRITE_KEY;
1443
 
   VGAEXTRALORESEHBLACE_KEY      =  VGAEXTRAHALFBRITELACE_KEY;
1444
 
   VGALORESEHB_KEY               =  $00039084;
1445
 
   VGALORESEHBLACE_KEY           =  $00039085;
1446
 
   VGAEHB_KEY                    =  $000390a4;
1447
 
   VGAEHBLACE_KEY                =  $000390a5;
1448
 
{ These ModeIDs are the scandoubled equivalents of the above, with the
1449
 
 * exception of the DualPlayfield modes, as AA does not allow for scandoubling
1450
 
 * dualplayfield.
1451
 
 }
1452
 
   VGAEXTRALORESDBL_KEY          =  $00031000;
1453
 
   VGALORESDBL_KEY               =  $00039000;
1454
 
   VGAPRODUCTDBL_KEY             =  $00039020;
1455
 
   VGAEXTRALORESHAMDBL_KEY       =  $00031800;
1456
 
   VGALORESHAMDBL_KEY            =  $00039800;
1457
 
   VGAPRODUCTHAMDBL_KEY          =  $00039820;
1458
 
   VGAEXTRALORESEHBDBL_KEY       =  $00031080;
1459
 
   VGALORESEHBDBL_KEY            =  $00039080;
1460
 
   VGAPRODUCTEHBDBL_KEY          =  $000390a0;
1461
 
 
1462
 
{ a2024 identifiers }
1463
 
 
1464
 
   A2024_MONITOR_ID              =  $00041000;
1465
 
 
1466
 
   A2024TENHERTZ_KEY             =  $00041000;
1467
 
   A2024FIFTEENHERTZ_KEY         =  $00049000;
1468
 
 
1469
 
{ prototype identifiers (private) }
1470
 
 
1471
 
   PROTO_MONITOR_ID              =  $00051000;
1472
 
 
1473
 
 
1474
 
{ These monitors and modes were added for the V38 release. }
1475
 
 
1476
 
   EURO72_MONITOR_ID             =  $00061000;
1477
 
 
1478
 
   EURO72EXTRALORES_KEY          =  $00061004;
1479
 
   EURO72LORES_KEY               =  $00069004;
1480
 
   EURO72PRODUCT_KEY             =  $00069024;
1481
 
   EURO72HAM_KEY                 =  $00061804;
1482
 
   EURO72EXTRALORESLACE_KEY      =  $00061005;
1483
 
   EURO72LORESLACE_KEY           =  $00069005;
1484
 
   EURO72PRODUCTLACE_KEY         =  $00069025;
1485
 
   EURO72HAMLACE_KEY             =  $00061805;
1486
 
   EURO72EXTRALORESDPF_KEY       =  $00061404;
1487
 
   EURO72LORESDPF_KEY            =  $00069404;
1488
 
   EURO72PRODUCTDPF_KEY          =  $00069424;
1489
 
   EURO72EXTRALORESLACEDPF_KEY   =  $00061405;
1490
 
   EURO72LORESLACEDPF_KEY        =  $00069405;
1491
 
   EURO72PRODUCTLACEDPF_KEY      =  $00069425;
1492
 
   EURO72EXTRALORESDPF2_KEY      =  $00061444;
1493
 
   EURO72LORESDPF2_KEY           =  $00069444;
1494
 
   EURO72PRODUCTDPF2_KEY         =  $00069464;
1495
 
   EURO72EXTRALORESLACEDPF2_KEY  =  $00061445;
1496
 
   EURO72LORESLACEDPF2_KEY       =  $00069445;
1497
 
   EURO72PRODUCTLACEDPF2_KEY     =  $00069465;
1498
 
   EURO72EXTRAHALFBRITE_KEY      =  $00061084;
1499
 
   EURO72EXTRAHALFBRITELACE_KEY  =  $00061085;
1500
 
{ New AA modes (V39) }
1501
 
   EURO72PRODUCTHAM_KEY          =  $00069824;
1502
 
   EURO72PRODUCTHAMLACE_KEY      =  $00069825;
1503
 
   EURO72LORESHAM_KEY            =  $00069804;
1504
 
   EURO72LORESHAMLACE_KEY        =  $00069805;
1505
 
   EURO72EXTRALORESHAM_KEY       =  EURO72HAM_KEY;
1506
 
   EURO72EXTRALORESHAMLACE_KEY   =  EURO72HAMLACE_KEY ;
1507
 
   EURO72EXTRALORESEHB_KEY       =  EURO72EXTRAHALFBRITE_KEY;
1508
 
   EURO72EXTRALORESEHBLACE_KEY   =  EURO72EXTRAHALFBRITELACE_KEY;
1509
 
   EURO72LORESEHB_KEY            =  $00069084;
1510
 
   EURO72LORESEHBLACE_KEY        =  $00069085;
1511
 
   EURO72EHB_KEY                 =  $000690a4;
1512
 
   EURO72EHBLACE_KEY             =  $000690a5;
1513
 
{ These ModeIDs are the scandoubled equivalents of the above, with the
1514
 
 * exception of the DualPlayfield modes, as AA does not allow for scandoubling
1515
 
 * dualplayfield.
1516
 
 }
1517
 
   EURO72EXTRALORESDBL_KEY       =  $00061000;
1518
 
   EURO72LORESDBL_KEY            =  $00069000;
1519
 
   EURO72PRODUCTDBL_KEY          =  $00069020;
1520
 
   EURO72EXTRALORESHAMDBL_KEY    =  $00061800;
1521
 
   EURO72LORESHAMDBL_KEY         =  $00069800;
1522
 
   EURO72PRODUCTHAMDBL_KEY       =  $00069820;
1523
 
   EURO72EXTRALORESEHBDBL_KEY    =  $00061080;
1524
 
   EURO72LORESEHBDBL_KEY         =  $00069080;
1525
 
   EURO72PRODUCTEHBDBL_KEY       =  $000690a0;
1526
 
 
1527
 
 
1528
 
   EURO36_MONITOR_ID             =  $00071000;
1529
 
 
1530
 
{ Euro36 modeids can be ORed with the default modeids a la NTSC and PAL.
1531
 
 * For example, Euro36 SuperHires is
1532
 
 * (EURO36_MONITOR_ID OR SUPER_KEY)
1533
 
 }
1534
 
 
1535
 
   SUPER72_MONITOR_ID            =  $00081000;
1536
 
 
1537
 
{ Super72 modeids can be ORed with the default modeids a la NTSC and PAL.
1538
 
 * For example, Super72 SuperHiresLace (80$600) is
1539
 
 * (SUPER72_MONITOR_ID OR SUPERLACE_KEY).
1540
 
 * The following scandoubled Modes are the exception:
1541
 
 }
1542
 
   SUPER72LORESDBL_KEY           =  $00081008;
1543
 
   SUPER72HIRESDBL_KEY           =  $00089008;
1544
 
   SUPER72SUPERDBL_KEY           =  $00089028;
1545
 
   SUPER72LORESHAMDBL_KEY        =  $00081808;
1546
 
   SUPER72HIRESHAMDBL_KEY        =  $00089808;
1547
 
   SUPER72SUPERHAMDBL_KEY        =  $00089828;
1548
 
   SUPER72LORESEHBDBL_KEY        =  $00081088;
1549
 
   SUPER72HIRESEHBDBL_KEY        =  $00089088;
1550
 
   SUPER72SUPEREHBDBL_KEY        =  $000890a8;
1551
 
 
1552
 
 
1553
 
{ These monitors and modes were added for the V39 release. }
1554
 
 
1555
 
   DBLNTSC_MONITOR_ID            =  $00091000;
1556
 
 
1557
 
   DBLNTSCLORES_KEY              =  $00091000;
1558
 
   DBLNTSCLORESFF_KEY            =  $00091004;
1559
 
   DBLNTSCLORESHAM_KEY           =  $00091800;
1560
 
   DBLNTSCLORESHAMFF_KEY         =  $00091804;
1561
 
   DBLNTSCLORESEHB_KEY           =  $00091080;
1562
 
   DBLNTSCLORESEHBFF_KEY         =  $00091084;
1563
 
   DBLNTSCLORESLACE_KEY          =  $00091005;
1564
 
   DBLNTSCLORESHAMLACE_KEY       =  $00091805;
1565
 
   DBLNTSCLORESEHBLACE_KEY       =  $00091085;
1566
 
   DBLNTSCLORESDPF_KEY           =  $00091400;
1567
 
   DBLNTSCLORESDPFFF_KEY         =  $00091404;
1568
 
   DBLNTSCLORESDPFLACE_KEY       =  $00091405;
1569
 
   DBLNTSCLORESDPF2_KEY          =  $00091440;
1570
 
   DBLNTSCLORESDPF2FF_KEY        =  $00091444;
1571
 
   DBLNTSCLORESDPF2LACE_KEY      =  $00091445;
1572
 
   DBLNTSCHIRES_KEY              =  $00099000;
1573
 
   DBLNTSCHIRESFF_KEY            =  $00099004;
1574
 
   DBLNTSCHIRESHAM_KEY           =  $00099800;
1575
 
   DBLNTSCHIRESHAMFF_KEY         =  $00099804;
1576
 
   DBLNTSCHIRESLACE_KEY          =  $00099005;
1577
 
   DBLNTSCHIRESHAMLACE_KEY       =  $00099805;
1578
 
   DBLNTSCHIRESEHB_KEY           =  $00099080;
1579
 
   DBLNTSCHIRESEHBFF_KEY         =  $00099084;
1580
 
   DBLNTSCHIRESEHBLACE_KEY       =  $00099085;
1581
 
   DBLNTSCHIRESDPF_KEY           =  $00099400;
1582
 
   DBLNTSCHIRESDPFFF_KEY         =  $00099404;
1583
 
   DBLNTSCHIRESDPFLACE_KEY       =  $00099405;
1584
 
   DBLNTSCHIRESDPF2_KEY          =  $00099440;
1585
 
   DBLNTSCHIRESDPF2FF_KEY        =  $00099444;
1586
 
   DBLNTSCHIRESDPF2LACE_KEY      =  $00099445;
1587
 
   DBLNTSCEXTRALORES_KEY         =  $00091200;
1588
 
   DBLNTSCEXTRALORESHAM_KEY      =  $00091a00;
1589
 
   DBLNTSCEXTRALORESEHB_KEY      =  $00091280;
1590
 
   DBLNTSCEXTRALORESDPF_KEY      =  $00091600;
1591
 
   DBLNTSCEXTRALORESDPF2_KEY     =  $00091640;
1592
 
   DBLNTSCEXTRALORESFF_KEY       =  $00091204;
1593
 
   DBLNTSCEXTRALORESHAMFF_KEY    =  $00091a04;
1594
 
   DBLNTSCEXTRALORESEHBFF_KEY    =  $00091284;
1595
 
   DBLNTSCEXTRALORESDPFFF_KEY    =  $00091604;
1596
 
   DBLNTSCEXTRALORESDPF2FF_KEY   =  $00091644;
1597
 
   DBLNTSCEXTRALORESLACE_KEY     =  $00091205;
1598
 
   DBLNTSCEXTRALORESHAMLACE_KEY  =  $00091a05;
1599
 
   DBLNTSCEXTRALORESEHBLACE_KEY  =  $00091285;
1600
 
   DBLNTSCEXTRALORESDPFLACE_KEY  =  $00091605;
1601
 
   DBLNTSCEXTRALORESDPF2LACE_KEY =  $00091645;
1602
 
 
1603
 
   DBLPAL_MONITOR_ID             =  $000a1000;
1604
 
 
1605
 
   DBLPALLORES_KEY               =  $000a1000;
1606
 
   DBLPALLORESFF_KEY             =  $000a1004;
1607
 
   DBLPALLORESHAM_KEY            =  $000a1800;
1608
 
   DBLPALLORESHAMFF_KEY          =  $000a1804;
1609
 
   DBLPALLORESEHB_KEY            =  $000a1080;
1610
 
   DBLPALLORESEHBFF_KEY          =  $000a1084;
1611
 
   DBLPALLORESLACE_KEY           =  $000a1005;
1612
 
   DBLPALLORESHAMLACE_KEY        =  $000a1805;
1613
 
   DBLPALLORESEHBLACE_KEY        =  $000a1085;
1614
 
   DBLPALLORESDPF_KEY            =  $000a1400;
1615
 
   DBLPALLORESDPFFF_KEY          =  $000a1404;
1616
 
   DBLPALLORESDPFLACE_KEY        =  $000a1405;
1617
 
   DBLPALLORESDPF2_KEY           =  $000a1440;
1618
 
   DBLPALLORESDPF2FF_KEY         =  $000a1444;
1619
 
   DBLPALLORESDPF2LACE_KEY       =  $000a1445;
1620
 
   DBLPALHIRES_KEY               =  $000a9000;
1621
 
   DBLPALHIRESFF_KEY             =  $000a9004;
1622
 
   DBLPALHIRESHAM_KEY            =  $000a9800;
1623
 
   DBLPALHIRESHAMFF_KEY          =  $000a9804;
1624
 
   DBLPALHIRESLACE_KEY           =  $000a9005;
1625
 
   DBLPALHIRESHAMLACE_KEY        =  $000a9805;
1626
 
   DBLPALHIRESEHB_KEY            =  $000a9080;
1627
 
   DBLPALHIRESEHBFF_KEY          =  $000a9084;
1628
 
   DBLPALHIRESEHBLACE_KEY        =  $000a9085;
1629
 
   DBLPALHIRESDPF_KEY            =  $000a9400;
1630
 
   DBLPALHIRESDPFFF_KEY          =  $000a9404;
1631
 
   DBLPALHIRESDPFLACE_KEY        =  $000a9405;
1632
 
   DBLPALHIRESDPF2_KEY           =  $000a9440;
1633
 
   DBLPALHIRESDPF2FF_KEY         =  $000a9444;
1634
 
   DBLPALHIRESDPF2LACE_KEY       =  $000a9445;
1635
 
   DBLPALEXTRALORES_KEY          =  $000a1200;
1636
 
   DBLPALEXTRALORESHAM_KEY       =  $000a1a00;
1637
 
   DBLPALEXTRALORESEHB_KEY       =  $000a1280;
1638
 
   DBLPALEXTRALORESDPF_KEY       =  $000a1600;
1639
 
   DBLPALEXTRALORESDPF2_KEY      =  $000a1640;
1640
 
   DBLPALEXTRALORESFF_KEY        =  $000a1204;
1641
 
   DBLPALEXTRALORESHAMFF_KEY     =  $000a1a04;
1642
 
   DBLPALEXTRALORESEHBFF_KEY     =  $000a1284;
1643
 
   DBLPALEXTRALORESDPFFF_KEY     =  $000a1604;
1644
 
   DBLPALEXTRALORESDPF2FF_KEY    =  $000a1644;
1645
 
   DBLPALEXTRALORESLACE_KEY      =  $000a1205;
1646
 
   DBLPALEXTRALORESHAMLACE_KEY   =  $000a1a05;
1647
 
   DBLPALEXTRALORESEHBLACE_KEY   =  $000a1285;
1648
 
   DBLPALEXTRALORESDPFLACE_KEY   =  $000a1605;
1649
 
   DBLPALEXTRALORESDPF2LACE_KEY  =  $000a1645;
1650
 
 
1651
 
 
1652
 
{ Use these tags for passing to BestModeID() (V39) }
1653
 
 
1654
 
   SPECIAL_FLAGS = $100E;
1655
 
   { Original:
1656
 
     SPECIAL_FLAGS = DIPF_IS_DUALPF OR DIPF_IS_PF2PRI OR DIPF_IS_HAM OR DIPF_IS_EXTRAHALFBRITE;
1657
 
     ( Mu?te aufgrund eines Fehler in PCQ ge?ndert werden )
1658
 
   }
1659
 
 
1660
 
 
1661
 
   BIDTAG_DIPFMustHave     = $80000001;      { mask of the DIPF_ flags the ModeID must have }
1662
 
                                { Default - NULL }
1663
 
   BIDTAG_DIPFMustNotHave  = $80000002;      { mask of the DIPF_ flags the ModeID must not have }
1664
 
                                { Default - SPECIAL_FLAGS }
1665
 
   BIDTAG_ViewPort         = $80000003;      { ViewPort for which a ModeID is sought. }
1666
 
                                { Default - NULL }
1667
 
   BIDTAG_NominalWidth     = $80000004;      { \ together make the aspect ratio and }
1668
 
   BIDTAG_NominalHeight    = $80000005;      { / override the vp->Width/Height. }
1669
 
                                { Default - SourceID NominalDimensionInfo,
1670
 
                                 * or vp->DWidth/Height, or (640 * 200),
1671
 
                                 * in that preferred order.
1672
 
                                 }
1673
 
   BIDTAG_DesiredWidth     = $80000006;      { \ Nominal Width and Height of the }
1674
 
   BIDTAG_DesiredHeight    = $80000007;      { / returned ModeID. }
1675
 
                                { Default - same as Nominal }
1676
 
   BIDTAG_Depth            = $80000008;      { ModeID must support this depth. }
1677
 
                                { Default - vp->RasInfo->BitMap->Depth or 1 }
1678
 
   BIDTAG_MonitorID        = $80000009;      { ModeID must use this monitor. }
1679
 
                                { Default - use best monitor available }
1680
 
   BIDTAG_SourceID         = $8000000a;      { instead of a ViewPort. }
1681
 
                                { Default - VPModeID(vp) if BIDTAG_ViewPort is
1682
 
                                 * specified, else leave the DIPFMustHave and
1683
 
                                 * DIPFMustNotHave values untouched.
1684
 
                                 }
1685
 
   BIDTAG_RedBits        =  $8000000b;      { \                            }
1686
 
   BIDTAG_BlueBits       =  $8000000c;      {  > Match up from the database }
1687
 
   BIDTAG_GreenBits      =  $8000000d;      { /                            }
1688
 
                                            { Default - 4 }
1689
 
   BIDTAG_GfxPrivate     =  $8000000e;      { Private }
1690
 
 
1691
 
 
1692
 
const
1693
 
 
1694
 
{ bplcon0 defines }
1695
 
 
1696
 
    MODE_640    = $8000;
1697
 
    PLNCNTMSK   = $7;           { how many bit planes? }
1698
 
                                { 0 = none, 1->6 = 1->6, 7 = reserved }
1699
 
    PLNCNTSHFT  = 12;           { bits to shift for bplcon0 }
1700
 
    PF2PRI      = $40;          { bplcon2 bit }
1701
 
    COLORON     = $0200;        { disable color burst }
1702
 
    DBLPF       = $400;
1703
 
    HOLDNMODIFY = $800;
1704
 
    INTERLACE   = 4;            { interlace mode for 400 }
1705
 
 
1706
 
{ bplcon1 defines }
1707
 
 
1708
 
    PFA_FINE_SCROLL             = $F;
1709
 
    PFB_FINE_SCROLL_SHIFT       = 4;
1710
 
    PF_FINE_SCROLL_MASK         = $F;
1711
 
 
1712
 
{ display window start and stop defines }
1713
 
 
1714
 
    DIW_HORIZ_POS       = $7F;  { horizontal start/stop }
1715
 
    DIW_VRTCL_POS       = $1FF; { vertical start/stop }
1716
 
    DIW_VRTCL_POS_SHIFT = $7;
1717
 
 
1718
 
{ Data fetch start/stop horizontal position }
1719
 
 
1720
 
    DFTCH_MASK  = $FF;
1721
 
 
1722
 
{ vposr bits }
1723
 
 
1724
 
    VPOSRLOF    = $8000;
1725
 
 
1726
 
  {   include define file for displayinfo database }
1727
 
 
1728
 
{ the "public" handle to a DisplayInfoRecord }
1729
 
Type
1730
 
 
1731
 
 DisplayInfoHandle = APTR;
1732
 
 
1733
 
{ datachunk type identifiers }
1734
 
 
1735
 
CONST
1736
 
 DTAG_DISP            =   $80000000;
1737
 
 DTAG_DIMS            =   $80001000;
1738
 
 DTAG_MNTR            =   $80002000;
1739
 
 DTAG_NAME            =   $80003000;
1740
 
 DTAG_VEC             =   $80004000;      { internal use only }
1741
 
 
1742
 
Type
1743
 
 
1744
 
  pQueryHeader = ^tQueryHeader;
1745
 
  tQueryHeader = record
1746
 
   tructID,                    { datachunk type identifier }
1747
 
   DisplayID,                  { copy of display record key   }
1748
 
   SkipID,                     { TAG_SKIP -- see tagitems.h }
1749
 
   Length  :  ULONG;         { length of local data in double-longwords }
1750
 
  END;
1751
 
 
1752
 
  pDisplayInfo = ^tDisplayInfo;
1753
 
  tDisplayInfo = record
1754
 
   Header : tQueryHeader;
1755
 
   NotAvailable : Word;    { IF NULL available, else see defines }
1756
 
   PropertyFlags : ULONG;  { Properties of this mode see defines }
1757
 
   Resolution : tPoint;     { ticks-per-pixel X/Y                 }
1758
 
   PixelSpeed : Word;     { aproximation in nanoseconds         }
1759
 
   NumStdSprites : Word;  { number of standard amiga sprites    }
1760
 
   PaletteRange : Word;   { distinguishable shades available    }
1761
 
   SpriteResolution : tPoint; { std sprite ticks-per-pixel X/Y    }
1762
 
   pad : Array[0..3] of Byte;
1763
 
   RedBits     : Byte;
1764
 
   GreenBits   : Byte;
1765
 
   BlueBits    : Byte;
1766
 
   pad2        : array [0..4] of Byte;
1767
 
   reserved : Array[0..1] of ULONG;    { terminator }
1768
 
  END;
1769
 
 
1770
 
{ availability }
1771
 
 
1772
 
CONST
1773
 
 DI_AVAIL_NOCHIPS        =$0001;
1774
 
 DI_AVAIL_NOMONITOR      =$0002;
1775
 
 DI_AVAIL_NOTWITHGENLOCK =$0004;
1776
 
 
1777
 
{ mode properties }
1778
 
 
1779
 
 DIPF_IS_LACE          =  $00000001;
1780
 
 DIPF_IS_DUALPF        =  $00000002;
1781
 
 DIPF_IS_PF2PRI        =  $00000004;
1782
 
 DIPF_IS_HAM           =  $00000008;
1783
 
 
1784
 
 DIPF_IS_ECS           =  $00000010;      {      note: ECS modes (SHIRES, VGA, AND **
1785
 
                                                 PRODUCTIVITY) do not support      **
1786
 
                                                 attached sprites.                 **
1787
 
                                                                                        }
1788
 
 DIPF_IS_AA            =  $00010000;      { AA modes - may only be available
1789
 
                                                ** if machine has correct memory
1790
 
                                                ** type to support required
1791
 
                                                ** bandwidth - check availability.
1792
 
                                                ** (V39)
1793
 
                                                }
1794
 
 DIPF_IS_PAL           =  $00000020;
1795
 
 DIPF_IS_SPRITES       =  $00000040;
1796
 
 DIPF_IS_GENLOCK       =  $00000080;
1797
 
 
1798
 
 DIPF_IS_WB            =  $00000100;
1799
 
 DIPF_IS_DRAGGABLE     =  $00000200;
1800
 
 DIPF_IS_PANELLED      =  $00000400;
1801
 
 DIPF_IS_BEAMSYNC      =  $00000800;
1802
 
 
1803
 
 DIPF_IS_EXTRAHALFBRITE = $00001000;
1804
 
 
1805
 
{ The following DIPF_IS_... flags are new for V39 }
1806
 
  DIPF_IS_SPRITES_ATT           =  $00002000;      { supports attached sprites }
1807
 
  DIPF_IS_SPRITES_CHNG_RES      =  $00004000;      { supports variable sprite resolution }
1808
 
  DIPF_IS_SPRITES_BORDER        =  $00008000;      { sprite can be displayed in the border }
1809
 
  DIPF_IS_SCANDBL               =  $00020000;      { scan doubled }
1810
 
  DIPF_IS_SPRITES_CHNG_BASE     =  $00040000;
1811
 
                                                   { can change the sprite base colour }
1812
 
  DIPF_IS_SPRITES_CHNG_PRI      =  $00080000;
1813
 
                                                                                        { can change the sprite priority
1814
 
                                                                                        ** with respect to the playfield(s).
1815
 
                                                                                        }
1816
 
  DIPF_IS_DBUFFER       =  $00100000;      { can support double buffering }
1817
 
  DIPF_IS_PROGBEAM      =  $00200000;      { is a programmed beam-sync mode }
1818
 
  DIPF_IS_FOREIGN       =  $80000000;      { this mode is not native to the Amiga }
1819
 
 
1820
 
Type
1821
 
 pDimensionInfo =^tDimensionInfo;
1822
 
 tDimensionInfo = record
1823
 
  Header : tQueryHeader;
1824
 
  MaxDepth,             { log2( max number of colors ) }
1825
 
  MinRasterWidth,       { minimum width in pixels      }
1826
 
  MinRasterHeight,      { minimum height in pixels     }
1827
 
  MaxRasterWidth,       { maximum width in pixels      }
1828
 
  MaxRasterHeight : Word;      { maximum height in pixels     }
1829
 
  Nominal,              { "standard" dimensions        }
1830
 
  MaxOScan,             { fixed, hardware dependant    }
1831
 
  VideoOScan,           { fixed, hardware dependant    }
1832
 
  TxtOScan,             { editable via preferences     }
1833
 
  StdOScan  : tRectangle; { editable via preferences     }
1834
 
  pad  : Array[0..13] of Byte;
1835
 
  reserved : Array[0..1] of Longint;          { terminator }
1836
 
 END;
1837
 
 
1838
 
 pMonitorInfo = ^tMonitorInfo;
1839
 
 tMonitorInfo = record
1840
 
  Header : tQueryHeader;
1841
 
  Mspc   : pMonitorSpec;         { pointer to monitor specification  }
1842
 
  ViewPosition,                    { editable via preferences          }
1843
 
  ViewResolution : tPoint;          { standard monitor ticks-per-pixel  }
1844
 
  ViewPositionRange : tRectangle;   { fixed, hardware dependant }
1845
 
  TotalRows,                       { display height in scanlines       }
1846
 
  TotalColorClocks,                { scanline width in 280 ns units    }
1847
 
  MinRow        : Word;            { absolute minimum active scanline  }
1848
 
  Compatibility : smallint;           { how this coexists with others     }
1849
 
  pad : Array[0..31] of Byte;
1850
 
  MouseTicks    : tPoint;
1851
 
  DefaultViewPosition : tPoint;
1852
 
  PreferredModeID : ULONG;
1853
 
  reserved : Array[0..1] of ULONG;          { terminator }
1854
 
 END;
1855
 
 
1856
 
{ monitor compatibility }
1857
 
 
1858
 
CONST
1859
 
 MCOMPAT_MIXED =  0;       { can share display with other MCOMPAT_MIXED }
1860
 
 MCOMPAT_SELF  =  1;       { can share only within same monitor }
1861
 
 MCOMPAT_NOBODY= -1;       { only one viewport at a time }
1862
 
 
1863
 
 DISPLAYNAMELEN = 32;
1864
 
 
1865
 
Type
1866
 
 pNameInfo = ^tNameInfo;
1867
 
 tNameInfo = record
1868
 
  Header : tQueryHeader;
1869
 
  Name   : Array[0..DISPLAYNAMELEN-1] of Char;
1870
 
  reserved : Array[0..1] of ULONG;          { terminator }
1871
 
 END;
1872
 
 
1873
 
 
1874
 
{****************************************************************************}
1875
 
 
1876
 
{ The following VecInfo structure is PRIVATE, for our use only
1877
 
 * Touch these, and burn! (V39)
1878
 
 }
1879
 
Type
1880
 
 pVecInfo = ^tVecInfo;
1881
 
 tVecInfo = record
1882
 
        Header  : tQueryHeader;
1883
 
        Vec     : Pointer;
1884
 
        Data    : Pointer;
1885
 
        vi_Type : WORD;               { Type in C Includes }
1886
 
        pad     : Array[0..2] of WORD;
1887
 
        reserved : Array[0..1] of ULONG;
1888
 
 end;
1889
 
 
1890
 
 
1891
 
CONST
1892
 
 VTAG_END_CM            = $00000000;
1893
 
 VTAG_CHROMAKEY_CLR     = $80000000;
1894
 
 VTAG_CHROMAKEY_SET     = $80000001;
1895
 
 VTAG_BITPLANEKEY_CLR   = $80000002;
1896
 
 VTAG_BITPLANEKEY_SET   = $80000003;
1897
 
 VTAG_BORDERBLANK_CLR   = $80000004;
1898
 
 VTAG_BORDERBLANK_SET   = $80000005;
1899
 
 VTAG_BORDERNOTRANS_CLR = $80000006;
1900
 
 VTAG_BORDERNOTRANS_SET = $80000007;
1901
 
 VTAG_CHROMA_PEN_CLR    = $80000008;
1902
 
 VTAG_CHROMA_PEN_SET    = $80000009;
1903
 
 VTAG_CHROMA_PLANE_SET  = $8000000A;
1904
 
 VTAG_ATTACH_CM_SET     = $8000000B;
1905
 
 VTAG_NEXTBUF_CM        = $8000000C;
1906
 
 VTAG_BATCH_CM_CLR      = $8000000D;
1907
 
 VTAG_BATCH_CM_SET      = $8000000E;
1908
 
 VTAG_NORMAL_DISP_GET   = $8000000F;
1909
 
 VTAG_NORMAL_DISP_SET   = $80000010;
1910
 
 VTAG_COERCE_DISP_GET   = $80000011;
1911
 
 VTAG_COERCE_DISP_SET   = $80000012;
1912
 
 VTAG_VIEWPORTEXTRA_GET = $80000013;
1913
 
 VTAG_VIEWPORTEXTRA_SET = $80000014;
1914
 
 VTAG_CHROMAKEY_GET     = $80000015;
1915
 
 VTAG_BITPLANEKEY_GET   = $80000016;
1916
 
 VTAG_BORDERBLANK_GET   = $80000017;
1917
 
 VTAG_BORDERNOTRANS_GET = $80000018;
1918
 
 VTAG_CHROMA_PEN_GET    = $80000019;
1919
 
 VTAG_CHROMA_PLANE_GET  = $8000001A;
1920
 
 VTAG_ATTACH_CM_GET     = $8000001B;
1921
 
 VTAG_BATCH_CM_GET      = $8000001C;
1922
 
 VTAG_BATCH_ITEMS_GET   = $8000001D;
1923
 
 VTAG_BATCH_ITEMS_SET   = $8000001E;
1924
 
 VTAG_BATCH_ITEMS_ADD   = $8000001F;
1925
 
 VTAG_VPMODEID_GET      = $80000020;
1926
 
 VTAG_VPMODEID_SET      = $80000021;
1927
 
 VTAG_VPMODEID_CLR      = $80000022;
1928
 
 VTAG_USERCLIP_GET      = $80000023;
1929
 
 VTAG_USERCLIP_SET      = $80000024;
1930
 
 VTAG_USERCLIP_CLR      = $80000025;
1931
 
{ The following tags are V39 specific. They will be ignored (returing error -3) by
1932
 
        earlier versions }
1933
 
 VTAG_PF1_BASE_GET             =  $80000026;
1934
 
 VTAG_PF2_BASE_GET             =  $80000027;
1935
 
 VTAG_SPEVEN_BASE_GET          =  $80000028;
1936
 
 VTAG_SPODD_BASE_GET           =  $80000029;
1937
 
 VTAG_PF1_BASE_SET             =  $8000002a;
1938
 
 VTAG_PF2_BASE_SET             =  $8000002b;
1939
 
 VTAG_SPEVEN_BASE_SET          =  $8000002c;
1940
 
 VTAG_SPODD_BASE_SET           =  $8000002d;
1941
 
 VTAG_BORDERSPRITE_GET         =  $8000002e;
1942
 
 VTAG_BORDERSPRITE_SET         =  $8000002f;
1943
 
 VTAG_BORDERSPRITE_CLR         =  $80000030;
1944
 
 VTAG_SPRITERESN_SET           =  $80000031;
1945
 
 VTAG_SPRITERESN_GET           =  $80000032;
1946
 
 VTAG_PF1_TO_SPRITEPRI_SET     =  $80000033;
1947
 
 VTAG_PF1_TO_SPRITEPRI_GET     =  $80000034;
1948
 
 VTAG_PF2_TO_SPRITEPRI_SET     =  $80000035;
1949
 
 VTAG_PF2_TO_SPRITEPRI_GET     =  $80000036;
1950
 
 VTAG_IMMEDIATE                =  $80000037;
1951
 
 VTAG_FULLPALETTE_SET          =  $80000038;
1952
 
 VTAG_FULLPALETTE_GET          =  $80000039;
1953
 
 VTAG_FULLPALETTE_CLR          =  $8000003A;
1954
 
 VTAG_DEFSPRITERESN_SET        =  $8000003B;
1955
 
 VTAG_DEFSPRITERESN_GET        =  $8000003C;
1956
 
 
1957
 
{ all the following tags follow the new, rational standard for videocontrol tags:
1958
 
 * VC_xxx,state         set the state of attribute 'xxx' to value 'state'
1959
 
 * VC_xxx_QUERY,&var    get the state of attribute 'xxx' and store it into the longword
1960
 
 *                      pointed to by &var.
1961
 
 *
1962
 
 * The following are new for V40:
1963
 
 }
1964
 
 
1965
 
 VC_IntermediateCLUpdate       =  $80000080;
1966
 
        { default=true. When set graphics will update the intermediate copper
1967
 
         * lists on color changes, etc. When false, it won't, and will be faster.
1968
 
         }
1969
 
 VC_IntermediateCLUpdate_Query =  $80000081;
1970
 
 
1971
 
 VC_NoColorPaletteLoad         =  $80000082;
1972
 
        { default = false. When set, graphics will only load color 0
1973
 
         * for this ViewPort, and so the ViewPort's colors will come
1974
 
         * from the previous ViewPort's.
1975
 
         *
1976
 
         * NB - Using this tag and VTAG_FULLPALETTE_SET together is undefined.
1977
 
         }
1978
 
 VC_NoColorPaletteLoad_Query   =  $80000083;
1979
 
 
1980
 
 VC_DUALPF_Disable             =  $80000084;
1981
 
        { default = false. When this flag is set, the dual-pf bit
1982
 
           in Dual-Playfield screens will be turned off. Even bitplanes
1983
 
           will still come from the first BitMap and odd bitplanes
1984
 
           from the second BitMap, and both R[xy]Offsets will be
1985
 
           considered. This can be used (with appropriate palette
1986
 
           selection) for cross-fades between differently scrolling
1987
 
           images.
1988
 
           When this flag is turned on, colors will be loaded for
1989
 
           the viewport as if it were a single viewport of depth
1990
 
           depth1+depth2 }
1991
 
 VC_DUALPF_Disable_Query       =  $80000085;
1992
 
 
1993
 
 
1994
 
const
1995
 
 
1996
 
    SPRITE_ATTACHED     = $80;
1997
 
 
1998
 
type
1999
 
 
2000
 
    pSimpleSprite = ^tSimpleSprite;
2001
 
    tSimpleSprite = record
2002
 
        posctldata      : Pointer;
2003
 
        height          : Word;
2004
 
        x,y             : Word;        { current position }
2005
 
        num             : Word;
2006
 
    end;
2007
 
 
2008
 
    pExtSprite = ^tExtSprite;
2009
 
    tExtSprite = record
2010
 
        es_SimpleSprite : tSimpleSprite;         { conventional simple sprite structure }
2011
 
        es_wordwidth    : WORD;                 { graphics use only, subject to change }
2012
 
        es_flags        : WORD;                 { graphics use only, subject to change }
2013
 
    end;
2014
 
 
2015
 
const
2016
 
{ tags for AllocSpriteData() }
2017
 
 SPRITEA_Width          = $81000000;
2018
 
 SPRITEA_XReplication   = $81000002;
2019
 
 SPRITEA_YReplication   = $81000004;
2020
 
 SPRITEA_OutputHeight   = $81000006;
2021
 
 SPRITEA_Attached       = $81000008;
2022
 
 SPRITEA_OldDataFormat  = $8100000a;      { MUST pass in outputheight if using this tag }
2023
 
 
2024
 
{ tags for GetExtSprite() }
2025
 
 GSTAG_SPRITE_NUM = $82000020;
2026
 
 GSTAG_ATTACHED   = $82000022;
2027
 
 GSTAG_SOFTSPRITE = $82000024;
2028
 
 
2029
 
{ tags valid for either GetExtSprite or ChangeExtSprite }
2030
 
 GSTAG_SCANDOUBLED     =  $83000000;      { request "NTSC-Like" height if possible. }
2031
 
 
2032
 
 
2033
 
Type
2034
 
    pBitScaleArgs = ^tBitScaleArgs;
2035
 
    tBitScaleArgs = record
2036
 
    bsa_SrcX, bsa_SrcY,                 { source origin }
2037
 
    bsa_SrcWidth, bsa_SrcHeight,        { source size }
2038
 
    bsa_XSrcFactor, bsa_YSrcFactor,     { scale factor denominators }
2039
 
    bsa_DestX, bsa_DestY,               { destination origin }
2040
 
    bsa_DestWidth, bsa_DestHeight,      { destination size result }
2041
 
    bsa_XDestFactor, bsa_YDestFactor : Word;   { scale factor numerators }
2042
 
    bsa_SrcBitMap,                           { source BitMap }
2043
 
    bsa_DestBitMap : pBitMap;              { destination BitMap }
2044
 
    bsa_Flags   : ULONG;              { reserved.  Must be zero! }
2045
 
    bsa_XDDA, bsa_YDDA : Word;         { reserved }
2046
 
    bsa_Reserved1,
2047
 
    bsa_Reserved2 : Longint;
2048
 
   END;
2049
 
 
2050
 
  {    tag definitions for GetRPAttr, SetRPAttr     }
2051
 
 
2052
 
const
2053
 
 RPTAG_Font            =  $80000000;      { get/set font }
2054
 
 RPTAG_APen            =  $80000002;      { get/set apen }
2055
 
 RPTAG_BPen            =  $80000003;      { get/set bpen }
2056
 
 RPTAG_DrMd            =  $80000004;      { get/set draw mode }
2057
 
 RPTAG_OutlinePen      =  $80000005;      { get/set outline pen. corrected case. }
2058
 
 RPTAG_WriteMask       =  $80000006;      { get/set WriteMask }
2059
 
 RPTAG_MaxPen          =  $80000007;      { get/set maxpen }
2060
 
 
2061
 
 RPTAG_DrawBounds      =  $80000008;      { get only rastport draw bounds. pass &rect }
2062
 
 
2063
 
 
2064
 
 
2065
 
 
2066
 
TYPE
2067
 
 
2068
 
 pRegionRectangle = ^tRegionRectangle;
2069
 
 tRegionRectangle = record
2070
 
    Next, Prev  : pRegionRectangle;
2071
 
    bounds      : tRectangle;
2072
 
 END;
2073
 
 
2074
 
 pRegion = ^tRegion;
2075
 
 tRegion = record
2076
 
    bounds      : tRectangle;
2077
 
    RegionRectangle  : pRegionRectangle;
2078
 
 END;
2079
 
 
2080
 
type
2081
 
 
2082
 
    pGfxBase = ^tGfxBase;
2083
 
    tGfxBase = record
2084
 
        LibNode         : tLibrary;
2085
 
        ActiView        : pView;      { ViewPtr }
2086
 
        copinit         : pcopinit; { (copinitptr) ptr to copper start up list }
2087
 
        cia             : Pointer;      { for 8520 resource use }
2088
 
        blitter         : Pointer;      { for future blitter resource use }
2089
 
        LOFlist         : Pointer;
2090
 
        SHFlist         : Pointer;
2091
 
        blthd,
2092
 
        blttl           : pbltnode;
2093
 
        bsblthd,
2094
 
        bsblttl         : pbltnode;      { Previous four are (bltnodeptr) }
2095
 
        vbsrv,
2096
 
        timsrv,
2097
 
        bltsrv          : tInterrupt;
2098
 
        TextFonts       : tList;
2099
 
        DefaultFont     : pTextFont;      { TextFontPtr }
2100
 
        Modes           : Word;        { copy of current first bplcon0 }
2101
 
        VBlank          : Shortint;
2102
 
        Debug           : Shortint;
2103
 
        BeamSync        : smallint;
2104
 
        system_bplcon0  : smallint; { it is ored into each bplcon0 for display }
2105
 
        SpriteReserved  : Byte;
2106
 
        bytereserved    : Byte;
2107
 
        Flags           : Word;
2108
 
        BlitLock        : smallint;
2109
 
        BlitNest        : smallint;
2110
 
 
2111
 
        BlitWaitQ       : tList;
2112
 
        BlitOwner       : pTask;      { TaskPtr }
2113
 
        TOF_WaitQ       : tList;
2114
 
        DisplayFlags    : Word;        { NTSC PAL GENLOC etc}
2115
 
 
2116
 
                { Display flags are determined at power on }
2117
 
 
2118
 
        SimpleSprites   : Pointer;      { SimpleSpritePtr ptr }
2119
 
        MaxDisplayRow   : Word;        { hardware stuff, do not use }
2120
 
        MaxDisplayColumn : Word;       { hardware stuff, do not use }
2121
 
        NormalDisplayRows : Word;
2122
 
        NormalDisplayColumns : Word;
2123
 
 
2124
 
        { the following are for standard non interlace, 1/2 wb width }
2125
 
 
2126
 
        NormalDPMX      : Word;        { Dots per meter on display }
2127
 
        NormalDPMY      : Word;        { Dots per meter on display }
2128
 
        LastChanceMemory : pSignalSemaphore;     { SignalSemaphorePtr }
2129
 
        LCMptr          : Pointer;
2130
 
        MicrosPerLine   : Word;        { 256 time usec/line }
2131
 
        MinDisplayColumn : Word;
2132
 
        ChipRevBits0    : Byte;
2133
 
        MemType         : Byte;
2134
 
        crb_reserved  :  Array[0..3] of Byte;
2135
 
        monitor_id  : Word;             { normally null }
2136
 
        hedley  : Array[0..7] of ULONG;
2137
 
        hedley_sprites  : Array[0..7] of ULONG;     { sprite ptrs for intuition mouse }
2138
 
        hedley_sprites1 : Array[0..7] of ULONG;            { sprite ptrs for intuition mouse }
2139
 
        hedley_count    : smallint;
2140
 
        hedley_flags    : Word;
2141
 
        hedley_tmp      : smallint;
2142
 
        hash_table      : Pointer;
2143
 
        current_tot_rows : Word;
2144
 
        current_tot_cclks : Word;
2145
 
        hedley_hint     : Byte;
2146
 
        hedley_hint2    : Byte;
2147
 
        nreserved       : Array[0..3] of ULONG;
2148
 
        a2024_sync_raster : Pointer;
2149
 
        control_delta_pal : Word;
2150
 
        control_delta_ntsc : Word;
2151
 
        current_monitor : pMonitorSpec;
2152
 
        MonitorList     : tList;
2153
 
        default_monitor : pMonitorSpec;
2154
 
        MonitorListSemaphore : pSignalSemaphore;
2155
 
        DisplayInfoDataBase : Pointer;
2156
 
        TopLine      : Word;
2157
 
        ActiViewCprSemaphore : pSignalSemaphore;
2158
 
        UtilityBase  : Pointer;           { for hook AND tag utilities   }
2159
 
        ExecBase     : Pointer;              { to link with rom.lib }
2160
 
        bwshifts     : Pointer;
2161
 
        StrtFetchMasks,
2162
 
        StopFetchMasks,
2163
 
        Overrun,
2164
 
        RealStops    : Pointer;
2165
 
        SpriteWidth,                    { current width (in words) of sprites }
2166
 
        SpriteFMode  : WORD;            { current sprite fmode bits    }
2167
 
        SoftSprites,                    { bit mask of size change knowledgeable sprites }
2168
 
        arraywidth   : Shortint;
2169
 
        DefaultSpriteWidth : WORD;      { what width intuition wants }
2170
 
        SprMoveDisable : Shortint;
2171
 
        WantChips,
2172
 
        BoardMemType,
2173
 
        Bugs         : Byte;
2174
 
        gb_LayersBase : Pointer;
2175
 
        ColorMask    : ULONG;
2176
 
        IVector,
2177
 
        IData        : Pointer;
2178
 
        SpecialCounter : ULONG;         { special for double buffering }
2179
 
        DBList       : Pointer;
2180
 
        MonitorFlags : WORD;
2181
 
        ScanDoubledSprites,
2182
 
        BP3Bits      : Byte;
2183
 
        MonitorVBlank  : tAnalogSignalInterval;
2184
 
        natural_monitor  : pMonitorSpec;
2185
 
        ProgData     : Pointer;
2186
 
        ExtSprites   : Byte;
2187
 
        pad3         : Byte;
2188
 
        GfxFlags     : WORD;
2189
 
        VBCounter    : ULONG;
2190
 
        HashTableSemaphore  : pSignalSemaphore;
2191
 
        HWEmul       : Array[0..8] of Pointer;
2192
 
    end;
2193
 
 
2194
 
const
2195
 
 
2196
 
    NTSC        = 1;
2197
 
    GENLOC      = 2;
2198
 
    PAL         = 4;
2199
 
    TODA_SAFE   = 8;
2200
 
 
2201
 
    BLITMSG_FAULT = 4;
2202
 
 
2203
 
{ bits defs for ChipRevBits }
2204
 
   GFXB_BIG_BLITS = 0 ;
2205
 
   GFXB_HR_AGNUS  = 0 ;
2206
 
   GFXB_HR_DENISE = 1 ;
2207
 
   GFXB_AA_ALICE  = 2 ;
2208
 
   GFXB_AA_LISA   = 3 ;
2209
 
   GFXB_AA_MLISA  = 4 ;      { internal use only. }
2210
 
 
2211
 
   GFXF_BIG_BLITS = 1 ;
2212
 
   GFXF_HR_AGNUS  = 1 ;
2213
 
   GFXF_HR_DENISE = 2 ;
2214
 
   GFXF_AA_ALICE  = 4 ;
2215
 
   GFXF_AA_LISA   = 8 ;
2216
 
   GFXF_AA_MLISA  = 16;      { internal use only }
2217
 
 
2218
 
{ Pass ONE of these to SetChipRev() }
2219
 
   SETCHIPREV_A   = GFXF_HR_AGNUS;
2220
 
   SETCHIPREV_ECS = (GFXF_HR_AGNUS OR GFXF_HR_DENISE);
2221
 
   SETCHIPREV_AA  = (GFXF_AA_ALICE OR GFXF_AA_LISA OR SETCHIPREV_ECS);
2222
 
   SETCHIPREV_BEST= $ffffffff;
2223
 
 
2224
 
{ memory type }
2225
 
   BUS_16         = 0;
2226
 
   NML_CAS        = 0;
2227
 
   BUS_32         = 1;
2228
 
   DBL_CAS        = 2;
2229
 
   BANDWIDTH_1X   = (BUS_16 OR NML_CAS);
2230
 
   BANDWIDTH_2XNML= BUS_32;
2231
 
   BANDWIDTH_2XDBL= DBL_CAS;
2232
 
   BANDWIDTH_4X   = (BUS_32 OR DBL_CAS);
2233
 
 
2234
 
{ GfxFlags (private) }
2235
 
   NEW_DATABASE   = 1;
2236
 
 
2237
 
   GRAPHICSNAME   : PChar  = 'graphics.library';
2238
 
 
2239
 
 
2240
 
var
2241
 
    GfxBase : pLibrary;
2242
 
 
2243
 
PROCEDURE AddAnimOb(anOb : pAnimOb; anKey : ppAnimOb; rp : pRastPort);
2244
 
PROCEDURE AddBob(bob : pBob; rp : pRastPort);
2245
 
PROCEDURE AddFont(textFont : pTextFont);
2246
 
PROCEDURE AddVSprite(vSprite : pVSprite; rp : pRastPort);
2247
 
FUNCTION AllocBitMap(sizex : ULONG; sizey : ULONG; depth : ULONG; flags : ULONG;const friend_bitmap : pBitMap) : pBitMap;
2248
 
FUNCTION AllocDBufInfo(vp : pViewPort) : pDBufInfo;
2249
 
FUNCTION AllocRaster(width : ULONG; height : ULONG) : pCHAR;
2250
 
FUNCTION AllocSpriteDataA(const bm : pBitMap;const tags : pTagItem) : pExtSprite;
2251
 
PROCEDURE AndRectRegion(region : pRegion;const rectangle : pRectangle);
2252
 
FUNCTION AndRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
2253
 
PROCEDURE Animate(anKey : ppAnimOb; rp : pRastPort);
2254
 
FUNCTION AreaDraw(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
2255
 
FUNCTION AreaEllipse(rp : pRastPort; xCenter : LONGINT; yCenter : LONGINT; a : LONGINT; b : LONGINT) : LONGINT;
2256
 
FUNCTION AreaEnd(rp : pRastPort) : LONGINT;
2257
 
FUNCTION AreaMove(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
2258
 
PROCEDURE AskFont(rp : pRastPort; textAttr : pTextAttr);
2259
 
FUNCTION AskSoftStyle(rp : pRastPort) : ULONG;
2260
 
FUNCTION AttachPalExtra(cm : pColorMap; vp : pViewPort) : LONGINT;
2261
 
FUNCTION AttemptLockLayerRom(layer : pLayer) : BOOLEAN;
2262
 
FUNCTION BestModeIDA(const tags : pTagItem) : ULONG;
2263
 
PROCEDURE BitMapScale(bitScaleArgs : pBitScaleArgs);
2264
 
FUNCTION BltBitMap(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destBitMap : pBitMap; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG; mask : ULONG; tempA : pCHAR) : LONGINT;
2265
 
PROCEDURE BltBitMapRastPort(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG);
2266
 
PROCEDURE BltClear(memBlock : pCHAR; byteCount : ULONG; flags : ULONG);
2267
 
PROCEDURE BltMaskBitMapRastPort(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG;const bltMask : pCHAR);
2268
 
PROCEDURE BltPattern(rp : pRastPort;const mask : pCHAR; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT; maskBPR : ULONG);
2269
 
PROCEDURE BltTemplate(const source : pCHAR; xSrc : LONGINT; srcMod : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT);
2270
 
FUNCTION CalcIVG(v : pView; vp : pViewPort) : WORD;
2271
 
PROCEDURE CBump(copList : pUCopList);
2272
 
FUNCTION ChangeExtSpriteA(vp : pViewPort; oldsprite : pExtSprite; newsprite : pExtSprite;const tags : pTagItem) : LONGINT;
2273
 
PROCEDURE ChangeSprite(vp : pViewPort; sprite : pSimpleSprite; newData : pWORD);
2274
 
PROCEDURE ChangeVPBitMap(vp : pViewPort; bm : pBitMap; db : pDBufInfo);
2275
 
PROCEDURE ClearEOL(rp : pRastPort);
2276
 
FUNCTION ClearRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
2277
 
PROCEDURE ClearRegion(region : pRegion);
2278
 
PROCEDURE ClearScreen(rp : pRastPort);
2279
 
PROCEDURE ClipBlit(srcRP : pRastPort; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG);
2280
 
PROCEDURE CloseFont(textFont : pTextFont);
2281
 
FUNCTION CloseMonitor(monitorSpec : pMonitorSpec) : BOOLEAN;
2282
 
PROCEDURE CMove(copList : pUCopList; destination : POINTER; data : LONGINT);
2283
 
FUNCTION CoerceMode(vp : pViewPort; monitorid : ULONG; flags : ULONG) : ULONG;
2284
 
PROCEDURE CopySBitMap(layer : pLayer);
2285
 
PROCEDURE CWait(copList : pUCopList; v : LONGINT; h : LONGINT);
2286
 
PROCEDURE DisownBlitter;
2287
 
PROCEDURE DisposeRegion(region : pRegion);
2288
 
PROCEDURE DoCollision(rp : pRastPort);
2289
 
PROCEDURE Draw(rp : pRastPort; x : LONGINT; y : LONGINT);
2290
 
PROCEDURE DrawEllipse(rp : pRastPort; xCenter : LONGINT; yCenter : LONGINT; a : LONGINT; b : LONGINT);
2291
 
PROCEDURE DrawGList(rp : pRastPort; vp : pViewPort);
2292
 
PROCEDURE EraseRect(rp : pRastPort; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
2293
 
FUNCTION ExtendFont(font : pTextFont;const fontTags : pTagItem) : ULONG;
2294
 
FUNCTION FindColor(cm : pColorMap; r : ULONG; g : ULONG; b : ULONG; maxcolor : LONGINT) : LONGINT;
2295
 
FUNCTION FindDisplayInfo(displayID : ULONG) : POINTER;
2296
 
FUNCTION Flood(rp : pRastPort; mode : ULONG; x : LONGINT; y : LONGINT) : BOOLEAN;
2297
 
PROCEDURE FontExtent(const font : pTextFont; fontExtent : pTextExtent);
2298
 
PROCEDURE FreeBitMap(bm : pBitMap);
2299
 
PROCEDURE FreeColorMap(colorMap : pColorMap);
2300
 
PROCEDURE FreeCopList(copList : pCopList);
2301
 
PROCEDURE FreeCprList(cprList : pcprlist);
2302
 
PROCEDURE FreeDBufInfo(dbi : pDBufInfo);
2303
 
PROCEDURE FreeGBuffers(anOb : pAnimOb; rp : pRastPort; flag : LONGINT);
2304
 
PROCEDURE FreeRaster(p : pCHAR; width : ULONG; height : ULONG);
2305
 
PROCEDURE FreeSprite(num : LONGINT);
2306
 
PROCEDURE FreeSpriteData(sp : pExtSprite);
2307
 
PROCEDURE FreeVPortCopLists(vp : pViewPort);
2308
 
FUNCTION GetAPen(rp : pRastPort) : ULONG;
2309
 
FUNCTION GetBitMapAttr(const bm : pBitMap; attrnum : ULONG) : ULONG;
2310
 
FUNCTION GetBPen(rp : pRastPort) : ULONG;
2311
 
FUNCTION GetColorMap(entries : LONGINT) : pColorMap;
2312
 
FUNCTION GetDisplayInfoData(const handle : POINTER; buf : pCHAR; size : ULONG; tagID : ULONG; displayID : ULONG) : ULONG;
2313
 
FUNCTION GetDrMd(rp : pRastPort) : ULONG;
2314
 
FUNCTION GetExtSpriteA(ss : pExtSprite;const tags : pTagItem) : LONGINT;
2315
 
FUNCTION GetGBuffers(anOb : pAnimOb; rp : pRastPort; flag : LONGINT) : BOOLEAN;
2316
 
FUNCTION GetOutlinePen(rp : pRastPort) : ULONG;
2317
 
PROCEDURE GetRGB32(const cm : pColorMap; firstcolor : ULONG; ncolors : ULONG; table : pulong);
2318
 
FUNCTION GetRGB4(colorMap : pColorMap; entry : LONGINT) : ULONG;
2319
 
PROCEDURE GetRPAttrsA(const rp : pRastPort;const tags : pTagItem);
2320
 
FUNCTION GetSprite(sprite : pSimpleSprite; num : LONGINT) : smallint;
2321
 
FUNCTION GetVPModeID(const vp : pViewPort) : LONGINT;
2322
 
PROCEDURE GfxAssociate(const associateNode : POINTER; gfxNodePtr : POINTER);
2323
 
PROCEDURE GfxFree(gfxNodePtr : POINTER);
2324
 
FUNCTION GfxLookUp(const associateNode : POINTER) : POINTER;
2325
 
FUNCTION GfxNew(gfxNodeType : ULONG) : POINTER;
2326
 
PROCEDURE InitArea(areaInfo : pAreaInfo; vectorBuffer : POINTER; maxVectors : LONGINT);
2327
 
PROCEDURE InitBitMap(bitMap : pBitMap; depth : LONGINT; width : LONGINT; height : LONGINT);
2328
 
PROCEDURE InitGels(head : pVSprite; tail : pVSprite; gelsInfo : pGelsInfo);
2329
 
PROCEDURE InitGMasks(anOb : pAnimOb);
2330
 
PROCEDURE InitMasks(vSprite : pVSprite);
2331
 
PROCEDURE InitRastPort(rp : pRastPort);
2332
 
FUNCTION InitTmpRas(tmpRas : pTmpRas; buffer : PLANEPTR; size : LONGINT) : pTmpRas;
2333
 
PROCEDURE InitView(view : pView);
2334
 
PROCEDURE InitVPort(vp : pViewPort);
2335
 
PROCEDURE LoadRGB32(vp : pViewPort;const table : pULONG);
2336
 
PROCEDURE LoadRGB4(vp : pViewPort;const colors : pWord; count : LONGINT);
2337
 
PROCEDURE LoadView(view : pView);
2338
 
PROCEDURE LockLayerRom(layer : pLayer);
2339
 
FUNCTION MakeVPort(view : pView; vp : pViewPort) : ULONG;
2340
 
FUNCTION ModeNotAvailable(modeID : ULONG) : LONGINT;
2341
 
PROCEDURE Move(rp : pRastPort; x : LONGINT; y : LONGINT);
2342
 
PROCEDURE MoveSprite(vp : pViewPort; sprite : pSimpleSprite; x : LONGINT; y : LONGINT);
2343
 
FUNCTION MrgCop(view : pView) : ULONG;
2344
 
FUNCTION NewRegion : pRegion;
2345
 
FUNCTION NextDisplayInfo(displayID : ULONG) : ULONG;
2346
 
FUNCTION ObtainBestPenA(cm : pColorMap; r : ULONG; g : ULONG; b : ULONG;const tags : pTagItem) : LONGINT;
2347
 
FUNCTION ObtainPen(cm : pColorMap; n : ULONG; r : ULONG; g : ULONG; b : ULONG; f : LONGINT) : ULONG;
2348
 
FUNCTION OpenFont(textAttr : pTextAttr) : pTextFont;
2349
 
FUNCTION OpenMonitor(const monitorName : pCHAR; displayID : ULONG) : pMonitorSpec;
2350
 
FUNCTION OrRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
2351
 
FUNCTION OrRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
2352
 
PROCEDURE OwnBlitter;
2353
 
PROCEDURE PolyDraw(rp : pRastPort; count : LONGINT;const polyTable : pLongint);
2354
 
PROCEDURE QBlit(blit : pbltnode);
2355
 
PROCEDURE QBSBlit(blit : pbltnode);
2356
 
FUNCTION ReadPixel(rp : pRastPort; x : LONGINT; y : LONGINT) : ULONG;
2357
 
FUNCTION ReadPixelArray8(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; temprp : pRastPort) : LONGINT;
2358
 
FUNCTION ReadPixelLine8(rp : pRastPort; xstart : ULONG; ystart : ULONG; width : ULONG; array_ : pointer; tempRP : pRastPort) : LONGINT;
2359
 
PROCEDURE RectFill(rp : pRastPort; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
2360
 
PROCEDURE ReleasePen(cm : pColorMap; n : ULONG);
2361
 
PROCEDURE RemFont(textFont : pTextFont);
2362
 
PROCEDURE RemIBob(bob : pBob; rp : pRastPort; vp : pViewPort);
2363
 
PROCEDURE RemVSprite(vSprite : pVSprite);
2364
 
FUNCTION ScalerDiv(factor : ULONG; numerator : ULONG; denominator : ULONG) : WORD;
2365
 
PROCEDURE ScrollRaster(rp : pRastPort; dx : LONGINT; dy : LONGINT; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
2366
 
PROCEDURE ScrollRasterBF(rp : pRastPort; dx : LONGINT; dy : LONGINT; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
2367
 
PROCEDURE ScrollVPort(vp : pViewPort);
2368
 
PROCEDURE SetABPenDrMd(rp : pRastPort; apen : ULONG; bpen : ULONG; drawmode : ULONG);
2369
 
PROCEDURE SetAPen(rp : pRastPort; pen : ULONG);
2370
 
PROCEDURE SetBPen(rp : pRastPort; pen : ULONG);
2371
 
FUNCTION SetChipRev(want : ULONG) : ULONG;
2372
 
PROCEDURE SetCollision(num : ULONG; routine : tPROCEDURE; gelsInfo : pGelsInfo);
2373
 
PROCEDURE SetDrMd(rp : pRastPort; drawMode : ULONG);
2374
 
FUNCTION SetFont(rp : pRastPort;const textFont : pTextFont) : LONGINT;
2375
 
PROCEDURE SetMaxPen(rp : pRastPort; maxpen : ULONG);
2376
 
FUNCTION SetOutlinePen(rp : pRastPort; pen : ULONG) : ULONG;
2377
 
PROCEDURE SetRast(rp : pRastPort; pen : ULONG);
2378
 
PROCEDURE SetRGB32(vp : pViewPort; n : ULONG; r : ULONG; g : ULONG; b : ULONG);
2379
 
PROCEDURE SetRGB32CM(cm : pColorMap; n : ULONG; r : ULONG; g : ULONG; b : ULONG);
2380
 
PROCEDURE SetRGB4(vp : pViewPort; index : LONGINT; red : ULONG; green : ULONG; blue : ULONG);
2381
 
PROCEDURE SetRGB4CM(colorMap : pColorMap; index : LONGINT; red : ULONG; green : ULONG; blue : ULONG);
2382
 
PROCEDURE SetRPAttrsA(rp : pRastPort;const tags : pTagItem);
2383
 
FUNCTION SetSoftStyle(rp : pRastPort; style : ULONG; enable : ULONG) : ULONG;
2384
 
FUNCTION SetWriteMask(rp : pRastPort; msk : ULONG) : ULONG;
2385
 
PROCEDURE SortGList(rp : pRastPort);
2386
 
PROCEDURE StripFont(font : pTextFont);
2387
 
PROCEDURE SyncSBitMap(layer : pLayer);
2388
 
FUNCTION GText(rp : pRastPort;const string_ : pCHAR; count : ULONG) : LONGINT;
2389
 
FUNCTION TextExtent(rp : pRastPort;const string_ : pCHAR; count : LONGINT; _textExtent : pTextExtent) : smallint;
2390
 
FUNCTION TextFit(rp : pRastPort;const string_ : pCHAR; strLen : ULONG; textExtent : pTextExtent; constrainingExtent : pTextExtent; strDirection : LONGINT; constrainingBitWidth : ULONG; constrainingBitHeight : ULONG) : ULONG;
2391
 
FUNCTION TextLength(rp : pRastPort;const string_ : pCHAR; count : ULONG) : smallint;
2392
 
FUNCTION UCopperListInit(uCopList : pUCopList; n : LONGINT) : pCopList;
2393
 
PROCEDURE UnlockLayerRom(layer : pLayer);
2394
 
FUNCTION VBeamPos : LONGINT;
2395
 
FUNCTION VideoControl(colorMap : pColorMap; tagarray : pTagItem) : BOOLEAN;
2396
 
PROCEDURE WaitBlit;
2397
 
PROCEDURE WaitBOVP(vp : pViewPort);
2398
 
PROCEDURE WaitTOF;
2399
 
FUNCTION WeighTAMatch(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : pTagItem) : smallint;
2400
 
PROCEDURE WriteChunkyPixels(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; bytesperrow : LONGINT);
2401
 
FUNCTION WritePixel(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
2402
 
FUNCTION WritePixelArray8(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; temprp : pRastPort) : LONGINT;
2403
 
FUNCTION WritePixelLine8(rp : pRastPort; xstart : ULONG; ystart : ULONG; width : ULONG; array_ : pointer; tempRP : pRastPort) : LONGINT;
2404
 
FUNCTION XorRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
2405
 
FUNCTION XorRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
2406
 
 
2407
 
{ gfxmacros }
2408
 
 
2409
 
PROCEDURE BNDRYOFF (w: pRastPort);
2410
 
PROCEDURE InitAnimate (animkey: ppAnimOb);
2411
 
PROCEDURE SetAfPt(w: pRastPort;p: Pointer; n: Byte);
2412
 
PROCEDURE SetDrPt(w: pRastPort;p: Word);
2413
 
PROCEDURE SetOPen(w: pRastPort;c: Byte);
2414
 
PROCEDURE SetWrMsk(w: pRastPort; m: Byte);
2415
 
 
2416
 
PROCEDURE SafeSetOutlinePen(w : pRastPort; c : byte);
2417
 
PROCEDURE SafeSetWriteMask( w : pRastPort ; m : smallint ) ;
2418
 
 
2419
 
PROCEDURE OFF_DISPLAY (cust: pCustom);
2420
 
PROCEDURE ON_DISPLAY (cust: pCustom);
2421
 
PROCEDURE OFF_SPRITE (cust: pCustom);
2422
 
PROCEDURE ON_SPRITE (cust: pCustom);
2423
 
PROCEDURE OFF_VBLANK (cust: pCustom);
2424
 
PROCEDURE ON_VBLANK (cust: pCustom);
2425
 
 
2426
 
{Here we read how to compile this unit}
2427
 
{You can remove this include and use a define instead}
2428
 
{$I useautoopenlib.inc}
2429
 
{$ifdef use_init_openlib}
2430
 
procedure InitGRAPHICSLibrary;
2431
 
{$endif use_init_openlib}
2432
 
 
2433
 
{This is a variable that knows how the unit is compiled}
2434
 
var
2435
 
    GRAPHICSIsCompiledHow : longint;
2436
 
 
2437
 
IMPLEMENTATION
2438
 
 
2439
 
uses
2440
 
{$ifndef dont_use_openlib}
2441
 
msgbox;
2442
 
{$endif dont_use_openlib}
2443
 
 
2444
 
PROCEDURE BNDRYOFF (w: pRastPort);
2445
 
BEGIN
2446
 
    WITH w^ DO BEGIN
2447
 
        Flags := Flags AND (NOT AREAOUTLINE);
2448
 
    END;
2449
 
END;
2450
 
 
2451
 
PROCEDURE InitAnimate (animkey: ppAnimOb);
2452
 
BEGIN
2453
 
    animkey^ := NIL;
2454
 
END;
2455
 
 
2456
 
PROCEDURE SetAfPt(w: pRastPort;p: Pointer; n: Byte);
2457
 
BEGIN
2458
 
    WITH w^ DO
2459
 
    BEGIN
2460
 
        AreaPtrn := p;
2461
 
        AreaPtSz := n;
2462
 
    END;
2463
 
END;
2464
 
 
2465
 
PROCEDURE SetDrPt(w: pRastPort;p: Word);
2466
 
BEGIN
2467
 
    WITH w^ DO
2468
 
    BEGIN
2469
 
        LinePtrn    := p;
2470
 
        Flags       := Flags OR FRST_DOT;
2471
 
        linpatcnt   := 15;
2472
 
    END;
2473
 
END;
2474
 
 
2475
 
PROCEDURE SetOPen(w: pRastPort;c: Byte);
2476
 
BEGIN
2477
 
    WITH w^ DO
2478
 
    BEGIN
2479
 
        AOlPen  := c;
2480
 
        Flags   := Flags OR AREAOUTLINE;
2481
 
    END;
2482
 
END;
2483
 
 
2484
 
{ This FUNCTION is fine, but FOR OS39 the SetWriteMask() gfx FUNCTION
2485
 
  should be prefered because it SHOULD operate WITH gfx boards as well.
2486
 
  At least I hope it does.... }
2487
 
PROCEDURE SetWrMsk(w: pRastPort; m: Byte);
2488
 
BEGIN
2489
 
    w^.Mask := m;
2490
 
END;
2491
 
 
2492
 
PROCEDURE SafeSetOutlinePen(w : pRastPort; c : byte);
2493
 
begin
2494
 
    IF pGfxBase(GfxBase)^.LibNode.Lib_Version < 39 THEN begin
2495
 
        w^.AOlPen := c;
2496
 
        w^.Flags := w^.Flags OR AREAOUTLINE;
2497
 
    END ELSE begin
2498
 
        c := SetOutlinePen(w,c);
2499
 
    END;
2500
 
END;
2501
 
 
2502
 
PROCEDURE SafeSetWriteMask( w : pRastPort ; m : smallint ) ;
2503
 
  VAR x : smallint ;
2504
 
BEGIN
2505
 
  IF pGfxBase(GfxBase)^.LibNode.Lib_Version < 39 THEN w^.Mask := BYTE(m)
2506
 
  ELSE x := SetWriteMask( w, m );
2507
 
END;
2508
 
 
2509
 
PROCEDURE OFF_DISPLAY (cust: pCustom);
2510
 
BEGIN
2511
 
    cust^.dmacon := BITCLR OR DMAF_RASTER;
2512
 
END;
2513
 
 
2514
 
PROCEDURE ON_DISPLAY (cust: pCustom);
2515
 
BEGIN
2516
 
    cust^.dmacon := BITSET OR DMAF_RASTER;
2517
 
END;
2518
 
 
2519
 
PROCEDURE OFF_SPRITE (cust: pCustom);
2520
 
BEGIN
2521
 
    cust^.dmacon := BITCLR OR DMAF_SPRITE;
2522
 
END;
2523
 
 
2524
 
PROCEDURE ON_SPRITE (cust: pCustom);
2525
 
BEGIN
2526
 
    cust^.dmacon := BITSET OR DMAF_SPRITE;
2527
 
END;
2528
 
 
2529
 
PROCEDURE OFF_VBLANK (cust: pCustom);
2530
 
BEGIN
2531
 
    cust^.intena := BITCLR OR INTF_VERTB;
2532
 
END;
2533
 
 
2534
 
PROCEDURE ON_VBLANK (cust: pCustom);
2535
 
BEGIN
2536
 
    cust^.intena := BITSET OR INTF_VERTB;
2537
 
END;
2538
 
 
2539
 
PROCEDURE AddAnimOb(anOb : pAnimOb; anKey : ppAnimOb; rp : pRastPort);
2540
 
BEGIN
2541
 
  ASM
2542
 
    MOVE.L  A6,-(A7)
2543
 
    MOVEA.L anOb,A0
2544
 
    MOVEA.L anKey,A1
2545
 
    MOVEA.L rp,A2
2546
 
    MOVEA.L GfxBase,A6
2547
 
    JSR -156(A6)
2548
 
    MOVEA.L (A7)+,A6
2549
 
  END;
2550
 
END;
2551
 
 
2552
 
PROCEDURE AddBob(bob : pBob; rp : pRastPort);
2553
 
BEGIN
2554
 
  ASM
2555
 
    MOVE.L  A6,-(A7)
2556
 
    MOVEA.L bob,A0
2557
 
    MOVEA.L rp,A1
2558
 
    MOVEA.L GfxBase,A6
2559
 
    JSR -096(A6)
2560
 
    MOVEA.L (A7)+,A6
2561
 
  END;
2562
 
END;
2563
 
 
2564
 
PROCEDURE AddFont(textFont : pTextFont);
2565
 
BEGIN
2566
 
  ASM
2567
 
    MOVE.L  A6,-(A7)
2568
 
    MOVEA.L textFont,A1
2569
 
    MOVEA.L GfxBase,A6
2570
 
    JSR -480(A6)
2571
 
    MOVEA.L (A7)+,A6
2572
 
  END;
2573
 
END;
2574
 
 
2575
 
PROCEDURE AddVSprite(vSprite : pVSprite; rp : pRastPort);
2576
 
BEGIN
2577
 
  ASM
2578
 
    MOVE.L  A6,-(A7)
2579
 
    MOVEA.L vSprite,A0
2580
 
    MOVEA.L rp,A1
2581
 
    MOVEA.L GfxBase,A6
2582
 
    JSR -102(A6)
2583
 
    MOVEA.L (A7)+,A6
2584
 
  END;
2585
 
END;
2586
 
 
2587
 
FUNCTION AllocBitMap(sizex : ULONG; sizey : ULONG; depth : ULONG; flags : ULONG;const friend_bitmap : pBitMap) : pBitMap;
2588
 
BEGIN
2589
 
  ASM
2590
 
    MOVE.L  A6,-(A7)
2591
 
    MOVE.L  sizex,D0
2592
 
    MOVE.L  sizey,D1
2593
 
    MOVE.L  depth,D2
2594
 
    MOVE.L  flags,D3
2595
 
    MOVEA.L friend_bitmap,A0
2596
 
    MOVEA.L GfxBase,A6
2597
 
    JSR -918(A6)
2598
 
    MOVEA.L (A7)+,A6
2599
 
    MOVE.L  D0,@RESULT
2600
 
  END;
2601
 
END;
2602
 
 
2603
 
FUNCTION AllocDBufInfo(vp : pViewPort) : pDBufInfo;
2604
 
BEGIN
2605
 
  ASM
2606
 
    MOVE.L  A6,-(A7)
2607
 
    MOVEA.L vp,A0
2608
 
    MOVEA.L GfxBase,A6
2609
 
    JSR -966(A6)
2610
 
    MOVEA.L (A7)+,A6
2611
 
    MOVE.L  D0,@RESULT
2612
 
  END;
2613
 
END;
2614
 
 
2615
 
FUNCTION AllocRaster(width : ULONG; height : ULONG) : pCHAR;
2616
 
BEGIN
2617
 
  ASM
2618
 
    MOVE.L  A6,-(A7)
2619
 
    MOVE.L  width,D0
2620
 
    MOVE.L  height,D1
2621
 
    MOVEA.L GfxBase,A6
2622
 
    JSR -492(A6)
2623
 
    MOVEA.L (A7)+,A6
2624
 
    MOVE.L  D0,@RESULT
2625
 
  END;
2626
 
END;
2627
 
 
2628
 
FUNCTION AllocSpriteDataA(const bm : pBitMap;const tags : pTagItem) : pExtSprite;
2629
 
BEGIN
2630
 
  ASM
2631
 
    MOVE.L  A6,-(A7)
2632
 
    MOVEA.L bm,A2
2633
 
    MOVEA.L tags,A1
2634
 
    MOVEA.L GfxBase,A6
2635
 
    JSR -1020(A6)
2636
 
    MOVEA.L (A7)+,A6
2637
 
    MOVE.L  D0,@RESULT
2638
 
  END;
2639
 
END;
2640
 
 
2641
 
PROCEDURE AndRectRegion(region : pRegion;const rectangle : pRectangle);
2642
 
BEGIN
2643
 
  ASM
2644
 
    MOVE.L  A6,-(A7)
2645
 
    MOVEA.L region,A0
2646
 
    MOVEA.L rectangle,A1
2647
 
    MOVEA.L GfxBase,A6
2648
 
    JSR -504(A6)
2649
 
    MOVEA.L (A7)+,A6
2650
 
  END;
2651
 
END;
2652
 
 
2653
 
FUNCTION AndRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
2654
 
BEGIN
2655
 
  ASM
2656
 
    MOVE.L  A6,-(A7)
2657
 
    MOVEA.L srcRegion,A0
2658
 
    MOVEA.L destRegion,A1
2659
 
    MOVEA.L GfxBase,A6
2660
 
    JSR -624(A6)
2661
 
    MOVEA.L (A7)+,A6
2662
 
    TST.W   D0
2663
 
    BEQ.B   @end
2664
 
    MOVEQ   #1,D0
2665
 
  @end: MOVE.B  D0,@RESULT
2666
 
  END;
2667
 
END;
2668
 
 
2669
 
PROCEDURE Animate(anKey : ppAnimOb; rp : pRastPort);
2670
 
BEGIN
2671
 
  ASM
2672
 
    MOVE.L  A6,-(A7)
2673
 
    MOVEA.L anKey,A0
2674
 
    MOVEA.L rp,A1
2675
 
    MOVEA.L GfxBase,A6
2676
 
    JSR -162(A6)
2677
 
    MOVEA.L (A7)+,A6
2678
 
  END;
2679
 
END;
2680
 
 
2681
 
FUNCTION AreaDraw(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
2682
 
BEGIN
2683
 
  ASM
2684
 
    MOVE.L  A6,-(A7)
2685
 
    MOVEA.L rp,A1
2686
 
    MOVE.L  x,D0
2687
 
    MOVE.L  y,D1
2688
 
    MOVEA.L GfxBase,A6
2689
 
    JSR -258(A6)
2690
 
    MOVEA.L (A7)+,A6
2691
 
    MOVE.L  D0,@RESULT
2692
 
  END;
2693
 
END;
2694
 
 
2695
 
FUNCTION AreaEllipse(rp : pRastPort; xCenter : LONGINT; yCenter : LONGINT; a : LONGINT; b : LONGINT) : LONGINT;
2696
 
BEGIN
2697
 
  ASM
2698
 
    MOVE.L  A6,-(A7)
2699
 
    MOVEA.L rp,A1
2700
 
    MOVE.L  xCenter,D0
2701
 
    MOVE.L  yCenter,D1
2702
 
    MOVE.L  a,D2
2703
 
    MOVE.L  b,D3
2704
 
    MOVEA.L GfxBase,A6
2705
 
    JSR -186(A6)
2706
 
    MOVEA.L (A7)+,A6
2707
 
    MOVE.L  D0,@RESULT
2708
 
  END;
2709
 
END;
2710
 
 
2711
 
FUNCTION AreaEnd(rp : pRastPort) : LONGINT;
2712
 
BEGIN
2713
 
  ASM
2714
 
    MOVE.L  A6,-(A7)
2715
 
    MOVEA.L rp,A1
2716
 
    MOVEA.L GfxBase,A6
2717
 
    JSR -264(A6)
2718
 
    MOVEA.L (A7)+,A6
2719
 
    MOVE.L  D0,@RESULT
2720
 
  END;
2721
 
END;
2722
 
 
2723
 
FUNCTION AreaMove(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
2724
 
BEGIN
2725
 
  ASM
2726
 
    MOVE.L  A6,-(A7)
2727
 
    MOVEA.L rp,A1
2728
 
    MOVE.L  x,D0
2729
 
    MOVE.L  y,D1
2730
 
    MOVEA.L GfxBase,A6
2731
 
    JSR -252(A6)
2732
 
    MOVEA.L (A7)+,A6
2733
 
    MOVE.L  D0,@RESULT
2734
 
  END;
2735
 
END;
2736
 
 
2737
 
PROCEDURE AskFont(rp : pRastPort; textAttr : pTextAttr);
2738
 
BEGIN
2739
 
  ASM
2740
 
    MOVE.L  A6,-(A7)
2741
 
    MOVEA.L rp,A1
2742
 
    MOVEA.L textAttr,A0
2743
 
    MOVEA.L GfxBase,A6
2744
 
    JSR -474(A6)
2745
 
    MOVEA.L (A7)+,A6
2746
 
  END;
2747
 
END;
2748
 
 
2749
 
FUNCTION AskSoftStyle(rp : pRastPort) : ULONG;
2750
 
BEGIN
2751
 
  ASM
2752
 
    MOVE.L  A6,-(A7)
2753
 
    MOVEA.L rp,A1
2754
 
    MOVEA.L GfxBase,A6
2755
 
    JSR -084(A6)
2756
 
    MOVEA.L (A7)+,A6
2757
 
    MOVE.L  D0,@RESULT
2758
 
  END;
2759
 
END;
2760
 
 
2761
 
FUNCTION AttachPalExtra(cm : pColorMap; vp : pViewPort) : LONGINT;
2762
 
BEGIN
2763
 
  ASM
2764
 
    MOVE.L  A6,-(A7)
2765
 
    MOVEA.L cm,A0
2766
 
    MOVEA.L vp,A1
2767
 
    MOVEA.L GfxBase,A6
2768
 
    JSR -834(A6)
2769
 
    MOVEA.L (A7)+,A6
2770
 
    MOVE.L  D0,@RESULT
2771
 
  END;
2772
 
END;
2773
 
 
2774
 
FUNCTION AttemptLockLayerRom(layer : pLayer) : BOOLEAN;
2775
 
BEGIN
2776
 
  ASM
2777
 
    MOVE.L  A6,-(A7)
2778
 
    MOVEA.L layer,A5
2779
 
    MOVEA.L GfxBase,A6
2780
 
    JSR -654(A6)
2781
 
    MOVEA.L (A7)+,A6
2782
 
    TST.W   D0
2783
 
    BEQ.B   @end
2784
 
    MOVEQ   #1,D0
2785
 
  @end: MOVE.B  D0,@RESULT
2786
 
  END;
2787
 
END;
2788
 
 
2789
 
FUNCTION BestModeIDA(const tags : pTagItem) : ULONG;
2790
 
BEGIN
2791
 
  ASM
2792
 
    MOVE.L  A6,-(A7)
2793
 
    MOVEA.L tags,A0
2794
 
    MOVEA.L GfxBase,A6
2795
 
    JSR -1050(A6)
2796
 
    MOVEA.L (A7)+,A6
2797
 
    MOVE.L  D0,@RESULT
2798
 
  END;
2799
 
END;
2800
 
 
2801
 
PROCEDURE BitMapScale(bitScaleArgs : pBitScaleArgs);
2802
 
BEGIN
2803
 
  ASM
2804
 
    MOVE.L  A6,-(A7)
2805
 
    MOVEA.L bitScaleArgs,A0
2806
 
    MOVEA.L GfxBase,A6
2807
 
    JSR -678(A6)
2808
 
    MOVEA.L (A7)+,A6
2809
 
  END;
2810
 
END;
2811
 
 
2812
 
FUNCTION BltBitMap(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destBitMap : pBitMap; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG; mask : ULONG; tempA : pCHAR) : LONGINT;
2813
 
BEGIN
2814
 
  ASM
2815
 
    MOVE.L  A6,-(A7)
2816
 
    MOVEA.L srcBitMap,A0
2817
 
    MOVE.L  xSrc,D0
2818
 
    MOVE.L  ySrc,D1
2819
 
    MOVEA.L destBitMap,A1
2820
 
    MOVE.L  xDest,D2
2821
 
    MOVE.L  yDest,D3
2822
 
    MOVE.L  xSize,D4
2823
 
    MOVE.L  ySize,D5
2824
 
    MOVE.L  minterm,D6
2825
 
    MOVE.L  mask,D7
2826
 
    MOVEA.L tempA,A2
2827
 
    MOVEA.L GfxBase,A6
2828
 
    JSR -030(A6)
2829
 
    MOVEA.L (A7)+,A6
2830
 
    MOVE.L  D0,@RESULT
2831
 
  END;
2832
 
END;
2833
 
 
2834
 
PROCEDURE BltBitMapRastPort(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG);
2835
 
BEGIN
2836
 
  ASM
2837
 
    MOVE.L  A6,-(A7)
2838
 
    MOVEA.L srcBitMap,A0
2839
 
    MOVE.L  xSrc,D0
2840
 
    MOVE.L  ySrc,D1
2841
 
    MOVEA.L destRP,A1
2842
 
    MOVE.L  xDest,D2
2843
 
    MOVE.L  yDest,D3
2844
 
    MOVE.L  xSize,D4
2845
 
    MOVE.L  ySize,D5
2846
 
    MOVE.L  minterm,D6
2847
 
    MOVEA.L GfxBase,A6
2848
 
    JSR -606(A6)
2849
 
    MOVEA.L (A7)+,A6
2850
 
  END;
2851
 
END;
2852
 
 
2853
 
PROCEDURE BltClear(memBlock : pCHAR; byteCount : ULONG; flags : ULONG);
2854
 
BEGIN
2855
 
  ASM
2856
 
    MOVE.L  A6,-(A7)
2857
 
    MOVEA.L memBlock,A1
2858
 
    MOVE.L  byteCount,D0
2859
 
    MOVE.L  flags,D1
2860
 
    MOVEA.L GfxBase,A6
2861
 
    JSR -300(A6)
2862
 
    MOVEA.L (A7)+,A6
2863
 
  END;
2864
 
END;
2865
 
 
2866
 
PROCEDURE BltMaskBitMapRastPort(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG;const bltMask : pCHAR);
2867
 
BEGIN
2868
 
  ASM
2869
 
    MOVE.L  A6,-(A7)
2870
 
    MOVEA.L srcBitMap,A0
2871
 
    MOVE.L  xSrc,D0
2872
 
    MOVE.L  ySrc,D1
2873
 
    MOVEA.L destRP,A1
2874
 
    MOVE.L  xDest,D2
2875
 
    MOVE.L  yDest,D3
2876
 
    MOVE.L  xSize,D4
2877
 
    MOVE.L  ySize,D5
2878
 
    MOVE.L  minterm,D6
2879
 
    MOVEA.L bltMask,A2
2880
 
    MOVEA.L GfxBase,A6
2881
 
    JSR -636(A6)
2882
 
    MOVEA.L (A7)+,A6
2883
 
  END;
2884
 
END;
2885
 
 
2886
 
PROCEDURE BltPattern(rp : pRastPort;const mask : pCHAR; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT; maskBPR : ULONG);
2887
 
BEGIN
2888
 
  ASM
2889
 
    MOVE.L  A6,-(A7)
2890
 
    MOVEA.L rp,A1
2891
 
    MOVEA.L mask,A0
2892
 
    MOVE.L  xMin,D0
2893
 
    MOVE.L  yMin,D1
2894
 
    MOVE.L  xMax,D2
2895
 
    MOVE.L  yMax,D3
2896
 
    MOVE.L  maskBPR,D4
2897
 
    MOVEA.L GfxBase,A6
2898
 
    JSR -312(A6)
2899
 
    MOVEA.L (A7)+,A6
2900
 
  END;
2901
 
END;
2902
 
 
2903
 
PROCEDURE BltTemplate(const source : pCHAR; xSrc : LONGINT; srcMod : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT);
2904
 
BEGIN
2905
 
  ASM
2906
 
    MOVE.L  A6,-(A7)
2907
 
    MOVEA.L source,A0
2908
 
    MOVE.L  xSrc,D0
2909
 
    MOVE.L  srcMod,D1
2910
 
    MOVEA.L destRP,A1
2911
 
    MOVE.L  xDest,D2
2912
 
    MOVE.L  yDest,D3
2913
 
    MOVE.L  xSize,D4
2914
 
    MOVE.L  ySize,D5
2915
 
    MOVEA.L GfxBase,A6
2916
 
    JSR -036(A6)
2917
 
    MOVEA.L (A7)+,A6
2918
 
  END;
2919
 
END;
2920
 
 
2921
 
FUNCTION CalcIVG(v : pView; vp : pViewPort) : WORD;
2922
 
BEGIN
2923
 
  ASM
2924
 
    MOVE.L  A6,-(A7)
2925
 
    MOVEA.L v,A0
2926
 
    MOVEA.L vp,A1
2927
 
    MOVEA.L GfxBase,A6
2928
 
    JSR -828(A6)
2929
 
    MOVEA.L (A7)+,A6
2930
 
    MOVE.L  D0,@RESULT
2931
 
  END;
2932
 
END;
2933
 
 
2934
 
PROCEDURE CBump(copList : pUCopList);
2935
 
BEGIN
2936
 
  ASM
2937
 
    MOVE.L  A6,-(A7)
2938
 
    MOVEA.L copList,A1
2939
 
    MOVEA.L GfxBase,A6
2940
 
    JSR -366(A6)
2941
 
    MOVEA.L (A7)+,A6
2942
 
  END;
2943
 
END;
2944
 
 
2945
 
FUNCTION ChangeExtSpriteA(vp : pViewPort; oldsprite : pExtSprite; newsprite : pExtSprite;const tags : pTagItem) : LONGINT;
2946
 
BEGIN
2947
 
  ASM
2948
 
    MOVE.L  A6,-(A7)
2949
 
    MOVEA.L vp,A0
2950
 
    MOVEA.L oldsprite,A1
2951
 
    MOVEA.L newsprite,A2
2952
 
    MOVEA.L tags,A3
2953
 
    MOVEA.L GfxBase,A6
2954
 
    JSR -1026(A6)
2955
 
    MOVEA.L (A7)+,A6
2956
 
    MOVE.L  D0,@RESULT
2957
 
  END;
2958
 
END;
2959
 
 
2960
 
PROCEDURE ChangeSprite(vp : pViewPort; sprite : pSimpleSprite; newData : pWORD);
2961
 
BEGIN
2962
 
  ASM
2963
 
    MOVE.L  A6,-(A7)
2964
 
    MOVEA.L vp,A0
2965
 
    MOVEA.L sprite,A1
2966
 
    MOVEA.L newData,A2
2967
 
    MOVEA.L GfxBase,A6
2968
 
    JSR -420(A6)
2969
 
    MOVEA.L (A7)+,A6
2970
 
  END;
2971
 
END;
2972
 
 
2973
 
PROCEDURE ChangeVPBitMap(vp : pViewPort; bm : pBitMap; db : pDBufInfo);
2974
 
BEGIN
2975
 
  ASM
2976
 
    MOVE.L  A6,-(A7)
2977
 
    MOVEA.L vp,A0
2978
 
    MOVEA.L bm,A1
2979
 
    MOVEA.L db,A2
2980
 
    MOVEA.L GfxBase,A6
2981
 
    JSR -942(A6)
2982
 
    MOVEA.L (A7)+,A6
2983
 
  END;
2984
 
END;
2985
 
 
2986
 
PROCEDURE ClearEOL(rp : pRastPort);
2987
 
BEGIN
2988
 
  ASM
2989
 
    MOVE.L  A6,-(A7)
2990
 
    MOVEA.L rp,A1
2991
 
    MOVEA.L GfxBase,A6
2992
 
    JSR -042(A6)
2993
 
    MOVEA.L (A7)+,A6
2994
 
  END;
2995
 
END;
2996
 
 
2997
 
FUNCTION ClearRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
2998
 
BEGIN
2999
 
  ASM
3000
 
    MOVE.L  A6,-(A7)
3001
 
    MOVEA.L region,A0
3002
 
    MOVEA.L rectangle,A1
3003
 
    MOVEA.L GfxBase,A6
3004
 
    JSR -522(A6)
3005
 
    MOVEA.L (A7)+,A6
3006
 
    TST.W   D0
3007
 
    BEQ.B   @end
3008
 
    MOVEQ   #1,D0
3009
 
  @end: MOVE.B  D0,@RESULT
3010
 
  END;
3011
 
END;
3012
 
 
3013
 
PROCEDURE ClearRegion(region : pRegion);
3014
 
BEGIN
3015
 
  ASM
3016
 
    MOVE.L  A6,-(A7)
3017
 
    MOVEA.L region,A0
3018
 
    MOVEA.L GfxBase,A6
3019
 
    JSR -528(A6)
3020
 
    MOVEA.L (A7)+,A6
3021
 
  END;
3022
 
END;
3023
 
 
3024
 
PROCEDURE ClearScreen(rp : pRastPort);
3025
 
BEGIN
3026
 
  ASM
3027
 
    MOVE.L  A6,-(A7)
3028
 
    MOVEA.L rp,A1
3029
 
    MOVEA.L GfxBase,A6
3030
 
    JSR -048(A6)
3031
 
    MOVEA.L (A7)+,A6
3032
 
  END;
3033
 
END;
3034
 
 
3035
 
PROCEDURE ClipBlit(srcRP : pRastPort; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG);
3036
 
BEGIN
3037
 
  ASM
3038
 
    MOVE.L  A6,-(A7)
3039
 
    MOVEA.L srcRP,A0
3040
 
    MOVE.L  xSrc,D0
3041
 
    MOVE.L  ySrc,D1
3042
 
    MOVEA.L destRP,A1
3043
 
    MOVE.L  xDest,D2
3044
 
    MOVE.L  yDest,D3
3045
 
    MOVE.L  xSize,D4
3046
 
    MOVE.L  ySize,D5
3047
 
    MOVE.L  minterm,D6
3048
 
    MOVEA.L GfxBase,A6
3049
 
    JSR -552(A6)
3050
 
    MOVEA.L (A7)+,A6
3051
 
  END;
3052
 
END;
3053
 
 
3054
 
PROCEDURE CloseFont(textFont : pTextFont);
3055
 
BEGIN
3056
 
  ASM
3057
 
    MOVE.L  A6,-(A7)
3058
 
    MOVEA.L textFont,A1
3059
 
    MOVEA.L GfxBase,A6
3060
 
    JSR -078(A6)
3061
 
    MOVEA.L (A7)+,A6
3062
 
  END;
3063
 
END;
3064
 
 
3065
 
FUNCTION CloseMonitor(monitorSpec : pMonitorSpec) : BOOLEAN;
3066
 
BEGIN
3067
 
  ASM
3068
 
    MOVE.L  A6,-(A7)
3069
 
    MOVEA.L monitorSpec,A0
3070
 
    MOVEA.L GfxBase,A6
3071
 
    JSR -720(A6)
3072
 
    MOVEA.L (A7)+,A6
3073
 
    TST.W   D0
3074
 
    BEQ.B   @end
3075
 
    MOVEQ   #1,D0
3076
 
  @end: MOVE.B  D0,@RESULT
3077
 
  END;
3078
 
END;
3079
 
 
3080
 
PROCEDURE CMove(copList : pUCopList; destination : POINTER; data : LONGINT);
3081
 
BEGIN
3082
 
  ASM
3083
 
    MOVE.L  A6,-(A7)
3084
 
    MOVEA.L copList,A1
3085
 
    MOVE.L  destination,D0
3086
 
    MOVE.L  data,D1
3087
 
    MOVEA.L GfxBase,A6
3088
 
    JSR -372(A6)
3089
 
    MOVEA.L (A7)+,A6
3090
 
  END;
3091
 
END;
3092
 
 
3093
 
FUNCTION CoerceMode(vp : pViewPort; monitorid : ULONG; flags : ULONG) : ULONG;
3094
 
BEGIN
3095
 
  ASM
3096
 
    MOVE.L  A6,-(A7)
3097
 
    MOVEA.L vp,A0
3098
 
    MOVE.L  monitorid,D0
3099
 
    MOVE.L  flags,D1
3100
 
    MOVEA.L GfxBase,A6
3101
 
    JSR -936(A6)
3102
 
    MOVEA.L (A7)+,A6
3103
 
    MOVE.L  D0,@RESULT
3104
 
  END;
3105
 
END;
3106
 
 
3107
 
PROCEDURE CopySBitMap(layer : pLayer);
3108
 
BEGIN
3109
 
  ASM
3110
 
    MOVE.L  A6,-(A7)
3111
 
    MOVEA.L layer,A0
3112
 
    MOVEA.L GfxBase,A6
3113
 
    JSR -450(A6)
3114
 
    MOVEA.L (A7)+,A6
3115
 
  END;
3116
 
END;
3117
 
 
3118
 
PROCEDURE CWait(copList : pUCopList; v : LONGINT; h : LONGINT);
3119
 
BEGIN
3120
 
  ASM
3121
 
    MOVE.L  A6,-(A7)
3122
 
    MOVEA.L copList,A1
3123
 
    MOVE.L  v,D0
3124
 
    MOVE.L  h,D1
3125
 
    MOVEA.L GfxBase,A6
3126
 
    JSR -378(A6)
3127
 
    MOVEA.L (A7)+,A6
3128
 
  END;
3129
 
END;
3130
 
 
3131
 
PROCEDURE DisownBlitter;
3132
 
BEGIN
3133
 
  ASM
3134
 
    MOVE.L  A6,-(A7)
3135
 
    MOVEA.L GfxBase,A6
3136
 
    JSR -462(A6)
3137
 
    MOVEA.L (A7)+,A6
3138
 
  END;
3139
 
END;
3140
 
 
3141
 
PROCEDURE DisposeRegion(region : pRegion);
3142
 
BEGIN
3143
 
  ASM
3144
 
    MOVE.L  A6,-(A7)
3145
 
    MOVEA.L region,A0
3146
 
    MOVEA.L GfxBase,A6
3147
 
    JSR -534(A6)
3148
 
    MOVEA.L (A7)+,A6
3149
 
  END;
3150
 
END;
3151
 
 
3152
 
PROCEDURE DoCollision(rp : pRastPort);
3153
 
BEGIN
3154
 
  ASM
3155
 
    MOVE.L  A6,-(A7)
3156
 
    MOVEA.L rp,A1
3157
 
    MOVEA.L GfxBase,A6
3158
 
    JSR -108(A6)
3159
 
    MOVEA.L (A7)+,A6
3160
 
  END;
3161
 
END;
3162
 
 
3163
 
PROCEDURE Draw(rp : pRastPort; x : LONGINT; y : LONGINT);
3164
 
BEGIN
3165
 
  ASM
3166
 
    MOVE.L  A6,-(A7)
3167
 
    MOVEA.L rp,A1
3168
 
    MOVE.L  x,D0
3169
 
    MOVE.L  y,D1
3170
 
    MOVEA.L GfxBase,A6
3171
 
    JSR -246(A6)
3172
 
    MOVEA.L (A7)+,A6
3173
 
  END;
3174
 
END;
3175
 
 
3176
 
PROCEDURE DrawEllipse(rp : pRastPort; xCenter : LONGINT; yCenter : LONGINT; a : LONGINT; b : LONGINT);
3177
 
BEGIN
3178
 
  ASM
3179
 
    MOVE.L  A6,-(A7)
3180
 
    MOVEA.L rp,A1
3181
 
    MOVE.L  xCenter,D0
3182
 
    MOVE.L  yCenter,D1
3183
 
    MOVE.L  a,D2
3184
 
    MOVE.L  b,D3
3185
 
    MOVEA.L GfxBase,A6
3186
 
    JSR -180(A6)
3187
 
    MOVEA.L (A7)+,A6
3188
 
  END;
3189
 
END;
3190
 
 
3191
 
PROCEDURE DrawGList(rp : pRastPort; vp : pViewPort);
3192
 
BEGIN
3193
 
  ASM
3194
 
    MOVE.L  A6,-(A7)
3195
 
    MOVEA.L rp,A1
3196
 
    MOVEA.L vp,A0
3197
 
    MOVEA.L GfxBase,A6
3198
 
    JSR -114(A6)
3199
 
    MOVEA.L (A7)+,A6
3200
 
  END;
3201
 
END;
3202
 
 
3203
 
PROCEDURE EraseRect(rp : pRastPort; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
3204
 
BEGIN
3205
 
  ASM
3206
 
    MOVE.L  A6,-(A7)
3207
 
    MOVEA.L rp,A1
3208
 
    MOVE.L  xMin,D0
3209
 
    MOVE.L  yMin,D1
3210
 
    MOVE.L  xMax,D2
3211
 
    MOVE.L  yMax,D3
3212
 
    MOVEA.L GfxBase,A6
3213
 
    JSR -810(A6)
3214
 
    MOVEA.L (A7)+,A6
3215
 
  END;
3216
 
END;
3217
 
 
3218
 
FUNCTION ExtendFont(font : pTextFont;const fontTags : pTagItem) : ULONG;
3219
 
BEGIN
3220
 
  ASM
3221
 
    MOVE.L  A6,-(A7)
3222
 
    MOVEA.L font,A0
3223
 
    MOVEA.L fontTags,A1
3224
 
    MOVEA.L GfxBase,A6
3225
 
    JSR -816(A6)
3226
 
    MOVEA.L (A7)+,A6
3227
 
    MOVE.L  D0,@RESULT
3228
 
  END;
3229
 
END;
3230
 
 
3231
 
FUNCTION FindColor(cm : pColorMap; r : ULONG; g : ULONG; b : ULONG; maxcolor : LONGINT) : LONGINT;
3232
 
BEGIN
3233
 
  ASM
3234
 
    MOVE.L  A6,-(A7)
3235
 
    MOVEA.L cm,A3
3236
 
    MOVE.L  r,D1
3237
 
    MOVE.L  g,D2
3238
 
    MOVE.L  b,D3
3239
 
    MOVE.L  maxcolor,D4
3240
 
    MOVEA.L GfxBase,A6
3241
 
    JSR -1008(A6)
3242
 
    MOVEA.L (A7)+,A6
3243
 
    MOVE.L  D0,@RESULT
3244
 
  END;
3245
 
END;
3246
 
 
3247
 
FUNCTION FindDisplayInfo(displayID : ULONG) : POINTER;
3248
 
BEGIN
3249
 
  ASM
3250
 
    MOVE.L  A6,-(A7)
3251
 
    MOVE.L  displayID,D0
3252
 
    MOVEA.L GfxBase,A6
3253
 
    JSR -726(A6)
3254
 
    MOVEA.L (A7)+,A6
3255
 
    MOVE.L  D0,@RESULT
3256
 
  END;
3257
 
END;
3258
 
 
3259
 
FUNCTION Flood(rp : pRastPort; mode : ULONG; x : LONGINT; y : LONGINT) : BOOLEAN;
3260
 
BEGIN
3261
 
  ASM
3262
 
    MOVE.L  A6,-(A7)
3263
 
    MOVEA.L rp,A1
3264
 
    MOVE.L  mode,D2
3265
 
    MOVE.L  x,D0
3266
 
    MOVE.L  y,D1
3267
 
    MOVEA.L GfxBase,A6
3268
 
    JSR -330(A6)
3269
 
    MOVEA.L (A7)+,A6
3270
 
    TST.W   D0
3271
 
    BEQ.B   @end
3272
 
    MOVEQ   #1,D0
3273
 
  @end: MOVE.B  D0,@RESULT
3274
 
  END;
3275
 
END;
3276
 
 
3277
 
PROCEDURE FontExtent(const font : pTextFont; fontExtent : pTextExtent);
3278
 
BEGIN
3279
 
  ASM
3280
 
    MOVE.L  A6,-(A7)
3281
 
    MOVEA.L font,A0
3282
 
    MOVEA.L fontExtent,A1
3283
 
    MOVEA.L GfxBase,A6
3284
 
    JSR -762(A6)
3285
 
    MOVEA.L (A7)+,A6
3286
 
  END;
3287
 
END;
3288
 
 
3289
 
PROCEDURE FreeBitMap(bm : pBitMap);
3290
 
BEGIN
3291
 
  ASM
3292
 
    MOVE.L  A6,-(A7)
3293
 
    MOVEA.L bm,A0
3294
 
    MOVEA.L GfxBase,A6
3295
 
    JSR -924(A6)
3296
 
    MOVEA.L (A7)+,A6
3297
 
  END;
3298
 
END;
3299
 
 
3300
 
PROCEDURE FreeColorMap(colorMap : pColorMap);
3301
 
BEGIN
3302
 
  ASM
3303
 
    MOVE.L  A6,-(A7)
3304
 
    MOVEA.L colorMap,A0
3305
 
    MOVEA.L GfxBase,A6
3306
 
    JSR -576(A6)
3307
 
    MOVEA.L (A7)+,A6
3308
 
  END;
3309
 
END;
3310
 
 
3311
 
PROCEDURE FreeCopList(copList : pCopList);
3312
 
BEGIN
3313
 
  ASM
3314
 
    MOVE.L  A6,-(A7)
3315
 
    MOVEA.L copList,A0
3316
 
    MOVEA.L GfxBase,A6
3317
 
    JSR -546(A6)
3318
 
    MOVEA.L (A7)+,A6
3319
 
  END;
3320
 
END;
3321
 
 
3322
 
PROCEDURE FreeCprList(cprList : pcprlist);
3323
 
BEGIN
3324
 
  ASM
3325
 
    MOVE.L  A6,-(A7)
3326
 
    MOVEA.L cprList,A0
3327
 
    MOVEA.L GfxBase,A6
3328
 
    JSR -564(A6)
3329
 
    MOVEA.L (A7)+,A6
3330
 
  END;
3331
 
END;
3332
 
 
3333
 
PROCEDURE FreeDBufInfo(dbi : pDBufInfo);
3334
 
BEGIN
3335
 
  ASM
3336
 
    MOVE.L  A6,-(A7)
3337
 
    MOVEA.L dbi,A1
3338
 
    MOVEA.L GfxBase,A6
3339
 
    JSR -972(A6)
3340
 
    MOVEA.L (A7)+,A6
3341
 
  END;
3342
 
END;
3343
 
 
3344
 
PROCEDURE FreeGBuffers(anOb : pAnimOb; rp : pRastPort; flag : LONGINT);
3345
 
BEGIN
3346
 
  ASM
3347
 
    MOVE.L  A6,-(A7)
3348
 
    MOVEA.L anOb,A0
3349
 
    MOVEA.L rp,A1
3350
 
    MOVE.L  flag,D0
3351
 
    MOVEA.L GfxBase,A6
3352
 
    JSR -600(A6)
3353
 
    MOVEA.L (A7)+,A6
3354
 
  END;
3355
 
END;
3356
 
 
3357
 
PROCEDURE FreeRaster(p : pCHAR; width : ULONG; height : ULONG);
3358
 
BEGIN
3359
 
  ASM
3360
 
    MOVE.L  A6,-(A7)
3361
 
    MOVEA.L p,A0
3362
 
    MOVE.L  width,D0
3363
 
    MOVE.L  height,D1
3364
 
    MOVEA.L GfxBase,A6
3365
 
    JSR -498(A6)
3366
 
    MOVEA.L (A7)+,A6
3367
 
  END;
3368
 
END;
3369
 
 
3370
 
PROCEDURE FreeSprite(num : LONGINT);
3371
 
BEGIN
3372
 
  ASM
3373
 
    MOVE.L  A6,-(A7)
3374
 
    MOVE.L  num,D0
3375
 
    MOVEA.L GfxBase,A6
3376
 
    JSR -414(A6)
3377
 
    MOVEA.L (A7)+,A6
3378
 
  END;
3379
 
END;
3380
 
 
3381
 
PROCEDURE FreeSpriteData(sp : pExtSprite);
3382
 
BEGIN
3383
 
  ASM
3384
 
    MOVE.L  A6,-(A7)
3385
 
    MOVEA.L sp,A2
3386
 
    MOVEA.L GfxBase,A6
3387
 
    JSR -1032(A6)
3388
 
    MOVEA.L (A7)+,A6
3389
 
  END;
3390
 
END;
3391
 
 
3392
 
PROCEDURE FreeVPortCopLists(vp : pViewPort);
3393
 
BEGIN
3394
 
  ASM
3395
 
    MOVE.L  A6,-(A7)
3396
 
    MOVEA.L vp,A0
3397
 
    MOVEA.L GfxBase,A6
3398
 
    JSR -540(A6)
3399
 
    MOVEA.L (A7)+,A6
3400
 
  END;
3401
 
END;
3402
 
 
3403
 
FUNCTION GetAPen(rp : pRastPort) : ULONG;
3404
 
BEGIN
3405
 
  ASM
3406
 
    MOVE.L  A6,-(A7)
3407
 
    MOVEA.L rp,A0
3408
 
    MOVEA.L GfxBase,A6
3409
 
    JSR -858(A6)
3410
 
    MOVEA.L (A7)+,A6
3411
 
    MOVE.L  D0,@RESULT
3412
 
  END;
3413
 
END;
3414
 
 
3415
 
FUNCTION GetBitMapAttr(const bm : pBitMap; attrnum : ULONG) : ULONG;
3416
 
BEGIN
3417
 
  ASM
3418
 
    MOVE.L  A6,-(A7)
3419
 
    MOVEA.L bm,A0
3420
 
    MOVE.L  attrnum,D1
3421
 
    MOVEA.L GfxBase,A6
3422
 
    JSR -960(A6)
3423
 
    MOVEA.L (A7)+,A6
3424
 
    MOVE.L  D0,@RESULT
3425
 
  END;
3426
 
END;
3427
 
 
3428
 
FUNCTION GetBPen(rp : pRastPort) : ULONG;
3429
 
BEGIN
3430
 
  ASM
3431
 
    MOVE.L  A6,-(A7)
3432
 
    MOVEA.L rp,A0
3433
 
    MOVEA.L GfxBase,A6
3434
 
    JSR -864(A6)
3435
 
    MOVEA.L (A7)+,A6
3436
 
    MOVE.L  D0,@RESULT
3437
 
  END;
3438
 
END;
3439
 
 
3440
 
FUNCTION GetColorMap(entries : LONGINT) : pColorMap;
3441
 
BEGIN
3442
 
  ASM
3443
 
    MOVE.L  A6,-(A7)
3444
 
    MOVE.L  entries,D0
3445
 
    MOVEA.L GfxBase,A6
3446
 
    JSR -570(A6)
3447
 
    MOVEA.L (A7)+,A6
3448
 
    MOVE.L  D0,@RESULT
3449
 
  END;
3450
 
END;
3451
 
 
3452
 
FUNCTION GetDisplayInfoData(const handle : POINTER; buf : pCHAR; size : ULONG; tagID : ULONG; displayID : ULONG) : ULONG;
3453
 
BEGIN
3454
 
  ASM
3455
 
    MOVE.L  A6,-(A7)
3456
 
    MOVEA.L handle,A0
3457
 
    MOVEA.L buf,A1
3458
 
    MOVE.L  size,D0
3459
 
    MOVE.L  tagID,D1
3460
 
    MOVE.L  displayID,D2
3461
 
    MOVEA.L GfxBase,A6
3462
 
    JSR -756(A6)
3463
 
    MOVEA.L (A7)+,A6
3464
 
    MOVE.L  D0,@RESULT
3465
 
  END;
3466
 
END;
3467
 
 
3468
 
FUNCTION GetDrMd(rp : pRastPort) : ULONG;
3469
 
BEGIN
3470
 
  ASM
3471
 
    MOVE.L  A6,-(A7)
3472
 
    MOVEA.L rp,A0
3473
 
    MOVEA.L GfxBase,A6
3474
 
    JSR -870(A6)
3475
 
    MOVEA.L (A7)+,A6
3476
 
    MOVE.L  D0,@RESULT
3477
 
  END;
3478
 
END;
3479
 
 
3480
 
FUNCTION GetExtSpriteA(ss : pExtSprite;const tags : pTagItem) : LONGINT;
3481
 
BEGIN
3482
 
  ASM
3483
 
    MOVE.L  A6,-(A7)
3484
 
    MOVEA.L ss,A2
3485
 
    MOVEA.L tags,A1
3486
 
    MOVEA.L GfxBase,A6
3487
 
    JSR -930(A6)
3488
 
    MOVEA.L (A7)+,A6
3489
 
    MOVE.L  D0,@RESULT
3490
 
  END;
3491
 
END;
3492
 
 
3493
 
FUNCTION GetGBuffers(anOb : pAnimOb; rp : pRastPort; flag : LONGINT) : BOOLEAN;
3494
 
BEGIN
3495
 
  ASM
3496
 
    MOVE.L  A6,-(A7)
3497
 
    MOVEA.L anOb,A0
3498
 
    MOVEA.L rp,A1
3499
 
    MOVE.L  flag,D0
3500
 
    MOVEA.L GfxBase,A6
3501
 
    JSR -168(A6)
3502
 
    MOVEA.L (A7)+,A6
3503
 
    TST.W   D0
3504
 
    BEQ.B   @end
3505
 
    MOVEQ   #1,D0
3506
 
  @end: MOVE.B  D0,@RESULT
3507
 
  END;
3508
 
END;
3509
 
 
3510
 
FUNCTION GetOutlinePen(rp : pRastPort) : ULONG;
3511
 
BEGIN
3512
 
  ASM
3513
 
    MOVE.L  A6,-(A7)
3514
 
    MOVEA.L rp,A0
3515
 
    MOVEA.L GfxBase,A6
3516
 
    JSR -876(A6)
3517
 
    MOVEA.L (A7)+,A6
3518
 
    MOVE.L  D0,@RESULT
3519
 
  END;
3520
 
END;
3521
 
 
3522
 
PROCEDURE GetRGB32(const cm : pColorMap; firstcolor : ULONG; ncolors : ULONG; table : pUlong);
3523
 
BEGIN
3524
 
  ASM
3525
 
    MOVE.L  A6,-(A7)
3526
 
    MOVEA.L cm,A0
3527
 
    MOVE.L  firstcolor,D0
3528
 
    MOVE.L  ncolors,D1
3529
 
    MOVEA.L table,A1
3530
 
    MOVEA.L GfxBase,A6
3531
 
    JSR -900(A6)
3532
 
    MOVEA.L (A7)+,A6
3533
 
  END;
3534
 
END;
3535
 
 
3536
 
FUNCTION GetRGB4(colorMap : pColorMap; entry : LONGINT) : ULONG;
3537
 
BEGIN
3538
 
  ASM
3539
 
    MOVE.L  A6,-(A7)
3540
 
    MOVEA.L colorMap,A0
3541
 
    MOVE.L  entry,D0
3542
 
    MOVEA.L GfxBase,A6
3543
 
    JSR -582(A6)
3544
 
    MOVEA.L (A7)+,A6
3545
 
    MOVE.L  D0,@RESULT
3546
 
  END;
3547
 
END;
3548
 
 
3549
 
PROCEDURE GetRPAttrsA(const rp : pRastPort;const tags : pTagItem);
3550
 
BEGIN
3551
 
  ASM
3552
 
    MOVE.L  A6,-(A7)
3553
 
    MOVEA.L rp,A0
3554
 
    MOVEA.L tags,A1
3555
 
    MOVEA.L GfxBase,A6
3556
 
    JSR -1044(A6)
3557
 
    MOVEA.L (A7)+,A6
3558
 
  END;
3559
 
END;
3560
 
 
3561
 
FUNCTION GetSprite(sprite : pSimpleSprite; num : LONGINT) : smallint;
3562
 
BEGIN
3563
 
  ASM
3564
 
    MOVE.L  A6,-(A7)
3565
 
    MOVEA.L sprite,A0
3566
 
    MOVE.L  num,D0
3567
 
    MOVEA.L GfxBase,A6
3568
 
    JSR -408(A6)
3569
 
    MOVEA.L (A7)+,A6
3570
 
    MOVE.L  D0,@RESULT
3571
 
  END;
3572
 
END;
3573
 
 
3574
 
FUNCTION GetVPModeID(const vp : pViewPort) : LONGINT;
3575
 
BEGIN
3576
 
  ASM
3577
 
    MOVE.L  A6,-(A7)
3578
 
    MOVEA.L vp,A0
3579
 
    MOVEA.L GfxBase,A6
3580
 
    JSR -792(A6)
3581
 
    MOVEA.L (A7)+,A6
3582
 
    MOVE.L  D0,@RESULT
3583
 
  END;
3584
 
END;
3585
 
 
3586
 
PROCEDURE GfxAssociate(const associateNode : POINTER; gfxNodePtr : POINTER);
3587
 
BEGIN
3588
 
  ASM
3589
 
    MOVE.L  A6,-(A7)
3590
 
    MOVEA.L associateNode,A0
3591
 
    MOVEA.L gfxNodePtr,A1
3592
 
    MOVEA.L GfxBase,A6
3593
 
    JSR -672(A6)
3594
 
    MOVEA.L (A7)+,A6
3595
 
  END;
3596
 
END;
3597
 
 
3598
 
PROCEDURE GfxFree(gfxNodePtr : POINTER);
3599
 
BEGIN
3600
 
  ASM
3601
 
    MOVE.L  A6,-(A7)
3602
 
    MOVEA.L gfxNodePtr,A0
3603
 
    MOVEA.L GfxBase,A6
3604
 
    JSR -666(A6)
3605
 
    MOVEA.L (A7)+,A6
3606
 
  END;
3607
 
END;
3608
 
 
3609
 
FUNCTION GfxLookUp(const associateNode : POINTER) : POINTER;
3610
 
BEGIN
3611
 
  ASM
3612
 
    MOVE.L  A6,-(A7)
3613
 
    MOVEA.L associateNode,A0
3614
 
    MOVEA.L GfxBase,A6
3615
 
    JSR -702(A6)
3616
 
    MOVEA.L (A7)+,A6
3617
 
    MOVE.L  D0,@RESULT
3618
 
  END;
3619
 
END;
3620
 
 
3621
 
FUNCTION GfxNew(gfxNodeType : ULONG) : POINTER;
3622
 
BEGIN
3623
 
  ASM
3624
 
    MOVE.L  A6,-(A7)
3625
 
    MOVE.L  gfxNodeType,D0
3626
 
    MOVEA.L GfxBase,A6
3627
 
    JSR -660(A6)
3628
 
    MOVEA.L (A7)+,A6
3629
 
    MOVE.L  D0,@RESULT
3630
 
  END;
3631
 
END;
3632
 
 
3633
 
PROCEDURE InitArea(areaInfo : pAreaInfo; vectorBuffer : POINTER; maxVectors : LONGINT);
3634
 
BEGIN
3635
 
  ASM
3636
 
    MOVE.L  A6,-(A7)
3637
 
    MOVEA.L areaInfo,A0
3638
 
    MOVEA.L vectorBuffer,A1
3639
 
    MOVE.L  maxVectors,D0
3640
 
    MOVEA.L GfxBase,A6
3641
 
    JSR -282(A6)
3642
 
    MOVEA.L (A7)+,A6
3643
 
  END;
3644
 
END;
3645
 
 
3646
 
PROCEDURE InitBitMap(bitMap : pBitMap; depth : LONGINT; width : LONGINT; height : LONGINT);
3647
 
BEGIN
3648
 
  ASM
3649
 
    MOVE.L  A6,-(A7)
3650
 
    MOVEA.L bitMap,A0
3651
 
    MOVE.L  depth,D0
3652
 
    MOVE.L  width,D1
3653
 
    MOVE.L  height,D2
3654
 
    MOVEA.L GfxBase,A6
3655
 
    JSR -390(A6)
3656
 
    MOVEA.L (A7)+,A6
3657
 
  END;
3658
 
END;
3659
 
 
3660
 
PROCEDURE InitGels(head : pVSprite; tail : pVSprite; gelsInfo : pGelsInfo);
3661
 
BEGIN
3662
 
  ASM
3663
 
    MOVE.L  A6,-(A7)
3664
 
    MOVEA.L head,A0
3665
 
    MOVEA.L tail,A1
3666
 
    MOVEA.L gelsInfo,A2
3667
 
    MOVEA.L GfxBase,A6
3668
 
    JSR -120(A6)
3669
 
    MOVEA.L (A7)+,A6
3670
 
  END;
3671
 
END;
3672
 
 
3673
 
PROCEDURE InitGMasks(anOb : pAnimOb);
3674
 
BEGIN
3675
 
  ASM
3676
 
    MOVE.L  A6,-(A7)
3677
 
    MOVEA.L anOb,A0
3678
 
    MOVEA.L GfxBase,A6
3679
 
    JSR -174(A6)
3680
 
    MOVEA.L (A7)+,A6
3681
 
  END;
3682
 
END;
3683
 
 
3684
 
PROCEDURE InitMasks(vSprite : pVSprite);
3685
 
BEGIN
3686
 
  ASM
3687
 
    MOVE.L  A6,-(A7)
3688
 
    MOVEA.L vSprite,A0
3689
 
    MOVEA.L GfxBase,A6
3690
 
    JSR -126(A6)
3691
 
    MOVEA.L (A7)+,A6
3692
 
  END;
3693
 
END;
3694
 
 
3695
 
PROCEDURE InitRastPort(rp : pRastPort);
3696
 
BEGIN
3697
 
  ASM
3698
 
    MOVE.L  A6,-(A7)
3699
 
    MOVEA.L rp,A1
3700
 
    MOVEA.L GfxBase,A6
3701
 
    JSR -198(A6)
3702
 
    MOVEA.L (A7)+,A6
3703
 
  END;
3704
 
END;
3705
 
 
3706
 
FUNCTION InitTmpRas(tmpRas : pTmpRas; buffer : PLANEPTR; size : LONGINT) : pTmpRas;
3707
 
BEGIN
3708
 
  ASM
3709
 
    MOVE.L  A6,-(A7)
3710
 
    MOVEA.L tmpRas,A0
3711
 
    MOVEA.L buffer,A1
3712
 
    MOVE.L  size,D0
3713
 
    MOVEA.L GfxBase,A6
3714
 
    JSR -468(A6)
3715
 
    MOVEA.L (A7)+,A6
3716
 
    MOVE.L  D0,@RESULT
3717
 
  END;
3718
 
END;
3719
 
 
3720
 
PROCEDURE InitView(view : pView);
3721
 
BEGIN
3722
 
  ASM
3723
 
    MOVE.L  A6,-(A7)
3724
 
    MOVEA.L view,A1
3725
 
    MOVEA.L GfxBase,A6
3726
 
    JSR -360(A6)
3727
 
    MOVEA.L (A7)+,A6
3728
 
  END;
3729
 
END;
3730
 
 
3731
 
PROCEDURE InitVPort(vp : pViewPort);
3732
 
BEGIN
3733
 
  ASM
3734
 
    MOVE.L  A6,-(A7)
3735
 
    MOVEA.L vp,A0
3736
 
    MOVEA.L GfxBase,A6
3737
 
    JSR -204(A6)
3738
 
    MOVEA.L (A7)+,A6
3739
 
  END;
3740
 
END;
3741
 
 
3742
 
PROCEDURE LoadRGB32(vp : pViewPort;const table : pULONG);
3743
 
BEGIN
3744
 
  ASM
3745
 
    MOVE.L  A6,-(A7)
3746
 
    MOVEA.L vp,A0
3747
 
    MOVEA.L table,A1
3748
 
    MOVEA.L GfxBase,A6
3749
 
    JSR -882(A6)
3750
 
    MOVEA.L (A7)+,A6
3751
 
  END;
3752
 
END;
3753
 
 
3754
 
PROCEDURE LoadRGB4(vp : pViewPort;const colors : pWord; count : LONGINT);
3755
 
BEGIN
3756
 
  ASM
3757
 
    MOVE.L  A6,-(A7)
3758
 
    MOVEA.L vp,A0
3759
 
    MOVEA.L colors,A1
3760
 
    MOVE.L  count,D0
3761
 
    MOVEA.L GfxBase,A6
3762
 
    JSR -192(A6)
3763
 
    MOVEA.L (A7)+,A6
3764
 
  END;
3765
 
END;
3766
 
 
3767
 
PROCEDURE LoadView(view : pView);
3768
 
BEGIN
3769
 
  ASM
3770
 
    MOVE.L  A6,-(A7)
3771
 
    MOVEA.L view,A1
3772
 
    MOVEA.L GfxBase,A6
3773
 
    JSR -222(A6)
3774
 
    MOVEA.L (A7)+,A6
3775
 
  END;
3776
 
END;
3777
 
 
3778
 
PROCEDURE LockLayerRom(layer : pLayer);
3779
 
BEGIN
3780
 
  ASM
3781
 
    MOVE.L  A6,-(A7)
3782
 
    MOVEA.L layer,A5
3783
 
    MOVEA.L GfxBase,A6
3784
 
    JSR -432(A6)
3785
 
    MOVEA.L (A7)+,A6
3786
 
  END;
3787
 
END;
3788
 
 
3789
 
FUNCTION MakeVPort(view : pView; vp : pViewPort) : ULONG;
3790
 
BEGIN
3791
 
  ASM
3792
 
    MOVE.L  A6,-(A7)
3793
 
    MOVEA.L view,A0
3794
 
    MOVEA.L vp,A1
3795
 
    MOVEA.L GfxBase,A6
3796
 
    JSR -216(A6)
3797
 
    MOVEA.L (A7)+,A6
3798
 
    MOVE.L  D0,@RESULT
3799
 
  END;
3800
 
END;
3801
 
 
3802
 
FUNCTION ModeNotAvailable(modeID : ULONG) : LONGINT;
3803
 
BEGIN
3804
 
  ASM
3805
 
    MOVE.L  A6,-(A7)
3806
 
    MOVE.L  modeID,D0
3807
 
    MOVEA.L GfxBase,A6
3808
 
    JSR -798(A6)
3809
 
    MOVEA.L (A7)+,A6
3810
 
    MOVE.L  D0,@RESULT
3811
 
  END;
3812
 
END;
3813
 
 
3814
 
PROCEDURE Move(rp : pRastPort; x : LONGINT; y : LONGINT);
3815
 
BEGIN
3816
 
  ASM
3817
 
    MOVE.L  A6,-(A7)
3818
 
    MOVEA.L rp,A1
3819
 
    MOVE.L  x,D0
3820
 
    MOVE.L  y,D1
3821
 
    MOVEA.L GfxBase,A6
3822
 
    JSR -240(A6)
3823
 
    MOVEA.L (A7)+,A6
3824
 
  END;
3825
 
END;
3826
 
 
3827
 
PROCEDURE MoveSprite(vp : pViewPort; sprite : pSimpleSprite; x : LONGINT; y : LONGINT);
3828
 
BEGIN
3829
 
  ASM
3830
 
    MOVE.L  A6,-(A7)
3831
 
    MOVEA.L vp,A0
3832
 
    MOVEA.L sprite,A1
3833
 
    MOVE.L  x,D0
3834
 
    MOVE.L  y,D1
3835
 
    MOVEA.L GfxBase,A6
3836
 
    JSR -426(A6)
3837
 
    MOVEA.L (A7)+,A6
3838
 
  END;
3839
 
END;
3840
 
 
3841
 
FUNCTION MrgCop(view : pView) : ULONG;
3842
 
BEGIN
3843
 
  ASM
3844
 
    MOVE.L  A6,-(A7)
3845
 
    MOVEA.L view,A1
3846
 
    MOVEA.L GfxBase,A6
3847
 
    JSR -210(A6)
3848
 
    MOVEA.L (A7)+,A6
3849
 
    MOVE.L  D0,@RESULT
3850
 
  END;
3851
 
END;
3852
 
 
3853
 
FUNCTION NewRegion : pRegion;
3854
 
BEGIN
3855
 
  ASM
3856
 
    MOVE.L  A6,-(A7)
3857
 
    MOVEA.L GfxBase,A6
3858
 
    JSR -516(A6)
3859
 
    MOVEA.L (A7)+,A6
3860
 
    MOVE.L  D0,@RESULT
3861
 
  END;
3862
 
END;
3863
 
 
3864
 
FUNCTION NextDisplayInfo(displayID : ULONG) : ULONG;
3865
 
BEGIN
3866
 
  ASM
3867
 
    MOVE.L  A6,-(A7)
3868
 
    MOVE.L  displayID,D0
3869
 
    MOVEA.L GfxBase,A6
3870
 
    JSR -732(A6)
3871
 
    MOVEA.L (A7)+,A6
3872
 
    MOVE.L  D0,@RESULT
3873
 
  END;
3874
 
END;
3875
 
 
3876
 
FUNCTION ObtainBestPenA(cm : pColorMap; r : ULONG; g : ULONG; b : ULONG;const tags : pTagItem) : LONGINT;
3877
 
BEGIN
3878
 
  ASM
3879
 
    MOVE.L  A6,-(A7)
3880
 
    MOVEA.L cm,A0
3881
 
    MOVE.L  r,D1
3882
 
    MOVE.L  g,D2
3883
 
    MOVE.L  b,D3
3884
 
    MOVEA.L tags,A1
3885
 
    MOVEA.L GfxBase,A6
3886
 
    JSR -840(A6)
3887
 
    MOVEA.L (A7)+,A6
3888
 
    MOVE.L  D0,@RESULT
3889
 
  END;
3890
 
END;
3891
 
 
3892
 
FUNCTION ObtainPen(cm : pColorMap; n : ULONG; r : ULONG; g : ULONG; b : ULONG; f : LONGINT) : ULONG;
3893
 
BEGIN
3894
 
  ASM
3895
 
    MOVE.L  A6,-(A7)
3896
 
    MOVEA.L cm,A0
3897
 
    MOVE.L  n,D0
3898
 
    MOVE.L  r,D1
3899
 
    MOVE.L  g,D2
3900
 
    MOVE.L  b,D3
3901
 
    MOVE.L  f,D4
3902
 
    MOVEA.L GfxBase,A6
3903
 
    JSR -954(A6)
3904
 
    MOVEA.L (A7)+,A6
3905
 
    MOVE.L  D0,@RESULT
3906
 
  END;
3907
 
END;
3908
 
 
3909
 
FUNCTION OpenFont(textAttr : pTextAttr) : pTextFont;
3910
 
BEGIN
3911
 
  ASM
3912
 
    MOVE.L  A6,-(A7)
3913
 
    MOVEA.L textAttr,A0
3914
 
    MOVEA.L GfxBase,A6
3915
 
    JSR -072(A6)
3916
 
    MOVEA.L (A7)+,A6
3917
 
    MOVE.L  D0,@RESULT
3918
 
  END;
3919
 
END;
3920
 
 
3921
 
FUNCTION OpenMonitor(const monitorName : pCHAR; displayID : ULONG) : pMonitorSpec;
3922
 
BEGIN
3923
 
  ASM
3924
 
    MOVE.L  A6,-(A7)
3925
 
    MOVEA.L monitorName,A1
3926
 
    MOVE.L  displayID,D0
3927
 
    MOVEA.L GfxBase,A6
3928
 
    JSR -714(A6)
3929
 
    MOVEA.L (A7)+,A6
3930
 
    MOVE.L  D0,@RESULT
3931
 
  END;
3932
 
END;
3933
 
 
3934
 
FUNCTION OrRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
3935
 
BEGIN
3936
 
  ASM
3937
 
    MOVE.L  A6,-(A7)
3938
 
    MOVEA.L region,A0
3939
 
    MOVEA.L rectangle,A1
3940
 
    MOVEA.L GfxBase,A6
3941
 
    JSR -510(A6)
3942
 
    MOVEA.L (A7)+,A6
3943
 
    TST.W   D0
3944
 
    BEQ.B   @end
3945
 
    MOVEQ   #1,D0
3946
 
  @end: MOVE.B  D0,@RESULT
3947
 
  END;
3948
 
END;
3949
 
 
3950
 
FUNCTION OrRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
3951
 
BEGIN
3952
 
  ASM
3953
 
    MOVE.L  A6,-(A7)
3954
 
    MOVEA.L srcRegion,A0
3955
 
    MOVEA.L destRegion,A1
3956
 
    MOVEA.L GfxBase,A6
3957
 
    JSR -612(A6)
3958
 
    MOVEA.L (A7)+,A6
3959
 
    TST.W   D0
3960
 
    BEQ.B   @end
3961
 
    MOVEQ   #1,D0
3962
 
  @end: MOVE.B  D0,@RESULT
3963
 
  END;
3964
 
END;
3965
 
 
3966
 
PROCEDURE OwnBlitter;
3967
 
BEGIN
3968
 
  ASM
3969
 
    MOVE.L  A6,-(A7)
3970
 
    MOVEA.L GfxBase,A6
3971
 
    JSR -456(A6)
3972
 
    MOVEA.L (A7)+,A6
3973
 
  END;
3974
 
END;
3975
 
 
3976
 
PROCEDURE PolyDraw(rp : pRastPort; count : LONGINT;const polyTable : pLongint);
3977
 
BEGIN
3978
 
  ASM
3979
 
    MOVE.L  A6,-(A7)
3980
 
    MOVEA.L rp,A1
3981
 
    MOVE.L  count,D0
3982
 
    MOVEA.L polyTable,A0
3983
 
    MOVEA.L GfxBase,A6
3984
 
    JSR -336(A6)
3985
 
    MOVEA.L (A7)+,A6
3986
 
  END;
3987
 
END;
3988
 
 
3989
 
PROCEDURE QBlit(blit : pbltnode);
3990
 
BEGIN
3991
 
  ASM
3992
 
    MOVE.L  A6,-(A7)
3993
 
    MOVEA.L blit,A1
3994
 
    MOVEA.L GfxBase,A6
3995
 
    JSR -276(A6)
3996
 
    MOVEA.L (A7)+,A6
3997
 
  END;
3998
 
END;
3999
 
 
4000
 
PROCEDURE QBSBlit(blit : pbltnode);
4001
 
BEGIN
4002
 
  ASM
4003
 
    MOVE.L  A6,-(A7)
4004
 
    MOVEA.L blit,A1
4005
 
    MOVEA.L GfxBase,A6
4006
 
    JSR -294(A6)
4007
 
    MOVEA.L (A7)+,A6
4008
 
  END;
4009
 
END;
4010
 
 
4011
 
FUNCTION ReadPixel(rp : pRastPort; x : LONGINT; y : LONGINT) : ULONG;
4012
 
BEGIN
4013
 
  ASM
4014
 
    MOVE.L  A6,-(A7)
4015
 
    MOVEA.L rp,A1
4016
 
    MOVE.L  x,D0
4017
 
    MOVE.L  y,D1
4018
 
    MOVEA.L GfxBase,A6
4019
 
    JSR -318(A6)
4020
 
    MOVEA.L (A7)+,A6
4021
 
    MOVE.L  D0,@RESULT
4022
 
  END;
4023
 
END;
4024
 
 
4025
 
FUNCTION ReadPixelArray8(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; temprp : pRastPort) : LONGINT;
4026
 
BEGIN
4027
 
  ASM
4028
 
    MOVE.L  A6,-(A7)
4029
 
    MOVEA.L rp,A0
4030
 
    MOVE.L  xstart,D0
4031
 
    MOVE.L  ystart,D1
4032
 
    MOVE.L  xstop,D2
4033
 
    MOVE.L  ystop,D3
4034
 
    MOVEA.L array_,A2
4035
 
    MOVEA.L temprp,A1
4036
 
    MOVEA.L GfxBase,A6
4037
 
    JSR -780(A6)
4038
 
    MOVEA.L (A7)+,A6
4039
 
    MOVE.L  D0,@RESULT
4040
 
  END;
4041
 
END;
4042
 
 
4043
 
FUNCTION ReadPixelLine8(rp : pRastPort; xstart : ULONG; ystart : ULONG; width : ULONG; array_ : pointer; tempRP : pRastPort) : LONGINT;
4044
 
BEGIN
4045
 
  ASM
4046
 
    MOVE.L  A6,-(A7)
4047
 
    MOVEA.L rp,A0
4048
 
    MOVE.L  xstart,D0
4049
 
    MOVE.L  ystart,D1
4050
 
    MOVE.L  width,D2
4051
 
    MOVEA.L array_,A2
4052
 
    MOVEA.L tempRP,A1
4053
 
    MOVEA.L GfxBase,A6
4054
 
    JSR -768(A6)
4055
 
    MOVEA.L (A7)+,A6
4056
 
    MOVE.L  D0,@RESULT
4057
 
  END;
4058
 
END;
4059
 
 
4060
 
PROCEDURE RectFill(rp : pRastPort; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
4061
 
BEGIN
4062
 
  ASM
4063
 
    MOVE.L  A6,-(A7)
4064
 
    MOVEA.L rp,A1
4065
 
    MOVE.L  xMin,D0
4066
 
    MOVE.L  yMin,D1
4067
 
    MOVE.L  xMax,D2
4068
 
    MOVE.L  yMax,D3
4069
 
    MOVEA.L GfxBase,A6
4070
 
    JSR -306(A6)
4071
 
    MOVEA.L (A7)+,A6
4072
 
  END;
4073
 
END;
4074
 
 
4075
 
PROCEDURE ReleasePen(cm : pColorMap; n : ULONG);
4076
 
BEGIN
4077
 
  ASM
4078
 
    MOVE.L  A6,-(A7)
4079
 
    MOVEA.L cm,A0
4080
 
    MOVE.L  n,D0
4081
 
    MOVEA.L GfxBase,A6
4082
 
    JSR -948(A6)
4083
 
    MOVEA.L (A7)+,A6
4084
 
  END;
4085
 
END;
4086
 
 
4087
 
PROCEDURE RemFont(textFont : pTextFont);
4088
 
BEGIN
4089
 
  ASM
4090
 
    MOVE.L  A6,-(A7)
4091
 
    MOVEA.L textFont,A1
4092
 
    MOVEA.L GfxBase,A6
4093
 
    JSR -486(A6)
4094
 
    MOVEA.L (A7)+,A6
4095
 
  END;
4096
 
END;
4097
 
 
4098
 
PROCEDURE RemIBob(bob : pBob; rp : pRastPort; vp : pViewPort);
4099
 
BEGIN
4100
 
  ASM
4101
 
    MOVE.L  A6,-(A7)
4102
 
    MOVEA.L bob,A0
4103
 
    MOVEA.L rp,A1
4104
 
    MOVEA.L vp,A2
4105
 
    MOVEA.L GfxBase,A6
4106
 
    JSR -132(A6)
4107
 
    MOVEA.L (A7)+,A6
4108
 
  END;
4109
 
END;
4110
 
 
4111
 
PROCEDURE RemVSprite(vSprite : pVSprite);
4112
 
BEGIN
4113
 
  ASM
4114
 
    MOVE.L  A6,-(A7)
4115
 
    MOVEA.L vSprite,A0
4116
 
    MOVEA.L GfxBase,A6
4117
 
    JSR -138(A6)
4118
 
    MOVEA.L (A7)+,A6
4119
 
  END;
4120
 
END;
4121
 
 
4122
 
FUNCTION ScalerDiv(factor : ULONG; numerator : ULONG; denominator : ULONG) : WORD;
4123
 
BEGIN
4124
 
  ASM
4125
 
    MOVE.L  A6,-(A7)
4126
 
    MOVE.L  factor,D0
4127
 
    MOVE.L  numerator,D1
4128
 
    MOVE.L  denominator,D2
4129
 
    MOVEA.L GfxBase,A6
4130
 
    JSR -684(A6)
4131
 
    MOVEA.L (A7)+,A6
4132
 
    MOVE.L  D0,@RESULT
4133
 
  END;
4134
 
END;
4135
 
 
4136
 
PROCEDURE ScrollRaster(rp : pRastPort; dx : LONGINT; dy : LONGINT; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
4137
 
BEGIN
4138
 
  ASM
4139
 
    MOVE.L  A6,-(A7)
4140
 
    MOVEA.L rp,A1
4141
 
    MOVE.L  dx,D0
4142
 
    MOVE.L  dy,D1
4143
 
    MOVE.L  xMin,D2
4144
 
    MOVE.L  yMin,D3
4145
 
    MOVE.L  xMax,D4
4146
 
    MOVE.L  yMax,D5
4147
 
    MOVEA.L GfxBase,A6
4148
 
    JSR -396(A6)
4149
 
    MOVEA.L (A7)+,A6
4150
 
  END;
4151
 
END;
4152
 
 
4153
 
PROCEDURE ScrollRasterBF(rp : pRastPort; dx : LONGINT; dy : LONGINT; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
4154
 
BEGIN
4155
 
  ASM
4156
 
    MOVE.L  A6,-(A7)
4157
 
    MOVEA.L rp,A1
4158
 
    MOVE.L  dx,D0
4159
 
    MOVE.L  dy,D1
4160
 
    MOVE.L  xMin,D2
4161
 
    MOVE.L  yMin,D3
4162
 
    MOVE.L  xMax,D4
4163
 
    MOVE.L  yMax,D5
4164
 
    MOVEA.L GfxBase,A6
4165
 
    JSR -1002(A6)
4166
 
    MOVEA.L (A7)+,A6
4167
 
  END;
4168
 
END;
4169
 
 
4170
 
PROCEDURE ScrollVPort(vp : pViewPort);
4171
 
BEGIN
4172
 
  ASM
4173
 
    MOVE.L  A6,-(A7)
4174
 
    MOVEA.L vp,A0
4175
 
    MOVEA.L GfxBase,A6
4176
 
    JSR -588(A6)
4177
 
    MOVEA.L (A7)+,A6
4178
 
  END;
4179
 
END;
4180
 
 
4181
 
PROCEDURE SetABPenDrMd(rp : pRastPort; apen : ULONG; bpen : ULONG; drawmode : ULONG);
4182
 
BEGIN
4183
 
  ASM
4184
 
    MOVE.L  A6,-(A7)
4185
 
    MOVEA.L rp,A1
4186
 
    MOVE.L  apen,D0
4187
 
    MOVE.L  bpen,D1
4188
 
    MOVE.L  drawmode,D2
4189
 
    MOVEA.L GfxBase,A6
4190
 
    JSR -894(A6)
4191
 
    MOVEA.L (A7)+,A6
4192
 
  END;
4193
 
END;
4194
 
 
4195
 
PROCEDURE SetAPen(rp : pRastPort; pen : ULONG);
4196
 
BEGIN
4197
 
  ASM
4198
 
    MOVE.L  A6,-(A7)
4199
 
    MOVEA.L rp,A1
4200
 
    MOVE.L  pen,D0
4201
 
    MOVEA.L GfxBase,A6
4202
 
    JSR -342(A6)
4203
 
    MOVEA.L (A7)+,A6
4204
 
  END;
4205
 
END;
4206
 
 
4207
 
PROCEDURE SetBPen(rp : pRastPort; pen : ULONG);
4208
 
BEGIN
4209
 
  ASM
4210
 
    MOVE.L  A6,-(A7)
4211
 
    MOVEA.L rp,A1
4212
 
    MOVE.L  pen,D0
4213
 
    MOVEA.L GfxBase,A6
4214
 
    JSR -348(A6)
4215
 
    MOVEA.L (A7)+,A6
4216
 
  END;
4217
 
END;
4218
 
 
4219
 
FUNCTION SetChipRev(want : ULONG) : ULONG;
4220
 
BEGIN
4221
 
  ASM
4222
 
    MOVE.L  A6,-(A7)
4223
 
    MOVE.L  want,D0
4224
 
    MOVEA.L GfxBase,A6
4225
 
    JSR -888(A6)
4226
 
    MOVEA.L (A7)+,A6
4227
 
    MOVE.L  D0,@RESULT
4228
 
  END;
4229
 
END;
4230
 
 
4231
 
PROCEDURE SetCollision(num : ULONG; routine : tPROCEDURE; gelsInfo : pGelsInfo);
4232
 
BEGIN
4233
 
  ASM
4234
 
    MOVE.L  A6,-(A7)
4235
 
    MOVE.L  num,D0
4236
 
    MOVEA.L routine,A0
4237
 
    MOVEA.L gelsInfo,A1
4238
 
    MOVEA.L GfxBase,A6
4239
 
    JSR -144(A6)
4240
 
    MOVEA.L (A7)+,A6
4241
 
  END;
4242
 
END;
4243
 
 
4244
 
PROCEDURE SetDrMd(rp : pRastPort; drawMode : ULONG);
4245
 
BEGIN
4246
 
  ASM
4247
 
    MOVE.L  A6,-(A7)
4248
 
    MOVEA.L rp,A1
4249
 
    MOVE.L  drawMode,D0
4250
 
    MOVEA.L GfxBase,A6
4251
 
    JSR -354(A6)
4252
 
    MOVEA.L (A7)+,A6
4253
 
  END;
4254
 
END;
4255
 
 
4256
 
FUNCTION SetFont(rp : pRastPort;const textFont : pTextFont) : LONGINT;
4257
 
BEGIN
4258
 
  ASM
4259
 
    MOVE.L  A6,-(A7)
4260
 
    MOVEA.L rp,A1
4261
 
    MOVEA.L textFont,A0
4262
 
    MOVEA.L GfxBase,A6
4263
 
    JSR -066(A6)
4264
 
    MOVEA.L (A7)+,A6
4265
 
    MOVE.L  D0,@RESULT
4266
 
  END;
4267
 
END;
4268
 
 
4269
 
PROCEDURE SetMaxPen(rp : pRastPort; maxpen : ULONG);
4270
 
BEGIN
4271
 
  ASM
4272
 
    MOVE.L  A6,-(A7)
4273
 
    MOVEA.L rp,A0
4274
 
    MOVE.L  maxpen,D0
4275
 
    MOVEA.L GfxBase,A6
4276
 
    JSR -990(A6)
4277
 
    MOVEA.L (A7)+,A6
4278
 
  END;
4279
 
END;
4280
 
 
4281
 
FUNCTION SetOutlinePen(rp : pRastPort; pen : ULONG) : ULONG;
4282
 
BEGIN
4283
 
  ASM
4284
 
    MOVE.L  A6,-(A7)
4285
 
    MOVEA.L rp,A0
4286
 
    MOVE.L  pen,D0
4287
 
    MOVEA.L GfxBase,A6
4288
 
    JSR -978(A6)
4289
 
    MOVEA.L (A7)+,A6
4290
 
    MOVE.L  D0,@RESULT
4291
 
  END;
4292
 
END;
4293
 
 
4294
 
PROCEDURE SetRast(rp : pRastPort; pen : ULONG);
4295
 
BEGIN
4296
 
  ASM
4297
 
    MOVE.L  A6,-(A7)
4298
 
    MOVEA.L rp,A1
4299
 
    MOVE.L  pen,D0
4300
 
    MOVEA.L GfxBase,A6
4301
 
    JSR -234(A6)
4302
 
    MOVEA.L (A7)+,A6
4303
 
  END;
4304
 
END;
4305
 
 
4306
 
PROCEDURE SetRGB32(vp : pViewPort; n : ULONG; r : ULONG; g : ULONG; b : ULONG);
4307
 
BEGIN
4308
 
  ASM
4309
 
    MOVE.L  A6,-(A7)
4310
 
    MOVEA.L vp,A0
4311
 
    MOVE.L  n,D0
4312
 
    MOVE.L  r,D1
4313
 
    MOVE.L  g,D2
4314
 
    MOVE.L  b,D3
4315
 
    MOVEA.L GfxBase,A6
4316
 
    JSR -852(A6)
4317
 
    MOVEA.L (A7)+,A6
4318
 
  END;
4319
 
END;
4320
 
 
4321
 
PROCEDURE SetRGB32CM(cm : pColorMap; n : ULONG; r : ULONG; g : ULONG; b : ULONG);
4322
 
BEGIN
4323
 
  ASM
4324
 
    MOVE.L  A6,-(A7)
4325
 
    MOVEA.L cm,A0
4326
 
    MOVE.L  n,D0
4327
 
    MOVE.L  r,D1
4328
 
    MOVE.L  g,D2
4329
 
    MOVE.L  b,D3
4330
 
    MOVEA.L GfxBase,A6
4331
 
    JSR -996(A6)
4332
 
    MOVEA.L (A7)+,A6
4333
 
  END;
4334
 
END;
4335
 
 
4336
 
PROCEDURE SetRGB4(vp : pViewPort; index : LONGINT; red : ULONG; green : ULONG; blue : ULONG);
4337
 
BEGIN
4338
 
  ASM
4339
 
    MOVE.L  A6,-(A7)
4340
 
    MOVEA.L vp,A0
4341
 
    MOVE.L  index,D0
4342
 
    MOVE.L  red,D1
4343
 
    MOVE.L  green,D2
4344
 
    MOVE.L  blue,D3
4345
 
    MOVEA.L GfxBase,A6
4346
 
    JSR -288(A6)
4347
 
    MOVEA.L (A7)+,A6
4348
 
  END;
4349
 
END;
4350
 
 
4351
 
PROCEDURE SetRGB4CM(colorMap : pColorMap; index : LONGINT; red : ULONG; green : ULONG; blue : ULONG);
4352
 
BEGIN
4353
 
  ASM
4354
 
    MOVE.L  A6,-(A7)
4355
 
    MOVEA.L colorMap,A0
4356
 
    MOVE.L  index,D0
4357
 
    MOVE.L  red,D1
4358
 
    MOVE.L  green,D2
4359
 
    MOVE.L  blue,D3
4360
 
    MOVEA.L GfxBase,A6
4361
 
    JSR -630(A6)
4362
 
    MOVEA.L (A7)+,A6
4363
 
  END;
4364
 
END;
4365
 
 
4366
 
PROCEDURE SetRPAttrsA(rp : pRastPort;const tags : pTagItem);
4367
 
BEGIN
4368
 
  ASM
4369
 
    MOVE.L  A6,-(A7)
4370
 
    MOVEA.L rp,A0
4371
 
    MOVEA.L tags,A1
4372
 
    MOVEA.L GfxBase,A6
4373
 
    JSR -1038(A6)
4374
 
    MOVEA.L (A7)+,A6
4375
 
  END;
4376
 
END;
4377
 
 
4378
 
FUNCTION SetSoftStyle(rp : pRastPort; style : ULONG; enable : ULONG) : ULONG;
4379
 
BEGIN
4380
 
  ASM
4381
 
    MOVE.L  A6,-(A7)
4382
 
    MOVEA.L rp,A1
4383
 
    MOVE.L  style,D0
4384
 
    MOVE.L  enable,D1
4385
 
    MOVEA.L GfxBase,A6
4386
 
    JSR -090(A6)
4387
 
    MOVEA.L (A7)+,A6
4388
 
    MOVE.L  D0,@RESULT
4389
 
  END;
4390
 
END;
4391
 
 
4392
 
FUNCTION SetWriteMask(rp : pRastPort; msk : ULONG) : ULONG;
4393
 
BEGIN
4394
 
  ASM
4395
 
    MOVE.L  A6,-(A7)
4396
 
    MOVEA.L rp,A0
4397
 
    MOVE.L  msk,D0
4398
 
    MOVEA.L GfxBase,A6
4399
 
    JSR -984(A6)
4400
 
    MOVEA.L (A7)+,A6
4401
 
    MOVE.L  D0,@RESULT
4402
 
  END;
4403
 
END;
4404
 
 
4405
 
PROCEDURE SortGList(rp : pRastPort);
4406
 
BEGIN
4407
 
  ASM
4408
 
    MOVE.L  A6,-(A7)
4409
 
    MOVEA.L rp,A1
4410
 
    MOVEA.L GfxBase,A6
4411
 
    JSR -150(A6)
4412
 
    MOVEA.L (A7)+,A6
4413
 
  END;
4414
 
END;
4415
 
 
4416
 
PROCEDURE StripFont(font : pTextFont);
4417
 
BEGIN
4418
 
  ASM
4419
 
    MOVE.L  A6,-(A7)
4420
 
    MOVEA.L font,A0
4421
 
    MOVEA.L GfxBase,A6
4422
 
    JSR -822(A6)
4423
 
    MOVEA.L (A7)+,A6
4424
 
  END;
4425
 
END;
4426
 
 
4427
 
PROCEDURE SyncSBitMap(layer : pLayer);
4428
 
BEGIN
4429
 
  ASM
4430
 
    MOVE.L  A6,-(A7)
4431
 
    MOVEA.L layer,A0
4432
 
    MOVEA.L GfxBase,A6
4433
 
    JSR -444(A6)
4434
 
    MOVEA.L (A7)+,A6
4435
 
  END;
4436
 
END;
4437
 
 
4438
 
FUNCTION GText(rp : pRastPort;const string_ : pCHAR; count : ULONG) : LONGINT;
4439
 
BEGIN
4440
 
  ASM
4441
 
    MOVE.L  A6,-(A7)
4442
 
    MOVEA.L rp,A1
4443
 
    MOVEA.L string_,A0
4444
 
    MOVE.L  count,D0
4445
 
    MOVEA.L GfxBase,A6
4446
 
    JSR -060(A6)
4447
 
    MOVEA.L (A7)+,A6
4448
 
    MOVE.L  D0,@RESULT
4449
 
  END;
4450
 
END;
4451
 
 
4452
 
FUNCTION TextExtent(rp : pRastPort;const string_ : pCHAR; count : LONGINT; _textExtent : pTextExtent) : smallint;
4453
 
BEGIN
4454
 
  ASM
4455
 
    MOVE.L  A6,-(A7)
4456
 
    MOVEA.L rp,A1
4457
 
    MOVEA.L string_,A0
4458
 
    MOVE.L  count,D0
4459
 
    MOVEA.L _textExtent,A2
4460
 
    MOVEA.L GfxBase,A6
4461
 
    JSR -690(A6)
4462
 
    MOVEA.L (A7)+,A6
4463
 
    MOVE.L  D0,@RESULT
4464
 
  END;
4465
 
END;
4466
 
 
4467
 
FUNCTION TextFit(rp : pRastPort;const string_ : pCHAR; strLen : ULONG; textExtent : pTextExtent; constrainingExtent : pTextExtent; strDirection : LONGINT; constrainingBitWidth : ULONG; constrainingBitHeight : ULONG) : ULONG;
4468
 
BEGIN
4469
 
  ASM
4470
 
    MOVE.L  A6,-(A7)
4471
 
    MOVEA.L rp,A1
4472
 
    MOVEA.L string_,A0
4473
 
    MOVE.L  strLen,D0
4474
 
    MOVEA.L textExtent,A2
4475
 
    MOVEA.L constrainingExtent,A3
4476
 
    MOVE.L  strDirection,D1
4477
 
    MOVE.L  constrainingBitWidth,D2
4478
 
    MOVE.L  constrainingBitHeight,D3
4479
 
    MOVEA.L GfxBase,A6
4480
 
    JSR -696(A6)
4481
 
    MOVEA.L (A7)+,A6
4482
 
    MOVE.L  D0,@RESULT
4483
 
  END;
4484
 
END;
4485
 
 
4486
 
FUNCTION TextLength(rp : pRastPort;const string_ : pCHAR; count : ULONG) : smallint;
4487
 
BEGIN
4488
 
  ASM
4489
 
    MOVE.L  A6,-(A7)
4490
 
    MOVEA.L rp,A1
4491
 
    MOVEA.L string_,A0
4492
 
    MOVE.L  count,D0
4493
 
    MOVEA.L GfxBase,A6
4494
 
    JSR -054(A6)
4495
 
    MOVEA.L (A7)+,A6
4496
 
    MOVE.L  D0,@RESULT
4497
 
  END;
4498
 
END;
4499
 
 
4500
 
FUNCTION UCopperListInit(uCopList : pUCopList; n : LONGINT) : pCopList;
4501
 
BEGIN
4502
 
  ASM
4503
 
    MOVE.L  A6,-(A7)
4504
 
    MOVEA.L uCopList,A0
4505
 
    MOVE.L  n,D0
4506
 
    MOVEA.L GfxBase,A6
4507
 
    JSR -594(A6)
4508
 
    MOVEA.L (A7)+,A6
4509
 
    MOVE.L  D0,@RESULT
4510
 
  END;
4511
 
END;
4512
 
 
4513
 
PROCEDURE UnlockLayerRom(layer : pLayer);
4514
 
BEGIN
4515
 
  ASM
4516
 
    MOVE.L  A6,-(A7)
4517
 
    MOVEA.L layer,A5
4518
 
    MOVEA.L GfxBase,A6
4519
 
    JSR -438(A6)
4520
 
    MOVEA.L (A7)+,A6
4521
 
  END;
4522
 
END;
4523
 
 
4524
 
FUNCTION VBeamPos : LONGINT;
4525
 
BEGIN
4526
 
  ASM
4527
 
    MOVE.L  A6,-(A7)
4528
 
    MOVEA.L GfxBase,A6
4529
 
    JSR -384(A6)
4530
 
    MOVEA.L (A7)+,A6
4531
 
    MOVE.L  D0,@RESULT
4532
 
  END;
4533
 
END;
4534
 
 
4535
 
FUNCTION VideoControl(colorMap : pColorMap; tagarray : pTagItem) : BOOLEAN;
4536
 
BEGIN
4537
 
  ASM
4538
 
    MOVE.L  A6,-(A7)
4539
 
    MOVEA.L colorMap,A0
4540
 
    MOVEA.L tagarray,A1
4541
 
    MOVEA.L GfxBase,A6
4542
 
    JSR -708(A6)
4543
 
    MOVEA.L (A7)+,A6
4544
 
    TST.W   D0
4545
 
    BEQ.B   @end
4546
 
    MOVEQ   #1,D0
4547
 
  @end: MOVE.B  D0,@RESULT
4548
 
  END;
4549
 
END;
4550
 
 
4551
 
PROCEDURE WaitBlit;
4552
 
BEGIN
4553
 
  ASM
4554
 
    MOVE.L  A6,-(A7)
4555
 
    MOVEA.L GfxBase,A6
4556
 
    JSR -228(A6)
4557
 
    MOVEA.L (A7)+,A6
4558
 
  END;
4559
 
END;
4560
 
 
4561
 
PROCEDURE WaitBOVP(vp : pViewPort);
4562
 
BEGIN
4563
 
  ASM
4564
 
    MOVE.L  A6,-(A7)
4565
 
    MOVEA.L vp,A0
4566
 
    MOVEA.L GfxBase,A6
4567
 
    JSR -402(A6)
4568
 
    MOVEA.L (A7)+,A6
4569
 
  END;
4570
 
END;
4571
 
 
4572
 
PROCEDURE WaitTOF;
4573
 
BEGIN
4574
 
  ASM
4575
 
    MOVE.L  A6,-(A7)
4576
 
    MOVEA.L GfxBase,A6
4577
 
    JSR -270(A6)
4578
 
    MOVEA.L (A7)+,A6
4579
 
  END;
4580
 
END;
4581
 
 
4582
 
FUNCTION WeighTAMatch(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : pTagItem) : smallint;
4583
 
BEGIN
4584
 
  ASM
4585
 
    MOVE.L  A6,-(A7)
4586
 
    MOVEA.L reqTextAttr,A0
4587
 
    MOVEA.L targetTextAttr,A1
4588
 
    MOVEA.L targetTags,A2
4589
 
    MOVEA.L GfxBase,A6
4590
 
    JSR -804(A6)
4591
 
    MOVEA.L (A7)+,A6
4592
 
    MOVE.L  D0,@RESULT
4593
 
  END;
4594
 
END;
4595
 
 
4596
 
PROCEDURE WriteChunkyPixels(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; bytesperrow : LONGINT);
4597
 
BEGIN
4598
 
  ASM
4599
 
    MOVE.L  A6,-(A7)
4600
 
    MOVEA.L rp,A0
4601
 
    MOVE.L  xstart,D0
4602
 
    MOVE.L  ystart,D1
4603
 
    MOVE.L  xstop,D2
4604
 
    MOVE.L  ystop,D3
4605
 
    MOVEA.L array_,A2
4606
 
    MOVE.L  bytesperrow,D4
4607
 
    MOVEA.L GfxBase,A6
4608
 
    JSR -1056(A6)
4609
 
    MOVEA.L (A7)+,A6
4610
 
  END;
4611
 
END;
4612
 
 
4613
 
FUNCTION WritePixel(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
4614
 
BEGIN
4615
 
  ASM
4616
 
    MOVE.L  A6,-(A7)
4617
 
    MOVEA.L rp,A1
4618
 
    MOVE.L  x,D0
4619
 
    MOVE.L  y,D1
4620
 
    MOVEA.L GfxBase,A6
4621
 
    JSR -324(A6)
4622
 
    MOVEA.L (A7)+,A6
4623
 
    MOVE.L  D0,@RESULT
4624
 
  END;
4625
 
END;
4626
 
 
4627
 
FUNCTION WritePixelArray8(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; temprp : pRastPort) : LONGINT;
4628
 
BEGIN
4629
 
  ASM
4630
 
    MOVE.L  A6,-(A7)
4631
 
    MOVEA.L rp,A0
4632
 
    MOVE.L  xstart,D0
4633
 
    MOVE.L  ystart,D1
4634
 
    MOVE.L  xstop,D2
4635
 
    MOVE.L  ystop,D3
4636
 
    MOVEA.L array_,A2
4637
 
    MOVEA.L temprp,A1
4638
 
    MOVEA.L GfxBase,A6
4639
 
    JSR -786(A6)
4640
 
    MOVEA.L (A7)+,A6
4641
 
    MOVE.L  D0,@RESULT
4642
 
  END;
4643
 
END;
4644
 
 
4645
 
FUNCTION WritePixelLine8(rp : pRastPort; xstart : ULONG; ystart : ULONG; width : ULONG; array_ : pointer; tempRP : pRastPort) : LONGINT;
4646
 
BEGIN
4647
 
  ASM
4648
 
    MOVE.L  A6,-(A7)
4649
 
    MOVEA.L rp,A0
4650
 
    MOVE.L  xstart,D0
4651
 
    MOVE.L  ystart,D1
4652
 
    MOVE.L  width,D2
4653
 
    MOVEA.L array_,A2
4654
 
    MOVEA.L tempRP,A1
4655
 
    MOVEA.L GfxBase,A6
4656
 
    JSR -774(A6)
4657
 
    MOVEA.L (A7)+,A6
4658
 
    MOVE.L  D0,@RESULT
4659
 
  END;
4660
 
END;
4661
 
 
4662
 
FUNCTION XorRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
4663
 
BEGIN
4664
 
  ASM
4665
 
    MOVE.L  A6,-(A7)
4666
 
    MOVEA.L region,A0
4667
 
    MOVEA.L rectangle,A1
4668
 
    MOVEA.L GfxBase,A6
4669
 
    JSR -558(A6)
4670
 
    MOVEA.L (A7)+,A6
4671
 
    TST.W   D0
4672
 
    BEQ.B   @end
4673
 
    MOVEQ   #1,D0
4674
 
  @end: MOVE.B  D0,@RESULT
4675
 
  END;
4676
 
END;
4677
 
 
4678
 
FUNCTION XorRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
4679
 
BEGIN
4680
 
  ASM
4681
 
    MOVE.L  A6,-(A7)
4682
 
    MOVEA.L srcRegion,A0
4683
 
    MOVEA.L destRegion,A1
4684
 
    MOVEA.L GfxBase,A6
4685
 
    JSR -618(A6)
4686
 
    MOVEA.L (A7)+,A6
4687
 
    TST.W   D0
4688
 
    BEQ.B   @end
4689
 
    MOVEQ   #1,D0
4690
 
  @end: MOVE.B  D0,@RESULT
4691
 
  END;
4692
 
END;
4693
 
 
4694
 
const
4695
 
    { Change VERSION and LIBVERSION to proper values }
4696
 
 
4697
 
    VERSION : string[2] = '0';
4698
 
    LIBVERSION : longword = 0;
4699
 
 
4700
 
{$ifdef use_init_openlib}
4701
 
  {$Info Compiling initopening of graphics.library}
4702
 
  {$Info don't forget to use InitGRAPHICSLibrary in the beginning of your program}
4703
 
 
4704
 
var
4705
 
    graphics_exit : Pointer;
4706
 
 
4707
 
procedure ClosegraphicsLibrary;
4708
 
begin
4709
 
    ExitProc := graphics_exit;
4710
 
    if GfxBase <> nil then begin
4711
 
        CloseLibrary(GfxBase);
4712
 
        GfxBase := nil;
4713
 
    end;
4714
 
end;
4715
 
 
4716
 
procedure InitGRAPHICSLibrary;
4717
 
begin
4718
 
    GfxBase := nil;
4719
 
    GfxBase := OpenLibrary(GRAPHICSNAME,LIBVERSION);
4720
 
    if GfxBase <> nil then begin
4721
 
        graphics_exit := ExitProc;
4722
 
        ExitProc := @ClosegraphicsLibrary;
4723
 
    end else begin
4724
 
        MessageBox('FPC Pascal Error',
4725
 
        'Can''t open graphics.library version ' + VERSION + #10 +
4726
 
        'Deallocating resources and closing down',
4727
 
        'Oops');
4728
 
        halt(20);
4729
 
    end;
4730
 
end;
4731
 
 
4732
 
begin
4733
 
    GRAPHICSIsCompiledHow := 2;
4734
 
{$endif use_init_openlib}
4735
 
 
4736
 
{$ifdef use_auto_openlib}
4737
 
  {$Info Compiling autoopening of graphics.library}
4738
 
 
4739
 
var
4740
 
    graphics_exit : Pointer;
4741
 
 
4742
 
procedure ClosegraphicsLibrary;
4743
 
begin
4744
 
    ExitProc := graphics_exit;
4745
 
    if GfxBase <> nil then begin
4746
 
        CloseLibrary(GfxBase);
4747
 
        GfxBase := nil;
4748
 
    end;
4749
 
end;
4750
 
 
4751
 
begin
4752
 
    GfxBase := nil;
4753
 
    GfxBase := OpenLibrary(GRAPHICSNAME,LIBVERSION);
4754
 
    if GfxBase <> nil then begin
4755
 
        graphics_exit := ExitProc;
4756
 
        ExitProc := @ClosegraphicsLibrary;
4757
 
        GRAPHICSIsCompiledHow := 1;
4758
 
    end else begin
4759
 
        MessageBox('FPC Pascal Error',
4760
 
        'Can''t open graphics.library version ' + VERSION + #10 +
4761
 
        'Deallocating resources and closing down',
4762
 
        'Oops');
4763
 
        halt(20);
4764
 
    end;
4765
 
 
4766
 
{$endif use_auto_openlib}
4767
 
 
4768
 
{$ifdef dont_use_openlib}
4769
 
begin
4770
 
    GRAPHICSIsCompiledHow := 3;
4771
 
   {$Warning No autoopening of graphics.library compiled}
4772
 
   {$Warning Make sure you open graphics.library yourself}
4773
 
{$endif dont_use_openlib}
4774
 
 
4775
 
 
4776
 
END. (* UNIT GRAPHICS *)
4777
 
 
4778
 
{
4779
 
  $Log: graphics.pas,v $
4780
 
  Revision 1.5  2003/02/10 17:59:46  nils
4781
 
  *  fixes for delphi mode
4782
 
 
4783
 
  Revision 1.4  2003/02/07 20:48:36  nils
4784
 
  * update for amigaos 3.9
4785
 
 
4786
 
  * changed startcode for library
4787
 
 
4788
 
  Revision 1.3  2003/01/13 20:36:00  nils
4789
 
  * added the defines use_amiga_smartlink
4790
 
  * and use_auto_openlib
4791
 
 
4792
 
  Revision 1.2  2002/11/18 20:54:01  nils
4793
 
    * update check internal log
4794
 
 
4795
 
}
4796
 
 
4797
 
  
4798
 
 
4799
 
 
4800