Initial commit

This commit is contained in:
2026-02-02 04:50:13 +01:00
commit 5b11698731
22592 changed files with 7677434 additions and 0 deletions

View File

@@ -0,0 +1,114 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/audio_channel.h"
#include "ags/engine/ac/audio_channel.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void AudioChannel::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(AudioChannel::Seek^1, AudioChannel::Seek);
SCRIPT_METHOD(AudioChannel::SetRoomLocation^2, AudioChannel::SetRoomLocation);
SCRIPT_METHOD(AudioChannel::Stop^0, AudioChannel::Stop);
SCRIPT_METHOD(AudioChannel::get_ID, AudioChannel::GetID);
SCRIPT_METHOD(AudioChannel::get_IsPlaying, AudioChannel::GetIsPlaying);
SCRIPT_METHOD(AudioChannel::get_LengthMs, AudioChannel::GetLengthMs);
SCRIPT_METHOD(AudioChannel::get_Panning, AudioChannel::GetPanning);
SCRIPT_METHOD(AudioChannel::set_Panning, AudioChannel::SetPanning);
SCRIPT_METHOD(AudioChannel::get_PlayingClip, AudioChannel::GetPlayingClip);
SCRIPT_METHOD(AudioChannel::get_Position, AudioChannel::GetPosition);
SCRIPT_METHOD(AudioChannel::get_PositionMs, AudioChannel::GetPositionMs);
SCRIPT_METHOD(AudioChannel::get_Volume, AudioChannel::GetVolume);
SCRIPT_METHOD(AudioChannel::set_Volume, AudioChannel::SetVolume);
}
void AudioChannel::Seek(ScriptMethodParams &params) {
PARAMS2(ScriptAudioChannel *, channel, int, newPosition);
AGS3::AudioChannel_Seek(channel, newPosition);
}
void AudioChannel::SetRoomLocation(ScriptMethodParams &params) {
PARAMS3(ScriptAudioChannel *, channel, int, xPos, int, yPos);
AGS3::AudioChannel_SetRoomLocation(channel, xPos, yPos);
}
void AudioChannel::Stop(ScriptMethodParams &params) {
PARAMS1(ScriptAudioChannel *, channel);
AGS3::AudioChannel_Stop(channel);
}
void AudioChannel::GetID(ScriptMethodParams &params) {
PARAMS1(ScriptAudioChannel *, channel);
params._result = AGS3::AudioChannel_GetID(channel);
}
void AudioChannel::GetIsPlaying(ScriptMethodParams &params) {
PARAMS1(ScriptAudioChannel *, channel);
params._result = AGS3::AudioChannel_GetIsPlaying(channel);
}
void AudioChannel::GetLengthMs(ScriptMethodParams &params) {
PARAMS1(ScriptAudioChannel *, channel);
params._result = AGS3::AudioChannel_GetLengthMs(channel);
}
void AudioChannel::GetPanning(ScriptMethodParams &params) {
PARAMS1(ScriptAudioChannel *, channel);
params._result = AGS3::AudioChannel_GetPanning(channel);
}
void AudioChannel::SetPanning(ScriptMethodParams &params) {
PARAMS2(ScriptAudioChannel *, channel, int, newPanning);
AGS3::AudioChannel_SetPanning(channel, newPanning);
}
void AudioChannel::GetPlayingClip(ScriptMethodParams &params) {
PARAMS1(ScriptAudioChannel *, channel);
params._result = AGS3::AudioChannel_GetPlayingClip(channel);
}
void AudioChannel::GetPosition(ScriptMethodParams &params) {
PARAMS1(ScriptAudioChannel *, channel);
params._result = AGS3::AudioChannel_GetPosition(channel);
}
void AudioChannel::GetPositionMs(ScriptMethodParams &params) {
PARAMS1(ScriptAudioChannel *, channel);
params._result = AGS3::AudioChannel_GetPositionMs(channel);
}
void AudioChannel::GetVolume(ScriptMethodParams &params) {
PARAMS1(ScriptAudioChannel *, channel);
params._result = AGS3::AudioChannel_GetVolume(channel);
}
void AudioChannel::SetVolume(ScriptMethodParams &params) {
PARAMS2(ScriptAudioChannel *, channel, int, newVolume);
params._result = AGS3::AudioChannel_SetVolume(channel, newVolume);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,56 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_AUDIO_CHANNEL_H
#define AGS_PLUGINS_CORE_AUDIO_CHANNEL_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class AudioChannel : public ScriptContainer {
BUILT_IN_HASH(AudioChannel)
public:
virtual ~AudioChannel() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void Seek(ScriptMethodParams &params);
void SetRoomLocation(ScriptMethodParams &params);
void Stop(ScriptMethodParams &params);
void GetID(ScriptMethodParams &params);
void GetIsPlaying(ScriptMethodParams &params);
void GetLengthMs(ScriptMethodParams &params);
void GetPanning(ScriptMethodParams &params);
void SetPanning(ScriptMethodParams &params);
void GetPlayingClip(ScriptMethodParams &params);
void GetPosition(ScriptMethodParams &params);
void GetPositionMs(ScriptMethodParams &params);
void GetVolume(ScriptMethodParams &params);
void SetVolume(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,78 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/audio_clip.h"
#include "ags/engine/ac/audio_clip.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void AudioClip::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(AudioClip::Play^2, AudioClip::Play);
SCRIPT_METHOD(AudioClip::PlayFrom^3, AudioClip::PlayFrom);
SCRIPT_METHOD(AudioClip::PlayQueued^2, AudioClip::PlayQueued);
SCRIPT_METHOD(AudioClip::Stop^0, AudioClip::Stop);
SCRIPT_METHOD(AudioClip::get_FileType, AudioClip::GetFileType);
SCRIPT_METHOD(AudioClip::get_IsAvailable, AudioClip::GetIsAvailable);
SCRIPT_METHOD(AudioClip::get_Type, AudioClip::GetType);
}
void AudioClip::Play(ScriptMethodParams &params) {
PARAMS3(ScriptAudioClip *, clip, int, priority, int, repeat);
params._result = AGS3::AudioClip_Play(clip, priority, repeat);
}
void AudioClip::PlayFrom(ScriptMethodParams &params) {
PARAMS4(ScriptAudioClip *, clip, int, position, int, priority, int, repeat);
params._result = AGS3::AudioClip_PlayFrom(clip, position, priority, repeat);
}
void AudioClip::PlayQueued(ScriptMethodParams &params) {
PARAMS3(ScriptAudioClip *, clip, int, priority, int, repeat);
params._result = AGS3::AudioClip_PlayQueued(clip, priority, repeat);
}
void AudioClip::Stop(ScriptMethodParams &params) {
PARAMS1(ScriptAudioClip *, clip);
AGS3::AudioClip_Stop(clip);
}
void AudioClip::GetFileType(ScriptMethodParams &params) {
PARAMS1(ScriptAudioClip *, clip);
params._result = AGS3::AudioClip_GetFileType(clip);
}
void AudioClip::GetIsAvailable(ScriptMethodParams &params) {
PARAMS1(ScriptAudioClip *, clip);
params._result = AGS3::AudioClip_GetIsAvailable(clip);
}
void AudioClip::GetType(ScriptMethodParams &params) {
PARAMS1(ScriptAudioClip *, clip);
params._result = AGS3::AudioClip_GetType(clip);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,50 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_AUDIO_CLIP_H
#define AGS_PLUGINS_CORE_AUDIO_CLIP_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class AudioClip : public ScriptContainer {
BUILT_IN_HASH(AudioClip)
public:
virtual ~AudioClip() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void Play(ScriptMethodParams &params);
void PlayFrom(ScriptMethodParams &params);
void PlayQueued(ScriptMethodParams &params);
void Stop(ScriptMethodParams &params);
void GetFileType(ScriptMethodParams &params);
void GetIsAvailable(ScriptMethodParams &params);
void GetType(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,139 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/button.h"
#include "ags/engine/ac/button.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void Button::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(Button::Animate^4, Button::Animate);
SCRIPT_METHOD(Button::GetText^1, Button::GetText);
SCRIPT_METHOD(Button::SetText^1, Button::SetText);
SCRIPT_METHOD(Button::get_ClipImage, Button::GetClipImage);
SCRIPT_METHOD(Button::set_ClipImage, Button::SetClipImage);
SCRIPT_METHOD(Button::get_Font, Button::GetFont);
SCRIPT_METHOD(Button::set_Font, Button::SetFont);
SCRIPT_METHOD(Button::get_Graphic, Button::GetGraphic);
SCRIPT_METHOD(Button::get_MouseOverGraphic, Button::GetMouseOverGraphic);
SCRIPT_METHOD(Button::set_MouseOverGraphic, Button::SetMouseOverGraphic);
SCRIPT_METHOD(Button::get_NormalGraphic, Button::GetNormalGraphic);
SCRIPT_METHOD(Button::set_NormalGraphic, Button::SetNormalGraphic);
SCRIPT_METHOD(Button::get_PushedGraphic, Button::GetPushedGraphic);
SCRIPT_METHOD(Button::set_PushedGraphic, Button::SetPushedGraphic);
SCRIPT_METHOD(Button::get_Text, Button::GetText_New);
SCRIPT_METHOD(Button::set_Text, Button::SetText);
SCRIPT_METHOD(Button::get_TextColor, Button::GetTextColor);
SCRIPT_METHOD(Button::set_TextColor, Button::SetTextColor);
}
void Button::Animate(ScriptMethodParams &params) {
PARAMS5(GUIButton *, butt, int, view, int, loop, int, speed, int, repeat);
AGS3::Button_Animate4(butt, view, loop, speed, repeat);
}
void Button::GetText(ScriptMethodParams &params) {
PARAMS2(GUIButton *, butt, char *, buffer);
AGS3::Button_GetText(butt, buffer);
}
void Button::SetText(ScriptMethodParams &params) {
PARAMS2(GUIButton *, butt, const char *, newtx);
AGS3::Button_SetText(butt, newtx);
}
void Button::GetClipImage(ScriptMethodParams &params) {
PARAMS1(GUIButton *, butt);
params._result = AGS3::Button_GetClipImage(butt);
}
void Button::SetClipImage(ScriptMethodParams &params) {
PARAMS2(GUIButton *, butt, int, newval);
AGS3::Button_SetClipImage(butt, newval);
}
void Button::GetFont(ScriptMethodParams &params) {
PARAMS1(GUIButton *, butt);
params._result = AGS3::Button_GetFont(butt);
}
void Button::SetFont(ScriptMethodParams &params) {
PARAMS2(GUIButton *, butt, int, newFont);
AGS3::Button_SetFont(butt, newFont);
}
void Button::GetGraphic(ScriptMethodParams &params) {
PARAMS1(GUIButton *, butt);
params._result = AGS3::Button_GetGraphic(butt);
}
void Button::GetMouseOverGraphic(ScriptMethodParams &params) {
PARAMS1(GUIButton *, butt);
params._result = AGS3::Button_GetMouseOverGraphic(butt);
}
void Button::SetMouseOverGraphic(ScriptMethodParams &params) {
PARAMS2(GUIButton *, guil, int, slotn);
AGS3::Button_SetMouseOverGraphic(guil, slotn);
}
void Button::GetNormalGraphic(ScriptMethodParams &params) {
PARAMS1(GUIButton *, butt);
params._result = AGS3::Button_GetNormalGraphic(butt);
}
void Button::SetNormalGraphic(ScriptMethodParams &params) {
PARAMS2(GUIButton *, guil, int, slotn);
AGS3::Button_SetNormalGraphic(guil, slotn);
}
void Button::GetPushedGraphic(ScriptMethodParams &params) {
PARAMS1(GUIButton *, butt);
params._result = AGS3::Button_GetPushedGraphic(butt);
}
void Button::SetPushedGraphic(ScriptMethodParams &params) {
PARAMS2(GUIButton *, guil, int, slotn);
AGS3::Button_SetPushedGraphic(guil, slotn);
}
void Button::GetText_New(ScriptMethodParams &params) {
PARAMS1(GUIButton *, butt);
params._result = AGS3::Button_GetText_New(butt);
}
void Button::GetTextColor(ScriptMethodParams &params) {
PARAMS1(GUIButton *, butt);
params._result = AGS3::Button_GetTextColor(butt);
}
void Button::SetTextColor(ScriptMethodParams &params) {
PARAMS2(GUIButton *, butt, int, newcol);
AGS3::Button_SetTextColor(butt, newcol);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,60 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_BUTTON_H
#define AGS_PLUGINS_CORE_BUTTON_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class Button : public ScriptContainer {
BUILT_IN_HASH(Button)
public:
virtual ~Button() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void Animate(ScriptMethodParams &params);
void GetText(ScriptMethodParams &params);
void SetText(ScriptMethodParams &params);
void GetClipImage(ScriptMethodParams &params);
void SetClipImage(ScriptMethodParams &params);
void GetFont(ScriptMethodParams &params);
void SetFont(ScriptMethodParams &params);
void GetGraphic(ScriptMethodParams &params);
void GetMouseOverGraphic(ScriptMethodParams &params);
void SetMouseOverGraphic(ScriptMethodParams &params);
void GetNormalGraphic(ScriptMethodParams &params);
void SetNormalGraphic(ScriptMethodParams &params);
void GetPushedGraphic(ScriptMethodParams &params);
void SetPushedGraphic(ScriptMethodParams &params);
void GetText_New(ScriptMethodParams &params);
void GetTextColor(ScriptMethodParams &params);
void SetTextColor(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,814 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/character.h"
#include "ags/engine/ac/character.h"
#include "ags/engine/ac/global_character.h"
#include "ags/shared/ac/game_struct_defines.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void Character::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(Character::AddInventory^2, Character::AddInventory);
SCRIPT_METHOD(Character::AddWaypoint^2, Character::AddWaypoint);
SCRIPT_METHOD(Character::Animate^5, Character::Animate);
SCRIPT_METHOD(Character::ChangeRoom^3, Character::ChangeRoom);
SCRIPT_METHOD(Character::ChangeRoomAutoPosition^2, Character::ChangeRoomAutoPosition);
SCRIPT_METHOD(Character::ChangeView^1, Character::ChangeView);
SCRIPT_METHOD(Character::FaceCharacter^2, Character::FaceCharacter);
SCRIPT_METHOD(Character::FaceDirection^2, Character::FaceDirection);
SCRIPT_METHOD(Character::FaceLocation^3, Character::FaceLocation);
SCRIPT_METHOD(Character::FaceObject^2, Character::FaceObject);
SCRIPT_METHOD(Character::FollowCharacter^3, Character::FollowCharacter);
SCRIPT_METHOD(Character::GetProperty^1, Character::GetProperty);
SCRIPT_METHOD(Character::GetPropertyText^2, Character::GetPropertyText);
SCRIPT_METHOD(Character::GetTextProperty^1, Character::GetTextProperty);
SCRIPT_METHOD(Character::HasInventory^1, Character::HasInventory);
SCRIPT_METHOD(Character::IsCollidingWithChar^1, Character::IsCollidingWithChar);
SCRIPT_METHOD(Character::IsCollidingWithObject^1, Character::IsCollidingWithObject);
SCRIPT_METHOD(Character::LockView^1, Character::LockView);
SCRIPT_METHOD(Character::LockView^2, Character::LockViewEx);
if (engine->version < kScriptAPI_v341) {
SCRIPT_METHOD(Character::LockViewAligned^3, Character::LockViewAligned_Old);
SCRIPT_METHOD(Character::LockViewAligned^4, Character::LockViewAlignedEx_Old);
} else {
SCRIPT_METHOD(Character::LockViewAligned^3, Character::LockViewAligned);
SCRIPT_METHOD(Character::LockViewAligned^4, Character::LockViewAlignedEx);
}
SCRIPT_METHOD(Character::LockViewFrame^3, Character::LockViewFrame);
SCRIPT_METHOD(Character::LockViewFrame^4, Character::LockViewFrameEx);
SCRIPT_METHOD(Character::LockViewOffset^3, Character::LockViewOffset);
SCRIPT_METHOD(Character::LockViewOffset^4, Character::LockViewOffset);
SCRIPT_METHOD(Character::LoseInventory^1, Character::LoseInventory);
SCRIPT_METHOD(Character::Move^4, Character::Move);
SCRIPT_METHOD(Character::PlaceOnWalkableArea^0, Character::PlaceOnWalkableArea);
SCRIPT_METHOD(Character::RemoveTint^0, Character::RemoveTint);
SCRIPT_METHOD(Character::RunInteraction^1, Character::RunInteraction);
SCRIPT_METHOD(Character::Say^101, Character::ScPl_Say);
SCRIPT_METHOD(Character::SayAt^4, Character::SayAt);
SCRIPT_METHOD(Character::SayBackground^1, Character::SayBackground);
SCRIPT_METHOD(Character::SetAsPlayer^0, Character::SetAsPlayer);
SCRIPT_METHOD(Character::SetIdleView^2, Character::SetIdleView);
//SCRIPT_METHOD(Character::SetOption^2", Character:: (void*)SetOption);
SCRIPT_METHOD(Character::SetProperty^2, Character::SetProperty);
SCRIPT_METHOD(Character::SetTextProperty^2, Character::SetTextProperty);
SCRIPT_METHOD(Character::SetWalkSpeed^2, Character::SetSpeed);
SCRIPT_METHOD(Character::StopMoving^0, Character::StopMoving);
SCRIPT_METHOD(Character::Think^101, Character::ScPl_Think);
SCRIPT_METHOD(Character::Tint^5, Character::Tint);
SCRIPT_METHOD(Character::UnlockView^0, Character::UnlockView);
SCRIPT_METHOD(Character::UnlockView^1, Character::UnlockViewEx);
SCRIPT_METHOD(Character::Walk^4, Character::Walk);
SCRIPT_METHOD(Character::WalkStraight^3, Character::WalkStraight);
SCRIPT_METHOD(Character::GetAtRoomXY^2, Character::GetCharacterAtRoom);
SCRIPT_METHOD(Character::GetAtScreenXY^2, Character::GetCharacterAtScreen);
SCRIPT_METHOD(Character::get_ActiveInventory, Character::GetActiveInventory);
SCRIPT_METHOD(Character::set_ActiveInventory, Character::SetActiveInventory);
SCRIPT_METHOD(Character::get_Animating, Character::GetAnimating);
SCRIPT_METHOD(Character::get_AnimationSpeed, Character::GetAnimationSpeed);
SCRIPT_METHOD(Character::set_AnimationSpeed, Character::SetAnimationSpeed);
SCRIPT_METHOD(Character::get_Baseline, Character::GetBaseline);
SCRIPT_METHOD(Character::set_Baseline, Character::SetBaseline);
SCRIPT_METHOD(Character::get_BlinkInterval, Character::GetBlinkInterval);
SCRIPT_METHOD(Character::set_BlinkInterval, Character::SetBlinkInterval);
SCRIPT_METHOD(Character::get_BlinkView, Character::GetBlinkView);
SCRIPT_METHOD(Character::set_BlinkView, Character::SetBlinkView);
SCRIPT_METHOD(Character::get_BlinkWhileThinking, Character::GetBlinkWhileThinking);
SCRIPT_METHOD(Character::set_BlinkWhileThinking, Character::SetBlinkWhileThinking);
SCRIPT_METHOD(Character::get_BlockingHeight, Character::GetBlockingHeight);
SCRIPT_METHOD(Character::set_BlockingHeight, Character::SetBlockingHeight);
SCRIPT_METHOD(Character::get_BlockingWidth, Character::GetBlockingWidth);
SCRIPT_METHOD(Character::set_BlockingWidth, Character::SetBlockingWidth);
SCRIPT_METHOD(Character::get_Clickable, Character::GetClickable);
SCRIPT_METHOD(Character::set_Clickable, Character::SetClickable);
SCRIPT_METHOD(Character::get_DestinationX, Character::GetDestinationX);
SCRIPT_METHOD(Character::get_DestinationY, Character::GetDestinationY);
SCRIPT_METHOD(Character::get_DiagonalLoops, Character::GetDiagonalWalking);
SCRIPT_METHOD(Character::set_DiagonalLoops, Character::SetDiagonalWalking);
SCRIPT_METHOD(Character::get_Frame, Character::GetFrame);
SCRIPT_METHOD(Character::set_Frame, Character::SetFrame);
if (engine->version < kScriptAPI_v341)
SCRIPT_METHOD(Character::get_HasExplicitTint, Character::GetHasExplicitTint_Old);
else
SCRIPT_METHOD(Character::get_HasExplicitTint, Character::GetHasExplicitTint);
SCRIPT_METHOD(Character::get_ID, Character::GetID);
SCRIPT_METHOD(Character::get_IdleView, Character::GetIdleView);
SCRIPT_METHOD(Character::geti_InventoryQuantity, Character::GetIInventoryQuantity);
SCRIPT_METHOD(Character::seti_InventoryQuantity, Character::SetIInventoryQuantity);
SCRIPT_METHOD(Character::get_IgnoreLighting, Character::GetIgnoreLighting);
SCRIPT_METHOD(Character::set_IgnoreLighting, Character::SetIgnoreLighting);
SCRIPT_METHOD(Character::get_IgnoreScaling, Character::GetIgnoreScaling);
SCRIPT_METHOD(Character::set_IgnoreScaling, Character::SetIgnoreScaling);
SCRIPT_METHOD(Character::get_IgnoreWalkbehinds, Character::GetIgnoreWalkbehinds);
SCRIPT_METHOD(Character::set_IgnoreWalkbehinds, Character::SetIgnoreWalkbehinds);
SCRIPT_METHOD(Character::get_Loop, Character::GetLoop);
SCRIPT_METHOD(Character::set_Loop, Character::SetLoop);
SCRIPT_METHOD(Character::get_ManualScaling, Character::GetIgnoreScaling);
SCRIPT_METHOD(Character::set_ManualScaling, Character::SetManualScaling);
SCRIPT_METHOD(Character::get_MovementLinkedToAnimation, Character::GetMovementLinkedToAnimation);
SCRIPT_METHOD(Character::set_MovementLinkedToAnimation, Character::SetMovementLinkedToAnimation);
SCRIPT_METHOD(Character::get_Moving, Character::GetMoving);
SCRIPT_METHOD(Character::get_Name, Character::GetName);
SCRIPT_METHOD(Character::set_Name, Character::SetName);
SCRIPT_METHOD(Character::get_NormalView, Character::GetNormalView);
SCRIPT_METHOD(Character::get_PreviousRoom, Character::GetPreviousRoom);
SCRIPT_METHOD(Character::get_Room, Character::GetRoom);
SCRIPT_METHOD(Character::get_ScaleMoveSpeed, Character::GetScaleMoveSpeed);
SCRIPT_METHOD(Character::set_ScaleMoveSpeed, Character::SetScaleMoveSpeed);
SCRIPT_METHOD(Character::get_ScaleVolume, Character::GetScaleVolume);
SCRIPT_METHOD(Character::set_ScaleVolume, Character::SetScaleVolume);
SCRIPT_METHOD(Character::get_Scaling, Character::GetScaling);
SCRIPT_METHOD(Character::set_Scaling, Character::SetScaling);
SCRIPT_METHOD(Character::get_Solid, Character::GetSolid);
SCRIPT_METHOD(Character::set_Solid, Character::SetSolid);
SCRIPT_METHOD(Character::get_Speaking, Character::GetSpeaking);
SCRIPT_METHOD(Character::get_SpeakingFrame, Character::GetSpeakingFrame);
SCRIPT_METHOD(Character::get_SpeechAnimationDelay, Character::GetCharacterSpeechAnimationDelay);
SCRIPT_METHOD(Character::set_SpeechAnimationDelay, Character::SetSpeechAnimationDelay);
SCRIPT_METHOD(Character::get_SpeechColor, Character::GetSpeechColor);
SCRIPT_METHOD(Character::set_SpeechColor, Character::SetSpeechColor);
SCRIPT_METHOD(Character::get_SpeechView, Character::GetSpeechView);
SCRIPT_METHOD(Character::set_SpeechView, Character::SetSpeechView);
SCRIPT_METHOD(Character::get_ThinkView, Character::GetThinkView);
SCRIPT_METHOD(Character::set_ThinkView, Character::SetThinkView);
SCRIPT_METHOD(Character::get_Transparency, Character::GetTransparency);
SCRIPT_METHOD(Character::set_Transparency, Character::SetTransparency);
SCRIPT_METHOD(Character::get_TurnBeforeWalking, Character::GetTurnBeforeWalking);
SCRIPT_METHOD(Character::set_TurnBeforeWalking, Character::SetTurnBeforeWalking);
SCRIPT_METHOD(Character::get_View, Character::GetView);
SCRIPT_METHOD(Character::get_WalkSpeedX, Character::GetWalkSpeedX);
SCRIPT_METHOD(Character::get_WalkSpeedY, Character::GetWalkSpeedY);
SCRIPT_METHOD(Character::get_X, Character::GetX);
SCRIPT_METHOD(Character::set_X, Character::SetX);
SCRIPT_METHOD(Character::get_x, Character::GetX);
SCRIPT_METHOD(Character::set_x, Character::SetX);
SCRIPT_METHOD(Character::get_Y, Character::GetY);
SCRIPT_METHOD(Character::set_Y, Character::SetY);
SCRIPT_METHOD(Character::get_y, Character::GetY);
SCRIPT_METHOD(Character::set_y, Character::SetY);
SCRIPT_METHOD(Character::get_Z, Character::GetZ);
SCRIPT_METHOD(Character::set_Z, Character::SetZ);
SCRIPT_METHOD(Character::get_z, Character::GetZ);
SCRIPT_METHOD(Character::set_z, Character::SetZ);
}
void Character::AddInventory(ScriptMethodParams &params) {
PARAMS3(CharacterInfo *, chaa, ScriptInvItem *, invi, int, addIndex);
AGS3::Character_AddInventory(chaa, invi, addIndex);
}
void Character::AddWaypoint(ScriptMethodParams &params) {
PARAMS3(CharacterInfo *, chaa, int, x, int, y);
AGS3::Character_AddWaypoint(chaa, x, y);
}
void Character::Animate(ScriptMethodParams &params) {
PARAMS6(CharacterInfo *, chaa, int, loop, int, delay, int, repeat, int, blocking, int, direction);
AGS3::Character_Animate(chaa, loop, delay, repeat, blocking, direction);
}
void Character::ChangeRoom(ScriptMethodParams &params) {
PARAMS4(CharacterInfo *, chaa, int, room, int, x, int, y);
AGS3::Character_ChangeRoom(chaa, room, x, y);
}
void Character::ChangeRoomAutoPosition(ScriptMethodParams &params) {
PARAMS3(CharacterInfo *, chaa, int, room, int, newPos);
AGS3::Character_ChangeRoomAutoPosition(chaa, room, newPos);
}
void Character::ChangeView(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chap, int, vii);
AGS3::Character_ChangeView(chap, vii);
}
void Character::FaceCharacter(ScriptMethodParams &params) {
PARAMS3(CharacterInfo *, char1, CharacterInfo *, char2, int, blockingStyle);
AGS3::Character_FaceCharacter(char1, char2, blockingStyle);
}
void Character::FaceDirection(ScriptMethodParams &params) {
PARAMS3(CharacterInfo *, char1, int, direction, int, blockingStyle);
AGS3::Character_FaceDirection(char1, direction, blockingStyle);
}
void Character::FaceLocation(ScriptMethodParams &params) {
PARAMS4(CharacterInfo *, char1, int, xx, int, yy, int, blockingStyle);
AGS3::Character_FaceLocation(char1, xx, yy, blockingStyle);
}
void Character::FaceObject(ScriptMethodParams &params) {
PARAMS3(CharacterInfo *, char1, ScriptObject *, obj, int, blockingStyle);
AGS3::Character_FaceObject(char1, obj, blockingStyle);
}
void Character::FollowCharacter(ScriptMethodParams &params) {
PARAMS4(CharacterInfo *, chaa, CharacterInfo *, tofollow, int, distaway, int, eagerness);
AGS3::Character_FollowCharacter(chaa, tofollow, distaway, eagerness);
}
void Character::GetProperty(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, const char *, property);
params._result = AGS3::Character_GetProperty(chaa, property);
}
void Character::GetPropertyText(ScriptMethodParams &params) {
PARAMS3(CharacterInfo *, chaa, const char *, property, char *, buffer);
AGS3::Character_GetPropertyText(chaa, property, buffer);
}
void Character::GetTextProperty(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, const char *, property);
params._result = AGS3::Character_GetTextProperty(chaa, property);
}
void Character::HasInventory(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, ScriptInvItem *, invi);
params._result = AGS3::Character_HasInventory(chaa, invi);
}
void Character::IsCollidingWithChar(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, char1, CharacterInfo *, char2);
params._result = AGS3::Character_IsCollidingWithChar(char1, char2);
}
void Character::IsCollidingWithObject(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chin, ScriptObject *, objid);
params._result = AGS3::Character_IsCollidingWithObject(chin, objid);
}
void Character::LockView(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chap, int, vii);
AGS3::Character_LockView(chap, vii);
}
void Character::LockViewEx(ScriptMethodParams &params) {
PARAMS3(CharacterInfo *, chap, int, vii, int, stopMoving);
AGS3::Character_LockViewEx(chap, vii, stopMoving);
}
void Character::LockViewAligned_Old(ScriptMethodParams &params) {
PARAMS4(CharacterInfo *, chap, int, vii, int, loop, int, align);
AGS3::Character_LockViewAligned_Old(chap, vii, loop, align);
}
void Character::LockViewAlignedEx_Old(ScriptMethodParams &params) {
PARAMS5(CharacterInfo *, chap, int, vii, int, loop, int, align, int, stopMoving);
AGS3::Character_LockViewAlignedEx_Old(chap, vii, loop, align, stopMoving);
}
void Character::LockViewAligned(ScriptMethodParams &params) {
PARAMS4(CharacterInfo *, chap, int, vii, int, loop, int, align);
AGS3::Character_LockViewAligned(chap, vii, loop, align);
}
void Character::LockViewAlignedEx(ScriptMethodParams &params) {
PARAMS5(CharacterInfo *, chap, int, vii, int, loop, int, align, int, stopMoving);
AGS3::Character_LockViewAlignedEx(chap, vii, loop, align, stopMoving);
}
void Character::LockViewFrame(ScriptMethodParams &params) {
PARAMS4(CharacterInfo *, chaa, int, view, int, loop, int, frame);
AGS3::Character_LockViewFrame(chaa, view, loop, frame);
}
void Character::LockViewFrameEx(ScriptMethodParams &params) {
PARAMS5(CharacterInfo *, chaa, int, view, int, loop, int, frame, int, stopMoving);
AGS3::Character_LockViewFrameEx(chaa, view, loop, frame, stopMoving);
}
void Character::LockViewOffset(ScriptMethodParams &params) {
PARAMS4(CharacterInfo *, chap, int, vii, int, xoffs, int, yoffs);
AGS3::Character_LockViewOffset(chap, vii, xoffs, yoffs);
}
void Character::LoseInventory(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chap, ScriptInvItem *, invi);
AGS3::Character_LoseInventory(chap, invi);
}
void Character::Move(ScriptMethodParams &params) {
PARAMS5(CharacterInfo *, chaa, int, x, int, y, int, blocking, int, direct);
AGS3::Character_Move(chaa, x, y, blocking, direct);
}
void Character::PlaceOnWalkableArea(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chap);
AGS3::Character_PlaceOnWalkableArea(chap);
}
void Character::RemoveTint(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
AGS3::Character_RemoveTint(chaa);
}
void Character::RunInteraction(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, mood);
AGS3::Character_RunInteraction(chaa, mood);
}
void Character::ScPl_Say(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
Common::String texx = params.format(1);
AGS3::Character_Say(chaa, texx.c_str());
}
void Character::SayAt(ScriptMethodParams &params) {
PARAMS5(CharacterInfo *, chaa, int, x, int, y, int, width, const char *, texx);
AGS3::Character_SayAt(chaa, x, y, width, texx);
}
void Character::SayBackground(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, const char *, texx);
params._result = AGS3::Character_SayBackground(chaa, texx);
}
void Character::SetAsPlayer(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
AGS3::Character_SetAsPlayer(chaa);
}
void Character::SetIdleView(ScriptMethodParams &params) {
PARAMS3(CharacterInfo *, chaa, int, iview, int, itime);
AGS3::Character_SetIdleView(chaa, iview, itime);
}
void Character::SetProperty(ScriptMethodParams &params) {
PARAMS3(CharacterInfo *, chaa, const char *, property, int, value);
params._result = AGS3::Character_SetProperty(chaa, property, value);
}
void Character::SetTextProperty(ScriptMethodParams &params) {
PARAMS3(CharacterInfo *, chaa, const char *, property, const char *, value);
params._result = AGS3::Character_SetTextProperty(chaa, property, value);
}
void Character::SetSpeed(ScriptMethodParams &params) {
PARAMS3(CharacterInfo *, chaa, int, xspeed, int, yspeed);
AGS3::Character_SetSpeed(chaa, xspeed, yspeed);
}
void Character::StopMoving(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, charp);
AGS3::Character_StopMoving(charp);
}
void Character::ScPl_Think(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
Common::String texx = params.format(1);
AGS3::Character_Think(chaa, texx.c_str());
}
void Character::Tint(ScriptMethodParams &params) {
PARAMS6(CharacterInfo *, chaa, int, red, int, green, int, blue, int, opacity, int, luminance);
AGS3::Character_Tint(chaa, red, green, blue, opacity, luminance);
}
void Character::UnlockView(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
AGS3::Character_UnlockView(chaa);
}
void Character::UnlockViewEx(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, stopMoving);
AGS3::Character_UnlockViewEx(chaa, stopMoving);
}
void Character::Walk(ScriptMethodParams &params) {
PARAMS5(CharacterInfo *, chaa, int, x, int, y, int, blocking, int, direct);
AGS3::Character_Walk(chaa, x, y, blocking, direct);
}
void Character::WalkStraight(ScriptMethodParams &params) {
PARAMS4(CharacterInfo *, chaa, int, xx, int, yy, int, blocking);
AGS3::Character_WalkStraight(chaa, xx, yy, blocking);
}
void Character::GetCharacterAtRoom(ScriptMethodParams &params) {
PARAMS2(int, x, int, y);
params._result = AGS3::GetCharacterAtRoom(x, y);
}
void Character::GetCharacterAtScreen(ScriptMethodParams &params) {
PARAMS2(int, x, int, y);
params._result = AGS3::GetCharacterAtScreen(x, y);
}
void Character::GetActiveInventory(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetActiveInventory(chaa);
}
void Character::SetActiveInventory(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, ScriptInvItem *, iit);
AGS3::Character_SetActiveInventory(chaa, iit);
}
void Character::GetAnimating(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetAnimating(chaa);
}
void Character::GetAnimationSpeed(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetAnimationSpeed(chaa);
}
void Character::SetAnimationSpeed(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, newval);
AGS3::Character_SetAnimationSpeed(chaa, newval);
}
void Character::GetBaseline(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetBaseline(chaa);
}
void Character::SetBaseline(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, basel);
AGS3::Character_SetBaseline(chaa, basel);
}
void Character::GetBlinkInterval(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetBlinkInterval(chaa);
}
void Character::SetBlinkInterval(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, interval);
AGS3::Character_SetBlinkInterval(chaa, interval);
}
void Character::GetBlinkView(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetBlinkView(chaa);
}
void Character::SetBlinkView(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, vii);
AGS3::Character_SetBlinkView(chaa, vii);
}
void Character::GetBlinkWhileThinking(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetBlinkWhileThinking(chaa);
}
void Character::SetBlinkWhileThinking(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
AGS3::Character_SetBlinkWhileThinking(chaa, yesOrNo);
}
void Character::GetBlockingHeight(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetBlockingHeight(chaa);
}
void Character::SetBlockingHeight(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, hit);
AGS3::Character_SetBlockingHeight(chaa, hit);
}
void Character::GetBlockingWidth(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetBlockingWidth(chaa);
}
void Character::SetBlockingWidth(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, wid);
AGS3::Character_SetBlockingWidth(chaa, wid);
}
void Character::GetClickable(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetClickable(chaa);
}
void Character::SetClickable(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, clik);
AGS3::Character_SetClickable(chaa, clik);
}
void Character::GetDestinationX(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetDestinationX(chaa);
}
void Character::GetDestinationY(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetDestinationX(chaa);
}
void Character::GetDiagonalWalking(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetDiagonalWalking(chaa);
}
void Character::SetDiagonalWalking(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
AGS3::Character_SetDiagonalWalking(chaa, yesOrNo);
}
void Character::GetFrame(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetFrame(chaa);
}
void Character::SetFrame(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, newVal);
AGS3::Character_SetFrame(chaa, newVal);
}
void Character::GetHasExplicitTint_Old(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetHasExplicitTint_Old(chaa);
}
void Character::GetHasExplicitTint(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetHasExplicitTint(chaa);
}
void Character::GetID(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetID(chaa);
}
void Character::GetIdleView(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetIdleView(chaa);
}
void Character::GetIInventoryQuantity(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, index);
params._result = AGS3::Character_GetIInventoryQuantity(chaa, index);
}
void Character::SetIInventoryQuantity(ScriptMethodParams &params) {
PARAMS3(CharacterInfo *, chaa, int, index, int, quant);
AGS3::Character_SetIInventoryQuantity(chaa, index, quant);
}
void Character::GetIgnoreLighting(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetIgnoreLighting(chaa);
}
void Character::SetIgnoreLighting(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
AGS3::Character_SetIgnoreLighting(chaa, yesOrNo);
}
void Character::GetIgnoreScaling(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetIgnoreScaling(chaa);
}
void Character::SetIgnoreScaling(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
AGS3::Character_SetIgnoreScaling(chaa, yesOrNo);
}
void Character::GetIgnoreWalkbehinds(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetIgnoreWalkbehinds(chaa);
}
void Character::SetIgnoreWalkbehinds(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
AGS3::Character_SetIgnoreWalkbehinds(chaa, yesOrNo);
}
void Character::GetLoop(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetLoop(chaa);
}
void Character::SetLoop(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, newVal);
AGS3::Character_SetLoop(chaa, newVal);
}
void Character::SetManualScaling(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
AGS3::Character_SetManualScaling(chaa, yesOrNo);
}
void Character::GetMovementLinkedToAnimation(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetMovementLinkedToAnimation(chaa);
}
void Character::SetMovementLinkedToAnimation(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
AGS3::Character_SetMovementLinkedToAnimation(chaa, yesOrNo);
}
void Character::GetMoving(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetMoving(chaa);
}
void Character::GetName(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetName(chaa);
}
void Character::SetName(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, const char *, newName);
AGS3::Character_SetName(chaa, newName);
}
void Character::GetNormalView(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetNormalView(chaa);
}
void Character::GetPreviousRoom(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetPreviousRoom(chaa);
}
void Character::GetRoom(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetRoom(chaa);
}
void Character::GetScaleMoveSpeed(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetScaleMoveSpeed(chaa);
}
void Character::SetScaleMoveSpeed(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
AGS3::Character_SetScaleMoveSpeed(chaa, yesOrNo);
}
void Character::GetScaleVolume(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetScaleVolume(chaa);
}
void Character::SetScaleVolume(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
AGS3::Character_SetScaleVolume(chaa, yesOrNo);
}
void Character::GetScaling(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetScaling(chaa);
}
void Character::SetScaling(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, zoomLevel);
AGS3::Character_SetScaling(chaa, zoomLevel);
}
void Character::GetSolid(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetSolid(chaa);
}
void Character::SetSolid(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
AGS3::Character_SetSolid(chaa, yesOrNo);
}
void Character::GetSpeaking(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetSpeaking(chaa);
}
void Character::GetSpeakingFrame(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetSpeakingFrame(chaa);
}
void Character::GetCharacterSpeechAnimationDelay(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::GetCharacterSpeechAnimationDelay(chaa);
}
void Character::SetSpeechAnimationDelay(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, newDelay);
AGS3::Character_SetSpeechAnimationDelay(chaa, newDelay);
}
void Character::GetSpeechColor(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetSpeechColor(chaa);
}
void Character::SetSpeechColor(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, ncol);
AGS3::Character_SetSpeechColor(chaa, ncol);
}
void Character::GetSpeechView(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetSpeechView(chaa);
}
void Character::SetSpeechView(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, vii);
AGS3::Character_SetSpeechView(chaa, vii);
}
void Character::GetThinkView(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetThinkView(chaa);
}
void Character::SetThinkView(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, vii);
AGS3::Character_SetThinkView(chaa, vii);
}
void Character::GetTransparency(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetTransparency(chaa);
}
void Character::SetTransparency(ScriptMethodParams &params) {
}
void Character::GetTurnBeforeWalking(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetTurnBeforeWalking(chaa);
}
void Character::SetTurnBeforeWalking(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
AGS3::Character_SetTurnBeforeWalking(chaa, yesOrNo);
}
void Character::GetView(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetView(chaa);
}
void Character::GetWalkSpeedX(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetWalkSpeedX(chaa);
}
void Character::GetWalkSpeedY(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetWalkSpeedY(chaa);
}
void Character::GetX(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetX(chaa);
}
void Character::SetX(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, newVal);
AGS3::Character_SetX(chaa, newVal);
}
void Character::GetY(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetY(chaa);
}
void Character::SetY(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, newVal);
AGS3::Character_SetY(chaa, newVal);
}
void Character::GetZ(ScriptMethodParams &params) {
PARAMS1(CharacterInfo *, chaa);
params._result = AGS3::Character_GetZ(chaa);
}
void Character::SetZ(ScriptMethodParams &params) {
PARAMS2(CharacterInfo *, chaa, int, newVal);
AGS3::Character_SetZ(chaa, newVal);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,170 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_CHARACTER_H
#define AGS_PLUGINS_CORE_CHARACTER_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class Character : public ScriptContainer {
BUILT_IN_HASH(Character)
public:
virtual ~Character() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void AddInventory(ScriptMethodParams &params);
void AddWaypoint(ScriptMethodParams &params);
void Animate(ScriptMethodParams &params);
void ChangeRoom(ScriptMethodParams &params);
void ChangeRoomAutoPosition(ScriptMethodParams &params);
void ChangeView(ScriptMethodParams &params);
void FaceCharacter(ScriptMethodParams &params);
void FaceDirection(ScriptMethodParams &params);
void FaceLocation(ScriptMethodParams &params);
void FaceObject(ScriptMethodParams &params);
void FollowCharacter(ScriptMethodParams &params);
void GetProperty(ScriptMethodParams &params);
void GetPropertyText(ScriptMethodParams &params);
void GetTextProperty(ScriptMethodParams &params);
void HasInventory(ScriptMethodParams &params);
void IsCollidingWithChar(ScriptMethodParams &params);
void IsCollidingWithObject(ScriptMethodParams &params);
void LockView(ScriptMethodParams &params);
void LockViewEx(ScriptMethodParams &params);
void LockViewAligned_Old(ScriptMethodParams &params);
void LockViewAlignedEx_Old(ScriptMethodParams &params);
void LockViewAligned(ScriptMethodParams &params);
void LockViewAlignedEx(ScriptMethodParams &params);
void LockViewFrame(ScriptMethodParams &params);
void LockViewFrameEx(ScriptMethodParams &params);
void LockViewOffset(ScriptMethodParams &params);
void LoseInventory(ScriptMethodParams &params);
void Move(ScriptMethodParams &params);
void PlaceOnWalkableArea(ScriptMethodParams &params);
void RemoveTint(ScriptMethodParams &params);
void RunInteraction(ScriptMethodParams &params);
void ScPl_Say(ScriptMethodParams &params);
void SayAt(ScriptMethodParams &params);
void SayBackground(ScriptMethodParams &params);
void SetAsPlayer(ScriptMethodParams &params);
void SetIdleView(ScriptMethodParams &params);
void SetProperty(ScriptMethodParams &params);
void SetTextProperty(ScriptMethodParams &params);
void SetSpeed(ScriptMethodParams &params);
void StopMoving(ScriptMethodParams &params);
void ScPl_Think(ScriptMethodParams &params);
void Tint(ScriptMethodParams &params);
void UnlockView(ScriptMethodParams &params);
void UnlockViewEx(ScriptMethodParams &params);
void Walk(ScriptMethodParams &params);
void WalkStraight(ScriptMethodParams &params);
void GetCharacterAtRoom(ScriptMethodParams &params);
void GetCharacterAtScreen(ScriptMethodParams &params);
void GetActiveInventory(ScriptMethodParams &params);
void SetActiveInventory(ScriptMethodParams &params);
void GetAnimating(ScriptMethodParams &params);
void GetAnimationSpeed(ScriptMethodParams &params);
void SetAnimationSpeed(ScriptMethodParams &params);
void GetBaseline(ScriptMethodParams &params);
void SetBaseline(ScriptMethodParams &params);
void GetBlinkInterval(ScriptMethodParams &params);
void SetBlinkInterval(ScriptMethodParams &params);
void GetBlinkView(ScriptMethodParams &params);
void SetBlinkView(ScriptMethodParams &params);
void GetBlinkWhileThinking(ScriptMethodParams &params);
void SetBlinkWhileThinking(ScriptMethodParams &params);
void GetBlockingHeight(ScriptMethodParams &params);
void SetBlockingHeight(ScriptMethodParams &params);
void GetBlockingWidth(ScriptMethodParams &params);
void SetBlockingWidth(ScriptMethodParams &params);
void GetClickable(ScriptMethodParams &params);
void SetClickable(ScriptMethodParams &params);
void GetDestinationX(ScriptMethodParams &params);
void GetDestinationY(ScriptMethodParams &params);
void GetDiagonalWalking(ScriptMethodParams &params);
void SetDiagonalWalking(ScriptMethodParams &params);
void GetFrame(ScriptMethodParams &params);
void SetFrame(ScriptMethodParams &params);
void GetHasExplicitTint_Old(ScriptMethodParams &params);
void GetHasExplicitTint(ScriptMethodParams &params);
void GetID(ScriptMethodParams &params);
void GetIdleView(ScriptMethodParams &params);
void GetIInventoryQuantity(ScriptMethodParams &params);
void SetIInventoryQuantity(ScriptMethodParams &params);
void GetIgnoreLighting(ScriptMethodParams &params);
void SetIgnoreLighting(ScriptMethodParams &params);
void GetIgnoreScaling(ScriptMethodParams &params);
void SetIgnoreScaling(ScriptMethodParams &params);
void GetIgnoreWalkbehinds(ScriptMethodParams &params);
void SetIgnoreWalkbehinds(ScriptMethodParams &params);
void GetLoop(ScriptMethodParams &params);
void SetLoop(ScriptMethodParams &params);
void SetManualScaling(ScriptMethodParams &params);
void GetMovementLinkedToAnimation(ScriptMethodParams &params);
void SetMovementLinkedToAnimation(ScriptMethodParams &params);
void GetMoving(ScriptMethodParams &params);
void GetName(ScriptMethodParams &params);
void SetName(ScriptMethodParams &params);
void GetNormalView(ScriptMethodParams &params);
void GetPreviousRoom(ScriptMethodParams &params);
void GetRoom(ScriptMethodParams &params);
void GetScaleMoveSpeed(ScriptMethodParams &params);
void SetScaleMoveSpeed(ScriptMethodParams &params);
void GetScaleVolume(ScriptMethodParams &params);
void SetScaleVolume(ScriptMethodParams &params);
void GetScaling(ScriptMethodParams &params);
void SetScaling(ScriptMethodParams &params);
void GetSolid(ScriptMethodParams &params);
void SetSolid(ScriptMethodParams &params);
void GetSpeaking(ScriptMethodParams &params);
void GetSpeakingFrame(ScriptMethodParams &params);
void GetCharacterSpeechAnimationDelay(ScriptMethodParams &params);
void SetSpeechAnimationDelay(ScriptMethodParams &params);
void GetSpeechColor(ScriptMethodParams &params);
void SetSpeechColor(ScriptMethodParams &params);
void GetSpeechView(ScriptMethodParams &params);
void SetSpeechView(ScriptMethodParams &params);
void GetThinkView(ScriptMethodParams &params);
void SetThinkView(ScriptMethodParams &params);
void GetTransparency(ScriptMethodParams &params);
void SetTransparency(ScriptMethodParams &params);
void GetTurnBeforeWalking(ScriptMethodParams &params);
void SetTurnBeforeWalking(ScriptMethodParams &params);
void GetView(ScriptMethodParams &params);
void GetWalkSpeedX(ScriptMethodParams &params);
void GetWalkSpeedY(ScriptMethodParams &params);
void GetX(ScriptMethodParams &params);
void SetX(ScriptMethodParams &params);
void GetY(ScriptMethodParams &params);
void SetY(ScriptMethodParams &params);
void GetZ(ScriptMethodParams &params);
void SetZ(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,64 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/core.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void EngineExports::AGS_EngineStartup(IAGSEngine *engine) {
_audioChannel.AGS_EngineStartup(engine);
_audioClip.AGS_EngineStartup(engine);
_button.AGS_EngineStartup(engine);
_character.AGS_EngineStartup(engine);
_dateTime.AGS_EngineStartup(engine);
_dialog.AGS_EngineStartup(engine);
_dialogOptionsRenderingInfo.AGS_EngineStartup(engine);
_drawingSurface.AGS_EngineStartup(engine);
_dynamicSprite.AGS_EngineStartup(engine);
_file.AGS_EngineStartup(engine);
_game.AGS_EngineStartup(engine);
_globalAPI.AGS_EngineStartup(engine);
_gui.AGS_EngineStartup(engine);
_guiControl.AGS_EngineStartup(engine);
_hotspot.AGS_EngineStartup(engine);
_invWindow.AGS_EngineStartup(engine);
_inventoryItem.AGS_EngineStartup(engine);
_label.AGS_EngineStartup(engine);
_listbox.AGS_EngineStartup(engine);
_math.AGS_EngineStartup(engine);
_mouse.AGS_EngineStartup(engine);
_object.AGS_EngineStartup(engine);
_overlay.AGS_EngineStartup(engine);
_parser.AGS_EngineStartup(engine);
_region.AGS_EngineStartup(engine);
_room.AGS_EngineStartup(engine);
_slider.AGS_EngineStartup(engine);
_string.AGS_EngineStartup(engine);
_system.AGS_EngineStartup(engine);
_textbox.AGS_EngineStartup(engine);
_viewFrame.AGS_EngineStartup(engine);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,103 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_CORE_H
#define AGS_PLUGINS_CORE_CORE_H
#include "ags/plugins/core/audio_channel.h"
#include "ags/plugins/core/audio_clip.h"
#include "ags/plugins/core/button.h"
#include "ags/plugins/core/character.h"
#include "ags/plugins/core/date_time.h"
#include "ags/plugins/core/dialog.h"
#include "ags/plugins/core/dialog_options_rendering_info.h"
#include "ags/plugins/core/drawing_surface.h"
#include "ags/plugins/core/dynamic_sprite.h"
#include "ags/plugins/core/file.h"
#include "ags/plugins/core/game.h"
#include "ags/plugins/core/global_api.h"
#include "ags/plugins/core/gui.h"
#include "ags/plugins/core/gui_control.h"
#include "ags/plugins/core/hotspot.h"
#include "ags/plugins/core/inventory_item.h"
#include "ags/plugins/core/inv_window.h"
#include "ags/plugins/core/label.h"
#include "ags/plugins/core/listbox.h"
#include "ags/plugins/core/maths.h"
#include "ags/plugins/core/mouse.h"
#include "ags/plugins/core/object.h"
#include "ags/plugins/core/overlay.h"
#include "ags/plugins/core/parser.h"
#include "ags/plugins/core/region.h"
#include "ags/plugins/core/room.h"
#include "ags/plugins/core/slider.h"
#include "ags/plugins/core/string.h"
#include "ags/plugins/core/system.h"
#include "ags/plugins/core/textbox.h"
#include "ags/plugins/core/view_frame.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class EngineExports {
private:
AudioChannel _audioChannel;
AudioClip _audioClip;
Button _button;
Character _character;
DateTime _dateTime;
Dialog _dialog;
DialogOptionsRenderingInfo _dialogOptionsRenderingInfo;
DrawingSurface _drawingSurface;
DynamicSprite _dynamicSprite;
File _file;
Game _game;
GlobalAPI _globalAPI;
GUI _gui;
GUIControl _guiControl;
Hotspot _hotspot;
InvWindow _invWindow;
InventoryItem _inventoryItem;
Label _label;
ListBox _listbox;
Maths _math;
Mouse _mouse;
Object _object;
Overlay _overlay;
Parser _parser;
Region _region;
Room _room;
Slider _slider;
String _string;
System _system;
Textbox _textbox;
ViewFrame _viewFrame;
public:
void AGS_EngineStartup(IAGSEngine *engine);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,83 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/date_time.h"
#include "ags/engine/ac/date_time.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void DateTime::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(DateTime::get_Now, DateTime::Now);
SCRIPT_METHOD(DateTime::get_DayOfMonth, DateTime::GetDayOfMonth);
SCRIPT_METHOD(DateTime::get_Hour, DateTime::GetHour);
SCRIPT_METHOD(DateTime::get_Minute, DateTime::GetMinute);
SCRIPT_METHOD(DateTime::get_Month, DateTime::GetMonth);
SCRIPT_METHOD(DateTime::get_RawTime, DateTime::GetRawTime);
SCRIPT_METHOD(DateTime::get_Second, DateTime::GetSecond);
SCRIPT_METHOD(DateTime::get_Year, DateTime::GetYear);
}
void DateTime::Now(ScriptMethodParams &params) {
params._result = AGS3::DateTime_Now();
}
void DateTime::GetDayOfMonth(ScriptMethodParams &params) {
PARAMS1(ScriptDateTime *, sdt);
params._result = AGS3::DateTime_GetDayOfMonth(sdt);
}
void DateTime::GetHour(ScriptMethodParams &params) {
PARAMS1(ScriptDateTime *, sdt);
params._result = AGS3::DateTime_GetHour(sdt);
}
void DateTime::GetMinute(ScriptMethodParams &params) {
PARAMS1(ScriptDateTime *, sdt);
params._result = AGS3::DateTime_GetMinute(sdt);
}
void DateTime::GetMonth(ScriptMethodParams &params) {
PARAMS1(ScriptDateTime *, sdt);
params._result = AGS3::DateTime_GetMonth(sdt);
}
void DateTime::GetRawTime(ScriptMethodParams &params) {
PARAMS1(ScriptDateTime *, sdt);
params._result = AGS3::DateTime_GetRawTime(sdt);
}
void DateTime::GetSecond(ScriptMethodParams &params) {
PARAMS1(ScriptDateTime *, sdt);
params._result = AGS3::DateTime_GetSecond(sdt);
}
void DateTime::GetYear(ScriptMethodParams &params) {
PARAMS1(ScriptDateTime *, sdt);
params._result = AGS3::DateTime_GetYear(sdt);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,51 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_DATE_TIME_H
#define AGS_PLUGINS_CORE_DATE_TIME_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class DateTime : public ScriptContainer {
BUILT_IN_HASH(DateTime)
public:
virtual ~DateTime() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void Now(ScriptMethodParams &params);
void GetDayOfMonth(ScriptMethodParams &params);
void GetHour(ScriptMethodParams &params);
void GetMinute(ScriptMethodParams &params);
void GetMonth(ScriptMethodParams &params);
void GetRawTime(ScriptMethodParams &params);
void GetSecond(ScriptMethodParams &params);
void GetYear(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,90 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/dialog.h"
#include "ags/engine/ac/dialog.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void Dialog::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(Dialog::get_ID, Dialog::GetID);
SCRIPT_METHOD(Dialog::get_OptionCount, Dialog::GetOptionCount);
SCRIPT_METHOD(Dialog::get_ShowTextParser, Dialog::GetShowTextParser);
SCRIPT_METHOD(Dialog::DisplayOptions^1, Dialog::DisplayOptions);
SCRIPT_METHOD(Dialog::GetOptionState^1, Dialog::GetOptionState);
SCRIPT_METHOD(Dialog::GetOptionText^1, Dialog::GetOptionText);
SCRIPT_METHOD(Dialog::HasOptionBeenChosen^1, Dialog::HasOptionBeenChosen);
SCRIPT_METHOD(Dialog::SetOptionState^2, Dialog::SetOptionState);
SCRIPT_METHOD(Dialog::Start^0, Dialog::Start);
}
void Dialog::GetID(ScriptMethodParams &params) {
PARAMS1(ScriptDialog *, sd);
params._result = AGS3::Dialog_GetID(sd);
}
void Dialog::GetOptionCount(ScriptMethodParams &params) {
PARAMS1(ScriptDialog *, sd);
params._result = AGS3::Dialog_GetOptionCount(sd);
}
void Dialog::GetShowTextParser(ScriptMethodParams &params) {
PARAMS1(ScriptDialog *, sd);
params._result = AGS3::Dialog_GetShowTextParser(sd);
}
void Dialog::DisplayOptions(ScriptMethodParams &params) {
PARAMS2(ScriptDialog *, sd, int, sayChosenOption);
params._result = AGS3::Dialog_DisplayOptions(sd, sayChosenOption);
}
void Dialog::GetOptionState(ScriptMethodParams &params) {
PARAMS2(ScriptDialog *, sd, int, option);
params._result = AGS3::Dialog_GetOptionState(sd, option);
}
void Dialog::GetOptionText(ScriptMethodParams &params) {
PARAMS2(ScriptDialog *, sd, int, option);
params._result = AGS3::Dialog_GetOptionText(sd, option);
}
void Dialog::HasOptionBeenChosen(ScriptMethodParams &params) {
PARAMS2(ScriptDialog *, sd, int, option);
params._result = AGS3::Dialog_HasOptionBeenChosen(sd, option);
}
void Dialog::SetOptionState(ScriptMethodParams &params) {
PARAMS3(ScriptDialog *, sd, int, option, int, newState);
AGS3::Dialog_SetOptionState(sd, option, newState);
}
void Dialog::Start(ScriptMethodParams &params) {
PARAMS1(ScriptDialog *, sd);
AGS3::Dialog_Start(sd);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,52 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_DIALOG_H
#define AGS_PLUGINS_CORE_DIALOG_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class Dialog : public ScriptContainer {
BUILT_IN_HASH(Dialog)
public:
virtual ~Dialog() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void GetID(ScriptMethodParams &params);
void GetOptionCount(ScriptMethodParams &params);
void GetShowTextParser(ScriptMethodParams &params);
void DisplayOptions(ScriptMethodParams &params);
void GetOptionState(ScriptMethodParams &params);
void GetOptionText(ScriptMethodParams &params);
void HasOptionBeenChosen(ScriptMethodParams &params);
void SetOptionState(ScriptMethodParams &params);
void Start(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,144 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/dialog_options_rendering_info.h"
#include "ags/engine/ac/dialog_options_rendering.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void DialogOptionsRenderingInfo::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(DialogOptionsRenderingInfo::get_ActiveOptionID, DialogOptionsRenderingInfo::GetActiveOptionID);
SCRIPT_METHOD(DialogOptionsRenderingInfo::set_ActiveOptionID, DialogOptionsRenderingInfo::SetActiveOptionID);
SCRIPT_METHOD(DialogOptionsRenderingInfo::get_DialogToRender, DialogOptionsRenderingInfo::GetDialogToRender);
SCRIPT_METHOD(DialogOptionsRenderingInfo::get_Height, DialogOptionsRenderingInfo::GetHeight);
SCRIPT_METHOD(DialogOptionsRenderingInfo::set_Height, DialogOptionsRenderingInfo::SetHeight);
SCRIPT_METHOD(DialogOptionsRenderingInfo::get_ParserTextBoxX, DialogOptionsRenderingInfo::GetParserTextboxX);
SCRIPT_METHOD(DialogOptionsRenderingInfo::set_ParserTextBoxX, DialogOptionsRenderingInfo::SetParserTextboxX);
SCRIPT_METHOD(DialogOptionsRenderingInfo::get_ParserTextBoxY, DialogOptionsRenderingInfo::GetParserTextboxY);
SCRIPT_METHOD(DialogOptionsRenderingInfo::set_ParserTextBoxY, DialogOptionsRenderingInfo::SetParserTextboxY);
SCRIPT_METHOD(DialogOptionsRenderingInfo::get_ParserTextBoxWidth, DialogOptionsRenderingInfo::GetParserTextboxWidth);
SCRIPT_METHOD(DialogOptionsRenderingInfo::set_ParserTextBoxWidth, DialogOptionsRenderingInfo::SetParserTextboxWidth);
SCRIPT_METHOD(DialogOptionsRenderingInfo::get_Surface, DialogOptionsRenderingInfo::GetSurface);
SCRIPT_METHOD(DialogOptionsRenderingInfo::get_Width, DialogOptionsRenderingInfo::GetWidth);
SCRIPT_METHOD(DialogOptionsRenderingInfo::set_Width, DialogOptionsRenderingInfo::SetWidth);
SCRIPT_METHOD(DialogOptionsRenderingInfo::get_X, DialogOptionsRenderingInfo::GetX);
SCRIPT_METHOD(DialogOptionsRenderingInfo::set_X, DialogOptionsRenderingInfo::SetX);
SCRIPT_METHOD(DialogOptionsRenderingInfo::get_Y, DialogOptionsRenderingInfo::GetY);
SCRIPT_METHOD(DialogOptionsRenderingInfo::set_Y, DialogOptionsRenderingInfo::SetY);
}
void DialogOptionsRenderingInfo::GetActiveOptionID(ScriptMethodParams &params) {
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
params._result = AGS3::DialogOptionsRendering_GetActiveOptionID(dlgOptRender);
}
void DialogOptionsRenderingInfo::SetActiveOptionID(ScriptMethodParams &params) {
PARAMS2(ScriptDialogOptionsRendering *, dlgOptRender, int, activeOptionID);
AGS3::DialogOptionsRendering_SetActiveOptionID(dlgOptRender, activeOptionID);
}
void DialogOptionsRenderingInfo::GetDialogToRender(ScriptMethodParams &params) {
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
params._result = AGS3::DialogOptionsRendering_GetDialogToRender(dlgOptRender);
}
void DialogOptionsRenderingInfo::GetHeight(ScriptMethodParams &params) {
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
params._result = AGS3::DialogOptionsRendering_GetHeight(dlgOptRender);
}
void DialogOptionsRenderingInfo::SetHeight(ScriptMethodParams &params) {
PARAMS2(ScriptDialogOptionsRendering *, dlgOptRender, int, newHeight);
AGS3::DialogOptionsRendering_SetHeight(dlgOptRender, newHeight);
}
void DialogOptionsRenderingInfo::GetParserTextboxX(ScriptMethodParams &params) {
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
params._result = AGS3::DialogOptionsRendering_GetParserTextboxX(dlgOptRender);
}
void DialogOptionsRenderingInfo::SetParserTextboxX(ScriptMethodParams &params) {
PARAMS2(ScriptDialogOptionsRendering *, dlgOptRender, int, newX);
AGS3::DialogOptionsRendering_SetParserTextboxX(dlgOptRender, newX);
}
void DialogOptionsRenderingInfo::GetParserTextboxY(ScriptMethodParams &params) {
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
params._result = AGS3::DialogOptionsRendering_GetParserTextboxY(dlgOptRender);
}
void DialogOptionsRenderingInfo::SetParserTextboxY(ScriptMethodParams &params) {
PARAMS2(ScriptDialogOptionsRendering *, dlgOptRender, int, newY);
AGS3::DialogOptionsRendering_SetParserTextboxY(dlgOptRender, newY);
}
void DialogOptionsRenderingInfo::GetParserTextboxWidth(ScriptMethodParams &params) {
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
params._result = AGS3::DialogOptionsRendering_GetParserTextboxWidth(dlgOptRender);
}
void DialogOptionsRenderingInfo::SetParserTextboxWidth(ScriptMethodParams &params) {
PARAMS2(ScriptDialogOptionsRendering *, dlgOptRender, int, newWidth);
AGS3::DialogOptionsRendering_SetParserTextboxWidth(dlgOptRender, newWidth);
}
void DialogOptionsRenderingInfo::GetSurface(ScriptMethodParams &params) {
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
params._result = AGS3::DialogOptionsRendering_GetSurface(dlgOptRender);
}
void DialogOptionsRenderingInfo::GetWidth(ScriptMethodParams &params) {
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
params._result = AGS3::DialogOptionsRendering_GetWidth(dlgOptRender);
}
void DialogOptionsRenderingInfo::SetWidth(ScriptMethodParams &params) {
PARAMS2(ScriptDialogOptionsRendering *, dlgOptRender, int, newWidth);
AGS3::DialogOptionsRendering_SetWidth(dlgOptRender, newWidth);
}
void DialogOptionsRenderingInfo::GetX(ScriptMethodParams &params) {
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
params._result = AGS3::DialogOptionsRendering_GetX(dlgOptRender);
}
void DialogOptionsRenderingInfo::SetX(ScriptMethodParams &params) {
PARAMS2(ScriptDialogOptionsRendering *, dlgOptRender, int, newX);
AGS3::DialogOptionsRendering_SetX(dlgOptRender, newX);
}
void DialogOptionsRenderingInfo::GetY(ScriptMethodParams &params) {
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
params._result = AGS3::DialogOptionsRendering_GetY(dlgOptRender);
}
void DialogOptionsRenderingInfo::SetY(ScriptMethodParams &params) {
PARAMS2(ScriptDialogOptionsRendering *, dlgOptRender, int, newY);
AGS3::DialogOptionsRendering_SetY(dlgOptRender, newY);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,61 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_DIALOG_OPTIONS_RENDERING_INFO_H
#define AGS_PLUGINS_CORE_DIALOG_OPTIONS_RENDERING_INFO_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class DialogOptionsRenderingInfo : public ScriptContainer {
BUILT_IN_HASH(DialogOptionsRenderingInfo)
public:
virtual ~DialogOptionsRenderingInfo() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void GetActiveOptionID(ScriptMethodParams &params);
void SetActiveOptionID(ScriptMethodParams &params);
void GetDialogToRender(ScriptMethodParams &params);
void GetHeight(ScriptMethodParams &params);
void SetHeight(ScriptMethodParams &params);
void GetParserTextboxX(ScriptMethodParams &params);
void SetParserTextboxX(ScriptMethodParams &params);
void GetParserTextboxY(ScriptMethodParams &params);
void SetParserTextboxY(ScriptMethodParams &params);
void GetParserTextboxWidth(ScriptMethodParams &params);
void SetParserTextboxWidth(ScriptMethodParams &params);
void GetSurface(ScriptMethodParams &params);
void GetWidth(ScriptMethodParams &params);
void SetWidth(ScriptMethodParams &params);
void GetX(ScriptMethodParams &params);
void SetX(ScriptMethodParams &params);
void GetY(ScriptMethodParams &params);
void SetY(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,169 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/drawing_surface.h"
#include "ags/shared/ac/game_struct_defines.h"
#include "ags/engine/ac/drawing_surface.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void DrawingSurface::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(DrawingSurface::Clear^1, DrawingSurface::Clear);
SCRIPT_METHOD(DrawingSurface::CreateCopy^0, DrawingSurface::CreateCopy);
SCRIPT_METHOD(DrawingSurface::DrawCircle^3, DrawingSurface::DrawCircle);
SCRIPT_METHOD(DrawingSurface::DrawImage^6, DrawingSurface::DrawImage);
SCRIPT_METHOD(DrawingSurface::DrawLine^5, DrawingSurface::DrawLine);
SCRIPT_METHOD(DrawingSurface::DrawMessageWrapped^5, DrawingSurface::DrawMessageWrapped);
SCRIPT_METHOD(DrawingSurface::DrawPixel^2, DrawingSurface::DrawPixel);
SCRIPT_METHOD(DrawingSurface::DrawRectangle^4, DrawingSurface::DrawRectangle);
SCRIPT_METHOD(DrawingSurface::DrawString^104, DrawingSurface::ScPl_DrawString);
if (engine->version < kScriptAPI_v350)
SCRIPT_METHOD(DrawingSurface::DrawStringWrapped^6, DrawingSurface::DrawStringWrapped_Old);
else
SCRIPT_METHOD(DrawingSurface::DrawStringWrapped^6, DrawingSurface::DrawStringWrapped);
SCRIPT_METHOD(DrawingSurface::DrawSurface^2, DrawingSurface::DrawSurface);
SCRIPT_METHOD(DrawingSurface::DrawTriangle^6, DrawingSurface::DrawTriangle);
SCRIPT_METHOD(DrawingSurface::GetPixel^2, DrawingSurface::GetPixel);
SCRIPT_METHOD(DrawingSurface::Release^0, DrawingSurface::Release);
SCRIPT_METHOD(DrawingSurface::get_DrawingColor, DrawingSurface::GetDrawingColor);
SCRIPT_METHOD(DrawingSurface::set_DrawingColor, DrawingSurface::SetDrawingColor);
SCRIPT_METHOD(DrawingSurface::get_Height, DrawingSurface::GetHeight);
SCRIPT_METHOD(DrawingSurface::get_UseHighResCoordinates, DrawingSurface::GetUseHighResCoordinates);
SCRIPT_METHOD(DrawingSurface::set_UseHighResCoordinates, DrawingSurface::SetUseHighResCoordinates);
SCRIPT_METHOD(DrawingSurface::get_Width, DrawingSurface::GetWidth);
}
void DrawingSurface::Clear(ScriptMethodParams &params) {
PARAMS2(ScriptDrawingSurface *, sds, int, colour);
AGS3::DrawingSurface_Clear(sds, colour);
}
void DrawingSurface::CreateCopy(ScriptMethodParams &params) {
PARAMS1(ScriptDrawingSurface *, sds);
params._result = AGS3::DrawingSurface_CreateCopy(sds);
}
void DrawingSurface::DrawCircle(ScriptMethodParams &params) {
PARAMS4(ScriptDrawingSurface *, sds, int, x, int, y, int, radius);
AGS3::DrawingSurface_DrawCircle(sds, x, y, radius);
}
void DrawingSurface::DrawImage(ScriptMethodParams &params) {
PARAMS7(ScriptDrawingSurface *, sds, int, xx, int, yy, int, slot, int, trans, int, width, int, height);
AGS3::DrawingSurface_DrawImage6(sds, xx, yy, slot, trans, width, height);
}
void DrawingSurface::DrawLine(ScriptMethodParams &params) {
PARAMS6(ScriptDrawingSurface *, sds, int, fromx, int, fromy, int, tox, int, toy, int, thickness);
AGS3::DrawingSurface_DrawLine(sds, fromx, fromy, tox, toy, thickness);
}
void DrawingSurface::DrawMessageWrapped(ScriptMethodParams &params) {
PARAMS6(ScriptDrawingSurface *, sds, int, xx, int, yy, int, wid, int, font, int, msgm);
AGS3::DrawingSurface_DrawMessageWrapped(sds, xx, yy, wid, font, msgm);
}
void DrawingSurface::DrawPixel(ScriptMethodParams &params) {
PARAMS3(ScriptDrawingSurface *, sds, int, x, int, y);
AGS3::DrawingSurface_DrawPixel(sds, x, y);
}
void DrawingSurface::DrawRectangle(ScriptMethodParams &params) {
PARAMS5(ScriptDrawingSurface *, sds, int, x1, int, y1, int, x2, int, y2);
AGS3::DrawingSurface_DrawRectangle(sds, x1, y1, x2, y2);
}
void DrawingSurface::ScPl_DrawString(ScriptMethodParams &params) {
PARAMS4(ScriptDrawingSurface *, sds, int, xx, int, yy, int, font);
Common::String buf = params.format(4);
AGS3::DrawingSurface_DrawString(sds, xx, yy, font, buf.c_str());
}
void DrawingSurface::DrawStringWrapped_Old(ScriptMethodParams &params) {
PARAMS7(ScriptDrawingSurface *, sds, int, xx, int, yy, int, wid, int, font, int, alignment, const char *, msg);
AGS3::DrawingSurface_DrawStringWrapped_Old(sds, xx, yy, wid, font, alignment, msg);
}
void DrawingSurface::DrawStringWrapped(ScriptMethodParams &params) {
PARAMS7(ScriptDrawingSurface *, sds, int, xx, int, yy, int, wid, int, font, int, alignment, const char *, msg);
AGS3::DrawingSurface_DrawStringWrapped(sds, xx, yy, wid, font, alignment, msg);
}
void DrawingSurface::DrawSurface(ScriptMethodParams &params) {
PARAMS3(ScriptDrawingSurface *, target, ScriptDrawingSurface *, source, int, translev);
AGS3::DrawingSurface_DrawSurface2(target, source, translev);
}
void DrawingSurface::DrawTriangle(ScriptMethodParams &params) {
PARAMS7(ScriptDrawingSurface *, sds, int, x1, int, y1, int, x2, int, y2, int, x3, int, y3);
AGS3::DrawingSurface_DrawTriangle(sds, x1, y1, x2, y2, x3, y3);
}
void DrawingSurface::GetPixel(ScriptMethodParams &params) {
PARAMS3(ScriptDrawingSurface *, sds, int, x, int, y);
params._result = AGS3::DrawingSurface_GetPixel(sds, x, y);
}
void DrawingSurface::Release(ScriptMethodParams &params) {
PARAMS1(ScriptDrawingSurface *, sds);
AGS3::DrawingSurface_Release(sds);
}
void DrawingSurface::GetDrawingColor(ScriptMethodParams &params) {
PARAMS1(ScriptDrawingSurface *, sds);
params._result = AGS3::DrawingSurface_GetDrawingColor(sds);
}
void DrawingSurface::SetDrawingColor(ScriptMethodParams &params) {
PARAMS2(ScriptDrawingSurface *, sds, int, newColour);
AGS3::DrawingSurface_SetDrawingColor(sds, newColour);
}
void DrawingSurface::GetHeight(ScriptMethodParams &params) {
PARAMS1(ScriptDrawingSurface *, sds);
params._result = AGS3::DrawingSurface_GetHeight(sds);
}
void DrawingSurface::GetUseHighResCoordinates(ScriptMethodParams &params) {
PARAMS1(ScriptDrawingSurface *, sds);
params._result = AGS3::DrawingSurface_GetUseHighResCoordinates(sds);
}
void DrawingSurface::SetUseHighResCoordinates(ScriptMethodParams &params) {
PARAMS2(ScriptDrawingSurface *, sds, int, highRes);
AGS3::DrawingSurface_SetUseHighResCoordinates(sds, highRes);
}
void DrawingSurface::GetWidth(ScriptMethodParams &params) {
PARAMS1(ScriptDrawingSurface *, sds);
params._result = AGS3::DrawingSurface_GetWidth(sds);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,64 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_DRAWING_SURFACE_H
#define AGS_PLUGINS_CORE_DRAWING_SURFACE_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class DrawingSurface : public ScriptContainer {
BUILT_IN_HASH(DrawingSurface)
public:
virtual ~DrawingSurface() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void Clear(ScriptMethodParams &params);
void CreateCopy(ScriptMethodParams &params);
void DrawCircle(ScriptMethodParams &params);
void DrawImage(ScriptMethodParams &params);
void DrawLine(ScriptMethodParams &params);
void DrawMessageWrapped(ScriptMethodParams &params);
void DrawPixel(ScriptMethodParams &params);
void DrawRectangle(ScriptMethodParams &params);
void ScPl_DrawString(ScriptMethodParams &params);
void DrawStringWrapped_Old(ScriptMethodParams &params);
void DrawStringWrapped(ScriptMethodParams &params);
void DrawSurface(ScriptMethodParams &params);
void DrawTriangle(ScriptMethodParams &params);
void GetPixel(ScriptMethodParams &params);
void Release(ScriptMethodParams &params);
void GetDrawingColor(ScriptMethodParams &params);
void SetDrawingColor(ScriptMethodParams &params);
void GetHeight(ScriptMethodParams &params);
void GetUseHighResCoordinates(ScriptMethodParams &params);
void SetUseHighResCoordinates(ScriptMethodParams &params);
void GetWidth(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,168 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/dynamic_sprite.h"
#include "ags/engine/ac/dynamic_sprite.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void DynamicSprite::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(DynamicSprite::ChangeCanvasSize^4, DynamicSprite::ChangeCanvasSize);
SCRIPT_METHOD(DynamicSprite::CopyTransparencyMask^1, DynamicSprite::CopyTransparencyMask);
SCRIPT_METHOD(DynamicSprite::Crop^4, DynamicSprite::Crop);
SCRIPT_METHOD(DynamicSprite::Delete, DynamicSprite::Delete);
SCRIPT_METHOD(DynamicSprite::Flip^1, DynamicSprite::Flip);
SCRIPT_METHOD(DynamicSprite::GetDrawingSurface^0, DynamicSprite::GetDrawingSurface);
SCRIPT_METHOD(DynamicSprite::Resize^2, DynamicSprite::Resize);
SCRIPT_METHOD(DynamicSprite::Rotate^3, DynamicSprite::Rotate);
SCRIPT_METHOD(DynamicSprite::SaveToFile^1, DynamicSprite::SaveToFile);
SCRIPT_METHOD(DynamicSprite::Tint^5, DynamicSprite::Tint);
SCRIPT_METHOD(DynamicSprite::get_ColorDepth, DynamicSprite::GetColorDepth);
SCRIPT_METHOD(DynamicSprite::get_Graphic, DynamicSprite::GetGraphic);
SCRIPT_METHOD(DynamicSprite::get_Height, DynamicSprite::GetHeight);
SCRIPT_METHOD(DynamicSprite::get_Width, DynamicSprite::GetWidth);
SCRIPT_METHOD(DynamicSprite::Create^3, DynamicSprite::Create);
SCRIPT_METHOD(DynamicSprite::CreateFromBackground, DynamicSprite::CreateFromBackground);
SCRIPT_METHOD(DynamicSprite::CreateFromDrawingSurface^5, DynamicSprite::CreateFromDrawingSurface);
SCRIPT_METHOD(DynamicSprite::CreateFromExistingSprite^1, DynamicSprite::CreateFromExistingSprite_Old);
SCRIPT_METHOD(DynamicSprite::CreateFromExistingSprite^2, DynamicSprite::CreateFromExistingSprite);
SCRIPT_METHOD(DynamicSprite::CreateFromFile, DynamicSprite::CreateFromFile);
SCRIPT_METHOD(DynamicSprite::CreateFromSaveGame, DynamicSprite::CreateFromSaveGame);
SCRIPT_METHOD(DynamicSprite::CreateFromScreenShot, DynamicSprite::CreateFromScreenShot);
}
void DynamicSprite::ChangeCanvasSize(ScriptMethodParams &params) {
PARAMS5(ScriptDynamicSprite *, sds, int, width, int, height, int, x, int, y);
AGS3::DynamicSprite_ChangeCanvasSize(sds, width, height, x, y);
}
void DynamicSprite::CopyTransparencyMask(ScriptMethodParams &params) {
PARAMS2(ScriptDynamicSprite *, sds, int, sourceSprite);
AGS3::DynamicSprite_CopyTransparencyMask(sds, sourceSprite);
}
void DynamicSprite::Crop(ScriptMethodParams &params) {
PARAMS5(ScriptDynamicSprite *, sds, int, x1, int, y1, int, width, int, height);
AGS3::DynamicSprite_Crop(sds, x1, y1, width, height);
}
void DynamicSprite::Delete(ScriptMethodParams &params) {
PARAMS1(ScriptDynamicSprite *, sds);
AGS3::DynamicSprite_Delete(sds);
}
void DynamicSprite::Flip(ScriptMethodParams &params) {
PARAMS2(ScriptDynamicSprite *, sds, int, direction);
AGS3::DynamicSprite_Flip(sds, direction);
}
void DynamicSprite::GetDrawingSurface(ScriptMethodParams &params) {
PARAMS1(ScriptDynamicSprite *, dss);
params._result = AGS3::DynamicSprite_GetDrawingSurface(dss);
}
void DynamicSprite::Resize(ScriptMethodParams &params) {
PARAMS3(ScriptDynamicSprite *, sds, int, width, int, height);
AGS3::DynamicSprite_Resize(sds, width, height);
}
void DynamicSprite::Rotate(ScriptMethodParams &params) {
PARAMS4(ScriptDynamicSprite *, sds, int, angle, int, width, int, height);
AGS3::DynamicSprite_Rotate(sds, angle, width, height);
}
void DynamicSprite::SaveToFile(ScriptMethodParams &params) {
PARAMS2(ScriptDynamicSprite *, sds, const char *, namm);
params._result = AGS3::DynamicSprite_SaveToFile(sds, namm);
}
void DynamicSprite::Tint(ScriptMethodParams &params) {
PARAMS6(ScriptDynamicSprite *, sds, int, red, int, green, int, blue, int, saturation, int, luminance);
AGS3::DynamicSprite_Tint(sds, red, green, blue, saturation, luminance);
}
void DynamicSprite::GetColorDepth(ScriptMethodParams &params) {
PARAMS1(ScriptDynamicSprite *, sds);
params._result = AGS3::DynamicSprite_GetColorDepth(sds);
}
void DynamicSprite::GetGraphic(ScriptMethodParams &params) {
PARAMS1(ScriptDynamicSprite *, sds);
params._result = AGS3::DynamicSprite_GetGraphic(sds);
}
void DynamicSprite::GetHeight(ScriptMethodParams &params) {
PARAMS1(ScriptDynamicSprite *, sds);
params._result = AGS3::DynamicSprite_GetHeight(sds);
}
void DynamicSprite::GetWidth(ScriptMethodParams &params) {
PARAMS1(ScriptDynamicSprite *, sds);
params._result = AGS3::DynamicSprite_GetWidth(sds);
}
void DynamicSprite::Create(ScriptMethodParams &params) {
PARAMS3(int, width, int, height, int, alphaChannel);
params._result = AGS3::DynamicSprite_Create(width, height, alphaChannel);
}
void DynamicSprite::CreateFromBackground(ScriptMethodParams &params) {
PARAMS5(int, frame, int, x1, int, y1, int, width, int, height);
params._result = AGS3::DynamicSprite_CreateFromBackground(frame, x1, y1, width, height);
}
void DynamicSprite::CreateFromDrawingSurface(ScriptMethodParams &params) {
PARAMS5(ScriptDrawingSurface *, sds, int, x, int, y, int, width, int, height);
params._result = AGS3::DynamicSprite_CreateFromDrawingSurface(sds, x, y, width, height);
}
void DynamicSprite::CreateFromExistingSprite_Old(ScriptMethodParams &params) {
PARAMS1(int, slot);
params._result = AGS3::DynamicSprite_CreateFromExistingSprite_Old(slot);
}
void DynamicSprite::CreateFromExistingSprite(ScriptMethodParams &params) {
PARAMS2(int, slot, int, preserveAlphaChannel);
params._result = AGS3::DynamicSprite_CreateFromExistingSprite(slot, preserveAlphaChannel);
}
void DynamicSprite::CreateFromFile(ScriptMethodParams &params) {
PARAMS1(const char *, filename);
params._result = AGS3::DynamicSprite_CreateFromFile(filename);
}
void DynamicSprite::CreateFromSaveGame(ScriptMethodParams &params) {
PARAMS3(int, sgslot, int, width, int, height);
params._result = AGS3::DynamicSprite_CreateFromSaveGame(sgslot, width, height);
}
void DynamicSprite::CreateFromScreenShot(ScriptMethodParams &params) {
PARAMS2(int, width, int, height);
params._result = AGS3::DynamicSprite_CreateFromScreenShot(width, height);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,65 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_DYNAMIC_SPRITE_H
#define AGS_PLUGINS_CORE_DYNAMIC_SPRITE_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class DynamicSprite : public ScriptContainer {
BUILT_IN_HASH(DynamicSprite)
public:
virtual ~DynamicSprite() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void ChangeCanvasSize(ScriptMethodParams &params);
void CopyTransparencyMask(ScriptMethodParams &params);
void Crop(ScriptMethodParams &params);
void Delete(ScriptMethodParams &params);
void Flip(ScriptMethodParams &params);
void GetDrawingSurface(ScriptMethodParams &params);
void Resize(ScriptMethodParams &params);
void Rotate(ScriptMethodParams &params);
void SaveToFile(ScriptMethodParams &params);
void Tint(ScriptMethodParams &params);
void GetColorDepth(ScriptMethodParams &params);
void GetGraphic(ScriptMethodParams &params);
void GetHeight(ScriptMethodParams &params);
void GetWidth(ScriptMethodParams &params);
void Create(ScriptMethodParams &params);
void CreateFromBackground(ScriptMethodParams &params);
void CreateFromDrawingSurface(ScriptMethodParams &params);
void CreateFromExistingSprite_Old(ScriptMethodParams &params);
void CreateFromExistingSprite(ScriptMethodParams &params);
void CreateFromFile(ScriptMethodParams &params);
void CreateFromSaveGame(ScriptMethodParams &params);
void CreateFromScreenShot(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,138 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/file.h"
#include "ags/engine/ac/file.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void File::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(File::Delete^1, File::Delete);
SCRIPT_METHOD(File::Exists^1, File::Exists);
SCRIPT_METHOD(File::Open^2, File::OpenFile);
SCRIPT_METHOD(File::Close^0, File::Close);
SCRIPT_METHOD(File::ReadInt^0, File::ReadInt);
SCRIPT_METHOD(File::ReadRawChar^0, File::ReadRawChar);
SCRIPT_METHOD(File::ReadRawInt^0, File::ReadRawInt);
SCRIPT_METHOD(File::ReadRawLine^1, File::ReadRawLine);
SCRIPT_METHOD(File::ReadRawLineBack^0, File::ReadRawLineBack);
SCRIPT_METHOD(File::ReadString^1, File::ReadString);
SCRIPT_METHOD(File::ReadStringBack^0, File::ReadStringBack);
SCRIPT_METHOD(File::WriteInt^1, File::WriteInt);
SCRIPT_METHOD(File::WriteRawChar^1, File::WriteRawChar);
SCRIPT_METHOD(File::WriteRawLine^1, File::WriteRawLine);
SCRIPT_METHOD(File::WriteString^1, File::WriteString);
SCRIPT_METHOD(File::get_EOF, File::GetEOF);
SCRIPT_METHOD(File::get_Error, File::GetError);
}
void File::Delete(ScriptMethodParams &params) {
PARAMS1(const char *, fnmm);
params._result = AGS3::File_Delete(fnmm);
}
void File::Exists(ScriptMethodParams &params) {
PARAMS1(const char *, fnmm);
params._result = AGS3::File_Exists(fnmm);
}
void File::OpenFile(ScriptMethodParams &params) {
PARAMS2(const char *, fnmm, int, mode);
params._result = AGS3::sc_OpenFile(fnmm, mode);
}
void File::Close(ScriptMethodParams &params) {
PARAMS1(sc_File *, fil);
AGS3::File_Close(fil);
}
void File::ReadInt(ScriptMethodParams &params) {
PARAMS1(sc_File *, fil);
params._result = AGS3::File_ReadInt(fil);
}
void File::ReadRawChar(ScriptMethodParams &params) {
PARAMS1(sc_File *, fil);
params._result = AGS3::File_ReadRawChar(fil);
}
void File::ReadRawInt(ScriptMethodParams &params) {
PARAMS1(sc_File *, fil);
params._result = AGS3::File_ReadRawInt(fil);
}
void File::ReadRawLine(ScriptMethodParams &params) {
PARAMS2(sc_File *, fil, char *, buffer);
AGS3::File_ReadRawLine(fil, buffer);
}
void File::ReadRawLineBack(ScriptMethodParams &params) {
PARAMS1(sc_File *, fil);
params._result = AGS3::File_ReadRawLineBack(fil);
}
void File::ReadString(ScriptMethodParams &params) {
PARAMS1(sc_File *, fil);
params._result = AGS3::File_ReadInt(fil);
}
void File::ReadStringBack(ScriptMethodParams &params) {
PARAMS1(sc_File *, fil);
params._result = AGS3::File_ReadStringBack(fil);
}
void File::WriteInt(ScriptMethodParams &params) {
PARAMS2(sc_File *, fil, int, towrite);
AGS3::File_WriteInt(fil, towrite);
}
void File::WriteRawChar(ScriptMethodParams &params) {
PARAMS2(sc_File *, fil, int, towrite);
AGS3::File_WriteRawChar(fil, towrite);
}
void File::WriteRawLine(ScriptMethodParams &params) {
PARAMS2(sc_File *, fil, const char *, toWrite);
AGS3::File_WriteRawLine(fil, toWrite);
}
void File::WriteString(ScriptMethodParams &params) {
PARAMS2(sc_File *, fil, const char *, toWrite);
AGS3::File_WriteString(fil, toWrite);
}
void File::GetEOF(ScriptMethodParams &params) {
PARAMS1(sc_File *, fil);
params._result = AGS3::File_GetEOF(fil);
}
void File::GetError(ScriptMethodParams &params) {
PARAMS1(sc_File *, fil);
params._result = AGS3::File_GetError(fil);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,60 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_FILE_H
#define AGS_PLUGINS_CORE_FILE_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class File : public ScriptContainer {
BUILT_IN_HASH(File)
public:
virtual ~File() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void Delete(ScriptMethodParams &params);
void Exists(ScriptMethodParams &params);
void OpenFile(ScriptMethodParams &params);
void Close(ScriptMethodParams &params);
void ReadInt(ScriptMethodParams &params);
void ReadRawChar(ScriptMethodParams &params);
void ReadRawInt(ScriptMethodParams &params);
void ReadRawLine(ScriptMethodParams &params);
void ReadRawLineBack(ScriptMethodParams &params);
void ReadString(ScriptMethodParams &params);
void ReadStringBack(ScriptMethodParams &params);
void WriteInt(ScriptMethodParams &params);
void WriteRawChar(ScriptMethodParams &params);
void WriteRawLine(ScriptMethodParams &params);
void WriteString(ScriptMethodParams &params);
void GetEOF(ScriptMethodParams &params);
void GetError(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,301 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/game.h"
#include "ags/engine/ac/game.h"
#include "ags/engine/ac/global_audio.h"
#include "ags/engine/ac/global_game.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void Game::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(Game::IsAudioPlaying^1, Game::IsAudioPlaying);
SCRIPT_METHOD(Game::SetAudioTypeSpeechVolumeDrop^2, Game::SetAudioTypeSpeechVolumeDrop);
SCRIPT_METHOD(Game::SetAudioTypeVolume^3, Game::SetAudioTypeVolume);
SCRIPT_METHOD(Game::StopAudio^1, Game::StopAudio);
SCRIPT_METHOD(Game::ChangeTranslation^1, Game::ChangeTranslation);
SCRIPT_METHOD(Game::DoOnceOnly^1, Game::DoOnceOnly);
SCRIPT_METHOD(Game::GetColorFromRGB^3, Game::GetColorFromRGB);
SCRIPT_METHOD(Game::GetFrameCountForLoop^2, Game::GetFrameCountForLoop);
SCRIPT_METHOD(Game::GetLocationName^2, Game::GetLocationName);
SCRIPT_METHOD(Game::GetLoopCountForView^1, Game::GetLoopCountForView);
SCRIPT_METHOD(Game::GetMODPattern^0, Game::GetMODPattern);
SCRIPT_METHOD(Game::GetRunNextSettingForLoop^2, Game::GetRunNextSettingForLoop);
SCRIPT_METHOD(Game::GetSaveSlotDescription^1, Game::GetSaveSlotDescription);
SCRIPT_METHOD(Game::GetViewFrame^3, Game::GetViewFrame);
SCRIPT_METHOD(Game::InputBox^1, Game::InputBox);
SCRIPT_METHOD(Game::SetSaveGameDirectory^1, Game::SetSaveGameDirectory);
SCRIPT_METHOD(Game::StopSound^1, Game::StopAllSounds);
SCRIPT_METHOD(Game::get_CharacterCount, Game::GetCharacterCount);
SCRIPT_METHOD(Game::get_DialogCount, Game::GetDialogCount);
SCRIPT_METHOD(Game::get_FileName, Game::GetFileName);
SCRIPT_METHOD(Game::get_FontCount, Game::GetFontCount);
SCRIPT_METHOD(Game::geti_GlobalMessages, Game::GetGlobalMessages);
SCRIPT_METHOD(Game::geti_GlobalStrings, Game::GetGlobalStrings);
SCRIPT_METHOD(Game::seti_GlobalStrings, Game::SetGlobalString);
SCRIPT_METHOD(Game::get_GUICount, Game::GetGUICount);
SCRIPT_METHOD(Game::get_IgnoreUserInputAfterTextTimeoutMs, Game::GetIgnoreUserInputAfterTextTimeoutMs);
SCRIPT_METHOD(Game::set_IgnoreUserInputAfterTextTimeoutMs, Game::SetIgnoreUserInputAfterTextTimeoutMs);
SCRIPT_METHOD(Game::get_InSkippableCutscene, Game::GetInSkippableCutscene);
SCRIPT_METHOD(Game::get_InventoryItemCount, Game::GetInventoryItemCount);
SCRIPT_METHOD(Game::get_MinimumTextDisplayTimeMs, Game::GetMinimumTextDisplayTimeMs);
SCRIPT_METHOD(Game::set_MinimumTextDisplayTimeMs, Game::SetMinimumTextDisplayTimeMs);
SCRIPT_METHOD(Game::get_MouseCursorCount, Game::GetMouseCursorCount);
SCRIPT_METHOD(Game::get_Name, Game::GetName);
SCRIPT_METHOD(Game::set_Name, Game::SetName);
SCRIPT_METHOD(Game::get_NormalFont, Game::GetNormalFont);
SCRIPT_METHOD(Game::set_NormalFont, Game::SetNormalFont);
SCRIPT_METHOD(Game::get_SkippingCutscene, Game::GetSkippingCutscene);
SCRIPT_METHOD(Game::get_SpeechFont, Game::GetSpeechFont);
SCRIPT_METHOD(Game::set_SpeechFont, Game::SetSpeechFont);
SCRIPT_METHOD(Game::geti_SpriteWidth, Game::GetSpriteWidth);
SCRIPT_METHOD(Game::geti_SpriteHeight, Game::GetSpriteHeight);
SCRIPT_METHOD(Game::get_TextReadingSpeed, Game::GetTextReadingSpeed);
SCRIPT_METHOD(Game::set_TextReadingSpeed, Game::SetTextReadingSpeed);
SCRIPT_METHOD(Game::get_TranslationFilename, Game::GetTranslationFilename);
SCRIPT_METHOD(Game::get_UseNativeCoordinates, Game::GetUseNativeCoordinates);
SCRIPT_METHOD(Game::get_ViewCount, Game::GetViewCount);
SCRIPT_METHOD(Game::PlayVoiceClip, Game::PlayVoiceClip);
}
void Game::IsAudioPlaying(ScriptMethodParams &params) {
PARAMS1(int, audioType);
params._result = AGS3::Game_IsAudioPlaying(audioType);
}
void Game::SetAudioTypeSpeechVolumeDrop(ScriptMethodParams &params) {
PARAMS2(int, audioType, int, volumeDrop);
AGS3::Game_SetAudioTypeSpeechVolumeDrop(audioType, volumeDrop);
}
void Game::SetAudioTypeVolume(ScriptMethodParams &params) {
PARAMS3(int, audioType, int, volume, int, changeType);
AGS3::Game_SetAudioTypeVolume(audioType, volume, changeType);
}
void Game::StopAudio(ScriptMethodParams &params) {
PARAMS1(int, audioType);
AGS3::Game_StopAudio(audioType);
}
void Game::ChangeTranslation(ScriptMethodParams &params) {
PARAMS1(const char *, newFilename);
params._result = AGS3::Game_ChangeTranslation(newFilename);
}
void Game::DoOnceOnly(ScriptMethodParams &params) {
PARAMS1(const char *, token);
params._result = AGS3::Game_DoOnceOnly(token);
}
void Game::GetColorFromRGB(ScriptMethodParams &params) {
PARAMS3(int, red, int, grn, int, blu);
params._result = AGS3::Game_GetColorFromRGB(red, grn, blu);
}
void Game::GetFrameCountForLoop(ScriptMethodParams &params) {
PARAMS2(int, viewNumber, int, loopNumber);
params._result = AGS3::Game_GetFrameCountForLoop(viewNumber, loopNumber);
}
void Game::GetLocationName(ScriptMethodParams &params) {
PARAMS2(int, x, int, y);
params._result = AGS3::Game_GetLocationName(x, y);
}
void Game::GetLoopCountForView(ScriptMethodParams &params) {
PARAMS1(int, viewNumber);
params._result = AGS3::Game_GetLoopCountForView(viewNumber);
}
void Game::GetMODPattern(ScriptMethodParams &params) {
params._result = AGS3::Game_GetMODPattern();
}
void Game::GetRunNextSettingForLoop(ScriptMethodParams &params) {
PARAMS2(int, viewNumber, int, loopNumber);
params._result = AGS3::Game_GetRunNextSettingForLoop(viewNumber, loopNumber);
}
void Game::GetSaveSlotDescription(ScriptMethodParams &params) {
PARAMS1(int, slnum);
params._result = AGS3::Game_GetSaveSlotDescription(slnum);
}
void Game::GetViewFrame(ScriptMethodParams &params) {
PARAMS3(int, viewNumber, int, loopNumber, int, frame);
params._result = AGS3::Game_GetViewFrame(viewNumber, loopNumber, frame);
}
void Game::InputBox(ScriptMethodParams &params) {
PARAMS1(const char *, msg);
params._result = AGS3::Game_InputBox(msg);
}
void Game::SetSaveGameDirectory(ScriptMethodParams &params) {
PARAMS1(const char *, newFolder);
params._result = AGS3::Game_SetSaveGameDirectory(newFolder);
}
void Game::StopAllSounds(ScriptMethodParams &params) {
PARAMS1(int, evenAmbient);
AGS3::StopAllSounds(evenAmbient);
}
void Game::GetCharacterCount(ScriptMethodParams &params) {
params._result = AGS3::Game_GetCharacterCount();
}
void Game::GetDialogCount(ScriptMethodParams &params) {
params._result = AGS3::Game_GetDialogCount();
}
void Game::GetFileName(ScriptMethodParams &params) {
params._result = AGS3::Game_GetFileName();
}
void Game::GetFontCount(ScriptMethodParams &params) {
params._result = AGS3::Game_GetFontCount();
}
void Game::GetGlobalMessages(ScriptMethodParams &params) {
PARAMS1(int, index);
params._result = AGS3::Game_GetGlobalMessages(index);
}
void Game::GetGlobalStrings(ScriptMethodParams &params) {
PARAMS1(int, index);
params._result = AGS3::Game_GetGlobalStrings(index);
}
void Game::SetGlobalString(ScriptMethodParams &params) {
PARAMS2(int, index, const char *, newVal);
AGS3::SetGlobalString(index, newVal);
}
void Game::GetGUICount(ScriptMethodParams &params) {
params._result = AGS3::Game_GetGUICount();
}
void Game::GetIgnoreUserInputAfterTextTimeoutMs(ScriptMethodParams &params) {
params._result = AGS3::Game_GetIgnoreUserInputAfterTextTimeoutMs();
}
void Game::SetIgnoreUserInputAfterTextTimeoutMs(ScriptMethodParams &params) {
PARAMS1(int, newValueMs);
AGS3::Game_SetIgnoreUserInputAfterTextTimeoutMs(newValueMs);
}
void Game::GetInSkippableCutscene(ScriptMethodParams &params) {
params._result = AGS3::Game_GetInSkippableCutscene();
}
void Game::GetInventoryItemCount(ScriptMethodParams &params) {
params._result = AGS3::Game_GetInventoryItemCount();
}
void Game::GetMinimumTextDisplayTimeMs(ScriptMethodParams &params) {
params._result = AGS3::Game_GetMinimumTextDisplayTimeMs();
}
void Game::SetMinimumTextDisplayTimeMs(ScriptMethodParams &params) {
PARAMS1(int, newTextMinTime);
AGS3::Game_SetMinimumTextDisplayTimeMs(newTextMinTime);
}
void Game::GetMouseCursorCount(ScriptMethodParams &params) {
params._result = AGS3::Game_GetMouseCursorCount();
}
void Game::GetName(ScriptMethodParams &params) {
params._result = AGS3::Game_GetName();
}
void Game::SetName(ScriptMethodParams &params) {
PARAMS1(const char *, newName);
AGS3::Game_SetName(newName);
}
void Game::GetNormalFont(ScriptMethodParams &params) {
params._result = AGS3::Game_GetNormalFont();
}
void Game::SetNormalFont(ScriptMethodParams &params) {
PARAMS1(int, fontNum);
AGS3::SetNormalFont(fontNum);
}
void Game::GetSkippingCutscene(ScriptMethodParams &params) {
params._result = AGS3::Game_GetName();
}
void Game::GetSpeechFont(ScriptMethodParams &params) {
params._result = AGS3::Game_GetSpeechFont();
}
void Game::SetSpeechFont(ScriptMethodParams &params) {
PARAMS1(int, fontNum);
AGS3::SetSpeechFont(fontNum);
}
void Game::GetSpriteWidth(ScriptMethodParams &params) {
PARAMS1(int, spriteNum);
params._result = AGS3::Game_GetSpriteWidth(spriteNum);
}
void Game::GetSpriteHeight(ScriptMethodParams &params) {
PARAMS1(int, spriteNum);
params._result = AGS3::Game_GetSpriteHeight(spriteNum);
}
void Game::GetTextReadingSpeed(ScriptMethodParams &params) {
params._result = AGS3::Game_GetTextReadingSpeed();
}
void Game::SetTextReadingSpeed(ScriptMethodParams &params) {
PARAMS1(int, newTextSpeed);
AGS3::Game_SetTextReadingSpeed(newTextSpeed);
}
void Game::GetTranslationFilename(ScriptMethodParams &params) {
params._result = AGS3::Game_GetTranslationFilename();
}
void Game::GetUseNativeCoordinates(ScriptMethodParams &params) {
params._result = AGS3::Game_GetUseNativeCoordinates();
}
void Game::GetViewCount(ScriptMethodParams &params) {
params._result = AGS3::Game_GetViewCount();
}
void Game::PlayVoiceClip(ScriptMethodParams &params) {
PARAMS3(CharacterInfo *, ch, int, sndid, bool, as_speech);
params._result = AGS3::PlayVoiceClip(ch, sndid, as_speech);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,90 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_GAME_H
#define AGS_PLUGINS_CORE_GAME_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class Game : public ScriptContainer {
BUILT_IN_HASH(Game)
public:
virtual ~Game() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void IsAudioPlaying(ScriptMethodParams &params);
void SetAudioTypeSpeechVolumeDrop(ScriptMethodParams &params);
void SetAudioTypeVolume(ScriptMethodParams &params);
void StopAudio(ScriptMethodParams &params);
void ChangeTranslation(ScriptMethodParams &params);
void DoOnceOnly(ScriptMethodParams &params);
void GetColorFromRGB(ScriptMethodParams &params);
void GetFrameCountForLoop(ScriptMethodParams &params);
void GetLocationName(ScriptMethodParams &params);
void GetLoopCountForView(ScriptMethodParams &params);
void GetMODPattern(ScriptMethodParams &params);
void GetRunNextSettingForLoop(ScriptMethodParams &params);
void GetSaveSlotDescription(ScriptMethodParams &params);
void GetViewFrame(ScriptMethodParams &params);
void InputBox(ScriptMethodParams &params);
void SetSaveGameDirectory(ScriptMethodParams &params);
void StopAllSounds(ScriptMethodParams &params);
void GetCharacterCount(ScriptMethodParams &params);
void GetDialogCount(ScriptMethodParams &params);
void GetFileName(ScriptMethodParams &params);
void GetFontCount(ScriptMethodParams &params);
void GetGlobalMessages(ScriptMethodParams &params);
void GetGlobalStrings(ScriptMethodParams &params);
void SetGlobalString(ScriptMethodParams &params);
void GetGUICount(ScriptMethodParams &params);
void GetIgnoreUserInputAfterTextTimeoutMs(ScriptMethodParams &params);
void SetIgnoreUserInputAfterTextTimeoutMs(ScriptMethodParams &params);
void GetInSkippableCutscene(ScriptMethodParams &params);
void GetInventoryItemCount(ScriptMethodParams &params);
void GetMinimumTextDisplayTimeMs(ScriptMethodParams &params);
void SetMinimumTextDisplayTimeMs(ScriptMethodParams &params);
void GetMouseCursorCount(ScriptMethodParams &params);
void GetName(ScriptMethodParams &params);
void SetName(ScriptMethodParams &params);
void GetNormalFont(ScriptMethodParams &params);
void SetNormalFont(ScriptMethodParams &params);
void GetSkippingCutscene(ScriptMethodParams &params);
void GetSpeechFont(ScriptMethodParams &params);
void SetSpeechFont(ScriptMethodParams &params);
void GetSpriteWidth(ScriptMethodParams &params);
void GetSpriteHeight(ScriptMethodParams &params);
void GetTextReadingSpeed(ScriptMethodParams &params);
void SetTextReadingSpeed(ScriptMethodParams &params);
void GetTranslationFilename(ScriptMethodParams &params);
void GetUseNativeCoordinates(ScriptMethodParams &params);
void GetViewCount(ScriptMethodParams &params);
void PlayVoiceClip(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,404 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_GLOBAL_API_H
#define AGS_PLUGINS_CORE_GLOBAL_API_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class GlobalAPI : public ScriptContainer {
BUILT_IN_HASH(GlobalAPI)
public:
void AGS_EngineStartup(IAGSEngine *engine) override;
void ScPl_sc_AbortGame(ScriptMethodParams &params);
void add_inventory(ScriptMethodParams &params);
void AddInventoryToCharacter(ScriptMethodParams &params);
void AnimateButton(ScriptMethodParams &params);
void AnimateCharacter4(ScriptMethodParams &params);
void AnimateCharacter6(ScriptMethodParams &params);
void AnimateObject4(ScriptMethodParams &params);
void AnimateObject6(ScriptMethodParams &params);
void AreCharactersColliding(ScriptMethodParams &params);
void AreCharObjColliding(ScriptMethodParams &params);
void AreObjectsColliding(ScriptMethodParams &params);
void AreThingsOverlapping(ScriptMethodParams &params);
void CallRoomScript(ScriptMethodParams &params);
void cd_manager(ScriptMethodParams &params);
void CentreGUI(ScriptMethodParams &params);
void ChangeCharacterView(ScriptMethodParams &params);
void ChangeCursorGraphic(ScriptMethodParams &params);
void ChangeCursorHotspot(ScriptMethodParams &params);
void ClaimEvent(ScriptMethodParams &params);
void CreateGraphicOverlay(ScriptMethodParams &params);
void ScPl_CreateTextOverlay(ScriptMethodParams &params);
void CyclePalette(ScriptMethodParams &params);
void script_debug(ScriptMethodParams &params);
void DeleteSaveSlot(ScriptMethodParams &params);
void free_dynamic_sprite(ScriptMethodParams &params);
void disable_cursor_mode(ScriptMethodParams &params);
void DisableGroundLevelAreas(ScriptMethodParams &params);
void DisableHotspot(ScriptMethodParams &params);
void DisableInterface(ScriptMethodParams &params);
void DisableRegion(ScriptMethodParams &params);
void ScPl_Display(ScriptMethodParams &params);
void ScPl_DisplayAt(ScriptMethodParams &params);
void DisplayAtY(ScriptMethodParams &params);
void DisplayMessage(ScriptMethodParams &params);
void DisplayMessageAtY(ScriptMethodParams &params);
void DisplayMessageBar(ScriptMethodParams &params);
void ScPl_sc_displayspeech(ScriptMethodParams &params);
void DisplaySpeechAt(ScriptMethodParams &params);
void DisplaySpeechBackground(ScriptMethodParams &params);
void ScPl_DisplayThought(ScriptMethodParams &params);
void ScPl_DisplayTopBar(ScriptMethodParams &params);
void enable_cursor_mode(ScriptMethodParams &params);
void EnableGroundLevelAreas(ScriptMethodParams &params);
void EnableHotspot(ScriptMethodParams &params);
void EnableInterface(ScriptMethodParams &params);
void EnableRegion(ScriptMethodParams &params);
void EndCutscene(ScriptMethodParams &params);
void FaceCharacter(ScriptMethodParams &params);
void FaceLocation(ScriptMethodParams &params);
void FadeIn(ScriptMethodParams &params);
void FadeOut(ScriptMethodParams &params);
void FileClose(ScriptMethodParams &params);
void FileIsEOF(ScriptMethodParams &params);
void FileIsError(ScriptMethodParams &params);
// NOTE: FileOpenCMode is a backwards-compatible replacement for old-style global script function FileOpen
void FileOpenCMode(ScriptMethodParams &params);
void FileRead(ScriptMethodParams &params);
void FileReadInt(ScriptMethodParams &params);
void FileReadRawChar(ScriptMethodParams &params);
void FileReadRawInt(ScriptMethodParams &params);
void FileWrite(ScriptMethodParams &params);
void FileWriteInt(ScriptMethodParams &params);
void FileWriteRawChar(ScriptMethodParams &params);
void FileWriteRawLine(ScriptMethodParams &params);
void FindGUIID(ScriptMethodParams &params);
void FlipScreen(ScriptMethodParams &params);
void FloatToInt(ScriptMethodParams &params);
void FollowCharacter(ScriptMethodParams &params);
void FollowCharacterEx(ScriptMethodParams &params);
void GetBackgroundFrame(ScriptMethodParams &params);
void GetButtonPic(ScriptMethodParams &params);
void GetCharIDAtScreen(ScriptMethodParams &params);
void GetCharacterProperty(ScriptMethodParams &params);
void GetCharacterPropertyText(ScriptMethodParams &params);
void GetCurrentMusic(ScriptMethodParams &params);
void GetCursorMode(ScriptMethodParams &params);
void GetDialogOption(ScriptMethodParams &params);
void GetGameOption(ScriptMethodParams &params);
void GetGameParameter(ScriptMethodParams &params);
void GetGameSpeed(ScriptMethodParams &params);
void GetGlobalInt(ScriptMethodParams &params);
void GetGlobalString(ScriptMethodParams &params);
void GetGraphicalVariable(ScriptMethodParams &params);
void GetGUIAt(ScriptMethodParams &params);
void GetGUIObjectAt(ScriptMethodParams &params);
void GetHotspotIDAtScreen(ScriptMethodParams &params);
void GetHotspotName(ScriptMethodParams &params);
void GetHotspotPointX(ScriptMethodParams &params);
void GetHotspotPointY(ScriptMethodParams &params);
void GetHotspotProperty(ScriptMethodParams &params);
void GetHotspotPropertyText(ScriptMethodParams &params);
void GetInvAt(ScriptMethodParams &params);
void GetInvGraphic(ScriptMethodParams &params);
void GetInvName(ScriptMethodParams &params);
void GetInvProperty(ScriptMethodParams &params);
void GetInvPropertyText(ScriptMethodParams &params);
void GetLocationName(ScriptMethodParams &params);
void GetLocationType(ScriptMethodParams &params);
void GetMessageText(ScriptMethodParams &params);
void GetMIDIPosition(ScriptMethodParams &params);
void GetMP3PosMillis(ScriptMethodParams &params);
void GetObjectIDAtScreen(ScriptMethodParams &params);
void GetObjectBaseline(ScriptMethodParams &params);
void GetObjectGraphic(ScriptMethodParams &params);
void GetObjectName(ScriptMethodParams &params);
void GetObjectProperty(ScriptMethodParams &params);
void GetObjectPropertyText(ScriptMethodParams &params);
void GetObjectX(ScriptMethodParams &params);
void GetObjectY(ScriptMethodParams &params);
void GetPlayerCharacter(ScriptMethodParams &params);
void GetRawTime(ScriptMethodParams &params);
void GetRegionIDAtRoom(ScriptMethodParams &params);
void Room_GetProperty(ScriptMethodParams &params);
void GetRoomPropertyText(ScriptMethodParams &params);
void GetSaveSlotDescription(ScriptMethodParams &params);
void GetScalingAt(ScriptMethodParams &params);
void GetSliderValue(ScriptMethodParams &params);
void GetTextBoxText(ScriptMethodParams &params);
void GetTextHeight(ScriptMethodParams &params);
void GetTextWidth(ScriptMethodParams &params);
void sc_GetTime(ScriptMethodParams &params);
void get_translation(ScriptMethodParams &params);
void GetTranslationName(ScriptMethodParams &params);
void GetViewportX(ScriptMethodParams &params);
void GetViewportY(ScriptMethodParams &params);
void GetWalkableAreaAtRoom(ScriptMethodParams &params);
void GetWalkableAreaAtScreen(ScriptMethodParams &params);
void GiveScore(ScriptMethodParams &params);
void HasPlayerBeenInRoom(ScriptMethodParams &params);
void HideMouseCursor(ScriptMethodParams &params);
void ShowInputBox(ScriptMethodParams &params);
void InterfaceOff(ScriptMethodParams &params);
void InterfaceOn(ScriptMethodParams &params);
void IntToFloat(ScriptMethodParams &params);
void sc_invscreen(ScriptMethodParams &params);
void IsButtonDown(ScriptMethodParams &params);
void IsChannelPlaying(ScriptMethodParams &params);
void IsGamePaused(ScriptMethodParams &params);
void IsGUIOn(ScriptMethodParams &params);
void IsInteractionAvailable(ScriptMethodParams &params);
void IsInventoryInteractionAvailable(ScriptMethodParams &params);
void IsInterfaceEnabled(ScriptMethodParams &params);
void IsKeyPressed(ScriptMethodParams &params);
void IsMusicPlaying(ScriptMethodParams &params);
void IsMusicVoxAvailable(ScriptMethodParams &params);
void IsObjectAnimating(ScriptMethodParams &params);
void IsObjectMoving(ScriptMethodParams &params);
void IsObjectOn(ScriptMethodParams &params);
void IsOverlayValid(ScriptMethodParams &params);
void IsSoundPlaying(ScriptMethodParams &params);
void IsTimerExpired(ScriptMethodParams &params);
void IsTranslationAvailable(ScriptMethodParams &params);
void IsVoxAvailable(ScriptMethodParams &params);
void ListBoxAdd(ScriptMethodParams &params);
void ListBoxClear(ScriptMethodParams &params);
void ListBoxDirList(ScriptMethodParams &params);
void ListBoxGetItemText(ScriptMethodParams &params);
void ListBoxGetNumItems(ScriptMethodParams &params);
void ListBoxGetSelected(ScriptMethodParams &params);
void ListBoxRemove(ScriptMethodParams &params);
void ListBoxSaveGameList(ScriptMethodParams &params);
void ListBoxSetSelected(ScriptMethodParams &params);
void ListBoxSetTopItem(ScriptMethodParams &params);
void LoadImageFile(ScriptMethodParams &params);
void LoadSaveSlotScreenshot(ScriptMethodParams &params);
void lose_inventory(ScriptMethodParams &params);
void LoseInventoryFromCharacter(ScriptMethodParams &params);
void MergeObject(ScriptMethodParams &params);
void MoveCharacter(ScriptMethodParams &params);
void MoveCharacterBlocking(ScriptMethodParams &params);
void MoveCharacterDirect(ScriptMethodParams &params);
void MoveCharacterPath(ScriptMethodParams &params);
void MoveCharacterStraight(ScriptMethodParams &params);
void MoveCharacterToHotspot(ScriptMethodParams &params);
void MoveCharacterToObject(ScriptMethodParams &params);
void MoveObject(ScriptMethodParams &params);
void MoveObjectDirect(ScriptMethodParams &params);
void MoveOverlay(ScriptMethodParams &params);
void MoveToWalkableArea(ScriptMethodParams &params);
void NewRoom(ScriptMethodParams &params);
void NewRoomEx(ScriptMethodParams &params);
void NewRoomNPC(ScriptMethodParams &params);
void ObjectOff(ScriptMethodParams &params);
void ObjectOn(ScriptMethodParams &params);
void ParseText(ScriptMethodParams &params);
void PauseGame(ScriptMethodParams &params);
void PlayAmbientSound(ScriptMethodParams &params);
void PlayFlic(ScriptMethodParams &params);
void PlayMP3File(ScriptMethodParams &params);
void PlayMusicResetQueue(ScriptMethodParams &params);
void PlayMusicQueued(ScriptMethodParams &params);
void PlaySilentMIDI(ScriptMethodParams &params);
void play_sound(ScriptMethodParams &params);
void PlaySoundEx(ScriptMethodParams &params);
void PlayVideo(ScriptMethodParams &params);
void RoomProcessClick(ScriptMethodParams &params);
void QuitGame(ScriptMethodParams &params);
void __Rand(ScriptMethodParams &params);
void RawClear(ScriptMethodParams &params);
void RawDrawCircle(ScriptMethodParams &params);
void RawDrawFrameTransparent(ScriptMethodParams &params);
void RawDrawImage(ScriptMethodParams &params);
void RawDrawImageOffset(ScriptMethodParams &params);
void RawDrawImageResized(ScriptMethodParams &params);
void RawDrawImageTransparent(ScriptMethodParams &params);
void RawDrawLine(ScriptMethodParams &params);
void RawDrawRectangle(ScriptMethodParams &params);
void RawDrawTriangle(ScriptMethodParams &params);
void ScPl_RawPrint(ScriptMethodParams &params);
void RawPrintMessageWrapped(ScriptMethodParams &params);
void RawRestoreScreen(ScriptMethodParams &params);
void RawRestoreScreenTinted(ScriptMethodParams &params);
void RawSaveScreen(ScriptMethodParams &params);
void RawSetColor(ScriptMethodParams &params);
void RawSetColorRGB(ScriptMethodParams &params);
void RefreshMouse(ScriptMethodParams &params);
void ReleaseCharacterView(ScriptMethodParams &params);
void ReleaseViewport(ScriptMethodParams &params);
void RemoveObjectTint(ScriptMethodParams &params);
void RemoveOverlay(ScriptMethodParams &params);
void RemoveWalkableArea(ScriptMethodParams &params);
void ResetRoom(ScriptMethodParams &params);
void restart_game(ScriptMethodParams &params);
void restore_game_dialog(ScriptMethodParams &params);
void RestoreGameSlot(ScriptMethodParams &params);
void RestoreWalkableArea(ScriptMethodParams &params);
void RunAGSGame(ScriptMethodParams &params);
void RunCharacterInteraction(ScriptMethodParams &params);
void RunDialog(ScriptMethodParams &params);
void RunHotspotInteraction(ScriptMethodParams &params);
void RunInventoryInteraction(ScriptMethodParams &params);
void RunObjectInteraction(ScriptMethodParams &params);
void RunRegionInteraction(ScriptMethodParams &params);
void Said(ScriptMethodParams &params);
void SaidUnknownWord(ScriptMethodParams &params);
void SaveCursorForLocationChange(ScriptMethodParams &params);
void save_game_dialog(ScriptMethodParams &params);
void save_game(ScriptMethodParams &params);
void SaveScreenShot(ScriptMethodParams &params);
void SeekMIDIPosition(ScriptMethodParams &params);
void SeekMODPattern(ScriptMethodParams &params);
void SeekMP3PosMillis(ScriptMethodParams &params);
void SetActiveInventory(ScriptMethodParams &params);
void SetAmbientTint(ScriptMethodParams &params);
void SetAreaLightLevel(ScriptMethodParams &params);
void SetAreaScaling(ScriptMethodParams &params);
void SetBackgroundFrame(ScriptMethodParams &params);
void SetButtonPic(ScriptMethodParams &params);
void SetButtonText(ScriptMethodParams &params);
void SetChannelVolume(ScriptMethodParams &params);
void SetCharacterBaseline(ScriptMethodParams &params);
void SetCharacterClickable(ScriptMethodParams &params);
void SetCharacterFrame(ScriptMethodParams &params);
void SetCharacterIdle(ScriptMethodParams &params);
void SetCharacterIgnoreLight(ScriptMethodParams &params);
void SetCharacterIgnoreWalkbehinds(ScriptMethodParams &params);
void SetCharacterProperty(ScriptMethodParams &params);
void SetCharacterBlinkView(ScriptMethodParams &params);
void SetCharacterSpeechView(ScriptMethodParams &params);
void SetCharacterSpeed(ScriptMethodParams &params);
void SetCharacterSpeedEx(ScriptMethodParams &params);
void SetCharacterTransparency(ScriptMethodParams &params);
void SetCharacterView(ScriptMethodParams &params);
void SetCharacterViewEx(ScriptMethodParams &params);
void SetCharacterViewOffset(ScriptMethodParams &params);
void set_cursor_mode(ScriptMethodParams &params);
void set_default_cursor(ScriptMethodParams &params);
void SetDialogOption(ScriptMethodParams &params);
void SetDigitalMasterVolume(ScriptMethodParams &params);
void SetFadeColor(ScriptMethodParams &params);
void SetFrameSound(ScriptMethodParams &params);
void SetGameOption(ScriptMethodParams &params);
void SetGameSpeed(ScriptMethodParams &params);
void SetGlobalInt(ScriptMethodParams &params);
void SetGlobalString(ScriptMethodParams &params);
void SetGraphicalVariable(ScriptMethodParams &params);
void SetGUIBackgroundPic(ScriptMethodParams &params);
void SetGUIClickable(ScriptMethodParams &params);
void SetGUIObjectEnabled(ScriptMethodParams &params);
void SetGUIObjectPosition(ScriptMethodParams &params);
void SetGUIObjectSize(ScriptMethodParams &params);
void SetGUIPosition(ScriptMethodParams &params);
void SetGUISize(ScriptMethodParams &params);
void SetGUITransparency(ScriptMethodParams &params);
void SetGUIZOrder(ScriptMethodParams &params);
void SetInvItemName(ScriptMethodParams &params);
void set_inv_item_pic(ScriptMethodParams &params);
void SetInvDimensions(ScriptMethodParams &params);
void SetLabelColor(ScriptMethodParams &params);
void SetLabelFont(ScriptMethodParams &params);
void SetLabelText(ScriptMethodParams &params);
void SetMouseBounds(ScriptMethodParams &params);
void set_mouse_cursor(ScriptMethodParams &params);
void SetMousePosition(ScriptMethodParams &params);
void SetMultitasking(ScriptMethodParams &params);
void SetMusicMasterVolume(ScriptMethodParams &params);
void SetMusicRepeat(ScriptMethodParams &params);
void SetMusicVolume(ScriptMethodParams &params);
void SetNextCursor(ScriptMethodParams &params);
void SetNextScreenTransition(ScriptMethodParams &params);
void SetNormalFont(ScriptMethodParams &params);
void SetObjectBaseline(ScriptMethodParams &params);
void SetObjectClickable(ScriptMethodParams &params);
void SetObjectFrame(ScriptMethodParams &params);
void SetObjectGraphic(ScriptMethodParams &params);
void SetObjectIgnoreWalkbehinds(ScriptMethodParams &params);
void SetObjectPosition(ScriptMethodParams &params);
void SetObjectTint(ScriptMethodParams &params);
void SetObjectTransparency(ScriptMethodParams &params);
void SetObjectView(ScriptMethodParams &params);
void SetPalRGB(ScriptMethodParams &params);
void SetPlayerCharacter(ScriptMethodParams &params);
void SetRegionTint(ScriptMethodParams &params);
void SetRestartPoint(ScriptMethodParams &params);
void SetScreenTransition(ScriptMethodParams &params);
void SetSkipSpeech(ScriptMethodParams &params);
void SetSliderValue(ScriptMethodParams &params);
void SetSoundVolume(ScriptMethodParams &params);
void SetSpeechFont(ScriptMethodParams &params);
void SetSpeechStyle(ScriptMethodParams &params);
void SetSpeechVolume(ScriptMethodParams &params);
void SetTalkingColor(ScriptMethodParams &params);
void SetTextBoxFont(ScriptMethodParams &params);
void SetTextBoxText(ScriptMethodParams &params);
void ScPl_SetTextOverlay(ScriptMethodParams &params);
void SetTextWindowGUI(ScriptMethodParams &params);
void script_SetTimer(ScriptMethodParams &params);
void SetViewport(ScriptMethodParams &params);
void SetVoiceMode(ScriptMethodParams &params);
void SetWalkBehindBase(ScriptMethodParams &params);
void ShakeScreen(ScriptMethodParams &params);
void ShakeScreenBackground(ScriptMethodParams &params);
void ShowMouseCursor(ScriptMethodParams &params);
void SkipUntilCharacterStops(ScriptMethodParams &params);
void StartCutscene(ScriptMethodParams &params);
void scStartRecording(ScriptMethodParams &params);
void StopAmbientSound(ScriptMethodParams &params);
void stop_and_destroy_channel(ScriptMethodParams &params);
void StopDialog(ScriptMethodParams &params);
void StopMoving(ScriptMethodParams &params);
void scr_StopMusic(ScriptMethodParams &params);
void StopObjectMoving(ScriptMethodParams &params);
void _sc_strcat(ScriptMethodParams &params);
void ags_stricmp(ScriptMethodParams &params);
void strcmp(ScriptMethodParams &params);
void StrContains(ScriptMethodParams &params);
void _sc_strcpy(ScriptMethodParams &params);
void ScPl_sc_sprintf(ScriptMethodParams &params);
void StrGetCharAt(ScriptMethodParams &params);
void StringToInt(ScriptMethodParams &params);
void strlen(ScriptMethodParams &params);
void StrSetCharAt(ScriptMethodParams &params);
void _sc_strlower(ScriptMethodParams &params);
void _sc_strupper(ScriptMethodParams &params);
void TintScreen(ScriptMethodParams &params);
void UnPauseGame(ScriptMethodParams &params);
void update_invorder(ScriptMethodParams &params);
void UpdatePalette(ScriptMethodParams &params);
void scrWait(ScriptMethodParams &params);
void WaitKey(ScriptMethodParams &params);
void WaitMouseKey(ScriptMethodParams &params);
void WaitInput(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,189 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/gui.h"
#include "ags/engine/ac/gui.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void GUI::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(GUI::Centre^0, GUI::Centre);
SCRIPT_METHOD(GUI::GetAtScreenXY^2, GUI::GetGUIAtLocation);
SCRIPT_METHOD(GUI::SetPosition^2, GUI::SetPosition);
SCRIPT_METHOD(GUI::SetSize^2, GUI::SetSize);
SCRIPT_METHOD(GUI::get_BackgroundGraphic, GUI::GetBackgroundGraphic);
SCRIPT_METHOD(GUI::set_BackgroundGraphic, GUI::SetBackgroundGraphic);
SCRIPT_METHOD(GUI::get_Clickable, GUI::GetClickable);
SCRIPT_METHOD(GUI::set_Clickable, GUI::SetClickable);
SCRIPT_METHOD(GUI::get_ControlCount, GUI::GetControlCount);
SCRIPT_METHOD(GUI::geti_Controls, GUI::GetiControls);
SCRIPT_METHOD(GUI::get_Height, GUI::GetHeight);
SCRIPT_METHOD(GUI::set_Height, GUI::SetHeight);
SCRIPT_METHOD(GUI::get_ID, GUI::GetID);
SCRIPT_METHOD(GUI::get_Transparency, GUI::GetTransparency);
SCRIPT_METHOD(GUI::set_Transparency, GUI::SetTransparency);
SCRIPT_METHOD(GUI::get_Visible, GUI::GetVisible);
SCRIPT_METHOD(GUI::set_Visible, GUI::SetVisible);
SCRIPT_METHOD(GUI::get_Width, GUI::GetWidth);
SCRIPT_METHOD(GUI::set_Width, GUI::SetWidth);
SCRIPT_METHOD(GUI::get_X, GUI::GetX);
SCRIPT_METHOD(GUI::set_X, GUI::SetX);
SCRIPT_METHOD(GUI::get_Y, GUI::GetY);
SCRIPT_METHOD(GUI::set_Y, GUI::SetY);
SCRIPT_METHOD(GUI::get_ZOrder, GUI::GetZOrder);
SCRIPT_METHOD(GUI::set_ZOrder, GUI::SetZOrder);
}
void GUI::Centre(ScriptMethodParams &params) {
PARAMS1(ScriptGUI *, sgui);
AGS3::GUI_Centre(sgui);
}
void GUI::GetGUIAtLocation(ScriptMethodParams &params) {
PARAMS2(int, xx, int, yy);
params._result = AGS3::GetGUIAtLocation(xx, yy);
}
void GUI::SetPosition(ScriptMethodParams &params) {
PARAMS3(ScriptGUI *, tehgui, int, xx, int, yy);
AGS3::GUI_SetPosition(tehgui, xx, yy);
}
void GUI::SetSize(ScriptMethodParams &params) {
PARAMS3(ScriptGUI *, sgui, int, widd, int, hitt);
AGS3::GUI_SetSize(sgui, widd, hitt);
}
void GUI::GetBackgroundGraphic(ScriptMethodParams &params) {
PARAMS1(ScriptGUI *, sgui);
params._result = AGS3::GUI_GetBackgroundGraphic(sgui);
}
void GUI::SetBackgroundGraphic(ScriptMethodParams &params) {
PARAMS2(ScriptGUI *, tehgui, int, slotn);
AGS3::GUI_SetBackgroundGraphic(tehgui, slotn);
}
void GUI::GetClickable(ScriptMethodParams &params) {
PARAMS1(ScriptGUI *, sgui);
params._result = AGS3::GUI_GetClickable(sgui);
}
void GUI::SetClickable(ScriptMethodParams &params) {
PARAMS2(ScriptGUI *, tehgui, int, clickable);
AGS3::GUI_SetClickable(tehgui, clickable);
}
void GUI::GetControlCount(ScriptMethodParams &params) {
PARAMS1(ScriptGUI *, sgui);
params._result = AGS3::GUI_GetControlCount(sgui);
}
void GUI::GetiControls(ScriptMethodParams &params) {
PARAMS2(ScriptGUI *, sgui, int, idx);
params._result = AGS3::GUI_GetiControls(sgui, idx);
}
void GUI::GetHeight(ScriptMethodParams &params) {
PARAMS1(ScriptGUI *, sgui);
params._result = AGS3::GUI_GetHeight(sgui);
}
void GUI::SetHeight(ScriptMethodParams &params) {
PARAMS2(ScriptGUI *, sgui, int, newhit);
AGS3::GUI_SetHeight(sgui, newhit);
}
void GUI::GetID(ScriptMethodParams &params) {
PARAMS1(ScriptGUI *, sgui);
params._result = AGS3::GUI_GetID(sgui);
}
void GUI::GetTransparency(ScriptMethodParams &params) {
PARAMS1(ScriptGUI *, sgui);
params._result = AGS3::GUI_GetTransparency(sgui);
}
void GUI::SetTransparency(ScriptMethodParams &params) {
PARAMS2(ScriptGUI *, tehgui, int, trans);
AGS3::GUI_SetTransparency(tehgui, trans);
}
void GUI::GetVisible(ScriptMethodParams &params) {
PARAMS1(ScriptGUI *, sgui);
params._result = AGS3::GUI_GetVisible(sgui);
}
void GUI::SetVisible(ScriptMethodParams &params) {
PARAMS2(ScriptGUI *, tehgui, int, isvisible);
AGS3::GUI_SetVisible(tehgui, isvisible);
}
void GUI::GetWidth(ScriptMethodParams &params) {
PARAMS1(ScriptGUI *, sgui);
params._result = AGS3::GUI_GetWidth(sgui);
}
void GUI::SetWidth(ScriptMethodParams &params) {
PARAMS2(ScriptGUI *, sgui, int, newwid);
AGS3::GUI_SetWidth(sgui, newwid);
}
void GUI::GetX(ScriptMethodParams &params) {
PARAMS1(ScriptGUI *, sgui);
params._result = AGS3::GUI_GetX(sgui);
}
void GUI::SetX(ScriptMethodParams &params) {
PARAMS2(ScriptGUI *, tehgui, int, xx);
AGS3::GUI_SetX(tehgui, xx);
}
void GUI::GetY(ScriptMethodParams &params) {
PARAMS1(ScriptGUI *, sgui);
params._result = AGS3::GUI_GetY(sgui);
}
void GUI::SetY(ScriptMethodParams &params) {
PARAMS2(ScriptGUI *, tehgui, int, yy);
AGS3::GUI_SetY(tehgui, yy);
}
void GUI::GetZOrder(ScriptMethodParams &params) {
PARAMS1(ScriptGUI *, sgui);
params._result = AGS3::GUI_GetZOrder(sgui);
}
void GUI::SetZOrder(ScriptMethodParams &params) {
PARAMS2(ScriptGUI *, tehgui, int, z);
AGS3::GUI_SetZOrder(tehgui, z);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,68 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_GUI_H
#define AGS_PLUGINS_CORE_GUI_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class GUI : public ScriptContainer {
BUILT_IN_HASH(GUI)
public:
virtual ~GUI() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void Centre(ScriptMethodParams &params);
void GetGUIAtLocation(ScriptMethodParams &params);
void SetPosition(ScriptMethodParams &params);
void SetSize(ScriptMethodParams &params);
void GetBackgroundGraphic(ScriptMethodParams &params);
void SetBackgroundGraphic(ScriptMethodParams &params);
void GetClickable(ScriptMethodParams &params);
void SetClickable(ScriptMethodParams &params);
void GetControlCount(ScriptMethodParams &params);
void GetiControls(ScriptMethodParams &params);
void GetHeight(ScriptMethodParams &params);
void SetHeight(ScriptMethodParams &params);
void GetID(ScriptMethodParams &params);
void GetTransparency(ScriptMethodParams &params);
void SetTransparency(ScriptMethodParams &params);
void GetVisible(ScriptMethodParams &params);
void SetVisible(ScriptMethodParams &params);
void GetWidth(ScriptMethodParams &params);
void SetWidth(ScriptMethodParams &params);
void GetX(ScriptMethodParams &params);
void SetX(ScriptMethodParams &params);
void GetY(ScriptMethodParams &params);
void SetY(ScriptMethodParams &params);
void GetZOrder(ScriptMethodParams &params);
void SetZOrder(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,201 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/gui_control.h"
#include "ags/engine/ac/gui_control.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void GUIControl::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(GUIControl::BringToFront^0, GUIControl::BringToFront);
SCRIPT_METHOD(GUIControl::GetAtScreenXY^2, GUIControl::GetGUIControlAtLocation);
SCRIPT_METHOD(GUIControl::SendToBack^0, GUIControl::SendToBack);
SCRIPT_METHOD(GUIControl::SetPosition^2, GUIControl::SetPosition);
SCRIPT_METHOD(GUIControl::SetSize^2, GUIControl::SetSize);
SCRIPT_METHOD(GUIControl::get_AsButton, GUIControl::GetAsButton);
SCRIPT_METHOD(GUIControl::get_AsInvWindow, GUIControl::GetAsInvWindow);
SCRIPT_METHOD(GUIControl::get_AsLabel, GUIControl::GetAsLabel);
SCRIPT_METHOD(GUIControl::get_AsListBox, GUIControl::GetAsListBox);
SCRIPT_METHOD(GUIControl::get_AsSlider, GUIControl::GetAsSlider);
SCRIPT_METHOD(GUIControl::get_AsTextBox, GUIControl::GetAsTextBox);
SCRIPT_METHOD(GUIControl::get_Clickable, GUIControl::GetClickable);
SCRIPT_METHOD(GUIControl::set_Clickable, GUIControl::SetClickable);
SCRIPT_METHOD(GUIControl::get_Enabled, GUIControl::GetEnabled);
SCRIPT_METHOD(GUIControl::set_Enabled, GUIControl::SetEnabled);
SCRIPT_METHOD(GUIControl::get_Height, GUIControl::GetHeight);
SCRIPT_METHOD(GUIControl::set_Height, GUIControl::SetHeight);
SCRIPT_METHOD(GUIControl::get_ID, GUIControl::GetID);
SCRIPT_METHOD(GUIControl::get_OwningGUI, GUIControl::GetOwningGUI);
SCRIPT_METHOD(GUIControl::get_Visible, GUIControl::GetVisible);
SCRIPT_METHOD(GUIControl::set_Visible, GUIControl::SetVisible);
SCRIPT_METHOD(GUIControl::get_Width, GUIControl::GetWidth);
SCRIPT_METHOD(GUIControl::set_Width, GUIControl::SetWidth);
SCRIPT_METHOD(GUIControl::get_X, GUIControl::GetX);
SCRIPT_METHOD(GUIControl::set_X, GUIControl::SetX);
SCRIPT_METHOD(GUIControl::get_Y, GUIControl::GetY);
SCRIPT_METHOD(GUIControl::set_Y, GUIControl::SetY);
}
void GUIControl::BringToFront(ScriptMethodParams &params) {
PARAMS1(GUIObject *, guio);
AGS3::GUIControl_BringToFront(guio);
}
void GUIControl::GetGUIControlAtLocation(ScriptMethodParams &params) {
PARAMS2(int, xx, int, yy);
params._result = AGS3::GetGUIControlAtLocation(xx, yy);
}
void GUIControl::SendToBack(ScriptMethodParams &params) {
PARAMS1(GUIObject *, guio);
AGS3::GUIControl_SendToBack(guio);
}
void GUIControl::SetPosition(ScriptMethodParams &params) {
PARAMS3(GUIObject *, guio, int, xx, int, yy);
AGS3::GUIControl_SetPosition(guio, xx, yy);
}
void GUIControl::SetSize(ScriptMethodParams &params) {
PARAMS3(GUIObject *, guio, int, newwid, int, newhit);
AGS3::GUIControl_SetSize(guio, newwid, newhit);
}
void GUIControl::GetAsButton(ScriptMethodParams &params) {
PARAMS1(GUIObject *, guio);
params._result = AGS3::GUIControl_GetAsButton(guio);
}
void GUIControl::GetAsInvWindow(ScriptMethodParams &params) {
PARAMS1(GUIObject *, guio);
params._result = AGS3::GUIControl_GetAsInvWindow(guio);
}
void GUIControl::GetAsLabel(ScriptMethodParams &params) {
PARAMS1(GUIObject *, guio);
params._result = AGS3::GUIControl_GetAsLabel(guio);
}
void GUIControl::GetAsListBox(ScriptMethodParams &params) {
PARAMS1(GUIObject *, guio);
params._result = AGS3::GUIControl_GetAsListBox(guio);
}
void GUIControl::GetAsSlider(ScriptMethodParams &params) {
PARAMS1(GUIObject *, guio);
params._result = AGS3::GUIControl_GetAsSlider(guio);
}
void GUIControl::GetAsTextBox(ScriptMethodParams &params) {
PARAMS1(GUIObject *, guio);
params._result = AGS3::GUIControl_GetAsTextBox(guio);
}
void GUIControl::GetClickable(ScriptMethodParams &params) {
PARAMS1(GUIObject *, guio);
params._result = AGS3::GUIControl_GetClickable(guio);
}
void GUIControl::SetClickable(ScriptMethodParams &params) {
PARAMS2(GUIObject *, guio, int, enabled);
AGS3::GUIControl_SetClickable(guio, enabled);
}
void GUIControl::GetEnabled(ScriptMethodParams &params) {
PARAMS1(GUIObject *, guio);
params._result = AGS3::GUIControl_GetEnabled(guio);
}
void GUIControl::SetEnabled(ScriptMethodParams &params) {
PARAMS2(GUIObject *, guio, int, enabled);
AGS3::GUIControl_SetEnabled(guio, enabled);
}
void GUIControl::GetHeight(ScriptMethodParams &params) {
PARAMS1(GUIObject *, guio);
params._result = AGS3::GUIControl_GetHeight(guio);
}
void GUIControl::SetHeight(ScriptMethodParams &params) {
PARAMS2(GUIObject *, guio, int, newhit);
AGS3::GUIControl_SetHeight(guio, newhit);
}
void GUIControl::GetID(ScriptMethodParams &params) {
PARAMS1(GUIObject *, guio);
params._result = AGS3::GUIControl_GetID(guio);
}
void GUIControl::GetOwningGUI(ScriptMethodParams &params) {
PARAMS1(GUIObject *, guio);
params._result = AGS3::GUIControl_GetOwningGUI(guio);
}
void GUIControl::GetVisible(ScriptMethodParams &params) {
PARAMS1(GUIObject *, guio);
params._result = AGS3::GUIControl_GetVisible(guio);
}
void GUIControl::SetVisible(ScriptMethodParams &params) {
PARAMS2(GUIObject *, guio, int, visible);
AGS3::GUIControl_SetVisible(guio, visible);
}
void GUIControl::GetWidth(ScriptMethodParams &params) {
PARAMS1(GUIObject *, guio);
params._result = AGS3::GUIControl_GetWidth(guio);
}
void GUIControl::SetWidth(ScriptMethodParams &params) {
PARAMS2(GUIObject *, guio, int, newwid);
AGS3::GUIControl_SetWidth(guio, newwid);
}
void GUIControl::GetX(ScriptMethodParams &params) {
PARAMS1(GUIObject *, guio);
params._result = AGS3::GUIControl_GetX(guio);
}
void GUIControl::SetX(ScriptMethodParams &params) {
PARAMS2(GUIObject *, guio, int, xx);
AGS3::GUIControl_SetX(guio, xx);
}
void GUIControl::GetY(ScriptMethodParams &params) {
PARAMS1(GUIObject *, guio);
params._result = AGS3::GUIControl_GetY(guio);
}
void GUIControl::SetY(ScriptMethodParams &params) {
PARAMS2(GUIObject *, guio, int, yy);
AGS3::GUIControl_SetY(guio, yy);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,70 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_GUI_CONTROL_H
#define AGS_PLUGINS_CORE_GUI_CONTROL_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class GUIControl : public ScriptContainer {
BUILT_IN_HASH(GUIControl)
public:
virtual ~GUIControl() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void BringToFront(ScriptMethodParams &params);
void GetGUIControlAtLocation(ScriptMethodParams &params);
void SendToBack(ScriptMethodParams &params);
void SetPosition(ScriptMethodParams &params);
void SetSize(ScriptMethodParams &params);
void GetAsButton(ScriptMethodParams &params);
void GetAsInvWindow(ScriptMethodParams &params);
void GetAsLabel(ScriptMethodParams &params);
void GetAsListBox(ScriptMethodParams &params);
void GetAsSlider(ScriptMethodParams &params);
void GetAsTextBox(ScriptMethodParams &params);
void GetClickable(ScriptMethodParams &params);
void SetClickable(ScriptMethodParams &params);
void GetEnabled(ScriptMethodParams &params);
void SetEnabled(ScriptMethodParams &params);
void GetHeight(ScriptMethodParams &params);
void SetHeight(ScriptMethodParams &params);
void GetID(ScriptMethodParams &params);
void GetOwningGUI(ScriptMethodParams &params);
void GetVisible(ScriptMethodParams &params);
void SetVisible(ScriptMethodParams &params);
void GetWidth(ScriptMethodParams &params);
void SetWidth(ScriptMethodParams &params);
void GetX(ScriptMethodParams &params);
void SetX(ScriptMethodParams &params);
void GetY(ScriptMethodParams &params);
void SetY(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,126 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/hotspot.h"
#include "ags/engine/ac/hotspot.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void Hotspot::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(Hotspot::GetAtRoomXY^2, Hotspot::GetHotspotAtRoom);
SCRIPT_METHOD(Hotspot::GetAtScreenXY^2, Hotspot::GetHotspotAtScreen);
SCRIPT_METHOD(Hotspot::GetName^1, Hotspot::GetName);
SCRIPT_METHOD(Hotspot::GetProperty^1, Hotspot::GetProperty);
SCRIPT_METHOD(Hotspot::GetPropertyText^2, Hotspot::GetPropertyText);
SCRIPT_METHOD(Hotspot::GetTextProperty^1, Hotspot::GetTextProperty);
SCRIPT_METHOD(Hotspot::SetProperty^2, Hotspot::SetProperty);
SCRIPT_METHOD(Hotspot::SetTextProperty^2, Hotspot::SetTextProperty);
SCRIPT_METHOD(Hotspot::RunInteraction^1, Hotspot::RunInteraction);
SCRIPT_METHOD(Hotspot::get_Enabled, Hotspot::GetEnabled);
SCRIPT_METHOD(Hotspot::set_Enabled, Hotspot::SetEnabled);
SCRIPT_METHOD(Hotspot::get_ID, Hotspot::GetID);
SCRIPT_METHOD(Hotspot::get_Name, Hotspot::GetName_New);
SCRIPT_METHOD(Hotspot::get_WalkToX, Hotspot::GetWalkToX);
SCRIPT_METHOD(Hotspot::get_WalkToY, Hotspot::GetWalkToY);
}
void Hotspot::GetHotspotAtRoom(ScriptMethodParams &params) {
PARAMS2(int, x, int, y);
params._result = AGS3::GetHotspotAtRoom(x, y);
}
void Hotspot::GetHotspotAtScreen(ScriptMethodParams &params) {
PARAMS2(int, xx, int, yy);
params._result = AGS3::GetHotspotAtScreen(xx, yy);
}
void Hotspot::GetName(ScriptMethodParams &params) {
PARAMS2(ScriptHotspot *, hss, char *, buffer);
AGS3::Hotspot_GetName(hss, buffer);
}
void Hotspot::GetProperty(ScriptMethodParams &params) {
PARAMS2(ScriptHotspot *, hss, const char *, property);
params._result = AGS3::Hotspot_GetProperty(hss, property);
}
void Hotspot::GetPropertyText(ScriptMethodParams &params) {
PARAMS3(ScriptHotspot *, hss, const char *, property, char *, bufer);
AGS3::Hotspot_GetPropertyText(hss, property, bufer);
}
void Hotspot::GetTextProperty(ScriptMethodParams &params) {
PARAMS2(ScriptHotspot *, hss, const char *, property);
params._result = AGS3::Hotspot_GetTextProperty(hss, property);
}
void Hotspot::SetProperty(ScriptMethodParams &params) {
PARAMS3(ScriptHotspot *, hss, const char *, property, int, value);
params._result = AGS3::Hotspot_SetProperty(hss, property, value);
}
void Hotspot::SetTextProperty(ScriptMethodParams &params) {
PARAMS3(ScriptHotspot *, hss, const char *, property, const char *, value);
params._result = AGS3::Hotspot_SetTextProperty(hss, property, value);
}
void Hotspot::RunInteraction(ScriptMethodParams &params) {
PARAMS2(ScriptHotspot *, hss, int, mood);
AGS3::Hotspot_RunInteraction(hss, mood);
}
void Hotspot::GetEnabled(ScriptMethodParams &params) {
PARAMS1(ScriptHotspot *, hss);
params._result = AGS3::Hotspot_GetEnabled(hss);
}
void Hotspot::SetEnabled(ScriptMethodParams &params) {
PARAMS2(ScriptHotspot *, hss, int, newval);
AGS3::Hotspot_SetEnabled(hss, newval);
}
void Hotspot::GetID(ScriptMethodParams &params) {
PARAMS1(ScriptHotspot *, hss);
params._result = AGS3::Hotspot_GetID(hss);
}
void Hotspot::GetName_New(ScriptMethodParams &params) {
PARAMS1(ScriptHotspot *, hss);
params._result = AGS3::Hotspot_GetName_New(hss);
}
void Hotspot::GetWalkToX(ScriptMethodParams &params) {
PARAMS1(ScriptHotspot *, hss);
params._result = AGS3::Hotspot_GetWalkToX(hss);
}
void Hotspot::GetWalkToY(ScriptMethodParams &params) {
PARAMS1(ScriptHotspot *, hss);
params._result = AGS3::Hotspot_GetWalkToY(hss);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,58 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_HOTSPOT_H
#define AGS_PLUGINS_CORE_HOTSPOT_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class Hotspot : public ScriptContainer {
BUILT_IN_HASH(Hotspot)
public:
virtual ~Hotspot() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void GetHotspotAtRoom(ScriptMethodParams &params);
void GetHotspotAtScreen(ScriptMethodParams &params);
void GetName(ScriptMethodParams &params);
void GetProperty(ScriptMethodParams &params);
void GetPropertyText(ScriptMethodParams &params);
void GetTextProperty(ScriptMethodParams &params);
void SetProperty(ScriptMethodParams &params);
void SetTextProperty(ScriptMethodParams &params);
void RunInteraction(ScriptMethodParams &params);
void GetEnabled(ScriptMethodParams &params);
void SetEnabled(ScriptMethodParams &params);
void GetID(ScriptMethodParams &params);
void GetName_New(ScriptMethodParams &params);
void GetWalkToX(ScriptMethodParams &params);
void GetWalkToY(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,120 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/inv_window.h"
#include "ags/engine/ac/inv_window.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void InvWindow::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(InvWindow::ScrollDown^0, InvWindow::ScrollDown);
SCRIPT_METHOD(InvWindow::ScrollUp^0, InvWindow::ScrollUp);
SCRIPT_METHOD(InvWindow::get_CharacterToUse, InvWindow::GetCharacterToUse);
SCRIPT_METHOD(InvWindow::set_CharacterToUse, InvWindow::SetCharacterToUse);
SCRIPT_METHOD(InvWindow::geti_ItemAtIndex, InvWindow::GetItemAtIndex);
SCRIPT_METHOD(InvWindow::get_ItemCount, InvWindow::GetItemCount);
SCRIPT_METHOD(InvWindow::get_ItemHeight, InvWindow::GetItemHeight);
SCRIPT_METHOD(InvWindow::set_ItemHeight, InvWindow::SetItemHeight);
SCRIPT_METHOD(InvWindow::get_ItemWidth, InvWindow::GetItemWidth);
SCRIPT_METHOD(InvWindow::set_ItemWidth, InvWindow::SetItemWidth);
SCRIPT_METHOD(InvWindow::get_ItemsPerRow, InvWindow::GetItemsPerRow);
SCRIPT_METHOD(InvWindow::get_RowCount, InvWindow::GetRowCount);
SCRIPT_METHOD(InvWindow::get_TopItem, InvWindow::GetTopItem);
SCRIPT_METHOD(InvWindow::set_TopItem, InvWindow::SetTopItem);
}
void InvWindow::ScrollDown(ScriptMethodParams &params) {
PARAMS1(GUIInvWindow *, guii);
AGS3::InvWindow_ScrollDown(guii);
}
void InvWindow::ScrollUp(ScriptMethodParams &params) {
PARAMS1(GUIInvWindow *, guii);
AGS3::InvWindow_ScrollUp(guii);
}
void InvWindow::GetCharacterToUse(ScriptMethodParams &params) {
PARAMS1(GUIInvWindow *, guii);
params._result = AGS3::InvWindow_GetCharacterToUse(guii);
}
void InvWindow::SetCharacterToUse(ScriptMethodParams &params) {
PARAMS2(GUIInvWindow *, guii, CharacterInfo *, chaa);
AGS3::InvWindow_SetCharacterToUse(guii, chaa);
}
void InvWindow::GetItemAtIndex(ScriptMethodParams &params) {
PARAMS2(GUIInvWindow *, guii, int, index);
params._result = AGS3::InvWindow_GetItemAtIndex(guii, index);
}
void InvWindow::GetItemCount(ScriptMethodParams &params) {
PARAMS1(GUIInvWindow *, guii);
params._result = AGS3::InvWindow_GetItemCount(guii);
}
void InvWindow::GetItemHeight(ScriptMethodParams &params) {
PARAMS1(GUIInvWindow *, guii);
params._result = AGS3::InvWindow_GetItemHeight(guii);
}
void InvWindow::SetItemHeight(ScriptMethodParams &params) {
PARAMS2(GUIInvWindow *, guii, int, newhit);
AGS3::InvWindow_SetItemHeight(guii, newhit);
}
void InvWindow::GetItemWidth(ScriptMethodParams &params) {
PARAMS1(GUIInvWindow *, guii);
params._result = AGS3::InvWindow_GetItemWidth(guii);
}
void InvWindow::SetItemWidth(ScriptMethodParams &params) {
PARAMS2(GUIInvWindow *, guii, int, newwidth);
AGS3::InvWindow_SetItemWidth(guii, newwidth);
}
void InvWindow::GetItemsPerRow(ScriptMethodParams &params) {
PARAMS1(GUIInvWindow *, guii);
params._result = AGS3::InvWindow_GetItemsPerRow(guii);
}
void InvWindow::GetRowCount(ScriptMethodParams &params) {
PARAMS1(GUIInvWindow *, guii);
params._result = AGS3::InvWindow_GetRowCount(guii);
}
void InvWindow::GetTopItem(ScriptMethodParams &params) {
PARAMS1(GUIInvWindow *, guii);
params._result = AGS3::InvWindow_GetTopItem(guii);
}
void InvWindow::SetTopItem(ScriptMethodParams &params) {
PARAMS2(GUIInvWindow *, guii, int, topitem);
AGS3::InvWindow_SetTopItem(guii, topitem);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,57 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_INV_WINDOW_H
#define AGS_PLUGINS_CORE_INV_WINDOW_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class InvWindow : public ScriptContainer {
BUILT_IN_HASH(InvWindow)
public:
virtual ~InvWindow() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void ScrollDown(ScriptMethodParams &params);
void ScrollUp(ScriptMethodParams &params);
void GetCharacterToUse(ScriptMethodParams &params);
void SetCharacterToUse(ScriptMethodParams &params);
void GetItemAtIndex(ScriptMethodParams &params);
void GetItemCount(ScriptMethodParams &params);
void GetItemHeight(ScriptMethodParams &params);
void SetItemHeight(ScriptMethodParams &params);
void GetItemWidth(ScriptMethodParams &params);
void SetItemWidth(ScriptMethodParams &params);
void GetItemsPerRow(ScriptMethodParams &params);
void GetRowCount(ScriptMethodParams &params);
void GetTopItem(ScriptMethodParams &params);
void SetTopItem(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,133 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/inventory_item.h"
#include "ags/engine/ac/inventory_item.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void InventoryItem::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(InventoryItem::GetAtScreenXY ^ 2, InventoryItem::GetInvAtLocation);
SCRIPT_METHOD(InventoryItem::IsInteractionAvailable ^ 1, InventoryItem::CheckInteractionAvailable);
SCRIPT_METHOD(InventoryItem::GetName ^ 1, InventoryItem::GetName);
SCRIPT_METHOD(InventoryItem::GetProperty ^ 1, InventoryItem::GetProperty);
SCRIPT_METHOD(InventoryItem::GetPropertyText ^ 2, InventoryItem::GetPropertyText);
SCRIPT_METHOD(InventoryItem::GetTextProperty ^ 1, InventoryItem::GetTextProperty);
SCRIPT_METHOD(InventoryItem::SetProperty ^ 2, InventoryItem::SetProperty);
SCRIPT_METHOD(InventoryItem::SetTextProperty ^ 2, InventoryItem::SetTextProperty);
SCRIPT_METHOD(InventoryItem::RunInteraction ^ 1, InventoryItem::RunInteraction);
SCRIPT_METHOD(InventoryItem::SetName ^ 1, InventoryItem::SetName);
SCRIPT_METHOD(InventoryItem::get_CursorGraphic, InventoryItem::GetCursorGraphic);
SCRIPT_METHOD(InventoryItem::set_CursorGraphic, InventoryItem::SetCursorGraphic);
SCRIPT_METHOD(InventoryItem::get_Graphic, InventoryItem::GetGraphic);
SCRIPT_METHOD(InventoryItem::set_Graphic, InventoryItem::SetGraphic);
SCRIPT_METHOD(InventoryItem::get_ID, InventoryItem::GetID);
SCRIPT_METHOD(InventoryItem::get_Name, InventoryItem::GetName_New);
SCRIPT_METHOD(InventoryItem::set_Name, InventoryItem::SetName);
}
void InventoryItem::GetInvAtLocation(ScriptMethodParams &params) {
PARAMS2(int, xx, int, yy);
params._result = AGS3::GetInvAtLocation(xx, yy);
}
void InventoryItem::CheckInteractionAvailable(ScriptMethodParams &params) {
PARAMS2(ScriptInvItem *, iitem, int, mood);
params._result = AGS3::InventoryItem_CheckInteractionAvailable(iitem, mood);
}
void InventoryItem::GetName(ScriptMethodParams &params) {
PARAMS2(ScriptInvItem *, iitem, char *, buff);
AGS3::InventoryItem_GetName(iitem, buff);
}
void InventoryItem::GetProperty(ScriptMethodParams &params) {
PARAMS2(ScriptInvItem *, scii, const char *, property);
params._result = AGS3::InventoryItem_GetProperty(scii, property);
}
void InventoryItem::GetPropertyText(ScriptMethodParams &params) {
PARAMS3(ScriptInvItem *, scii, const char *, property, char *, bufer);
AGS3::InventoryItem_GetPropertyText(scii, property, bufer);
}
void InventoryItem::GetTextProperty(ScriptMethodParams &params) {
PARAMS2(ScriptInvItem *, scii, const char *, property);
params._result = AGS3::InventoryItem_GetTextProperty(scii, property);
}
void InventoryItem::SetProperty(ScriptMethodParams &params) {
PARAMS3(ScriptInvItem *, scii, const char *, property, int, value);
params._result = AGS3::InventoryItem_SetProperty(scii, property, value);
}
void InventoryItem::SetTextProperty(ScriptMethodParams &params) {
PARAMS3(ScriptInvItem *, scii, const char *, property, const char *, value);
params._result = AGS3::InventoryItem_SetTextProperty(scii, property, value);
}
void InventoryItem::RunInteraction(ScriptMethodParams &params) {
PARAMS2(ScriptInvItem *, iitem, int, mood);
AGS3::InventoryItem_RunInteraction(iitem, mood);
}
void InventoryItem::SetName(ScriptMethodParams &params) {
PARAMS2(ScriptInvItem *, scii, const char *, newname);
AGS3::InventoryItem_SetName(scii, newname);
}
void InventoryItem::GetCursorGraphic(ScriptMethodParams &params) {
PARAMS1(ScriptInvItem *, iitem);
params._result = AGS3::InventoryItem_GetCursorGraphic(iitem);
}
void InventoryItem::SetCursorGraphic(ScriptMethodParams &params) {
PARAMS2(ScriptInvItem *, iitem, int, newSprite);
AGS3::InventoryItem_SetCursorGraphic(iitem, newSprite);
}
void InventoryItem::GetGraphic(ScriptMethodParams &params) {
PARAMS1(ScriptInvItem *, iitem);
params._result = AGS3::InventoryItem_GetGraphic(iitem);
}
void InventoryItem::SetGraphic(ScriptMethodParams &params) {
PARAMS2(ScriptInvItem *, iitem, int, piccy);
AGS3::InventoryItem_SetGraphic(iitem, piccy);
}
void InventoryItem::GetID(ScriptMethodParams &params) {
PARAMS1(ScriptInvItem *, iitem);
params._result = AGS3::InventoryItem_GetID(iitem);
}
void InventoryItem::GetName_New(ScriptMethodParams &params) {
PARAMS1(ScriptInvItem *, iitem);
params._result = AGS3::InventoryItem_GetName_New(iitem);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,59 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_INVENTORY_ITEM_H
#define AGS_PLUGINS_CORE_INVENTORY_ITEM_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class InventoryItem : public ScriptContainer {
BUILT_IN_HASH(InventoryItem)
public:
virtual ~InventoryItem() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void GetInvAtLocation(ScriptMethodParams &params);
void CheckInteractionAvailable(ScriptMethodParams &params);
void GetName(ScriptMethodParams &params);
void GetProperty(ScriptMethodParams &params);
void GetPropertyText(ScriptMethodParams &params);
void GetTextProperty(ScriptMethodParams &params);
void SetProperty(ScriptMethodParams &params);
void SetTextProperty(ScriptMethodParams &params);
void RunInteraction(ScriptMethodParams &params);
void SetName(ScriptMethodParams &params);
void GetCursorGraphic(ScriptMethodParams &params);
void SetCursorGraphic(ScriptMethodParams &params);
void GetGraphic(ScriptMethodParams &params);
void SetGraphic(ScriptMethodParams &params);
void GetID(ScriptMethodParams &params);
void GetName_New(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,79 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/label.h"
#include "ags/engine/ac/label.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void Label::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(Label::GetText^1, Label::GetText);
SCRIPT_METHOD(Label::SetText^1, Label::SetText);
SCRIPT_METHOD(Label::get_Font, Label::GetFont);
SCRIPT_METHOD(Label::set_Font, Label::SetFont);
SCRIPT_METHOD(Label::get_Text, Label::GetText_New);
SCRIPT_METHOD(Label::set_Text, Label::SetText);
SCRIPT_METHOD(Label::get_TextColor, Label::GetColor);
SCRIPT_METHOD(Label::set_TextColor, Label::SetColor);
}
void Label::GetText(ScriptMethodParams &params) {
PARAMS2(GUILabel *, labl, char *, buffer);
AGS3::Label_GetText(labl, buffer);
}
void Label::SetText(ScriptMethodParams &params) {
PARAMS2(GUILabel *, labl, const char *, newtx);
AGS3::Label_SetText(labl, newtx);
}
void Label::GetFont(ScriptMethodParams &params) {
PARAMS1(GUILabel *, labl);
params._result = AGS3::Label_GetFont(labl);
}
void Label::SetFont(ScriptMethodParams &params) {
PARAMS2(GUILabel *, guil, int, fontnum);
AGS3::Label_SetFont(guil, fontnum);
}
void Label::GetText_New(ScriptMethodParams &params) {
PARAMS1(GUILabel *, labl);
params._result = AGS3::Label_GetText_New(labl);
}
void Label::GetColor(ScriptMethodParams &params) {
PARAMS1(GUILabel *, labl);
params._result = AGS3::Label_GetColor(labl);
}
void Label::SetColor(ScriptMethodParams &params) {
PARAMS2(GUILabel *, labl, int, colr);
AGS3::Label_SetColor(labl, colr);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,50 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_LABEL_H
#define AGS_PLUGINS_CORE_LABEL_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class Label : public ScriptContainer {
BUILT_IN_HASH(Label)
public:
virtual ~Label() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void GetText(ScriptMethodParams &params);
void SetText(ScriptMethodParams &params);
void GetFont(ScriptMethodParams &params);
void SetFont(ScriptMethodParams &params);
void GetText_New(ScriptMethodParams &params);
void GetColor(ScriptMethodParams &params);
void SetColor(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,187 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/listbox.h"
#include "ags/engine/ac/listbox.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void ListBox::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(ListBox::AddItem^1, ListBox::AddItem);
SCRIPT_METHOD(ListBox::Clear^0, ListBox::Clear);
SCRIPT_METHOD(ListBox::FillDirList^1, ListBox::FillDirList);
SCRIPT_METHOD(ListBox::FillSaveGameList^0, ListBox::FillSaveGameList);
SCRIPT_METHOD(ListBox::GetItemAtLocation^2, ListBox::GetItemAtLocation);
SCRIPT_METHOD(ListBox::GetItemText^2, ListBox::GetItemText);
SCRIPT_METHOD(ListBox::InsertItemAt^2, ListBox::InsertItemAt);
SCRIPT_METHOD(ListBox::RemoveItem^1, ListBox::RemoveItem);
SCRIPT_METHOD(ListBox::ScrollDown^0, ListBox::ScrollDown);
SCRIPT_METHOD(ListBox::ScrollUp^0, ListBox::ScrollUp);
SCRIPT_METHOD(ListBox::SetItemText^2, ListBox::SetItemText);
SCRIPT_METHOD(ListBox::get_Font, ListBox::GetFont);
SCRIPT_METHOD(ListBox::set_Font, ListBox::SetFont);
SCRIPT_METHOD(ListBox::get_HideBorder, ListBox::GetHideBorder);
SCRIPT_METHOD(ListBox::set_HideBorder, ListBox::SetHideBorder);
SCRIPT_METHOD(ListBox::get_HideScrollArrows, ListBox::GetHideScrollArrows);
SCRIPT_METHOD(ListBox::set_HideScrollArrows, ListBox::SetHideScrollArrows);
SCRIPT_METHOD(ListBox::get_ItemCount, ListBox::GetItemCount);
SCRIPT_METHOD(ListBox::geti_Items, ListBox::GetItems);
SCRIPT_METHOD(ListBox::seti_Items, ListBox::SetItemText);
SCRIPT_METHOD(ListBox::get_RowCount, ListBox::GetRowCount);
SCRIPT_METHOD(ListBox::geti_SaveGameSlots, ListBox::GetSaveGameSlots);
SCRIPT_METHOD(ListBox::get_SelectedIndex, ListBox::GetSelectedIndex);
SCRIPT_METHOD(ListBox::set_SelectedIndex, ListBox::SetSelectedIndex);
SCRIPT_METHOD(ListBox::get_TopItem, ListBox::GetTopItem);
SCRIPT_METHOD(ListBox::set_TopItem, ListBox::SetTopItem);
}
void ListBox::AddItem(ScriptMethodParams &params) {
PARAMS2(GUIListBox *, lbb, const char *, text);
params._result = AGS3::ListBox_AddItem(lbb, text);
}
void ListBox::Clear(ScriptMethodParams &params) {
PARAMS1(GUIListBox *, listbox);
AGS3::ListBox_Clear(listbox);
}
void ListBox::FillDirList(ScriptMethodParams &params) {
PARAMS2(GUIListBox *, listbox, const char *, filemask);
AGS3::ListBox_FillDirList(listbox, filemask);
}
void ListBox::FillSaveGameList(ScriptMethodParams &params) {
PARAMS1(GUIListBox *, listbox);
params._result = AGS3::ListBox_FillSaveGameList(listbox);
}
void ListBox::GetItemAtLocation(ScriptMethodParams &params) {
PARAMS3(GUIListBox *, listbox, int, x, int, y);
params._result = AGS3::ListBox_GetItemAtLocation(listbox, x, y);
}
void ListBox::GetItemText(ScriptMethodParams &params) {
PARAMS3(GUIListBox *, listbox, int, index, char *, buffer);
params._result = AGS3::ListBox_GetItemText(listbox, index, buffer);
}
void ListBox::InsertItemAt(ScriptMethodParams &params) {
PARAMS3(GUIListBox *, lbb, int, index, const char *, text);
params._result = AGS3::ListBox_InsertItemAt(lbb, index, text);
}
void ListBox::RemoveItem(ScriptMethodParams &params) {
PARAMS2(GUIListBox *, listbox, int, itemIndex);
AGS3::ListBox_RemoveItem(listbox, itemIndex);
}
void ListBox::ScrollDown(ScriptMethodParams &params) {
PARAMS1(GUIListBox *, listbox);
AGS3::ListBox_ScrollDown(listbox);
}
void ListBox::ScrollUp(ScriptMethodParams &params) {
PARAMS1(GUIListBox *, listbox);
AGS3::ListBox_ScrollUp(listbox);
}
void ListBox::SetItemText(ScriptMethodParams &params) {
PARAMS3(GUIListBox *, listbox, int, index, const char *, newtext);
AGS3::ListBox_SetItemText(listbox, index, newtext);
}
void ListBox::GetFont(ScriptMethodParams &params) {
PARAMS1(GUIListBox *, listbox);
params._result = AGS3::ListBox_GetFont(listbox);
}
void ListBox::SetFont(ScriptMethodParams &params) {
PARAMS2(GUIListBox *, listbox, int, newfont);
AGS3::ListBox_SetFont(listbox, newfont);
}
void ListBox::GetHideBorder(ScriptMethodParams &params) {
PARAMS1(GUIListBox *, listbox);
params._result = AGS3::ListBox_GetHideBorder(listbox);
}
void ListBox::SetHideBorder(ScriptMethodParams &params) {
PARAMS2(GUIListBox *, listbox, int, newValue);
AGS3::ListBox_SetHideBorder(listbox, newValue);
}
void ListBox::GetHideScrollArrows(ScriptMethodParams &params) {
PARAMS1(GUIListBox *, listbox);
params._result = AGS3::ListBox_GetHideScrollArrows(listbox);
}
void ListBox::SetHideScrollArrows(ScriptMethodParams &params) {
PARAMS2(GUIListBox *, listbox, int, newValue);
AGS3::ListBox_SetHideScrollArrows(listbox, newValue);
}
void ListBox::GetItemCount(ScriptMethodParams &params) {
PARAMS1(GUIListBox *, listbox);
params._result = AGS3::ListBox_GetItemCount(listbox);
}
void ListBox::GetItems(ScriptMethodParams &params) {
PARAMS2(GUIListBox *, listbox, int, index);
params._result = AGS3::ListBox_GetItems(listbox, index);
}
void ListBox::GetRowCount(ScriptMethodParams &params) {
PARAMS1(GUIListBox *, listbox);
params._result = AGS3::ListBox_GetRowCount(listbox);
}
void ListBox::GetSaveGameSlots(ScriptMethodParams &params) {
PARAMS2(GUIListBox *, listbox, int, index);
params._result = AGS3::ListBox_GetSaveGameSlots(listbox, index);
}
void ListBox::GetSelectedIndex(ScriptMethodParams &params) {
PARAMS1(GUIListBox *, listbox);
params._result = AGS3::ListBox_GetSelectedIndex(listbox);
}
void ListBox::SetSelectedIndex(ScriptMethodParams &params) {
PARAMS2(GUIListBox *, guisl, int, newsel);
AGS3::ListBox_SetSelectedIndex(guisl, newsel);
}
void ListBox::GetTopItem(ScriptMethodParams &params) {
PARAMS1(GUIListBox *, listbox);
params._result = AGS3::ListBox_GetTopItem(listbox);
}
void ListBox::SetTopItem(ScriptMethodParams &params) {
PARAMS2(GUIListBox *, guisl, int, item);
AGS3::ListBox_SetTopItem(guisl, item);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,68 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_LISTBOX_H
#define AGS_PLUGINS_CORE_LISTBOX_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class ListBox : public ScriptContainer {
BUILT_IN_HASH(ListBox)
public:
virtual ~ListBox() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void AddItem(ScriptMethodParams &params);
void Clear(ScriptMethodParams &params);
void FillDirList(ScriptMethodParams &params);
void FillSaveGameList(ScriptMethodParams &params);
void GetItemAtLocation(ScriptMethodParams &params);
void GetItemText(ScriptMethodParams &params);
void InsertItemAt(ScriptMethodParams &params);
void RemoveItem(ScriptMethodParams &params);
void ScrollDown(ScriptMethodParams &params);
void ScrollUp(ScriptMethodParams &params);
void SetItemText(ScriptMethodParams &params);
void GetFont(ScriptMethodParams &params);
void SetFont(ScriptMethodParams &params);
void GetHideBorder(ScriptMethodParams &params);
void SetHideBorder(ScriptMethodParams &params);
void GetHideScrollArrows(ScriptMethodParams &params);
void SetHideScrollArrows(ScriptMethodParams &params);
void GetItemCount(ScriptMethodParams &params);
void GetItems(ScriptMethodParams &params);
void GetRowCount(ScriptMethodParams &params);
void GetSaveGameSlots(ScriptMethodParams &params);
void GetSelectedIndex(ScriptMethodParams &params);
void SetSelectedIndex(ScriptMethodParams &params);
void GetTopItem(ScriptMethodParams &params);
void SetTopItem(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,143 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/maths.h"
#include "ags/engine/ac/math.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void Maths::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(Maths::ArcCos^1, Maths::ArcCos);
SCRIPT_METHOD(Maths::ArcSin^1, Maths::ArcSin);
SCRIPT_METHOD(Maths::ArcTan^1, Maths::ArcTan);
SCRIPT_METHOD(Maths::ArcTan2^2, Maths::ArcTan2);
SCRIPT_METHOD(Maths::Cos^1, Maths::Cos);
SCRIPT_METHOD(Maths::Cosh^1, Maths::Cosh);
SCRIPT_METHOD(Maths::DegreesToRadians^1, Maths::DegreesToRadians);
SCRIPT_METHOD(Maths::Exp^1, Maths::Exp);
SCRIPT_METHOD(Maths::Log^1, Maths::Log);
SCRIPT_METHOD(Maths::Log10^1, Maths::Log10);
SCRIPT_METHOD(Maths::RadiansToDegrees^1, Maths::RadiansToDegrees);
SCRIPT_METHOD(Maths::RaiseToPower^2, Maths::RaiseToPower);
SCRIPT_METHOD(Maths::Sin^1, Maths::Sin);
SCRIPT_METHOD(Maths::Sinh^1, Maths::Sinh);
SCRIPT_METHOD(Maths::Sqrt^1, Maths::Sqrt);
SCRIPT_METHOD(Maths::Tan^1, Maths::Tan);
SCRIPT_METHOD(Maths::Tanh^1, Maths::Tanh);
SCRIPT_METHOD(Maths::get_Pi, Maths::GetPi);
}
void Maths::ArcCos(ScriptMethodParams &params) {
PARAMS1(float, value);
params._result = AGS3::Math_ArcCos(value);
}
void Maths::ArcSin(ScriptMethodParams &params) {
PARAMS1(float, value);
params._result = AGS3::Math_ArcSin(value);
}
void Maths::ArcTan(ScriptMethodParams &params) {
PARAMS1(float, value);
params._result = AGS3::Math_ArcTan(value);
}
void Maths::ArcTan2(ScriptMethodParams &params) {
PARAMS2(float, yval, float, xval);
params._result = AGS3::Math_ArcTan2(yval, xval);
}
void Maths::Cos(ScriptMethodParams &params) {
PARAMS1(float, value);
params._result = AGS3::Math_Cos(value);
}
void Maths::Cosh(ScriptMethodParams &params) {
PARAMS1(float, value);
params._result = AGS3::Math_Cosh(value);
}
void Maths::DegreesToRadians(ScriptMethodParams &params) {
PARAMS1(float, value);
params._result = AGS3::Math_DegreesToRadians(value);
}
void Maths::Exp(ScriptMethodParams &params) {
PARAMS1(float, value);
params._result = AGS3::Math_Exp(value);
}
void Maths::Log(ScriptMethodParams &params) {
PARAMS1(float, value);
params._result = AGS3::Math_Log(value);
}
void Maths::Log10(ScriptMethodParams &params) {
PARAMS1(float, value);
params._result = AGS3::Math_Log10(value);
}
void Maths::RadiansToDegrees(ScriptMethodParams &params) {
PARAMS1(float, value);
params._result = AGS3::Math_RadiansToDegrees(value);
}
void Maths::RaiseToPower(ScriptMethodParams &params) {
PARAMS2(float, base, float, exp);
params._result = AGS3::Math_RaiseToPower(base, exp);
}
void Maths::Sin(ScriptMethodParams &params) {
PARAMS1(float, value);
params._result = AGS3::Math_Sin(value);
}
void Maths::Sinh(ScriptMethodParams &params) {
PARAMS1(float, value);
params._result = AGS3::Math_Sinh(value);
}
void Maths::Sqrt(ScriptMethodParams &params) {
PARAMS1(float, value);
params._result = AGS3::Math_Sqrt(value);
}
void Maths::Tan(ScriptMethodParams &params) {
PARAMS1(float, value);
params._result = AGS3::Math_Tan(value);
}
void Maths::Tanh(ScriptMethodParams &params) {
PARAMS1(float, value);
params._result = AGS3::Math_Tanh(value);
}
void Maths::GetPi(ScriptMethodParams &params) {
params._result = AGS3::Math_GetPi();
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,61 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_MATH_H
#define AGS_PLUGINS_CORE_MATH_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class Maths : public ScriptContainer {
BUILT_IN_HASH(Maths)
public:
virtual ~Maths() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void ArcCos(ScriptMethodParams &params);
void ArcSin(ScriptMethodParams &params);
void ArcTan(ScriptMethodParams &params);
void ArcTan2(ScriptMethodParams &params);
void Cos(ScriptMethodParams &params);
void Cosh(ScriptMethodParams &params);
void DegreesToRadians(ScriptMethodParams &params);
void Exp(ScriptMethodParams &params);
void Log(ScriptMethodParams &params);
void Log10(ScriptMethodParams &params);
void RadiansToDegrees(ScriptMethodParams &params);
void RaiseToPower(ScriptMethodParams &params);
void Sin(ScriptMethodParams &params);
void Sinh(ScriptMethodParams &params);
void Sqrt(ScriptMethodParams &params);
void Tan(ScriptMethodParams &params);
void Tanh(ScriptMethodParams &params);
void GetPi(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,150 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/mouse.h"
#include "ags/engine/ac/mouse.h"
#include "ags/engine/ac/global_game.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void Mouse::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(Mouse::ChangeModeGraphic^2, Mouse::ChangeCursorGraphic);
SCRIPT_METHOD(Mouse::ChangeModeHotspot^3, Mouse::ChangeCursorHotspot);
SCRIPT_METHOD(Mouse::ChangeModeView^2, Mouse::Mouse_ChangeModeView2);
SCRIPT_METHOD(Mouse::DisableMode^1, Mouse::disable_cursor_mode);
SCRIPT_METHOD(Mouse::EnableMode^1, Mouse::enable_cursor_mode);
SCRIPT_METHOD(Mouse::GetModeGraphic^1, Mouse::Mouse_GetModeGraphic);
SCRIPT_METHOD(Mouse::IsButtonDown^1, Mouse::IsButtonDown);
SCRIPT_METHOD(Mouse::IsModeEnabled^1, Mouse::IsModeEnabled);
SCRIPT_METHOD(Mouse::SaveCursorUntilItLeaves^0, Mouse::SaveCursorForLocationChange);
SCRIPT_METHOD(Mouse::SelectNextMode^0, Mouse::SetNextCursor);
SCRIPT_METHOD(Mouse::SelectPreviousMode^0, Mouse::SetPreviousCursor);
SCRIPT_METHOD(Mouse::SetBounds^4, Mouse::SetMouseBounds);
SCRIPT_METHOD(Mouse::SetPosition^2, Mouse::SetMousePosition);
SCRIPT_METHOD(Mouse::Update^0, Mouse::RefreshMouse);
SCRIPT_METHOD(Mouse::UseDefaultGraphic^0, Mouse::set_default_cursor);
SCRIPT_METHOD(Mouse::UseModeGraphic^1, Mouse::set_mouse_cursor);
SCRIPT_METHOD(Mouse::get_Mode, Mouse::GetCursorMode);
SCRIPT_METHOD(Mouse::set_Mode, Mouse::set_cursor_mode);
SCRIPT_METHOD(Mouse::get_Visible, Mouse::Mouse_GetVisible);
SCRIPT_METHOD(Mouse::set_Visible, Mouse::Mouse_SetVisible);
}
void Mouse::ChangeCursorGraphic(ScriptMethodParams &params) {
PARAMS2(int, curs, int, newslot);
AGS3::ChangeCursorGraphic(curs, newslot);
}
void Mouse::ChangeCursorHotspot(ScriptMethodParams &params) {
PARAMS3(int, curs, int, x, int, y);
AGS3::ChangeCursorHotspot(curs, x, y);
}
void Mouse::Mouse_ChangeModeView2(ScriptMethodParams &params) {
PARAMS2(int, curs, int, newview);
AGS3::Mouse_ChangeModeView2(curs, newview);
}
void Mouse::disable_cursor_mode(ScriptMethodParams &params) {
PARAMS1(int, modd);
AGS3::disable_cursor_mode(modd);
}
void Mouse::enable_cursor_mode(ScriptMethodParams &params) {
PARAMS1(int, modd);
AGS3::enable_cursor_mode(modd);
}
void Mouse::Mouse_GetModeGraphic(ScriptMethodParams &params) {
PARAMS1(int, curs);
params._result = AGS3::Mouse_GetModeGraphic(curs);
}
void Mouse::IsButtonDown(ScriptMethodParams &params) {
PARAMS1(int, curs);
params._result = AGS3::IsButtonDown(curs);
}
void Mouse::IsModeEnabled(ScriptMethodParams &params) {
PARAMS1(int, curs);
params._result = AGS3::IsModeEnabled(curs);
}
void Mouse::SaveCursorForLocationChange(ScriptMethodParams &params) {
AGS3::SaveCursorForLocationChange();
}
void Mouse::SetNextCursor(ScriptMethodParams &params) {
AGS3::SetNextCursor();
}
void Mouse::SetPreviousCursor(ScriptMethodParams &params) {
AGS3::SetPreviousCursor();
}
void Mouse::SetMouseBounds(ScriptMethodParams &params) {
PARAMS4(int, x1, int, y1, int, x2, int, y2);
AGS3::SetMouseBounds(x1, y1, x2, y2);
}
void Mouse::SetMousePosition(ScriptMethodParams &params) {
PARAMS2(int, newx, int, newy);
AGS3::SetMousePosition(newx, newy);
}
void Mouse::RefreshMouse(ScriptMethodParams &params) {
AGS3::RefreshMouse();
}
void Mouse::set_default_cursor(ScriptMethodParams &params) {
AGS3::set_default_cursor();
}
void Mouse::set_mouse_cursor(ScriptMethodParams &params) {
PARAMS1(int, newcurs);
AGS3::set_mouse_cursor(newcurs);
}
void Mouse::GetCursorMode(ScriptMethodParams &params) {
params._result = AGS3::GetCursorMode();
}
void Mouse::set_cursor_mode(ScriptMethodParams &params) {
PARAMS1(int, newmode);
AGS3::set_cursor_mode(newmode);
}
void Mouse::Mouse_GetVisible(ScriptMethodParams &params) {
params._result = AGS3::Mouse_GetVisible();
}
void Mouse::Mouse_SetVisible(ScriptMethodParams &params) {
PARAMS1(int, isOn);
AGS3::Mouse_SetVisible(isOn);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,63 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_MOUSE_H
#define AGS_PLUGINS_CORE_MOUSE_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class Mouse : public ScriptContainer {
BUILT_IN_HASH(Mouse)
public:
virtual ~Mouse() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void ChangeCursorGraphic(ScriptMethodParams &params);
void ChangeCursorHotspot(ScriptMethodParams &params);
void Mouse_ChangeModeView2(ScriptMethodParams &params);
void disable_cursor_mode(ScriptMethodParams &params);
void enable_cursor_mode(ScriptMethodParams &params);
void Mouse_GetModeGraphic(ScriptMethodParams &params);
void IsButtonDown(ScriptMethodParams &params);
void IsModeEnabled(ScriptMethodParams &params);
void SaveCursorForLocationChange(ScriptMethodParams &params);
void SetNextCursor(ScriptMethodParams &params);
void SetPreviousCursor(ScriptMethodParams &params);
void SetMouseBounds(ScriptMethodParams &params);
void SetMousePosition(ScriptMethodParams &params);
void RefreshMouse(ScriptMethodParams &params);
void set_default_cursor(ScriptMethodParams &params);
void set_mouse_cursor(ScriptMethodParams &params);
void GetCursorMode(ScriptMethodParams &params);
void set_cursor_mode(ScriptMethodParams &params);
void Mouse_GetVisible(ScriptMethodParams &params);
void Mouse_SetVisible(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,336 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/object.h"
#include "ags/engine/ac/object.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void Object::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(Object::Animate^5, Object::Animate);
SCRIPT_METHOD(Object::IsCollidingWithObject^1, Object::IsCollidingWithObject);
SCRIPT_METHOD(Object::GetName^1, Object::GetName);
SCRIPT_METHOD(Object::GetProperty^1, Object::GetProperty);
SCRIPT_METHOD(Object::GetPropertyText^2, Object::GetPropertyText);
SCRIPT_METHOD(Object::GetTextProperty^1, Object::GetTextProperty);
SCRIPT_METHOD(Object::SetProperty^2, Object::SetProperty);
SCRIPT_METHOD(Object::SetTextProperty^2, Object::SetTextProperty);
SCRIPT_METHOD(Object::MergeIntoBackground^0, Object::MergeIntoBackground);
SCRIPT_METHOD(Object::Move^5, Object::Move);
SCRIPT_METHOD(Object::RemoveTint^0, Object::RemoveTint);
SCRIPT_METHOD(Object::RunInteraction^1, Object::RunInteraction);
SCRIPT_METHOD(Object::SetPosition^2, Object::SetPosition);
SCRIPT_METHOD(Object::SetView^3, Object::SetView);
SCRIPT_METHOD(Object::StopAnimating^0, Object::StopAnimating);
SCRIPT_METHOD(Object::StopMoving^0, Object::StopMoving);
SCRIPT_METHOD(Object::Tint^5, Object::Tint);
SCRIPT_METHOD(Object::GetAtRoomXY^2, Object::GetObjectAtRoom);
SCRIPT_METHOD(Object::GetAtScreenXY^2, Object::GetObjectAtScreen);
SCRIPT_METHOD(Object::get_Animating, Object::GetAnimating);
SCRIPT_METHOD(Object::get_Baseline, Object::GetBaseline);
SCRIPT_METHOD(Object::set_Baseline, Object::SetBaseline);
SCRIPT_METHOD(Object::get_BlockingHeight, Object::GetBlockingHeight);
SCRIPT_METHOD(Object::set_BlockingHeight, Object::SetBlockingHeight);
SCRIPT_METHOD(Object::get_BlockingWidth, Object::GetBlockingWidth);
SCRIPT_METHOD(Object::set_BlockingWidth, Object::SetBlockingWidth);
SCRIPT_METHOD(Object::get_Clickable, Object::GetClickable);
SCRIPT_METHOD(Object::set_Clickable, Object::SetClickable);
SCRIPT_METHOD(Object::get_Frame, Object::GetFrame);
SCRIPT_METHOD(Object::get_Graphic, Object::GetGraphic);
SCRIPT_METHOD(Object::set_Graphic, Object::SetGraphic);
SCRIPT_METHOD(Object::get_ID, Object::GetID);
SCRIPT_METHOD(Object::get_IgnoreScaling, Object::GetIgnoreScaling);
SCRIPT_METHOD(Object::set_IgnoreScaling, Object::SetIgnoreScaling);
SCRIPT_METHOD(Object::get_IgnoreWalkbehinds, Object::GetIgnoreWalkbehinds);
SCRIPT_METHOD(Object::set_IgnoreWalkbehinds, Object::SetIgnoreWalkbehinds);
SCRIPT_METHOD(Object::get_Loop, Object::GetLoop);
SCRIPT_METHOD(Object::get_Moving, Object::GetMoving);
SCRIPT_METHOD(Object::get_Name, Object::GetName_New);
SCRIPT_METHOD(Object::get_Solid, Object::GetSolid);
SCRIPT_METHOD(Object::set_Solid, Object::SetSolid);
SCRIPT_METHOD(Object::get_Transparency, Object::GetTransparency);
SCRIPT_METHOD(Object::set_Transparency, Object::SetTransparency);
SCRIPT_METHOD(Object::get_View, Object::GetView);
SCRIPT_METHOD(Object::get_Visible, Object::GetVisible);
SCRIPT_METHOD(Object::set_Visible, Object::SetVisible);
SCRIPT_METHOD(Object::get_X, Object::GetX);
SCRIPT_METHOD(Object::set_X, Object::SetX);
SCRIPT_METHOD(Object::get_Y, Object::GetY);
SCRIPT_METHOD(Object::set_Y, Object::SetY);
}
void Object::Animate(ScriptMethodParams &params) {
PARAMS6(ScriptObject *, objj, int, loop, int, delay, int, repeat, int, blocking, int, direction);
AGS3::Object_Animate(objj, loop, delay, repeat, blocking, direction);
}
void Object::IsCollidingWithObject(ScriptMethodParams &params) {
PARAMS2(ScriptObject *, objj, ScriptObject *, obj2);
params._result = AGS3::Object_IsCollidingWithObject(objj, obj2);
}
void Object::GetName(ScriptMethodParams &params) {
PARAMS2(ScriptObject *, objj, char *, buffer);
AGS3::Object_GetName(objj, buffer);
}
void Object::GetProperty(ScriptMethodParams &params) {
PARAMS2(ScriptObject *, objj, const char *, property);
params._result = AGS3::Object_GetProperty(objj, property);
}
void Object::GetPropertyText(ScriptMethodParams &params) {
PARAMS3(ScriptObject *, objj, const char *, property, char *, buffer);
AGS3::Object_GetPropertyText(objj, property, buffer);
}
void Object::GetTextProperty(ScriptMethodParams &params) {
PARAMS2(ScriptObject *, objj, const char *, property);
params._result = AGS3::Object_GetTextProperty(objj, property);
}
void Object::SetProperty(ScriptMethodParams &params) {
PARAMS3(ScriptObject *, objj, const char *, property, int, value);
params._result = AGS3::Object_SetProperty(objj, property, value);
}
void Object::SetTextProperty(ScriptMethodParams &params) {
PARAMS3(ScriptObject *, objj, const char *, property, const char *, value);
params._result = AGS3::Object_SetTextProperty(objj, property, value);
}
void Object::MergeIntoBackground(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
AGS3::Object_MergeIntoBackground(objj);
}
void Object::Move(ScriptMethodParams &params) {
PARAMS6(ScriptObject *, objj, int, x, int, y, int, speed, int, blocking, int, direct);
AGS3::Object_Move(objj, x, y, speed, blocking, direct);
}
void Object::RemoveTint(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
AGS3::Object_RemoveTint(objj);
}
void Object::RunInteraction(ScriptMethodParams &params) {
PARAMS2(ScriptObject *, objj, int, mode);
AGS3::Object_RunInteraction(objj, mode);
}
void Object::SetPosition(ScriptMethodParams &params) {
PARAMS3(ScriptObject *, objj, int, xx, int, yy);
AGS3::Object_SetPosition(objj, xx, yy);
}
void Object::SetView(ScriptMethodParams &params) {
PARAMS4(ScriptObject *, objj, int, view, int, loop, int, frame);
AGS3::Object_SetView(objj, view, loop, frame);
}
void Object::StopAnimating(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
AGS3::Object_StopAnimating(objj);
}
void Object::StopMoving(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
AGS3::Object_StopMoving(objj);
}
void Object::Tint(ScriptMethodParams &params) {
PARAMS6(ScriptObject *, objj, int, red, int, green, int, blue, int, saturation, int, luminance);
AGS3::Object_Tint(objj, red, green, blue, saturation, luminance);
}
void Object::GetObjectAtRoom(ScriptMethodParams &params) {
PARAMS2(int, x, int, y);
params._result = AGS3::GetObjectAtRoom(x, y);
}
void Object::GetObjectAtScreen(ScriptMethodParams &params) {
PARAMS2(int, xx, int, yy);
params._result = AGS3::GetObjectAtScreen(xx, yy);
}
void Object::GetAnimating(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetAnimating(objj);
}
void Object::GetBaseline(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetBaseline(objj);
}
void Object::SetBaseline(ScriptMethodParams &params) {
PARAMS2(ScriptObject *, objj, int, basel);
AGS3::Object_SetBaseline(objj, basel);
}
void Object::GetBlockingHeight(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetBlockingHeight(objj);
}
void Object::SetBlockingHeight(ScriptMethodParams &params) {
PARAMS2(ScriptObject *, objj, int, bhit);
AGS3::Object_SetBlockingHeight(objj, bhit);
}
void Object::GetBlockingWidth(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetBlockingWidth(objj);
}
void Object::SetBlockingWidth(ScriptMethodParams &params) {
PARAMS2(ScriptObject *, objj, int, bwid);
AGS3::Object_SetBlockingWidth(objj, bwid);
}
void Object::GetClickable(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetClickable(objj);
}
void Object::SetClickable(ScriptMethodParams &params) {
PARAMS2(ScriptObject *, objj, int, clik);
AGS3::Object_SetClickable(objj, clik);
}
void Object::GetFrame(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetFrame(objj);
}
void Object::GetGraphic(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetGraphic(objj);
}
void Object::SetGraphic(ScriptMethodParams &params) {
PARAMS2(ScriptObject *, objj, int, slott);
AGS3::Object_SetGraphic(objj, slott);
}
void Object::GetID(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetID(objj);
}
void Object::GetIgnoreScaling(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetIgnoreScaling(objj);
}
void Object::SetIgnoreScaling(ScriptMethodParams &params) {
PARAMS2(ScriptObject *, objj, int, newval);
AGS3::Object_SetIgnoreScaling(objj, newval);
}
void Object::GetIgnoreWalkbehinds(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetIgnoreWalkbehinds(objj);
}
void Object::SetIgnoreWalkbehinds(ScriptMethodParams &params) {
PARAMS2(ScriptObject *, chaa, int, clik);
AGS3::Object_SetIgnoreWalkbehinds(chaa, clik);
}
void Object::GetLoop(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetLoop(objj);
}
void Object::GetMoving(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetMoving(objj);
}
void Object::GetName_New(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetName_New(objj);
}
void Object::GetSolid(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetSolid(objj);
}
void Object::SetSolid(ScriptMethodParams &params) {
PARAMS2(ScriptObject *, objj, int, solid);
AGS3::Object_SetSolid(objj, solid);
}
void Object::GetTransparency(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetTransparency(objj);
}
void Object::SetTransparency(ScriptMethodParams &params) {
PARAMS2(ScriptObject *, objj, int, trans);
AGS3::Object_SetTransparency(objj, trans);
}
void Object::GetView(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetView(objj);
}
void Object::GetVisible(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetVisible(objj);
}
void Object::SetVisible(ScriptMethodParams &params) {
PARAMS2(ScriptObject *, objj, int, onOrOff);
AGS3::Object_SetVisible(objj, onOrOff);
}
void Object::GetX(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetX(objj);
}
void Object::SetX(ScriptMethodParams &params) {
PARAMS2(ScriptObject *, objj, int, xx);
AGS3::Object_SetY(objj, xx);
}
void Object::GetY(ScriptMethodParams &params) {
PARAMS1(ScriptObject *, objj);
params._result = AGS3::Object_GetY(objj);
}
void Object::SetY(ScriptMethodParams &params) {
PARAMS2(ScriptObject *, objj, int, yy);
AGS3::Object_SetY(objj, yy);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,93 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_OBJECT_H
#define AGS_PLUGINS_CORE_OBJECT_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class Object : public ScriptContainer {
BUILT_IN_HASH(Object)
public:
virtual ~Object() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void Animate(ScriptMethodParams &params);
void IsCollidingWithObject(ScriptMethodParams &params);
void GetName(ScriptMethodParams &params);
void GetProperty(ScriptMethodParams &params);
void GetPropertyText(ScriptMethodParams &params);
void GetTextProperty(ScriptMethodParams &params);
void SetProperty(ScriptMethodParams &params);
void SetTextProperty(ScriptMethodParams &params);
void MergeIntoBackground(ScriptMethodParams &params);
void Move(ScriptMethodParams &params);
void RemoveTint(ScriptMethodParams &params);
void RunInteraction(ScriptMethodParams &params);
void SetPosition(ScriptMethodParams &params);
void SetView(ScriptMethodParams &params);
void StopAnimating(ScriptMethodParams &params);
void StopMoving(ScriptMethodParams &params);
void Tint(ScriptMethodParams &params);
void GetObjectAtRoom(ScriptMethodParams &params);
void GetObjectAtScreen(ScriptMethodParams &params);
void GetAnimating(ScriptMethodParams &params);
void GetBaseline(ScriptMethodParams &params);
void SetBaseline(ScriptMethodParams &params);
void GetBlockingHeight(ScriptMethodParams &params);
void SetBlockingHeight(ScriptMethodParams &params);
void GetBlockingWidth(ScriptMethodParams &params);
void SetBlockingWidth(ScriptMethodParams &params);
void GetClickable(ScriptMethodParams &params);
void SetClickable(ScriptMethodParams &params);
void GetFrame(ScriptMethodParams &params);
void GetGraphic(ScriptMethodParams &params);
void SetGraphic(ScriptMethodParams &params);
void GetID(ScriptMethodParams &params);
void GetIgnoreScaling(ScriptMethodParams &params);
void SetIgnoreScaling(ScriptMethodParams &params);
void GetIgnoreWalkbehinds(ScriptMethodParams &params);
void SetIgnoreWalkbehinds(ScriptMethodParams &params);
void GetLoop(ScriptMethodParams &params);
void GetMoving(ScriptMethodParams &params);
void GetName_New(ScriptMethodParams &params);
void GetSolid(ScriptMethodParams &params);
void SetSolid(ScriptMethodParams &params);
void GetTransparency(ScriptMethodParams &params);
void SetTransparency(ScriptMethodParams &params);
void GetView(ScriptMethodParams &params);
void GetVisible(ScriptMethodParams &params);
void SetVisible(ScriptMethodParams &params);
void GetX(ScriptMethodParams &params);
void SetX(ScriptMethodParams &params);
void GetY(ScriptMethodParams &params);
void SetY(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,91 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/overlay.h"
#include "ags/engine/ac/overlay.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void Overlay::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(Overlay::CreateGraphical^4, Overlay::CreateGraphical);
SCRIPT_METHOD(Overlay::CreateTextual^106, Overlay::ScPl_CreateTextual);
SCRIPT_METHOD(Overlay::SetText^104, Overlay::ScPl_SetText);
SCRIPT_METHOD(Overlay::Remove^0, Overlay::Remove);
SCRIPT_METHOD(Overlay::get_Valid, Overlay::GetValid);
SCRIPT_METHOD(Overlay::get_X, Overlay::GetX);
SCRIPT_METHOD(Overlay::set_X, Overlay::SetX);
SCRIPT_METHOD(Overlay::get_Y, Overlay::GetY);
SCRIPT_METHOD(Overlay::set_Y, Overlay::SetY);
}
void Overlay::CreateGraphical(ScriptMethodParams &params) {
PARAMS4(int, x, int, y, int, slot, int, transparent);
params._result = AGS3::Overlay_CreateGraphical(x, y, slot, transparent);
}
void Overlay::ScPl_CreateTextual(ScriptMethodParams &params) {
PARAMS6(int, x, int, y, int, width, int, font, int, colour, const char *, text);
params._result = AGS3::Overlay_CreateTextual(x, y, width, font, colour, text);
}
void Overlay::ScPl_SetText(ScriptMethodParams &params) {
PARAMS5(int, x, int, y, int, width, int, font, int, colour);
Common::String text = params.format(5);
params._result = AGS3::Overlay_CreateTextual(x, y, width, font, colour, text.c_str());
}
void Overlay::Remove(ScriptMethodParams &params) {
PARAMS1(ScriptOverlay *, sco);
AGS3::Overlay_Remove(sco);
}
void Overlay::GetValid(ScriptMethodParams &params) {
PARAMS1(ScriptOverlay *, sco);
params._result = AGS3::Overlay_GetValid(sco);
}
void Overlay::GetX(ScriptMethodParams &params) {
PARAMS1(ScriptOverlay *, sco);
params._result = AGS3::Overlay_GetX(sco);
}
void Overlay::SetX(ScriptMethodParams &params) {
PARAMS2(ScriptOverlay *, scover, int, newx);
AGS3::Overlay_SetX(scover, newx);
}
void Overlay::GetY(ScriptMethodParams &params) {
PARAMS1(ScriptOverlay *, sco);
params._result = AGS3::Overlay_GetY(sco);
}
void Overlay::SetY(ScriptMethodParams &params) {
PARAMS2(ScriptOverlay *, scover, int, newy);
AGS3::Overlay_SetY(scover, newy);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,52 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_OVERLAY_H
#define AGS_PLUGINS_CORE_OVERLAY_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class Overlay : public ScriptContainer {
BUILT_IN_HASH(Overlay)
public:
virtual ~Overlay() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void CreateGraphical(ScriptMethodParams &params);
void ScPl_CreateTextual(ScriptMethodParams &params);
void ScPl_SetText(ScriptMethodParams &params);
void Remove(ScriptMethodParams &params);
void GetValid(ScriptMethodParams &params);
void GetX(ScriptMethodParams &params);
void SetX(ScriptMethodParams &params);
void GetY(ScriptMethodParams &params);
void SetY(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,59 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/parser.h"
#include "ags/engine/ac/parser.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void Parser::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(Parser::FindWordID^1, Parser::FindWordID);
SCRIPT_METHOD(Parser::ParseText^1, Parser::ParseText);
SCRIPT_METHOD(Parser::SaidUnknownWord^0, Parser::SaidUnknownWord);
SCRIPT_METHOD(Parser::Said^1, Parser::Said);
}
void Parser::FindWordID(ScriptMethodParams &params) {
PARAMS1(const char *, wordToFind);
params._result = AGS3::Parser_FindWordID(wordToFind);
}
void Parser::ParseText(ScriptMethodParams &params) {
PARAMS1(const char *, text);
AGS3::Parser_FindWordID(text);
}
void Parser::SaidUnknownWord(ScriptMethodParams &params) {
AGS3::Parser_SaidUnknownWord();
}
void Parser::Said(ScriptMethodParams &params) {
PARAMS1(const char *, checkWords);
params._result = AGS3::Parser_FindWordID(checkWords);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,47 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_PARSER_H
#define AGS_PLUGINS_CORE_PARSER_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class Parser : public ScriptContainer {
BUILT_IN_HASH(Parser)
public:
virtual ~Parser() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void FindWordID(ScriptMethodParams &params);
void ParseText(ScriptMethodParams &params);
void SaidUnknownWord(ScriptMethodParams &params);
void Said(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,120 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/region.h"
#include "ags/engine/ac/region.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void Region::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(Region::GetAtRoomXY^2, Region::GetRegionAtRoom);
SCRIPT_METHOD(Region::GetAtScreenXY^2, Region::GetRegionAtScreen);
SCRIPT_METHOD(Region::Tint^4, Region::TintNoLum);
SCRIPT_METHOD(Region::RunInteraction^1, Region::RunInteraction);
SCRIPT_METHOD(Region::get_Enabled, Region::GetEnabled);
SCRIPT_METHOD(Region::set_Enabled, Region::SetEnabled);
SCRIPT_METHOD(Region::get_ID, Region::GetID);
SCRIPT_METHOD(Region::get_LightLevel, Region::GetLightLevel);
SCRIPT_METHOD(Region::set_LightLevel, Region::SetLightLevel);
SCRIPT_METHOD(Region::get_TintEnabled, Region::GetTintEnabled);
SCRIPT_METHOD(Region::get_TintBlue, Region::GetTintBlue);
SCRIPT_METHOD(Region::get_TintGreen, Region::GetTintGreen);
SCRIPT_METHOD(Region::get_TintRed, Region::GetTintRed);
SCRIPT_METHOD(Region::get_TintSaturation, Region::GetTintSaturation);
}
void Region::GetRegionAtRoom(ScriptMethodParams &params) {
PARAMS2(int, xx, int, yy);
params._result = AGS3::GetRegionAtRoom(xx, yy);
}
void Region::GetRegionAtScreen(ScriptMethodParams &params) {
PARAMS2(int, x, int, y);
params._result = AGS3::GetRegionAtScreen(x, y);
}
void Region::TintNoLum(ScriptMethodParams &params) {
PARAMS5(ScriptRegion *, srr, int, red, int, green, int, blue, int, amount);
AGS3::Region_TintNoLum(srr, red, green, blue, amount);
}
void Region::RunInteraction(ScriptMethodParams &params) {
PARAMS2(ScriptRegion *, ssr, int, mood);
AGS3::Region_RunInteraction(ssr, mood);
}
void Region::GetEnabled(ScriptMethodParams &params) {
PARAMS1(ScriptRegion *, ssr);
params._result = AGS3::Region_GetEnabled(ssr);
}
void Region::SetEnabled(ScriptMethodParams &params) {
PARAMS2(ScriptRegion *, ssr, int, enable);
AGS3::Region_SetEnabled(ssr, enable);
}
void Region::GetID(ScriptMethodParams &params) {
PARAMS1(ScriptRegion *, ssr);
params._result = AGS3::Region_GetID(ssr);
}
void Region::GetLightLevel(ScriptMethodParams &params) {
PARAMS1(ScriptRegion *, ssr);
params._result = AGS3::Region_GetLightLevel(ssr);
}
void Region::SetLightLevel(ScriptMethodParams &params) {
PARAMS2(ScriptRegion *, ssr, int, brightness);
AGS3::Region_SetLightLevel(ssr, brightness);
}
void Region::GetTintEnabled(ScriptMethodParams &params) {
PARAMS1(ScriptRegion *, ssr);
params._result = AGS3::Region_GetTintEnabled(ssr);
}
void Region::GetTintBlue(ScriptMethodParams &params) {
PARAMS1(ScriptRegion *, ssr);
params._result = AGS3::Region_GetTintBlue(ssr);
}
void Region::GetTintGreen(ScriptMethodParams &params) {
PARAMS1(ScriptRegion *, ssr);
params._result = AGS3::Region_GetTintGreen(ssr);
}
void Region::GetTintRed(ScriptMethodParams &params) {
PARAMS1(ScriptRegion *, ssr);
params._result = AGS3::Region_GetTintRed(ssr);
}
void Region::GetTintSaturation(ScriptMethodParams &params) {
PARAMS1(ScriptRegion *, ssr);
params._result = AGS3::Region_GetTintSaturation(ssr);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,57 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_REGION_H
#define AGS_PLUGINS_CORE_REGION_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class Region : public ScriptContainer {
BUILT_IN_HASH(Region)
public:
virtual ~Region() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void GetRegionAtRoom(ScriptMethodParams &params);
void GetRegionAtScreen(ScriptMethodParams &params);
void TintNoLum(ScriptMethodParams &params);
void RunInteraction(ScriptMethodParams &params);
void GetEnabled(ScriptMethodParams &params);
void SetEnabled(ScriptMethodParams &params);
void GetID(ScriptMethodParams &params);
void GetLightLevel(ScriptMethodParams &params);
void SetLightLevel(ScriptMethodParams &params);
void GetTintEnabled(ScriptMethodParams &params);
void GetTintBlue(ScriptMethodParams &params);
void GetTintGreen(ScriptMethodParams &params);
void GetTintRed(ScriptMethodParams &params);
void GetTintSaturation(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,122 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/room.h"
#include "ags/engine/ac/room.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void Room::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(Room::GetDrawingSurfaceForBackground^1, Room::GetDrawingSurfaceForBackground);
SCRIPT_METHOD(Room::GetProperty^1, Room::GetProperty);
SCRIPT_METHOD(Room::GetTextProperty^1, Room::GetTextProperty);
SCRIPT_METHOD(Room::SetProperty^2, Room::SetProperty);
SCRIPT_METHOD(Room::SetTextProperty^2, Room::SetTextProperty);
SCRIPT_METHOD(Room::get_BottomEdge, Room::GetBottomEdge);
SCRIPT_METHOD(Room::get_ColorDepth, Room::GetColorDepth);
SCRIPT_METHOD(Room::get_Height, Room::GetHeight);
SCRIPT_METHOD(Room::get_LeftEdge, Room::GetLeftEdge);
SCRIPT_METHOD(Room::geti_Messages, Room::GetMessages);
SCRIPT_METHOD(Room::get_MusicOnLoad, Room::GetMusicOnLoad);
SCRIPT_METHOD(Room::get_ObjectCount, Room::GetObjectCount);
SCRIPT_METHOD(Room::get_RightEdge, Room::GetRightEdge);
SCRIPT_METHOD(Room::get_TopEdge, Room::GetTopEdge);
SCRIPT_METHOD(Room::get_Width, Room::GetWidth);
}
void Room::GetDrawingSurfaceForBackground(ScriptMethodParams &params) {
PARAMS1(int, backgroundNumber);
params._result = AGS3::Room_GetDrawingSurfaceForBackground(backgroundNumber);
}
void Room::GetProperty(ScriptMethodParams &params) {
PARAMS1(const char *, property);
params._result = AGS3::Room_GetProperty(property);
}
void Room::GetTextProperty(ScriptMethodParams &params) {
PARAMS1(const char *, property);
params._result = AGS3::Room_GetTextProperty(property);
}
void Room::SetProperty(ScriptMethodParams &params) {
PARAMS2(const char *, property, int, value);
params._result = AGS3::Room_SetProperty(property, value);
}
void Room::SetTextProperty(ScriptMethodParams &params) {
PARAMS2(const char *, property, const char *, value);
params._result = AGS3::Room_SetTextProperty(property, value);
}
void Room::GetBottomEdge(ScriptMethodParams &params) {
params._result = AGS3::Room_GetBottomEdge();
}
void Room::GetColorDepth(ScriptMethodParams &params) {
params._result = AGS3::Room_GetColorDepth();
}
void Room::GetHeight(ScriptMethodParams &params) {
params._result = AGS3::Room_GetHeight();
}
void Room::GetLeftEdge(ScriptMethodParams &params) {
params._result = AGS3::Room_GetLeftEdge();
}
void Room::GetMessages(ScriptMethodParams &params) {
PARAMS1(int, index);
params._result = AGS3::Room_GetMessages(index);
}
void Room::GetMusicOnLoad(ScriptMethodParams &params) {
params._result = AGS3::Room_GetMusicOnLoad();
}
void Room::GetObjectCount(ScriptMethodParams &params) {
params._result = AGS3::Room_GetObjectCount();
}
void Room::GetRightEdge(ScriptMethodParams &params) {
params._result = AGS3::Room_GetRightEdge();
}
void Room::GetTopEdge(ScriptMethodParams &params) {
params._result = AGS3::Room_GetTopEdge();
}
void Room::GetWidth(ScriptMethodParams &params) {
params._result = AGS3::Room_GetWidth();
}
void Room::RoomExists(ScriptMethodParams &params) {
PARAMS1(int, room);
params._result = AGS3::Room_Exists(room);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,59 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_ROOM_H
#define AGS_PLUGINS_CORE_ROOM_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class Room : public ScriptContainer {
BUILT_IN_HASH(Room)
public:
virtual ~Room() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void GetDrawingSurfaceForBackground(ScriptMethodParams &params);
void GetProperty(ScriptMethodParams &params);
void GetTextProperty(ScriptMethodParams &params);
void SetProperty(ScriptMethodParams &params);
void SetTextProperty(ScriptMethodParams &params);
void GetBottomEdge(ScriptMethodParams &params);
void GetColorDepth(ScriptMethodParams &params);
void GetHeight(ScriptMethodParams &params);
void GetLeftEdge(ScriptMethodParams &params);
void GetMessages(ScriptMethodParams &params);
void GetMusicOnLoad(ScriptMethodParams &params);
void GetObjectCount(ScriptMethodParams &params);
void GetRightEdge(ScriptMethodParams &params);
void GetTopEdge(ScriptMethodParams &params);
void GetWidth(ScriptMethodParams &params);
void RoomExists(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,79 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/screen.h"
#include "ags/engine/ac/screen.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void Screen::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(Screen::get_Height, Screen::GetScreenHeight);
SCRIPT_METHOD(Screen::get_Width, Screen::GetScreenWidth);
SCRIPT_METHOD(Screen::get_AutoSizeViewportOnRoomLoad, Screen::GetAutoSizeViewport);
SCRIPT_METHOD(Screen::set_AutoSizeViewportOnRoomLoad, Screen::SetAutoSizeViewport);
SCRIPT_METHOD(Screen::get_Viewport, Screen::GetViewport);
SCRIPT_METHOD(Screen::get_ViewportCount, Screen::GetViewportCount);
SCRIPT_METHOD(Screen::geti_Viewports, Screen::GetAnyViewport);
SCRIPT_METHOD(Screen::RoomToScreenPoint, Screen::RoomToScreenPoint);
}
void Screen::GetScreenHeight(ScriptMethodParams &params) {
params._result = AGS3::Screen_GetScreenHeight();
}
void Screen::GetScreenWidth(ScriptMethodParams &params) {
params._result = AGS3::Screen_GetScreenWidth();
}
void Screen::GetAutoSizeViewport(ScriptMethodParams &params) {
params._result = AGS3::Screen_GetAutoSizeViewport();
}
void Screen::SetAutoSizeViewport(ScriptMethodParams &params) {
PARAMS1(bool, on);
AGS3::Screen_SetAutoSizeViewport(on);
}
void Screen::GetViewport(ScriptMethodParams &params) {
params._result = AGS3::Screen_GetAnyViewport();
}
void Screen::GetViewportCount(ScriptMethodParams &params) {
params._result = AGS3::Screen_GetViewportCount();
}
void Screen::GetAnyViewport(ScriptMethodParams &params) {
PARAMS1(int, index);
params._result = AGS3::Room_GetColorDepth(index);
}
void Screen::RoomToScreenPoint(ScriptMethodParams &params) {
PARAMS2(int, roomx, int, roomy);
params._result = AGS3::Room_GetHeight(roomx, roomy);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,51 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_SCREEN_H
#define AGS_PLUGINS_CORE_SCREEN_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class Screen : public ScriptContainer {
BUILT_IN_HASH(Screen)
public:
virtual ~Screen() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void GetScreenHeight(ScriptMethodParams &params);
void GetScreenWidth(ScriptMethodParams &params);
void GetAutoSizeViewport(ScriptMethodParams &params);
void SetAutoSizeViewport(ScriptMethodParams &params);
void GetViewport(ScriptMethodParams &params);
void GetViewportCount(ScriptMethodParams &params);
void GetAnyViewport(ScriptMethodParams &params);
void RoomToScreenPoint(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,108 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/slider.h"
#include "ags/engine/ac/slider.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void Slider::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(Slider::get_BackgroundGraphic, Slider::GetBackgroundGraphic);
SCRIPT_METHOD(Slider::set_BackgroundGraphic, Slider::SetBackgroundGraphic);
SCRIPT_METHOD(Slider::get_HandleGraphic, Slider::GetHandleGraphic);
SCRIPT_METHOD(Slider::set_HandleGraphic, Slider::SetHandleGraphic);
SCRIPT_METHOD(Slider::get_HandleOffset, Slider::GetHandleOffset);
SCRIPT_METHOD(Slider::set_HandleOffset, Slider::SetHandleOffset);
SCRIPT_METHOD(Slider::get_Max, Slider::GetMax);
SCRIPT_METHOD(Slider::set_Max, Slider::SetMax);
SCRIPT_METHOD(Slider::get_Min, Slider::GetMin);
SCRIPT_METHOD(Slider::set_Min, Slider::SetMin);
SCRIPT_METHOD(Slider::get_Value, Slider::GetValue);
SCRIPT_METHOD(Slider::set_Value, Slider::SetValue);
}
void Slider::GetBackgroundGraphic(ScriptMethodParams &params) {
PARAMS1(GUISlider *, guisl);
params._result = AGS3::Slider_GetBackgroundGraphic(guisl);
}
void Slider::SetBackgroundGraphic(ScriptMethodParams &params) {
PARAMS2(GUISlider *, guisl, int, newImage);
AGS3::Slider_SetBackgroundGraphic(guisl, newImage);
}
void Slider::GetHandleGraphic(ScriptMethodParams &params) {
PARAMS1(GUISlider *, guisl);
params._result = AGS3::Slider_GetHandleGraphic(guisl);
}
void Slider::SetHandleGraphic(ScriptMethodParams &params) {
PARAMS2(GUISlider *, guisl, int, newImage);
AGS3::Slider_SetHandleGraphic(guisl, newImage);
}
void Slider::GetHandleOffset(ScriptMethodParams &params) {
PARAMS1(GUISlider *, guisl);
params._result = AGS3::Slider_GetHandleOffset(guisl);
}
void Slider::SetHandleOffset(ScriptMethodParams &params) {
PARAMS2(GUISlider *, guisl, int, newOffset);
AGS3::Slider_SetHandleOffset(guisl, newOffset);
}
void Slider::GetMax(ScriptMethodParams &params) {
PARAMS1(GUISlider *, guisl);
params._result = AGS3::Slider_GetMax(guisl);
}
void Slider::SetMax(ScriptMethodParams &params) {
PARAMS2(GUISlider *, guisl, int, valn);
AGS3::Slider_SetMax(guisl, valn);
}
void Slider::GetMin(ScriptMethodParams &params) {
PARAMS1(GUISlider *, guisl);
params._result = AGS3::Slider_GetMin(guisl);
}
void Slider::SetMin(ScriptMethodParams &params) {
PARAMS2(GUISlider *, guisl, int, valn);
AGS3::Slider_SetMin(guisl, valn);
}
void Slider::GetValue(ScriptMethodParams &params) {
PARAMS1(GUISlider *, guisl);
params._result = AGS3::Slider_GetValue(guisl);
}
void Slider::SetValue(ScriptMethodParams &params) {
PARAMS2(GUISlider *, guisl, int, valn);
AGS3::Slider_SetValue(guisl, valn);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,55 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_SLIDER_H
#define AGS_PLUGINS_CORE_SLIDER_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class Slider : public ScriptContainer {
BUILT_IN_HASH(Slider)
public:
virtual ~Slider() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void GetBackgroundGraphic(ScriptMethodParams &params);
void SetBackgroundGraphic(ScriptMethodParams &params);
void GetHandleGraphic(ScriptMethodParams &params);
void SetHandleGraphic(ScriptMethodParams &params);
void GetHandleOffset(ScriptMethodParams &params);
void SetHandleOffset(ScriptMethodParams &params);
void GetMax(ScriptMethodParams &params);
void SetMax(ScriptMethodParams &params);
void GetMin(ScriptMethodParams &params);
void SetMin(ScriptMethodParams &params);
void GetValue(ScriptMethodParams &params);
void SetValue(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,152 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/string.h"
#include "ags/engine/ac/string.h"
#include "ags/engine/ac/math.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void String::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(String::IsNullOrEmpty^1, String::IsNullOrEmpty);
SCRIPT_METHOD(String::Append^1, String::Append);
SCRIPT_METHOD(String::AppendChar^1, String::AppendChar);
SCRIPT_METHOD(String::CompareTo^2, String::CompareTo);
SCRIPT_METHOD(String::Contains^1, String::StrContains);
SCRIPT_METHOD(String::Copy^0, String::Copy);
SCRIPT_METHOD(String::EndsWith^2, String::EndsWith);
SCRIPT_METHOD(String::Format^101, String::ScPl_String_Format);
SCRIPT_METHOD(String::IndexOf^1, String::StrContains);
SCRIPT_METHOD(String::LowerCase^0, String::LowerCase);
SCRIPT_METHOD(String::Replace^3, String::Replace);
SCRIPT_METHOD(String::ReplaceCharAt^2, String::ReplaceCharAt);
SCRIPT_METHOD(String::StartsWith^2, String::StartsWith);
SCRIPT_METHOD(String::Substring^2, String::Substring);
SCRIPT_METHOD(String::Truncate^1, String::Truncate);
SCRIPT_METHOD(String::UpperCase^0, String::UpperCase);
SCRIPT_METHOD(String::get_AsFloat, String::StringToFloat);
SCRIPT_METHOD(String::get_AsInt, String::StringToInt);
SCRIPT_METHOD(String::geti_Chars, String::GetChars);
SCRIPT_METHOD(String::get_Length, String::GetLength);
}
void String::IsNullOrEmpty(ScriptMethodParams &params) {
PARAMS1(const char *, str);
params._result = AGS3::String_IsNullOrEmpty(str);
}
void String::Append(ScriptMethodParams &params) {
PARAMS2(const char *, str, const char *, extrabit);
params._result = AGS3::String_Append(str, extrabit);
}
void String::AppendChar(ScriptMethodParams &params) {
PARAMS2(const char *, str, char, extraOne);
params._result = AGS3::String_AppendChar(str, extraOne);
}
void String::CompareTo(ScriptMethodParams &params) {
PARAMS3(const char *, str1, const char *, str2, bool, caseSensitive);
params._result = AGS3::String_CompareTo(str1, str2, caseSensitive);
}
void String::StrContains(ScriptMethodParams &params) {
PARAMS2(const char *, s1, const char *, s2);
params._result = AGS3::StrContains(s1, s2);
}
void String::Copy(ScriptMethodParams &params) {
PARAMS1(const char *, str);
params._result = AGS3::String_Copy(str);
}
void String::EndsWith(ScriptMethodParams &params) {
PARAMS3(const char *, s1, const char *, s2, bool, caseSensitive);
params._result = AGS3::String_EndsWith(s1, s2, caseSensitive);
}
void String::ScPl_String_Format(ScriptMethodParams &params) {
Common::String text = params.format(0);
params._result = AGS3::CreateNewScriptString(text.c_str());
}
void String::LowerCase(ScriptMethodParams &params) {
PARAMS1(const char *, str);
params._result = AGS3::String_LowerCase(str);
}
void String::Replace(ScriptMethodParams &params) {
PARAMS4(const char *, thisString, const char *, lookForText, const char *, replaceWithText, bool, caseSensitive);
params._result = AGS3::String_Replace(thisString, lookForText, replaceWithText, caseSensitive);
}
void String::ReplaceCharAt(ScriptMethodParams &params) {
PARAMS3(const char *, thisString, int, index, char, newChar);
params._result = AGS3::String_ReplaceCharAt(thisString, index, newChar);
}
void String::StartsWith(ScriptMethodParams &params) {
PARAMS3(const char *, thisString, const char *, checkForString, bool, caseSensitive);
params._result = AGS3::String_StartsWith(thisString, checkForString, caseSensitive);
}
void String::Substring(ScriptMethodParams &params) {
PARAMS3(const char *, thisString, int, index, int, length);
params._result = AGS3::String_Substring(thisString, index, length);
}
void String::Truncate(ScriptMethodParams &params) {
PARAMS2(const char *, thisString, int, length);
params._result = AGS3::String_Truncate(thisString, length);
}
void String::UpperCase(ScriptMethodParams &params) {
PARAMS1(const char *, str);
params._result = AGS3::String_UpperCase(str);
}
void String::StringToFloat(ScriptMethodParams &params) {
PARAMS1(const char *, value);
params._result = AGS3::StringToFloat(value);
}
void String::StringToInt(ScriptMethodParams &params) {
PARAMS1(const char *, value);
params._result = AGS3::StringToInt(value);
}
void String::GetChars(ScriptMethodParams &params) {
PARAMS2(const char *, texx, int, index);
params._result = AGS3::String_GetChars(texx, index);
}
void String::GetLength(ScriptMethodParams &params) {
PARAMS1(const char *, s);
params._result = ::strlen(s);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,62 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_STRING_H
#define AGS_PLUGINS_CORE_STRING_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class String : public ScriptContainer {
BUILT_IN_HASH(String)
public:
virtual ~String() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void IsNullOrEmpty(ScriptMethodParams &params);
void Append(ScriptMethodParams &params);
void AppendChar(ScriptMethodParams &params);
void CompareTo(ScriptMethodParams &params);
void StrContains(ScriptMethodParams &params);
void Copy(ScriptMethodParams &params);
void EndsWith(ScriptMethodParams &params);
void ScPl_String_Format(ScriptMethodParams &params);
void LowerCase(ScriptMethodParams &params);
void Replace(ScriptMethodParams &params);
void ReplaceCharAt(ScriptMethodParams &params);
void StartsWith(ScriptMethodParams &params);
void Substring(ScriptMethodParams &params);
void Truncate(ScriptMethodParams &params);
void UpperCase(ScriptMethodParams &params);
void StringToFloat(ScriptMethodParams &params);
void StringToInt(ScriptMethodParams &params);
void GetChars(ScriptMethodParams &params);
void GetLength(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,151 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/system.h"
#include "ags/engine/ac/system.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void System::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(System::get_AudioChannelCount, System::GetAudioChannelCount);
SCRIPT_METHOD(System::geti_AudioChannels, System::GetAudioChannels);
SCRIPT_METHOD(System::get_CapsLock, System::GetCapsLock);
SCRIPT_METHOD(System::get_ColorDepth, System::GetColorDepth);
SCRIPT_METHOD(System::get_Gamma, System::GetGamma);
SCRIPT_METHOD(System::set_Gamma, System::SetGamma);
SCRIPT_METHOD(System::get_HardwareAcceleration, System::GetHardwareAcceleration);
SCRIPT_METHOD(System::get_NumLock, System::GetNumLock);
SCRIPT_METHOD(System::get_OperatingSystem, System::GetOS);
SCRIPT_METHOD(System::get_RuntimeInfo, System::GetRuntimeInfo);
SCRIPT_METHOD(System::get_ScreenHeight, System::GetScreenHeight);
SCRIPT_METHOD(System::get_ScreenWidth, System::GetScreenWidth);
SCRIPT_METHOD(System::get_ScrollLock, System::GetScrollLock);
SCRIPT_METHOD(System::get_SupportsGammaControl, System::GetSupportsGammaControl);
SCRIPT_METHOD(System::get_Version, System::GetVersion);
SCRIPT_METHOD(SystemInfo::get_Version, System::GetVersion);
SCRIPT_METHOD(System::get_ViewportHeight, System::GetViewportHeight);
SCRIPT_METHOD(System::get_ViewportWidth, System::GetViewportWidth);
SCRIPT_METHOD(System::get_Volume, System::GetVolume);
SCRIPT_METHOD(System::set_Volume, System::SetVolume);
SCRIPT_METHOD(System::get_VSync, System::GetVsync);
SCRIPT_METHOD(System::set_VSync, System::SetVsync);
SCRIPT_METHOD(System::get_Windowed, System::GetWindowed);
}
void System::GetAudioChannelCount(ScriptMethodParams &params) {
params._result = AGS3::System_GetAudioChannelCount();
}
void System::GetAudioChannels(ScriptMethodParams &params) {
PARAMS1(int, index);
params._result = AGS3::System_GetAudioChannels(index);
}
void System::GetCapsLock(ScriptMethodParams &params) {
params._result = AGS3::System_GetCapsLock();
}
void System::GetColorDepth(ScriptMethodParams &params) {
params._result = AGS3::System_GetColorDepth();
}
void System::GetGamma(ScriptMethodParams &params) {
params._result = AGS3::System_GetGamma();
}
void System::SetGamma(ScriptMethodParams &params) {
PARAMS1(int, newValue);
AGS3::System_SetGamma(newValue);
}
void System::GetHardwareAcceleration(ScriptMethodParams &params) {
params._result = AGS3::System_GetHardwareAcceleration();
}
void System::GetNumLock(ScriptMethodParams &params) {
params._result = AGS3::System_GetNumLock();
}
void System::GetOS(ScriptMethodParams &params) {
params._result = AGS3::System_GetOS();
}
void System::GetRuntimeInfo(ScriptMethodParams &params) {
params._result = AGS3::System_GetRuntimeInfo();
}
void System::GetScreenHeight(ScriptMethodParams &params) {
params._result = AGS3::System_GetScreenHeight();
}
void System::GetScreenWidth(ScriptMethodParams &params) {
params._result = AGS3::System_GetScreenWidth();
}
void System::GetScrollLock(ScriptMethodParams &params) {
params._result = AGS3::System_GetScrollLock();
}
void System::GetSupportsGammaControl(ScriptMethodParams &params) {
params._result = AGS3::System_GetSupportsGammaControl();
}
void System::GetVersion(ScriptMethodParams &params) {
params._result = AGS3::System_GetVersion();
}
void System::GetViewportHeight(ScriptMethodParams &params) {
params._result = AGS3::System_GetViewportHeight();
}
void System::GetViewportWidth(ScriptMethodParams &params) {
params._result = AGS3::System_GetViewportWidth();
}
void System::GetVolume(ScriptMethodParams &params) {
params._result = AGS3::System_GetVolume();
}
void System::SetVolume(ScriptMethodParams &params) {
PARAMS1(int, newvol);
AGS3::System_SetVolume(newvol);
}
void System::GetVsync(ScriptMethodParams &params) {
params._result = AGS3::System_GetVsync();
}
void System::SetVsync(ScriptMethodParams &params) {
PARAMS1(int, newValue);
AGS3::System_SetVsync(newValue);
}
void System::GetWindowed(ScriptMethodParams &params) {
params._result = AGS3::System_GetWindowed();
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,65 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_SYSTEM_H
#define AGS_PLUGINS_CORE_SYSTEM_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class System : public ScriptContainer {
BUILT_IN_HASH(System)
public:
virtual ~System() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void GetAudioChannelCount(ScriptMethodParams &params);
void GetAudioChannels(ScriptMethodParams &params);
void GetCapsLock(ScriptMethodParams &params);
void GetColorDepth(ScriptMethodParams &params);
void GetGamma(ScriptMethodParams &params);
void SetGamma(ScriptMethodParams &params);
void GetHardwareAcceleration(ScriptMethodParams &params);
void GetNumLock(ScriptMethodParams &params);
void GetOS(ScriptMethodParams &params);
void GetRuntimeInfo(ScriptMethodParams &params);
void GetScreenHeight(ScriptMethodParams &params);
void GetScreenWidth(ScriptMethodParams &params);
void GetScrollLock(ScriptMethodParams &params);
void GetSupportsGammaControl(ScriptMethodParams &params);
void GetVersion(ScriptMethodParams &params);
void GetViewportHeight(ScriptMethodParams &params);
void GetViewportWidth(ScriptMethodParams &params);
void GetVolume(ScriptMethodParams &params);
void SetVolume(ScriptMethodParams &params);
void GetVsync(ScriptMethodParams &params);
void SetVsync(ScriptMethodParams &params);
void GetWindowed(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,79 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/textbox.h"
#include "ags/engine/ac/textbox.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void Textbox::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(TextBox::GetText^1, Textbox::GetText);
SCRIPT_METHOD(TextBox::SetText^1, Textbox::SetText);
SCRIPT_METHOD(TextBox::get_Font, Textbox::GetFont);
SCRIPT_METHOD(TextBox::set_Font, Textbox::SetFont);
SCRIPT_METHOD(TextBox::get_Text, Textbox::GetText_New);
SCRIPT_METHOD(TextBox::set_Text, Textbox::SetText);
SCRIPT_METHOD(TextBox::get_TextColor, Textbox::GetTextColor);
SCRIPT_METHOD(TextBox::set_TextColor, Textbox::SetTextColor);
}
void Textbox::GetText(ScriptMethodParams &params) {
PARAMS2(GUITextBox *, texbox, char *, buffer);
AGS3::TextBox_GetText(texbox, buffer);
}
void Textbox::SetText(ScriptMethodParams &params) {
PARAMS2(GUITextBox *, texbox, const char *, newtex);
AGS3::TextBox_SetText(texbox, newtex);
}
void Textbox::GetText_New(ScriptMethodParams &params) {
PARAMS1(GUITextBox *, texbox);
params._result = AGS3::TextBox_GetText_New(texbox);
}
void Textbox::GetFont(ScriptMethodParams &params) {
PARAMS1(GUITextBox *, texbox);
params._result = AGS3::TextBox_GetFont(texbox);
}
void Textbox::SetFont(ScriptMethodParams &params) {
PARAMS2(GUITextBox *, guit, int, fontnum);
AGS3::TextBox_SetFont(guit, fontnum);
}
void Textbox::GetTextColor(ScriptMethodParams &params) {
PARAMS1(GUITextBox *, texbox);
params._result = AGS3::TextBox_GetTextColor(texbox);
}
void Textbox::SetTextColor(ScriptMethodParams &params) {
PARAMS2(GUITextBox *, guit, int, colr);
AGS3::TextBox_SetTextColor(guit, colr);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,50 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_TEXTBOX_H
#define AGS_PLUGINS_CORE_TEXTBOX_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class Textbox : public ScriptContainer {
BUILT_IN_HASH(Textbox)
public:
virtual ~Textbox() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void GetText(ScriptMethodParams &params);
void SetText(ScriptMethodParams &params);
void GetText_New(ScriptMethodParams &params);
void GetFont(ScriptMethodParams &params);
void SetFont(ScriptMethodParams &params);
void GetTextColor(ScriptMethodParams &params);
void SetTextColor(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif

View File

@@ -0,0 +1,102 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "ags/plugins/core/view_frame.h"
#include "ags/engine/ac/view_frame.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
void ViewFrame::AGS_EngineStartup(IAGSEngine *engine) {
ScriptContainer::AGS_EngineStartup(engine);
SCRIPT_METHOD(ViewFrame::get_Flipped, ViewFrame::GetFlipped);
SCRIPT_METHOD(ViewFrame::get_Frame, ViewFrame::GetFrame);
SCRIPT_METHOD(ViewFrame::get_Graphic, ViewFrame::GetGraphic);
SCRIPT_METHOD(ViewFrame::set_Graphic, ViewFrame::SetGraphic);
SCRIPT_METHOD(ViewFrame::get_LinkedAudio, ViewFrame::GetLinkedAudio);
SCRIPT_METHOD(ViewFrame::set_LinkedAudio, ViewFrame::SetLinkedAudio);
SCRIPT_METHOD(ViewFrame::get_Loop, ViewFrame::GetLoop);
SCRIPT_METHOD(ViewFrame::get_Sound, ViewFrame::GetSound);
SCRIPT_METHOD(ViewFrame::set_Sound, ViewFrame::SetSound);
SCRIPT_METHOD(ViewFrame::get_Speed, ViewFrame::GetSpeed);
SCRIPT_METHOD(ViewFrame::get_View, ViewFrame::GetView);
}
void ViewFrame::GetFlipped(ScriptMethodParams &params) {
PARAMS1(ScriptViewFrame *, svf);
params._result = AGS3::ViewFrame_GetFlipped(svf);
}
void ViewFrame::GetFrame(ScriptMethodParams &params) {
PARAMS1(ScriptViewFrame *, svf);
params._result = AGS3::ViewFrame_GetFrame(svf);
}
void ViewFrame::GetGraphic(ScriptMethodParams &params) {
PARAMS1(ScriptViewFrame *, svf);
params._result = AGS3::ViewFrame_GetGraphic(svf);
}
void ViewFrame::SetGraphic(ScriptMethodParams &params) {
PARAMS2(ScriptViewFrame *, svf, int, newPic);
AGS3::ViewFrame_SetGraphic(svf, newPic);
}
void ViewFrame::GetLinkedAudio(ScriptMethodParams &params) {
PARAMS1(ScriptViewFrame *, svf);
params._result = AGS3::ViewFrame_GetLinkedAudio(svf);
}
void ViewFrame::SetLinkedAudio(ScriptMethodParams &params) {
PARAMS2(ScriptViewFrame *, svf, ScriptAudioClip *, clip);
AGS3::ViewFrame_SetLinkedAudio(svf, clip);
}
void ViewFrame::GetLoop(ScriptMethodParams &params) {
PARAMS1(ScriptViewFrame *, svf);
params._result = AGS3::ViewFrame_GetLoop(svf);
}
void ViewFrame::GetSound(ScriptMethodParams &params) {
PARAMS1(ScriptViewFrame *, svf);
params._result = AGS3::ViewFrame_GetSound(svf);
}
void ViewFrame::SetSound(ScriptMethodParams &params) {
PARAMS2(ScriptViewFrame *, svf, int, newSound);
AGS3::ViewFrame_SetSound(svf, newSound);
}
void ViewFrame::GetSpeed(ScriptMethodParams &params) {
PARAMS1(ScriptViewFrame *, svf);
params._result = AGS3::ViewFrame_GetSpeed(svf);
}
void ViewFrame::GetView(ScriptMethodParams &params) {
PARAMS1(ScriptViewFrame *, svf);
params._result = AGS3::ViewFrame_GetView(svf);
}
} // namespace Core
} // namespace Plugins
} // namespace AGS3

View File

@@ -0,0 +1,54 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AGS_PLUGINS_CORE_VIEW_FRAME_H
#define AGS_PLUGINS_CORE_VIEW_FRAME_H
#include "ags/plugins/ags_plugin.h"
namespace AGS3 {
namespace Plugins {
namespace Core {
class ViewFrame : public ScriptContainer {
BUILT_IN_HASH(ViewFrame)
public:
virtual ~ViewFrame() {}
void AGS_EngineStartup(IAGSEngine *engine) override;
void GetFlipped(ScriptMethodParams &params);
void GetFrame(ScriptMethodParams &params);
void GetGraphic(ScriptMethodParams &params);
void SetGraphic(ScriptMethodParams &params);
void GetLinkedAudio(ScriptMethodParams &params);
void SetLinkedAudio(ScriptMethodParams &params);
void GetLoop(ScriptMethodParams &params);
void GetSound(ScriptMethodParams &params);
void SetSound(ScriptMethodParams &params);
void GetSpeed(ScriptMethodParams &params);
void GetView(ScriptMethodParams &params);
};
} // namespace Core
} // namespace Plugins
} // namespace AGS3
#endif