www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/27/16:01:14

From: mejorm AT aol DOT com (Mejorm)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Scrolling+sprites
Date: 27 Nov 1997 18:10:10 GMT
Lines: 18
Message-ID: <19971127181000.NAA02026@ladder01.news.aol.com>
NNTP-Posting-Host: ladder01.news.aol.com
Organization: AOL http://www.aol.com
References: <3472EE16 DOT 41C6 AT cc DOT hut DOT fi>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I am coding a 2-D Red Alert Style thing, and ran into similar 
problems.  Eventually, I gave up on the scroll_screen function
all together.  In your code outline, I notcied you are already 
using a blit to the buffer for the background.  Try putting a variable
in there to move around, instead of using scroll screen.
like 
BITMAP *background, *active_page;
background=create_bitmap(1000,1000); 
active_page=create_bitmap(800,600);

then load everything onto the active_page bitmap for screen print
To scroll, I simply blit a different section of the background image to the
active page.
(Any time I change the x,y coordinate of the "view", I also adjust
the x/y coordinate of the sprites by the same amount)
I am new to the allegro library and DJGPP in general.  But I hope the advise is
good. In general, I could not get results from scroll screen.  Anyone out there
correct me if that "general advise" s poor.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019