Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   how to read *_conv.dat... for dummies, who not use search (https://postpacific.loc-online.com/showthread.php?t=3976)

humordwarf 11.04.2006 01:20

how to read *_conv.dat... for dummies, who not use search
 
each conv file contain 256*256 blocks (cells)
each block - 8x8 subcells

HEADER (18 bytes)
Code:

BYTE    MapX
BYTE    MapY
WORD  w0080
WORD  w0010
DWORD dw1
DWORD dw2
DWORD dw3

w0080 and w0010 always same
dw1-dw3 counts blocks, you may not use it (but seems server use this values for allocating memory and/or for checking integrity)

ALGORITHM
Code:

repeat 256x256 times
{
  read WORD from file (starting after header)
  compare if >00FF -> its error i think... means > 192 layers
  compare to 0000 -> read next data as block0000
  compare to 0040 -> read next data as block0040
  compare if >0040 - > read next data as block0041
}

block0000
Code:

read SHORT z to z1
read SHORT z to z2
NSWE = (z as unsigned short) and 0x0F
actual z = as signed short((z as unsigned short) and 0x0FFF0)
set all 8x8 subcells to z1 (or z2, or average value... dunno)

block0040
Code:

repeat 64 times (for each 8x8 subcell)
{
  read SHORT z to subcells
  NSWE = (z as unsigned short) and 0x0F
  actual z = as signed short((z as unsigned short) and 0x0FFF0) / 2
}

block0041
Code:

repeat 64 times (for each 8x8 subcell)
{
  layer = 0
  read SHORT to layercounter
  repeat layercounter times
  {
    read SHORT z to subcell[layer]
    layer = layer + 1
    NSWE = (z as unsigned short) and 0x0F
    actual z = as signed short((z as unsigned short) and 0x0FFF0) / 2
  }
}


hamidouch 11.04.2006 02:23

about that, i was wondering
walls made with hdge aren't solids, you can shoot arrows through them,
dont u lack sort of Z2 ?

tpuNIsher 11.04.2006 03:06

Yah, been thinking 'bout it as well..
There's prolly only one way..
layer the wall ._.

But think about layering TOI walls... ._.
anything HD?

*edit*

also, if i want to layer TOI walls..
32 ain't enough layers..
any ways the layer limit could be increased to as much as we want it to be?

drzoom 11.04.2006 03:30

Thanks, humordwarf.
Just wanted to icq you:)


All times are GMT. The time now is 15:27.