enigma-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Enigma-cvs] enigma/src stones_simple.cc,1.63,1.64


From: Daniel Heck <address@hidden>
Subject: [Enigma-cvs] enigma/src stones_simple.cc,1.63,1.64
Date: Sun, 16 Nov 2003 19:29:00 +0000

Update of /cvsroot/enigma/enigma/src
In directory subversions:/tmp/cvs-serv17194/src

Modified Files:
        stones_simple.cc 
Log Message:
Use new options:: code.  
(Switch): Call PerformAction immediately when hit by actor, not
after delay. Moved documentation to texi file.


Index: stones_simple.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/stones_simple.cc,v
retrieving revision 1.63
retrieving revision 1.64
diff -C2 -d -r1.63 -r1.64
*** stones_simple.cc    12 Nov 2003 09:31:10 -0000      1.63
--- stones_simple.cc    16 Nov 2003 19:28:58 -0000      1.64
***************
*** 231,235 ****
  
          void on_creation() {
!             if (options::Difficulty == DIFFICULTY_EASY) {
                  SetFloor (get_pos(), MakeFloor ("fl-normal"));
              } else {
--- 231,235 ----
  
          void on_creation() {
!             if (GetDifficulty() == DIFFICULTY_EASY) {
                  SetFloor (get_pos(), MakeFloor ("fl-normal"));
              } else {
***************
*** 1233,1251 ****
  }
  
- //----------------------------------------
- // Switch
- //
- // Attributes:
- //
- // :on              1 or 0
- // :target,action   as usual
- //----------------------------------------
- 
- /** \page st-switch Switch Stone
  
! On actor hit this stone can trigger actions
  
- \image html st-switch1.png
- */
  namespace
  {
--- 1233,1240 ----
  }
  
  
! 
! /* -------------------- Switch -------------------- */
  
  namespace
  {
***************
*** 1269,1272 ****
--- 1258,1262 ----
                  else
                      set_anim("st-switch-turnon");
+                 PerformAction(this, !is_on());
              }
          }
***************
*** 1275,1279 ****
              state = IDLE;
              set_on(!is_on());
-             PerformAction(this, is_on());
          }
          const char *collision_sound() { return "st-metal"; }
--- 1265,1268 ----
***************
*** 1281,1294 ****
  }
  
! //----------------------------------------
! // Switch_black
! //
! // Attributes:
! //
! // :on              1 or 0
! // :target,action   as usual
! //----------------------------------------
! 
! //On actor (black only) hit this stone can trigger actions
  
  namespace
--- 1270,1274 ----
  }
  
! /* -------------------- Switch_black -------------------- */
  
  namespace
***************
*** 1312,1315 ****
--- 1292,1296 ----
                  else
                      set_anim("st-switch_black-turnon");
+                 PerformAction(this, !is_on());
              }
          }
***************
*** 1317,1321 ****
              state = IDLE;
              set_on(!is_on());
-             PerformAction(this, is_on());
          }
  
--- 1298,1301 ----
***************
*** 1324,1337 ****
  }
  
! //----------------------------------------
! // Switch_white
! //
! // Attributes:
! //
! // :on              1 or 0
! // :target,action   as usual
! //----------------------------------------
! 
! //On actor (white only) hit this stone can trigger actions
  
  namespace
--- 1304,1308 ----
  }
  
! /* -------------------- Switch_white -------------------- */
  
  namespace
***************
*** 1355,1358 ****
--- 1326,1330 ----
                  else
                      set_anim("st-switch_white-turnon");
+                 PerformAction(this, !is_on());
              }
          }
***************
*** 1360,1364 ****
              state = IDLE;
              set_on(!is_on());
-             PerformAction(this, is_on());
          }
  
--- 1332,1335 ----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]