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

core: allow each blitted tile to be stretched differently.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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        }
Note: See TracChangeset for help on using the changeset viewer.