Changeset 582 for abuse/trunk/data-frabs/addon/pong/common.lsp
- Timestamp:
- May 6, 2011, 12:47:14 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/data-frabs/addon/pong/common.lsp
r44 r582 2 2 ;; See licensing information for more details on usage rights 3 3 4 ; draw function for characters only displayed during edit mode 4 ; draw function for characters only displayed during edit mode 5 5 ; such as start, etc. 6 6 ; (defun dev_draw () (if (edit_mode) (draw) nil)) -- compiled C function -- … … 11 11 (draw) 12 12 (set_y y))) 13 13 14 14 15 15 … … 38 38 nil) 39 39 T) 40 40 41 41 42 42 … … 44 44 (funs (ai_fun lhold_ai) 45 45 (draw_fun dev_draw)) 46 (states "art/misc.spe" 46 (states "art/misc.spe" 47 47 (stopped "lhold"))) 48 48 49 49 50 50 51 (def_char OBJ_MOVER 51 (def_char OBJ_MOVER 52 52 (funs (ai_fun mover_ai) 53 53 (constructor mover_cons) … … 58 58 (states "art/misc.spe" (stopped '("mover" "mover" )))) 59 59 60 /* Compiled C 60 /* Compiled C 61 61 (defun mover_ai () 62 62 (if (eq (total_objects) 2) 63 63 (let ((dest (get_object 0)) 64 64 (mover (get_object 1))) 65 (if (< (aistate) 2) ; transfer object to next mover 65 (if (< (aistate) 2) ; transfer object to next mover 66 66 (progn 67 (with_object dest 67 (with_object dest 68 68 (progn 69 69 (link_object mover) 70 70 (set_aistate (aitype)))) 71 71 (remove_object mover)) 72 (progn 72 (progn 73 73 (set_aistate (- (aistate) 1)) 74 74 (let ((newx (- (with_object dest (x)) (/ (* (- (with_object dest (x)) (x)) (aistate)) (aitype)))) 75 75 (newy (- (with_object dest (y)) (/ (* (- (with_object dest (y)) (y)) (aistate)) (aitype))))) 76 (with_object mover 77 (progn 76 (with_object mover 77 (progn 78 78 (platform_push (- newx (x)) (- newy (y))) 79 79 (set_x newx) … … 92 92 (let ((last (get_object (- x 1)))) ; see if the last object has the same position as us 93 93 (if (and (eq (with_object last (x)) (x)) (eq (with_object last (y)) (y))) 94 (if (eq (aistate) 1) 94 (if (eq (aistate) 1) 95 95 (if (eq (with_object last (fade_count)) 0) 96 96 (set_aistate 1) … … 107 107 T) 108 108 109 (defun respwan_cons () (set_xvel 50)) 109 (defun respwan_cons () (set_xvel 50)) 110 110 111 111 112 (def_char RESPAWN 112 (def_char RESPAWN 113 113 (funs (ai_fun respawn_ai) 114 (draw_fun dev_draw) 114 (draw_fun dev_draw) 115 115 (constructor respwan_cons)) 116 116 (flags (unlistable T))
Note: See TracChangeset
for help on using the changeset viewer.