Ignore:
Timestamp:
Mar 18, 2008, 11:22:51 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Implement game_object::set_tint, get_tint, set_team and get_team, as well as the corresponding set_object_tint, get_object_tint, set_object_team and get_object_team LISP functions. They'll be useful for CTF mode.

Inspired by Abuse Win32 changelog from February 18, 2001:

  • Changed lisp function (set_player_color x) to

(set_object_tint x)

  • Added lisp function (get_object_tint)

Inspired by Abuse Win32 changelog from February 17, 2001:

  • Added lisp function (set_player_color x) to switch player

to color number x
see chat.lsp for details

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/objects.hpp

    r124 r126  
    128128  int ty(int y) { return y-picture()->height()+1; }
    129129  void defaults();
     130
    130131  game_object(int Type, int load=0);
     132  ~game_object();
     133
    131134  int is_playable() { return hurtable(); }
    132135  void add_power(int amount);
     
    147150  game_object *copy();
    148151  void change_aitype(int new_type);
    149   ~game_object();
     152
     153  int get_tint() { return _tint; }
     154  void set_tint(int tint)
     155  {
     156    for(int i = 0; i < tobjs; i++)
     157      get_object(i)->_tint = tint;
     158    _tint = tint;
     159  }
     160  int get_team() { return _team; }
     161  void set_team(int team)
     162  {
     163    for(int i = 0; i < tobjs; i++)
     164      get_object(i)->_team = team;
     165    _team = team;
     166  }
    150167} ;
    151168
Note: See TracChangeset for help on using the changeset viewer.