array maps

Blitz3D Forums/Blitz3D Beginners Area/array maps

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You could build a type list. Each time something moves, post it's old co-ords into it, with a flag stating either insert or remove occupied status.

The program will search through this type list afterwards and make the nesessary changes.


Type postbox
   field x,y
   field flag ; 0 for remove occupied status. 1 for mark as occupied.
End Type



p.postbox = new postbox
p\x = arrayx
p\y = arrayy
p\flag = 0


Something like that?

Then, when it comes to process it:

For p.postbox = each postbox
   if p\flag = 0 then
      array(p\x,p\y) = <mark as empty>
   elseif p\flag = 1 then
      array(p\x,p\y) = <mark as occupied>
   end if
   delete p.postbox
Next