Re: A85: Matrices


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

Re: A85: Matrices



I had a simmilar problem.  Basically, what you can do, is either of the
following:

1) make changes not effect the map in any way by copying the map to
text_mem, and modifying that while the player is in the room

--or--

2) make changes effect the map by just using what's down in your program.

There's really no way to "reset" a map unless you want to have two copies
of the map in your program.  I faced a simmilar problem with darkness.  YOU
COULD have a Huffman compressed version of your level, uncompress it, then
store it back over the old level when you want to reset, but that's about it.

At 04:07 PM 8/30/97 -0500, you wrote:
>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
>
>
---
Evil Jim
Viva La Mexico
<eviljim@writeme.com>
http://members.tripod.com/~eviljim/
I want to die in my sleep like my Grandfather, not screaming in pain like
the passengers in my car...


References: