| 154 | } |
| 155 | |
| 156 | void AttachAttackScriptGetter(ASContext *as_context) { |
| 157 | as_context->RegisterObjectType("AttackScriptGetter", 0, asOBJ_REF, "Used to query information from an attack xml file"); |
| 158 | as_context->RegisterObjectBehaviour("AttackScriptGetter", asBEHAVE_FACTORY, "AttackScriptGetter@ f()", asFUNCTION(AttackScriptGetter_Factory), asCALL_CDECL); |
| 159 | as_context->RegisterObjectBehaviour("AttackScriptGetter", asBEHAVE_ADDREF, "void AttackScriptGetter()", asMETHOD(AttackScriptGetter, AddRef), asCALL_THISCALL); |
| 160 | as_context->RegisterObjectBehaviour("AttackScriptGetter", asBEHAVE_RELEASE, "void AttackScriptGetter()", asMETHOD(AttackScriptGetter, ReleaseRef), asCALL_THISCALL); |
| 161 | as_context->RegisterObjectMethod("AttackScriptGetter", "void Load(const string &in path)", asFUNCTION(ASLoad), asCALL_CDECL_OBJFIRST, "Load an attack xml file into the attack script getter (e.g. \"Data/Attacks/knifeslash.xml\")"); |
| 162 | as_context->RegisterObjectMethod("AttackScriptGetter", "string GetPath()", asMETHOD(AttackScriptGetter, GetPath), asCALL_THISCALL); |
| 163 | as_context->RegisterObjectMethod("AttackScriptGetter", "string GetSpecial()", asMETHOD(AttackScriptGetter, GetSpecial), asCALL_THISCALL); |
| 164 | as_context->RegisterObjectMethod("AttackScriptGetter", "string GetUnblockedAnimPath()", asMETHOD(AttackScriptGetter, GetUnblockedAnimPath), asCALL_THISCALL); |
| 165 | as_context->RegisterObjectMethod("AttackScriptGetter", "string GetBlockedAnimPath()", asMETHOD(AttackScriptGetter, GetBlockedAnimPath), asCALL_THISCALL); |
| 166 | as_context->RegisterObjectMethod("AttackScriptGetter", "string GetThrowAnimPath()", asMETHOD(AttackScriptGetter, GetThrowAnimPath), asCALL_THISCALL); |
| 167 | as_context->RegisterObjectMethod("AttackScriptGetter", "string GetThrownAnimPath()", asMETHOD(AttackScriptGetter, GetThrownAnimPath), asCALL_THISCALL); |
| 168 | as_context->RegisterObjectMethod("AttackScriptGetter", "string GetThrownCounterAnimPath()", asMETHOD(AttackScriptGetter, GetThrownCounterAnimPath), asCALL_THISCALL); |
| 169 | as_context->RegisterObjectMethod("AttackScriptGetter", "int IsThrow()", asMETHOD(AttackScriptGetter, IsThrow), asCALL_THISCALL); |
| 170 | as_context->RegisterObjectMethod("AttackScriptGetter", "int GetHeight()", asMETHOD(AttackScriptGetter, GetHeight), asCALL_THISCALL); |
| 171 | as_context->RegisterObjectMethod("AttackScriptGetter", "vec3 GetCutPlane()", asMETHOD(AttackScriptGetter, GetCutPlane), asCALL_THISCALL); |
| 172 | as_context->RegisterObjectMethod("AttackScriptGetter", "int GetCutPlaneType()", asMETHOD(AttackScriptGetter, GetCutPlaneType), asCALL_THISCALL); |
| 173 | as_context->RegisterObjectMethod("AttackScriptGetter", "bool HasCutPlane()", asMETHOD(AttackScriptGetter, HasCutPlane), asCALL_THISCALL); |
| 174 | as_context->RegisterObjectMethod("AttackScriptGetter", "vec3 GetStabDir()", asMETHOD(AttackScriptGetter, GetStabDir), asCALL_THISCALL); |
| 175 | as_context->RegisterObjectMethod("AttackScriptGetter", "int GetStabDirType()", asMETHOD(AttackScriptGetter, GetStabDirType), asCALL_THISCALL); |
| 176 | as_context->RegisterObjectMethod("AttackScriptGetter", "bool HasStabDir()", asMETHOD(AttackScriptGetter, HasStabDir), asCALL_THISCALL); |
| 177 | as_context->RegisterObjectMethod("AttackScriptGetter", "int GetDirection()", asMETHOD(AttackScriptGetter, GetDirection), asCALL_THISCALL); |
| 178 | as_context->RegisterObjectMethod("AttackScriptGetter", "int GetSwapStance()", asMETHOD(AttackScriptGetter, GetSwapStance), asCALL_THISCALL); |
| 179 | as_context->RegisterObjectMethod("AttackScriptGetter", "int GetSwapStanceBlocked()", asMETHOD(AttackScriptGetter, GetSwapStanceBlocked), asCALL_THISCALL); |
| 180 | as_context->RegisterObjectMethod("AttackScriptGetter", "int GetUnblockable()", asMETHOD(AttackScriptGetter, GetUnblockable), asCALL_THISCALL); |
| 181 | as_context->RegisterObjectMethod("AttackScriptGetter", "int GetFleshUnblockable()", asMETHOD(AttackScriptGetter, GetFleshUnblockable), asCALL_THISCALL); |
| 182 | as_context->RegisterObjectMethod("AttackScriptGetter", "int GetAsLayer()", asMETHOD(AttackScriptGetter, GetAsLayer), asCALL_THISCALL); |
| 183 | as_context->RegisterObjectMethod("AttackScriptGetter", "string GetAlternate()", asMETHOD(AttackScriptGetter, GetAlternate), asCALL_THISCALL); |
| 184 | as_context->RegisterObjectMethod("AttackScriptGetter", "string GetReactionPath()", asMETHOD(AttackScriptGetter, GetReactionPath), asCALL_THISCALL); |
| 185 | as_context->RegisterObjectMethod("AttackScriptGetter", "string GetMaterialEvent()", asMETHOD(AttackScriptGetter, GetMaterialEvent), asCALL_THISCALL); |
| 186 | as_context->RegisterObjectMethod("AttackScriptGetter", "vec3 GetImpactDir()", asMETHOD(AttackScriptGetter, GetImpactDir), asCALL_THISCALL); |
| 187 | as_context->RegisterObjectMethod("AttackScriptGetter", "float GetBlockDamage()", asMETHOD(AttackScriptGetter, GetBlockDamage), asCALL_THISCALL); |
| 188 | as_context->RegisterObjectMethod("AttackScriptGetter", "float GetSharpDamage()", asMETHOD(AttackScriptGetter, GetSharpDamage), asCALL_THISCALL); |
| 189 | as_context->RegisterObjectMethod("AttackScriptGetter", "float GetDamage()", asMETHOD(AttackScriptGetter, GetDamage), asCALL_THISCALL); |
| 190 | as_context->RegisterObjectMethod("AttackScriptGetter", "float GetForce()", asMETHOD(AttackScriptGetter, GetForce), asCALL_THISCALL); |
| 191 | as_context->RegisterObjectMethod("AttackScriptGetter", "int GetMirrored()", asMETHOD(AttackScriptGetter, GetMirrored), asCALL_THISCALL); |
| 192 | as_context->RegisterObjectMethod("AttackScriptGetter", "int GetMobile()", asMETHOD(AttackScriptGetter, GetMobile), asCALL_THISCALL); |
| 193 | as_context->DocsCloseBrace(); |
| 194 | |
| 195 | static const int const_high = _high; |
| 196 | static const int const_medium = _medium; |
| 197 | static const int const_low = _low; |
| 198 | static const int const_right = _right; |
| 199 | static const int const_front = _front; |
| 200 | static const int const_left = _left; |
| 201 | |
| 202 | as_context->RegisterGlobalProperty("const int _high", (void *)&const_high); |
| 203 | as_context->RegisterGlobalProperty("const int _medium", (void *)&const_medium); |
| 204 | as_context->RegisterGlobalProperty("const int _low", (void *)&const_low); |
| 205 | as_context->RegisterGlobalProperty("const int _right", (void *)&const_right); |
| 206 | as_context->RegisterGlobalProperty("const int _front", (void *)&const_front); |
| 207 | as_context->RegisterGlobalProperty("const int _left", (void *)&const_left); |
| 208 | } |
| 209 | |
| 210 | int AttackScriptGetter::GetMirrored() { |
| 211 | return (int)mirror_; |
no test coverage detected