TGC Codebase Backup



Full by Richard Davey

16th Sep 2003 10:46
Summary

Full-screen vertical scrolling trick with image-wraparound - doesn't actually "scrolly" anything.



Description



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    `	------------------------------------------------------------------------
`	Vertical Scroller                          DarkForge Snippet (19/8/2000)
`	------------------------------------------------------------------------
`	Full-screen vertical scrolling with image-wraparound
`	Doesn't actually "scroll" anything

sync rate 0
sync on
hide mouse

load bitmap "anhk_inside.bmp",1
create bitmap 2,640,480

set current bitmap 1
for i=1 to 480
	get image i,0,i-1,640,i
next i

set text opaque
ink rgb(255,255,255),0

dim y(480)
for a=1 to 480
	y(a)=a
next a

do

	set current bitmap 2

	for i=1 to 480
		paste image y(i),0,i
		oldy=y(i)
		inc oldy
		if oldy>480 then oldy=1
		y(i)=oldy
	next i

	text 0,0,str$(screen fps())

	set current bitmap 0
	copy bitmap 2,0

	sync

loop