Changeset 1030


Ignore:
Timestamp:
Oct 21, 2011, 7:06:42 PM (9 years ago)
Author:
sam
Message:

monsterz: add a sprite with rocks in front of the title screen.

Location:
trunk/monsterz
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/monsterz/Makefile.am

    r878 r1030  
    2525      gfx/titleevent6.png gfx/titleclouds.png gfx/titlestars.png \
    2626      gfx/titleeagle.png gfx/icons.png \
    27       gfx/title/logo.png gfx/title/ground.png
     27      gfx/title/logo.png gfx/title/ground.png gfx/title/rocks.png
    2828WAV = sound/applause.wav sound/boing.wav sound/click.wav sound/ding.wav \
    2929      sound/duh.wav sound/grunt.wav sound/laugh.wav sound/pop.wav \
  • trunk/monsterz/monsterz.h

    r791 r1030  
    2020static char const * const PNG_TITLE_LOGO = "monsterz/gfx/title/logo.png";
    2121static char const * const PNG_TITLE_GROUND = "monsterz/gfx/title/ground.png";
     22static char const * const PNG_TITLE_ROCKS = "monsterz/gfx/title/rocks.png";
    2223
    2324static char const * const PNG_TITLE = "monsterz/gfx/title0.png";
  • trunk/monsterz/title.cpp

    r958 r1030  
    4040
    4141private:
    42     TileSet *title, *stars, *clouds, *logo, *ground;
     42    TileSet *title, *stars, *clouds, *logo, *ground, *rocks;
    4343    TileSet *anim[6];
    4444    TileSet *event[7];
     
    6666    vec2 cloudspeed[MAX_CLOUDS];
    6767
    68     ivec2 ground_pos;
     68    ivec2 ground_pos, rocks_pos;
    6969
    7070    struct
     
    141141    data->logo = Tiler::Register(PNG_TITLE_LOGO, ivec2(380, 181), 0, 1.0f);
    142142    data->logo_sprite = new Sprite(data->logo, 0);
    143     data->logo_sprite->position = vec3(26, 250, 3);
     143    data->logo_sprite->position = vec3(226, 450, 3);
    144144    Ticker::Ref(data->logo_sprite);
    145145
     
    147147    data->ground_pos = ivec2((vec2)(bbox[1] - bbox[0]) / ivec2(2, 4))
    148148                     - ivec2(384, 80);
     149
     150    data->rocks = Tiler::Register(PNG_TITLE_ROCKS, ivec2(640, 155), 0, 1.0f);
     151    data->rocks_pos = ivec2((vec2)(bbox[1] - bbox[0]) / ivec2(2, 2))
     152                    - ivec2(320, 240);
    149153
    150154    data->title = Tiler::Register(PNG_TITLE, 384, 0, 1.0f);
     
    351355    }
    352356
     357    /* The rocks */
     358    Scene::GetDefault()->AddTile(data->rocks, 0,
     359                                 ivec3(data->rocks_pos) + ivec3(0, 0, 10), 0);
     360
    353361    /* Maybe an animation? */
    354362    TileSet *tiler = NULL;
     
    394402    Ticker::Unref(data->logo_sprite);
    395403    Tiler::Deregister(data->ground);
     404    Tiler::Deregister(data->rocks);
    396405    Tiler::Deregister(data->title);
    397406    Tiler::Deregister(data->stars);
Note: See TracChangeset for help on using the changeset viewer.