Ignore:
Timestamp:
Aug 26, 2011, 7:20:39 PM (9 years ago)
Author:
sam
Message:

core: add a Sprite class to try to factor some common logic currently
found in the game. Will be greatly improved later.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/monsterz/title.cpp

    r860 r862  
    4444    TileSet *event[7];
    4545
     46    Sprite *logo_sprite;
     47
    4648    enum
    4749    {
     
    138140
    139141    data->logo = Tiler::Register(PNG_TITLE_LOGO, vec2i(380, 181), 0, 1.0f);
     142    data->logo_sprite = new Sprite(data->logo, 0);
     143    data->logo_sprite->position = vec3(26, 250, 3);
     144    Ticker::Ref(data->logo_sprite);
     145
    140146    data->ground = Tiler::Register(PNG_TITLE_GROUND, vec2i(384, 80), 0, 1.0f);
    141147    data->ground_pos = vec2i((vec2)(bbox[1] - bbox[0]) / vec2i(2, 4))
     
    375381                                     vec3i(data->ground_pos.x + pos.x,
    376382                                           data->ground_pos.y + pos.y, 1), 0);
    377 
    378     /* The logo, on top of the rest. */
    379     Scene::GetDefault()->AddTile(data->logo, 0, vec3i(26, 250, 3), 0);
    380383}
    381384
     
    389392    Input::UntrackMouse(this);
    390393    Tiler::Deregister(data->logo);
     394    Ticker::Unref(data->logo_sprite);
    391395    Tiler::Deregister(data->ground);
    392396    Tiler::Deregister(data->title);
Note: See TracChangeset for help on using the changeset viewer.