Changeset 1198


Ignore:
Timestamp:
Apr 7, 2012, 11:55:29 PM (8 years ago)
Author:
sam
Message:

core: allow each blitted tile to be stretched differently.

Location:
trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/deushax/debugsprite.cpp

    r1184 r1198  
    11//
    22// Deus Hax (working title)
    3 // Copyright (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
     3// Copyright (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
    44//
    55
     
    4141    Ticker::Ref(game);
    4242    data->tileset = Tiler::Register("deushax/art/test/character-dress.png",
    43                                     ivec2(32), ivec2(0), vec2(1.0f, sqrtf(2)));
     43                                    ivec2(32), ivec2(0));
    4444    data->pos = vec3(320, 206, 0);
    4545}
     
    5959    ivec3 pos = (ivec3)data->pos;
    6060
    61     Scene::GetDefault()->AddTile(data->tileset, 31, pos + ivec3(-16, 0, 0), 1);
    62     Scene::GetDefault()->AddTile(data->tileset, 15, pos + ivec3(-16, 0, 32), 1);
     61    Scene::GetDefault()->AddTile(data->tileset, 31, pos + ivec3(-16, 0, 0), 1, vec2(1.0f));
     62    Scene::GetDefault()->AddTile(data->tileset, 15, pos + ivec3(-16, 0, 32), 1, vec2(1.0f));
    6363}
    6464
  • trunk/monsterz/board.cpp

    r1184 r1198  
    22// Monsterz
    33//
    4 // Copyright: (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2005-2012 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    102102    data->npieces = minnpieces;
    103103    data->maxnpieces = maxnpieces;
    104     data->screen = Tiler::Register(PNG_BACKGROUND, ivec2(640, 480), ivec2(0), vec2(1.0f));
    105     data->board = Tiler::Register(PNG_BOARD, ivec2(384), ivec2(0), vec2(1.0f));
    106     data->tiles = Tiler::Register(PNG_TILES, data->size, ivec2(0), vec2(1.0f));
    107     data->icons = Tiler::Register(PNG_ICONS, ivec2(24), ivec2(0), vec2(1.0f));
     104    data->screen = Tiler::Register(PNG_BACKGROUND, ivec2(640, 480), ivec2(0));
     105    data->board = Tiler::Register(PNG_BOARD, ivec2(384), ivec2(0));
     106    data->tiles = Tiler::Register(PNG_TILES, data->size, ivec2(0));
     107    data->icons = Tiler::Register(PNG_ICONS, ivec2(24), ivec2(0));
    108108    data->click = Sampler::Register(WAV_CLICK);
    109109    data->whip = Sampler::Register(WAV_WHIP);
     
    254254    Entity::TickDraw(deltams);
    255255
    256     Scene::GetDefault()->AddTile(data->board, 0, position, 0);
    257     Scene::GetDefault()->AddTile(data->screen, 0, ivec3(0, 0, 10), 0);
     256    Scene::GetDefault()->AddTile(data->board, 0, position, 0, vec2(1.0f));
     257    Scene::GetDefault()->AddTile(data->screen, 0, ivec3(0, 0, 10), 0, vec2(1.0f));
    258258
    259259    switch (data->game)
  • trunk/monsterz/interface.cpp

    r1184 r1198  
    22// Monsterz
    33//
    4 // Copyright: (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2005-2012 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    5757    data->title = NULL;
    5858    data->board = NULL;
    59     data->tiles = Tiler::Register(PNG_TILES, ivec2(48), ivec2(0), vec2(1.0f));
     59    data->tiles = Tiler::Register(PNG_TILES, ivec2(48), ivec2(0));
    6060    data->state = InterfaceData::INIT;
    6161
     
    100100    {
    101101        mouse += ivec3(-6, 6 - 48, 30);
    102         Scene::GetDefault()->AddTile(data->tiles, 22, mouse, 0);
     102        Scene::GetDefault()->AddTile(data->tiles, 22, mouse, 0, vec2(1.0f));
    103103    }
    104104}
  • trunk/monsterz/piece.cpp

    r1184 r1198  
    22// Monsterz
    33//
    4 // Copyright: (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2005-2012 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    9494    case PIECE_HUNT:
    9595        data->size = ivec2(48);
    96         data->tileset = Tiler::Register(PNG_TILES, data->size, ivec2(0), vec2(1.0f));
     96        data->tileset = Tiler::Register(PNG_TILES, data->size, ivec2(0));
    9797        data->pieceid = 80 + 20 * pieceid;
    9898        break;
     
    383383
    384384    if (data->state != PieceData::DEAD)
    385         Scene::GetDefault()->AddTile(data->tileset, pieceid, ivec3(x, y, z), 0);
     385        Scene::GetDefault()->AddTile(data->tileset, pieceid, ivec3(x, y, z), 0, vec2(1.0f));
    386386
    387387    if (data->state == PieceData::GRAB && Platform::GetMouseCount())
    388         Scene::GetDefault()->AddTile(data->tileset, 0, ivec3(x, y, 9), 0);
     388        Scene::GetDefault()->AddTile(data->tileset, 0, ivec3(x, y, 9), 0, vec2(1.0f));
    389389}
    390390
  • trunk/monsterz/thumbs.cpp

    r1184 r1198  
    22// Monsterz
    33//
    4 // Copyright: (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2005-2012 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    4747  : data(new ThumbsData())
    4848{
    49     data->icons = Tiler::Register(PNG_ICONS, ivec2(24), ivec2(0), vec2(1.0f));
     49    data->icons = Tiler::Register(PNG_ICONS, ivec2(24), ivec2(0));
    5050
    5151    data->npieces = 0;
     
    7474    {
    7575        ivec3 p = ivec3(459, 372 - 27 * n, 11);
    76         Scene::GetDefault()->AddTile(data->icons, n, p, 0);
     76        Scene::GetDefault()->AddTile(data->icons, n, p, 0, vec2(1.0f));
    7777    }
    7878}
  • trunk/monsterz/title.cpp

    r1189 r1198  
    142142    srand(rand() ^ time(NULL));
    143143
    144     data->logo = Tiler::Register(PNG_TITLE_LOGO, ivec2(380, 181), ivec2(0), vec2(1.0f));
     144    data->logo = Tiler::Register(PNG_TITLE_LOGO, ivec2(380, 181), ivec2(0));
    145145    data->logo_sprite = new Sprite(data->logo, 0);
    146146    data->logo_sprite->position = vec3(640 / 2 - 380 / 2, 250, 10);
    147147    Ticker::Ref(data->logo_sprite);
    148148
    149     data->ground = Tiler::Register(PNG_TITLE_GROUND, ivec2(384, 80), ivec2(0), vec2(1.0f));
     149    data->ground = Tiler::Register(PNG_TITLE_GROUND, ivec2(384, 80), ivec2(0));
    150150    data->ground_pos = ivec2((bbox[1] - bbox[0]).xy / vec2(2, 4))
    151151                     - ivec2(192, 80);
    152152
    153     data->rocks = Tiler::Register(PNG_TITLE_ROCKS, ivec2(640, 155), ivec2(0), vec2(1.0f));
     153    data->rocks = Tiler::Register(PNG_TITLE_ROCKS, ivec2(640, 155), ivec2(0));
    154154    data->rocks_pos = ivec2((bbox[1] - bbox[0]).xy / vec2(2, 2))
    155155                    - ivec2(320, 240);
    156156
    157     data->title = Tiler::Register(PNG_TITLE, ivec2(384), ivec2(0), vec2(1.0f));
    158     data->stars = Tiler::Register(PNG_STARS, ivec2(384, 144), ivec2(0), vec2(1.0f));
    159     data->clouds = Tiler::Register(PNG_CLOUDS, ivec2(160, 32), ivec2(0), vec2(1.0f));
    160     data->eagle.tiles = Tiler::Register(PNG_EAGLE, ivec2(16), ivec2(0), vec2(1.0f));
     157    data->title = Tiler::Register(PNG_TITLE, ivec2(384), ivec2(0));
     158    data->stars = Tiler::Register(PNG_STARS, ivec2(384, 144), ivec2(0));
     159    data->clouds = Tiler::Register(PNG_CLOUDS, ivec2(160, 32), ivec2(0));
     160    data->eagle.tiles = Tiler::Register(PNG_EAGLE, ivec2(16), ivec2(0));
    161161    for (int n = 0; n < 6; n++)
    162162        data->anim[n] = Tiler::Register(PNG_TITLEANIM[n],
    163                                         animsize[n], ivec2(0), vec2(1.0f));
     163                                        animsize[n], ivec2(0));
    164164    for (int n = 0; n < 7; n++)
    165165        data->event[n] = Tiler::Register(PNG_TITLEEVENT[n],
    166                                          eventsize[n], ivec2(0), vec2(1.0f));
     166                                         eventsize[n], ivec2(0));
    167167    data->state = TitleData::IDLE;
    168168    data->period = TitleData::DAY;
     
    312312    int backid = (int)data->period;
    313313    Scene::GetDefault()->AddTile(data->title, backid,
    314                     ivec3(data->ground_pos.x, data->ground_pos.y, 1), 0);
     314              ivec3(data->ground_pos.x, data->ground_pos.y, 1), 0, vec2(1.0f));
    315315
    316316    /* The stars */
     
    318318    {
    319319        Scene::GetDefault()->AddTile(data->stars, 0,
    320                                      ivec3(24 + 0, 72 + 240, 2), 0);
     320                                     ivec3(24 + 0, 72 + 240, 2), 0, vec2(1.0f));
    321321    }
    322322
     
    330330        Scene::GetDefault()->AddTile(data->clouds, cloudid,
    331331                                     ivec3(data->cloudpos[n].x,
    332                                            data->cloudpos[n].y, 2), 0);
     332                                           data->cloudpos[n].y, 2), 0,
     333                                     vec2(1.0f));
    333334        Scene::GetDefault()->AddTile(data->clouds, cloudid,
    334335                                     ivec3(data->cloudpos[n].x - bbox[1].x
    335336                                                               + bbox[0].x,
    336                                            data->cloudpos[n].y, 2), 0);
     337                                           data->cloudpos[n].y, 2), 0,
     338                                     vec2(1.0f));
    337339    }
    338340
     
    347349        int y = data->eagle.y + 5.0f * sinf(phase);
    348350        Scene::GetDefault()->AddTile(data->eagle.tiles, eagleid,
    349                                      ivec3(24 + x, 72 + y, 3), 0);
     351                                     ivec3(24 + x, 72 + y, 3), 0, vec2(1.0f));
    350352    }
    351353
     
    355357    {
    356358        Scene::GetDefault()->AddTile(data->ground, 0,
    357                                      ivec3(x, data->ground_pos.y, 0), 0);
     359                                     ivec3(x, data->ground_pos.y, 0), 0,
     360                                     vec2(1.0f));
    358361    }
    359362
    360363    /* The rocks */
    361364    Scene::GetDefault()->AddTile(data->rocks, 0,
    362                                  ivec3(data->rocks_pos, 10), 0);
     365                                 ivec3(data->rocks_pos, 10), 0,
     366                                 vec2(1.0f));
    363367
    364368    /* Maybe an animation? */
     
    391395        Scene::GetDefault()->AddTile(tiler, tileid,
    392396                                     ivec3(data->ground_pos.x + pos.x,
    393                                            data->ground_pos.y + pos.y, 1), 0);
     397                                           data->ground_pos.y + pos.y, 1), 0,
     398                                     vec2(1.0f));
    394399}
    395400
  • trunk/mrpigeon/mrpigeon.cpp

    r1185 r1198  
    2323MrPigeon::MrPigeon()
    2424{
    25     hudprogress = Tiler::Register("mrpigeon/gfx/HUD_timeline.png", ivec2(160,16), ivec2(0), vec2(3.0f));
    26     hudarrow = Tiler::Register("mrpigeon/gfx/HUD_timelineArrow.png", ivec2(16,16), ivec2(0), vec2(3.0f));
     25    hudprogress = Tiler::Register("mrpigeon/gfx/HUD_timeline.png", ivec2(160,16), ivec2(0));
     26    hudarrow = Tiler::Register("mrpigeon/gfx/HUD_timelineArrow.png", ivec2(16,16), ivec2(0));
    2727}
    2828
     
    3636    WorldEntity::TickDraw(deltams);
    3737
    38     Scene::GetDefault()->AddTile(hudarrow, 0, ivec3(30, 8, 0), 0);
    39     Scene::GetDefault()->AddTile(hudprogress, 0, ivec3(0, 0, 0), 0);
     38    Scene::GetDefault()->AddTile(hudarrow, 0, ivec3(30, 8, 0), 0, vec2(3.0f));
     39    Scene::GetDefault()->AddTile(hudprogress, 0, ivec3(0, 0, 0), 0, vec2(3.0f));
    4040}
    4141
  • trunk/src/emitter.cpp

    r837 r1198  
    22// Lol Engine
    33//
    4 // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    7777    for (int i = 0; i < data->nparticles; i++)
    7878        Scene::GetDefault()->AddTile(data->tileset, data->particles[i],
    79                                      data->positions[i], 0);
     79                                     data->positions[i], 0, vec2(1.0f));
    8080}
    8181
  • trunk/src/font.cpp

    r1184 r1198  
    22// Lol Engine
    33//
    4 // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    4747    sprintf(data->name, "<font> %s", path);
    4848
    49     data->tileset = Tiler::Register(path, ivec2(0), ivec2(16), vec2(1.0f));
     49    data->tileset = Tiler::Register(path, ivec2(0), ivec2(16));
    5050    data->size = data->tileset->GetSize(0);
    5151
     
    7070}
    7171
    72 void Font::Print(vec3 pos, char const *str)
     72void Font::Print(vec3 pos, char const *str, vec2 scale)
    7373{
    7474    Scene *scene = Scene::GetDefault();
     
    7979
    8080        if (ch != ' ')
    81             scene->AddTile(data->tileset, ch & 255, pos, 0);
     81            scene->AddTile(data->tileset, ch & 255, pos, 0, scale);
    8282
    83         pos.x += data->size.x;
     83        pos.x += data->size.x * scale.x;
    8484    }
    8585}
  • trunk/src/font.h

    r866 r1198  
    22// Lol Engine
    33//
    4 // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    3737public:
    3838    /* New methods */
    39     void Print(vec3 pos, char const *str);
     39    void Print(vec3 pos, char const *str, vec2 scale = vec2(1.0f));
    4040    ivec2 GetSize() const;
    4141
  • trunk/src/map.cpp

    r1184 r1198  
    22// Lol Engine
    33//
    4 // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    137137            /* This is a tileset image file. Associate it with firstgid. */
    138138            data->tilesets[data->ntilers] = Tiler::Register(str, ivec2(32),
    139                                                ivec2(0), vec2(1.0f, sqrtf(2)));
     139                                                            ivec2(0));
    140140            data->ntilers++;
    141141            //Log::Debug("new tiler %s\n", str);
  • trunk/src/scene.cpp

    r1194 r1198  
    22// Lol Engine
    33//
    4 // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    3232    uint32_t prio;
    3333    vec3 pos;
     34    vec2 scale;
    3435    int id, o;
    3536};
     
    142143}
    143144
    144 void Scene::AddTile(TileSet *tileset, int id, vec3 pos, int o)
     145void Scene::AddTile(TileSet *tileset, int id, vec3 pos, int o, vec2 scale)
    145146{
    146147#if !defined _XBOX /* No WPOS on Xbox */
     
    154155    data->tiles[data->ntiles].pos = pos;
    155156    data->tiles[data->ntiles].o = o;
     157    data->tiles[data->ntiles].scale = scale;
    156158    data->ntiles++;
    157159#endif
     
    408410            data->tiles[i].tileset->BlitTile(data->tiles[j].id,
    409411                            data->tiles[j].pos, data->tiles[j].o,
     412                            data->tiles[j].scale,
    410413                            vertex + 18 * (j - i), texture + 12 * (j - i));
    411414        }
  • trunk/src/scene.h

    r866 r1198  
    22// Lol Engine
    33//
    4 // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    3535    static void Reset();
    3636
    37     void AddTile(TileSet *tileset, int id, vec3 pos, int o);
     37    void AddTile(TileSet *tileset, int id, vec3 pos, int o, vec2 scale);
    3838    void Render();
    3939
  • trunk/src/sprite.cpp

    r1031 r1198  
    22// Lol Engine
    33//
    4 // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    5151    Entity::TickDraw(deltams);
    5252
    53     Scene::GetDefault()->AddTile(data->tileset, data->id, position, 0);
     53    Scene::GetDefault()->AddTile(data->tileset, data->id, position,
     54                                 0, vec2(1.0f));
    5455}
    5556
  • trunk/src/tiler.cpp

    r1184 r1198  
    22// Lol Engine
    33//
    4 // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    4141 */
    4242
    43 TileSet *Tiler::Register(char const *path, ivec2 size, ivec2 count,
    44                          vec2 scale)
     43TileSet *Tiler::Register(char const *path, ivec2 size, ivec2 count)
    4544{
    4645    int id = data->tilesets.MakeSlot(path);
     
    4948    if (!tileset)
    5049    {
    51         tileset = new TileSet(path, size, count, scale);
     50        tileset = new TileSet(path, size, count);
    5251        data->tilesets.SetEntity(id, tileset);
    5352    }
  • trunk/src/tiler.h

    r1184 r1198  
    22// Lol Engine
    33//
    4 // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    2828{
    2929public:
    30     static TileSet *Register(char const *path, ivec2 size, ivec2 count,
    31                              vec2 scale);
     30    static TileSet *Register(char const *path, ivec2 size, ivec2 count);
    3231    static void Deregister(TileSet *);
    3332};
  • trunk/src/tileset.cpp

    r1184 r1198  
    22// Lol Engine
    33//
    4 // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    6262 */
    6363
    64 TileSet::TileSet(char const *path, ivec2 size, ivec2 count, vec2 scale)
     64TileSet::TileSet(char const *path, ivec2 size, ivec2 count)
    6565  : data(new TileSetData())
    6666{
     
    9999    data->ty = (float)data->size.y / PotUp(data->isize.y);
    100100
    101     data->scale = scale;
    102101    data->ntiles = data->count.x * data->count.y;
    103102
     
    220219}
    221220
    222 void TileSet::BlitTile(uint32_t id, vec3 pos, int o,
     221void TileSet::BlitTile(uint32_t id, vec3 pos, int o, vec2 scale,
    223222                       float *vertex, float *texture)
    224223{
    225224    float tx = data->tx * ((id & 0xffff) % data->count.x);
    226225    float ty = data->ty * ((id & 0xffff) / data->count.x);
    227     vec2 scale = data->scale;
    228 
    229     int dx = data->size.x;
    230     int dy = o ? 0 : data->size.y;
    231     int dz = o ? data->size.y : 0;
     226
     227    int dx = data->size.x * scale.x;
     228    int dy = o ? 0 : data->size.y * scale.y;
     229    int dz = o ? data->size.y * scale.y : 0;
    232230
    233231#if defined _XBOX
     
    242240        float tmp[10];
    243241
    244         *vertex++ = tmp[0] = scale.x * pos.x;
    245         *vertex++ = tmp[1] = scale.y * (pos.y + dy);
    246         *vertex++ = tmp[2] = scale.y * (pos.z + dz);
     242        *vertex++ = tmp[0] = pos.x;
     243        *vertex++ = tmp[1] = pos.y + dy;
     244        *vertex++ = tmp[2] = pos.z + dz;
    247245        *texture++ = tmp[3] = tx;
    248246        *texture++ = tmp[4] = ty;
    249247
    250         *vertex++ = scale.x * (pos.x + dx);
    251         *vertex++ = scale.y * (pos.y + dy);
    252         *vertex++ = scale.y * (pos.z + dz);
     248        *vertex++ = pos.x + dx;
     249        *vertex++ = pos.y + dy;
     250        *vertex++ = pos.z + dz;
    253251        *texture++ = tx + data->tx;
    254252        *texture++ = ty;
    255253
    256         *vertex++ = tmp[5] = scale.x * (pos.x + dx);
    257         *vertex++ = tmp[6] = scale.y * pos.y;
    258         *vertex++ = tmp[7] = scale.y * pos.z;
     254        *vertex++ = tmp[5] = pos.x + dx;
     255        *vertex++ = tmp[6] = pos.y;
     256        *vertex++ = tmp[7] = pos.z;
    259257        *texture++ = tmp[8] = tx + data->tx;
    260258        *texture++ = tmp[9] = ty + data->ty;
     
    272270        *texture++ = tmp[9];
    273271
    274         *vertex++ = scale.x * pos.x;
    275         *vertex++ = scale.y * pos.y;
    276         *vertex++ = scale.y * pos.z;
     272        *vertex++ = pos.x;
     273        *vertex++ = pos.y;
     274        *vertex++ = pos.z;
    277275        *texture++ = tx;
    278276        *texture++ = ty + data->ty;
  • trunk/src/tileset.h

    r1184 r1198  
    22// Lol Engine
    33//
    4 // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
     4// Copyright: (c) 2010-2012 Sam Hocevar <sam@hocevar.net>
    55//   This program is free software; you can redistribute it and/or
    66//   modify it under the terms of the Do What The Fuck You Want To
     
    3232{
    3333public:
    34     TileSet(char const *path, ivec2 size, ivec2 count, vec2 scale);
     34    TileSet(char const *path, ivec2 size, ivec2 count);
    3535    virtual ~TileSet();
    3636
     
    4545    ivec2 GetSize(int tileid) const;
    4646    void Bind();
    47     void BlitTile(uint32_t id, vec3 pos, int o,
     47    void BlitTile(uint32_t id, vec3 pos, int o, vec2 scale,
    4848                  float *vertex, float *texture);
    4949
Note: See TracChangeset for help on using the changeset viewer.