<reponame>VehpuS/learning-haxe-and-haxeflixel<gh_stars>0
// Generated by Haxe 4.1.4
#include <hxcpp.h>

#ifndef INCLUDED_flixel_input_gamepad_FlxGamepadAnalogStick
#include <flixel/input/gamepad/FlxGamepadAnalogStick.h>
#endif
#ifndef INCLUDED_flixel_input_gamepad_FlxGamepadAttachment
#include <flixel/input/gamepad/FlxGamepadAttachment.h>
#endif
#ifndef INCLUDED_flixel_input_gamepad_id_MFiID
#include <flixel/input/gamepad/id/MFiID.h>
#endif
#ifndef INCLUDED_flixel_input_gamepad_mappings_FlxGamepadMapping
#include <flixel/input/gamepad/mappings/FlxGamepadMapping.h>
#endif
#ifndef INCLUDED_flixel_input_gamepad_mappings_MFiMapping
#include <flixel/input/gamepad/mappings/MFiMapping.h>
#endif

HX_DEFINE_STACK_FRAME(_hx_pos_6a4fcdd8c98d6ad6_6_new,"flixel.input.gamepad.mappings.MFiMapping","new",0xf534e7d6,"flixel.input.gamepad.mappings.MFiMapping.new","flixel/input/gamepad/mappings/MFiMapping.hx",6,0xaa96aabc)
HX_LOCAL_STACK_FRAME(_hx_pos_6a4fcdd8c98d6ad6_9_initValues,"flixel.input.gamepad.mappings.MFiMapping","initValues",0x12bcc25c,"flixel.input.gamepad.mappings.MFiMapping.initValues","flixel/input/gamepad/mappings/MFiMapping.hx",9,0xaa96aabc)
HX_LOCAL_STACK_FRAME(_hx_pos_6a4fcdd8c98d6ad6_16_getID,"flixel.input.gamepad.mappings.MFiMapping","getID",0x524ef2e7,"flixel.input.gamepad.mappings.MFiMapping.getID","flixel/input/gamepad/mappings/MFiMapping.hx",16,0xaa96aabc)
HX_LOCAL_STACK_FRAME(_hx_pos_6a4fcdd8c98d6ad6_47_getRawID,"flixel.input.gamepad.mappings.MFiMapping","getRawID",0x62e58c17,"flixel.input.gamepad.mappings.MFiMapping.getRawID","flixel/input/gamepad/mappings/MFiMapping.hx",47,0xaa96aabc)
namespace flixel{
namespace input{
namespace gamepad{
namespace mappings{

void MFiMapping_obj::__construct( ::flixel::input::gamepad::FlxGamepadAttachment attachment){
            	HX_STACKFRAME(&_hx_pos_6a4fcdd8c98d6ad6_6_new)
HXDLIN(   6)		super::__construct(attachment);
            	}

Dynamic MFiMapping_obj::__CreateEmpty() { return new MFiMapping_obj; }

void *MFiMapping_obj::_hx_vtable = 0;

Dynamic MFiMapping_obj::__Create(::hx::DynamicArray inArgs)
{
	::hx::ObjectPtr< MFiMapping_obj > _hx_result = new MFiMapping_obj();
	_hx_result->__construct(inArgs[0]);
	return _hx_result;
}

bool MFiMapping_obj::_hx_isInstanceOf(int inClassId) {
	if (inClassId<=(int)0x21e2b607) {
		return inClassId==(int)0x00000001 || inClassId==(int)0x21e2b607;
	} else {
		return inClassId==(int)0x63699f56;
	}
}

void MFiMapping_obj::initValues(){
            	HX_STACKFRAME(&_hx_pos_6a4fcdd8c98d6ad6_9_initValues)
HXLINE(  10)		this->leftStick = ::flixel::input::gamepad::id::MFiID_obj::LEFT_ANALOG_STICK;
HXLINE(  11)		this->rightStick = ::flixel::input::gamepad::id::MFiID_obj::RIGHT_ANALOG_STICK;
            	}


int MFiMapping_obj::getID(int rawID){
            	HX_STACKFRAME(&_hx_pos_6a4fcdd8c98d6ad6_16_getID)
HXDLIN(  16)		switch((int)(rawID)){
            			case (int)6: {
HXLINE(  18)				return 0;
            			}
            			break;
            			case (int)7: {
HXLINE(  19)				return 1;
            			}
            			break;
            			case (int)8: {
HXLINE(  20)				return 2;
            			}
            			break;
            			case (int)9: {
HXLINE(  21)				return 3;
            			}
            			break;
            			case (int)10: {
HXLINE(  22)				return 6;
            			}
            			break;
            			case (int)11: {
HXLINE(  23)				return 10;
            			}
            			break;
            			case (int)12: {
HXLINE(  24)				return 7;
            			}
            			break;
            			case (int)13: {
HXLINE(  25)				return 8;
            			}
            			break;
            			case (int)14: {
HXLINE(  26)				return 9;
            			}
            			break;
            			case (int)15: {
HXLINE(  27)				return 4;
            			}
            			break;
            			case (int)16: {
HXLINE(  28)				return 5;
            			}
            			break;
            			case (int)17: {
HXLINE(  29)				return 11;
            			}
            			break;
            			case (int)18: {
HXLINE(  30)				return 12;
            			}
            			break;
            			case (int)19: {
HXLINE(  31)				return 13;
            			}
            			break;
            			case (int)20: {
HXLINE(  32)				return 14;
            			}
            			break;
            			default:{
HXLINE(  33)				int id = rawID;
HXDLIN(  33)				if ((id == this->leftStick->rawUp)) {
HXLINE(  33)					return 34;
            				}
            				else {
HXLINE(  34)					int id = rawID;
HXDLIN(  34)					if ((id == this->leftStick->rawDown)) {
HXLINE(  34)						return 36;
            					}
            					else {
HXLINE(  35)						int id = rawID;
HXDLIN(  35)						if ((id == this->leftStick->rawLeft)) {
HXLINE(  35)							return 37;
            						}
            						else {
HXLINE(  36)							int id = rawID;
HXDLIN(  36)							if ((id == this->leftStick->rawRight)) {
HXLINE(  36)								return 35;
            							}
            							else {
HXLINE(  37)								int id = rawID;
HXDLIN(  37)								if ((id == this->rightStick->rawUp)) {
HXLINE(  37)									return 38;
            								}
            								else {
HXLINE(  38)									int id = rawID;
HXDLIN(  38)									if ((id == this->rightStick->rawDown)) {
HXLINE(  38)										return 40;
            									}
            									else {
HXLINE(  39)										int id = rawID;
HXDLIN(  39)										if ((id == this->rightStick->rawLeft)) {
HXLINE(  39)											return 41;
            										}
            										else {
HXLINE(  40)											int id = rawID;
HXDLIN(  40)											if ((id == this->rightStick->rawRight)) {
HXLINE(  40)												return 39;
            											}
            											else {
HXLINE(  41)												return -1;
            											}
            										}
            									}
            								}
            							}
            						}
            					}
            				}
            			}
            		}
HXLINE(  16)		return null();
            	}


int MFiMapping_obj::getRawID(int ID){
            	HX_STACKFRAME(&_hx_pos_6a4fcdd8c98d6ad6_47_getRawID)
HXDLIN(  47)		switch((int)(ID)){
            			case (int)0: {
HXLINE(  49)				return 6;
            			}
            			break;
            			case (int)1: {
HXLINE(  50)				return 7;
            			}
            			break;
            			case (int)2: {
HXLINE(  51)				return 8;
            			}
            			break;
            			case (int)3: {
HXLINE(  52)				return 9;
            			}
            			break;
            			case (int)4: {
HXLINE(  58)				return 15;
            			}
            			break;
            			case (int)5: {
HXLINE(  59)				return 16;
            			}
            			break;
            			case (int)6: {
HXLINE(  53)				return 10;
            			}
            			break;
            			case (int)7: {
HXLINE(  55)				return 12;
            			}
            			break;
            			case (int)8: {
HXLINE(  56)				return 13;
            			}
            			break;
            			case (int)9: {
HXLINE(  57)				return 14;
            			}
            			break;
            			case (int)10: {
HXLINE(  54)				return 11;
            			}
            			break;
            			case (int)11: {
HXLINE(  60)				return 17;
            			}
            			break;
            			case (int)12: {
HXLINE(  61)				return 18;
            			}
            			break;
            			case (int)13: {
HXLINE(  62)				return 19;
            			}
            			break;
            			case (int)14: {
HXLINE(  63)				return 20;
            			}
            			break;
            			case (int)17: {
HXLINE(  64)				return 4;
            			}
            			break;
            			case (int)18: {
HXLINE(  65)				return 5;
            			}
            			break;
            			case (int)34: {
HXLINE(  66)				return ::flixel::input::gamepad::id::MFiID_obj::LEFT_ANALOG_STICK->rawUp;
            			}
            			break;
            			case (int)35: {
HXLINE(  69)				return ::flixel::input::gamepad::id::MFiID_obj::LEFT_ANALOG_STICK->rawRight;
            			}
            			break;
            			case (int)36: {
HXLINE(  67)				return ::flixel::input::gamepad::id::MFiID_obj::LEFT_ANALOG_STICK->rawDown;
            			}
            			break;
            			case (int)37: {
HXLINE(  68)				return ::flixel::input::gamepad::id::MFiID_obj::LEFT_ANALOG_STICK->rawLeft;
            			}
            			break;
            			case (int)38: {
HXLINE(  70)				return ::flixel::input::gamepad::id::MFiID_obj::RIGHT_ANALOG_STICK->rawUp;
            			}
            			break;
            			case (int)39: {
HXLINE(  73)				return ::flixel::input::gamepad::id::MFiID_obj::RIGHT_ANALOG_STICK->rawRight;
            			}
            			break;
            			case (int)40: {
HXLINE(  71)				return ::flixel::input::gamepad::id::MFiID_obj::RIGHT_ANALOG_STICK->rawDown;
            			}
            			break;
            			case (int)41: {
HXLINE(  72)				return ::flixel::input::gamepad::id::MFiID_obj::RIGHT_ANALOG_STICK->rawLeft;
            			}
            			break;
            			default:{
HXLINE(  78)				return -1;
            			}
            		}
HXLINE(  47)		return 0;
            	}



::hx::ObjectPtr< MFiMapping_obj > MFiMapping_obj::__new( ::flixel::input::gamepad::FlxGamepadAttachment attachment) {
	::hx::ObjectPtr< MFiMapping_obj > __this = new MFiMapping_obj();
	__this->__construct(attachment);
	return __this;
}

::hx::ObjectPtr< MFiMapping_obj > MFiMapping_obj::__alloc(::hx::Ctx *_hx_ctx, ::flixel::input::gamepad::FlxGamepadAttachment attachment) {
	MFiMapping_obj *__this = (MFiMapping_obj*)(::hx::Ctx::alloc(_hx_ctx, sizeof(MFiMapping_obj), true, "flixel.input.gamepad.mappings.MFiMapping"));
	*(void **)__this = MFiMapping_obj::_hx_vtable;
	__this->__construct(attachment);
	return __this;
}

MFiMapping_obj::MFiMapping_obj()
{
}

::hx::Val MFiMapping_obj::__Field(const ::String &inName,::hx::PropertyAccess inCallProp)
{
	switch(inName.length) {
	case 5:
		if (HX_FIELD_EQ(inName,"getID") ) { return ::hx::Val( getID_dyn() ); }
		break;
	case 8:
		if (HX_FIELD_EQ(inName,"getRawID") ) { return ::hx::Val( getRawID_dyn() ); }
		break;
	case 10:
		if (HX_FIELD_EQ(inName,"initValues") ) { return ::hx::Val( initValues_dyn() ); }
	}
	return super::__Field(inName,inCallProp);
}

#ifdef HXCPP_SCRIPTABLE
static ::hx::StorageInfo *MFiMapping_obj_sMemberStorageInfo = 0;
static ::hx::StaticInfo *MFiMapping_obj_sStaticStorageInfo = 0;
#endif

static ::String MFiMapping_obj_sMemberFields[] = {
	HX_("initValues",12,5f,fc,53),
	HX_("getID",f1,91,60,91),
	HX_("getRawID",4d,6f,fd,43),
	::String(null()) };

::hx::Class MFiMapping_obj::__mClass;

void MFiMapping_obj::__register()
{
	MFiMapping_obj _hx_dummy;
	MFiMapping_obj::_hx_vtable = *(void **)&_hx_dummy;
	::hx::Static(__mClass) = new ::hx::Class_obj();
	__mClass->mName = HX_("flixel.input.gamepad.mappings.MFiMapping",e4,04,4b,f3);
	__mClass->mSuper = &super::__SGetClass();
	__mClass->mConstructEmpty = &__CreateEmpty;
	__mClass->mConstructArgs = &__Create;
	__mClass->mGetStaticField = &::hx::Class_obj::GetNoStaticField;
	__mClass->mSetStaticField = &::hx::Class_obj::SetNoStaticField;
	__mClass->mStatics = ::hx::Class_obj::dupFunctions(0 /* sStaticFields */);
	__mClass->mMembers = ::hx::Class_obj::dupFunctions(MFiMapping_obj_sMemberFields);
	__mClass->mCanCast = ::hx::TCanCast< MFiMapping_obj >;
#ifdef HXCPP_SCRIPTABLE
	__mClass->mMemberStorageInfo = MFiMapping_obj_sMemberStorageInfo;
#endif
#ifdef HXCPP_SCRIPTABLE
	__mClass->mStaticStorageInfo = MFiMapping_obj_sStaticStorageInfo;
#endif
	::hx::_hx_RegisterClass(__mClass->mName, __mClass);
}

} // end namespace flixel
} // end namespace input
} // end namespace gamepad
} // end namespace mappings
