1 /***************************************************************************** 2 ** This is part of the SpaceZero program 3 ** Copyright (C) 2006-2013 MRevenga 4 ** 5 ** This program is free software; you can redistribute it and/or modify 6 ** it under the terms of the GNU General Public License (version 3), or 7 ** (at your option) any later version, as published by the Free Software 8 ** Foundation. 9 ** 10 ** This program is distributed in the hope that it will be useful, 11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 ** GNU General Public License for more details. 14 ** 15 ** You should have received a copy of the GNU General Public License 16 ** along with this program; if not, write to the Free Software 17 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 ******************************************************************************/ 19 20 /************* SpaceZero M.R.H. 2006-2013 ****************** 21 Author: MRevenga 22 E-mail: mrevenga at users.sourceforge.net 23 version 0.86 December 2013 24 **************************************************************/ 25 26 #ifndef _OBJECTS_ 27 #define _OBJECTS_ 28 29 #include <string.h> 30 #include <stdio.h> 31 #include <stdlib.h> 32 #include <math.h> 33 #include <gtk/gtk.h> 34 #include "general.h" 35 #include "data.h" 36 #include "players.h" 37 38 39 40 #define VELMAX 60 41 #define VELMAX2 VELMAX*VELMAX 42 #define ACELMAX 600 43 #define VELANG .5 44 #define GASMAX 1000 45 #define STATEMAX 100 46 47 48 /* habitat modes */ 49 #define H_SPACE 1 50 #define H_PLANET 2 51 #define H_SHIP 3 52 53 /* Obj modes */ 54 #define NAV 1 55 #define LANDED 2 56 #define SOLD 3 57 58 59 /* object types 0-31 */ 60 #define SHIP 1 61 #define PROJECTILE 2 62 #define PLANET 3 63 #define ASTEROID 4 64 #define ARTEFACT 5 65 #define TRACKPOINT 13 66 #define TRACE 14 67 #define ALLOBJS 31 68 69 /* objects subtypes 0-16*/ 70 /* ship subtypes (SHIP)*/ 71 #define SHIP0 0 /* no ship, any ship */ 72 #define SHIP1 1 73 #define SHIP2 2 74 #define SHIP3 3 75 #define SHIP4 4 76 #define SHIP5 5 77 #define SHIP6 6 78 #define SHIP7 7 79 #define SHIP8 8 80 #define SHIP9 9 81 #define SHIP_S_MAX SHIP9 82 83 /* Asteroid subtypes */ 84 #define ASTEROID1 1 85 #define ASTEROID2 2 86 #define ASTEROID3 3 87 88 89 90 /* predefined ships */ 91 #define EXPLORER SHIP1 92 #define FIGHTER SHIP3 93 #define QUEEN SHIP4 94 #define SATELLITE SHIP5 95 #define TOWER SHIP6 96 #define PILOT SHIP7 97 #define FREIGHTER SHIP8 98 #define GOODS SHIP9 99 100 /* cost of the spaceships */ 101 102 #define COSTEXPLORER 0.01 103 #define COSTFIGHTER 0.01 104 #define COSTQUEEN 0.04 105 #define COSTFREIGHTER 0.04 106 #define COSTGOODS 0.0 107 #define COSTSATELLITE 0.005 108 #define COSTTOWER 0.0 109 #define COSTPILOT 0.0 110 111 112 #define PRICESHIP0 0 113 #define PRICESHIP1 100 114 #define PRICESHIP2 200 115 #define PRICESHIP3 300 116 #define PRICESHIP4 400 117 #define PRICESHIP5 50 118 #define PRICESHIP6 200 119 #define PRICESHIP7 50 120 #define PRICESHIP8 5000 121 #define PRICESHIP9 0 122 123 /* mass of ships */ 124 #define MASSEXPLORER 50 125 #define MASSFIGHTER 100 126 #define MASSQUEEN 400 127 #define MASSSATELLITE 10 128 #define MASSTOWER 100 129 #define MASSPILOT 10 130 #define MASSFREIGHTER 400 131 #define MASSGOODS 10 132 133 134 /* projectile subtypes (PROJECTILE) 49-64*/ 135 #define SHOT0 49 136 #define SHOT1 50 137 #define SHOT2 51 138 #define SHOT3 52 /* missile */ 139 #define SHOT4 53 /* laser */ 140 #define EXPLOSION 54 141 #define MISSILE SHOT3 142 #define LASER SHOT4 143 144 145 /* objects life */ 146 147 #define LIFEPILOT 5000 148 #define LIFEGOODS 2500 149 #define LIFESATELLITE 2400 150 #define LIFEASTEROID 9000 151 #define LIFEEXPLOSION 150 152 #define LIFETRACE 500 153 #define LIFESHOT1 30 154 #define LIFESHOT2 50 155 #define LIFESHOT3 200 /* MISSILE */ 156 #define LIFESHOT4 5 /* LASER */ 157 158 /* ship items */ 159 #define ITSURVIVAL 1 /* has a survival pod */ 160 161 162 /* weapons types */ 163 #define CANNON0 0 /* no weapon */ 164 #define CANNON1 1 /* shot */ 165 #define CANNON2 2 /* shot */ 166 #define CANNON3 3 /* shot */ 167 #define CANNON4 4 /* tower,new precision cannon */ 168 #define CANNON5 5 /* shot */ 169 #define CANNON6 6 /* shot */ 170 #define CANNON7 7 /* velocity, not used */ 171 #define CANNON8 8 /* missile */ 172 #define CANNON9 9 /* laser */ 173 #define NUMWEAPONS 10 174 #define CANNONMAX CANNON9 175 176 #define PRICECANNON0 0 177 #define PRICECANNON1 100 178 #define PRICECANNON2 150 179 #define PRICECANNON3 200 180 #define PRICECANNON4 400 181 #define PRICECANNON5 800 182 #define PRICECANNON6 1400 183 #define PRICECANNON7 1800 /* velocity */ 184 #define PRICECANNON8 2000 /* missile */ 185 #define PRICECANNON9 2200 /* laser */ 186 187 /* engine types */ 188 #define ENGINE0 0 /* no engine */ 189 #define ENGINE1 1 /* only turn */ 190 #define ENGINE2 2 191 #define ENGINE3 3 192 #define ENGINE4 4 193 #define ENGINE5 5 194 #define ENGINE6 6 195 #define ENGINEMAX ENGINE6 196 197 #define PRICEENGINE0 0 198 #define PRICEENGINE1 100 199 #define PRICEENGINE2 200 200 #define PRICEENGINE3 300 201 #define PRICEENGINE4 400 202 #define PRICEENGINE5 500 203 #define PRICEENGINE6 600 204 205 /* Planet states */ 206 #define PUNKNOWN 0 207 #define POWN 1 208 #define PALLY 1<<1 209 #define PINEXPLORE 1<<2 210 #define PENEMY 1<<3 211 212 213 /* Terrain types */ 214 #define TERRAIN 0 215 #define LANDZONE 1 216 217 /* player status */ 218 #define PLAYERNULL 0 /* not used */ 219 #define PLAYERIDLE 1 /* not used */ 220 #define PLAYERDEAD 2 /* GAMEOVER */ 221 #define PLAYERACTIVE 3 /* all states > PLAYERACTIVE are active states */ 222 #define PLAYERMODIFIED 4 /* when the number of ships or habitat change */ 223 224 #define OBJNAMESMAXLEN 16 /*max size of objs names. */ 225 226 struct _Segment{ 227 int x0,y0,x1,y1; 228 int type; 229 struct _Segment *next; 230 }; 231 232 typedef struct _Segment Segment; 233 234 235 struct Planet{ 236 Segment *segment; /* Planet terrain */ 237 int x,y; /* coordinates of the planet */ 238 float r; /* radio */ 239 float gold; /* (0,...] */ 240 float reggold; /* index of gold regeneration */ 241 float A,B; /* local, tmp variables */ 242 }; 243 244 typedef struct _Object Object; 245 246 struct ObjList{ 247 Object *obj; 248 struct ObjList *next; 249 }; 250 251 struct HeadObjList{ 252 int n; 253 int update; 254 struct ObjList *list; 255 }; 256 257 258 typedef struct{ 259 int type; 260 int durable; 261 int life; 262 int damage; 263 int max_vel; 264 int mass; 265 int gascost; 266 float unitcost; 267 }Projectile; 268 269 typedef struct{ 270 int type; 271 int rate; /* time the weapon is ready again */ 272 int nshots; /* number of shots, guns */ 273 int cont1; /* if !=0 cant shot again */ 274 int mass; /* mass of the projectile */ 275 int n; /* number of ammunition */ 276 int max_n; /* capacity */ 277 Projectile projectile; 278 }Weapon; 279 280 typedef struct{ 281 int type; 282 int a_max; /* max accel */ 283 int a; /* increment of acceleration */ 284 int v_max; /* max speed */ 285 int v2_max; /* max speed 2 */ 286 float ang_a; /* increment angular acceleration */ 287 float ang_a_max; /* max angular acceleration */ 288 float ang_v_max; /* max angular velocity */ 289 float gascost; /* cost of gas */ 290 int mass; /* mass of the engine */ 291 }Engine; 292 293 typedef struct{ 294 Object *obj[4]; /* use to point to 4 objects 295 enemy ship, 296 planets: enemy, inexplore and ally */ 297 float d2[4]; /* distance2 to these objects */ 298 int td2[4]; /* time when such info is updated */ 299 int mlevel; /* if there is a near high level SHIP */ 300 int tmlevel; 301 int a,b; /* low fuel stop switches */ 302 }Data; 303 304 305 typedef struct{ 306 int capacity; /* max. mass capacity */ 307 int mass; /* actual mass cargo */ 308 int n; /* number of objects */ 309 struct HeadObjList *hlist; /* objects list */ 310 }Cargo; 311 312 struct Order{ 313 int priority; 314 int id; 315 int time; /* duration of the order */ 316 int g_time; /* order time */ 317 float a,b,c,d; /* internal variables */ 318 float e,f,g,h; 319 float i,j,k,l; 320 }; 321 322 323 struct OrderList{ 324 struct Order order; 325 struct OrderList *next; 326 }; 327 328 329 struct _Object{ 330 int id; /* global identifier */ 331 int pid; /* player identifier */ 332 int oriid,destid; /* origin and destination planet id (only FREIGHTER) */ 333 char name[MAXTEXTLEN]; /* object name */ 334 short player; /* id of the player */ 335 short type; /* type: SHIP,PLANET,PROJECTILE,... */ 336 337 short subtype; /* object subtype */ 338 short level; 339 float experience; /* experience */ 340 float pexperience;/* partial experience */ 341 int kills; /*number of enemies killed. */ 342 int ntravels; /*number of planets landed. */ 343 344 int durable; 345 int visible; /* not used */ 346 int selected; /* if ship is selected for an order */ 347 int radar; /* radar range */ 348 int mass; /* mass */ 349 350 int items; /* survival ship, ...*/ 351 int radio; /* ship radio */ 352 float cost; /* cost of the object per unit time*/ 353 int damage; /* damage of the ship in collision*/ 354 355 short ai; /* 0: (manual).(1,10) with AI [0,10] */ 356 short modified; /* SENDOBJMOD, SENDOBJMOD0, etc, must be updated by net */ 357 short ttl; /* if !=0 don't send */ 358 short habitat; /* free space or planet (H_SPACE H_PLANET)*/ 359 short mode; /* LANDED, NAV(EGATING), SOLD */ 360 361 float x,y; /* position */ 362 float x0,y0; /* old position */ 363 float vx,vy; /* velocity */ 364 float fx,fy; /* new force */ 365 float fx0,fy0; /* old force */ 366 367 float a; /* ship angle */ 368 float ang_v; /* angular velocity */ 369 float ang_a; /* angular acceleration */ 370 float accel; /* linear acceleration */ 371 float gas; /* gas */ 372 float gas_max; /* gas capacity */ 373 float life; /* time life */ 374 float shield; /* shield [0,1]*/ 375 float state; /* estate of the ship %[0,100]*/ 376 377 float dest_r2; /* distance**2 to the nearest object */ 378 int sw; 379 short trace; 380 int norder; /* number of pending orders */ 381 Cargo cargo; /* capacity of the bodega TODO. In planets: no of ships */ 382 383 struct Order actorder; 384 Object *parent; /* pointer to parent obj */ 385 Object *dest; /* pointer to nearest enemy object */ 386 Object *in; /* Object in which is contained */ 387 struct Planet *planet; 388 struct OrderList *lorder; 389 390 Weapon *weapon; /* weapon selected 0 1 2*/ 391 Weapon weapon0; /* shots */ 392 Weapon weapon1; /* missile */ 393 Weapon weapon2; /* laser beam */ 394 Engine engine; /* motor */ 395 Data *cdata; /* data base */ 396 397 }; 398 399 400 401 struct ObjectAll{ /* SENDOBJALL */ 402 int id; /* global identifier */ 403 int pid; /* player identifier */ 404 int oriid,destid; /* origin and destination planet id (only FREIGHTER) */ 405 char name[MAXTEXTLEN]; /* object name */ 406 short player; 407 short type; /* type: SHIP,PLANET,PROJECTILE,... */ 408 short subtype; /* object subtype */ 409 410 short level; 411 float experience; 412 int kills; /*number of enemies killed */ 413 int ntravels; /*number of planets landed. */ 414 415 int durable; 416 int visible; /* not used */ 417 int selected; /* if ship is selected for an order */ 418 int radar; /* radar range */ 419 int mass; /* mass */ 420 421 unsigned int items; 422 int radio; /* ship radio */ 423 float cost; /* cost of the object per unit time*/ 424 int damage; /* damage of the ship in collision*/ 425 426 short ai; /* -1: by keyboard. [0,10] */ 427 short modified; /* SENDOBJMOD, SENDOBJMOD0, etc, must be updated by net */ 428 short ttl; /* if !=0 don't send */ 429 short habitat; /* free space or planet (H_SPACE H_PLANET)*/ 430 short mode; /* LANDED, NAV(EGATING) */ 431 432 float x,y; /* position */ 433 float x0,y0; /* old position */ 434 float vx,vy; /* velocity */ 435 float fx,fy; /* new force */ 436 float fx0,fy0; /* old force */ 437 438 float a; /* ship angle */ 439 float ang_v; /* angular velocity */ 440 float ang_a; /* angular acceleration */ 441 float accel; /* linear acceleration */ 442 float gas; /* gas */ 443 float gas_max; /* gas capacity */ 444 float life; /* time life */ 445 float shield; /* shield [0,1]*/ 446 float state; /* estate of the ship %[0,100]*/ 447 448 float dest_r2; /* distance**2 to the nearest object */ 449 int sw; /* id of his killer */ 450 short trace; 451 452 int norder; /* number of pending orders */ 453 struct Order actorder; /* actual order */ 454 455 int parent; /* pointer to parent obj */ 456 int dest; /* pointer to nearest enemy object */ 457 int inid; /* Object in which is contained */ 458 459 int weapon; /*weapon selected 0 1 2*/ 460 Weapon weapon0; /* actual weapon */ 461 Weapon weapon1; /* actual weapon */ 462 Weapon weapon2; /* actual weapon */ 463 Engine engine; /* motor */ 464 Cargo cargo; /* capacity of the dock TODO */ 465 }; 466 467 struct ObjectNew{ /* SENDOBJNEW */ 468 int id; /* identificador */ 469 short player; 470 short type; /* type: SHIP,PLANET,PROJECTILE,... */ 471 472 short subtype; /* subtipo de objeto */ 473 int durable; 474 int radio; /* ship radio */ 475 int damage; /* damage of the ship */ 476 477 short ai; /* -1: by keyboard. [0,10] */ 478 short modified; /* SENDOBJMOD, SENDOBJMOD0, etc, must be updated by net */ 479 short habitat; /* free space or planet (H_SPACE H_PLANET)*/ 480 short mode; /* LANDED, NAV(EGATING) */ 481 482 float x,y; /* coordinates */ 483 float vx,vy; /* velocity */ 484 float a; /* ship angle */ 485 float gas; /* gas */ 486 float life; /* time life */ 487 488 int parent; /* pointer to parent obj */ 489 int inid; /* Object in which is contained */ 490 int planet; 491 492 int engtype; 493 }; 494 495 496 struct ObjectAAll{ /* SENDOBJAALL */ 497 int id; /* identificador */ 498 short level; 499 short habitat; /* free space, planet or ship */ 500 short mode; /* LANDED, NAVEGATING */ 501 float x,y; /* actual coordinates */ 502 float x0,y0; /* old coordinates */ 503 float vx,vy; /* actual velocity */ 504 505 float a; /* ship angle */ 506 float ang_v; /* angular velocity */ 507 float ang_a; /* angular acceleration */ 508 float accel; /* acceleration */ 509 510 float gas; /* fuel */ 511 float life; /* life time */ 512 float state; /* ship state %[0,100]*/ 513 514 int inid; /* Object id in which is contained */ 515 }; 516 517 518 struct Objectdynamic{ /* SENDOBJMOD */ 519 int id; /* identificador */ 520 short level; 521 short habitat; /* free space or planet */ 522 int inid; /* id of the container */ 523 short mode; /* LANDED, NAVEGATING */ 524 float x,y; /* actual coordinates */ 525 float x0,y0; /* old coordinates */ 526 float vx,vy; /* actual velocity */ 527 float a; /* ship angle */ 528 float ang_v; /* angular velocity */ 529 float ang_a; /* angular acceleration */ 530 float accel; /* aceleration */ 531 float state; /* ship state %[0,100]*/ 532 }; 533 534 535 struct Objectpos{ /* SENDOBJMOD0 */ 536 int id; /* identificador */ 537 float x,y; /* actual coordinates */ 538 }; 539 540 struct NearObject{ 541 Object *obj; 542 float d2; 543 }; 544 545 546 struct Habitat{ 547 int type; /* H_SPACE, H_PLANET , H_SHIP */ 548 Object *obj; 549 }; 550 551 552 553 /* function Declarations */ 554 555 int CopyObject(Object *obj,Object *nobj); 556 void Experience(Object *obj,float points); 557 Object *NewObj(int type,int stype, 558 int x,int y,float vx,float vy, 559 int weapontype,int engtype,int,Object *parent,Object *in); 560 void ShipProperties(Object *obj,int stype,Object *in); 561 void NewWeapon(Weapon *weapon,int type); 562 void NewEngine(Engine *eng,int type); 563 struct Planet *NewPlanet(void); 564 /* int GetSegment(Segment *segment,Object *obj); */ 565 int GetSegment(Segment *segment,struct Planet *planet,float x,float y); 566 int GetLandedZone(Segment *segment,struct Planet *planet); 567 568 Object *RemoveDeadObjs(struct HeadObjList *lhobjs,Object *); 569 void RemoveObj(struct HeadObjList *lhobjs,Object *obj2remove); 570 int GameOver(struct HeadObjList *lhead,struct Player *players,int actual_player); 571 572 int CountObjs(struct HeadObjList *lh,int player,int type,int subtype); 573 int CountShipsInPlanet(struct HeadObjList *lh,int planetid,int player,int type,int subtype,int max); 574 int CountShips(struct HeadObjList *lh,int *c,int *s); 575 int CountPlayerShipObjs(struct HeadObjList *lh,int player,int *cont); 576 int CountPlayerPlanets(struct HeadObjList *lh,struct Player *player,int *cont); 577 int CountPlanets(struct HeadObjList *lh,int type); 578 int CountModObjs(struct HeadObjList *lh,int type); 579 580 void PrintObj(Object *obj); 581 582 Object *SelectObj(struct HeadObjList *lh,int id); 583 Object *SelectpObj(struct HeadObjList *lh,int id,int player); 584 Object *SelectObjInObj(struct HeadObjList *lh,int id,int player); 585 Object *SelectpObjInObj(struct HeadObjList *lh,int pid,int player); 586 Object *PrevCv(struct HeadObjList *lh,Object *,int); 587 Object *NextCv(struct HeadObjList *lh,Object *,int); 588 Object *FirstShip(struct HeadObjList *lh,Object *cv0,int pid); 589 590 Object *NextPlanetCv(struct HeadObjList *lh,Object *cv0,int pid); 591 Object *PrevPlanetCv(struct HeadObjList *lh,Object *cv0,int pid); 592 593 void Explosion(struct HeadObjList *lh,Object *cv,Object *obj,int type); 594 595 Object *ObjNearThan(struct HeadObjList *lh,int player,int x,int y,float dmin2); 596 float Distance2NearestShip(struct HeadObjList *lh,int player,int x,int y); 597 float Distance2NearestShipLessThan(struct HeadObjList *lh,int player,int x,int y,float dmin); 598 void NearestObjAll(struct HeadObjList *lhc,Object *obj,struct NearObject *objs); 599 Object *NearestObj(struct HeadObjList *lh,Object *obj,int type,int stype,int status,float *d2); 600 601 void DestroyAllObj(struct HeadObjList *lh); 602 void DestroyObj(Object *obj); 603 void DestroyPlanet(struct Planet *planet); 604 605 606 int Add2TextMessageList(struct TextMessageList *lh,char *cad,int source,int dest,int mid,int time,int value); 607 608 int Add2ObjList(struct HeadObjList *lhobjs,Object *obj); 609 int Add2ObjList_B(struct HeadObjList *lhobjs,Object *obj); 610 int Add2ObjList_E(struct HeadObjList *lhobjs,Object *obj); 611 int DestroyObjList(struct HeadObjList *lh); 612 int CountObjList(struct HeadObjList *hlist); 613 int PrintObjList(struct HeadObjList *hl); 614 int IsInObjList(struct HeadObjList *lhobjs,Object *obj); 615 void KillAllObjs(struct HeadObjList *); 616 void DestroyAllPlayerObjs(struct HeadObjList *lh,int player); 617 618 int CreatePlayerList(struct HeadObjList list1,struct HeadObjList *list2,int); 619 int CreateContainerLists(struct HeadObjList *lh,struct HeadObjList *hcontainer); 620 int CreatekplanetsLists(struct HeadObjList *lh,struct HeadObjList *hkplanets); 621 int CreatePlanetList(struct HeadObjList,struct HeadObjList *); 622 void CreateNearObjsList(struct HeadObjList *lh,struct HeadObjList *lhn,int player); 623 int CreatePilot(Object *obj); 624 625 char Type(Object *obj); 626 char *TypeCad(Object *obj); 627 628 int UpdateSectors(struct HeadObjList lh); 629 int GetPrice(Object *obj,int sid,int eng,int weapon); 630 int BuyShip(struct Player *player,Object *obj,int type); 631 632 633 Object *MarkObjs(struct HeadObjList *lh,Space reg,Object *cv,int ctrl); 634 void UnmarkObjs(struct HeadObjList *lh); 635 int PrintSelected(struct HeadObjList *lh); 636 int CountSelected(struct HeadObjList *lh,int player); 637 int CountNSelected(struct HeadObjList *lh,int player); 638 int NearMaxLevelObj(Object *obj,struct HeadObjList *lh); 639 int IsPlanetEmpty(Object *planet,Object *obj); 640 Object *FirstSelected(struct HeadObjList *lh,int player); 641 Object *SelectOneShip(struct HeadObjList *lh,Space region,Object *cv,int ctrl); 642 643 int IsInRegion(Object *obj,Space region); 644 645 646 int UpdateCell(struct HeadObjList *lh,int *cell); 647 int ValueCell(int *cell,Object *obj,int x,int y); 648 649 int CreatePilot( Object *obj); 650 651 652 653 float Distance2(Object *obj1,Object *obj2); 654 float Distance(Object *cv,float x0,float y0); 655 656 int CheckObjsId(void); 657 658 659 int CargoAdd(Object *obj1,Object *obj2); 660 int CargoRem(Object *obj1,Object *obj2); 661 int CargoDestroy(Object *obj); 662 void CargoCheck(struct HeadObjList *hol,Object *); 663 int CargoEjectObjs(Object *obj,int type,int subtype); 664 Object *CargoGet(Object *obj1,int type,int subtype); 665 int CargoIsObj(Object *obj,Object *obj2); 666 int CargoPrint(Object *obj); 667 int CargoGetMass(Object *obj); 668 int CargoBuild(Object *obj); 669 670 671 /*************************/ 672 /*****************************************************************/ 673 /* Obj Tree. Verlet lists. NOT USED */ 674 /*****************************************************************/ 675 struct ObjTree *Add2ObjTree(struct ObjTree *,Object *); 676 struct ObjTree *DelObjTree(struct ObjTree *head,Object *obj); 677 void DestroyTree(struct ObjTree *head); 678 void PrintObjTree (struct ObjTree *); 679 int IsInObjTree(struct ObjTree *,int ); 680 struct ObjTree *Look4ObjTree(struct ObjTree *,Object *); 681 682 struct VerletList *CreateVerletList(struct HeadObjList hol); 683 void PrintVerletList(struct VerletList *hvl); 684 void DestroyVerletList(struct VerletList *hvl); 685 686 #endif 687