Ignore:
Timestamp:
May 16, 2011, 2:37:51 AM (8 years ago)
Author:
Sam Hocevar
Message:

game: prefix a few class members with m_ to avoid confusion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/view.h

    r674 r676  
    2222struct suggest_struct
    2323{
    24   int32_t cx1,cy1,cx2,cy2,shift_down,shift_right,pan_x,pan_y;
    25   int32_t new_weapon;
    26   uint8_t send_view,send_weapon_change;
    27 } ;
     24    int32_t cx1,cy1,cx2,cy2,pan_x,pan_y;
     25    vec2i shift;
     26    int32_t new_weapon;
     27    uint8_t send_view,send_weapon_change;
     28};
    2829
    2930
     
    3738    ~view();
    3839
    39   int key_down(int key) { return keymap[key/8]&(1<<(key%8)); }
    40   void set_key_down(int key, int x) { if (x) keymap[key/8]|=(1<<(key%8)); else keymap[key/8]&=~(1<<(key%8)); }
    41   void reset_keymap() { memset(keymap,0,sizeof(keymap)); }
     40  int key_down(int key) { return m_keymap[key/8]&(1<<(key%8)); }
     41  void set_key_down(int key, int x) { if (x) m_keymap[key/8]|=(1<<(key%8)); else m_keymap[key/8]&=~(1<<(key%8)); }
     42  void reset_keymap() { memset(m_keymap,0,sizeof(m_keymap)); }
    4243  void add_chat_key(int key);
    4344
    4445  char name[100];
    4546  struct suggest_struct suggest;
    46   int32_t shift_down,shift_right;             // shift of view
    4747
    4848  int god;                                // :) if you believe in such things
     
    5757
    5858
    59   game_object *focus;                     // object we are focusing on (player)
    6059  int x_suggestion,                      // input from the player at the current time
    6160      y_suggestion,
     
    7170  short ambient;                        // ambient lighting setting, used by draw
    7271
    73   int32_t pan_x,pan_y,no_xleft,no_xright,no_ytop,no_ybottom,
    74        last_x,last_y,last_last_x,last_last_y,view_percent;
     72  int32_t pan_x,pan_y,no_xleft,no_xright,no_ytop,no_ybottom, view_percent;
    7573
    7674  int32_t last_left,last_right,last_up,last_down,   // how many frames ago were these pressed (<=0)
     
    113111
    114112  void reset_player();
    115   int receive_failed() { return focus==NULL; }
     113  int receive_failed() { return m_focus==NULL; }
    116114  int32_t get_view_var_value(int num);
    117115  int32_t set_view_var_value(int num, int32_t x);
     
    124122
    125123    vec2i m_aa, m_bb; // view area to show
     124    vec2i m_shift; // shift of view
     125    vec2i m_lastpos, m_lastlastpos;
     126
     127    game_object *m_focus; // object we are focusing on (player)
    126128
    127129private:
    128     uint8_t keymap[512 / 8];
    129     char chat_buf[60];
     130    uint8_t m_keymap[512 / 8];
     131    char m_chat_buf[60];
    130132};
    131133
Note: See TracChangeset for help on using the changeset viewer.