Ignore:
Timestamp:
Jul 6, 2010, 2:02:41 PM (11 years ago)
Author:
sam
Message:

Breaking the map/layer code apart. Needs more work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/layer.cpp

    r57 r70  
    22#include "layer.h"
    33
    4 Layer::Layer(char const *name, int w, int h, FILE *fp)
     4Layer::Layer(int w, int h, int z, char const *base64)
    55{
    66    width = w;
    77    height = h;
     8    level = z;
    89    data = new unsigned int[w * h];
    910
    10     if (sscanf(name, "Ground %d", &z) == 1)
    11         ;
    12     else if (sscanf(name, "Ground Decal %d", &z) == 1)
    13         ;
    14     else if (sscanf(name, "Object %d", &z) == 1)
    15         z++;
    16     else if (sscanf(name, "Wall %d", &z) == 1)
    17         z++;
    18     else if (sscanf(name, "Wall Decal %d", &z) == 1)
    19         z++;
    20     else
    21         z = -1;
    22 
     11#if 0
    2312    fread(data, sizeof(unsigned int), width * height, fp);
    2413    for (int n = 0; n < width * height; n++)
     
    2817        data[n] = i ? i - 1 : 0;
    2918    }
     19#endif
    3020}
    3121
     
    3727int Layer::GetZ()
    3828{
    39     return z;
     29    return level;
    4030}
    4131
Note: See TracChangeset for help on using the changeset viewer.