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/test/tutorial/03_fractal.cpp

    r1242 r1300  
    154154#endif
    155155
    156         position = ivec3(0, 0, 0);
    157         bbox[0] = position;
    158         bbox[1] = ivec3(m_window_size, 0);
     156        m_position = ivec3(0, 0, 0);
     157        m_bbox[0] = m_position;
     158        m_bbox[1] = ivec3(m_window_size, 0);
    159159        Input::TrackMouse(this);
    160160
     
    209209        m_frame = (m_frame + 1) % 4;
    210210
    211         f64cmplx worldmouse = m_center + ScreenToWorldOffset(mousepos);
     211        f64cmplx worldmouse = m_center + ScreenToWorldOffset(m_mousepos);
    212212
    213213        ivec3 buttons = Input::GetMouseButtons();
     
    217217            if (!m_drag)
    218218            {
    219                 m_oldmouse = mousepos;
     219                m_oldmouse = m_mousepos;
    220220                m_drag = true;
    221221            }
    222222            m_translate = ScreenToWorldOffset(m_oldmouse)
    223                         - ScreenToWorldOffset(mousepos);
     223                        - ScreenToWorldOffset(m_mousepos);
    224224            /* XXX: the purpose of this hack is to avoid translating by
    225225             * an exact number of pixels. If this were to happen, the step()
     
    228228             * would have tie rankings in the distance calculation. */
    229229            m_translate *= 1023.0 / 1024.0;
    230             m_oldmouse = mousepos;
     230            m_oldmouse = m_mousepos;
    231231        }
    232232        else
     
    241241        }
    242242
    243         if ((buttons[0] || buttons[2]) && mousepos.x != -1)
     243        if ((buttons[0] || buttons[2]) && m_mousepos.x != -1)
    244244        {
    245245            double zoom = buttons[0] ? -0.0005 : 0.0005;
     
    275275            m_center += m_translate;
    276276            m_center = (m_center - worldmouse) * zoom + worldmouse;
    277             worldmouse = m_center + ScreenToWorldOffset(mousepos);
     277            worldmouse = m_center + ScreenToWorldOffset(m_mousepos);
    278278#endif
    279279
Note: See TracChangeset for help on using the changeset viewer.