NWNX:EE  8193.36.12
nwnx_consts.nss
Go to the documentation of this file.
1 
10 int NWNX_Consts_TranslateNWScriptAnimation(int nAnimation);
11 
15 int NWNX_Consts_TranslateEngineAnimation(int nAnimation);
16 
20 int NWNX_Consts_TranslateNWScriptObjectType(int nObjectType);
21 
22 
24 {
25  switch (nAnimation)
26  {
27  case ANIMATION_LOOPING_PAUSE: nAnimation = 0; break;
28  case ANIMATION_LOOPING_PAUSE2: nAnimation = 52; break;
29  case ANIMATION_LOOPING_LISTEN: nAnimation = 30; break;
30  case ANIMATION_LOOPING_MEDITATE: nAnimation = 32; break;
31  case ANIMATION_LOOPING_WORSHIP: nAnimation = 33; break;
32  case ANIMATION_LOOPING_LOOK_FAR: nAnimation = 48; break;
33  case ANIMATION_LOOPING_SIT_CHAIR: nAnimation = 36; break;
34  case ANIMATION_LOOPING_SIT_CROSS: nAnimation = 47; break;
35  case ANIMATION_LOOPING_TALK_NORMAL: nAnimation = 38; break;
36  case ANIMATION_LOOPING_TALK_PLEADING: nAnimation = 39; break;
37  case ANIMATION_LOOPING_TALK_FORCEFUL: nAnimation = 40; break;
38  case ANIMATION_LOOPING_TALK_LAUGHING: nAnimation = 41; break;
39  case ANIMATION_LOOPING_GET_LOW: nAnimation = 59; break;
40  case ANIMATION_LOOPING_GET_MID: nAnimation = 60; break;
41  case ANIMATION_LOOPING_PAUSE_TIRED: nAnimation = 57; break;
42  case ANIMATION_LOOPING_PAUSE_DRUNK: nAnimation = 58; break;
43  case ANIMATION_LOOPING_DEAD_FRONT: nAnimation = 6; break;
44  case ANIMATION_LOOPING_DEAD_BACK: nAnimation = 8; break;
45  case ANIMATION_LOOPING_CONJURE1: nAnimation = 15; break;
46  case ANIMATION_LOOPING_CONJURE2: nAnimation = 16; break;
47  case ANIMATION_LOOPING_SPASM: nAnimation = 93; break;
48  case ANIMATION_LOOPING_CUSTOM1: nAnimation = 97; break;
49  case ANIMATION_LOOPING_CUSTOM2: nAnimation = 98; break;
50  case ANIMATION_LOOPING_CUSTOM3: nAnimation = 101; break;
51  case ANIMATION_LOOPING_CUSTOM4: nAnimation = 102; break;
52  case ANIMATION_LOOPING_CUSTOM5: nAnimation = 103; break;
53  case ANIMATION_LOOPING_CUSTOM6: nAnimation = 104; break;
54  case ANIMATION_LOOPING_CUSTOM7: nAnimation = 105; break;
55  case ANIMATION_LOOPING_CUSTOM8: nAnimation = 106; break;
56  case ANIMATION_LOOPING_CUSTOM9: nAnimation = 107; break;
57  case ANIMATION_LOOPING_CUSTOM10: nAnimation = 108; break;
58  case ANIMATION_LOOPING_CUSTOM11: nAnimation = 109; break;
59  case ANIMATION_LOOPING_CUSTOM12: nAnimation = 110; break;
60  case ANIMATION_LOOPING_CUSTOM13: nAnimation = 111; break;
61  case ANIMATION_LOOPING_CUSTOM14: nAnimation = 112; break;
62  case ANIMATION_LOOPING_CUSTOM15: nAnimation = 113; break;
63  case ANIMATION_LOOPING_CUSTOM16: nAnimation = 114; break;
64  case ANIMATION_LOOPING_CUSTOM17: nAnimation = 115; break;
65  case ANIMATION_LOOPING_CUSTOM18: nAnimation = 116; break;
66  case ANIMATION_LOOPING_CUSTOM19: nAnimation = 117; break;
67  case ANIMATION_LOOPING_CUSTOM20: nAnimation = 118; break;
68  case ANIMATION_MOUNT1: nAnimation = 119; break;
69  case ANIMATION_DISMOUNT1: nAnimation = 120; break;
70  case ANIMATION_FIREFORGET_HEAD_TURN_LEFT: nAnimation = 53; break;
71  case ANIMATION_FIREFORGET_HEAD_TURN_RIGHT: nAnimation = 54; break;
72  case ANIMATION_FIREFORGET_PAUSE_SCRATCH_HEAD: nAnimation = 55; break;
73  case ANIMATION_FIREFORGET_PAUSE_BORED: nAnimation = 56; break;
74  case ANIMATION_FIREFORGET_SALUTE: nAnimation = 34; break;
75  case ANIMATION_FIREFORGET_BOW: nAnimation = 35; break;
76  case ANIMATION_FIREFORGET_STEAL: nAnimation = 37; break;
77  case ANIMATION_FIREFORGET_GREETING: nAnimation = 29; break;
78  case ANIMATION_FIREFORGET_TAUNT: nAnimation = 28; break;
79  case ANIMATION_FIREFORGET_VICTORY1: nAnimation = 44; break;
80  case ANIMATION_FIREFORGET_VICTORY2: nAnimation = 45; break;
81  case ANIMATION_FIREFORGET_VICTORY3: nAnimation = 46; break;
82  case ANIMATION_FIREFORGET_READ: nAnimation = 71; break;
83  case ANIMATION_FIREFORGET_DRINK: nAnimation = 70; break;
84  case ANIMATION_FIREFORGET_DODGE_SIDE: nAnimation = 90; break;
85  case ANIMATION_FIREFORGET_DODGE_DUCK: nAnimation = 91; break;
86  case ANIMATION_FIREFORGET_SPASM: nAnimation = 23; break;
87  default: nAnimation = 0; break;
88  }
89 
90  return nAnimation;
91 }
92 
94 {
95  switch (nAnimation)
96  {
97  case 0: nAnimation = ANIMATION_LOOPING_PAUSE; break;
98  case 52: nAnimation = ANIMATION_LOOPING_PAUSE2; break;
99  case 30: nAnimation = ANIMATION_LOOPING_LISTEN; break;
100  case 32: nAnimation = ANIMATION_LOOPING_MEDITATE; break;
101  case 33: nAnimation = ANIMATION_LOOPING_WORSHIP; break;
102  case 48: nAnimation = ANIMATION_LOOPING_LOOK_FAR; break;
103  case 36: nAnimation = ANIMATION_LOOPING_SIT_CHAIR; break;
104  case 47: nAnimation = ANIMATION_LOOPING_SIT_CROSS; break;
105  case 38: nAnimation = ANIMATION_LOOPING_TALK_NORMAL; break;
106  case 39: nAnimation = ANIMATION_LOOPING_TALK_PLEADING; break;
107  case 40: nAnimation = ANIMATION_LOOPING_TALK_FORCEFUL; break;
108  case 41: nAnimation = ANIMATION_LOOPING_TALK_LAUGHING; break;
109  case 59: nAnimation = ANIMATION_LOOPING_GET_LOW; break;
110  case 60: nAnimation = ANIMATION_LOOPING_GET_MID; break;
111  case 57: nAnimation = ANIMATION_LOOPING_PAUSE_TIRED; break;
112  case 58: nAnimation = ANIMATION_LOOPING_PAUSE_DRUNK; break;
113  case 6: nAnimation = ANIMATION_LOOPING_DEAD_FRONT; break;
114  case 8: nAnimation = ANIMATION_LOOPING_DEAD_BACK; break;
115  case 15: nAnimation = ANIMATION_LOOPING_CONJURE1; break;
116  case 16: nAnimation = ANIMATION_LOOPING_CONJURE2; break;
117  case 93: nAnimation = ANIMATION_LOOPING_SPASM; break;
118  case 97: nAnimation = ANIMATION_LOOPING_CUSTOM1; break;
119  case 98: nAnimation = ANIMATION_LOOPING_CUSTOM2; break;
120  case 101: nAnimation = ANIMATION_LOOPING_CUSTOM3; break;
121  case 102: nAnimation = ANIMATION_LOOPING_CUSTOM4; break;
122  case 103: nAnimation = ANIMATION_LOOPING_CUSTOM5; break;
123  case 104: nAnimation = ANIMATION_LOOPING_CUSTOM6; break;
124  case 105: nAnimation = ANIMATION_LOOPING_CUSTOM7; break;
125  case 106: nAnimation = ANIMATION_LOOPING_CUSTOM8; break;
126  case 107: nAnimation = ANIMATION_LOOPING_CUSTOM9; break;
127  case 108: nAnimation = ANIMATION_LOOPING_CUSTOM10; break;
128  case 109: nAnimation = ANIMATION_LOOPING_CUSTOM11; break;
129  case 110: nAnimation = ANIMATION_LOOPING_CUSTOM12; break;
130  case 111: nAnimation = ANIMATION_LOOPING_CUSTOM13; break;
131  case 112: nAnimation = ANIMATION_LOOPING_CUSTOM14; break;
132  case 113: nAnimation = ANIMATION_LOOPING_CUSTOM15; break;
133  case 114: nAnimation = ANIMATION_LOOPING_CUSTOM16; break;
134  case 115: nAnimation = ANIMATION_LOOPING_CUSTOM17; break;
135  case 116: nAnimation = ANIMATION_LOOPING_CUSTOM18; break;
136  case 117: nAnimation = ANIMATION_LOOPING_CUSTOM19; break;
137  case 118: nAnimation = ANIMATION_LOOPING_CUSTOM20; break;
138  case 119: nAnimation = ANIMATION_MOUNT1; break;
139  case 120: nAnimation = ANIMATION_DISMOUNT1; break;
140  case 53: nAnimation = ANIMATION_FIREFORGET_HEAD_TURN_LEFT; break;
141  case 54: nAnimation = ANIMATION_FIREFORGET_HEAD_TURN_RIGHT; break;
142  case 55: nAnimation = ANIMATION_FIREFORGET_PAUSE_SCRATCH_HEAD; break;
143  case 56: nAnimation = ANIMATION_FIREFORGET_PAUSE_BORED; break;
144  case 34: nAnimation = ANIMATION_FIREFORGET_SALUTE; break;
145  case 35: nAnimation = ANIMATION_FIREFORGET_BOW; break;
146  case 37: nAnimation = ANIMATION_FIREFORGET_STEAL; break;
147  case 29: nAnimation = ANIMATION_FIREFORGET_GREETING; break;
148  case 28: nAnimation = ANIMATION_FIREFORGET_TAUNT; break;
149  case 44: nAnimation = ANIMATION_FIREFORGET_VICTORY1; break;
150  case 45: nAnimation = ANIMATION_FIREFORGET_VICTORY2; break;
151  case 46: nAnimation = ANIMATION_FIREFORGET_VICTORY3; break;
152  case 71: nAnimation = ANIMATION_FIREFORGET_READ; break;
153  case 70: nAnimation = ANIMATION_FIREFORGET_DRINK; break;
154  case 90: nAnimation = ANIMATION_FIREFORGET_DODGE_SIDE; break;
155  case 91: nAnimation = ANIMATION_FIREFORGET_DODGE_DUCK; break;
156  case 23: nAnimation = ANIMATION_FIREFORGET_SPASM; break;
157  default: nAnimation = -1; break;
158  }
159 
160  return nAnimation;
161 }
162 
164 {
165  switch(nObjectType)
166  {
167  case OBJECT_TYPE_ALL: nObjectType = 0; break;
168  case OBJECT_TYPE_AREA_OF_EFFECT: nObjectType = 11; break;
169  case OBJECT_TYPE_CREATURE: nObjectType = 5; break;
170  case OBJECT_TYPE_DOOR: nObjectType = 10; break;
171  case OBJECT_TYPE_ENCOUNTER: nObjectType = 13; break;
172  case OBJECT_TYPE_ITEM: nObjectType = 6; break;
173  case OBJECT_TYPE_PLACEABLE: nObjectType = 9; break;
174  case OBJECT_TYPE_STORE: nObjectType = 14; break;
175  case OBJECT_TYPE_TRIGGER: nObjectType = 7; break;
176  case OBJECT_TYPE_WAYPOINT: nObjectType = 12; break;
177  default: nObjectType = 0; break;
178  }
179 
180  return nObjectType;
181 }
NWNX_Consts_TranslateNWScriptAnimation
int NWNX_Consts_TranslateNWScriptAnimation(int nAnimation)
Translates ANIMATION_LOOPING_* and ANIMATION_FIREFORGET_* constants to their engine equivalent.
Definition: nwnx_consts.nss:23
NWNX_Consts_TranslateEngineAnimation
int NWNX_Consts_TranslateEngineAnimation(int nAnimation)
Translates engine animation constants to their ANIMATION_LOOPING_* and ANIMATION_FIREFORGET_* equival...
Definition: nwnx_consts.nss:93
NWNX_Consts_TranslateNWScriptObjectType
int NWNX_Consts_TranslateNWScriptObjectType(int nObjectType)
Translates OBJECT_TYPE_* constants to their engine equivalent.
Definition: nwnx_consts.nss:163