Changeset 752


Ignore:
Timestamp:
Apr 4, 2011, 2:05:49 AM (10 years ago)
Author:
sam
Message:

monsterz: do not display the interface in the title screen.

Location:
trunk/monsterz
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/monsterz/board.cpp

    r746 r752  
    4343    int minnpieces, npieces, maxnpieces;
    4444
    45     int board, tiles, icons;
     45    int screen, board, tiles, icons;
    4646    int click, whip;
    4747
     
    105105    data->npieces = minnpieces;
    106106    data->maxnpieces = maxnpieces;
     107    data->screen = Tiler::Register(PNG_BACKGROUND, vec2i(640, 480), 0, 1.0f);
    107108    data->board = Tiler::Register(PNG_BOARD, 384, 0, 1.0f);
    108109    data->tiles = Tiler::Register(PNG_TILES, data->size, 0, 1.0f);
     
    367368    Scene::GetDefault()->AddTile((data->board << 16) | 0,
    368369                                 position.x, position.y, 1, 0);
     370    Scene::GetDefault()->AddTile((data->screen << 16) | 0, 0, 0, 10, 0);
    369371
    370372    switch (data->game)
     
    847849     * scheduled its sprites! */
    848850    Ticker::Unref(data->emitter);
     851    Tiler::Deregister(data->screen);
    849852    Tiler::Deregister(data->board);
    850853    Tiler::Deregister(data->tiles);
  • trunk/monsterz/interface.cpp

    r750 r752  
    3737    Title *title;
    3838    Board *board;
    39     int screen, tiles;
     39    int tiles;
    4040
    4141    enum
     
    5757    data->title = NULL;
    5858    data->board = NULL;
    59     data->screen = Tiler::Register(PNG_BACKGROUND, vec2i(640, 480), 0, 1.0f);
    6059    data->tiles = Tiler::Register(PNG_TILES, 48, 0, 1.0f);
    6160    data->state = InterfaceData::INIT;
     
    101100    vec2i mouse = Input::GetMousePos();
    102101
    103     Scene::GetDefault()->AddTile((data->screen << 16) | 0, 0, 0, 10, 0);
    104 
    105102    if (Platform::GetMouseCount() && mouse.x >= 0 && mouse.y >= 0)
    106103    {
     
    117114        Ticker::Unref(data->board);
    118115    Tiler::Deregister(data->tiles);
    119     Tiler::Deregister(data->screen);
    120116    delete data;
    121117}
Note: See TracChangeset for help on using the changeset viewer.