mech3d.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788
  1. //-------------------------------------------------------------------------------
  2. //
  3. // Mech 3D layer. Controls how the mech moves through animations
  4. //
  5. // For MechCommander 2
  6. //
  7. // Replace Mactor for better looking mechs!
  8. //
  9. //---------------------------------------------------------------------------//
  10. // Copyright (C) Microsoft Corporation. All rights reserved. //
  11. //===========================================================================//
  12. #ifndef MECH3D_H
  13. #define MECH3D_H
  14. //-------------------------------------------------------------------------------
  15. // Include Files
  16. #ifndef APPRTYPE_H
  17. #include "apprtype.h"
  18. #endif
  19. #ifndef OBJECTAPPEARANCE_H
  20. #include "objectappearance.h"
  21. #endif
  22. #ifndef MSL_H
  23. #include "msl.h"
  24. #endif
  25. #include <gosFX\gosfxheaders.hpp>
  26. //-------------------------------------------------------------------------------
  27. // Structs used by layer.
  28. //
  29. typedef struct _GestureData
  30. {
  31. float startVel; //Gesture Starts at this speed
  32. float endVel; //Gesture Ends at this speed
  33. long frameStart; //Which frame does gesture start at.
  34. bool reverse; //Should we play backwards?
  35. long rightFootDownFrame0; //When should the right foot make a poof and print?
  36. long rightFootDownFrame1; //Sometimes the foot's down twice.
  37. long leftFootDownFrame0; //When should the left foot make a poof and print?
  38. long leftFootDownFrame1; //Sometimes the foot's down twice.
  39. } GestureData;
  40. typedef struct _PaintSchemata
  41. {
  42. DWORD redColor; //Replace all Reds in texture with this color scaled by intensity of red!
  43. DWORD greenColor; //Replace all Greens in texture with this color scaled by intensity of green!
  44. DWORD blueColor; //Replace all Blues in texture with this color scaled by intensity of blue!
  45. } PaintSchemata;
  46. typedef PaintSchemata *PaintSchemataPtr;
  47. //-------------------------------------------------------------------------------
  48. // Macro Definitions
  49. #define GesturePark 0
  50. #define GestureStandToPark 1
  51. #define GestureStand 2
  52. #define GestureStandToWalk 3 //OBSOLETE!
  53. #define GestureWalk 4
  54. #define GestureParkToStand 5
  55. #define GestureWalkToRun 6 //OBSOLETE!
  56. #define GestureRun 7
  57. #define GestureRunToWalk 8 //OBSOLETE!
  58. #define GestureReverse 9
  59. #define GestureStandToReverse 10 //OBSOLETE!
  60. #define GestureLimpLeft 11
  61. #define GestureLimpRight 12
  62. #define GestureIdle 13
  63. #define GestureFallBackward 14
  64. #define GestureFallForward 15
  65. #define GestureHitFront 16
  66. #define GestureHitBack 17
  67. #define GestureHitLeft 18
  68. #define GestureHitRight 19
  69. #define GestureJump 20
  70. #define GestureRollover 21
  71. #define GestureGetUp 22
  72. #define GestureFallenForward 23
  73. #define GestureFallenBackward 24
  74. #define MaxGestures 25
  75. #define MAX_MECH_ANIMATIONS MaxGestures
  76. #define NUM_MECH_STATES 10
  77. #define MECH_STATE_PARKED 0
  78. #define MECH_STATE_STANDING 1
  79. #define MECH_STATE_WALKING 2
  80. #define MECH_STATE_RUNNING 3
  81. #define MECH_STATE_REVERSE 4
  82. #define MECH_STATE_LIMPING_LEFT 5
  83. #define MECH_STATE_JUMPING 6
  84. #define MECH_STATE_FALLEN_FORWARD 7
  85. #define MECH_STATE_FALLEN_BACKWARD 8
  86. #define MECH_STATE_LIMPING_RIGHT 9
  87. #define BASE_NODE_RECYCLE_TIME 0.25f
  88. extern char MechStateByGesture[];
  89. //-------------------------------------------------------------------------------
  90. // class Mech3DAppearance
  91. class Mech3DAppearanceType: public AppearanceType
  92. {
  93. //--------------------------------------------
  94. // Stores Multi-Shapes, Animation Data, etc.
  95. public:
  96. TG_TypeMultiShapePtr mechShape[MAX_LODS];
  97. TG_TypeMultiShapePtr mechShadowShape;
  98. float lodDistance[MAX_LODS];
  99. TG_AnimateShapePtr mechAnim[MAX_MECH_ANIMATIONS];
  100. TG_TypeMultiShapePtr leftArm;
  101. TG_TypeMultiShapePtr rightArm;
  102. TG_TypeMultiShapePtr mechForwardDmgShape;
  103. TG_TypeMultiShapePtr mechBackwardDmgShape;
  104. long rightFootprintType; //Footprint type for this mech.
  105. long leftFootprintType; //Footprint type for this mech.
  106. long shadowScalar; //Values to scale shadow for this type of mech
  107. long textureSide; //Size of texture edge in pixels
  108. GestureData gestures[MaxGestures];
  109. long numSmokeNodes;
  110. long numJumpNodes;
  111. long numWeaponNodes;
  112. long numFootNodes;
  113. NodeData *nodeData;
  114. static TG_TypeMultiShapePtr SensorSquareShape;
  115. static bool animationLoadingEnabled;
  116. static disableAnimationLoading(void)
  117. {
  118. animationLoadingEnabled = false;
  119. }
  120. static enableAnimationLoading(void)
  121. {
  122. animationLoadingEnabled = true;
  123. }
  124. public:
  125. void init (void)
  126. {
  127. long i=0;
  128. for (i=0;i<MAX_LODS;i++)
  129. {
  130. mechShape[i] = NULL;
  131. lodDistance[i] = 0.0f;
  132. }
  133. for (i=0;i<MAX_MECH_ANIMATIONS;i++)
  134. mechAnim[i] = NULL;
  135. rightFootprintType = leftFootprintType = -1;
  136. shadowScalar = 0; //For stupid shadows if we need to draw them.
  137. textureSide = 128; //For stupid shadows if we need to draw them.
  138. nodeData = NULL;
  139. numSmokeNodes = numWeaponNodes = numJumpNodes = 0;
  140. mechShadowShape = NULL;
  141. }
  142. Mech3DAppearanceType (void)
  143. {
  144. init();
  145. }
  146. void destroy (void);
  147. ~Mech3DAppearanceType (void)
  148. {
  149. destroy();
  150. }
  151. virtual void init (char *fileName);
  152. long getTotalNodes (void)
  153. {
  154. return numSmokeNodes + numWeaponNodes + numJumpNodes + numFootNodes;
  155. }
  156. void setAnimation (TG_MultiShapePtr shape, DWORD animationNum);
  157. float getStartVel (long animationNum)
  158. {
  159. if ((animationNum >= 0) && (animationNum < MaxGestures))
  160. return gestures[animationNum].startVel;
  161. return 0.0f;
  162. }
  163. float getEndVel (long animationNum)
  164. {
  165. if ((animationNum >= 0) && (animationNum < MaxGestures))
  166. return gestures[animationNum].endVel;
  167. return 0.0f;
  168. }
  169. float getFrameRate (long animationNum)
  170. {
  171. if ((animationNum >= 0) && (animationNum < MaxGestures) && (mechAnim[animationNum]))
  172. return mechAnim[animationNum]->GetFrameRate();
  173. return 0.0f;
  174. }
  175. long getNumFrames (long animationNum)
  176. {
  177. if ((animationNum >= 0) && (animationNum < MaxGestures) && (mechAnim[animationNum]))
  178. return mechAnim[animationNum]->GetNumFrames();
  179. return 0.0f;
  180. }
  181. long getJumpLandFrame (void)
  182. {
  183. return (gestures[GestureJump].frameStart & 0x0000ffff);
  184. }
  185. long getJumpTakeoffFrame (void)
  186. {
  187. return (gestures[GestureJump].frameStart >> 16);
  188. }
  189. };
  190. typedef Mech3DAppearanceType *Mech3DAppearanceTypePtr;
  191. #define MAX_DUST_POOFS 3
  192. //-------------------------------------------------------------------------------
  193. typedef struct _MechAppearanceData
  194. {
  195. float frameNum;
  196. float mechFrameRate;
  197. bool leftArmOff;
  198. bool rightArmOff;
  199. bool fallen;
  200. bool forceStop;
  201. bool atTransitionToNextGesture;
  202. bool inReverse;
  203. bool inJump;
  204. bool jumpSetup;
  205. bool jumpFXSetup;
  206. bool jumpAirborne;
  207. bool oncePerFrame;
  208. bool lockRotation;
  209. bool inDebugMoveMode;
  210. bool singleStepMode;
  211. bool nextStep;
  212. bool prevStep;
  213. float velocity;
  214. long status;
  215. long sensorLevel;
  216. long currentStateGoal;
  217. long currentGestureId;
  218. long transitionState;
  219. long oldStateGoal;
  220. long hitGestureId; //What gesture should I go back to when hit?
  221. float currentFrame; //One for each part.
  222. long currentLOD;
  223. long nodeUsed[10]; //Used to stagger the weapon nodes for firing.
  224. float nodeRecycle[10]; //Used for ripple fire to find out if the node has fired recently.
  225. Stuff::Vector3D jumpDestination;
  226. Stuff::Vector3D jumpVelocity; //Real velocity vector now. Just plug into mech velocity.
  227. float baseRootNodeHeight;
  228. long isSmoking;
  229. bool isWaking;
  230. bool isDusting;
  231. bool fallDust;
  232. bool isHelicopter;
  233. } MechAppearanceData;
  234. class Mech3DAppearance: public ObjectAppearance
  235. {
  236. //-------------------------------------------------------------------------------------
  237. // Stores instance specific data. Frame counts, position, velocity, texture map, etc.
  238. protected:
  239. Mech3DAppearanceTypePtr mechType;
  240. TG_MultiShapePtr mechShape;
  241. TG_MultiShapePtr mechShadowShape;
  242. TG_MultiShapePtr sensorSquareShape;
  243. TG_MultiShapePtr sensorTriangleShape;
  244. float sensorSpin;
  245. TG_MultiShapePtr leftArm;
  246. TG_MultiShapePtr rightArm;
  247. Stuff::Vector3D leftArmPos;
  248. Stuff::Vector3D rightArmPos;
  249. float leftArmHazeFactor;
  250. float rightArmHazeFactor;
  251. bool leftArmInView;
  252. bool rightArmInView;
  253. float frameNum;
  254. float mechFrameRate;
  255. float torsoRotation;
  256. float leftArmRotation;
  257. float rightArmRotation;
  258. bool leftArmOff;
  259. bool rightArmOff;
  260. bool fallen;
  261. bool forceStop;
  262. bool atTransitionToNextGesture;
  263. bool inReverse;
  264. bool inJump;
  265. bool jumpSetup;
  266. bool jumpFXSetup;
  267. bool jumpAirborne;
  268. bool oncePerFrame;
  269. bool lockRotation;
  270. bool inDebugMoveMode;
  271. bool singleStepMode;
  272. bool nextStep;
  273. bool prevStep;
  274. float velocity;
  275. long status;
  276. long sensorLevel;
  277. long currentStateGoal;
  278. long currentGestureId;
  279. long transitionState;
  280. long oldStateGoal;
  281. long hitGestureId; //What gesture should I go back to when hit?
  282. float currentFrame; //One for each part.
  283. long currentLOD;
  284. TG_LightPtr pointLight;
  285. DWORD lightId;
  286. float idleTime; //Elapsed time since I've done something.
  287. //If it gets larger then X, play the idle animation.
  288. Stuff::Vector3D jumpDestination;
  289. Stuff::Vector3D jumpVelocity; //Real velocity vector now. Just plug into mech velocity.
  290. float hazeFactor;
  291. long *nodeUsed; //Used to stagger the weapon nodes for firing.
  292. float *nodeRecycle; //Used for ripple fire to find out if the node has fired recently.
  293. Stuff::Vector3D footPos[2]; //Used to store previous frame foot positions.
  294. //For foot poofs and footprints.
  295. //NEW GOS FX
  296. gosFX::Effect *rightDustPoofEffect[MAX_DUST_POOFS];
  297. gosFX::Effect *leftDustPoofEffect[MAX_DUST_POOFS];
  298. gosFX::Effect *smokeEffect;
  299. gosFX::Effect *jumpJetEffect;
  300. gosFX::Effect *rightShoulderBoom;
  301. gosFX::Effect *leftShoulderBoom;
  302. gosFX::Effect *criticalSmoke;
  303. gosFX::Effect *waterWake;
  304. gosFX::Effect *helicopterDustCloud;
  305. gosFX::Effect *rightArmSmoke;
  306. gosFX::Effect *leftArmSmoke;
  307. bool movedThisFrame;
  308. Stuff::Point3D leftShoulderPos;
  309. Stuff::Point3D rightShoulderPos;
  310. long currentRightPoof;
  311. long currentLeftPoof;
  312. long leftFootPoofDraw[MAX_DUST_POOFS];
  313. long rightFootPoofDraw[MAX_DUST_POOFS];
  314. Stuff::Point3D lFootPosition[MAX_DUST_POOFS];
  315. Stuff::Point3D rFootPosition[MAX_DUST_POOFS];
  316. bool rightFootDone0;
  317. bool leftFootDone0;
  318. bool rightFootDone1;
  319. bool leftFootDone1;
  320. bool inCombatMode;
  321. long isSmoking;
  322. bool isWaking;
  323. bool isDusting;
  324. bool fallDust;
  325. bool isHelicopter;
  326. float OBBRadius;
  327. DWORD localTextureHandle;
  328. float baseRootNodeHeight;
  329. DWORD psRed;
  330. DWORD psBlue;
  331. DWORD psGreen;
  332. char mechName[64];
  333. //Arm off coolness
  334. Stuff::Vector3D dVel[2];
  335. Stuff::Vector3D dRot[2];
  336. Stuff::Vector3D dAcc[2];
  337. Stuff::Vector3D dRVel[2];
  338. Stuff::Vector3D dRacc[2];
  339. float dTime[2];
  340. float flashDuration;
  341. float duration;
  342. float currentFlash;
  343. bool drawFlash;
  344. DWORD flashColor;
  345. long rotationalNodeIndex;
  346. long hitLeftNodeIndex;
  347. long hitRightNodeIndex;
  348. long rootNodeIndex;
  349. long leftArmNodeIndex;
  350. long rightArmNodeIndex;
  351. long lightCircleNodeIndex;
  352. float baseRootNodeDifference;
  353. public:
  354. static PaintSchemataPtr paintSchemata;
  355. static DWORD numPaintSchemata;
  356. public:
  357. Mech3DAppearance (void)
  358. {
  359. init();
  360. }
  361. ~Mech3DAppearance (void)
  362. {
  363. destroy();
  364. }
  365. virtual void destroy (void);
  366. virtual void init (AppearanceTypePtr tree = NULL, GameObjectPtr obj = NULL);
  367. virtual void initFX (void);
  368. virtual AppearanceTypePtr getAppearanceType (void)
  369. {
  370. return mechType;
  371. }
  372. virtual long update (bool animate = true);
  373. virtual long render (long depthFixup = 0);
  374. virtual long renderShadows (void);
  375. virtual void updateFootprints (void);
  376. virtual void updateGeometry (void);
  377. virtual void setPaintScheme (void);
  378. virtual void setPaintScheme (DWORD red, DWORD green, DWORD blue);
  379. virtual void getPaintScheme (DWORD &red, DWORD &green, DWORD &blue);
  380. virtual void resetPaintScheme (DWORD red, DWORD green, DWORD blue);
  381. virtual bool isInJump (void)
  382. {
  383. return inJump;
  384. }
  385. void flashBuilding (float dur, float fDuration, DWORD color);
  386. virtual bool isJumpSetup (void)
  387. {
  388. return jumpSetup;
  389. }
  390. virtual bool isJumpAirborne (void)
  391. {
  392. return jumpAirborne;
  393. }
  394. virtual bool setJumpParameters (Stuff::Vector3D &end);
  395. virtual bool haveFallen (void)
  396. {
  397. return fallen;
  398. }
  399. virtual bool isMouseOver (float px, float py);
  400. virtual bool recalcBounds (void);
  401. virtual void setBrake (bool brake)
  402. {
  403. forceStop = brake;
  404. }
  405. bool checkStop (void)
  406. {
  407. return forceStop;
  408. }
  409. virtual long getCurrentGestureId (void)
  410. {
  411. return currentGestureId;
  412. }
  413. virtual void setGesture (unsigned long gestureId)
  414. {
  415. //--------------------------------
  416. // We are at the goal. Store off
  417. // our current gesture state.
  418. //
  419. // NOTE: This is only used to force the helicopters to be parked
  420. // at startup. Any other attempt to use this will probably not work!!
  421. //
  422. // These two lines force the select box to match the helicopter's position in the sky
  423. currentGestureId = 2;
  424. inView = true;
  425. update();
  426. currentGestureId = gestureId;
  427. oldStateGoal = 0; //This is ONLY valid for park!!!!
  428. currentStateGoal = -1; //Not going anywhere
  429. transitionState = 0; //No Transition necessary.
  430. currentFrame = mechType->getNumFrames (currentGestureId)-1;
  431. }
  432. virtual long setGestureGoal (long stateGoal)
  433. {
  434. //This will set which gesture we are trying to get to.
  435. //-----------------------------------------------------------
  436. // Smart(tm) Gesture code goes here.
  437. //
  438. // NO gesture queueing. Current request is current goal.
  439. //
  440. if (oncePerFrame)
  441. return 0;
  442. if (oldStateGoal == stateGoal)
  443. return(0);
  444. if (currentStateGoal == stateGoal)
  445. return(0);
  446. if ((stateGoal < MECH_STATE_PARKED) || (stateGoal > MECH_STATE_LIMPING_RIGHT))
  447. return(0);
  448. if (currentStateGoal != -1)
  449. return 0;
  450. if ((currentGestureId == GestureHitFront) ||
  451. (currentGestureId == GestureHitBack) ||
  452. (currentGestureId == GestureHitLeft) ||
  453. (currentGestureId == GestureHitRight))
  454. {
  455. return 0;
  456. }
  457. if ((stateGoal == MECH_STATE_JUMPING) && !jumpSetup)
  458. return 0;
  459. //---------------------------------------------------------------
  460. // If we are still on our way to something, check if the current
  461. // Gesture will allow a change IMMEDIATELY. Set the appropriate
  462. // variables if this is TRUE and go on. Otherwise, IGNORE THIS
  463. // COMMAND. MECH will continually ask to change if necessary.
  464. transitionState = 0; //Start at beginning gestureId of this goal.
  465. currentStateGoal = stateGoal;
  466. atTransitionToNextGesture = true;
  467. oncePerFrame = true;
  468. return -1;
  469. }
  470. virtual long getFrameNumber (long partNum)
  471. {
  472. return frameNum;
  473. }
  474. virtual float getNumFramesInGesture (unsigned long gestureId)
  475. {
  476. if (mechType)
  477. return mechType->getNumFrames(gestureId);
  478. return (0.0f);
  479. }
  480. virtual float getVelocityOfGesture (unsigned long gestureId)
  481. {
  482. float result = mechType->getStartVel(gestureId);
  483. float otherResult = mechType->getEndVel(gestureId);
  484. if (otherResult == result)
  485. return(result);
  486. else
  487. {
  488. float vel = otherResult - result;
  489. otherResult = getNumFramesInGesture(gestureId);
  490. if (otherResult > Stuff::SMALL)
  491. {
  492. vel *= currentFrame / otherResult;
  493. vel += result;
  494. }
  495. return vel;
  496. }
  497. }
  498. virtual Stuff::Vector3D getVelocity (void)
  499. {
  500. return jumpVelocity;
  501. }
  502. virtual float getVelocityMagnitude (void)
  503. {
  504. if (jumpAirborne)
  505. return velocity;
  506. else
  507. return getVelocityOfGesture (currentGestureId);
  508. }
  509. virtual void setCombatMode (bool combatMode)
  510. {
  511. //------------------------------------------------------------
  512. // However we move the arms from gun to normal mode goes here.
  513. inCombatMode = combatMode;
  514. }
  515. virtual void setObjectParameters (Stuff::Vector3D &pos, float legRot, long selected, long alignment, long homeRelations);
  516. virtual void setMoverParameters (float turretRot, float lArmRot = 0.0f, float rArmRot = 0.0f, bool isAirborne = false);
  517. void debugUpdate (long whichOne);
  518. void setJustDoIt (void);
  519. void clearJustDoIt (void);
  520. virtual void setObjectNameId (long objId)
  521. {
  522. objectNameId = objId;
  523. }
  524. static void LoadPaintSchemata (void);
  525. virtual unsigned long getAppearanceClass (void)
  526. {
  527. return MECH_APPR_TYPE;
  528. }
  529. virtual void setDebugMoveMode (void)
  530. {
  531. inDebugMoveMode = true;
  532. }
  533. //--------------------------------------------
  534. // Once site Objects are in place, go get 'em
  535. virtual void setWeaponNodeUsed (long nodeId);
  536. virtual Stuff::Vector3D getWeaponNodePosition (long nodeId);
  537. virtual Stuff::Vector3D getNodePosition (long nodeId);
  538. virtual Stuff::Vector3D getNodeNamePosition (char *nodeName);
  539. virtual long getWeaponNode (long weapontype);
  540. virtual long getLowestWeaponNode (void);
  541. virtual float getWeaponNodeRecycle (long node);
  542. virtual void resetWeaponNodes (void);
  543. virtual void setWeaponNodeRecycle(long nodeId, float time);
  544. virtual void setSingleStepMode (void)
  545. {
  546. singleStepMode ^= true;
  547. }
  548. virtual void setPrevFrame (void)
  549. {
  550. prevStep = true;
  551. }
  552. virtual void setNextFrame (void)
  553. {
  554. nextStep = true;
  555. }
  556. virtual void setSensorLevel (long lvl)
  557. {
  558. sensorLevel = lvl;
  559. }
  560. //------------------------------------------------------------------------------------------
  561. //Puts mech into hit mode IF and ONLY IF the mech is standing, walking, running or limping.
  562. // NO OTHER GESTURE IS VALID!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  563. virtual void hitFront (void);
  564. virtual void hitBack (void);
  565. virtual void hitLeft (void);
  566. virtual void hitRight (void);
  567. virtual void blowLeftArm (void);
  568. virtual void blowRightArm (void);
  569. virtual void setObjStatus (long oStatus);
  570. virtual bool PerPolySelect (long mouseX, long mouseY);
  571. virtual Stuff::Point3D getRootNodeCenter (void)
  572. {
  573. Stuff::Point3D result = mechShape->GetRootNodeCenter();
  574. return result;
  575. }
  576. virtual void setAlphaValue (BYTE aVal)
  577. {
  578. mechShape->SetAlphaValue(aVal);
  579. //Sensor shape fades in opposite direction from mover
  580. sensorSquareShape->SetAlphaValue(0xff - aVal);
  581. sensorTriangleShape->SetAlphaValue(0xff - aVal);
  582. }
  583. virtual void setMechName( const char* pName )
  584. {
  585. strcpy( mechName, pName );
  586. }
  587. virtual void startSmoking (long smokeLvl);
  588. virtual void startWaterWake (void);
  589. virtual void stopWaterWake (void);
  590. virtual void playEjection (void);
  591. void copyTo (MechAppearanceData *data);
  592. void copyFrom (MechAppearanceData *data);
  593. bool leftArmRecalc (void);
  594. bool rightArmRecalc (void);
  595. virtual bool getRightArmOff (void)
  596. {
  597. return rightArmOff;
  598. }
  599. virtual bool getLeftArmOff (void)
  600. {
  601. return leftArmOff;
  602. }
  603. virtual Stuff::Vector3D getHitNodeLeft (void);
  604. virtual Stuff::Vector3D getHitNodeRight (void);
  605. virtual Stuff::Vector3D getNodeIdPosition (long nodeId);
  606. };
  607. //-------------------------------------------------------------------------------
  608. #endif