Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Trouble With Scrolling Map (Ncurses)

121 views
Skip to first unread message

Kevin Barbour

unread,
May 8, 2012, 12:44:29 PM5/8/12
to
I've recently started working on a Roguelike using Ncurses and C++ and am having some trouble after making the map scroll as the player moves on screen. The map scrolls fine, but the area outside of the visible map starts black and then changes to grey as I move around, then staying that gray color as in these pictures (disregard the m's and I's, haven't gotten around to making objects affected by FoV yet):
http://ompldr.org/vZG8ycw
http://ompldr.org/vZG8ydA

Eventually making the entire background the grey color as seen here:
http://ompldr.org/vZG8yeA

I'm doing the scrolling by drawing the entire map to a pad, and then putting the visible portion of the map onto an area of the screen. Ideally I would actually like the background outside the visible area to be the grey color that it eventually becomes, but hopefully fixing this issue would help me solve both of these problems. I've spent a long time searching around for an issue like this and info on drawing pads to the screen but can't seem to find anything that helps. Does anyone know of a way that I can set a default background color for the entire screen initially that will not change?

Here's the relevant part of the code to the screen being drawn.
http://pastebin.com/HQEc0Mp3

Thanks,
Kevin
0 new messages