Tiberian Technologies Scripts Reference Revision: 9000
Loading...
Searching...
No Matches
AnimControlClass.h
1/* Renegade Scripts.dll
2 Copyright 2013 Tiberian Technologies
3
4 This file is part of the Renegade scripts.dll
5 The Renegade scripts.dll is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 2, or (at your option) any later
8 version. See the file COPYING for more details.
9 In addition, an exemption is given to allow Run Time Dynamic Linking of this code with any closed source module that does not contain code covered by this licence.
10 Only the source code to the module(s) containing the licenced code has to be released.
11*/
12#ifndef TT_INCLUDE__ANIMCONTROLCLASS_H
13#define TT_INCLUDE__ANIMCONTROLCLASS_H
14
15typedef enum {
16 ANIM_MODE_ONCE,
17 ANIM_MODE_LOOP,
18 ANIM_MODE_STOP,
19 ANIM_MODE_TARGET
20} AnimMode;
21
22class ChunkLoadClass;
23class ChunkSaveClass;
24class HAnimClass;
25class RenderObjClass;
26
27
28class AnimControlClass
29{
30
31protected:
32
33 RenderObjClass *Model;
34
35
36public:
37
38 AnimControlClass( void );
39 virtual ~AnimControlClass( void );
40
41 virtual bool Save( ChunkSaveClass & csave );
42 virtual bool Load( ChunkLoadClass & cload );
43 virtual void Set_Model( RenderObjClass *anim_model );
44 virtual RenderObjClass *Peek_Model( void ) { return Model; }
45 virtual void Set_Animation( const char *name, float blendtime = 0.0f, float start_frame = 0.0f ) = 0;
46 virtual void Set_Animation( const HAnimClass * anim, float blendtime = 0.0f, float start_frame = 0.0f ) = 0;
47 virtual void Set_Mode( AnimMode mode, float frame = -1 ) = 0;
48 virtual AnimMode Get_Mode( void ) = 0;
49 virtual bool Is_Complete( void ) = 0;
50 virtual const char *Get_Animation_Name( void ) = 0;
51 virtual void Set_Target_Frame( float frame ) = 0;
52 virtual float Get_Target_Frame( void ) = 0;
53 virtual float Get_Current_Frame( void ) = 0;
54 virtual HAnimClass * Peek_Animation( void ) { return NULL; }
55 virtual void Update( float dtime ) = 0;
56
57}; // 8
58
59#endif