Changeset 47 for trunk/src/map.cpp


Ignore:
Timestamp:
Jul 4, 2010, 2:07:55 AM (10 years ago)
Author:
sam
Message:

The layer name is no longer ignored.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/map.cpp

    r38 r47  
    2828        fgets(tmp, 1024, fp); // Ignore rest of line
    2929        layers = (Layer **)realloc(layers, sizeof(Layer **) * (nlayers + 1));
    30         layers[nlayers] = new Layer(width, height, fp);
     30        layers[nlayers] = new Layer(name, width, height, fp);
    3131        nlayers++;
    3232    }
     
    4545{
    4646    for (int i = 0; i < nlayers; i++)
     47    {
     48        int z = layers[i]->GetZ();
     49
    4750        for (int y = 0; y < 32; y++)
    4851            for (int x = 0; x < 32; x++)
    49                 tiler->AddTile(layers[i]->GetTile(x, y), x * 32, y * 32, i);
     52                tiler->AddTile(layers[i]->GetTile(x, y), x * 32, y * 32, z);
     53    }
    5054}
    5155
Note: See TracChangeset for help on using the changeset viewer.