personatorium.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. ////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2016 RWS Inc, All Rights Reserved
  4. //
  5. // This program is free software; you can redistribute it and/or modify
  6. // it under the terms of version 2 of the GNU General Public License as published by
  7. // the Free Software Foundation
  8. //
  9. // This program is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU General Public License along
  15. // with this program; if not, write to the Free Software Foundation, Inc.,
  16. // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. //
  18. // Personatorium.H
  19. // Project: Postal
  20. //
  21. // History:
  22. // 04/28/97 JMI Started.
  23. //
  24. // 04/29/97 BRH Removed the verb from the structure since there are
  25. // many verbs, one for each action that the person
  26. // can do, so the verb is best left up to the
  27. // GetResources() function in CPerson.
  28. //
  29. // 05/19/97 JMI Removed Woman from the enum. She did not have enough
  30. // animations so she was removed from the g_apersons.
  31. //
  32. // 06/11/97 JMI Added pszEventName to the Personatorium for specifying
  33. // event name for person animations.
  34. //
  35. // 07/01/97 BRH Added Military guy.
  36. //
  37. // 07/03/97 BRH Added Construction worker.
  38. //
  39. // 07/04/97 BRH Added man and woman victim.
  40. //
  41. // 07/23/97 BRH Added three new parameters for timing so that different
  42. // people can be tuned differently. This came from a
  43. // request to have some people react more/less to bullet
  44. // shots, and having Rocketmen react quicker in guard mode
  45. // since it takes them longer to shoot.
  46. //
  47. // 07/25/97 BRH Added initial hit points so that victims can have
  48. // different amount of hit points, swat can have more,
  49. // etc.
  50. //
  51. // 08/07/97 JMI Added names for 'hand' transform channels.
  52. //
  53. // 08/09/97 BRH Added more person types for new voices.
  54. //
  55. // 08/12/97 BRH Added writhing motion type so that we know what they
  56. // do when the are writhing, whether it be crawling,
  57. // pushing themselves on their back, or just staying in
  58. // place.
  59. //
  60. // 08/12/97 JMI Removed pszShowWeaponEvent that we just added b/c we
  61. // went ahead and hid the weapon if the current main event
  62. // is greater than or equal to 10.
  63. //
  64. // 08/12/97 BRH Added a texture scheme number to the animation struct
  65. // that indicates which texture file to load. Now the
  66. // people only need to load 1 .tex file rather than one
  67. // for every different animation.
  68. //
  69. // 08/13/97 BRH Added two more person types for different victim
  70. // textures.
  71. //
  72. // 12/17/97 JMI Added some new persons:
  73. // Employee 1 & 2, Red Cross 1 & 2, Golfer 1 & 2, Lawyer,
  74. // Bum 1 & 2, Vet 1 & 2, Nude 1 & 2, Gramps 1 & 2, Granny
  75. // 1, 2, & 3.
  76. //
  77. // 01/19/98 BRH Added shopper versions of the Golfer, Bum and Vet so
  78. // that they look different but say the normal victim
  79. // stuff that is non level specific.
  80. //
  81. // 10/06/99 BRH Adding japanese characters for the Japan expansion pack.
  82. //
  83. //////////////////////////////////////////////////////////////////////////////
  84. //
  85. // Personatorium is a description of a CPerson. There, currently, isn't too
  86. // much customizable about each CPerson via the Personatorium, but eventually
  87. // there should be plenty. Also, eventually, we hope that these might just
  88. // be used to quickly initialize a CPerson allowing it to be customized later
  89. // via an EditModify().
  90. //
  91. // To add to the Personatorium:
  92. // 1) Add an enum value to the Personatorium::Index typedef representing your
  93. // new person. Note that it MUST be entered just before NumPersons.
  94. // 2) Add an entry to the end of the array of Personatoriums, g_apersons, in
  95. // Personatorium.cpp copying an existing entry as a template.
  96. //
  97. //////////////////////////////////////////////////////////////////////////////
  98. #ifndef PERSONATORIUM_H
  99. #define PERSONATORIUM_H
  100. //////////////////////////////////////////////////////////////////////////////
  101. // C Headers -- Must be included before RSPiX.h b/c RSPiX utilizes SHMalloc.
  102. //////////////////////////////////////////////////////////////////////////////
  103. ///////////////////////////////////////////////////////////////////////////////
  104. // RSPiX Headers.
  105. ///////////////////////////////////////////////////////////////////////////////
  106. //////////////////////////////////////////////////////////////////////////////
  107. // Postal headers.
  108. //////////////////////////////////////////////////////////////////////////////
  109. #include "thing.h"
  110. #include "SampleMaster.h"
  111. //////////////////////////////////////////////////////////////////////////////
  112. // Macros.
  113. //////////////////////////////////////////////////////////////////////////////
  114. //////////////////////////////////////////////////////////////////////////////
  115. // Protos.
  116. //////////////////////////////////////////////////////////////////////////////
  117. //////////////////////////////////////////////////////////////////////////////
  118. // Typedefs.
  119. //////////////////////////////////////////////////////////////////////////////
  120. typedef struct
  121. {
  122. ///////////////////////////////////////////////////////////////////////////
  123. // Typedefs/enums.
  124. ///////////////////////////////////////////////////////////////////////////
  125. public:
  126. // This enum has one entry for each index in the g_apersons.
  127. typedef enum
  128. {
  129. Grenader, // Mimic of classic CGrenader.
  130. RocketMan, // Mimic of classic CRocketMan.
  131. Gunner, // Mimic of classic CGunner.
  132. Cop, // Mimic of classic CCop.
  133. Miner, // Miner that acts like the Grenader
  134. Swat, // Swat team member
  135. Kid, // Kid that can shoot
  136. Protestor, // Marching protestor
  137. HickCop, // New sound theme for Cop.
  138. Military, // Military guy
  139. Construction, // Construction worker
  140. TheMan, // Man victim
  141. Woman, // Woman victim
  142. ConstructionCarlos, // Mexican worker
  143. ConstructionArmando, // Hispanic worker
  144. GrenaderPepe, // Hispanic grenader
  145. GrenaderLarry,
  146. RocketmanDexter,
  147. RocketmanPaco,
  148. GunnerHeidi,
  149. GunnerLinda,
  150. CopBrian,
  151. CopHector,
  152. MinerGary,
  153. MinerFernando,
  154. SwatCharlie,
  155. SwatMatt,
  156. SheriffDale,
  157. ManFrank,
  158. WomanBetty,
  159. SheriffNorm,
  160. Employee1,
  161. Employee2,
  162. RedCross1,
  163. RedCross2,
  164. Golfer1,
  165. Golfer2,
  166. Lawyer,
  167. Bum1,
  168. Bum2,
  169. Vet1,
  170. Vet2,
  171. Nude1,
  172. Nude2,
  173. Gramps1,
  174. Gramps2,
  175. Granny1,
  176. Granny2,
  177. Granny3,
  178. ShopperG1,
  179. ShopperG2,
  180. ShopperB1,
  181. ShopperB2,
  182. ShopperV1,
  183. ShopperV2,
  184. JPMaleKensaku,
  185. JPMaleYutaka,
  186. JPMaleOsamu,
  187. JPFemaleSakura,
  188. JPFemaleTomiko,
  189. JPFemaleAsami,
  190. JPCompSales,
  191. JPCompShopper,
  192. JPPoliceKazuki,
  193. JPPoliceNoboru,
  194. JPOldWomanAyame,
  195. JPOldWomanShinobu,
  196. JPOldManRyuichi,
  197. JPOldManTadao,
  198. JPOsakaSales,
  199. // Add new indices above.
  200. NumPersons // Number of indices/Personatoriums in the g_apersons.
  201. } Index;
  202. // This is the type of writhing motion they use
  203. typedef enum
  204. {
  205. Still,
  206. Crawl,
  207. PushBack,
  208. EndOfWrithingMotions
  209. } WrithingMotion;
  210. typedef enum
  211. {
  212. Civilian,
  213. Hostile,
  214. EndOfLifestyles
  215. } Lifestyle;
  216. ///////////////////////////////////////////////////////////////////////////
  217. // Instantiable data.
  218. ///////////////////////////////////////////////////////////////////////////
  219. public:
  220. // User level description of person.
  221. char* pszDescription; // Example: "Gunner Gal", as in "Place a GUNNER GAL".
  222. // Animation strings for this person.
  223. struct
  224. {
  225. // Names used to create animation resource filenames.
  226. char* pszBaseName; // Example: "Gunner", as in "3d/GUNNER_shoot.sop".
  227. short sTextureScheme; // Example: 0 would make "3d/GUNNER0.tex"
  228. char* pszObjectName; // Name of channels of transforms for ammo.
  229. // Example: "Bullet", as in "3d/gunner_shoot_BULLET.trans".
  230. char* pszHandName; // Name of channels of transforms for hand.
  231. // Example: "hand", as in "3d/gunner_shoot_HAND.trans"
  232. char* pszEventName; // Example: "main", as in "3d/gunner_shoot_MAIN.event".
  233. } Anim;
  234. // Sound effects for this person.
  235. struct
  236. {
  237. SampleMasterID* psmidShot1; // ID of 'hit by weapon' sample.
  238. SampleMasterID* psmidShot2; // ID of 'hit by weapon' sample
  239. SampleMasterID* psmidShot3; // ID of 'hit by weapon' sample
  240. SampleMasterID* psmidShot4; // ID of 'hit by weapon' sample
  241. SampleMasterID* psmidBlownup1; // ID of 'blown up' sample.
  242. SampleMasterID* psmidBlownup2; // ID of 'blown up' sample.
  243. SampleMasterID* psmidBurning1; // ID of burning sample.
  244. SampleMasterID* psmidBurning2; // ID of burning sample
  245. SampleMasterID* psmidSuffering1; // ID of suffering sample 1.
  246. SampleMasterID* psmidSuffering2; // ID of suffering sample 2.
  247. SampleMasterID* psmidSuffering3; // ID of suffering sample 3.
  248. SampleMasterID* psmidSuffering4; // ID of suffering sample 4.
  249. SampleMasterID* psmidDying1; // ID of dying sample.
  250. SampleMasterID* psmidDying2; // ID of dying sample.
  251. SampleMasterID* psmidShooting1; // ID of shooting comment
  252. SampleMasterID* psmidShooting2; // ID of shooting comment
  253. SampleMasterID* psmidShooting3; // ID of shooting comment
  254. SampleMasterID* psmidShooting4; // ID of shooting comment
  255. SampleMasterID* psmidRandom1; // ID of random comment
  256. SampleMasterID* psmidRandom2; // ID of random comment
  257. SampleMasterID* psmidRandom3; // ID of random comment
  258. SampleMasterID* psmidRandom4; // ID of random comment
  259. } Sample;
  260. // Weapons for this person. Currently, only one supported.
  261. struct
  262. {
  263. CThing::ClassIDType idWeapon1; // CThing ID of preferred weapon.
  264. } Weapon;
  265. // Type of writhing motion
  266. WrithingMotion eWrithingMotion; // Still, crawling, or push back
  267. Lifestyle eLifestyle; //
  268. // Stats.
  269. long lGuardTimeout; // Interval between checking for intruders
  270. long lRunShootInterval; // Delay between shots while running
  271. long lShotTimeout; // Time to wait before reacting to next shot.
  272. short sInitialHitPoints; // Initial hit points for person
  273. /////// NYI ///////
  274. } Personatorium;
  275. //////////////////////////////////////////////////////////////////////////////
  276. // Declarations.
  277. //////////////////////////////////////////////////////////////////////////////
  278. // This is the master list of person descriptions that can be used to describe
  279. // a CPerson.
  280. extern Personatorium g_apersons[Personatorium::NumPersons];
  281. #endif // PERSONATORIUM_H
  282. //////////////////////////////////////////////////////////////////////////////
  283. // EOF
  284. //////////////////////////////////////////////////////////////////////////////