Changeset 341


Ignore:
Timestamp:
Feb 3, 2011, 2:28:48 AM (10 years ago)
Author:
sam
Message:

Use the Thumbs class in the new Fusion board, too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/monsterz/fusion.cpp

    r339 r341  
    2121#include "fusion.h"
    2222#include "piece.h"
     23#include "thumbs.h"
    2324#include "mash.h"
    2425#include "monsterz.h"
     
    3536    int2 dim;
    3637    int npieces;
    37     int board, tiles, icons;
     38    int board, tiles;
    3839
    3940    struct Pair
     
    4546    int next[2], rotation;
    4647
    47     Text *counticons[MAX_PIECES];
    48     int counts[MAX_PIECES];
    49 
    5048    Text *scoretext;
    5149    int score;
    5250
    5351    Emitter *emitter;
     52    Thumbs *thumbs;
    5453
    5554    enum
     
    7170    data->board = Tiler::Register(PNG_BOARD, 384, 384, 1.0f);
    7271    data->tiles = Tiler::Register(PNG_TILES, 48, 48, 1.0f);
    73     data->icons = Tiler::Register(PNG_ICONS, 24, 24, 1.0f);
    7472
    7573    data->emitter = new Emitter(data->tiles, float3(0, -0.0006f, 0));
    7674    Ticker::Ref(data->emitter);
     75
     76    data->thumbs = new Thumbs(npieces);
     77    Ticker::Ref(data->thumbs);
    7778
    7879    for (int j = 0; j < data->dim.j; j++)
     
    201202    Input::UntrackMouse(this);
    202203
     204    Ticker::Unref(data->thumbs);
    203205    for (int j = 0; j < data->dim.j; j++)
    204206        for (int i = 0; i < data->dim.i; i++)
     
    210212    Tiler::Deregister(data->board);
    211213    Tiler::Deregister(data->tiles);
    212     Tiler::Deregister(data->icons);
    213214    delete data;
    214215}
Note: See TracChangeset for help on using the changeset viewer.