void register_gui_script_functions() { ccAddExternalObjectFunction("GUI::Centre^0", (void *)GUI_Centre); ccAddExternalStaticFunction("GUI::GetAtScreenXY^2", (void *)GetGUIAtLocation); ccAddExternalObjectFunction("GUI::SetPosition^2", (void *)GUI_SetPosition); ccAddExternalObjectFunction("GUI::SetSize^2", (void *)GUI_SetSize); ccAddExternalObjectFunction("GUI::get_BackgroundGraphic", (void *)GUI_GetBackgroundGraphic); ccAddExternalObjectFunction("GUI::set_BackgroundGraphic", (void *)GUI_SetBackgroundGraphic); ccAddExternalObjectFunction("GUI::get_Clickable", (void *)GUI_GetClickable); ccAddExternalObjectFunction("GUI::set_Clickable", (void *)GUI_SetClickable); ccAddExternalObjectFunction("GUI::get_ControlCount", (void *)GUI_GetControlCount); ccAddExternalObjectFunction("GUI::geti_Controls", (void *)GUI_GetiControls); ccAddExternalObjectFunction("GUI::get_Height", (void *)GUI_GetHeight); ccAddExternalObjectFunction("GUI::set_Height", (void *)GUI_SetHeight); ccAddExternalObjectFunction("GUI::get_ID", (void *)GUI_GetID); ccAddExternalObjectFunction("GUI::get_Transparency", (void *)GUI_GetTransparency); ccAddExternalObjectFunction("GUI::set_Transparency", (void *)GUI_SetTransparency); ccAddExternalObjectFunction("GUI::get_Visible", (void *)GUI_GetVisible); ccAddExternalObjectFunction("GUI::set_Visible", (void *)GUI_SetVisible); ccAddExternalObjectFunction("GUI::get_Width", (void *)GUI_GetWidth); ccAddExternalObjectFunction("GUI::set_Width", (void *)GUI_SetWidth); ccAddExternalObjectFunction("GUI::get_X", (void *)GUI_GetX); ccAddExternalObjectFunction("GUI::set_X", (void *)GUI_SetX); ccAddExternalObjectFunction("GUI::get_Y", (void *)GUI_GetY); ccAddExternalObjectFunction("GUI::set_Y", (void *)GUI_SetY); ccAddExternalObjectFunction("GUI::get_ZOrder", (void *)GUI_GetZOrder); ccAddExternalObjectFunction("GUI::set_ZOrder", (void *)GUI_SetZOrder); }
void register_object_script_functions() { ccAddExternalObjectFunction("Object::Animate^5", (void *)Object_Animate); ccAddExternalObjectFunction("Object::IsCollidingWithObject^1", (void *)Object_IsCollidingWithObject); ccAddExternalObjectFunction("Object::GetName^1", (void *)Object_GetName); ccAddExternalObjectFunction("Object::GetProperty^1", (void *)Object_GetProperty); ccAddExternalObjectFunction("Object::GetPropertyText^2", (void *)Object_GetPropertyText); ccAddExternalObjectFunction("Object::GetTextProperty^1",(void *)Object_GetTextProperty); ccAddExternalObjectFunction("Object::MergeIntoBackground^0", (void *)Object_MergeIntoBackground); ccAddExternalObjectFunction("Object::Move^5", (void *)Object_Move); ccAddExternalObjectFunction("Object::RemoveTint^0", (void *)Object_RemoveTint); ccAddExternalObjectFunction("Object::RunInteraction^1", (void *)Object_RunInteraction); ccAddExternalObjectFunction("Object::SetPosition^2", (void *)Object_SetPosition); ccAddExternalObjectFunction("Object::SetView^3", (void *)Object_SetView); ccAddExternalObjectFunction("Object::StopAnimating^0", (void *)Object_StopAnimating); ccAddExternalObjectFunction("Object::StopMoving^0", (void *)Object_StopMoving); ccAddExternalObjectFunction("Object::Tint^5", (void *)Object_Tint); // static ccAddExternalStaticFunction("Object::GetAtScreenXY^2", (void *)GetObjectAtLocation); ccAddExternalObjectFunction("Object::get_Animating", (void *)Object_GetAnimating); ccAddExternalObjectFunction("Object::get_Baseline", (void *)Object_GetBaseline); ccAddExternalObjectFunction("Object::set_Baseline", (void *)Object_SetBaseline); ccAddExternalObjectFunction("Object::get_BlockingHeight",(void *)Object_GetBlockingHeight); ccAddExternalObjectFunction("Object::set_BlockingHeight",(void *)Object_SetBlockingHeight); ccAddExternalObjectFunction("Object::get_BlockingWidth",(void *)Object_GetBlockingWidth); ccAddExternalObjectFunction("Object::set_BlockingWidth",(void *)Object_SetBlockingWidth); ccAddExternalObjectFunction("Object::get_Clickable", (void *)Object_GetClickable); ccAddExternalObjectFunction("Object::set_Clickable", (void *)Object_SetClickable); ccAddExternalObjectFunction("Object::get_Frame", (void *)Object_GetFrame); ccAddExternalObjectFunction("Object::get_Graphic", (void *)Object_GetGraphic); ccAddExternalObjectFunction("Object::set_Graphic", (void *)Object_SetGraphic); ccAddExternalObjectFunction("Object::get_ID", (void *)Object_GetID); ccAddExternalObjectFunction("Object::get_IgnoreScaling", (void *)Object_GetIgnoreScaling); ccAddExternalObjectFunction("Object::set_IgnoreScaling", (void *)Object_SetIgnoreScaling); ccAddExternalObjectFunction("Object::get_IgnoreWalkbehinds", (void *)Object_GetIgnoreWalkbehinds); ccAddExternalObjectFunction("Object::set_IgnoreWalkbehinds", (void *)Object_SetIgnoreWalkbehinds); ccAddExternalObjectFunction("Object::get_Loop", (void *)Object_GetLoop); ccAddExternalObjectFunction("Object::get_Moving", (void *)Object_GetMoving); ccAddExternalObjectFunction("Object::get_Name", (void *)Object_GetName_New); ccAddExternalObjectFunction("Object::get_Solid", (void *)Object_GetSolid); ccAddExternalObjectFunction("Object::set_Solid", (void *)Object_SetSolid); ccAddExternalObjectFunction("Object::get_Transparency", (void *)Object_GetTransparency); ccAddExternalObjectFunction("Object::set_Transparency", (void *)Object_SetTransparency); ccAddExternalObjectFunction("Object::get_View", (void *)Object_GetView); ccAddExternalObjectFunction("Object::get_Visible", (void *)Object_GetVisible); ccAddExternalObjectFunction("Object::set_Visible", (void *)Object_SetVisible); ccAddExternalObjectFunction("Object::get_X", (void *)Object_GetX); ccAddExternalObjectFunction("Object::set_X", (void *)Object_SetX); ccAddExternalObjectFunction("Object::get_Y", (void *)Object_GetY); ccAddExternalObjectFunction("Object::set_Y", (void *)Object_SetY); }
void register_inventoryitem_script_functions() { ccAddExternalStaticFunction("InventoryItem::GetAtScreenXY^2", (void *)GetInvAtLocation); ccAddExternalObjectFunction("InventoryItem::IsInteractionAvailable^1", (void *)InventoryItem_CheckInteractionAvailable); ccAddExternalObjectFunction("InventoryItem::GetName^1", (void *)InventoryItem_GetName); ccAddExternalObjectFunction("InventoryItem::GetProperty^1", (void *)InventoryItem_GetProperty); ccAddExternalObjectFunction("InventoryItem::GetPropertyText^2", (void *)InventoryItem_GetPropertyText); ccAddExternalObjectFunction("InventoryItem::GetTextProperty^1",(void *)InventoryItem_GetTextProperty); ccAddExternalObjectFunction("InventoryItem::RunInteraction^1", (void *)InventoryItem_RunInteraction); ccAddExternalObjectFunction("InventoryItem::SetName^1", (void *)InventoryItem_SetName); ccAddExternalObjectFunction("InventoryItem::get_CursorGraphic", (void *)InventoryItem_GetCursorGraphic); ccAddExternalObjectFunction("InventoryItem::set_CursorGraphic", (void *)InventoryItem_SetCursorGraphic); ccAddExternalObjectFunction("InventoryItem::get_Graphic", (void *)InventoryItem_GetGraphic); ccAddExternalObjectFunction("InventoryItem::set_Graphic", (void *)InventoryItem_SetGraphic); ccAddExternalObjectFunction("InventoryItem::get_ID", (void *)InventoryItem_GetID); ccAddExternalObjectFunction("InventoryItem::get_Name", (void *)InventoryItem_GetName_New); ccAddExternalObjectFunction("InventoryItem::set_Name", (void *)InventoryItem_SetName); }
void register_file_script_functions() { ccAddExternalObjectFunction("File::Delete^1",(void *)File_Delete); ccAddExternalObjectFunction("File::Exists^1",(void *)File_Exists); ccAddExternalStaticFunction("File::Open^2",(void *)sc_OpenFile); ccAddExternalObjectFunction("File::Close^0", (void *)File_Close); ccAddExternalObjectFunction("File::ReadInt^0", (void *)File_ReadInt); ccAddExternalObjectFunction("File::ReadRawChar^0", (void *)File_ReadRawChar); ccAddExternalObjectFunction("File::ReadRawInt^0", (void *)File_ReadRawInt); ccAddExternalObjectFunction("File::ReadRawLine^1", (void *)File_ReadRawLine); ccAddExternalObjectFunction("File::ReadRawLineBack^0", (void *)File_ReadRawLineBack); ccAddExternalObjectFunction("File::ReadString^1", (void *)File_ReadString); ccAddExternalObjectFunction("File::ReadStringBack^0", (void *)File_ReadStringBack); ccAddExternalObjectFunction("File::WriteInt^1", (void *)File_WriteInt); ccAddExternalObjectFunction("File::WriteRawChar^1", (void *)File_WriteRawChar); ccAddExternalObjectFunction("File::WriteRawLine^1", (void *)File_WriteRawLine); ccAddExternalObjectFunction("File::WriteString^1", (void *)File_WriteString); ccAddExternalObjectFunction("File::get_EOF", (void *)File_GetEOF); ccAddExternalObjectFunction("File::get_Error", (void *)File_GetError); }
void RegisterInventoryItemAPI() { ccAddExternalStaticFunction("InventoryItem::GetAtScreenXY^2", Sc_GetInvAtLocation); ccAddExternalObjectFunction("InventoryItem::IsInteractionAvailable^1", Sc_InventoryItem_CheckInteractionAvailable); ccAddExternalObjectFunction("InventoryItem::GetName^1", Sc_InventoryItem_GetName); ccAddExternalObjectFunction("InventoryItem::GetProperty^1", Sc_InventoryItem_GetProperty); ccAddExternalObjectFunction("InventoryItem::GetPropertyText^2", Sc_InventoryItem_GetPropertyText); ccAddExternalObjectFunction("InventoryItem::GetTextProperty^1", Sc_InventoryItem_GetTextProperty); ccAddExternalObjectFunction("InventoryItem::SetProperty^2", Sc_InventoryItem_SetProperty); ccAddExternalObjectFunction("InventoryItem::SetTextProperty^2", Sc_InventoryItem_SetTextProperty); ccAddExternalObjectFunction("InventoryItem::RunInteraction^1", Sc_InventoryItem_RunInteraction); ccAddExternalObjectFunction("InventoryItem::SetName^1", Sc_InventoryItem_SetName); ccAddExternalObjectFunction("InventoryItem::get_CursorGraphic", Sc_InventoryItem_GetCursorGraphic); ccAddExternalObjectFunction("InventoryItem::set_CursorGraphic", Sc_InventoryItem_SetCursorGraphic); ccAddExternalObjectFunction("InventoryItem::get_Graphic", Sc_InventoryItem_GetGraphic); ccAddExternalObjectFunction("InventoryItem::set_Graphic", Sc_InventoryItem_SetGraphic); ccAddExternalObjectFunction("InventoryItem::get_ID", Sc_InventoryItem_GetID); ccAddExternalObjectFunction("InventoryItem::get_Name", Sc_InventoryItem_GetName_New); ccAddExternalObjectFunction("InventoryItem::set_Name", Sc_InventoryItem_SetName); /* ----------------------- Registering unsafe exports for plugins -----------------------*/ ccAddExternalFunctionForPlugin("InventoryItem::GetAtScreenXY^2", (void*)GetInvAtLocation); ccAddExternalFunctionForPlugin("InventoryItem::IsInteractionAvailable^1", (void*)InventoryItem_CheckInteractionAvailable); ccAddExternalFunctionForPlugin("InventoryItem::GetName^1", (void*)InventoryItem_GetName); ccAddExternalFunctionForPlugin("InventoryItem::GetProperty^1", (void*)InventoryItem_GetProperty); ccAddExternalFunctionForPlugin("InventoryItem::GetPropertyText^2", (void*)InventoryItem_GetPropertyText); ccAddExternalFunctionForPlugin("InventoryItem::GetTextProperty^1", (void*)InventoryItem_GetTextProperty); ccAddExternalFunctionForPlugin("InventoryItem::RunInteraction^1", (void*)InventoryItem_RunInteraction); ccAddExternalFunctionForPlugin("InventoryItem::SetName^1", (void*)InventoryItem_SetName); ccAddExternalFunctionForPlugin("InventoryItem::get_CursorGraphic", (void*)InventoryItem_GetCursorGraphic); ccAddExternalFunctionForPlugin("InventoryItem::set_CursorGraphic", (void*)InventoryItem_SetCursorGraphic); ccAddExternalFunctionForPlugin("InventoryItem::get_Graphic", (void*)InventoryItem_GetGraphic); ccAddExternalFunctionForPlugin("InventoryItem::set_Graphic", (void*)InventoryItem_SetGraphic); ccAddExternalFunctionForPlugin("InventoryItem::get_ID", (void*)InventoryItem_GetID); ccAddExternalFunctionForPlugin("InventoryItem::get_Name", (void*)InventoryItem_GetName_New); ccAddExternalFunctionForPlugin("InventoryItem::set_Name", (void*)InventoryItem_SetName); }
bool RegisterPluginStubs(const char* name) { // Stubs for plugin functions. if (strncmp(name, "ags_shell", strlen("ags_shell")) == 0) { // ags_shell.dll ccAddExternalStaticFunction("ShellExecute", Sc_ScriptStub_ShellExecute); return true; } else if (strncmp(name, "ags_snowrain", strlen("ags_snowrain")) == 0) { // ags_snowrain.dll ccAddExternalStaticFunction("srSetSnowDriftRange", Sc_srSetSnowDriftRange); ccAddExternalStaticFunction("srSetSnowDriftSpeed", Sc_srSetSnowDriftSpeed); ccAddExternalStaticFunction("srSetSnowFallSpeed", Sc_srSetSnowFallSpeed); ccAddExternalStaticFunction("srChangeSnowAmount", Sc_srChangeSnowAmount); ccAddExternalStaticFunction("srSetSnowBaseline", Sc_srSetSnowBaseline); ccAddExternalStaticFunction("srSetSnowTransparency", Sc_srSetSnowTransparency); ccAddExternalStaticFunction("srSetSnowDefaultView", Sc_srSetSnowDefaultView); ccAddExternalStaticFunction("srSetSnowWindSpeed", Sc_srSetSnowWindSpeed); ccAddExternalStaticFunction("srSetSnowAmount", Sc_srSetSnowAmount); ccAddExternalStaticFunction("srSetSnowView", Sc_srSetSnowView); ccAddExternalStaticFunction("srChangeRainAmount", Sc_srChangeRainAmount); ccAddExternalStaticFunction("srSetRainView", Sc_srSetRainView); ccAddExternalStaticFunction("srSetRainDefaultView", Sc_srSetRainDefaultView); ccAddExternalStaticFunction("srSetRainTransparency", Sc_srSetRainTransparency); ccAddExternalStaticFunction("srSetRainWindSpeed", Sc_srSetRainWindSpeed); ccAddExternalStaticFunction("srSetRainBaseline", Sc_srSetRainBaseline); ccAddExternalStaticFunction("srSetRainAmount", Sc_srSetRainAmount); ccAddExternalStaticFunction("srSetRainFallSpeed", Sc_srSetRainFallSpeed); ccAddExternalStaticFunction("srSetWindSpeed", Sc_srSetWindSpeed); ccAddExternalStaticFunction("srSetBaseline", Sc_srSetBaseline); return true; } else if (strncmp(name, "agsjoy", strlen("agsjoy")) == 0) { // agsjoy.dll ccAddExternalStaticFunction("JoystickCount", Sc_JoystickCount); ccAddExternalStaticFunction("Joystick::Open^1", Sc_Joystick_Open); ccAddExternalStaticFunction("Joystick::IsButtonDown^1", Sc_Joystick_IsButtonDown); ccAddExternalStaticFunction("Joystick::EnableEvents^1", Sc_Joystick_EnableEvents); ccAddExternalStaticFunction("Joystick::DisableEvents^0", Sc_Joystick_DisableEvents); ccAddExternalStaticFunction("Joystick::Click^1", Sc_Joystick_Click); ccAddExternalStaticFunction("Joystick::Valid^0", Sc_Joystick_Valid); ccAddExternalStaticFunction("Joystick::Unplugged^0", Sc_Joystick_Unplugged); return true; } else if (strncmp(name, "agsblend", strlen("agsblend")) == 0) { // agsblend.dll ccAddExternalStaticFunction("DrawAlpha", Sc_DrawAlpha); ccAddExternalStaticFunction("GetAlpha", Sc_GetAlpha); ccAddExternalStaticFunction("PutAlpha", Sc_PutAlpha); ccAddExternalStaticFunction("Blur", Sc_Blur); ccAddExternalStaticFunction("HighPass", Sc_HighPass); ccAddExternalStaticFunction("DrawAdd", Sc_DrawAdd); return true; } else if (strncmp(name, "agsflashlight", strlen("agsflashlight")) == 0) { // agsflashlight.dll ccAddExternalStaticFunction("SetFlashlightTint", Sc_SetFlashlightInt3); ccAddExternalStaticFunction("GetFlashlightTintRed", Sc_GetFlashlightInt); ccAddExternalStaticFunction("GetFlashlightTintGreen", Sc_GetFlashlightInt); ccAddExternalStaticFunction("GetFlashlightTintBlue", Sc_GetFlashlightInt); ccAddExternalStaticFunction("GetFlashlightMinLightLevel", Sc_GetFlashlightInt); ccAddExternalStaticFunction("GetFlashlightMaxLightLevel", Sc_GetFlashlightInt); ccAddExternalStaticFunction("SetFlashlightDarkness", Sc_SetFlashlightInt1); ccAddExternalStaticFunction("GetFlashlightDarkness", Sc_GetFlashlightInt); ccAddExternalStaticFunction("SetFlashlightDarknessSize", Sc_SetFlashlightInt1); ccAddExternalStaticFunction("GetFlashlightDarknessSize", Sc_GetFlashlightInt); ccAddExternalStaticFunction("SetFlashlightBrightness", Sc_SetFlashlightInt1); ccAddExternalStaticFunction("GetFlashlightBrightness", Sc_GetFlashlightInt); ccAddExternalStaticFunction("SetFlashlightBrightnessSize", Sc_SetFlashlightInt1); ccAddExternalStaticFunction("GetFlashlightBrightnessSize", Sc_GetFlashlightInt); ccAddExternalStaticFunction("SetFlashlightPosition", Sc_SetFlashlightInt2); ccAddExternalStaticFunction("GetFlashlightPositionX", Sc_GetFlashlightInt); ccAddExternalStaticFunction("GetFlashlightPositionY", Sc_GetFlashlightInt); ccAddExternalStaticFunction("SetFlashlightFollowMouse", Sc_SetFlashlightInt1); ccAddExternalStaticFunction("GetFlashlightFollowMouse", Sc_GetFlashlightInt); ccAddExternalStaticFunction("SetFlashlightFollowCharacter", Sc_SetFlashlightInt5); ccAddExternalStaticFunction("GetFlashlightFollowCharacter", Sc_GetFlashlightInt); ccAddExternalStaticFunction("GetFlashlightCharacterDX", Sc_GetFlashlightInt); ccAddExternalStaticFunction("GetFlashlightCharacterDY", Sc_GetFlashlightInt); ccAddExternalStaticFunction("GetFlashlightCharacterHorz", Sc_GetFlashlightInt); ccAddExternalStaticFunction("GetFlashlightCharacterVert", Sc_GetFlashlightInt); ccAddExternalStaticFunction("SetFlashlightMask", Sc_SetFlashlightInt1); ccAddExternalStaticFunction("GetFlashlightMask", Sc_GetFlashlightInt); return true; } else if (strncmp(name, "agswadjetutil", strlen("agswadjetutil")) == 0) { // agswadjetutil.dll ccAddExternalStaticFunction("IsOnPhone", Sc_wjuIsOnPhone); ccAddExternalStaticFunction("FakeKeypress", Sc_wjuFakeKeypress); ccAddExternalStaticFunction("IosSetAchievementValue", Sc_wjuIosSetAchievementValue); ccAddExternalStaticFunction("IosGetAchievementValue", Sc_wjuIosGetAchievementValue); ccAddExternalStaticFunction("IosShowAchievements", Sc_wjuIosShowAchievements); ccAddExternalStaticFunction("IosResetAchievements", Sc_wjuIosResetAchievements); return true; } return false; }
void RegisterSystemAPI() { ccAddExternalStaticFunction("System::get_AudioChannelCount", Sc_System_GetAudioChannelCount); ccAddExternalStaticFunction("System::geti_AudioChannels", Sc_System_GetAudioChannels); ccAddExternalStaticFunction("System::get_CapsLock", Sc_System_GetCapsLock); ccAddExternalStaticFunction("System::get_ColorDepth", Sc_System_GetColorDepth); ccAddExternalStaticFunction("System::get_Gamma", Sc_System_GetGamma); ccAddExternalStaticFunction("System::set_Gamma", Sc_System_SetGamma); ccAddExternalStaticFunction("System::get_HardwareAcceleration", Sc_System_GetHardwareAcceleration); ccAddExternalStaticFunction("System::get_NumLock", Sc_System_GetNumLock); ccAddExternalStaticFunction("System::set_NumLock", Sc_System_SetNumLock); ccAddExternalStaticFunction("System::get_OperatingSystem", Sc_System_GetOS); ccAddExternalStaticFunction("System::get_ScreenHeight", Sc_System_GetScreenHeight); ccAddExternalStaticFunction("System::get_ScreenWidth", Sc_System_GetScreenWidth); ccAddExternalStaticFunction("System::get_ScrollLock", Sc_System_GetScrollLock); ccAddExternalStaticFunction("System::get_SupportsGammaControl", Sc_System_GetSupportsGammaControl); ccAddExternalStaticFunction("System::get_Version", Sc_System_GetVersion); ccAddExternalStaticFunction("SystemInfo::get_Version", Sc_System_GetVersion); ccAddExternalStaticFunction("System::get_ViewportHeight", Sc_System_GetViewportHeight); ccAddExternalStaticFunction("System::get_ViewportWidth", Sc_System_GetViewportWidth); ccAddExternalStaticFunction("System::get_Volume", Sc_System_GetVolume); ccAddExternalStaticFunction("System::set_Volume", Sc_System_SetVolume); ccAddExternalStaticFunction("System::get_VSync", Sc_System_GetVsync); ccAddExternalStaticFunction("System::set_VSync", Sc_System_SetVsync); ccAddExternalStaticFunction("System::get_Windowed", Sc_System_GetWindowed); /* ----------------------- Registering unsafe exports for plugins -----------------------*/ ccAddExternalFunctionForPlugin("System::get_AudioChannelCount", (void*)System_GetAudioChannelCount); ccAddExternalFunctionForPlugin("System::geti_AudioChannels", (void*)System_GetAudioChannels); ccAddExternalFunctionForPlugin("System::get_CapsLock", (void*)System_GetCapsLock); ccAddExternalFunctionForPlugin("System::get_ColorDepth", (void*)System_GetColorDepth); ccAddExternalFunctionForPlugin("System::get_Gamma", (void*)System_GetGamma); ccAddExternalFunctionForPlugin("System::set_Gamma", (void*)System_SetGamma); ccAddExternalFunctionForPlugin("System::get_HardwareAcceleration", (void*)System_GetHardwareAcceleration); ccAddExternalFunctionForPlugin("System::get_NumLock", (void*)System_GetNumLock); ccAddExternalFunctionForPlugin("System::set_NumLock", (void*)System_SetNumLock); ccAddExternalFunctionForPlugin("System::get_OperatingSystem", (void*)System_GetOS); ccAddExternalFunctionForPlugin("System::get_ScreenHeight", (void*)System_GetScreenHeight); ccAddExternalFunctionForPlugin("System::get_ScreenWidth", (void*)System_GetScreenWidth); ccAddExternalFunctionForPlugin("System::get_ScrollLock", (void*)System_GetScrollLock); ccAddExternalFunctionForPlugin("System::get_SupportsGammaControl", (void*)System_GetSupportsGammaControl); ccAddExternalFunctionForPlugin("System::get_Version", (void*)System_GetVersion); ccAddExternalFunctionForPlugin("SystemInfo::get_Version", (void*)System_GetVersion); ccAddExternalFunctionForPlugin("System::get_ViewportHeight", (void*)System_GetViewportHeight); ccAddExternalFunctionForPlugin("System::get_ViewportWidth", (void*)System_GetViewportWidth); ccAddExternalFunctionForPlugin("System::get_Volume", (void*)System_GetVolume); ccAddExternalFunctionForPlugin("System::set_Volume", (void*)System_SetVolume); ccAddExternalFunctionForPlugin("System::get_VSync", (void*)System_GetVsync); ccAddExternalFunctionForPlugin("System::set_VSync", (void*)System_SetVsync); ccAddExternalFunctionForPlugin("System::get_Windowed", (void*)System_GetWindowed); }
void RegisterMathAPI() { ccAddExternalStaticFunction("Maths::ArcCos^1", Sc_Math_ArcCos); ccAddExternalStaticFunction("Maths::ArcSin^1", Sc_Math_ArcSin); ccAddExternalStaticFunction("Maths::ArcTan^1", Sc_Math_ArcTan); ccAddExternalStaticFunction("Maths::ArcTan2^2", Sc_Math_ArcTan2); ccAddExternalStaticFunction("Maths::Cos^1", Sc_Math_Cos); ccAddExternalStaticFunction("Maths::Cosh^1", Sc_Math_Cosh); ccAddExternalStaticFunction("Maths::DegreesToRadians^1", Sc_Math_DegreesToRadians); ccAddExternalStaticFunction("Maths::Exp^1", Sc_Math_Exp); ccAddExternalStaticFunction("Maths::Log^1", Sc_Math_Log); ccAddExternalStaticFunction("Maths::Log10^1", Sc_Math_Log10); ccAddExternalStaticFunction("Maths::RadiansToDegrees^1", Sc_Math_RadiansToDegrees); ccAddExternalStaticFunction("Maths::RaiseToPower^2", Sc_Math_RaiseToPower); ccAddExternalStaticFunction("Maths::Sin^1", Sc_Math_Sin); ccAddExternalStaticFunction("Maths::Sinh^1", Sc_Math_Sinh); ccAddExternalStaticFunction("Maths::Sqrt^1", Sc_Math_Sqrt); ccAddExternalStaticFunction("Maths::Tan^1", Sc_Math_Tan); ccAddExternalStaticFunction("Maths::Tanh^1", Sc_Math_Tanh); ccAddExternalStaticFunction("Maths::get_Pi", Sc_Math_GetPi); /* ----------------------- Registering unsafe exports for plugins -----------------------*/ ccAddExternalFunctionForPlugin("Maths::ArcCos^1", (void*)Math_ArcCos); ccAddExternalFunctionForPlugin("Maths::ArcSin^1", (void*)Math_ArcSin); ccAddExternalFunctionForPlugin("Maths::ArcTan^1", (void*)Math_ArcTan); ccAddExternalFunctionForPlugin("Maths::ArcTan2^2", (void*)Math_ArcTan2); ccAddExternalFunctionForPlugin("Maths::Cos^1", (void*)Math_Cos); ccAddExternalFunctionForPlugin("Maths::Cosh^1", (void*)Math_Cosh); ccAddExternalFunctionForPlugin("Maths::DegreesToRadians^1", (void*)Math_DegreesToRadians); ccAddExternalFunctionForPlugin("Maths::Exp^1", (void*)Math_Exp); ccAddExternalFunctionForPlugin("Maths::Log^1", (void*)Math_Log); ccAddExternalFunctionForPlugin("Maths::Log10^1", (void*)Math_Log10); ccAddExternalFunctionForPlugin("Maths::RadiansToDegrees^1", (void*)Math_RadiansToDegrees); ccAddExternalFunctionForPlugin("Maths::RaiseToPower^2", (void*)Math_RaiseToPower); ccAddExternalFunctionForPlugin("Maths::Sin^1", (void*)Math_Sin); ccAddExternalFunctionForPlugin("Maths::Sinh^1", (void*)Math_Sinh); ccAddExternalFunctionForPlugin("Maths::Sqrt^1", (void*)Math_Sqrt); ccAddExternalFunctionForPlugin("Maths::Tan^1", (void*)Math_Tan); ccAddExternalFunctionForPlugin("Maths::Tanh^1", (void*)Math_Tanh); ccAddExternalFunctionForPlugin("Maths::get_Pi", (void*)Math_GetPi); }