Ignore:
Timestamp:
Aug 1, 2011, 12:23:28 AM (9 years ago)
Author:
sam
Message:

tiler: ensure AddTile() and BlitTile() accept vec3i arguments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tileset.cpp

    r787 r792  
    179179}
    180180
    181 void TileSet::BlitTile(uint32_t id, int x, int y, int z, int o,
     181void TileSet::BlitTile(uint32_t id, vec3i pos, int o,
    182182                       float *vertex, float *texture)
    183183{
     
    194194        float tmp[10];
    195195
    196         *vertex++ = tmp[0] = x;
    197         *vertex++ = tmp[1] = dilate * (y + dy);
    198         *vertex++ = tmp[2] = dilate * (z + dz);
     196        *vertex++ = tmp[0] = pos.x;
     197        *vertex++ = tmp[1] = dilate * (pos.y + dy);
     198        *vertex++ = tmp[2] = dilate * (pos.z + dz);
    199199        *texture++ = tmp[3] = tx;
    200200        *texture++ = tmp[4] = ty;
    201201
    202         *vertex++ = x + dx;
    203         *vertex++ = dilate * (y + dy);
    204         *vertex++ = dilate * (z + dz);
     202        *vertex++ = pos.x + dx;
     203        *vertex++ = dilate * (pos.y + dy);
     204        *vertex++ = dilate * (pos.z + dz);
    205205        *texture++ = tx + data->tx;
    206206        *texture++ = ty;
    207207
    208         *vertex++ = tmp[5] = x + dx;
    209         *vertex++ = tmp[6] = dilate * y;
    210         *vertex++ = tmp[7] = dilate * z;
     208        *vertex++ = tmp[5] = pos.x + dx;
     209        *vertex++ = tmp[6] = dilate * pos.y;
     210        *vertex++ = tmp[7] = dilate * pos.z;
    211211        *texture++ = tmp[8] = tx + data->tx;
    212212        *texture++ = tmp[9] = ty + data->ty;
     
    224224        *texture++ = tmp[9];
    225225
    226         *vertex++ = x;
    227         *vertex++ = dilate * y;
    228         *vertex++ = dilate * z;
     226        *vertex++ = pos.x;
     227        *vertex++ = dilate * pos.y;
     228        *vertex++ = dilate * pos.z;
    229229        *texture++ = tx;
    230230        *texture++ = ty + data->ty;
Note: See TracChangeset for help on using the changeset viewer.