@TheComet
Have you used memblocks with bitmaps etc before?
You'd do it like that but write your own header...
In the header we need to store how many waypoints there are.
I'll write this as a DWORD so we can have thousands!
We could also define the memory required for each waypoint in the header to allow for differently scaled worlds but I'm just going to use DWORDS for that too. So that's 3 DWORDS for x, y and z (12 bytes).
rem memblock header
max_waypoints = 20
rem make memblock using header (we add 4 bytes to include the header)
make memblock 1, 4 + max_waypoints*12
Ok that's the memblock set up. Now to read and write it we just use our references...
n=5
rem reading waypoint n
way_x = memblock dword 1, 4 + n*12
way_y = memblock dword 1, 4 + n*12 + 4
way_z = memblock dword 1, 4 + n*12 + 8
I hope that works I haven't tested it.
Riddle: The more you take, the more you leave behind. What are they?
Answer