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

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

Location:
abuse/trunk/data-frabs/addon/pong
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/data-frabs/addon/pong/common.lsp

    r44 r582  
    22;; See licensing information for more details on usage rights
    33
    4 ; draw function for characters only displayed during edit mode 
     4; draw function for characters only displayed during edit mode
    55; such as start, etc.
    66; (defun dev_draw () (if (edit_mode) (draw) nil))       -- compiled C function --
     
    1111    (draw)
    1212    (set_y y)))
    13        
     13
    1414
    1515
     
    3838    nil)
    3939  T)
    40    
     40
    4141
    4242
     
    4444  (funs  (ai_fun   lhold_ai)
    4545         (draw_fun dev_draw))
    46   (states "art/misc.spe"         
     46  (states "art/misc.spe"
    4747          (stopped           "lhold")))
    4848
    4949
    5050
    51 (def_char OBJ_MOVER 
     51(def_char OBJ_MOVER
    5252  (funs (ai_fun       mover_ai)
    5353        (constructor  mover_cons)
     
    5858  (states "art/misc.spe" (stopped '("mover" "mover" ))))
    5959
    60 /*    Compiled C           
     60/*    Compiled C
    6161(defun mover_ai ()
    6262  (if (eq (total_objects) 2)
    6363      (let ((dest (get_object 0))
    6464            (mover (get_object 1)))
    65         (if (< (aistate) 2)             ; transfer object to next mover       
     65        (if (< (aistate) 2)             ; transfer object to next mover
    6666            (progn
    67               (with_object dest 
     67              (with_object dest
    6868                           (progn
    6969                             (link_object mover)
    7070                             (set_aistate (aitype))))
    7171              (remove_object mover))
    72           (progn             
     72          (progn
    7373            (set_aistate (- (aistate) 1))
    7474            (let ((newx (- (with_object dest (x)) (/ (* (- (with_object dest (x)) (x)) (aistate)) (aitype))))
    7575                  (newy (- (with_object dest (y)) (/ (* (- (with_object dest (y)) (y)) (aistate)) (aitype)))))
    76               (with_object mover 
    77                            (progn 
     76              (with_object mover
     77                           (progn
    7878                             (platform_push (- newx (x)) (- newy (y)))
    7979                             (set_x newx)
     
    9292      (let ((last (get_object (- x 1))))   ; see if the last object has the same position as us
    9393        (if (and (eq (with_object last (x)) (x)) (eq (with_object last (y)) (y)))
    94             (if (eq (aistate) 1)                       
     94            (if (eq (aistate) 1)
    9595                (if (eq (with_object last (fade_count)) 0)
    9696                    (set_aistate 1)
     
    107107  T)
    108108
    109 (defun respwan_cons () (set_xvel 50)) 
     109(defun respwan_cons () (set_xvel 50))
    110110
    111111
    112 (def_char RESPAWN 
     112(def_char RESPAWN
    113113  (funs (ai_fun      respawn_ai)
    114         (draw_fun    dev_draw) 
     114        (draw_fun    dev_draw)
    115115        (constructor respwan_cons))
    116116  (flags (unlistable T))
  • abuse/trunk/data-frabs/addon/pong/pong.lsp

    r566 r582  
    2424;;;; called lisp :-)
    2525
    26 ;;;; Please do not ask me for docs on how to code with the abuse engine, there are 
     26;;;; Please do not ask me for docs on how to code with the abuse engine, there are
    2727;;;; none at this time and there won't be any until networked abuse is available.
    2828;;;; ALL games written with the abuse engine are network ready with no additional
    29 ;;;; work including this one, but there are some issues that need addressing 
     29;;;; work including this one, but there are some issues that need addressing
    3030;;;; that cannot be fully discussed until the net code is finished.  When these
    3131;;;; docs are written they will be available at http://www.crack.com   Estimated
     
    5858(setq pong_dir "addon/pong/")  ; in case we change the location of these files later
    5959                               ; this is always a very good idea to do because the user of
    60                                ; this program may/may not be able to install into this directory       
     60                               ; this program may/may not be able to install into this directory
    6161(setq pong_art (concatenate 'string pong_dir "pong.spe"))  ; all artwork is in this file
    6262
     
    106106      (let ((this-digit (/ score digs_left)))
    107107        (put_image x y (aref nums this-digit))
    108         (show_score (+ x (image_width (aref nums this-digit))) y 
     108        (show_score (+ x (image_width (aref nums this-digit))) y
    109109                    (/ digs_left 10) (- score (* digs_left this-digit))))))
    110110
     
    143143          (blow_up_tile tilex (+ tiley 1))
    144144          (blow_up_tile (+ tilex 1) tiley)))
    145              
     145
    146146    (with_object (bg) (add_hp 10))           ; give player points
    147147
     
    155155(defun check_collide (status)    ;; returns T if we hit something
    156156  (if (not (eq status T))                                  ; did we hit anything?
    157       (if (eq (car (cdr status)) 'object)                  ; did we hit an object?           
     157      (if (eq (car (cdr status)) 'object)                  ; did we hit an object?
    158158          (let ((object (car (cdr (cdr status)))))
    159159            (if (eq (with_object object (otype)) PADDLE)   ; did we hit the paddle?
     
    163163                      (if (> 20 (aistate)) (set_aistate 20)
    164164                        (if (< 160 (aistate)) (set_aistate 160)))
    165                       T) 
     165                      T)
    166166                  nil)
    167167              nil)
     
    185185(defun move_ball ()  ;; returns status of move
    186186  (let ((status (float_tick)))
    187     (if (not (eq status T))   ; T means we did not hit anything 
     187    (if (not (eq status T))   ; T means we did not hit anything
    188188        (let ((block_flags (car status)))
    189189          (if (or (blocked_left block_flags) (blocked_right block_flags)) ; bounce left/right
     
    208208  (select (aitype)
    209209          (0  ; normal play, bounce around and stuff..
    210            (check_collide (move_ball))             
     210           (check_collide (move_ball))
    211211           (if (> (y) 240)  ; check to see if we are dead
    212212               (progn
     
    221221                     T)))
    222222             T))
    223                  
     223
    224224           (1 ; ball is dead - go to paddle and fade in
    225225            (set_x (with_object (bg) (x)))
     
    229229                (set_aitype 0))
    230230            T)))
    231          
     231
    232232
    233233(def_char BALL
     
    253253      (mover xm 0 0)
    254254    0))
    255      
     255
    256256
    257257(def_char PADDLE
     
    280280  (next_picture)
    281281  (if (touching_bg)  ; are we touching the paddle
    282       (progn 
     282      (progn
    283283        (add_score 1000)
    284284        (with_object (add_object BALL (x) (y) 1) (progn (set_fade_count 15) (set_aistate 80)))
     
    327327(create_players PADDLE)
    328328(set_first_level (get_level_name current_level))
    329 (gc)    ; garbage collect 
     329(gc)    ; garbage collect
    330330(tmp-space)
    331331
  • abuse/trunk/data-frabs/addon/pong/userfuns.lsp

    r44 r582  
    88      (set_lives first x)
    99      (set_all_lives (next_focus first) x))))
    10  
    1110
    12 (defun select_place (x place)
     11
     12(defun select_place (x place)
    1313  (- (/ x place) (* (/ x (* place 10)) 10)))
    1414
    15 (defun dig2char (x) 
     15(defun dig2char (x)
    1616  (code-char (+ x (char-code "0"))))
    1717
     
    2424    (reverse-seq name first last))
    2525)
    26 (defun forward-seq (name first last) 
    27   (if (> first last) 
    28       nil 
    29     (cons (concatenate 'string name (digstr first 4) ".pcx") 
     26(defun forward-seq (name first last)
     27  (if (> first last)
     28      nil
     29    (cons (concatenate 'string name (digstr first 4) ".pcx")
    3030          (forward-seq name (+ 1 first) last))))
    31 (defun reverse-seq (name last first) 
    32   (if (< last first) 
    33       nil 
    34     (cons (concatenate 'string name (digstr last 4) ".pcx") 
     31(defun reverse-seq (name last first)
     32  (if (< last first)
     33      nil
     34    (cons (concatenate 'string name (digstr last 4) ".pcx")
    3535          (reverse-seq name (- last 1) first))))
    3636
Note: See TracChangeset for help on using the changeset viewer.