Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving a map.
#1
Ok, i have created a map on Screen 0:Width 80,50
After creating i want to save in on OldMap and colors are stored on OldMapC.

OldMap & OldMapC are dimmed and so on...

--- Code ---
SUB Readmap

FOR i = 1 TO 48
FOR i2 = 1 TO 78
OldMap(i, i2) = SCREEN(i, i2)
OldMapC(i, i2) = SCREEN(i, i2, 1)
NEXT
NEXT
--- End of code ---

Yeah, it´s in there now. I can read it from there.
Next ill try to draw 10*10 area of map.

--- Code ---
Sub DrawMap

FOR q = x - 5 TO x + 5
FOR w = y - 5 TO y + 5
COLOR OldMapC(q, w): LOCATE q, w: PRINT CHR$(OldMap(q, w))
NEXT
NEXT
--- End of code ---

Yeah, "LOCATE q,w: PRINT CHR..." prints right place from the map but it also draws it on the same place where it was when created.
I have tryed several ways to print that piece of map in same place (middle of screen) all times but havent figured out how. Propably the answer is easy as hell but now im stuck with it =)
url=http://www.ascii-world.com]ASCII-World.com[/url]
Yeah, nick changed from lurah, but bullshit's are the same.
Reply
#2
Can you post more code? It's better for people to test it. Tongue
Reply
#3
Ok, ill figured it out my self. :bounce:
url=http://www.ascii-world.com]ASCII-World.com[/url]
Yeah, nick changed from lurah, but bullshit's are the same.
Reply
#4
8)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)