MORPH.H 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
  3. SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
  4. END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
  5. ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
  6. IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
  7. SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
  8. FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
  9. CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
  10. AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
  11. COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
  12. */
  13. /*
  14. * $Source: f:/miner/source/main/rcs/morph.h $
  15. * $Revision: 2.0 $
  16. * $Author: john $
  17. * $Date: 1995/02/27 11:32:19 $
  18. *
  19. * Header for morph.c
  20. *
  21. * $Log: morph.h $
  22. * Revision 2.0 1995/02/27 11:32:19 john
  23. * New version 2.0, which has no anonymous unions, builds with
  24. * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
  25. *
  26. * Revision 1.9 1995/01/04 12:20:46 john
  27. * Declearations to work better with game state save.
  28. *
  29. *
  30. * Revision 1.8 1995/01/03 20:38:44 john
  31. * Externed MAX_MORPH_OBJECTS
  32. *
  33. * Revision 1.7 1994/09/26 17:28:33 matt
  34. * Made new multiple-object morph code work with the demo system
  35. *
  36. * Revision 1.6 1994/09/26 15:40:17 matt
  37. * Allow multiple simultaneous morphing objects
  38. *
  39. * Revision 1.5 1994/06/28 11:55:19 john
  40. * Made newdemo system record/play directly to/from disk, so
  41. * we don't need the 4 MB buffer anymore.
  42. *
  43. * Revision 1.4 1994/06/16 13:57:40 matt
  44. * Added support for morphing objects in demos
  45. *
  46. * Revision 1.3 1994/06/08 18:22:03 matt
  47. * Made morphing objects light correctly
  48. *
  49. * Revision 1.2 1994/05/30 22:50:25 matt
  50. * Added morph effect for robots
  51. *
  52. * Revision 1.1 1994/05/30 12:04:19 matt
  53. * Initial revision
  54. *
  55. *
  56. */
  57. #ifndef _MORPH_H
  58. #define _MORPH_H
  59. #include "object.h"
  60. #define MAX_VECS 200
  61. typedef struct morph_data {
  62. object *obj; //object which is morphing
  63. vms_vector morph_vecs[MAX_VECS];
  64. vms_vector morph_deltas[MAX_VECS];
  65. fix morph_times[MAX_VECS];
  66. int submodel_active[MAX_SUBMODELS]; //which submodels are active
  67. int n_morphing_points[MAX_SUBMODELS]; //how many active points in each part
  68. int submodel_startpoints[MAX_SUBMODELS]; //first point for each submodel
  69. int n_submodels_active;
  70. ubyte morph_save_control_type;
  71. ubyte morph_save_movement_type;
  72. physics_info morph_save_phys_info;
  73. int Morph_sig;
  74. } morph_data;
  75. #define MAX_MORPH_OBJECTS 5
  76. extern morph_data morph_objects[];
  77. void morph_start(object *obj);
  78. void draw_morph_object(object *obj);
  79. //process the morphing object for one frame
  80. do_morph_frame(object *obj);
  81. //called at the start of a level
  82. init_morphs();
  83. extern morph_data *find_morph_data(object *obj);
  84. #endif
  85.