/* ** $VER: screens.e V0.8B ** ** Screen Definitions. ** ** (C) Copyright 1996-1997 DreamWorld Productions. ** All Rights Reserved */ OPT MODULE OPT EXPORT OPT PREPROCESS MODULE 'gms/dpkernel','graphics/blitter','system/register' /**************************************************************************** ** Screen object. */ CONST SCRVERSION = 1 CONST TAGS_SCREEN = $FFFB0009 OBJECT screen head[1] :ARRAY OF head memptr1 :LONG -> Ptr to screen 1 memptr2 :LONG -> Ptr to screen 2 (double buffer) memptr3 :LONG -> Ptr to screen 3 (triple buffer) screenlink :LONG -> Ptr to a linked screen palette :LONG -> Ptr to the screen palette rasterlist :LONG -> Ptr to a rasterlist amtcolours :LONG -> The amount of colours in the palette. scrwidth :INT -> The width of the visible screen scrheight :INT -> The height of the visible screen picwidth :INT -> The width of the picture in pixels. picbytewidth :INT -> The width of the picture in bytes. picheight :INT -> The height of the entire screen planes :INT -> The amount of planes in da screen scrxoffset :INT -> Hardware co-ordinate for TOS scryoffset :INT -> Hardware co-ordinate for LOS picxoffset :INT -> Offset of the horizontal axis picyoffset :INT -> Offset of the vertical axis attrib :LONG -> Special Attributes are? scrmode :INT -> What screen mode is it? scrtype :INT -> Interleaved/Planar/Chunky? task :LONG -> R: Task that owns this screen. planesize :LONG -> R: Size of a plane (bytewidth*height). bitmap :PTR TO bitmap ENDOBJECT CONST BUFFER1 = 8, BUFFER2 = 12, BUFFER3 = 16 -> SCREEN ATTRIBUTES (attrib) CONST DBLBUFFER = $00000001, -> For double buffering TPLBUFFER = $00000002, -> Triple buffering!! PLAYFIELD = $00000004, -> Set if it's part of a playfield HSCROLL = $00000008, -> Gotta set this to do scrolling VSCROLL = $00000010, -> For vertical scrolling SPRITES = $00000020, -> Set this if you want sprites SBUFFER = $00000040, -> Creates a scroll buff for up to 100 screens. CENTRE = $00000080, -> Centres the screens (sets XOffset/YOffset). BLKBDR = $00000100, -> Gives a blackborder on AGA machines NOSCRBDR = $00000200 -> For putting sprites in the border -> SCREEN TYPES (type) CONST INTERLEAVED = 1, -> These are actual numbers, not bits. ILBM = 1, PLANAR = 2, CHUNKY8 = 3, CHUNKY16 = 4, TRUECOLOUR = 5 -> SCREEN MODES (mode) CONST HIRES = $0001, -> High resolution SHIRES = $0002, -> Super-High resolution LACED = $0004, -> Interlaced LORES = $0008, -> Low resolution (default) EXTRAHB = $0010, -> Extra HalfBrite SLACED = $0020, -> Super-Laced resolution. HAM = $0040 -> For HAM mode #define WAITLINE(a) Shl(00,16) OR (a),0 #define COLOUR(a,b) Shl(02,16),(a),(b),0 #define NEWPALETTE(a,b,c) Shl(04,16),(a),(b),(c),0 #define COLOURLIST(a,b,c,d) Shl(06,16) OR (a),Shl(b,16) OR (c),(d),0 #define SPRITE(a) Shl(08,16) OR (a),0 #define SCROLL(a,b,c) Shl(10,16) OR (a),Shl(b,16) OR (c),0 #define FSCROLL(a,b,c,d) Shl(12,16) OR (a),Shl(b,16) OR (c),Shl(d,16),0 #define FLOOD Shl(14,16),0 #define REPOINT(a) Shl(16,16),(a),0 #define MIRROR Shl(18,16),0 #define RASTEND $ffffffff /* Screen tags */ CONST GSA_MEMPTR1 = $C0000000+12, GSA_MEMPTR2 = $C0000000+16, GSA_MEMPTR3 = $C0000000+20, GSA_SCREENLINK = $C0000000+24, GSA_PALETTE = $C0000000+28, GSA_RASTERLIST = $C0000000+32, GSA_AMTCOLOURS = $80000000+36, GSA_SCRWIDTH = $40000000+40, GSA_SCRHEIGHT = $40000000+42, GSA_PICWIDTH = $40000000+44, GSA_PICBYTEWIDTH = $40000000+46, GSA_PICHEIGHT = $40000000+48, GSA_PLANES = $40000000+50, GSA_SCRXOFFSET = $40000000+52, GSA_SCRYOFFSET = $40000000+54, GSA_PICXOFFSET = $40000000+56, GSA_PICYOFFSET = $40000000+58, GSA_SCRATTRIB = $80000000+60, GSA_SCRMODE = $40000000+64, GSA_SCRTYPE = $40000000+66 ->*************************************************************************** ->* Sprite object. #define SPRVERSION 1 #define TAGS_SPRITE ((ID_SPCTAGS<<16)|ID_SPRITE) OBJECT sprite head[1] :ARRAY OF head number :INT -> Bank number to access data :LONG -> Pointer to Sprite graphic xpos :INT -> X position ypos :INT -> Y position frame :INT -> Frame number width :INT -> Width in pixels height :INT -> Height in pixels amtcolours :INT -> 4 or 16 colstart :INT -> Colour bank to access, increments of 16 planes :INT -> Amount of planes per bank scrmode :INT -> HiRes/LoRes/SHiRes fieldpos :INT -> Field position in relation to playfields attrib :INT -> Attributes (XLONG) ENDOBJECT CONST XLONG = $0001 CONST SPA_NUMBER = $40000008, SPA_DATA = $C000000A, SPA_XCOORD = $4000000E, SPA_YCOORD = $40000010, SPA_FRAME = $40000012, SPA_WIDTH = $40000014, SPA_HEIGHT = $40000016, SPA_AMTCOLOURS = $40000018, SPA_COLSTART = $4000001A, SPA_PLANES = $4000001C, SPA_SCRMODE = $4000001E, SPA_FIELDPRI = $40000020, SPA_ATTRIB = $40000022