//----------------------------------------------------------------//
void MOAIFacebookAndroid::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "DIALOG_DID_COMPLETE",		( u32 ) DIALOG_DID_COMPLETE );
	state.SetField ( -1, "DIALOG_DID_NOT_COMPLETE",	( u32 ) DIALOG_DID_NOT_COMPLETE );
	state.SetField ( -1, "SESSION_DID_LOGIN",		( u32 ) SESSION_DID_LOGIN );
	state.SetField ( -1, "SESSION_DID_NOT_LOGIN",	( u32 ) SESSION_DID_NOT_LOGIN );
	
	luaL_Reg regTable [] = {
		{ "getExpirationDate", _getExpirationDate },	
		{ "getToken",		_getToken },
		{ "graphRequest",	_graphRequest },
		{ "init",			_init },
		{ "login",			_login },
		{ "logout",			_logout },
		{ "postToFeed",		_postToFeed },
		{ "sendRequest",	_sendRequest },
		{ "sessionValid",	_sessionValid },
		{ "setListener",	_setListener },
		{ "setToken",		_setToken },
		{ "extendToken",	_extendToken },
		{ "setExpirationDate", _setExpirationDate },		
		{ NULL, NULL }
	};

	luaL_register ( state, 0, regTable );
}
Beispiel #2
0
//----------------------------------------------------------------//
void MOAIApp::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "PAYMENT_QUEUE_TRANSACTION",	( u32 )PAYMENT_QUEUE_TRANSACTION );
	state.SetField ( -1, "PAYMENT_QUEUE_ERROR",			( u32 )PAYMENT_QUEUE_ERROR );
	state.SetField ( -1, "PRODUCT_REQUEST_RESPONSE",	( u32 )PRODUCT_REQUEST_RESPONSE );
	
	state.SetField ( -1, "DOMAIN_DOCUMENTS",			( u32 )DOMAIN_DOCUMENTS );
	state.SetField ( -1, "DOMAIN_APP_SUPPORT",			( u32 )DOMAIN_APP_SUPPORT );

	state.SetField ( -1, "TRANSACTION_STATE_PURCHASING",( u32 )TRANSACTION_STATE_PURCHASING );
	state.SetField ( -1, "TRANSACTION_STATE_PURCHASED", ( u32 )TRANSACTION_STATE_PURCHASED );
	state.SetField ( -1, "TRANSACTION_STATE_FAILED",    ( u32 )TRANSACTION_STATE_FAILED );
	state.SetField ( -1, "TRANSACTION_STATE_RESTORED",  ( u32 )TRANSACTION_STATE_RESTORED );
	state.SetField ( -1, "TRANSACTION_STATE_CANCELLED", ( u32 )TRANSACTION_STATE_CANCELLED );
	
	luaL_Reg regTable[] = {
		{ "alert",								_alert },

		{ "canMakePayments",					_canMakePayments },
		{ "restoreCompletedTransactions",		_restoreCompletedTransactions },
		{ "requestPaymentForProduct",			_requestPaymentForProduct },
		{ "requestProductIdentifiers",			_requestProductIdentifiers },

		{ "setListener",						_setListener },
		{ "getDirectoryInDomain",				_getDirectoryInDomain },
		{ "openURL",							_openURL },
		{ "openURLPOP",							_openURLPOP },
		{ NULL, NULL }
	};

	luaL_register( state, 0, regTable );
}
//----------------------------------------------------------------//
void MOAIParticleForce::RegisterLuaClass ( MOAILuaState& state ) {

	this->MOAITransform::RegisterLuaClass ( state );
	
	state.SetField ( -1, "FORCE", ( u32 )FORCE );
	state.SetField ( -1, "GRAVITY", ( u32 )GRAVITY );
	state.SetField ( -1, "OFFSET", ( u32 )OFFSET );
}
Beispiel #4
0
//----------------------------------------------------------------//
void MOAIVertexFormat::RegisterLuaClass ( MOAILuaState& state ) {
	
	state.SetField ( -1, "GL_BYTE", ( u32 )ZGL_TYPE_BYTE );
	//state.SetField ( -1, "GL_FIXED", ( u32 )GL_FIXED );
	state.SetField ( -1, "GL_FLOAT", ( u32 )ZGL_TYPE_FLOAT );
	state.SetField ( -1, "GL_SHORT", ( u32 )ZGL_TYPE_SHORT );
	state.SetField ( -1, "GL_UNSIGNED_BYTE", ( u32 )ZGL_TYPE_UNSIGNED_BYTE );
	state.SetField ( -1, "GL_UNSIGNED_SHORT", ( u32 )ZGL_TYPE_UNSIGNED_SHORT );
}
//----------------------------------------------------------------//
void MOAIAnimCurve::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "ATTR_TIME", MOAIAnimCurveAttr::Pack ( ATTR_TIME ));
	state.SetField ( -1, "ATTR_VALUE", MOAIAnimCurveAttr::Pack ( ATTR_VALUE ));

	state.SetField ( -1, "CLAMP", ( u32 ) CLAMP );
	state.SetField ( -1, "WRAP", ( u32 ) WRAP );
	state.SetField ( -1, "MIRROR", ( u32 ) MIRROR );
	state.SetField ( -1, "APPEND", ( u32 ) APPEND );
}
Beispiel #6
0
//----------------------------------------------------------------//
void MOAIGlyph::SerializeOut ( MOAILuaState& state ) {

    state.SetField ( -1, "mCode", this->mCode );
    state.SetField ( -1, "mPageID", this->mPageID );

    state.SetField ( -1, "mWidth", this->mWidth );
    state.SetField ( -1, "mHeight", this->mHeight );
    state.SetField ( -1, "mAdvanceX", this->mAdvanceX );
    state.SetField ( -1, "mBearingX", this->mBearingX );
    state.SetField ( -1, "mBearingY", this->mBearingY );

    state.SetField ( -1, "mSrcX", this->mSrcX );
    state.SetField ( -1, "mSrcY", this->mSrcY );

    if ( this->mKernTable.Size ()) {
        lua_newtable ( state );
        for ( u32 i = 0; i < this->mKernTable.Size (); ++i ) {

            lua_pushnumber ( state, i + 1 );
            lua_newtable ( state );

            state.SetField ( -1, "mName", this->mKernTable [ i ].mName );
            state.SetField ( -1, "mX", this->mKernTable [ i ].mX );
            state.SetField ( -1, "mY", this->mKernTable [ i ].mY );

            lua_settable ( state, -3 );
        }
        lua_setfield ( state, -2, "mKernTable" );
    }
}
//----------------------------------------------------------------//
void MOAITstoreGamecenterAndroid::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "AUTH_RESPONSE_SUCCESS",		( u32 )AUTH_RESPONSE_SUCCESS );
	state.SetField ( -1, "AUTH_RESPONSE_EXITED",		( u32 )AUTH_RESPONSE_EXITED );
	state.SetField ( -1, "DISABLE_GAMECENTER_RESPONSE",	( u32 )DISABLE_GAMECENTER_RESPONSE );
	state.SetField ( -1, "GET_RANKLIST_RESPONSE",		( u32 )GET_RANKLIST_RESPONSE );
	state.SetField ( -1, "SET_POINT_RESPONSE",			( u32 )SET_POINT_RESPONSE );
	state.SetField ( -1, "GET_USERINFO_RESPONSE",		( u32 )GET_USERINFO_RESPONSE );

	state.SetField ( -1, "GAMECENTER_INSTALLED",		( u32 )GAMECENTER_INSTALLED );
	state.SetField ( -1, "GAMECENTER_UPGRADING",		( u32 )GAMECENTER_UPGRADING );
	state.SetField ( -1, "GAMECENTER_NOT_INSTALLED",	( u32 )GAMECENTER_NOT_INSTALLED );

	luaL_Reg regTable [] = {
		{ "openGallery",				_openGallery },
		{ "getUserInfo",				_getUserInfo },
		{ "setUserInfo",				_setUserInfo },
		{ "authTstore",					_authTstore	},
		{ "checkTstoreInstalled",		_checkTstoreInstalled },
		{ "disableGamecenter",  	    _disableGamecenter },
		{ "enableGamecenter",      		_enableGamecenter },
		{ "getRankList",     			_getRankList },
		{ "installGamecenter",      	_installGamecenter },
		{ "installTstore",      		_installTstore },
		{ "invokeTstoreJoinPage",  		_invokeTstoreJoinPage },
		{ "setListener",      			_setListener },
		{ "setPoint",      				_setPoint },
		{ "startGamecenter",      		_startGamecenter },
		{ NULL, NULL }
	};

	luaL_register ( state, 0, regTable );
}
Beispiel #8
0
//----------------------------------------------------------------//
void MOAIEnvironment::RegisterLuaClass ( MOAILuaState& state ) {
	MOAIGlobalEventSource::RegisterLuaClass ( state );

	state.SetField ( -1, "EVENT_VALUE_CHANGED", ( u32 )EVENT_VALUE_CHANGED );

	state.SetField ( -1, "CONNECTION_TYPE_NONE", ( u32 )CONNECTION_TYPE_NONE );
	state.SetField ( -1, "CONNECTION_TYPE_WIFI", ( u32 )CONNECTION_TYPE_WIFI );
	state.SetField ( -1, "CONNECTION_TYPE_WWAN", ( u32 )CONNECTION_TYPE_WWAN );
	
	state.SetField ( -1, "OS_BRAND_ANDROID", OS_BRAND_ANDROID );
	state.SetField ( -1, "OS_BRAND_IOS", OS_BRAND_IOS );
	state.SetField ( -1, "OS_BRAND_OSX", OS_BRAND_OSX );
	state.SetField ( -1, "OS_BRAND_LINUX", OS_BRAND_LINUX );
	state.SetField ( -1, "OS_BRAND_WINDOWS", OS_BRAND_WINDOWS );
	state.SetField ( -1, "OS_BRAND_UNAVAILABLE", OS_BRAND_UNAVAILABLE );

	luaL_Reg regTable [] = {
		{ "generateGUID",		_generateGUID },
		{ "getListener",		&MOAIGlobalEventSource::_getListener < MOAIEnvironment > },
		{ "getMACAddress",		_getMACAddress },
		{ "setListener",		&MOAIGlobalEventSource::_setListener < MOAIEnvironment > },
		{ "setValue",			_setValue },
		{ NULL, NULL }
	};

	luaL_register( state, 0, regTable );
}
//----------------------------------------------------------------//
void MOAIDialogAndroid::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "DIALOG_RESULT_POSITIVE",	( u32 )DIALOG_RESULT_POSITIVE );
	state.SetField ( -1, "DIALOG_RESULT_NEUTRAL",	( u32 )DIALOG_RESULT_NEUTRAL );
	state.SetField ( -1, "DIALOG_RESULT_NEGATIVE",	( u32 )DIALOG_RESULT_NEGATIVE );
	state.SetField ( -1, "DIALOG_RESULT_CANCEL",	( u32 )DIALOG_RESULT_CANCEL );

	luaL_Reg regTable [] = {
		{ "showDialog",	_showDialog },
		{ NULL, NULL }
	};

	luaL_register ( state, 0, regTable );
}
//----------------------------------------------------------------//
void MOAIChartBoostAndroid::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "INTERSTITIAL_LOAD_FAILED",	( u32 )INTERSTITIAL_LOAD_FAILED );
	state.SetField ( -1, "INTERSTITIAL_DISMISSED", 		( u32 )INTERSTITIAL_DISMISSED );

	luaL_Reg regTable [] = {
		{ "init",				_init },
		{ "loadInterstitial",	_loadInterstitial },
		{ "setListener",		_setListener },
		{ "showInterstitial",	_showInterstitial },
		{ NULL, NULL }
	};

	luaL_register ( state, 0, regTable );
}
Beispiel #11
0
//----------------------------------------------------------------//
void MOAIGfxQuad2D::RegisterLuaClass ( MOAILuaState& state ) {

	this->MOAIDeck2D::RegisterLuaClass ( state );
	
	state.SetField ( -1, "FILTER_POINT", ( u32 )GL_NEAREST );
	state.SetField ( -1, "FILTER_BILERP", ( u32 )GL_LINEAR );
}
Beispiel #12
0
//----------------------------------------------------------------//
void MOAIDebugLines::RegisterLuaClass ( MOAILuaState& state ) {

	luaL_Reg regTable[] = {
		{ "setStyle",			_setStyle },
		{ "showStyle",			_showStyle },
		{ NULL, NULL }
	};

	luaL_register( state, 0, regTable );
	
	state.SetField ( -1, "PARTITION_CELLS",			( u32 )PARTITION_CELLS );
	state.SetField ( -1, "PARTITION_PADDED_CELLS",	( u32 )PARTITION_PADDED_CELLS );
	state.SetField ( -1, "PROP_MODEL_BOUNDS",		( u32 )PROP_MODEL_BOUNDS );
	state.SetField ( -1, "PROP_WORLD_BOUNDS",		( u32 )PROP_WORLD_BOUNDS );
	state.SetField ( -1, "TEXT_BOX",				( u32 )TEXT_BOX );
}
//----------------------------------------------------------------//
void MOAIMoviePlayerAndroid::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "MOVIE_PLAYER_READY", 		( u32 )MOVIE_PLAYER_READY );
	state.SetField ( -1, "MOVIE_PLAYER_COMPLETED",	( u32 )MOVIE_PLAYER_COMPLETED );

	luaL_Reg regTable[] = {
		{ "init",			_init },
		{ "pause",			_pause },
		{ "play",			_play },
		{ "setListener",	_setListener },
		{ "stop",			_stop },
		{ NULL, NULL }	
	};

	luaL_register ( state, 0, regTable );
}
Beispiel #14
0
//----------------------------------------------------------------//
void MOAIAppAndroid::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "SESSION_START",		    ( u32 )SESSION_START );
	state.SetField ( -1, "SESSION_END",			    ( u32 )SESSION_END );
	state.SetField ( -1, "BACK_BUTTON_PRESSED",		( u32 )BACK_BUTTON_PRESSED );

	luaL_Reg regTable [] = {
		{ "getUTCTime",				_getUTCTime },
		{ "getStatusBarHeight",		_getStatusBarHeight },
		{ "openURL",				_openURL },
		{ "setListener",			_setListener },
		{ "share",					_share },
		{ NULL, NULL }
	};

	luaL_register ( state, 0, regTable );
}
Beispiel #15
0
//----------------------------------------------------------------//
void MOAIChartBoostAndroid::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "INTERSTITIAL_LOAD_FAILED",	( u32 )INTERSTITIAL_LOAD_FAILED );
	state.SetField ( -1, "INTERSTITIAL_DISMISSED", 		( u32 )INTERSTITIAL_DISMISSED );

	luaL_Reg regTable [] = {
		{ "cacheInterstitial",			_cacheInterstitial },
		{ "hasCachedInterstitial",		_hasCachedInterstitial },
		{ "getListener",				&MOAIGlobalEventSource::_getListener < MOAIChartBoostAndroid > },
		{ "init",						_init },
		{ "setListener",				&MOAIGlobalEventSource::_setListener < MOAIChartBoostAndroid > },
		{ "showInterstitial",			_showInterstitial },
		{ NULL, NULL }
	};

	luaL_register ( state, 0, regTable );
}
//----------------------------------------------------------------//
void MOAIDataBuffer::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "NO_INFLATE",		( u32 )NO_INFLATE );
	state.SetField ( -1, "FORCE_INFLATE",	( u32 )FORCE_INFLATE );
	state.SetField ( -1, "INFLATE_ON_EXT",	( u32 )INFLATE_ON_EXT );

	luaL_Reg regTable [] = {
		{ "base64Decode",	_base64Decode },
		{ "base64Encode",	_base64Encode },
		{ "deflate",		_deflate },
		{ "hexDecode",		_hexDecode },
		{ "hexEncode",		_hexEncode },
		{ "inflate",		_inflate },
		{ "toCppHeader",	_toCppHeader },
		{ NULL, NULL }
	};

	luaL_register ( state, 0, regTable );
}
Beispiel #17
0
//----------------------------------------------------------------//
void MOAIAdColonyAndroid::RegisterLuaClass ( MOAILuaState& state ) {
    
	state.SetField ( -1, "VIDEO_BEGAN_IN_ZONE", 	( u32 )VIDEO_BEGAN_IN_ZONE );
	state.SetField ( -1, "VIDEO_ENDED_IN_ZONE", 	( u32 )VIDEO_ENDED_IN_ZONE );
	state.SetField ( -1, "VIDEO_FAILED_IN_ZONE", 	( u32 )VIDEO_FAILED_IN_ZONE );
	state.SetField ( -1, "VIDEO_PAUSED_IN_ZONE", 	( u32 )VIDEO_PAUSED_IN_ZONE );
	state.SetField ( -1, "VIDEO_RESUMED_IN_ZONE",	( u32 )VIDEO_RESUMED_IN_ZONE );
	
	luaL_Reg regTable [] = {
		{ "getDeviceID",		_getDeviceID },
		{ "init",				_init },
		{ "playVideo",			_playVideo },
		{ "setListener",		_setListener },
		{ "videoReadyForZone",	_videoReadyForZone },
		{ NULL, NULL }	
	};
    
	luaL_register ( state, 0, regTable );
}
Beispiel #18
0
//----------------------------------------------------------------//
void MOAIEnvironment::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "CONNECTION_TYPE_NONE", ( u32 )CONNECTION_TYPE_NONE );
	state.SetField ( -1, "CONNECTION_TYPE_WIFI", ( u32 )CONNECTION_TYPE_WIFI );
	state.SetField ( -1, "CONNECTION_TYPE_WWAN", ( u32 )CONNECTION_TYPE_WWAN );
	
	state.SetField ( -1, "OS_BRAND_ANDROID", ( u32 )OS_BRAND_ANDROID );
	state.SetField ( -1, "OS_BRAND_IOS", ( u32 )OS_BRAND_IOS );
	state.SetField ( -1, "OS_BRAND_UNAVAILABLE", ( u32 )OS_BRAND_UNAVAILABLE );

	luaL_Reg regTable [] = {
		{ "generateGUID",					_generateGUID					},
		{ "getAppDisplayName",				_getAppDisplayName				},
		{ "getAppID",						_getAppID						},
		{ "getAppVersion",					_getAppVersion					},
		{ "getCacheDirectory",				_getCacheDirectory				},
		{ "getCarrierISOCountryCode",		_getCarrierISOCountryCode		},
		{ "getCarrierMobileCountryCode",	_getCarrierMobileCountryCode	},
		{ "getCarrierMobileNetworkCode",	_getCarrierMobileNetworkCode	},
		{ "getCarrierName",					_getCarrierName					},
		{ "getConnectionType",				_getConnectionType				},
		{ "getCountryCode",					_getCountryCode					},
		{ "getCPUABI",						_getCPUABI						},
		{ "getDevBrand",					_getDevBrand					},
		{ "getDevName",						_getDevName						},
		{ "getDevManufacturer",				_getDevManufacturer				},
		{ "getDevModel",					_getDevModel					},
		{ "getDevProduct",					_getDevProduct					},
		{ "getDocumentDirectory",			_getDocumentDirectory			},
		{ "getLanguageCode",				_getLanguageCode				},
		{ "getOSBrand",						_getOSBrand						},
		{ "getOSVersion",					_getOSVersion					},
		{ "getResourceDirectory",			_getResourceDirectory			},
		{ "getScreenSize",					_getScreenSize					},
		{ "getUDID",						_getUDID						},
		{ "getViewSize",					_getViewSize					},
		{ "isRetinaDisplay",				_isRetinaDisplay				},
		{ NULL, NULL }
	};

	luaL_register( state, 0, regTable );
}
//----------------------------------------------------------------//
void MOAITwitterAndroid::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "TWEET_SUCCESSFUL",		( u32 ) TWEET_SUCCESSFUL );
	state.SetField ( -1, "TWEET_CANCELLED",	        ( u32 ) TWEET_CANCELLED );

	state.SetField ( -1, "SESSION_DID_LOGIN",		( u32 ) SESSION_DID_LOGIN );
	state.SetField ( -1, "SESSION_DID_NOT_LOGIN",	( u32 ) SESSION_DID_NOT_LOGIN );

	luaL_Reg regTable [] = {
		{ "init",			_init },
		{ "login",			_login },
		{ "isLoggedIn",		_isLoggedIn },
		{ "setAccessToken",	_setAccessToken },
		{ "sendTweet",	    _sendTweet },
		{ "setListener",	_setListener },
		{ NULL, NULL }
	};

	luaL_register ( state, 0, regTable );
}
//----------------------------------------------------------------//
void MOAITstoreWallAndroid::RegisterLuaClass ( MOAILuaState& state ) {
	
	state.SetField ( -1, "TSTORE_CURRENCY_AWARDED",	( u32 )TSTORE_CURRENCY_AWARDED );

	luaL_Reg regTable [] = {
		{ "setListener",		_setListener },
		{ "showOfferWall",		_showOfferWall },
		{ NULL, NULL }
	};

	luaL_register ( state, 0, regTable );
}
Beispiel #21
0
//----------------------------------------------------------------//
void MOAIGlyphSet::SerializeOut ( MOAILuaState& state ) {
	UNUSED ( state );
	
	state.SetField ( -1, "mSize", this->mSize );
	state.SetField ( -1, "mHeight", this->mHeight );
	state.SetField ( -1, "mAscent", this->mAscent );

	lua_newtable ( state );
	GlyphMapIt glyphMapIt = this->mGlyphMap.begin ();
	for ( ; glyphMapIt != this->mGlyphMap.end (); ++glyphMapIt ) {
	
		u32 c = glyphMapIt->first;
		MOAIGlyph& glyph = glyphMapIt->second;
	
		lua_pushnumber ( state, c );
		lua_newtable ( state );
		glyph.SerializeOut ( state );
		lua_settable ( state, -3 );
	}
	lua_setfield ( state, -2, "mGlyphMap" );
}
Beispiel #22
0
//----------------------------------------------------------------//
void MOAILogMgr::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "LOG_NONE",			( u32 )LOG_NONE );
	state.SetField ( -1, "LOG_ERROR",			( u32 )LOG_ERROR );
	state.SetField ( -1, "LOG_WARNING",			( u32 )LOG_WARNING );
	state.SetField ( -1, "LOG_STATUS",			( u32 )LOG_STATUS );
	
	MOAILogMessages::RegisterLogMessageIDs ( state );
	
	luaL_Reg regTable[] = {
		{ "closeFile",					_closeFile },
		{ "log",						_log },
		{ "isDebugBuild",				_isDebugBuild },
		{ "openFile",					_openFile },
		{ "registerLogMessage",			_registerLogMessage },
		{ "setLogLevel",				_setLogLevel },
		{ "setTypeCheckLuaParams",		_setTypeCheckLuaParams },
		{ NULL, NULL }
	};

	luaL_register( state, 0, regTable );
}
Beispiel #23
0
//----------------------------------------------------------------//
void MOAIGfxDevice::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "EVENT_RESIZE", ( u32 )EVENT_RESIZE );

	luaL_Reg regTable [] = {
		{ "isProgrammable",				_isProgrammable },
		{ "setListener",				&MOAIGlobalEventSource::_setListener < MOAIGfxDevice > },
		{ "setPenColor",				_setPenColor },
		{ "setPenWidth",				_setPenWidth },
		{ "setPointSize",				_setPointSize },
		{ NULL, NULL }
	};

	luaL_register( state, 0, regTable );
}
Beispiel #24
0
//----------------------------------------------------------------//
void MOAICp::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "INFINITY",	INFINITY );

	luaL_Reg regTable[] = {
		{ "getBiasCoefficient",		_getBiasCoefficient },
		{ "getCollisionSlop",		_getCollisionSlop },
		{ "getContactPersistence",	_getContactPersistence },
		{ "setBiasCoefficient",		_setBiasCoefficient },
		{ "setCollisionSlop",		_setCollisionSlop },
		{ "setContactPersistence",	_setContactPersistence },
		{ NULL, NULL }
	};

	luaL_register( state, 0, regTable );
}
Beispiel #25
0
//----------------------------------------------------------------//
void MOAIFileStream::RegisterLuaClass ( MOAILuaState& state ) {

    MOAIStream::RegisterLuaClass ( state );

    state.SetField ( -1, "APPEND",				( u32 )USFileStream::APPEND );
    state.SetField ( -1, "READ",				( u32 )USFileStream::READ );
    state.SetField ( -1, "READ_WRITE",			( u32 )USFileStream::READ_WRITE );
    state.SetField ( -1, "READ_WRITE_AFFIRM",	( u32 )USFileStream::READ_WRITE_AFFIRM );
    state.SetField ( -1, "READ_WRITE_NEW",		( u32 )USFileStream::READ_WRITE_NEW );
    state.SetField ( -1, "WRITE",				( u32 )USFileStream::WRITE );
}
Beispiel #26
0
//----------------------------------------------------------------//
void MOAIGooglePlayServicesAndroid::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "CONNECTION_COMPLETE",		( u32 )CONNECTION_COMPLETE );

	luaL_Reg regTable [] = {
		{ "connect", 				_connect },
		{ "isConnected",			_isConnected },
		{ "setListener",			_setListener },
		{ "showAchievements",		_showAchievements },
		{ "showLeaderboard",		_showLeaderboard },
		{ "submitScore",			_submitScore },
		{ "unlockAchievement",		_unlockAchievement },
		{ NULL, NULL }
	};

	luaL_register ( state, 0, regTable );
}
Beispiel #27
0
//----------------------------------------------------------------//
void MOAIMesh::RegisterLuaClass ( MOAILuaState& state ) {

	MOAIDeck::RegisterLuaClass ( state );
	
	state.SetField ( -1, "GL_POINTS",			( u32 )ZGL_PRIM_POINTS );
	state.SetField ( -1, "GL_LINES",			( u32 )ZGL_PRIM_LINES );
	state.SetField ( -1, "GL_TRIANGLES",		( u32 )ZGL_PRIM_TRIANGLES );
	state.SetField ( -1, "GL_LINE_LOOP",		( u32 )ZGL_PRIM_LINE_LOOP );
	state.SetField ( -1, "GL_LINE_STRIP",		( u32 )ZGL_PRIM_LINE_STRIP );
	state.SetField ( -1, "GL_TRIANGLE_FAN",		( u32 )ZGL_PRIM_TRIANGLE_FAN );
	state.SetField ( -1, "GL_TRIANGLE_STRIP",	( u32 )ZGL_PRIM_TRIANGLE_STRIP );
}
Beispiel #28
0
//----------------------------------------------------------------//
void MOAILayoutFrame::RegisterLuaClass ( MOAILuaState& state ) {

    MOAITransform::RegisterLuaClass ( state );

    state.SetField ( -1, "LAYOUT_ALIGN_MIN", ( u32 )LAYOUT_ALIGN_MIN );
    state.SetField ( -1, "LAYOUT_ALIGN_MAX", ( u32 )LAYOUT_ALIGN_MAX );
    state.SetField ( -1, "LAYOUT_ALIGN_CENTER", ( u32 )LAYOUT_ALIGN_CENTER );

    state.SetField ( -1, "LAYOUT_JUSTIFY_MIN", ( u32 )LAYOUT_JUSTIFY_MIN );
    state.SetField ( -1, "LAYOUT_JUSTIFY_MAX", ( u32 )LAYOUT_JUSTIFY_MAX );
    state.SetField ( -1, "LAYOUT_JUSTIFY_CENTER", ( u32 )LAYOUT_JUSTIFY_CENTER );

    state.SetField ( -1, "FIT_EXPAND", ( u32 )FIT_EXPAND );
    state.SetField ( -1, "FIT_ABSOLUTE", ( u32 )FIT_ABSOLUTE );
    state.SetField ( -1, "FIT_CONTENT", ( u32 )FIT_CONTENT );
}
//----------------------------------------------------------------//
void MOAITapjoyAndroid::RegisterLuaClass ( MOAILuaState& state ) {

	state.SetField ( -1, "TAPJOY_VIDEO_AD_START", 								( u32 )TAPJOY_VIDEO_AD_START );
	state.SetField ( -1, "TAPJOY_VIDEO_AD_COMPLETE", 							( u32 )TAPJOY_VIDEO_AD_COMPLETE );
	state.SetField ( -1, "TAPJOY_VIDEO_AD_ERROR", 								( u32 )TAPJOY_VIDEO_AD_ERROR );
	state.SetField ( -1, "TAPJOY_OFFERS_RESPONSE", 								( u32 )TAPJOY_OFFERS_RESPONSE );
	state.SetField ( -1, "TAPJOY_OFFERS_RESPONSE_FAILED", 						( u32 )TAPJOY_OFFERS_RESPONSE_FAILED );

	state.SetField ( -1, "TAPJOY_VIDEO_STATUS_MEDIA_STORAGE_UNAVAILABLE", 		( u32 )TAPJOY_VIDEO_STATUS_MEDIA_STORAGE_UNAVAILABLE );
	state.SetField ( -1, "TAPJOY_VIDEO_STATUS_NETWORK_ERROR_ON_INIT_VIDEOS",	( u32 )TAPJOY_VIDEO_STATUS_NETWORK_ERROR_ON_INIT_VIDEOS );
	state.SetField ( -1, "TAPJOY_VIDEO_STATUS_UNABLE_TO_PLAY_VIDEO", 			( u32 )TAPJOY_VIDEO_STATUS_UNABLE_TO_PLAY_VIDEO );

	luaL_Reg regTable [] = {
		{ "getListener",	&MOAIGlobalEventSource::_getListener < MOAITapjoyAndroid > },
		{ "init",			_init },
		{ "setListener",	&MOAIGlobalEventSource::_setListener < MOAITapjoyAndroid > },
		{ "setUserId",		_setUserId },
		{ "showOffers",		_showOffers },
		{ NULL, NULL }
	};

	luaL_register ( state, 0, regTable );
}
Beispiel #30
0
//----------------------------------------------------------------//
void MOAIMesh::SerializeOut ( MOAILuaState& state, MOAISerializer& serializer ) {

	MOAIVertexArray::SerializeOut ( state, serializer );

	state.SetField ( -1, "mIndexBuffer", serializer.AffirmMemberID ( this->mIndexBuffer ));
	
	state.SetField < u32 >( -1, "mTotalElements", this->mTotalElements );
	
	state.SetField < bool >( -1, "mHasBounds", this->mHasBounds );
	
	lua_newtable ( state );
	
		state.SetField < float >( -1, "mMinX", this->mBounds.mMin.mX );
		state.SetField < float >( -1, "mMinY", this->mBounds.mMin.mY );
		state.SetField < float >( -1, "mMinZ", this->mBounds.mMin.mZ );
	
		state.SetField < float >( -1, "mMaxX", this->mBounds.mMax.mX );
		state.SetField < float >( -1, "mMaxY", this->mBounds.mMax.mY );
		state.SetField < float >( -1, "mMaxZ", this->mBounds.mMax.mZ );
	
	lua_setfield ( state, -2, "mBounds" );
	
	state.SetField < u32 >( -1, "mPenWidth", this->mPenWidth );
}