From: Loren Petrich <>
Subject: Analyzing Pathways into Darkness's DPIN resource
Message-ID: <>
Date: Mon, 17 Apr 2000 11:15:26 GMT
Organization: @Home Network

   As I had discovered earlier, the 'dpin' resource in the PID app
appears to be some extra map data. It has the form of a header with
size 2876 bytes followed by 25 chunks with sizes of 9112 bytes each.
The header is very difficult to puzzle out, but I have had more success
in finding patterns in the chunks for the levels, even if not in
interpreting those patterns.

This is in C/C++ form for convenience; some of the comments may wrap.

// Very speculative

struct PID_DPIN_HdrBlock {
   short Unknown[4];

struct PID_DPIN_Header {
   // Nonzero values are very sparse in it, and show little sign of
   short Unknown1[414];
   // All but the first few of this one's members are {-1, 0, 0, 0} as
   PID_DPIN_HdrBlock Unknown2[256];

// Plausible

struct PID_DPIN_Item {
   // Like the two presumed longs at the beginning of each level in the
map-file data,
   // the upper 2 bytes of each are almost always zero.
   long Unknown1[2];
   // The first one is 192 + some small number
   // The second one is either a small number or 128 + a small number,
   //    something like the (presumed) texture ID in PID_Wall
   // The fourth one is a small number never greater than about 7
   byte Unknown2[4];
   // Always zero
   short Unused;
   // Index to whatever extra items might be present
   // (debris near pillars, stuff at corpses); -1 is none
   short ExtraItem;

// No idea what this is
struct PID_DPIN_Unknown {
   short Unknown[4];

struct PID_DPIN_Level {
   // These have some pattern of small value / big value,
   // and the first one is sometimes full (all nonzero).
   // THe sum of the two sizes is 300.
   short Unknown1[256];
   short Unknown2[44];
   // Has value {0, 0, -1, 0} when unused
   PID_DPIN_Unknown Unknown3[40];
   // Always either 0 or 1024
   long Unknown4[16];
   // Referenced from PID_Sector::Item and PID_DPIN_Item::ExtraItem;
   // the unused ones are all zeros except for ExtraItem, which is -2.
   PID_DPIN_Item Items[500];
   // Always zero
   byte Unused[128];

Loren Petrich
Happiness is a fast Macintosh
And a fast train