Changeset 79 for trunk/src/map.cpp


Ignore:
Timestamp:
Jul 8, 2010, 2:00:13 AM (11 years ago)
Author:
sam
Message:

Rendering starts to work again. There is no Z-sorting yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/map.cpp

    r76 r79  
    5757        fgets(tmp, BUFSIZ, fp);
    5858
    59         if (tiles)
     59        if (tiles && !strchr(tmp, '<'))
    6060        {
    6161            /* We are in the process of reading layer data. Only stop
     
    9595                data->nlayers++;
    9696                tiles = NULL;
     97                //fprintf(stderr, "new layer %ix%i\n", width, height);
    9798            }
    9899        }
     
    107108            data->tilers[data->ntilers] = Tiler::Register(str);
    108109            data->ntilers++;
     110            //fprintf(stderr, "new tiler %s\n", str);
    109111        }
    110112        else if (sscanf(tmp, " <layer name=\"%c%i%c%*[^\"]\" "
     
    135137}
    136138
    137 void Map::Draw()
     139void Map::Render(Scene *scene, int x, int y, int z)
    138140{
    139141    for (int i = 0; i < data->nlayers; i++)
    140         data->layers[i]->Draw();
     142        data->layers[i]->Render(scene, x, y, z);
    141143}
    142144
Note: See TracChangeset for help on using the changeset viewer.