home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / misc / gms_dev.lha / GMS / Source / Asm / UsingObjects / OBJScreenData.s < prev    next >
Encoding:
Text File  |  1997-02-04  |  2.4 KB  |  75 lines

  1. ;Object Data for the OBJScreen.s demo
  2. ;------------------------------------
  3. ;This is a data-file, so we must assemble under absolute mode with the
  4. ;org directive (no section/executable headers allowed).  In future these
  5. ;files will be created with a GUI interface - you might have to wait a little
  6. ;while for this!
  7. ;
  8. ;Of interest to all programmers: DATA and CODE objects may also be specified,
  9. ;which can be extremely useful as you might imagine.  Some demos showing
  10. ;these features will be available soon.
  11.  
  12.  
  13.     INCDIR    "INCLUDES:"
  14.     INCLUDE    "games/games.i"
  15.  
  16.     ORG    $0
  17.     FILE    "GAMESLIB:data/OBJ.Screen" ;PhxAss directive (file dest)
  18.  
  19. Objects:
  20.     dc.b    "GOBJ"
  21.  
  22. ;---------------------------------------------------------------------------;
  23. ;This is the GameScreen.  It is not necessary to set all the fields as the
  24. ;demo will grab most of them from the Picture object and write them to
  25. ;the GameScreen structure for us.  However, things like screen width/height,
  26. ;the attribute flags, and screen offsets must be specified here.
  27.  
  28. OBJ_GameScreen:
  29.     dc.l    "STRC"    ;Structure ID.
  30.     dc.l    .end    ;Offset towards end of the object.
  31.     dc.b    "DemoScreen",0    ;Name.
  32.     even
  33.     dc.l    GSV1,0
  34.     dc.l    0,0,0    ;Screen memory 1/2/3.
  35.     dc.l    0    ;Screen link.
  36.     dc.l    0    ;Address of palette.
  37.     dc.l    0    ;Address of rasterlist.
  38.     dc.l    0    ;Amount of colours in palette.
  39.     dc.w    640,256    ;Screen Width and Height. 
  40.     dc.w    0,0,0    ;Picture Widths and Height.
  41.     dc.w    0    ;Amount of planes.
  42.     dc.w    0,0    ;X/Y screen offset.
  43.     dc.w    0,0    ;X/Y picture offset.
  44.     dc.l    CENTRE    ;Special attributes.
  45.     dc.w    0    ;Screen mode.
  46.     dc.w    0    ;Screen type
  47. .end
  48.  
  49. ;---------------------------------------------------------------------------;
  50. ;This picture structure defines how the picture will be loaded in.  You can
  51. ;play with things like the resolution, 12 or 24 bit colour, the file name
  52. ;and so on.  Deleting the GETPALETTE and VIDEOMEM flags could make the demo
  53. ;crash, so you can see that you always have to be careful when editing
  54. ;structures on such a low level.
  55.  
  56. OBJ_Picture:
  57.     dc.l    "STRC"    ;Structure ID.
  58.     dc.l    .end    ;Offset towards end of the object.
  59.     dc.b    "DemoPicture",0    ;Name.
  60.     even
  61.     dc.l    PCV1,0    ;Version header.
  62.     dc.l    0    ;Source data.
  63.     dc.w    640,0,256    ;Width, Height.
  64.     dc.w    4    ;Amount of Planes.
  65.     dc.l    16    ;Amount of colours.
  66.     dc.l    0    ;Source palette.
  67.     dc.w    HIRES|COL12BIT|LACED    ;Screen mode.
  68.     dc.w    ILBM    ;Screen type.
  69.     dc.l    GETPALETTE|VIDEOMEM    ;Parameters.
  70.     dc.l    .file
  71. .file    dc.b    "GAMESLIB:data/IFF.Pic640x256",0
  72.     even
  73. .end
  74.     dc.l    "OEND"
  75.