Pol  Revision:3cfda13
ufacing.h
Go to the documentation of this file.
1 
7 #ifndef __UFACING_H
8 #define __UFACING_H
9 
10 #include "../poltype.h"
11 #include "../uconst.h"
12 
13 #include <array>
14 
15 namespace Pol
16 {
17 namespace Core
18 {
19 class UObject;
20 
21 extern UFACING away_cvt[8];
22 extern std::array<int, 7> adjustments;
23 }
24 namespace Mobile
25 {
26 class Character;
27 
28 bool DecodeFacing( const char* dir, Core::UFACING& facing );
29 
31 
32 const char* FacingStr( Core::UFACING facing );
33 
34 Core::UFACING direction_toward( const Character* src, const Core::UObject* idst );
35 Core::UFACING direction_toward( const Character* src, Core::xcoord to_x, Core::ycoord to_y );
37  Core::ycoord to_y );
38 
39 Core::UFACING direction_away( const Character* src, const Core::UObject* idst );
40 Core::UFACING direction_away( const Character* src, Core::xcoord from_x, Core::ycoord from_y );
41 }
42 }
43 
44 #endif // UFACING_H
const char * FacingStr(Core::UFACING facing)
Definition: ufacing.cpp:34
unsigned short ycoord
Definition: poltype.h:20
UFACING away_cvt[8]
Definition: ufacing.cpp:21
Core::UFACING GetRandomFacing()
Definition: ufacing.cpp:28
Core::UFACING direction_toward(const Character *src, const Core::UObject *idst)
Definition: ufacing.cpp:58
std::array< int, 7 > adjustments
Definition: ufacing.cpp:24
Core::UFACING direction_away(const Character *src, const Core::UObject *idst)
Definition: ufacing.cpp:153
Definition: berror.cpp:12
bool DecodeFacing(const char *dir, Core::UFACING &facing)
Definition: ufacing.cpp:167
unsigned short xcoord
Definition: poltype.h:19