Ignore:
Timestamp:
Apr 26, 2012, 8:20:48 PM (9 years ago)
Author:
sam
Message:

core: prefix some member variables with m_ for clarity.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/monsterz/board.cpp

    r1198 r1300  
    131131    Ticker::Ref(data->score);
    132132
    133     position = ivec3(24, 72, 1);
    134     bbox[0] = position;
    135     bbox[1] = bbox[0] + vec3(384, 384, 0);
     133    m_position = ivec3(24, 72, 1);
     134    m_bbox[0] = m_position;
     135    m_bbox[1] = m_bbox[0] + vec3(384, 384, 0);
    136136
    137137    Input::TrackMouse(this);
     
    163163    case BoardData::HUNT_IDLE:
    164164        /* Should we start dragging something? */
    165         if (buttons[0] && !data->oldbuttons[0] && mousepos.x != -1)
    166         {
    167             ivec2 cell = mousepos / data->size;
     165        if (buttons[0] && !data->oldbuttons[0] && m_mousepos.x != -1)
     166        {
     167            ivec2 cell = m_mousepos / data->size;
    168168            if (data->pairs[cell.x][cell.y].piece->Grab(ivec2(0, 0)))
    169169            {
    170170                Sampler::PlaySample(data->click);
    171171                data->grabbed = data->pairs[cell.x][cell.y];
    172                 data->src_cell = mousepos / data->size;
     172                data->src_cell = m_mousepos / data->size;
    173173                data->dst_cell = ivec2(-1);
    174174                data->state = BoardData::HUNT_GRAB;
     
    180180
    181181    case BoardData::HUNT_GRAB:
    182         if (mousepos.x != -1)
     182        if (m_mousepos.x != -1)
    183183        {
    184184            /* Mouse is still in the window, keep grabbing */
    185             data->grabbed.piece->Grab(mousepos - data->oldmouse);
     185            data->grabbed.piece->Grab(m_mousepos - data->oldmouse);
    186186            ivec2 cur_pos = data->grabbed.piece->GetPos()
    187187                          + data->grabbed.piece->GetOffset();
     
    221221
    222222        /* Mouse released, or exited window, or dragged too far. */
    223         if (!buttons[0] || mousepos.x == -1 ||
     223        if (!buttons[0] || m_mousepos.x == -1 ||
    224224             sqlen(data->src_cell * data->size - data->grabbed.piece->GetPos()
    225225                  - data->grabbed.piece->GetOffset()) > 100 * 100)
     
    246246    }
    247247
    248     data->oldmouse = mousepos;
     248    data->oldmouse = m_mousepos;
    249249    data->oldbuttons = buttons;
    250250}
     
    254254    Entity::TickDraw(deltams);
    255255
    256     Scene::GetDefault()->AddTile(data->board, 0, position, 0, vec2(1.0f));
     256    Scene::GetDefault()->AddTile(data->board, 0, m_position, 0, vec2(1.0f));
    257257    Scene::GetDefault()->AddTile(data->screen, 0, ivec3(0, 0, 10), 0, vec2(1.0f));
    258258
Note: See TracChangeset for help on using the changeset viewer.