home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Scroll Screen 336
- ** -----------------
- ** This demo allows you to legally scroll up to 50 screens in either
- ** direction by setting the HBUFFER flag. Normally we would blit blocks down
- ** the left and right hand side to give an impression of heaps of screens -
- ** see the MapEditor for this.
- **
- */
-
- MODULE 'games','games/games'
-
- PROC main()
- DEF screen:PTR TO gamescreen, zbxy:LONG, pic:PTR TO picture
-
- IF gmsbase := OpenLibrary('games.library',0)
- SetUserPrefs(0)
- IF (screen := AddScreen([TAGS,0,
- GSA_SCRWIDTH,320,
- GSA_SCRHEIGHT,256,
- GSA_PICWIDTH,336,
- GSA_PICHEIGHT,256,
- GSA_PLANES,5,
- GSA_SCRATTRIB,HSCROLL OR SBUFFER,
- GSA_SCRMODE,LORES OR COL12BIT,
- GSA_SCRTYPE,ILBM,
- TAGEND]))
-
- IF (pic := LoadPic([TAGS,0,
- PCA_DATA,screen.memptr1,
- PCA_WIDTH,336,
- PCA_HEIGHT,256,
- PCA_PLANES,5,
- PCA_AMTCOLOURS,32,
- PCA_OPTIONS,GETPALETTE,
- PCA_SCRMODE,LORES OR COL12BIT,
- PCA_SCRTYPE,ILBM,
- PCA_FILE,'GAMESLIB:data/IFF.Pic336',
- TAGEND]))
-
- screen.palette := pic.palette
- UpdatePalette(screen)
-
- ShowScreen(screen)
- InitJoyPorts()
-
- REPEAT
- zbxy := ReadMouse(JPORT1)
- screen.picxoffset := screen.picxoffset+getZBXYx(zbxy)
- MovePicture(screen)
- WaitSVBL()
- UNTIL !(zbxy AND MB_LMB)
-
- FreePic(pic)
- ENDIF
- DeleteScreen(screen)
- ENDIF
- CloseLibrary(gmsbase)
- ENDIF
- ENDPROC
-