/[enigma]/enigma/src/objects.cc
ViewVC logotype

Diff of /enigma/src/objects.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.81 by sfennig, Sat May 17 23:07:36 2003 UTC revision 1.82 by reallysoft, Sun May 18 13:29:56 2003 UTC
# Line 35  Line 35 
35  #include <cstdlib>  #include <cstdlib>
36  #include <cstdarg>  #include <cstdarg>
37  #include <iostream>  #include <iostream>
38    #include <iomanip>
39  #include <cassert>  #include <cassert>
40    
41  using namespace std;  using namespace std;
# Line 226  Object::warning(const char *format, ...) Line 227  Object::warning(const char *format, ...)
227      va_list arg_ptr;      va_list arg_ptr;
228    
229      va_start(arg_ptr, format);      va_start(arg_ptr, format);
230      cerr << "non-grid-\"" << get_kind() << "\": "      cerr << setbase(16) << long(this) << " non-grid-\"" << get_kind() << "\": "
231           << vstrf(format, arg_ptr) << '\n';           << vstrf(format, arg_ptr) << '\n';
232      va_end(arg_ptr);      va_end(arg_ptr);
233  }  }
# Line 246  GridObject::warning(const char *format, Line 247  GridObject::warning(const char *format,
247      const GridPos& pos = get_pos();      const GridPos& pos = get_pos();
248    
249      va_start(arg_ptr, format);      va_start(arg_ptr, format);
250      cerr << "\"" << get_kind() << "\" at " << pos.x << '/' << pos.y << ": "      cerr << setbase(16) << long(this) << " \"" << get_kind() << '\"'
251             << setbase(8) << " at " << pos.x << '/' << pos.y << ": "
252           << vstrf(format, arg_ptr) << '\n';           << vstrf(format, arg_ptr) << '\n';
253      va_end(arg_ptr);      va_end(arg_ptr);
254  }  }
# Line 1831  namespace { Line 1833  namespace {
1833                  }                  }
1834              }              }
1835          }          }
1836            
1837          void actor_inside(Actor *a) {          void actor_inside(Actor *a) {
1838                  SendMessage(a, "shatter");                  SendMessage(a, "shatter");
1839          }          }
1840            
1841          void actor_contact(Actor *a) {          void actor_contact(Actor *a) {
1842              if (state == GROWING) {              if (state == GROWING) {
1843                  SendMessage(a, "shatter");                  SendMessage(a, "shatter");
# Line 2597  namespace Line 2599  namespace
2599    
2600          void actor_hit(const StoneContact &sc)          void actor_hit(const StoneContact &sc)
2601          {          {
2602            
2603          if ( state == IDLE) {          if ( state == IDLE) {
2604              if (sc.actor)              if (sc.actor)
2605                  state = ON;                  state = ON;
# Line 2607  namespace Line 2609  namespace
2609                  set_anim("st-time1switch");                  set_anim("st-time1switch");
2610              }              }
2611          }          }
2612            
2613          void animcb() {          void animcb() {
2614              if (state == ON) {              if (state == ON) {
2615              set_on(!is_on());              set_on(!is_on());

Legend:
Removed from v.1.81  
changed lines
  Added in v.1.82

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26