Ignore:
Timestamp:
Oct 29, 2011, 5:37:53 PM (10 years ago)
Author:
sam
Message:

core: disallow casting eg. a vec3 into a vec2. Use the xy() getter instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/monsterz/title.cpp

    r1032 r1035  
    145145
    146146    data->ground = Tiler::Register(PNG_TITLE_GROUND, ivec2(384, 80), 0, 1.0f);
    147     data->ground_pos = ivec2((vec2)(bbox[1] - bbox[0]) / ivec2(2, 4))
     147    data->ground_pos = ivec2((bbox[1] - bbox[0]).xy() / ivec2(2, 4))
    148148                     - ivec2(192, 80);
    149149
    150150    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))
     151    data->rocks_pos = ivec2((bbox[1] - bbox[0]).xy() / ivec2(2, 2))
    152152                    - ivec2(320, 240);
    153153
     
    357357    /* The rocks */
    358358    Scene::GetDefault()->AddTile(data->rocks, 0,
    359                                  ivec3(data->rocks_pos) + ivec3(0, 0, 10), 0);
     359                                 ivec3(data->rocks_pos, 10), 0);
    360360
    361361    /* Maybe an animation? */
Note: See TracChangeset for help on using the changeset viewer.