A85: Matrices


[Prev][Next][Index][Thread]

A85: Matrices



Question, Say I have a matice.  It looks like this

Level:
	.db 0,0,0,1,1,0,0,0
	.db 0,4,3,1,1,1,2,0
	.db 0,1,2,1,1,1,1,0
	.db 0,1,1,1,1,1,1,0
	.db 0,1,1,1,1,1,1,0
	.db 0,1,1,1,1,1,1,0
	.db 0,1,1,1,1,1,1,0
	.db 0,0,0,0,0,0,0,0

and say 2 is a moveable box the person moves 2 from (3,3) to (3,4). 
Then you leave the room so it laods another room then they come back
into that room and I want it to keep the box where they left it, but the
only way to do that is to store the place into the Level matrix (right?)
well, I tried what I thought woudl work and it didn't!  What do I do? 
Any good routines for storing numbers into a matrix that will stay in it
until the game is exited?

Thanks,
John