Ignore:
Timestamp:
May 6, 2011, 12:47:14 AM (10 years ago)
Author:
Sam Hocevar
Message:

data: remove \r and trailing spaces and tabs from all Lisp sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/data-abuse/lisp/switch.lsp

    r54 r582  
    22;; See licensing information for more details on usage rights
    33
    4 (defun switcher_ai () 
     4(defun switcher_ai ()
    55  (next_picture)
    66  (select (aistate)
     
    99               (progn
    1010                 (play_sound SWITCH_SND 127 (x) (y))
    11                  (set_state running)             
     11                 (set_state running)
    1212                 (set_aistate 1))))
    13           (1     ; wait for player to let go of button   
     13          (1     ; wait for player to let go of button
    1414           (if (not (with_object (bg) (pressing_action_key)))
    1515               (set_aistate 2)))
     
    1919                 (play_sound SWITCH_SND 127 (x) (y))
    2020                 (set_state stopped)
    21                  (set_aistate 4))))     
     21                 (set_aistate 4))))
    2222           (4     ; wait for player to let go of button
    2323            (if (not (with_object (bg) (pressing_action_key)))
     
    2525           )
    2626T)
    27              
    28 
    29 (defun switch_once_ai () 
     27
     28
     29(defun switch_once_ai ()
    3030  (select (aistate)
    3131          (0      ; waiting for player to press, then turn to on
     
    3838                 (set_aistate 1)))))
    3939  T)
    40          
     40
    4141(defun lower_reload () (lower))   ;; move object below all other objects
    42      
     42
    4343(def_char SWITCH
    4444  (funs (ai_fun switcher_ai)
    4545        (reload_fun lower_reload))
    46   (range 0 0) 
     46  (range 0 0)
    4747  (states "art/misc.spe"
    4848          (stopped '("switch_off1" "switch_off2"))
     
    5252  (funs (ai_fun switch_once_ai)
    5353        (reload_fun lower_reload))
    54   (range 0 0) 
     54  (range 0 0)
    5555  (states "art/misc.spe"
    5656          (stopped '("switch_off1" "switch_off2"))
     
    6767  (vars reset_time)
    6868  (fields ("reset_time" switch_reset))
    69   (range 0 0) 
     69  (range 0 0)
    7070  (states "art/misc.spe"
    7171          (stopped '("switch_off1" "switch_off2"))
     
    9999  (if (> (total_objects) 1)
    100100      (select (aistate)
    101               (0 (if (not (eq (with_object (get_object 0) (aistate)) 0))                     
     101              (0 (if (not (eq (with_object (get_object 0) (aistate)) 0))
    102102                     (let ((mex (x))
    103103                           (mey (y)))
     
    124124                       (with_object (get_object 1) (set_fade_count (- count 1)))
    125125                       T)))))
    126                              
     126
    127127    nil))
    128128
     
    138138  (set_aitype 1)
    139139  (add_hp -10))
    140  
     140
    141141
    142142/* -- compiled code
     
    144144  (if (eq (aistate) 0)
    145145      (if (and (< (distx) (xvel)) (< (disty) (yvel)))
    146           (progn 
     146          (progn
    147147            (if (eq (hp) 0)  ;; don't time out
    148148                (set_aistate 1)
     
    152152
    153153        (if (eq (hp) 0)
    154             (if (or (> (distx) (xacel)) (> (disty) (yacel)))       
     154            (if (or (> (distx) (xacel)) (> (disty) (yacel)))
    155155                (set_aistate 0))
    156156          (set_aistate (- (aistate) 1))))
     
    158158
    159159(defun sensor_draw ()
    160   (if (edit_mode) 
     160  (if (edit_mode)
    161161      (progn
    162162        (draw)
     
    216216          (stopped "off")
    217217          (blocking "on")))
    218                    
     218
    219219/*
    220220(defun sensor_linker_ai ()
    221221  (if (eq (aistate) 0)
    222222      (if (and (< (distx) (xvel)) (< (disty) (yvel)))
    223           (progn 
     223          (progn
    224224            (if (eq (hp) 0)  ;; don't time out
    225225                (set_aistate 1)
     
    229229
    230230    (if (eq (hp) 0)
    231         (if (or (> (distx) (xacel)) (> (disty) (yacel)))           
     231        (if (or (> (distx) (xacel)) (> (disty) (yacel)))
    232232            (set_aistate 0))
    233233      (set_aistate (- (aistate) 1)))))
     
    251251          (stopped "off")
    252252          (blocking "on")))
    253  
     253
    254254*/
    255255
     
    258258      (let ((st (with_object (get_object current) (state))))
    259259        (if (or (eq st dead) (eq st blown_back_dead))
    260             (let ((dead_guy (get_object current)))           
     260            (let ((dead_guy (get_object current)))
    261261              (remove_object (get_object current))
    262262              dead_guy)
     
    268268      (let ((find (dead_object (- (total_objects) 1))))
    269269        (if find
    270             (add_object (with_object (get_object 0) (otype)) 
     270            (add_object (with_object (get_object 0) (otype))
    271271                        (with_object find (x))
    272272                        (with_object find (y))))))
    273                          
     273
    274274  T)
    275275
     
    282282
    283283
    284 (defun death_sen_ai () 
     284(defun death_sen_ai ()
    285285  (if (eq (total_objects) 0)
    286286      (progn
Note: See TracChangeset for help on using the changeset viewer.