Ignore:
Timestamp:
Feb 4, 2011, 12:42:20 AM (10 years ago)
Author:
sam
Message:

Display next piece as a thumbnail.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/monsterz/fusion.cpp

    r348 r350  
    3737    int2 dim;
    3838    int minnpieces, npieces, maxnpieces;
    39     int board, tiles;
     39    int board, tiles, icons;
    4040
    4141    struct Pair
     
    7474    data->board = Tiler::Register(PNG_BOARD, 384, 384, 1.0f);
    7575    data->tiles = Tiler::Register(PNG_TILES, 48, 48, 1.0f);
     76    data->icons = Tiler::Register(PNG_ICONS, 24, 24, 1.0f);
    7677
    7778    data->emitter = new Emitter(data->tiles, float3(0, -0.0006f, 0));
     
    217218    Scene::GetDefault()->AddTile((data->board << 16) | 0,
    218219                                 position.x, position.y, 1, 0);
     220
     221    Scene::GetDefault()->AddTile((data->icons << 16) | (data->next[0] - 1),
     222                                 350, 400, 11, 0);
     223    Scene::GetDefault()->AddTile((data->icons << 16) | (data->next[1] - 1),
     224                                 380, 400, 11, 0);
    219225}
    220226
     
    346352
    347353        if (i2 >= 0 && i2 < data->dim.i && j2 >= 0 && j2 < data->dim.j
    348              && data->pairs[i2][j2].id == data->pairs[i][j].id 
     354             && data->pairs[i2][j2].id == data->pairs[i][j].id
    349355             && list[i2][j2] == -1)
    350356        {
     
    375381    Tiler::Deregister(data->board);
    376382    Tiler::Deregister(data->tiles);
     383    Tiler::Deregister(data->icons);
    377384    delete data;
    378385}
Note: See TracChangeset for help on using the changeset viewer.