Torque3D Documentation / _generateds / hifiGameProcess.h

hifiGameProcess.h

Engine/source/T3D/gameBase/hifi/hifiGameProcess.h

More...

Classes:

class

List to keep track of GameBases to process.

Detailed Description

 1
 2//-----------------------------------------------------------------------------
 3// Copyright (c) 2012 GarageGames, LLC
 4//
 5// Permission is hereby granted, free of charge, to any person obtaining a copy
 6// of this software and associated documentation files (the "Software"), to
 7// deal in the Software without restriction, including without limitation the
 8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 9// sell copies of the Software, and to permit persons to whom the Software is
10// furnished to do so, subject to the following conditions:
11//
12// The above copyright notice and this permission notice shall be included in
13// all copies or substantial portions of the Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21// IN THE SOFTWARE.
22//-----------------------------------------------------------------------------
23
24#ifndef _GAMEPROCESS_HIFI_H_
25#define _GAMEPROCESS_HIFI_H_
26
27#ifndef _GAMEPROCESS_H_
28#include "T3D/gameBase/gameProcess.h"
29#endif
30
31
32/// List to keep track of GameBases to process.
33class HifiClientProcessList : public ClientProcessList
34{
35   typedef ClientProcessList Parent;
36   friend class HifiMoveList;
37
38public:
39
40   HifiClientProcessList();
41
42   // ProcessList
43   bool advanceTime(SimTime timeDelta);
44
45   // ClientProcessList
46   void clientCatchup(GameConnection*);
47
48   static void init();
49   static void shutdown();
50
51protected:
52
53   // tick cache functions -- client only
54   void ageTickCache(S32 numToAge, S32 len);
55   void forceHifiReset(bool reset) { mForceHifiReset=<a href="/coding/class/classmovelist/#classmovelist_1a6633d899e56f63f2d084a3d96bc0390a">reset</a>; }
56   U32 getTotalTicks() { return mTotalTicks; }
57   void updateMoveSync(S32 moveDiff);
58   void skipAdvanceObjects(U32 ms) { mSkipAdvanceObjectsMs += ms; }
59
60   // ProcessList
61   void onTickObject(ProcessObject *);
62   void advanceObjects();
63   void onAdvanceObjects();
64
65   void setCatchup(U32 catchup) { mCatchup = catchup; }
66
67protected:
68
69   U32 mSkipAdvanceObjectsMs;
70   bool mForceHifiReset;
71   U32 mCatchup;
72};
73
74
75class HifiServerProcessList : public ServerProcessList
76{
77   typedef ServerProcessList Parent;
78
79public:
80
81   HifiServerProcessList() {}
82
83   static void init();
84   static void shutdown();
85
86protected:
87
88   // ProcessList
89   void onTickObject(ProcessObject *);
90};
91
92#endif // _GAMEPROCESS_HIFI_H_
93