-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMd3Controller.h
executable file
·55 lines (41 loc) · 1.38 KB
/
CMd3Controller.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
CMd3Controller.h
Author: Tom Naughton
Description: <describe the CMd3Controller class here>
*/
#ifndef CMd3Controller_H
#define CMd3Controller_H
#include "CMd3.h"
#include "CModelController.h"
#include "CAnimationQueue.h"
#include "CMd3AnimationInfo.h"
class CMd3Controller : public CModelController
{
public:
CMd3Controller(CModelInstance *inModel);
virtual ~CMd3Controller();
virtual void Reset();
virtual Boolean Animate();
virtual Boolean HandleKeyPress(const EventRecord& inKeyEvent);
virtual void appendAnimationNames(StringList *result);
virtual void StartSequenceAtIndex(int index);
virtual const char *DisplayString();
virtual int animationCount();
protected:
void BeginSequence(ModelType modelType, CMd3Animation newAnimation);
CModelInstance *SwitchToWeapon(const char *weapon);
void AnimateModel(ModelType modelType, CMd3Animation &animation);
void NextFrame(ModelType modelType, CMd3Animation &animation);
void PlayAnimationSound(CMd3Animation &newAnimation);
CMd3AnimationInfo *_animationInfo;
// there should really be one sound per model
// to handle footsteps, but I don't handle footsteps
CWav *_currentSound;
Boolean _loopSound;
float _theTime;
CMd3Animation _upperAnimation;
CMd3Animation _lowerAnimation;
CModelInstance *_nextWeapon;
CAnimationQueue _animationQueue[other_model];
};
#endif // CMd3Controller_H