]>
git.cameronkatri.com Git - bsdgames-darwin.git/blob - warp/object.c
cf17fde6659b5ff6335e5c980a3421496a90f268
1 /* Header: object.c,v 7.0 86/10/08 15:12:55 lwall Exp */
4 * Revision 7.0 86/10/08 15:12:55 lwall
5 * Split into separate files. Added amoebas and pirates.
21 make_object(typ
, img
, py
, px
, vy
, vx
, energ
, mas
, where
)
30 if (free_root
.next
== &free_root
)
32 obj
= (OBJECT
*) malloc(sizeof root
);
38 free_root
.next
= obj
->next
;
39 obj
->next
->prev
= &free_root
;
44 obj
->prev
= where
->prev
;
46 obj
->prev
->next
= obj
;
54 if (typ
!= Torp
&& typ
!= Web
) {
55 occupant
[py
][px
] = obj
;
66 curobj
->prev
->next
= curobj
->next
;
67 curobj
->next
->prev
= curobj
->prev
;
68 if (curobj
== movers
) {
69 movers
= curobj
->next
;
78 curobj
->next
= free_root
.next
;
79 curobj
->prev
= &free_root
;
80 free_root
.next
->prev
= curobj
;
81 free_root
.next
= curobj
;