Initial commit
This commit is contained in:
114
engines/ags/plugins/core/audio_channel.cpp
Normal file
114
engines/ags/plugins/core/audio_channel.cpp
Normal 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 ¶ms) {
|
||||
PARAMS2(ScriptAudioChannel *, channel, int, newPosition);
|
||||
AGS3::AudioChannel_Seek(channel, newPosition);
|
||||
}
|
||||
|
||||
void AudioChannel::SetRoomLocation(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(ScriptAudioChannel *, channel, int, xPos, int, yPos);
|
||||
AGS3::AudioChannel_SetRoomLocation(channel, xPos, yPos);
|
||||
}
|
||||
|
||||
void AudioChannel::Stop(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptAudioChannel *, channel);
|
||||
AGS3::AudioChannel_Stop(channel);
|
||||
}
|
||||
|
||||
void AudioChannel::GetID(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptAudioChannel *, channel);
|
||||
params._result = AGS3::AudioChannel_GetID(channel);
|
||||
}
|
||||
|
||||
void AudioChannel::GetIsPlaying(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptAudioChannel *, channel);
|
||||
params._result = AGS3::AudioChannel_GetIsPlaying(channel);
|
||||
}
|
||||
|
||||
void AudioChannel::GetLengthMs(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptAudioChannel *, channel);
|
||||
params._result = AGS3::AudioChannel_GetLengthMs(channel);
|
||||
}
|
||||
|
||||
void AudioChannel::GetPanning(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptAudioChannel *, channel);
|
||||
params._result = AGS3::AudioChannel_GetPanning(channel);
|
||||
}
|
||||
|
||||
void AudioChannel::SetPanning(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptAudioChannel *, channel, int, newPanning);
|
||||
AGS3::AudioChannel_SetPanning(channel, newPanning);
|
||||
}
|
||||
|
||||
void AudioChannel::GetPlayingClip(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptAudioChannel *, channel);
|
||||
params._result = AGS3::AudioChannel_GetPlayingClip(channel);
|
||||
}
|
||||
|
||||
void AudioChannel::GetPosition(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptAudioChannel *, channel);
|
||||
params._result = AGS3::AudioChannel_GetPosition(channel);
|
||||
}
|
||||
|
||||
void AudioChannel::GetPositionMs(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptAudioChannel *, channel);
|
||||
params._result = AGS3::AudioChannel_GetPositionMs(channel);
|
||||
}
|
||||
|
||||
void AudioChannel::GetVolume(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptAudioChannel *, channel);
|
||||
params._result = AGS3::AudioChannel_GetVolume(channel);
|
||||
}
|
||||
|
||||
void AudioChannel::SetVolume(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptAudioChannel *, channel, int, newVolume);
|
||||
params._result = AGS3::AudioChannel_SetVolume(channel, newVolume);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
56
engines/ags/plugins/core/audio_channel.h
Normal file
56
engines/ags/plugins/core/audio_channel.h
Normal 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 ¶ms);
|
||||
void SetRoomLocation(ScriptMethodParams ¶ms);
|
||||
void Stop(ScriptMethodParams ¶ms);
|
||||
void GetID(ScriptMethodParams ¶ms);
|
||||
void GetIsPlaying(ScriptMethodParams ¶ms);
|
||||
void GetLengthMs(ScriptMethodParams ¶ms);
|
||||
void GetPanning(ScriptMethodParams ¶ms);
|
||||
void SetPanning(ScriptMethodParams ¶ms);
|
||||
void GetPlayingClip(ScriptMethodParams ¶ms);
|
||||
void GetPosition(ScriptMethodParams ¶ms);
|
||||
void GetPositionMs(ScriptMethodParams ¶ms);
|
||||
void GetVolume(ScriptMethodParams ¶ms);
|
||||
void SetVolume(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
78
engines/ags/plugins/core/audio_clip.cpp
Normal file
78
engines/ags/plugins/core/audio_clip.cpp
Normal 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 ¶ms) {
|
||||
PARAMS3(ScriptAudioClip *, clip, int, priority, int, repeat);
|
||||
params._result = AGS3::AudioClip_Play(clip, priority, repeat);
|
||||
}
|
||||
|
||||
void AudioClip::PlayFrom(ScriptMethodParams ¶ms) {
|
||||
PARAMS4(ScriptAudioClip *, clip, int, position, int, priority, int, repeat);
|
||||
params._result = AGS3::AudioClip_PlayFrom(clip, position, priority, repeat);
|
||||
}
|
||||
|
||||
void AudioClip::PlayQueued(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(ScriptAudioClip *, clip, int, priority, int, repeat);
|
||||
params._result = AGS3::AudioClip_PlayQueued(clip, priority, repeat);
|
||||
}
|
||||
|
||||
void AudioClip::Stop(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptAudioClip *, clip);
|
||||
AGS3::AudioClip_Stop(clip);
|
||||
}
|
||||
|
||||
void AudioClip::GetFileType(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptAudioClip *, clip);
|
||||
params._result = AGS3::AudioClip_GetFileType(clip);
|
||||
}
|
||||
|
||||
void AudioClip::GetIsAvailable(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptAudioClip *, clip);
|
||||
params._result = AGS3::AudioClip_GetIsAvailable(clip);
|
||||
}
|
||||
|
||||
void AudioClip::GetType(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptAudioClip *, clip);
|
||||
params._result = AGS3::AudioClip_GetType(clip);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
50
engines/ags/plugins/core/audio_clip.h
Normal file
50
engines/ags/plugins/core/audio_clip.h
Normal 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 ¶ms);
|
||||
void PlayFrom(ScriptMethodParams ¶ms);
|
||||
void PlayQueued(ScriptMethodParams ¶ms);
|
||||
void Stop(ScriptMethodParams ¶ms);
|
||||
void GetFileType(ScriptMethodParams ¶ms);
|
||||
void GetIsAvailable(ScriptMethodParams ¶ms);
|
||||
void GetType(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
139
engines/ags/plugins/core/button.cpp
Normal file
139
engines/ags/plugins/core/button.cpp
Normal 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 ¶ms) {
|
||||
PARAMS5(GUIButton *, butt, int, view, int, loop, int, speed, int, repeat);
|
||||
AGS3::Button_Animate4(butt, view, loop, speed, repeat);
|
||||
}
|
||||
|
||||
void Button::GetText(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIButton *, butt, char *, buffer);
|
||||
AGS3::Button_GetText(butt, buffer);
|
||||
}
|
||||
|
||||
void Button::SetText(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIButton *, butt, const char *, newtx);
|
||||
AGS3::Button_SetText(butt, newtx);
|
||||
}
|
||||
|
||||
void Button::GetClipImage(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIButton *, butt);
|
||||
params._result = AGS3::Button_GetClipImage(butt);
|
||||
}
|
||||
|
||||
void Button::SetClipImage(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIButton *, butt, int, newval);
|
||||
AGS3::Button_SetClipImage(butt, newval);
|
||||
}
|
||||
|
||||
void Button::GetFont(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIButton *, butt);
|
||||
params._result = AGS3::Button_GetFont(butt);
|
||||
}
|
||||
|
||||
void Button::SetFont(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIButton *, butt, int, newFont);
|
||||
AGS3::Button_SetFont(butt, newFont);
|
||||
}
|
||||
|
||||
void Button::GetGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIButton *, butt);
|
||||
params._result = AGS3::Button_GetGraphic(butt);
|
||||
}
|
||||
|
||||
void Button::GetMouseOverGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIButton *, butt);
|
||||
params._result = AGS3::Button_GetMouseOverGraphic(butt);
|
||||
}
|
||||
|
||||
void Button::SetMouseOverGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIButton *, guil, int, slotn);
|
||||
AGS3::Button_SetMouseOverGraphic(guil, slotn);
|
||||
}
|
||||
|
||||
void Button::GetNormalGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIButton *, butt);
|
||||
params._result = AGS3::Button_GetNormalGraphic(butt);
|
||||
}
|
||||
|
||||
void Button::SetNormalGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIButton *, guil, int, slotn);
|
||||
AGS3::Button_SetNormalGraphic(guil, slotn);
|
||||
}
|
||||
|
||||
void Button::GetPushedGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIButton *, butt);
|
||||
params._result = AGS3::Button_GetPushedGraphic(butt);
|
||||
}
|
||||
|
||||
void Button::SetPushedGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIButton *, guil, int, slotn);
|
||||
AGS3::Button_SetPushedGraphic(guil, slotn);
|
||||
}
|
||||
|
||||
void Button::GetText_New(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIButton *, butt);
|
||||
params._result = AGS3::Button_GetText_New(butt);
|
||||
}
|
||||
|
||||
void Button::GetTextColor(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIButton *, butt);
|
||||
params._result = AGS3::Button_GetTextColor(butt);
|
||||
}
|
||||
|
||||
void Button::SetTextColor(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIButton *, butt, int, newcol);
|
||||
AGS3::Button_SetTextColor(butt, newcol);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
60
engines/ags/plugins/core/button.h
Normal file
60
engines/ags/plugins/core/button.h
Normal 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 ¶ms);
|
||||
void GetText(ScriptMethodParams ¶ms);
|
||||
void SetText(ScriptMethodParams ¶ms);
|
||||
void GetClipImage(ScriptMethodParams ¶ms);
|
||||
void SetClipImage(ScriptMethodParams ¶ms);
|
||||
void GetFont(ScriptMethodParams ¶ms);
|
||||
void SetFont(ScriptMethodParams ¶ms);
|
||||
void GetGraphic(ScriptMethodParams ¶ms);
|
||||
void GetMouseOverGraphic(ScriptMethodParams ¶ms);
|
||||
void SetMouseOverGraphic(ScriptMethodParams ¶ms);
|
||||
void GetNormalGraphic(ScriptMethodParams ¶ms);
|
||||
void SetNormalGraphic(ScriptMethodParams ¶ms);
|
||||
void GetPushedGraphic(ScriptMethodParams ¶ms);
|
||||
void SetPushedGraphic(ScriptMethodParams ¶ms);
|
||||
void GetText_New(ScriptMethodParams ¶ms);
|
||||
void GetTextColor(ScriptMethodParams ¶ms);
|
||||
void SetTextColor(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
814
engines/ags/plugins/core/character.cpp
Normal file
814
engines/ags/plugins/core/character.cpp
Normal 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 ¶ms) {
|
||||
PARAMS3(CharacterInfo *, chaa, ScriptInvItem *, invi, int, addIndex);
|
||||
AGS3::Character_AddInventory(chaa, invi, addIndex);
|
||||
}
|
||||
|
||||
void Character::AddWaypoint(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(CharacterInfo *, chaa, int, x, int, y);
|
||||
AGS3::Character_AddWaypoint(chaa, x, y);
|
||||
}
|
||||
|
||||
void Character::Animate(ScriptMethodParams ¶ms) {
|
||||
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 ¶ms) {
|
||||
PARAMS4(CharacterInfo *, chaa, int, room, int, x, int, y);
|
||||
AGS3::Character_ChangeRoom(chaa, room, x, y);
|
||||
}
|
||||
|
||||
void Character::ChangeRoomAutoPosition(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(CharacterInfo *, chaa, int, room, int, newPos);
|
||||
AGS3::Character_ChangeRoomAutoPosition(chaa, room, newPos);
|
||||
}
|
||||
|
||||
void Character::ChangeView(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chap, int, vii);
|
||||
AGS3::Character_ChangeView(chap, vii);
|
||||
}
|
||||
|
||||
void Character::FaceCharacter(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(CharacterInfo *, char1, CharacterInfo *, char2, int, blockingStyle);
|
||||
AGS3::Character_FaceCharacter(char1, char2, blockingStyle);
|
||||
}
|
||||
|
||||
void Character::FaceDirection(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(CharacterInfo *, char1, int, direction, int, blockingStyle);
|
||||
AGS3::Character_FaceDirection(char1, direction, blockingStyle);
|
||||
}
|
||||
|
||||
void Character::FaceLocation(ScriptMethodParams ¶ms) {
|
||||
PARAMS4(CharacterInfo *, char1, int, xx, int, yy, int, blockingStyle);
|
||||
AGS3::Character_FaceLocation(char1, xx, yy, blockingStyle);
|
||||
}
|
||||
|
||||
void Character::FaceObject(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(CharacterInfo *, char1, ScriptObject *, obj, int, blockingStyle);
|
||||
AGS3::Character_FaceObject(char1, obj, blockingStyle);
|
||||
}
|
||||
|
||||
void Character::FollowCharacter(ScriptMethodParams ¶ms) {
|
||||
PARAMS4(CharacterInfo *, chaa, CharacterInfo *, tofollow, int, distaway, int, eagerness);
|
||||
AGS3::Character_FollowCharacter(chaa, tofollow, distaway, eagerness);
|
||||
}
|
||||
|
||||
void Character::GetProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, const char *, property);
|
||||
params._result = AGS3::Character_GetProperty(chaa, property);
|
||||
}
|
||||
|
||||
void Character::GetPropertyText(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(CharacterInfo *, chaa, const char *, property, char *, buffer);
|
||||
AGS3::Character_GetPropertyText(chaa, property, buffer);
|
||||
}
|
||||
|
||||
void Character::GetTextProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, const char *, property);
|
||||
params._result = AGS3::Character_GetTextProperty(chaa, property);
|
||||
}
|
||||
|
||||
void Character::HasInventory(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, ScriptInvItem *, invi);
|
||||
params._result = AGS3::Character_HasInventory(chaa, invi);
|
||||
}
|
||||
|
||||
void Character::IsCollidingWithChar(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, char1, CharacterInfo *, char2);
|
||||
params._result = AGS3::Character_IsCollidingWithChar(char1, char2);
|
||||
}
|
||||
|
||||
void Character::IsCollidingWithObject(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chin, ScriptObject *, objid);
|
||||
params._result = AGS3::Character_IsCollidingWithObject(chin, objid);
|
||||
}
|
||||
|
||||
void Character::LockView(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chap, int, vii);
|
||||
AGS3::Character_LockView(chap, vii);
|
||||
}
|
||||
|
||||
void Character::LockViewEx(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(CharacterInfo *, chap, int, vii, int, stopMoving);
|
||||
AGS3::Character_LockViewEx(chap, vii, stopMoving);
|
||||
}
|
||||
|
||||
void Character::LockViewAligned_Old(ScriptMethodParams ¶ms) {
|
||||
PARAMS4(CharacterInfo *, chap, int, vii, int, loop, int, align);
|
||||
AGS3::Character_LockViewAligned_Old(chap, vii, loop, align);
|
||||
}
|
||||
|
||||
void Character::LockViewAlignedEx_Old(ScriptMethodParams ¶ms) {
|
||||
PARAMS5(CharacterInfo *, chap, int, vii, int, loop, int, align, int, stopMoving);
|
||||
AGS3::Character_LockViewAlignedEx_Old(chap, vii, loop, align, stopMoving);
|
||||
}
|
||||
|
||||
void Character::LockViewAligned(ScriptMethodParams ¶ms) {
|
||||
PARAMS4(CharacterInfo *, chap, int, vii, int, loop, int, align);
|
||||
AGS3::Character_LockViewAligned(chap, vii, loop, align);
|
||||
}
|
||||
|
||||
void Character::LockViewAlignedEx(ScriptMethodParams ¶ms) {
|
||||
PARAMS5(CharacterInfo *, chap, int, vii, int, loop, int, align, int, stopMoving);
|
||||
AGS3::Character_LockViewAlignedEx(chap, vii, loop, align, stopMoving);
|
||||
}
|
||||
|
||||
void Character::LockViewFrame(ScriptMethodParams ¶ms) {
|
||||
PARAMS4(CharacterInfo *, chaa, int, view, int, loop, int, frame);
|
||||
AGS3::Character_LockViewFrame(chaa, view, loop, frame);
|
||||
}
|
||||
|
||||
void Character::LockViewFrameEx(ScriptMethodParams ¶ms) {
|
||||
PARAMS5(CharacterInfo *, chaa, int, view, int, loop, int, frame, int, stopMoving);
|
||||
AGS3::Character_LockViewFrameEx(chaa, view, loop, frame, stopMoving);
|
||||
}
|
||||
|
||||
void Character::LockViewOffset(ScriptMethodParams ¶ms) {
|
||||
PARAMS4(CharacterInfo *, chap, int, vii, int, xoffs, int, yoffs);
|
||||
AGS3::Character_LockViewOffset(chap, vii, xoffs, yoffs);
|
||||
}
|
||||
|
||||
void Character::LoseInventory(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chap, ScriptInvItem *, invi);
|
||||
AGS3::Character_LoseInventory(chap, invi);
|
||||
}
|
||||
|
||||
void Character::Move(ScriptMethodParams ¶ms) {
|
||||
PARAMS5(CharacterInfo *, chaa, int, x, int, y, int, blocking, int, direct);
|
||||
AGS3::Character_Move(chaa, x, y, blocking, direct);
|
||||
}
|
||||
|
||||
void Character::PlaceOnWalkableArea(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chap);
|
||||
AGS3::Character_PlaceOnWalkableArea(chap);
|
||||
}
|
||||
|
||||
void Character::RemoveTint(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
AGS3::Character_RemoveTint(chaa);
|
||||
}
|
||||
|
||||
void Character::RunInteraction(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, mood);
|
||||
AGS3::Character_RunInteraction(chaa, mood);
|
||||
}
|
||||
|
||||
void Character::ScPl_Say(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
Common::String texx = params.format(1);
|
||||
AGS3::Character_Say(chaa, texx.c_str());
|
||||
}
|
||||
|
||||
void Character::SayAt(ScriptMethodParams ¶ms) {
|
||||
PARAMS5(CharacterInfo *, chaa, int, x, int, y, int, width, const char *, texx);
|
||||
AGS3::Character_SayAt(chaa, x, y, width, texx);
|
||||
}
|
||||
|
||||
void Character::SayBackground(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, const char *, texx);
|
||||
params._result = AGS3::Character_SayBackground(chaa, texx);
|
||||
}
|
||||
|
||||
void Character::SetAsPlayer(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
AGS3::Character_SetAsPlayer(chaa);
|
||||
}
|
||||
|
||||
void Character::SetIdleView(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(CharacterInfo *, chaa, int, iview, int, itime);
|
||||
AGS3::Character_SetIdleView(chaa, iview, itime);
|
||||
}
|
||||
|
||||
void Character::SetProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(CharacterInfo *, chaa, const char *, property, int, value);
|
||||
params._result = AGS3::Character_SetProperty(chaa, property, value);
|
||||
}
|
||||
|
||||
void Character::SetTextProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(CharacterInfo *, chaa, const char *, property, const char *, value);
|
||||
params._result = AGS3::Character_SetTextProperty(chaa, property, value);
|
||||
}
|
||||
|
||||
void Character::SetSpeed(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(CharacterInfo *, chaa, int, xspeed, int, yspeed);
|
||||
AGS3::Character_SetSpeed(chaa, xspeed, yspeed);
|
||||
}
|
||||
|
||||
void Character::StopMoving(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, charp);
|
||||
AGS3::Character_StopMoving(charp);
|
||||
}
|
||||
|
||||
void Character::ScPl_Think(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
Common::String texx = params.format(1);
|
||||
AGS3::Character_Think(chaa, texx.c_str());
|
||||
}
|
||||
|
||||
void Character::Tint(ScriptMethodParams ¶ms) {
|
||||
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 ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
AGS3::Character_UnlockView(chaa);
|
||||
}
|
||||
|
||||
void Character::UnlockViewEx(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, stopMoving);
|
||||
AGS3::Character_UnlockViewEx(chaa, stopMoving);
|
||||
}
|
||||
|
||||
void Character::Walk(ScriptMethodParams ¶ms) {
|
||||
PARAMS5(CharacterInfo *, chaa, int, x, int, y, int, blocking, int, direct);
|
||||
AGS3::Character_Walk(chaa, x, y, blocking, direct);
|
||||
}
|
||||
|
||||
void Character::WalkStraight(ScriptMethodParams ¶ms) {
|
||||
PARAMS4(CharacterInfo *, chaa, int, xx, int, yy, int, blocking);
|
||||
AGS3::Character_WalkStraight(chaa, xx, yy, blocking);
|
||||
}
|
||||
|
||||
void Character::GetCharacterAtRoom(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(int, x, int, y);
|
||||
params._result = AGS3::GetCharacterAtRoom(x, y);
|
||||
}
|
||||
|
||||
void Character::GetCharacterAtScreen(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(int, x, int, y);
|
||||
params._result = AGS3::GetCharacterAtScreen(x, y);
|
||||
}
|
||||
|
||||
void Character::GetActiveInventory(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetActiveInventory(chaa);
|
||||
}
|
||||
|
||||
void Character::SetActiveInventory(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, ScriptInvItem *, iit);
|
||||
AGS3::Character_SetActiveInventory(chaa, iit);
|
||||
}
|
||||
|
||||
void Character::GetAnimating(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetAnimating(chaa);
|
||||
}
|
||||
|
||||
void Character::GetAnimationSpeed(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetAnimationSpeed(chaa);
|
||||
}
|
||||
|
||||
void Character::SetAnimationSpeed(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, newval);
|
||||
AGS3::Character_SetAnimationSpeed(chaa, newval);
|
||||
}
|
||||
|
||||
void Character::GetBaseline(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetBaseline(chaa);
|
||||
}
|
||||
|
||||
void Character::SetBaseline(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, basel);
|
||||
AGS3::Character_SetBaseline(chaa, basel);
|
||||
}
|
||||
|
||||
void Character::GetBlinkInterval(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetBlinkInterval(chaa);
|
||||
}
|
||||
|
||||
void Character::SetBlinkInterval(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, interval);
|
||||
AGS3::Character_SetBlinkInterval(chaa, interval);
|
||||
}
|
||||
|
||||
void Character::GetBlinkView(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetBlinkView(chaa);
|
||||
}
|
||||
|
||||
void Character::SetBlinkView(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, vii);
|
||||
AGS3::Character_SetBlinkView(chaa, vii);
|
||||
}
|
||||
|
||||
void Character::GetBlinkWhileThinking(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetBlinkWhileThinking(chaa);
|
||||
}
|
||||
|
||||
void Character::SetBlinkWhileThinking(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
|
||||
AGS3::Character_SetBlinkWhileThinking(chaa, yesOrNo);
|
||||
}
|
||||
|
||||
void Character::GetBlockingHeight(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetBlockingHeight(chaa);
|
||||
}
|
||||
|
||||
void Character::SetBlockingHeight(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, hit);
|
||||
AGS3::Character_SetBlockingHeight(chaa, hit);
|
||||
}
|
||||
|
||||
void Character::GetBlockingWidth(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetBlockingWidth(chaa);
|
||||
}
|
||||
|
||||
void Character::SetBlockingWidth(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, wid);
|
||||
AGS3::Character_SetBlockingWidth(chaa, wid);
|
||||
}
|
||||
|
||||
void Character::GetClickable(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetClickable(chaa);
|
||||
}
|
||||
|
||||
void Character::SetClickable(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, clik);
|
||||
AGS3::Character_SetClickable(chaa, clik);
|
||||
}
|
||||
|
||||
void Character::GetDestinationX(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetDestinationX(chaa);
|
||||
}
|
||||
|
||||
void Character::GetDestinationY(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetDestinationX(chaa);
|
||||
}
|
||||
|
||||
void Character::GetDiagonalWalking(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetDiagonalWalking(chaa);
|
||||
}
|
||||
|
||||
void Character::SetDiagonalWalking(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
|
||||
AGS3::Character_SetDiagonalWalking(chaa, yesOrNo);
|
||||
}
|
||||
|
||||
void Character::GetFrame(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetFrame(chaa);
|
||||
}
|
||||
|
||||
void Character::SetFrame(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, newVal);
|
||||
AGS3::Character_SetFrame(chaa, newVal);
|
||||
}
|
||||
|
||||
void Character::GetHasExplicitTint_Old(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetHasExplicitTint_Old(chaa);
|
||||
}
|
||||
|
||||
void Character::GetHasExplicitTint(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetHasExplicitTint(chaa);
|
||||
}
|
||||
|
||||
void Character::GetID(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetID(chaa);
|
||||
}
|
||||
|
||||
void Character::GetIdleView(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetIdleView(chaa);
|
||||
}
|
||||
|
||||
void Character::GetIInventoryQuantity(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, index);
|
||||
params._result = AGS3::Character_GetIInventoryQuantity(chaa, index);
|
||||
}
|
||||
|
||||
void Character::SetIInventoryQuantity(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(CharacterInfo *, chaa, int, index, int, quant);
|
||||
AGS3::Character_SetIInventoryQuantity(chaa, index, quant);
|
||||
}
|
||||
|
||||
void Character::GetIgnoreLighting(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetIgnoreLighting(chaa);
|
||||
}
|
||||
|
||||
void Character::SetIgnoreLighting(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
|
||||
AGS3::Character_SetIgnoreLighting(chaa, yesOrNo);
|
||||
}
|
||||
|
||||
void Character::GetIgnoreScaling(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetIgnoreScaling(chaa);
|
||||
}
|
||||
|
||||
void Character::SetIgnoreScaling(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
|
||||
AGS3::Character_SetIgnoreScaling(chaa, yesOrNo);
|
||||
}
|
||||
|
||||
void Character::GetIgnoreWalkbehinds(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetIgnoreWalkbehinds(chaa);
|
||||
}
|
||||
|
||||
void Character::SetIgnoreWalkbehinds(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
|
||||
AGS3::Character_SetIgnoreWalkbehinds(chaa, yesOrNo);
|
||||
}
|
||||
|
||||
void Character::GetLoop(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetLoop(chaa);
|
||||
}
|
||||
|
||||
void Character::SetLoop(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, newVal);
|
||||
AGS3::Character_SetLoop(chaa, newVal);
|
||||
}
|
||||
|
||||
void Character::SetManualScaling(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
|
||||
AGS3::Character_SetManualScaling(chaa, yesOrNo);
|
||||
}
|
||||
|
||||
void Character::GetMovementLinkedToAnimation(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetMovementLinkedToAnimation(chaa);
|
||||
}
|
||||
|
||||
void Character::SetMovementLinkedToAnimation(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
|
||||
AGS3::Character_SetMovementLinkedToAnimation(chaa, yesOrNo);
|
||||
}
|
||||
|
||||
void Character::GetMoving(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetMoving(chaa);
|
||||
}
|
||||
|
||||
void Character::GetName(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetName(chaa);
|
||||
}
|
||||
|
||||
void Character::SetName(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, const char *, newName);
|
||||
AGS3::Character_SetName(chaa, newName);
|
||||
}
|
||||
|
||||
void Character::GetNormalView(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetNormalView(chaa);
|
||||
}
|
||||
|
||||
void Character::GetPreviousRoom(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetPreviousRoom(chaa);
|
||||
}
|
||||
|
||||
void Character::GetRoom(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetRoom(chaa);
|
||||
}
|
||||
|
||||
void Character::GetScaleMoveSpeed(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetScaleMoveSpeed(chaa);
|
||||
}
|
||||
|
||||
void Character::SetScaleMoveSpeed(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
|
||||
AGS3::Character_SetScaleMoveSpeed(chaa, yesOrNo);
|
||||
}
|
||||
|
||||
void Character::GetScaleVolume(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetScaleVolume(chaa);
|
||||
}
|
||||
|
||||
void Character::SetScaleVolume(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
|
||||
AGS3::Character_SetScaleVolume(chaa, yesOrNo);
|
||||
}
|
||||
|
||||
void Character::GetScaling(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetScaling(chaa);
|
||||
}
|
||||
|
||||
void Character::SetScaling(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, zoomLevel);
|
||||
AGS3::Character_SetScaling(chaa, zoomLevel);
|
||||
}
|
||||
|
||||
void Character::GetSolid(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetSolid(chaa);
|
||||
}
|
||||
|
||||
void Character::SetSolid(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
|
||||
AGS3::Character_SetSolid(chaa, yesOrNo);
|
||||
}
|
||||
|
||||
void Character::GetSpeaking(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetSpeaking(chaa);
|
||||
}
|
||||
|
||||
void Character::GetSpeakingFrame(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetSpeakingFrame(chaa);
|
||||
}
|
||||
|
||||
void Character::GetCharacterSpeechAnimationDelay(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::GetCharacterSpeechAnimationDelay(chaa);
|
||||
}
|
||||
|
||||
void Character::SetSpeechAnimationDelay(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, newDelay);
|
||||
AGS3::Character_SetSpeechAnimationDelay(chaa, newDelay);
|
||||
}
|
||||
|
||||
void Character::GetSpeechColor(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetSpeechColor(chaa);
|
||||
}
|
||||
|
||||
void Character::SetSpeechColor(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, ncol);
|
||||
AGS3::Character_SetSpeechColor(chaa, ncol);
|
||||
}
|
||||
|
||||
void Character::GetSpeechView(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetSpeechView(chaa);
|
||||
}
|
||||
|
||||
void Character::SetSpeechView(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, vii);
|
||||
AGS3::Character_SetSpeechView(chaa, vii);
|
||||
}
|
||||
|
||||
void Character::GetThinkView(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetThinkView(chaa);
|
||||
}
|
||||
|
||||
void Character::SetThinkView(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, vii);
|
||||
AGS3::Character_SetThinkView(chaa, vii);
|
||||
}
|
||||
|
||||
void Character::GetTransparency(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetTransparency(chaa);
|
||||
}
|
||||
|
||||
void Character::SetTransparency(ScriptMethodParams ¶ms) {
|
||||
}
|
||||
|
||||
void Character::GetTurnBeforeWalking(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetTurnBeforeWalking(chaa);
|
||||
}
|
||||
|
||||
void Character::SetTurnBeforeWalking(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, yesOrNo);
|
||||
AGS3::Character_SetTurnBeforeWalking(chaa, yesOrNo);
|
||||
}
|
||||
|
||||
void Character::GetView(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetView(chaa);
|
||||
}
|
||||
|
||||
void Character::GetWalkSpeedX(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetWalkSpeedX(chaa);
|
||||
}
|
||||
|
||||
void Character::GetWalkSpeedY(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetWalkSpeedY(chaa);
|
||||
}
|
||||
|
||||
void Character::GetX(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetX(chaa);
|
||||
}
|
||||
|
||||
void Character::SetX(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, newVal);
|
||||
AGS3::Character_SetX(chaa, newVal);
|
||||
}
|
||||
|
||||
void Character::GetY(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetY(chaa);
|
||||
}
|
||||
|
||||
void Character::SetY(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, newVal);
|
||||
AGS3::Character_SetY(chaa, newVal);
|
||||
}
|
||||
|
||||
void Character::GetZ(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(CharacterInfo *, chaa);
|
||||
params._result = AGS3::Character_GetZ(chaa);
|
||||
}
|
||||
|
||||
void Character::SetZ(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(CharacterInfo *, chaa, int, newVal);
|
||||
AGS3::Character_SetZ(chaa, newVal);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
170
engines/ags/plugins/core/character.h
Normal file
170
engines/ags/plugins/core/character.h
Normal 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 ¶ms);
|
||||
void AddWaypoint(ScriptMethodParams ¶ms);
|
||||
void Animate(ScriptMethodParams ¶ms);
|
||||
void ChangeRoom(ScriptMethodParams ¶ms);
|
||||
void ChangeRoomAutoPosition(ScriptMethodParams ¶ms);
|
||||
void ChangeView(ScriptMethodParams ¶ms);
|
||||
void FaceCharacter(ScriptMethodParams ¶ms);
|
||||
void FaceDirection(ScriptMethodParams ¶ms);
|
||||
void FaceLocation(ScriptMethodParams ¶ms);
|
||||
void FaceObject(ScriptMethodParams ¶ms);
|
||||
void FollowCharacter(ScriptMethodParams ¶ms);
|
||||
void GetProperty(ScriptMethodParams ¶ms);
|
||||
void GetPropertyText(ScriptMethodParams ¶ms);
|
||||
void GetTextProperty(ScriptMethodParams ¶ms);
|
||||
void HasInventory(ScriptMethodParams ¶ms);
|
||||
void IsCollidingWithChar(ScriptMethodParams ¶ms);
|
||||
void IsCollidingWithObject(ScriptMethodParams ¶ms);
|
||||
void LockView(ScriptMethodParams ¶ms);
|
||||
void LockViewEx(ScriptMethodParams ¶ms);
|
||||
void LockViewAligned_Old(ScriptMethodParams ¶ms);
|
||||
void LockViewAlignedEx_Old(ScriptMethodParams ¶ms);
|
||||
void LockViewAligned(ScriptMethodParams ¶ms);
|
||||
void LockViewAlignedEx(ScriptMethodParams ¶ms);
|
||||
void LockViewFrame(ScriptMethodParams ¶ms);
|
||||
void LockViewFrameEx(ScriptMethodParams ¶ms);
|
||||
void LockViewOffset(ScriptMethodParams ¶ms);
|
||||
void LoseInventory(ScriptMethodParams ¶ms);
|
||||
void Move(ScriptMethodParams ¶ms);
|
||||
void PlaceOnWalkableArea(ScriptMethodParams ¶ms);
|
||||
void RemoveTint(ScriptMethodParams ¶ms);
|
||||
void RunInteraction(ScriptMethodParams ¶ms);
|
||||
void ScPl_Say(ScriptMethodParams ¶ms);
|
||||
void SayAt(ScriptMethodParams ¶ms);
|
||||
void SayBackground(ScriptMethodParams ¶ms);
|
||||
void SetAsPlayer(ScriptMethodParams ¶ms);
|
||||
void SetIdleView(ScriptMethodParams ¶ms);
|
||||
void SetProperty(ScriptMethodParams ¶ms);
|
||||
void SetTextProperty(ScriptMethodParams ¶ms);
|
||||
void SetSpeed(ScriptMethodParams ¶ms);
|
||||
void StopMoving(ScriptMethodParams ¶ms);
|
||||
void ScPl_Think(ScriptMethodParams ¶ms);
|
||||
void Tint(ScriptMethodParams ¶ms);
|
||||
void UnlockView(ScriptMethodParams ¶ms);
|
||||
void UnlockViewEx(ScriptMethodParams ¶ms);
|
||||
void Walk(ScriptMethodParams ¶ms);
|
||||
void WalkStraight(ScriptMethodParams ¶ms);
|
||||
void GetCharacterAtRoom(ScriptMethodParams ¶ms);
|
||||
void GetCharacterAtScreen(ScriptMethodParams ¶ms);
|
||||
void GetActiveInventory(ScriptMethodParams ¶ms);
|
||||
void SetActiveInventory(ScriptMethodParams ¶ms);
|
||||
void GetAnimating(ScriptMethodParams ¶ms);
|
||||
void GetAnimationSpeed(ScriptMethodParams ¶ms);
|
||||
void SetAnimationSpeed(ScriptMethodParams ¶ms);
|
||||
void GetBaseline(ScriptMethodParams ¶ms);
|
||||
void SetBaseline(ScriptMethodParams ¶ms);
|
||||
void GetBlinkInterval(ScriptMethodParams ¶ms);
|
||||
void SetBlinkInterval(ScriptMethodParams ¶ms);
|
||||
void GetBlinkView(ScriptMethodParams ¶ms);
|
||||
void SetBlinkView(ScriptMethodParams ¶ms);
|
||||
void GetBlinkWhileThinking(ScriptMethodParams ¶ms);
|
||||
void SetBlinkWhileThinking(ScriptMethodParams ¶ms);
|
||||
void GetBlockingHeight(ScriptMethodParams ¶ms);
|
||||
void SetBlockingHeight(ScriptMethodParams ¶ms);
|
||||
void GetBlockingWidth(ScriptMethodParams ¶ms);
|
||||
void SetBlockingWidth(ScriptMethodParams ¶ms);
|
||||
void GetClickable(ScriptMethodParams ¶ms);
|
||||
void SetClickable(ScriptMethodParams ¶ms);
|
||||
void GetDestinationX(ScriptMethodParams ¶ms);
|
||||
void GetDestinationY(ScriptMethodParams ¶ms);
|
||||
void GetDiagonalWalking(ScriptMethodParams ¶ms);
|
||||
void SetDiagonalWalking(ScriptMethodParams ¶ms);
|
||||
void GetFrame(ScriptMethodParams ¶ms);
|
||||
void SetFrame(ScriptMethodParams ¶ms);
|
||||
void GetHasExplicitTint_Old(ScriptMethodParams ¶ms);
|
||||
void GetHasExplicitTint(ScriptMethodParams ¶ms);
|
||||
void GetID(ScriptMethodParams ¶ms);
|
||||
void GetIdleView(ScriptMethodParams ¶ms);
|
||||
void GetIInventoryQuantity(ScriptMethodParams ¶ms);
|
||||
void SetIInventoryQuantity(ScriptMethodParams ¶ms);
|
||||
void GetIgnoreLighting(ScriptMethodParams ¶ms);
|
||||
void SetIgnoreLighting(ScriptMethodParams ¶ms);
|
||||
void GetIgnoreScaling(ScriptMethodParams ¶ms);
|
||||
void SetIgnoreScaling(ScriptMethodParams ¶ms);
|
||||
void GetIgnoreWalkbehinds(ScriptMethodParams ¶ms);
|
||||
void SetIgnoreWalkbehinds(ScriptMethodParams ¶ms);
|
||||
void GetLoop(ScriptMethodParams ¶ms);
|
||||
void SetLoop(ScriptMethodParams ¶ms);
|
||||
void SetManualScaling(ScriptMethodParams ¶ms);
|
||||
void GetMovementLinkedToAnimation(ScriptMethodParams ¶ms);
|
||||
void SetMovementLinkedToAnimation(ScriptMethodParams ¶ms);
|
||||
void GetMoving(ScriptMethodParams ¶ms);
|
||||
void GetName(ScriptMethodParams ¶ms);
|
||||
void SetName(ScriptMethodParams ¶ms);
|
||||
void GetNormalView(ScriptMethodParams ¶ms);
|
||||
void GetPreviousRoom(ScriptMethodParams ¶ms);
|
||||
void GetRoom(ScriptMethodParams ¶ms);
|
||||
void GetScaleMoveSpeed(ScriptMethodParams ¶ms);
|
||||
void SetScaleMoveSpeed(ScriptMethodParams ¶ms);
|
||||
void GetScaleVolume(ScriptMethodParams ¶ms);
|
||||
void SetScaleVolume(ScriptMethodParams ¶ms);
|
||||
void GetScaling(ScriptMethodParams ¶ms);
|
||||
void SetScaling(ScriptMethodParams ¶ms);
|
||||
void GetSolid(ScriptMethodParams ¶ms);
|
||||
void SetSolid(ScriptMethodParams ¶ms);
|
||||
void GetSpeaking(ScriptMethodParams ¶ms);
|
||||
void GetSpeakingFrame(ScriptMethodParams ¶ms);
|
||||
void GetCharacterSpeechAnimationDelay(ScriptMethodParams ¶ms);
|
||||
void SetSpeechAnimationDelay(ScriptMethodParams ¶ms);
|
||||
void GetSpeechColor(ScriptMethodParams ¶ms);
|
||||
void SetSpeechColor(ScriptMethodParams ¶ms);
|
||||
void GetSpeechView(ScriptMethodParams ¶ms);
|
||||
void SetSpeechView(ScriptMethodParams ¶ms);
|
||||
void GetThinkView(ScriptMethodParams ¶ms);
|
||||
void SetThinkView(ScriptMethodParams ¶ms);
|
||||
void GetTransparency(ScriptMethodParams ¶ms);
|
||||
void SetTransparency(ScriptMethodParams ¶ms);
|
||||
void GetTurnBeforeWalking(ScriptMethodParams ¶ms);
|
||||
void SetTurnBeforeWalking(ScriptMethodParams ¶ms);
|
||||
void GetView(ScriptMethodParams ¶ms);
|
||||
void GetWalkSpeedX(ScriptMethodParams ¶ms);
|
||||
void GetWalkSpeedY(ScriptMethodParams ¶ms);
|
||||
void GetX(ScriptMethodParams ¶ms);
|
||||
void SetX(ScriptMethodParams ¶ms);
|
||||
void GetY(ScriptMethodParams ¶ms);
|
||||
void SetY(ScriptMethodParams ¶ms);
|
||||
void GetZ(ScriptMethodParams ¶ms);
|
||||
void SetZ(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
64
engines/ags/plugins/core/core.cpp
Normal file
64
engines/ags/plugins/core/core.cpp
Normal 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
|
||||
103
engines/ags/plugins/core/core.h
Normal file
103
engines/ags/plugins/core/core.h
Normal 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
|
||||
83
engines/ags/plugins/core/date_time.cpp
Normal file
83
engines/ags/plugins/core/date_time.cpp
Normal 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 ¶ms) {
|
||||
params._result = AGS3::DateTime_Now();
|
||||
}
|
||||
|
||||
void DateTime::GetDayOfMonth(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDateTime *, sdt);
|
||||
params._result = AGS3::DateTime_GetDayOfMonth(sdt);
|
||||
}
|
||||
|
||||
void DateTime::GetHour(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDateTime *, sdt);
|
||||
params._result = AGS3::DateTime_GetHour(sdt);
|
||||
}
|
||||
|
||||
void DateTime::GetMinute(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDateTime *, sdt);
|
||||
params._result = AGS3::DateTime_GetMinute(sdt);
|
||||
}
|
||||
|
||||
void DateTime::GetMonth(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDateTime *, sdt);
|
||||
params._result = AGS3::DateTime_GetMonth(sdt);
|
||||
}
|
||||
|
||||
void DateTime::GetRawTime(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDateTime *, sdt);
|
||||
params._result = AGS3::DateTime_GetRawTime(sdt);
|
||||
}
|
||||
|
||||
void DateTime::GetSecond(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDateTime *, sdt);
|
||||
params._result = AGS3::DateTime_GetSecond(sdt);
|
||||
}
|
||||
|
||||
void DateTime::GetYear(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDateTime *, sdt);
|
||||
params._result = AGS3::DateTime_GetYear(sdt);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
51
engines/ags/plugins/core/date_time.h
Normal file
51
engines/ags/plugins/core/date_time.h
Normal 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 ¶ms);
|
||||
void GetDayOfMonth(ScriptMethodParams ¶ms);
|
||||
void GetHour(ScriptMethodParams ¶ms);
|
||||
void GetMinute(ScriptMethodParams ¶ms);
|
||||
void GetMonth(ScriptMethodParams ¶ms);
|
||||
void GetRawTime(ScriptMethodParams ¶ms);
|
||||
void GetSecond(ScriptMethodParams ¶ms);
|
||||
void GetYear(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
90
engines/ags/plugins/core/dialog.cpp
Normal file
90
engines/ags/plugins/core/dialog.cpp
Normal 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 ¶ms) {
|
||||
PARAMS1(ScriptDialog *, sd);
|
||||
params._result = AGS3::Dialog_GetID(sd);
|
||||
}
|
||||
|
||||
void Dialog::GetOptionCount(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDialog *, sd);
|
||||
params._result = AGS3::Dialog_GetOptionCount(sd);
|
||||
}
|
||||
|
||||
void Dialog::GetShowTextParser(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDialog *, sd);
|
||||
params._result = AGS3::Dialog_GetShowTextParser(sd);
|
||||
}
|
||||
|
||||
void Dialog::DisplayOptions(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptDialog *, sd, int, sayChosenOption);
|
||||
params._result = AGS3::Dialog_DisplayOptions(sd, sayChosenOption);
|
||||
}
|
||||
|
||||
void Dialog::GetOptionState(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptDialog *, sd, int, option);
|
||||
params._result = AGS3::Dialog_GetOptionState(sd, option);
|
||||
}
|
||||
|
||||
void Dialog::GetOptionText(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptDialog *, sd, int, option);
|
||||
params._result = AGS3::Dialog_GetOptionText(sd, option);
|
||||
}
|
||||
|
||||
void Dialog::HasOptionBeenChosen(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptDialog *, sd, int, option);
|
||||
params._result = AGS3::Dialog_HasOptionBeenChosen(sd, option);
|
||||
}
|
||||
|
||||
void Dialog::SetOptionState(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(ScriptDialog *, sd, int, option, int, newState);
|
||||
AGS3::Dialog_SetOptionState(sd, option, newState);
|
||||
}
|
||||
|
||||
void Dialog::Start(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDialog *, sd);
|
||||
AGS3::Dialog_Start(sd);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
52
engines/ags/plugins/core/dialog.h
Normal file
52
engines/ags/plugins/core/dialog.h
Normal 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 ¶ms);
|
||||
void GetOptionCount(ScriptMethodParams ¶ms);
|
||||
void GetShowTextParser(ScriptMethodParams ¶ms);
|
||||
void DisplayOptions(ScriptMethodParams ¶ms);
|
||||
void GetOptionState(ScriptMethodParams ¶ms);
|
||||
void GetOptionText(ScriptMethodParams ¶ms);
|
||||
void HasOptionBeenChosen(ScriptMethodParams ¶ms);
|
||||
void SetOptionState(ScriptMethodParams ¶ms);
|
||||
void Start(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
144
engines/ags/plugins/core/dialog_options_rendering_info.cpp
Normal file
144
engines/ags/plugins/core/dialog_options_rendering_info.cpp
Normal 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 ¶ms) {
|
||||
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
|
||||
params._result = AGS3::DialogOptionsRendering_GetActiveOptionID(dlgOptRender);
|
||||
}
|
||||
|
||||
void DialogOptionsRenderingInfo::SetActiveOptionID(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptDialogOptionsRendering *, dlgOptRender, int, activeOptionID);
|
||||
AGS3::DialogOptionsRendering_SetActiveOptionID(dlgOptRender, activeOptionID);
|
||||
}
|
||||
|
||||
void DialogOptionsRenderingInfo::GetDialogToRender(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
|
||||
params._result = AGS3::DialogOptionsRendering_GetDialogToRender(dlgOptRender);
|
||||
}
|
||||
|
||||
void DialogOptionsRenderingInfo::GetHeight(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
|
||||
params._result = AGS3::DialogOptionsRendering_GetHeight(dlgOptRender);
|
||||
}
|
||||
|
||||
void DialogOptionsRenderingInfo::SetHeight(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptDialogOptionsRendering *, dlgOptRender, int, newHeight);
|
||||
AGS3::DialogOptionsRendering_SetHeight(dlgOptRender, newHeight);
|
||||
}
|
||||
|
||||
void DialogOptionsRenderingInfo::GetParserTextboxX(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
|
||||
params._result = AGS3::DialogOptionsRendering_GetParserTextboxX(dlgOptRender);
|
||||
}
|
||||
|
||||
void DialogOptionsRenderingInfo::SetParserTextboxX(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptDialogOptionsRendering *, dlgOptRender, int, newX);
|
||||
AGS3::DialogOptionsRendering_SetParserTextboxX(dlgOptRender, newX);
|
||||
}
|
||||
|
||||
void DialogOptionsRenderingInfo::GetParserTextboxY(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
|
||||
params._result = AGS3::DialogOptionsRendering_GetParserTextboxY(dlgOptRender);
|
||||
}
|
||||
|
||||
void DialogOptionsRenderingInfo::SetParserTextboxY(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptDialogOptionsRendering *, dlgOptRender, int, newY);
|
||||
AGS3::DialogOptionsRendering_SetParserTextboxY(dlgOptRender, newY);
|
||||
}
|
||||
|
||||
void DialogOptionsRenderingInfo::GetParserTextboxWidth(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
|
||||
params._result = AGS3::DialogOptionsRendering_GetParserTextboxWidth(dlgOptRender);
|
||||
}
|
||||
|
||||
void DialogOptionsRenderingInfo::SetParserTextboxWidth(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptDialogOptionsRendering *, dlgOptRender, int, newWidth);
|
||||
AGS3::DialogOptionsRendering_SetParserTextboxWidth(dlgOptRender, newWidth);
|
||||
}
|
||||
|
||||
void DialogOptionsRenderingInfo::GetSurface(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
|
||||
params._result = AGS3::DialogOptionsRendering_GetSurface(dlgOptRender);
|
||||
}
|
||||
|
||||
void DialogOptionsRenderingInfo::GetWidth(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
|
||||
params._result = AGS3::DialogOptionsRendering_GetWidth(dlgOptRender);
|
||||
}
|
||||
|
||||
void DialogOptionsRenderingInfo::SetWidth(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptDialogOptionsRendering *, dlgOptRender, int, newWidth);
|
||||
AGS3::DialogOptionsRendering_SetWidth(dlgOptRender, newWidth);
|
||||
}
|
||||
|
||||
void DialogOptionsRenderingInfo::GetX(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
|
||||
params._result = AGS3::DialogOptionsRendering_GetX(dlgOptRender);
|
||||
}
|
||||
|
||||
void DialogOptionsRenderingInfo::SetX(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptDialogOptionsRendering *, dlgOptRender, int, newX);
|
||||
AGS3::DialogOptionsRendering_SetX(dlgOptRender, newX);
|
||||
}
|
||||
|
||||
void DialogOptionsRenderingInfo::GetY(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDialogOptionsRendering *, dlgOptRender);
|
||||
params._result = AGS3::DialogOptionsRendering_GetY(dlgOptRender);
|
||||
}
|
||||
|
||||
void DialogOptionsRenderingInfo::SetY(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptDialogOptionsRendering *, dlgOptRender, int, newY);
|
||||
AGS3::DialogOptionsRendering_SetY(dlgOptRender, newY);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
61
engines/ags/plugins/core/dialog_options_rendering_info.h
Normal file
61
engines/ags/plugins/core/dialog_options_rendering_info.h
Normal 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 ¶ms);
|
||||
void SetActiveOptionID(ScriptMethodParams ¶ms);
|
||||
void GetDialogToRender(ScriptMethodParams ¶ms);
|
||||
void GetHeight(ScriptMethodParams ¶ms);
|
||||
void SetHeight(ScriptMethodParams ¶ms);
|
||||
void GetParserTextboxX(ScriptMethodParams ¶ms);
|
||||
void SetParserTextboxX(ScriptMethodParams ¶ms);
|
||||
void GetParserTextboxY(ScriptMethodParams ¶ms);
|
||||
void SetParserTextboxY(ScriptMethodParams ¶ms);
|
||||
void GetParserTextboxWidth(ScriptMethodParams ¶ms);
|
||||
void SetParserTextboxWidth(ScriptMethodParams ¶ms);
|
||||
void GetSurface(ScriptMethodParams ¶ms);
|
||||
void GetWidth(ScriptMethodParams ¶ms);
|
||||
void SetWidth(ScriptMethodParams ¶ms);
|
||||
void GetX(ScriptMethodParams ¶ms);
|
||||
void SetX(ScriptMethodParams ¶ms);
|
||||
void GetY(ScriptMethodParams ¶ms);
|
||||
void SetY(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
169
engines/ags/plugins/core/drawing_surface.cpp
Normal file
169
engines/ags/plugins/core/drawing_surface.cpp
Normal 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 ¶ms) {
|
||||
PARAMS2(ScriptDrawingSurface *, sds, int, colour);
|
||||
AGS3::DrawingSurface_Clear(sds, colour);
|
||||
}
|
||||
|
||||
void DrawingSurface::CreateCopy(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDrawingSurface *, sds);
|
||||
params._result = AGS3::DrawingSurface_CreateCopy(sds);
|
||||
}
|
||||
|
||||
void DrawingSurface::DrawCircle(ScriptMethodParams ¶ms) {
|
||||
PARAMS4(ScriptDrawingSurface *, sds, int, x, int, y, int, radius);
|
||||
AGS3::DrawingSurface_DrawCircle(sds, x, y, radius);
|
||||
}
|
||||
|
||||
void DrawingSurface::DrawImage(ScriptMethodParams ¶ms) {
|
||||
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 ¶ms) {
|
||||
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 ¶ms) {
|
||||
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 ¶ms) {
|
||||
PARAMS3(ScriptDrawingSurface *, sds, int, x, int, y);
|
||||
AGS3::DrawingSurface_DrawPixel(sds, x, y);
|
||||
}
|
||||
|
||||
void DrawingSurface::DrawRectangle(ScriptMethodParams ¶ms) {
|
||||
PARAMS5(ScriptDrawingSurface *, sds, int, x1, int, y1, int, x2, int, y2);
|
||||
AGS3::DrawingSurface_DrawRectangle(sds, x1, y1, x2, y2);
|
||||
}
|
||||
|
||||
void DrawingSurface::ScPl_DrawString(ScriptMethodParams ¶ms) {
|
||||
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 ¶ms) {
|
||||
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 ¶ms) {
|
||||
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 ¶ms) {
|
||||
PARAMS3(ScriptDrawingSurface *, target, ScriptDrawingSurface *, source, int, translev);
|
||||
AGS3::DrawingSurface_DrawSurface2(target, source, translev);
|
||||
}
|
||||
|
||||
void DrawingSurface::DrawTriangle(ScriptMethodParams ¶ms) {
|
||||
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 ¶ms) {
|
||||
PARAMS3(ScriptDrawingSurface *, sds, int, x, int, y);
|
||||
params._result = AGS3::DrawingSurface_GetPixel(sds, x, y);
|
||||
}
|
||||
|
||||
void DrawingSurface::Release(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDrawingSurface *, sds);
|
||||
AGS3::DrawingSurface_Release(sds);
|
||||
}
|
||||
|
||||
void DrawingSurface::GetDrawingColor(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDrawingSurface *, sds);
|
||||
params._result = AGS3::DrawingSurface_GetDrawingColor(sds);
|
||||
}
|
||||
|
||||
void DrawingSurface::SetDrawingColor(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptDrawingSurface *, sds, int, newColour);
|
||||
AGS3::DrawingSurface_SetDrawingColor(sds, newColour);
|
||||
}
|
||||
|
||||
void DrawingSurface::GetHeight(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDrawingSurface *, sds);
|
||||
params._result = AGS3::DrawingSurface_GetHeight(sds);
|
||||
}
|
||||
|
||||
void DrawingSurface::GetUseHighResCoordinates(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDrawingSurface *, sds);
|
||||
params._result = AGS3::DrawingSurface_GetUseHighResCoordinates(sds);
|
||||
}
|
||||
|
||||
void DrawingSurface::SetUseHighResCoordinates(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptDrawingSurface *, sds, int, highRes);
|
||||
AGS3::DrawingSurface_SetUseHighResCoordinates(sds, highRes);
|
||||
}
|
||||
|
||||
void DrawingSurface::GetWidth(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDrawingSurface *, sds);
|
||||
params._result = AGS3::DrawingSurface_GetWidth(sds);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
64
engines/ags/plugins/core/drawing_surface.h
Normal file
64
engines/ags/plugins/core/drawing_surface.h
Normal 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 ¶ms);
|
||||
void CreateCopy(ScriptMethodParams ¶ms);
|
||||
void DrawCircle(ScriptMethodParams ¶ms);
|
||||
void DrawImage(ScriptMethodParams ¶ms);
|
||||
void DrawLine(ScriptMethodParams ¶ms);
|
||||
void DrawMessageWrapped(ScriptMethodParams ¶ms);
|
||||
void DrawPixel(ScriptMethodParams ¶ms);
|
||||
void DrawRectangle(ScriptMethodParams ¶ms);
|
||||
void ScPl_DrawString(ScriptMethodParams ¶ms);
|
||||
void DrawStringWrapped_Old(ScriptMethodParams ¶ms);
|
||||
void DrawStringWrapped(ScriptMethodParams ¶ms);
|
||||
void DrawSurface(ScriptMethodParams ¶ms);
|
||||
void DrawTriangle(ScriptMethodParams ¶ms);
|
||||
void GetPixel(ScriptMethodParams ¶ms);
|
||||
void Release(ScriptMethodParams ¶ms);
|
||||
void GetDrawingColor(ScriptMethodParams ¶ms);
|
||||
void SetDrawingColor(ScriptMethodParams ¶ms);
|
||||
void GetHeight(ScriptMethodParams ¶ms);
|
||||
void GetUseHighResCoordinates(ScriptMethodParams ¶ms);
|
||||
void SetUseHighResCoordinates(ScriptMethodParams ¶ms);
|
||||
void GetWidth(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
168
engines/ags/plugins/core/dynamic_sprite.cpp
Normal file
168
engines/ags/plugins/core/dynamic_sprite.cpp
Normal 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 ¶ms) {
|
||||
PARAMS5(ScriptDynamicSprite *, sds, int, width, int, height, int, x, int, y);
|
||||
AGS3::DynamicSprite_ChangeCanvasSize(sds, width, height, x, y);
|
||||
}
|
||||
|
||||
void DynamicSprite::CopyTransparencyMask(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptDynamicSprite *, sds, int, sourceSprite);
|
||||
AGS3::DynamicSprite_CopyTransparencyMask(sds, sourceSprite);
|
||||
}
|
||||
|
||||
void DynamicSprite::Crop(ScriptMethodParams ¶ms) {
|
||||
PARAMS5(ScriptDynamicSprite *, sds, int, x1, int, y1, int, width, int, height);
|
||||
AGS3::DynamicSprite_Crop(sds, x1, y1, width, height);
|
||||
}
|
||||
|
||||
void DynamicSprite::Delete(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDynamicSprite *, sds);
|
||||
AGS3::DynamicSprite_Delete(sds);
|
||||
}
|
||||
|
||||
void DynamicSprite::Flip(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptDynamicSprite *, sds, int, direction);
|
||||
AGS3::DynamicSprite_Flip(sds, direction);
|
||||
}
|
||||
|
||||
void DynamicSprite::GetDrawingSurface(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDynamicSprite *, dss);
|
||||
params._result = AGS3::DynamicSprite_GetDrawingSurface(dss);
|
||||
}
|
||||
|
||||
void DynamicSprite::Resize(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(ScriptDynamicSprite *, sds, int, width, int, height);
|
||||
AGS3::DynamicSprite_Resize(sds, width, height);
|
||||
}
|
||||
|
||||
void DynamicSprite::Rotate(ScriptMethodParams ¶ms) {
|
||||
PARAMS4(ScriptDynamicSprite *, sds, int, angle, int, width, int, height);
|
||||
AGS3::DynamicSprite_Rotate(sds, angle, width, height);
|
||||
}
|
||||
|
||||
void DynamicSprite::SaveToFile(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptDynamicSprite *, sds, const char *, namm);
|
||||
params._result = AGS3::DynamicSprite_SaveToFile(sds, namm);
|
||||
}
|
||||
|
||||
void DynamicSprite::Tint(ScriptMethodParams ¶ms) {
|
||||
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 ¶ms) {
|
||||
PARAMS1(ScriptDynamicSprite *, sds);
|
||||
params._result = AGS3::DynamicSprite_GetColorDepth(sds);
|
||||
}
|
||||
|
||||
void DynamicSprite::GetGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDynamicSprite *, sds);
|
||||
params._result = AGS3::DynamicSprite_GetGraphic(sds);
|
||||
}
|
||||
|
||||
void DynamicSprite::GetHeight(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDynamicSprite *, sds);
|
||||
params._result = AGS3::DynamicSprite_GetHeight(sds);
|
||||
}
|
||||
|
||||
void DynamicSprite::GetWidth(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptDynamicSprite *, sds);
|
||||
params._result = AGS3::DynamicSprite_GetWidth(sds);
|
||||
}
|
||||
|
||||
void DynamicSprite::Create(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(int, width, int, height, int, alphaChannel);
|
||||
params._result = AGS3::DynamicSprite_Create(width, height, alphaChannel);
|
||||
}
|
||||
|
||||
void DynamicSprite::CreateFromBackground(ScriptMethodParams ¶ms) {
|
||||
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 ¶ms) {
|
||||
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 ¶ms) {
|
||||
PARAMS1(int, slot);
|
||||
params._result = AGS3::DynamicSprite_CreateFromExistingSprite_Old(slot);
|
||||
}
|
||||
|
||||
void DynamicSprite::CreateFromExistingSprite(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(int, slot, int, preserveAlphaChannel);
|
||||
params._result = AGS3::DynamicSprite_CreateFromExistingSprite(slot, preserveAlphaChannel);
|
||||
}
|
||||
|
||||
void DynamicSprite::CreateFromFile(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(const char *, filename);
|
||||
params._result = AGS3::DynamicSprite_CreateFromFile(filename);
|
||||
}
|
||||
|
||||
void DynamicSprite::CreateFromSaveGame(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(int, sgslot, int, width, int, height);
|
||||
params._result = AGS3::DynamicSprite_CreateFromSaveGame(sgslot, width, height);
|
||||
}
|
||||
|
||||
void DynamicSprite::CreateFromScreenShot(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(int, width, int, height);
|
||||
params._result = AGS3::DynamicSprite_CreateFromScreenShot(width, height);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
65
engines/ags/plugins/core/dynamic_sprite.h
Normal file
65
engines/ags/plugins/core/dynamic_sprite.h
Normal 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 ¶ms);
|
||||
void CopyTransparencyMask(ScriptMethodParams ¶ms);
|
||||
void Crop(ScriptMethodParams ¶ms);
|
||||
void Delete(ScriptMethodParams ¶ms);
|
||||
void Flip(ScriptMethodParams ¶ms);
|
||||
void GetDrawingSurface(ScriptMethodParams ¶ms);
|
||||
void Resize(ScriptMethodParams ¶ms);
|
||||
void Rotate(ScriptMethodParams ¶ms);
|
||||
void SaveToFile(ScriptMethodParams ¶ms);
|
||||
void Tint(ScriptMethodParams ¶ms);
|
||||
void GetColorDepth(ScriptMethodParams ¶ms);
|
||||
void GetGraphic(ScriptMethodParams ¶ms);
|
||||
void GetHeight(ScriptMethodParams ¶ms);
|
||||
void GetWidth(ScriptMethodParams ¶ms);
|
||||
void Create(ScriptMethodParams ¶ms);
|
||||
void CreateFromBackground(ScriptMethodParams ¶ms);
|
||||
void CreateFromDrawingSurface(ScriptMethodParams ¶ms);
|
||||
void CreateFromExistingSprite_Old(ScriptMethodParams ¶ms);
|
||||
void CreateFromExistingSprite(ScriptMethodParams ¶ms);
|
||||
void CreateFromFile(ScriptMethodParams ¶ms);
|
||||
void CreateFromSaveGame(ScriptMethodParams ¶ms);
|
||||
void CreateFromScreenShot(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
138
engines/ags/plugins/core/file.cpp
Normal file
138
engines/ags/plugins/core/file.cpp
Normal 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 ¶ms) {
|
||||
PARAMS1(const char *, fnmm);
|
||||
params._result = AGS3::File_Delete(fnmm);
|
||||
}
|
||||
|
||||
void File::Exists(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(const char *, fnmm);
|
||||
params._result = AGS3::File_Exists(fnmm);
|
||||
}
|
||||
|
||||
void File::OpenFile(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(const char *, fnmm, int, mode);
|
||||
params._result = AGS3::sc_OpenFile(fnmm, mode);
|
||||
}
|
||||
|
||||
void File::Close(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(sc_File *, fil);
|
||||
AGS3::File_Close(fil);
|
||||
}
|
||||
|
||||
void File::ReadInt(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(sc_File *, fil);
|
||||
params._result = AGS3::File_ReadInt(fil);
|
||||
}
|
||||
|
||||
void File::ReadRawChar(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(sc_File *, fil);
|
||||
params._result = AGS3::File_ReadRawChar(fil);
|
||||
}
|
||||
|
||||
void File::ReadRawInt(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(sc_File *, fil);
|
||||
params._result = AGS3::File_ReadRawInt(fil);
|
||||
}
|
||||
|
||||
void File::ReadRawLine(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(sc_File *, fil, char *, buffer);
|
||||
AGS3::File_ReadRawLine(fil, buffer);
|
||||
}
|
||||
|
||||
void File::ReadRawLineBack(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(sc_File *, fil);
|
||||
params._result = AGS3::File_ReadRawLineBack(fil);
|
||||
}
|
||||
|
||||
void File::ReadString(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(sc_File *, fil);
|
||||
params._result = AGS3::File_ReadInt(fil);
|
||||
}
|
||||
|
||||
void File::ReadStringBack(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(sc_File *, fil);
|
||||
params._result = AGS3::File_ReadStringBack(fil);
|
||||
}
|
||||
|
||||
void File::WriteInt(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(sc_File *, fil, int, towrite);
|
||||
AGS3::File_WriteInt(fil, towrite);
|
||||
}
|
||||
|
||||
void File::WriteRawChar(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(sc_File *, fil, int, towrite);
|
||||
AGS3::File_WriteRawChar(fil, towrite);
|
||||
}
|
||||
|
||||
void File::WriteRawLine(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(sc_File *, fil, const char *, toWrite);
|
||||
AGS3::File_WriteRawLine(fil, toWrite);
|
||||
}
|
||||
|
||||
void File::WriteString(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(sc_File *, fil, const char *, toWrite);
|
||||
AGS3::File_WriteString(fil, toWrite);
|
||||
}
|
||||
|
||||
void File::GetEOF(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(sc_File *, fil);
|
||||
params._result = AGS3::File_GetEOF(fil);
|
||||
}
|
||||
|
||||
void File::GetError(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(sc_File *, fil);
|
||||
params._result = AGS3::File_GetError(fil);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
60
engines/ags/plugins/core/file.h
Normal file
60
engines/ags/plugins/core/file.h
Normal 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 ¶ms);
|
||||
void Exists(ScriptMethodParams ¶ms);
|
||||
void OpenFile(ScriptMethodParams ¶ms);
|
||||
void Close(ScriptMethodParams ¶ms);
|
||||
void ReadInt(ScriptMethodParams ¶ms);
|
||||
void ReadRawChar(ScriptMethodParams ¶ms);
|
||||
void ReadRawInt(ScriptMethodParams ¶ms);
|
||||
void ReadRawLine(ScriptMethodParams ¶ms);
|
||||
void ReadRawLineBack(ScriptMethodParams ¶ms);
|
||||
void ReadString(ScriptMethodParams ¶ms);
|
||||
void ReadStringBack(ScriptMethodParams ¶ms);
|
||||
void WriteInt(ScriptMethodParams ¶ms);
|
||||
void WriteRawChar(ScriptMethodParams ¶ms);
|
||||
void WriteRawLine(ScriptMethodParams ¶ms);
|
||||
void WriteString(ScriptMethodParams ¶ms);
|
||||
void GetEOF(ScriptMethodParams ¶ms);
|
||||
void GetError(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
301
engines/ags/plugins/core/game.cpp
Normal file
301
engines/ags/plugins/core/game.cpp
Normal 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 ¶ms) {
|
||||
PARAMS1(int, audioType);
|
||||
params._result = AGS3::Game_IsAudioPlaying(audioType);
|
||||
}
|
||||
|
||||
void Game::SetAudioTypeSpeechVolumeDrop(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(int, audioType, int, volumeDrop);
|
||||
AGS3::Game_SetAudioTypeSpeechVolumeDrop(audioType, volumeDrop);
|
||||
}
|
||||
|
||||
void Game::SetAudioTypeVolume(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(int, audioType, int, volume, int, changeType);
|
||||
AGS3::Game_SetAudioTypeVolume(audioType, volume, changeType);
|
||||
}
|
||||
|
||||
void Game::StopAudio(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, audioType);
|
||||
AGS3::Game_StopAudio(audioType);
|
||||
}
|
||||
|
||||
void Game::ChangeTranslation(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(const char *, newFilename);
|
||||
params._result = AGS3::Game_ChangeTranslation(newFilename);
|
||||
}
|
||||
|
||||
void Game::DoOnceOnly(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(const char *, token);
|
||||
params._result = AGS3::Game_DoOnceOnly(token);
|
||||
}
|
||||
|
||||
void Game::GetColorFromRGB(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(int, red, int, grn, int, blu);
|
||||
params._result = AGS3::Game_GetColorFromRGB(red, grn, blu);
|
||||
}
|
||||
|
||||
void Game::GetFrameCountForLoop(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(int, viewNumber, int, loopNumber);
|
||||
params._result = AGS3::Game_GetFrameCountForLoop(viewNumber, loopNumber);
|
||||
}
|
||||
|
||||
void Game::GetLocationName(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(int, x, int, y);
|
||||
params._result = AGS3::Game_GetLocationName(x, y);
|
||||
}
|
||||
|
||||
void Game::GetLoopCountForView(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, viewNumber);
|
||||
params._result = AGS3::Game_GetLoopCountForView(viewNumber);
|
||||
}
|
||||
|
||||
void Game::GetMODPattern(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetMODPattern();
|
||||
}
|
||||
|
||||
void Game::GetRunNextSettingForLoop(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(int, viewNumber, int, loopNumber);
|
||||
params._result = AGS3::Game_GetRunNextSettingForLoop(viewNumber, loopNumber);
|
||||
}
|
||||
|
||||
void Game::GetSaveSlotDescription(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, slnum);
|
||||
params._result = AGS3::Game_GetSaveSlotDescription(slnum);
|
||||
}
|
||||
|
||||
void Game::GetViewFrame(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(int, viewNumber, int, loopNumber, int, frame);
|
||||
params._result = AGS3::Game_GetViewFrame(viewNumber, loopNumber, frame);
|
||||
}
|
||||
|
||||
void Game::InputBox(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(const char *, msg);
|
||||
params._result = AGS3::Game_InputBox(msg);
|
||||
}
|
||||
|
||||
void Game::SetSaveGameDirectory(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(const char *, newFolder);
|
||||
params._result = AGS3::Game_SetSaveGameDirectory(newFolder);
|
||||
}
|
||||
|
||||
void Game::StopAllSounds(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, evenAmbient);
|
||||
AGS3::StopAllSounds(evenAmbient);
|
||||
}
|
||||
|
||||
void Game::GetCharacterCount(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetCharacterCount();
|
||||
}
|
||||
|
||||
void Game::GetDialogCount(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetDialogCount();
|
||||
}
|
||||
|
||||
void Game::GetFileName(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetFileName();
|
||||
}
|
||||
|
||||
void Game::GetFontCount(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetFontCount();
|
||||
}
|
||||
|
||||
void Game::GetGlobalMessages(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, index);
|
||||
params._result = AGS3::Game_GetGlobalMessages(index);
|
||||
}
|
||||
|
||||
void Game::GetGlobalStrings(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, index);
|
||||
params._result = AGS3::Game_GetGlobalStrings(index);
|
||||
}
|
||||
|
||||
void Game::SetGlobalString(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(int, index, const char *, newVal);
|
||||
AGS3::SetGlobalString(index, newVal);
|
||||
}
|
||||
|
||||
void Game::GetGUICount(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetGUICount();
|
||||
}
|
||||
|
||||
void Game::GetIgnoreUserInputAfterTextTimeoutMs(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetIgnoreUserInputAfterTextTimeoutMs();
|
||||
}
|
||||
|
||||
void Game::SetIgnoreUserInputAfterTextTimeoutMs(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, newValueMs);
|
||||
AGS3::Game_SetIgnoreUserInputAfterTextTimeoutMs(newValueMs);
|
||||
}
|
||||
|
||||
void Game::GetInSkippableCutscene(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetInSkippableCutscene();
|
||||
}
|
||||
|
||||
void Game::GetInventoryItemCount(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetInventoryItemCount();
|
||||
}
|
||||
|
||||
void Game::GetMinimumTextDisplayTimeMs(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetMinimumTextDisplayTimeMs();
|
||||
}
|
||||
|
||||
void Game::SetMinimumTextDisplayTimeMs(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, newTextMinTime);
|
||||
AGS3::Game_SetMinimumTextDisplayTimeMs(newTextMinTime);
|
||||
}
|
||||
|
||||
void Game::GetMouseCursorCount(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetMouseCursorCount();
|
||||
}
|
||||
|
||||
void Game::GetName(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetName();
|
||||
}
|
||||
|
||||
void Game::SetName(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(const char *, newName);
|
||||
AGS3::Game_SetName(newName);
|
||||
}
|
||||
|
||||
void Game::GetNormalFont(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetNormalFont();
|
||||
}
|
||||
|
||||
void Game::SetNormalFont(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, fontNum);
|
||||
AGS3::SetNormalFont(fontNum);
|
||||
}
|
||||
|
||||
void Game::GetSkippingCutscene(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetName();
|
||||
}
|
||||
|
||||
void Game::GetSpeechFont(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetSpeechFont();
|
||||
}
|
||||
|
||||
void Game::SetSpeechFont(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, fontNum);
|
||||
AGS3::SetSpeechFont(fontNum);
|
||||
}
|
||||
|
||||
void Game::GetSpriteWidth(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, spriteNum);
|
||||
params._result = AGS3::Game_GetSpriteWidth(spriteNum);
|
||||
}
|
||||
|
||||
void Game::GetSpriteHeight(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, spriteNum);
|
||||
params._result = AGS3::Game_GetSpriteHeight(spriteNum);
|
||||
}
|
||||
|
||||
void Game::GetTextReadingSpeed(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetTextReadingSpeed();
|
||||
}
|
||||
|
||||
void Game::SetTextReadingSpeed(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, newTextSpeed);
|
||||
AGS3::Game_SetTextReadingSpeed(newTextSpeed);
|
||||
}
|
||||
|
||||
void Game::GetTranslationFilename(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetTranslationFilename();
|
||||
}
|
||||
|
||||
void Game::GetUseNativeCoordinates(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetUseNativeCoordinates();
|
||||
}
|
||||
|
||||
void Game::GetViewCount(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Game_GetViewCount();
|
||||
}
|
||||
|
||||
void Game::PlayVoiceClip(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(CharacterInfo *, ch, int, sndid, bool, as_speech);
|
||||
params._result = AGS3::PlayVoiceClip(ch, sndid, as_speech);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
90
engines/ags/plugins/core/game.h
Normal file
90
engines/ags/plugins/core/game.h
Normal 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 ¶ms);
|
||||
void SetAudioTypeSpeechVolumeDrop(ScriptMethodParams ¶ms);
|
||||
void SetAudioTypeVolume(ScriptMethodParams ¶ms);
|
||||
void StopAudio(ScriptMethodParams ¶ms);
|
||||
void ChangeTranslation(ScriptMethodParams ¶ms);
|
||||
void DoOnceOnly(ScriptMethodParams ¶ms);
|
||||
void GetColorFromRGB(ScriptMethodParams ¶ms);
|
||||
void GetFrameCountForLoop(ScriptMethodParams ¶ms);
|
||||
void GetLocationName(ScriptMethodParams ¶ms);
|
||||
void GetLoopCountForView(ScriptMethodParams ¶ms);
|
||||
void GetMODPattern(ScriptMethodParams ¶ms);
|
||||
void GetRunNextSettingForLoop(ScriptMethodParams ¶ms);
|
||||
void GetSaveSlotDescription(ScriptMethodParams ¶ms);
|
||||
void GetViewFrame(ScriptMethodParams ¶ms);
|
||||
void InputBox(ScriptMethodParams ¶ms);
|
||||
void SetSaveGameDirectory(ScriptMethodParams ¶ms);
|
||||
void StopAllSounds(ScriptMethodParams ¶ms);
|
||||
void GetCharacterCount(ScriptMethodParams ¶ms);
|
||||
void GetDialogCount(ScriptMethodParams ¶ms);
|
||||
void GetFileName(ScriptMethodParams ¶ms);
|
||||
void GetFontCount(ScriptMethodParams ¶ms);
|
||||
void GetGlobalMessages(ScriptMethodParams ¶ms);
|
||||
void GetGlobalStrings(ScriptMethodParams ¶ms);
|
||||
void SetGlobalString(ScriptMethodParams ¶ms);
|
||||
void GetGUICount(ScriptMethodParams ¶ms);
|
||||
void GetIgnoreUserInputAfterTextTimeoutMs(ScriptMethodParams ¶ms);
|
||||
void SetIgnoreUserInputAfterTextTimeoutMs(ScriptMethodParams ¶ms);
|
||||
void GetInSkippableCutscene(ScriptMethodParams ¶ms);
|
||||
void GetInventoryItemCount(ScriptMethodParams ¶ms);
|
||||
void GetMinimumTextDisplayTimeMs(ScriptMethodParams ¶ms);
|
||||
void SetMinimumTextDisplayTimeMs(ScriptMethodParams ¶ms);
|
||||
void GetMouseCursorCount(ScriptMethodParams ¶ms);
|
||||
void GetName(ScriptMethodParams ¶ms);
|
||||
void SetName(ScriptMethodParams ¶ms);
|
||||
void GetNormalFont(ScriptMethodParams ¶ms);
|
||||
void SetNormalFont(ScriptMethodParams ¶ms);
|
||||
void GetSkippingCutscene(ScriptMethodParams ¶ms);
|
||||
void GetSpeechFont(ScriptMethodParams ¶ms);
|
||||
void SetSpeechFont(ScriptMethodParams ¶ms);
|
||||
void GetSpriteWidth(ScriptMethodParams ¶ms);
|
||||
void GetSpriteHeight(ScriptMethodParams ¶ms);
|
||||
void GetTextReadingSpeed(ScriptMethodParams ¶ms);
|
||||
void SetTextReadingSpeed(ScriptMethodParams ¶ms);
|
||||
void GetTranslationFilename(ScriptMethodParams ¶ms);
|
||||
void GetUseNativeCoordinates(ScriptMethodParams ¶ms);
|
||||
void GetViewCount(ScriptMethodParams ¶ms);
|
||||
void PlayVoiceClip(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
2227
engines/ags/plugins/core/global_api.cpp
Normal file
2227
engines/ags/plugins/core/global_api.cpp
Normal file
File diff suppressed because it is too large
Load Diff
404
engines/ags/plugins/core/global_api.h
Normal file
404
engines/ags/plugins/core/global_api.h
Normal 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 ¶ms);
|
||||
void add_inventory(ScriptMethodParams ¶ms);
|
||||
void AddInventoryToCharacter(ScriptMethodParams ¶ms);
|
||||
void AnimateButton(ScriptMethodParams ¶ms);
|
||||
void AnimateCharacter4(ScriptMethodParams ¶ms);
|
||||
void AnimateCharacter6(ScriptMethodParams ¶ms);
|
||||
void AnimateObject4(ScriptMethodParams ¶ms);
|
||||
void AnimateObject6(ScriptMethodParams ¶ms);
|
||||
void AreCharactersColliding(ScriptMethodParams ¶ms);
|
||||
void AreCharObjColliding(ScriptMethodParams ¶ms);
|
||||
void AreObjectsColliding(ScriptMethodParams ¶ms);
|
||||
void AreThingsOverlapping(ScriptMethodParams ¶ms);
|
||||
void CallRoomScript(ScriptMethodParams ¶ms);
|
||||
void cd_manager(ScriptMethodParams ¶ms);
|
||||
void CentreGUI(ScriptMethodParams ¶ms);
|
||||
void ChangeCharacterView(ScriptMethodParams ¶ms);
|
||||
void ChangeCursorGraphic(ScriptMethodParams ¶ms);
|
||||
void ChangeCursorHotspot(ScriptMethodParams ¶ms);
|
||||
void ClaimEvent(ScriptMethodParams ¶ms);
|
||||
void CreateGraphicOverlay(ScriptMethodParams ¶ms);
|
||||
void ScPl_CreateTextOverlay(ScriptMethodParams ¶ms);
|
||||
void CyclePalette(ScriptMethodParams ¶ms);
|
||||
void script_debug(ScriptMethodParams ¶ms);
|
||||
void DeleteSaveSlot(ScriptMethodParams ¶ms);
|
||||
void free_dynamic_sprite(ScriptMethodParams ¶ms);
|
||||
void disable_cursor_mode(ScriptMethodParams ¶ms);
|
||||
void DisableGroundLevelAreas(ScriptMethodParams ¶ms);
|
||||
void DisableHotspot(ScriptMethodParams ¶ms);
|
||||
void DisableInterface(ScriptMethodParams ¶ms);
|
||||
void DisableRegion(ScriptMethodParams ¶ms);
|
||||
void ScPl_Display(ScriptMethodParams ¶ms);
|
||||
void ScPl_DisplayAt(ScriptMethodParams ¶ms);
|
||||
void DisplayAtY(ScriptMethodParams ¶ms);
|
||||
void DisplayMessage(ScriptMethodParams ¶ms);
|
||||
void DisplayMessageAtY(ScriptMethodParams ¶ms);
|
||||
void DisplayMessageBar(ScriptMethodParams ¶ms);
|
||||
void ScPl_sc_displayspeech(ScriptMethodParams ¶ms);
|
||||
void DisplaySpeechAt(ScriptMethodParams ¶ms);
|
||||
void DisplaySpeechBackground(ScriptMethodParams ¶ms);
|
||||
void ScPl_DisplayThought(ScriptMethodParams ¶ms);
|
||||
void ScPl_DisplayTopBar(ScriptMethodParams ¶ms);
|
||||
void enable_cursor_mode(ScriptMethodParams ¶ms);
|
||||
void EnableGroundLevelAreas(ScriptMethodParams ¶ms);
|
||||
void EnableHotspot(ScriptMethodParams ¶ms);
|
||||
void EnableInterface(ScriptMethodParams ¶ms);
|
||||
void EnableRegion(ScriptMethodParams ¶ms);
|
||||
void EndCutscene(ScriptMethodParams ¶ms);
|
||||
void FaceCharacter(ScriptMethodParams ¶ms);
|
||||
void FaceLocation(ScriptMethodParams ¶ms);
|
||||
void FadeIn(ScriptMethodParams ¶ms);
|
||||
void FadeOut(ScriptMethodParams ¶ms);
|
||||
void FileClose(ScriptMethodParams ¶ms);
|
||||
void FileIsEOF(ScriptMethodParams ¶ms);
|
||||
void FileIsError(ScriptMethodParams ¶ms);
|
||||
// NOTE: FileOpenCMode is a backwards-compatible replacement for old-style global script function FileOpen
|
||||
void FileOpenCMode(ScriptMethodParams ¶ms);
|
||||
void FileRead(ScriptMethodParams ¶ms);
|
||||
void FileReadInt(ScriptMethodParams ¶ms);
|
||||
void FileReadRawChar(ScriptMethodParams ¶ms);
|
||||
void FileReadRawInt(ScriptMethodParams ¶ms);
|
||||
void FileWrite(ScriptMethodParams ¶ms);
|
||||
void FileWriteInt(ScriptMethodParams ¶ms);
|
||||
void FileWriteRawChar(ScriptMethodParams ¶ms);
|
||||
void FileWriteRawLine(ScriptMethodParams ¶ms);
|
||||
void FindGUIID(ScriptMethodParams ¶ms);
|
||||
void FlipScreen(ScriptMethodParams ¶ms);
|
||||
void FloatToInt(ScriptMethodParams ¶ms);
|
||||
void FollowCharacter(ScriptMethodParams ¶ms);
|
||||
void FollowCharacterEx(ScriptMethodParams ¶ms);
|
||||
void GetBackgroundFrame(ScriptMethodParams ¶ms);
|
||||
void GetButtonPic(ScriptMethodParams ¶ms);
|
||||
void GetCharIDAtScreen(ScriptMethodParams ¶ms);
|
||||
void GetCharacterProperty(ScriptMethodParams ¶ms);
|
||||
void GetCharacterPropertyText(ScriptMethodParams ¶ms);
|
||||
void GetCurrentMusic(ScriptMethodParams ¶ms);
|
||||
void GetCursorMode(ScriptMethodParams ¶ms);
|
||||
void GetDialogOption(ScriptMethodParams ¶ms);
|
||||
void GetGameOption(ScriptMethodParams ¶ms);
|
||||
void GetGameParameter(ScriptMethodParams ¶ms);
|
||||
void GetGameSpeed(ScriptMethodParams ¶ms);
|
||||
void GetGlobalInt(ScriptMethodParams ¶ms);
|
||||
void GetGlobalString(ScriptMethodParams ¶ms);
|
||||
void GetGraphicalVariable(ScriptMethodParams ¶ms);
|
||||
void GetGUIAt(ScriptMethodParams ¶ms);
|
||||
void GetGUIObjectAt(ScriptMethodParams ¶ms);
|
||||
void GetHotspotIDAtScreen(ScriptMethodParams ¶ms);
|
||||
void GetHotspotName(ScriptMethodParams ¶ms);
|
||||
void GetHotspotPointX(ScriptMethodParams ¶ms);
|
||||
void GetHotspotPointY(ScriptMethodParams ¶ms);
|
||||
void GetHotspotProperty(ScriptMethodParams ¶ms);
|
||||
void GetHotspotPropertyText(ScriptMethodParams ¶ms);
|
||||
void GetInvAt(ScriptMethodParams ¶ms);
|
||||
void GetInvGraphic(ScriptMethodParams ¶ms);
|
||||
void GetInvName(ScriptMethodParams ¶ms);
|
||||
void GetInvProperty(ScriptMethodParams ¶ms);
|
||||
void GetInvPropertyText(ScriptMethodParams ¶ms);
|
||||
void GetLocationName(ScriptMethodParams ¶ms);
|
||||
void GetLocationType(ScriptMethodParams ¶ms);
|
||||
void GetMessageText(ScriptMethodParams ¶ms);
|
||||
void GetMIDIPosition(ScriptMethodParams ¶ms);
|
||||
void GetMP3PosMillis(ScriptMethodParams ¶ms);
|
||||
void GetObjectIDAtScreen(ScriptMethodParams ¶ms);
|
||||
void GetObjectBaseline(ScriptMethodParams ¶ms);
|
||||
void GetObjectGraphic(ScriptMethodParams ¶ms);
|
||||
void GetObjectName(ScriptMethodParams ¶ms);
|
||||
void GetObjectProperty(ScriptMethodParams ¶ms);
|
||||
void GetObjectPropertyText(ScriptMethodParams ¶ms);
|
||||
void GetObjectX(ScriptMethodParams ¶ms);
|
||||
void GetObjectY(ScriptMethodParams ¶ms);
|
||||
void GetPlayerCharacter(ScriptMethodParams ¶ms);
|
||||
void GetRawTime(ScriptMethodParams ¶ms);
|
||||
void GetRegionIDAtRoom(ScriptMethodParams ¶ms);
|
||||
void Room_GetProperty(ScriptMethodParams ¶ms);
|
||||
void GetRoomPropertyText(ScriptMethodParams ¶ms);
|
||||
void GetSaveSlotDescription(ScriptMethodParams ¶ms);
|
||||
void GetScalingAt(ScriptMethodParams ¶ms);
|
||||
void GetSliderValue(ScriptMethodParams ¶ms);
|
||||
void GetTextBoxText(ScriptMethodParams ¶ms);
|
||||
void GetTextHeight(ScriptMethodParams ¶ms);
|
||||
void GetTextWidth(ScriptMethodParams ¶ms);
|
||||
void sc_GetTime(ScriptMethodParams ¶ms);
|
||||
void get_translation(ScriptMethodParams ¶ms);
|
||||
void GetTranslationName(ScriptMethodParams ¶ms);
|
||||
void GetViewportX(ScriptMethodParams ¶ms);
|
||||
void GetViewportY(ScriptMethodParams ¶ms);
|
||||
void GetWalkableAreaAtRoom(ScriptMethodParams ¶ms);
|
||||
void GetWalkableAreaAtScreen(ScriptMethodParams ¶ms);
|
||||
void GiveScore(ScriptMethodParams ¶ms);
|
||||
void HasPlayerBeenInRoom(ScriptMethodParams ¶ms);
|
||||
void HideMouseCursor(ScriptMethodParams ¶ms);
|
||||
void ShowInputBox(ScriptMethodParams ¶ms);
|
||||
void InterfaceOff(ScriptMethodParams ¶ms);
|
||||
void InterfaceOn(ScriptMethodParams ¶ms);
|
||||
void IntToFloat(ScriptMethodParams ¶ms);
|
||||
void sc_invscreen(ScriptMethodParams ¶ms);
|
||||
void IsButtonDown(ScriptMethodParams ¶ms);
|
||||
void IsChannelPlaying(ScriptMethodParams ¶ms);
|
||||
void IsGamePaused(ScriptMethodParams ¶ms);
|
||||
void IsGUIOn(ScriptMethodParams ¶ms);
|
||||
void IsInteractionAvailable(ScriptMethodParams ¶ms);
|
||||
void IsInventoryInteractionAvailable(ScriptMethodParams ¶ms);
|
||||
void IsInterfaceEnabled(ScriptMethodParams ¶ms);
|
||||
void IsKeyPressed(ScriptMethodParams ¶ms);
|
||||
void IsMusicPlaying(ScriptMethodParams ¶ms);
|
||||
void IsMusicVoxAvailable(ScriptMethodParams ¶ms);
|
||||
void IsObjectAnimating(ScriptMethodParams ¶ms);
|
||||
void IsObjectMoving(ScriptMethodParams ¶ms);
|
||||
void IsObjectOn(ScriptMethodParams ¶ms);
|
||||
void IsOverlayValid(ScriptMethodParams ¶ms);
|
||||
void IsSoundPlaying(ScriptMethodParams ¶ms);
|
||||
void IsTimerExpired(ScriptMethodParams ¶ms);
|
||||
void IsTranslationAvailable(ScriptMethodParams ¶ms);
|
||||
void IsVoxAvailable(ScriptMethodParams ¶ms);
|
||||
void ListBoxAdd(ScriptMethodParams ¶ms);
|
||||
void ListBoxClear(ScriptMethodParams ¶ms);
|
||||
void ListBoxDirList(ScriptMethodParams ¶ms);
|
||||
void ListBoxGetItemText(ScriptMethodParams ¶ms);
|
||||
void ListBoxGetNumItems(ScriptMethodParams ¶ms);
|
||||
void ListBoxGetSelected(ScriptMethodParams ¶ms);
|
||||
void ListBoxRemove(ScriptMethodParams ¶ms);
|
||||
void ListBoxSaveGameList(ScriptMethodParams ¶ms);
|
||||
void ListBoxSetSelected(ScriptMethodParams ¶ms);
|
||||
void ListBoxSetTopItem(ScriptMethodParams ¶ms);
|
||||
void LoadImageFile(ScriptMethodParams ¶ms);
|
||||
void LoadSaveSlotScreenshot(ScriptMethodParams ¶ms);
|
||||
void lose_inventory(ScriptMethodParams ¶ms);
|
||||
void LoseInventoryFromCharacter(ScriptMethodParams ¶ms);
|
||||
void MergeObject(ScriptMethodParams ¶ms);
|
||||
void MoveCharacter(ScriptMethodParams ¶ms);
|
||||
void MoveCharacterBlocking(ScriptMethodParams ¶ms);
|
||||
void MoveCharacterDirect(ScriptMethodParams ¶ms);
|
||||
void MoveCharacterPath(ScriptMethodParams ¶ms);
|
||||
void MoveCharacterStraight(ScriptMethodParams ¶ms);
|
||||
void MoveCharacterToHotspot(ScriptMethodParams ¶ms);
|
||||
void MoveCharacterToObject(ScriptMethodParams ¶ms);
|
||||
void MoveObject(ScriptMethodParams ¶ms);
|
||||
void MoveObjectDirect(ScriptMethodParams ¶ms);
|
||||
void MoveOverlay(ScriptMethodParams ¶ms);
|
||||
void MoveToWalkableArea(ScriptMethodParams ¶ms);
|
||||
void NewRoom(ScriptMethodParams ¶ms);
|
||||
void NewRoomEx(ScriptMethodParams ¶ms);
|
||||
void NewRoomNPC(ScriptMethodParams ¶ms);
|
||||
void ObjectOff(ScriptMethodParams ¶ms);
|
||||
void ObjectOn(ScriptMethodParams ¶ms);
|
||||
void ParseText(ScriptMethodParams ¶ms);
|
||||
void PauseGame(ScriptMethodParams ¶ms);
|
||||
void PlayAmbientSound(ScriptMethodParams ¶ms);
|
||||
void PlayFlic(ScriptMethodParams ¶ms);
|
||||
void PlayMP3File(ScriptMethodParams ¶ms);
|
||||
void PlayMusicResetQueue(ScriptMethodParams ¶ms);
|
||||
void PlayMusicQueued(ScriptMethodParams ¶ms);
|
||||
void PlaySilentMIDI(ScriptMethodParams ¶ms);
|
||||
void play_sound(ScriptMethodParams ¶ms);
|
||||
void PlaySoundEx(ScriptMethodParams ¶ms);
|
||||
void PlayVideo(ScriptMethodParams ¶ms);
|
||||
void RoomProcessClick(ScriptMethodParams ¶ms);
|
||||
void QuitGame(ScriptMethodParams ¶ms);
|
||||
void __Rand(ScriptMethodParams ¶ms);
|
||||
void RawClear(ScriptMethodParams ¶ms);
|
||||
void RawDrawCircle(ScriptMethodParams ¶ms);
|
||||
void RawDrawFrameTransparent(ScriptMethodParams ¶ms);
|
||||
void RawDrawImage(ScriptMethodParams ¶ms);
|
||||
void RawDrawImageOffset(ScriptMethodParams ¶ms);
|
||||
void RawDrawImageResized(ScriptMethodParams ¶ms);
|
||||
void RawDrawImageTransparent(ScriptMethodParams ¶ms);
|
||||
void RawDrawLine(ScriptMethodParams ¶ms);
|
||||
void RawDrawRectangle(ScriptMethodParams ¶ms);
|
||||
void RawDrawTriangle(ScriptMethodParams ¶ms);
|
||||
void ScPl_RawPrint(ScriptMethodParams ¶ms);
|
||||
void RawPrintMessageWrapped(ScriptMethodParams ¶ms);
|
||||
void RawRestoreScreen(ScriptMethodParams ¶ms);
|
||||
void RawRestoreScreenTinted(ScriptMethodParams ¶ms);
|
||||
void RawSaveScreen(ScriptMethodParams ¶ms);
|
||||
void RawSetColor(ScriptMethodParams ¶ms);
|
||||
void RawSetColorRGB(ScriptMethodParams ¶ms);
|
||||
void RefreshMouse(ScriptMethodParams ¶ms);
|
||||
void ReleaseCharacterView(ScriptMethodParams ¶ms);
|
||||
void ReleaseViewport(ScriptMethodParams ¶ms);
|
||||
void RemoveObjectTint(ScriptMethodParams ¶ms);
|
||||
void RemoveOverlay(ScriptMethodParams ¶ms);
|
||||
void RemoveWalkableArea(ScriptMethodParams ¶ms);
|
||||
void ResetRoom(ScriptMethodParams ¶ms);
|
||||
void restart_game(ScriptMethodParams ¶ms);
|
||||
void restore_game_dialog(ScriptMethodParams ¶ms);
|
||||
void RestoreGameSlot(ScriptMethodParams ¶ms);
|
||||
void RestoreWalkableArea(ScriptMethodParams ¶ms);
|
||||
void RunAGSGame(ScriptMethodParams ¶ms);
|
||||
void RunCharacterInteraction(ScriptMethodParams ¶ms);
|
||||
void RunDialog(ScriptMethodParams ¶ms);
|
||||
void RunHotspotInteraction(ScriptMethodParams ¶ms);
|
||||
void RunInventoryInteraction(ScriptMethodParams ¶ms);
|
||||
void RunObjectInteraction(ScriptMethodParams ¶ms);
|
||||
void RunRegionInteraction(ScriptMethodParams ¶ms);
|
||||
void Said(ScriptMethodParams ¶ms);
|
||||
void SaidUnknownWord(ScriptMethodParams ¶ms);
|
||||
void SaveCursorForLocationChange(ScriptMethodParams ¶ms);
|
||||
void save_game_dialog(ScriptMethodParams ¶ms);
|
||||
void save_game(ScriptMethodParams ¶ms);
|
||||
void SaveScreenShot(ScriptMethodParams ¶ms);
|
||||
void SeekMIDIPosition(ScriptMethodParams ¶ms);
|
||||
void SeekMODPattern(ScriptMethodParams ¶ms);
|
||||
void SeekMP3PosMillis(ScriptMethodParams ¶ms);
|
||||
void SetActiveInventory(ScriptMethodParams ¶ms);
|
||||
void SetAmbientTint(ScriptMethodParams ¶ms);
|
||||
void SetAreaLightLevel(ScriptMethodParams ¶ms);
|
||||
void SetAreaScaling(ScriptMethodParams ¶ms);
|
||||
void SetBackgroundFrame(ScriptMethodParams ¶ms);
|
||||
void SetButtonPic(ScriptMethodParams ¶ms);
|
||||
void SetButtonText(ScriptMethodParams ¶ms);
|
||||
void SetChannelVolume(ScriptMethodParams ¶ms);
|
||||
void SetCharacterBaseline(ScriptMethodParams ¶ms);
|
||||
void SetCharacterClickable(ScriptMethodParams ¶ms);
|
||||
void SetCharacterFrame(ScriptMethodParams ¶ms);
|
||||
void SetCharacterIdle(ScriptMethodParams ¶ms);
|
||||
void SetCharacterIgnoreLight(ScriptMethodParams ¶ms);
|
||||
void SetCharacterIgnoreWalkbehinds(ScriptMethodParams ¶ms);
|
||||
void SetCharacterProperty(ScriptMethodParams ¶ms);
|
||||
void SetCharacterBlinkView(ScriptMethodParams ¶ms);
|
||||
void SetCharacterSpeechView(ScriptMethodParams ¶ms);
|
||||
void SetCharacterSpeed(ScriptMethodParams ¶ms);
|
||||
void SetCharacterSpeedEx(ScriptMethodParams ¶ms);
|
||||
void SetCharacterTransparency(ScriptMethodParams ¶ms);
|
||||
void SetCharacterView(ScriptMethodParams ¶ms);
|
||||
void SetCharacterViewEx(ScriptMethodParams ¶ms);
|
||||
void SetCharacterViewOffset(ScriptMethodParams ¶ms);
|
||||
void set_cursor_mode(ScriptMethodParams ¶ms);
|
||||
void set_default_cursor(ScriptMethodParams ¶ms);
|
||||
void SetDialogOption(ScriptMethodParams ¶ms);
|
||||
void SetDigitalMasterVolume(ScriptMethodParams ¶ms);
|
||||
void SetFadeColor(ScriptMethodParams ¶ms);
|
||||
void SetFrameSound(ScriptMethodParams ¶ms);
|
||||
void SetGameOption(ScriptMethodParams ¶ms);
|
||||
void SetGameSpeed(ScriptMethodParams ¶ms);
|
||||
void SetGlobalInt(ScriptMethodParams ¶ms);
|
||||
void SetGlobalString(ScriptMethodParams ¶ms);
|
||||
void SetGraphicalVariable(ScriptMethodParams ¶ms);
|
||||
void SetGUIBackgroundPic(ScriptMethodParams ¶ms);
|
||||
void SetGUIClickable(ScriptMethodParams ¶ms);
|
||||
void SetGUIObjectEnabled(ScriptMethodParams ¶ms);
|
||||
void SetGUIObjectPosition(ScriptMethodParams ¶ms);
|
||||
void SetGUIObjectSize(ScriptMethodParams ¶ms);
|
||||
void SetGUIPosition(ScriptMethodParams ¶ms);
|
||||
void SetGUISize(ScriptMethodParams ¶ms);
|
||||
void SetGUITransparency(ScriptMethodParams ¶ms);
|
||||
void SetGUIZOrder(ScriptMethodParams ¶ms);
|
||||
void SetInvItemName(ScriptMethodParams ¶ms);
|
||||
void set_inv_item_pic(ScriptMethodParams ¶ms);
|
||||
void SetInvDimensions(ScriptMethodParams ¶ms);
|
||||
void SetLabelColor(ScriptMethodParams ¶ms);
|
||||
void SetLabelFont(ScriptMethodParams ¶ms);
|
||||
void SetLabelText(ScriptMethodParams ¶ms);
|
||||
void SetMouseBounds(ScriptMethodParams ¶ms);
|
||||
void set_mouse_cursor(ScriptMethodParams ¶ms);
|
||||
void SetMousePosition(ScriptMethodParams ¶ms);
|
||||
void SetMultitasking(ScriptMethodParams ¶ms);
|
||||
void SetMusicMasterVolume(ScriptMethodParams ¶ms);
|
||||
void SetMusicRepeat(ScriptMethodParams ¶ms);
|
||||
void SetMusicVolume(ScriptMethodParams ¶ms);
|
||||
void SetNextCursor(ScriptMethodParams ¶ms);
|
||||
void SetNextScreenTransition(ScriptMethodParams ¶ms);
|
||||
void SetNormalFont(ScriptMethodParams ¶ms);
|
||||
void SetObjectBaseline(ScriptMethodParams ¶ms);
|
||||
void SetObjectClickable(ScriptMethodParams ¶ms);
|
||||
void SetObjectFrame(ScriptMethodParams ¶ms);
|
||||
void SetObjectGraphic(ScriptMethodParams ¶ms);
|
||||
void SetObjectIgnoreWalkbehinds(ScriptMethodParams ¶ms);
|
||||
void SetObjectPosition(ScriptMethodParams ¶ms);
|
||||
void SetObjectTint(ScriptMethodParams ¶ms);
|
||||
void SetObjectTransparency(ScriptMethodParams ¶ms);
|
||||
void SetObjectView(ScriptMethodParams ¶ms);
|
||||
void SetPalRGB(ScriptMethodParams ¶ms);
|
||||
void SetPlayerCharacter(ScriptMethodParams ¶ms);
|
||||
void SetRegionTint(ScriptMethodParams ¶ms);
|
||||
void SetRestartPoint(ScriptMethodParams ¶ms);
|
||||
void SetScreenTransition(ScriptMethodParams ¶ms);
|
||||
void SetSkipSpeech(ScriptMethodParams ¶ms);
|
||||
void SetSliderValue(ScriptMethodParams ¶ms);
|
||||
void SetSoundVolume(ScriptMethodParams ¶ms);
|
||||
void SetSpeechFont(ScriptMethodParams ¶ms);
|
||||
void SetSpeechStyle(ScriptMethodParams ¶ms);
|
||||
void SetSpeechVolume(ScriptMethodParams ¶ms);
|
||||
void SetTalkingColor(ScriptMethodParams ¶ms);
|
||||
void SetTextBoxFont(ScriptMethodParams ¶ms);
|
||||
void SetTextBoxText(ScriptMethodParams ¶ms);
|
||||
void ScPl_SetTextOverlay(ScriptMethodParams ¶ms);
|
||||
void SetTextWindowGUI(ScriptMethodParams ¶ms);
|
||||
void script_SetTimer(ScriptMethodParams ¶ms);
|
||||
void SetViewport(ScriptMethodParams ¶ms);
|
||||
void SetVoiceMode(ScriptMethodParams ¶ms);
|
||||
void SetWalkBehindBase(ScriptMethodParams ¶ms);
|
||||
void ShakeScreen(ScriptMethodParams ¶ms);
|
||||
void ShakeScreenBackground(ScriptMethodParams ¶ms);
|
||||
void ShowMouseCursor(ScriptMethodParams ¶ms);
|
||||
void SkipUntilCharacterStops(ScriptMethodParams ¶ms);
|
||||
void StartCutscene(ScriptMethodParams ¶ms);
|
||||
void scStartRecording(ScriptMethodParams ¶ms);
|
||||
void StopAmbientSound(ScriptMethodParams ¶ms);
|
||||
void stop_and_destroy_channel(ScriptMethodParams ¶ms);
|
||||
void StopDialog(ScriptMethodParams ¶ms);
|
||||
void StopMoving(ScriptMethodParams ¶ms);
|
||||
void scr_StopMusic(ScriptMethodParams ¶ms);
|
||||
void StopObjectMoving(ScriptMethodParams ¶ms);
|
||||
void _sc_strcat(ScriptMethodParams ¶ms);
|
||||
void ags_stricmp(ScriptMethodParams ¶ms);
|
||||
void strcmp(ScriptMethodParams ¶ms);
|
||||
void StrContains(ScriptMethodParams ¶ms);
|
||||
void _sc_strcpy(ScriptMethodParams ¶ms);
|
||||
void ScPl_sc_sprintf(ScriptMethodParams ¶ms);
|
||||
void StrGetCharAt(ScriptMethodParams ¶ms);
|
||||
void StringToInt(ScriptMethodParams ¶ms);
|
||||
void strlen(ScriptMethodParams ¶ms);
|
||||
void StrSetCharAt(ScriptMethodParams ¶ms);
|
||||
void _sc_strlower(ScriptMethodParams ¶ms);
|
||||
void _sc_strupper(ScriptMethodParams ¶ms);
|
||||
void TintScreen(ScriptMethodParams ¶ms);
|
||||
void UnPauseGame(ScriptMethodParams ¶ms);
|
||||
void update_invorder(ScriptMethodParams ¶ms);
|
||||
void UpdatePalette(ScriptMethodParams ¶ms);
|
||||
void scrWait(ScriptMethodParams ¶ms);
|
||||
void WaitKey(ScriptMethodParams ¶ms);
|
||||
void WaitMouseKey(ScriptMethodParams ¶ms);
|
||||
void WaitInput(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
189
engines/ags/plugins/core/gui.cpp
Normal file
189
engines/ags/plugins/core/gui.cpp
Normal 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 ¶ms) {
|
||||
PARAMS1(ScriptGUI *, sgui);
|
||||
AGS3::GUI_Centre(sgui);
|
||||
}
|
||||
|
||||
void GUI::GetGUIAtLocation(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(int, xx, int, yy);
|
||||
params._result = AGS3::GetGUIAtLocation(xx, yy);
|
||||
}
|
||||
|
||||
void GUI::SetPosition(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(ScriptGUI *, tehgui, int, xx, int, yy);
|
||||
AGS3::GUI_SetPosition(tehgui, xx, yy);
|
||||
}
|
||||
|
||||
void GUI::SetSize(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(ScriptGUI *, sgui, int, widd, int, hitt);
|
||||
AGS3::GUI_SetSize(sgui, widd, hitt);
|
||||
}
|
||||
|
||||
void GUI::GetBackgroundGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptGUI *, sgui);
|
||||
params._result = AGS3::GUI_GetBackgroundGraphic(sgui);
|
||||
|
||||
}
|
||||
|
||||
void GUI::SetBackgroundGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptGUI *, tehgui, int, slotn);
|
||||
AGS3::GUI_SetBackgroundGraphic(tehgui, slotn);
|
||||
}
|
||||
|
||||
void GUI::GetClickable(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptGUI *, sgui);
|
||||
params._result = AGS3::GUI_GetClickable(sgui);
|
||||
}
|
||||
|
||||
void GUI::SetClickable(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptGUI *, tehgui, int, clickable);
|
||||
AGS3::GUI_SetClickable(tehgui, clickable);
|
||||
}
|
||||
|
||||
void GUI::GetControlCount(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptGUI *, sgui);
|
||||
params._result = AGS3::GUI_GetControlCount(sgui);
|
||||
}
|
||||
|
||||
void GUI::GetiControls(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptGUI *, sgui, int, idx);
|
||||
params._result = AGS3::GUI_GetiControls(sgui, idx);
|
||||
}
|
||||
|
||||
void GUI::GetHeight(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptGUI *, sgui);
|
||||
params._result = AGS3::GUI_GetHeight(sgui);
|
||||
}
|
||||
|
||||
void GUI::SetHeight(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptGUI *, sgui, int, newhit);
|
||||
AGS3::GUI_SetHeight(sgui, newhit);
|
||||
}
|
||||
|
||||
void GUI::GetID(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptGUI *, sgui);
|
||||
params._result = AGS3::GUI_GetID(sgui);
|
||||
}
|
||||
|
||||
void GUI::GetTransparency(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptGUI *, sgui);
|
||||
params._result = AGS3::GUI_GetTransparency(sgui);
|
||||
}
|
||||
|
||||
void GUI::SetTransparency(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptGUI *, tehgui, int, trans);
|
||||
AGS3::GUI_SetTransparency(tehgui, trans);
|
||||
}
|
||||
|
||||
void GUI::GetVisible(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptGUI *, sgui);
|
||||
params._result = AGS3::GUI_GetVisible(sgui);
|
||||
}
|
||||
|
||||
void GUI::SetVisible(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptGUI *, tehgui, int, isvisible);
|
||||
AGS3::GUI_SetVisible(tehgui, isvisible);
|
||||
}
|
||||
|
||||
void GUI::GetWidth(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptGUI *, sgui);
|
||||
params._result = AGS3::GUI_GetWidth(sgui);
|
||||
|
||||
}
|
||||
|
||||
void GUI::SetWidth(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptGUI *, sgui, int, newwid);
|
||||
AGS3::GUI_SetWidth(sgui, newwid);
|
||||
}
|
||||
|
||||
void GUI::GetX(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptGUI *, sgui);
|
||||
params._result = AGS3::GUI_GetX(sgui);
|
||||
}
|
||||
|
||||
void GUI::SetX(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptGUI *, tehgui, int, xx);
|
||||
AGS3::GUI_SetX(tehgui, xx);
|
||||
}
|
||||
|
||||
void GUI::GetY(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptGUI *, sgui);
|
||||
params._result = AGS3::GUI_GetY(sgui);
|
||||
|
||||
}
|
||||
|
||||
void GUI::SetY(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptGUI *, tehgui, int, yy);
|
||||
AGS3::GUI_SetY(tehgui, yy);
|
||||
}
|
||||
|
||||
void GUI::GetZOrder(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptGUI *, sgui);
|
||||
params._result = AGS3::GUI_GetZOrder(sgui);
|
||||
}
|
||||
|
||||
void GUI::SetZOrder(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptGUI *, tehgui, int, z);
|
||||
AGS3::GUI_SetZOrder(tehgui, z);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
68
engines/ags/plugins/core/gui.h
Normal file
68
engines/ags/plugins/core/gui.h
Normal 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 ¶ms);
|
||||
void GetGUIAtLocation(ScriptMethodParams ¶ms);
|
||||
void SetPosition(ScriptMethodParams ¶ms);
|
||||
void SetSize(ScriptMethodParams ¶ms);
|
||||
void GetBackgroundGraphic(ScriptMethodParams ¶ms);
|
||||
void SetBackgroundGraphic(ScriptMethodParams ¶ms);
|
||||
void GetClickable(ScriptMethodParams ¶ms);
|
||||
void SetClickable(ScriptMethodParams ¶ms);
|
||||
void GetControlCount(ScriptMethodParams ¶ms);
|
||||
void GetiControls(ScriptMethodParams ¶ms);
|
||||
void GetHeight(ScriptMethodParams ¶ms);
|
||||
void SetHeight(ScriptMethodParams ¶ms);
|
||||
void GetID(ScriptMethodParams ¶ms);
|
||||
void GetTransparency(ScriptMethodParams ¶ms);
|
||||
void SetTransparency(ScriptMethodParams ¶ms);
|
||||
void GetVisible(ScriptMethodParams ¶ms);
|
||||
void SetVisible(ScriptMethodParams ¶ms);
|
||||
void GetWidth(ScriptMethodParams ¶ms);
|
||||
void SetWidth(ScriptMethodParams ¶ms);
|
||||
void GetX(ScriptMethodParams ¶ms);
|
||||
void SetX(ScriptMethodParams ¶ms);
|
||||
void GetY(ScriptMethodParams ¶ms);
|
||||
void SetY(ScriptMethodParams ¶ms);
|
||||
void GetZOrder(ScriptMethodParams ¶ms);
|
||||
void SetZOrder(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
201
engines/ags/plugins/core/gui_control.cpp
Normal file
201
engines/ags/plugins/core/gui_control.cpp
Normal 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 ¶ms) {
|
||||
PARAMS1(GUIObject *, guio);
|
||||
AGS3::GUIControl_BringToFront(guio);
|
||||
}
|
||||
|
||||
void GUIControl::GetGUIControlAtLocation(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(int, xx, int, yy);
|
||||
params._result = AGS3::GetGUIControlAtLocation(xx, yy);
|
||||
}
|
||||
|
||||
void GUIControl::SendToBack(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIObject *, guio);
|
||||
AGS3::GUIControl_SendToBack(guio);
|
||||
}
|
||||
|
||||
void GUIControl::SetPosition(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(GUIObject *, guio, int, xx, int, yy);
|
||||
AGS3::GUIControl_SetPosition(guio, xx, yy);
|
||||
}
|
||||
|
||||
void GUIControl::SetSize(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(GUIObject *, guio, int, newwid, int, newhit);
|
||||
AGS3::GUIControl_SetSize(guio, newwid, newhit);
|
||||
}
|
||||
|
||||
void GUIControl::GetAsButton(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIObject *, guio);
|
||||
params._result = AGS3::GUIControl_GetAsButton(guio);
|
||||
}
|
||||
|
||||
void GUIControl::GetAsInvWindow(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIObject *, guio);
|
||||
params._result = AGS3::GUIControl_GetAsInvWindow(guio);
|
||||
}
|
||||
|
||||
void GUIControl::GetAsLabel(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIObject *, guio);
|
||||
params._result = AGS3::GUIControl_GetAsLabel(guio);
|
||||
}
|
||||
|
||||
void GUIControl::GetAsListBox(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIObject *, guio);
|
||||
params._result = AGS3::GUIControl_GetAsListBox(guio);
|
||||
}
|
||||
|
||||
void GUIControl::GetAsSlider(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIObject *, guio);
|
||||
params._result = AGS3::GUIControl_GetAsSlider(guio);
|
||||
}
|
||||
|
||||
void GUIControl::GetAsTextBox(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIObject *, guio);
|
||||
params._result = AGS3::GUIControl_GetAsTextBox(guio);
|
||||
}
|
||||
|
||||
void GUIControl::GetClickable(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIObject *, guio);
|
||||
params._result = AGS3::GUIControl_GetClickable(guio);
|
||||
}
|
||||
|
||||
void GUIControl::SetClickable(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIObject *, guio, int, enabled);
|
||||
AGS3::GUIControl_SetClickable(guio, enabled);
|
||||
}
|
||||
|
||||
void GUIControl::GetEnabled(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIObject *, guio);
|
||||
params._result = AGS3::GUIControl_GetEnabled(guio);
|
||||
}
|
||||
|
||||
void GUIControl::SetEnabled(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIObject *, guio, int, enabled);
|
||||
AGS3::GUIControl_SetEnabled(guio, enabled);
|
||||
}
|
||||
|
||||
void GUIControl::GetHeight(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIObject *, guio);
|
||||
params._result = AGS3::GUIControl_GetHeight(guio);
|
||||
}
|
||||
|
||||
void GUIControl::SetHeight(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIObject *, guio, int, newhit);
|
||||
AGS3::GUIControl_SetHeight(guio, newhit);
|
||||
}
|
||||
|
||||
void GUIControl::GetID(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIObject *, guio);
|
||||
params._result = AGS3::GUIControl_GetID(guio);
|
||||
|
||||
}
|
||||
|
||||
void GUIControl::GetOwningGUI(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIObject *, guio);
|
||||
params._result = AGS3::GUIControl_GetOwningGUI(guio);
|
||||
}
|
||||
|
||||
void GUIControl::GetVisible(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIObject *, guio);
|
||||
params._result = AGS3::GUIControl_GetVisible(guio);
|
||||
|
||||
}
|
||||
|
||||
void GUIControl::SetVisible(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIObject *, guio, int, visible);
|
||||
AGS3::GUIControl_SetVisible(guio, visible);
|
||||
}
|
||||
|
||||
void GUIControl::GetWidth(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIObject *, guio);
|
||||
params._result = AGS3::GUIControl_GetWidth(guio);
|
||||
}
|
||||
|
||||
void GUIControl::SetWidth(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIObject *, guio, int, newwid);
|
||||
AGS3::GUIControl_SetWidth(guio, newwid);
|
||||
}
|
||||
|
||||
void GUIControl::GetX(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIObject *, guio);
|
||||
params._result = AGS3::GUIControl_GetX(guio);
|
||||
}
|
||||
|
||||
void GUIControl::SetX(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIObject *, guio, int, xx);
|
||||
AGS3::GUIControl_SetX(guio, xx);
|
||||
}
|
||||
|
||||
void GUIControl::GetY(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIObject *, guio);
|
||||
params._result = AGS3::GUIControl_GetY(guio);
|
||||
}
|
||||
|
||||
void GUIControl::SetY(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIObject *, guio, int, yy);
|
||||
AGS3::GUIControl_SetY(guio, yy);
|
||||
}
|
||||
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
70
engines/ags/plugins/core/gui_control.h
Normal file
70
engines/ags/plugins/core/gui_control.h
Normal 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 ¶ms);
|
||||
void GetGUIControlAtLocation(ScriptMethodParams ¶ms);
|
||||
void SendToBack(ScriptMethodParams ¶ms);
|
||||
void SetPosition(ScriptMethodParams ¶ms);
|
||||
void SetSize(ScriptMethodParams ¶ms);
|
||||
void GetAsButton(ScriptMethodParams ¶ms);
|
||||
void GetAsInvWindow(ScriptMethodParams ¶ms);
|
||||
void GetAsLabel(ScriptMethodParams ¶ms);
|
||||
void GetAsListBox(ScriptMethodParams ¶ms);
|
||||
void GetAsSlider(ScriptMethodParams ¶ms);
|
||||
void GetAsTextBox(ScriptMethodParams ¶ms);
|
||||
void GetClickable(ScriptMethodParams ¶ms);
|
||||
void SetClickable(ScriptMethodParams ¶ms);
|
||||
void GetEnabled(ScriptMethodParams ¶ms);
|
||||
void SetEnabled(ScriptMethodParams ¶ms);
|
||||
void GetHeight(ScriptMethodParams ¶ms);
|
||||
void SetHeight(ScriptMethodParams ¶ms);
|
||||
void GetID(ScriptMethodParams ¶ms);
|
||||
void GetOwningGUI(ScriptMethodParams ¶ms);
|
||||
void GetVisible(ScriptMethodParams ¶ms);
|
||||
void SetVisible(ScriptMethodParams ¶ms);
|
||||
void GetWidth(ScriptMethodParams ¶ms);
|
||||
void SetWidth(ScriptMethodParams ¶ms);
|
||||
void GetX(ScriptMethodParams ¶ms);
|
||||
void SetX(ScriptMethodParams ¶ms);
|
||||
void GetY(ScriptMethodParams ¶ms);
|
||||
void SetY(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
126
engines/ags/plugins/core/hotspot.cpp
Normal file
126
engines/ags/plugins/core/hotspot.cpp
Normal 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 ¶ms) {
|
||||
PARAMS2(int, x, int, y);
|
||||
params._result = AGS3::GetHotspotAtRoom(x, y);
|
||||
}
|
||||
|
||||
void Hotspot::GetHotspotAtScreen(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(int, xx, int, yy);
|
||||
params._result = AGS3::GetHotspotAtScreen(xx, yy);
|
||||
}
|
||||
|
||||
void Hotspot::GetName(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptHotspot *, hss, char *, buffer);
|
||||
AGS3::Hotspot_GetName(hss, buffer);
|
||||
}
|
||||
|
||||
void Hotspot::GetProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptHotspot *, hss, const char *, property);
|
||||
params._result = AGS3::Hotspot_GetProperty(hss, property);
|
||||
}
|
||||
|
||||
void Hotspot::GetPropertyText(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(ScriptHotspot *, hss, const char *, property, char *, bufer);
|
||||
AGS3::Hotspot_GetPropertyText(hss, property, bufer);
|
||||
}
|
||||
|
||||
void Hotspot::GetTextProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptHotspot *, hss, const char *, property);
|
||||
params._result = AGS3::Hotspot_GetTextProperty(hss, property);
|
||||
}
|
||||
|
||||
void Hotspot::SetProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(ScriptHotspot *, hss, const char *, property, int, value);
|
||||
params._result = AGS3::Hotspot_SetProperty(hss, property, value);
|
||||
}
|
||||
|
||||
void Hotspot::SetTextProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(ScriptHotspot *, hss, const char *, property, const char *, value);
|
||||
params._result = AGS3::Hotspot_SetTextProperty(hss, property, value);
|
||||
}
|
||||
|
||||
void Hotspot::RunInteraction(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptHotspot *, hss, int, mood);
|
||||
AGS3::Hotspot_RunInteraction(hss, mood);
|
||||
}
|
||||
|
||||
void Hotspot::GetEnabled(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptHotspot *, hss);
|
||||
params._result = AGS3::Hotspot_GetEnabled(hss);
|
||||
}
|
||||
|
||||
void Hotspot::SetEnabled(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptHotspot *, hss, int, newval);
|
||||
AGS3::Hotspot_SetEnabled(hss, newval);
|
||||
}
|
||||
|
||||
void Hotspot::GetID(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptHotspot *, hss);
|
||||
params._result = AGS3::Hotspot_GetID(hss);
|
||||
}
|
||||
|
||||
void Hotspot::GetName_New(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptHotspot *, hss);
|
||||
params._result = AGS3::Hotspot_GetName_New(hss);
|
||||
}
|
||||
|
||||
void Hotspot::GetWalkToX(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptHotspot *, hss);
|
||||
params._result = AGS3::Hotspot_GetWalkToX(hss);
|
||||
}
|
||||
|
||||
void Hotspot::GetWalkToY(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptHotspot *, hss);
|
||||
params._result = AGS3::Hotspot_GetWalkToY(hss);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
58
engines/ags/plugins/core/hotspot.h
Normal file
58
engines/ags/plugins/core/hotspot.h
Normal 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 ¶ms);
|
||||
void GetHotspotAtScreen(ScriptMethodParams ¶ms);
|
||||
void GetName(ScriptMethodParams ¶ms);
|
||||
void GetProperty(ScriptMethodParams ¶ms);
|
||||
void GetPropertyText(ScriptMethodParams ¶ms);
|
||||
void GetTextProperty(ScriptMethodParams ¶ms);
|
||||
void SetProperty(ScriptMethodParams ¶ms);
|
||||
void SetTextProperty(ScriptMethodParams ¶ms);
|
||||
void RunInteraction(ScriptMethodParams ¶ms);
|
||||
void GetEnabled(ScriptMethodParams ¶ms);
|
||||
void SetEnabled(ScriptMethodParams ¶ms);
|
||||
void GetID(ScriptMethodParams ¶ms);
|
||||
void GetName_New(ScriptMethodParams ¶ms);
|
||||
void GetWalkToX(ScriptMethodParams ¶ms);
|
||||
void GetWalkToY(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
120
engines/ags/plugins/core/inv_window.cpp
Normal file
120
engines/ags/plugins/core/inv_window.cpp
Normal 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 ¶ms) {
|
||||
PARAMS1(GUIInvWindow *, guii);
|
||||
AGS3::InvWindow_ScrollDown(guii);
|
||||
}
|
||||
|
||||
void InvWindow::ScrollUp(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIInvWindow *, guii);
|
||||
AGS3::InvWindow_ScrollUp(guii);
|
||||
}
|
||||
|
||||
void InvWindow::GetCharacterToUse(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIInvWindow *, guii);
|
||||
params._result = AGS3::InvWindow_GetCharacterToUse(guii);
|
||||
}
|
||||
|
||||
void InvWindow::SetCharacterToUse(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIInvWindow *, guii, CharacterInfo *, chaa);
|
||||
AGS3::InvWindow_SetCharacterToUse(guii, chaa);
|
||||
}
|
||||
|
||||
void InvWindow::GetItemAtIndex(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIInvWindow *, guii, int, index);
|
||||
params._result = AGS3::InvWindow_GetItemAtIndex(guii, index);
|
||||
}
|
||||
|
||||
void InvWindow::GetItemCount(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIInvWindow *, guii);
|
||||
params._result = AGS3::InvWindow_GetItemCount(guii);
|
||||
}
|
||||
|
||||
void InvWindow::GetItemHeight(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIInvWindow *, guii);
|
||||
params._result = AGS3::InvWindow_GetItemHeight(guii);
|
||||
}
|
||||
|
||||
void InvWindow::SetItemHeight(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIInvWindow *, guii, int, newhit);
|
||||
AGS3::InvWindow_SetItemHeight(guii, newhit);
|
||||
}
|
||||
|
||||
void InvWindow::GetItemWidth(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIInvWindow *, guii);
|
||||
params._result = AGS3::InvWindow_GetItemWidth(guii);
|
||||
}
|
||||
|
||||
void InvWindow::SetItemWidth(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIInvWindow *, guii, int, newwidth);
|
||||
AGS3::InvWindow_SetItemWidth(guii, newwidth);
|
||||
}
|
||||
|
||||
void InvWindow::GetItemsPerRow(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIInvWindow *, guii);
|
||||
params._result = AGS3::InvWindow_GetItemsPerRow(guii);
|
||||
}
|
||||
|
||||
void InvWindow::GetRowCount(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIInvWindow *, guii);
|
||||
params._result = AGS3::InvWindow_GetRowCount(guii);
|
||||
}
|
||||
|
||||
void InvWindow::GetTopItem(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIInvWindow *, guii);
|
||||
params._result = AGS3::InvWindow_GetTopItem(guii);
|
||||
}
|
||||
|
||||
void InvWindow::SetTopItem(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIInvWindow *, guii, int, topitem);
|
||||
AGS3::InvWindow_SetTopItem(guii, topitem);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
57
engines/ags/plugins/core/inv_window.h
Normal file
57
engines/ags/plugins/core/inv_window.h
Normal 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 ¶ms);
|
||||
void ScrollUp(ScriptMethodParams ¶ms);
|
||||
void GetCharacterToUse(ScriptMethodParams ¶ms);
|
||||
void SetCharacterToUse(ScriptMethodParams ¶ms);
|
||||
void GetItemAtIndex(ScriptMethodParams ¶ms);
|
||||
void GetItemCount(ScriptMethodParams ¶ms);
|
||||
void GetItemHeight(ScriptMethodParams ¶ms);
|
||||
void SetItemHeight(ScriptMethodParams ¶ms);
|
||||
void GetItemWidth(ScriptMethodParams ¶ms);
|
||||
void SetItemWidth(ScriptMethodParams ¶ms);
|
||||
void GetItemsPerRow(ScriptMethodParams ¶ms);
|
||||
void GetRowCount(ScriptMethodParams ¶ms);
|
||||
void GetTopItem(ScriptMethodParams ¶ms);
|
||||
void SetTopItem(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
133
engines/ags/plugins/core/inventory_item.cpp
Normal file
133
engines/ags/plugins/core/inventory_item.cpp
Normal 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 ¶ms) {
|
||||
PARAMS2(int, xx, int, yy);
|
||||
params._result = AGS3::GetInvAtLocation(xx, yy);
|
||||
}
|
||||
|
||||
void InventoryItem::CheckInteractionAvailable(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptInvItem *, iitem, int, mood);
|
||||
params._result = AGS3::InventoryItem_CheckInteractionAvailable(iitem, mood);
|
||||
}
|
||||
|
||||
void InventoryItem::GetName(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptInvItem *, iitem, char *, buff);
|
||||
AGS3::InventoryItem_GetName(iitem, buff);
|
||||
}
|
||||
|
||||
void InventoryItem::GetProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptInvItem *, scii, const char *, property);
|
||||
params._result = AGS3::InventoryItem_GetProperty(scii, property);
|
||||
}
|
||||
|
||||
void InventoryItem::GetPropertyText(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(ScriptInvItem *, scii, const char *, property, char *, bufer);
|
||||
AGS3::InventoryItem_GetPropertyText(scii, property, bufer);
|
||||
}
|
||||
|
||||
void InventoryItem::GetTextProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptInvItem *, scii, const char *, property);
|
||||
params._result = AGS3::InventoryItem_GetTextProperty(scii, property);
|
||||
}
|
||||
|
||||
void InventoryItem::SetProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(ScriptInvItem *, scii, const char *, property, int, value);
|
||||
params._result = AGS3::InventoryItem_SetProperty(scii, property, value);
|
||||
}
|
||||
|
||||
void InventoryItem::SetTextProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(ScriptInvItem *, scii, const char *, property, const char *, value);
|
||||
params._result = AGS3::InventoryItem_SetTextProperty(scii, property, value);
|
||||
}
|
||||
|
||||
void InventoryItem::RunInteraction(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptInvItem *, iitem, int, mood);
|
||||
AGS3::InventoryItem_RunInteraction(iitem, mood);
|
||||
}
|
||||
|
||||
void InventoryItem::SetName(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptInvItem *, scii, const char *, newname);
|
||||
AGS3::InventoryItem_SetName(scii, newname);
|
||||
}
|
||||
|
||||
void InventoryItem::GetCursorGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptInvItem *, iitem);
|
||||
params._result = AGS3::InventoryItem_GetCursorGraphic(iitem);
|
||||
}
|
||||
|
||||
void InventoryItem::SetCursorGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptInvItem *, iitem, int, newSprite);
|
||||
AGS3::InventoryItem_SetCursorGraphic(iitem, newSprite);
|
||||
}
|
||||
|
||||
void InventoryItem::GetGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptInvItem *, iitem);
|
||||
params._result = AGS3::InventoryItem_GetGraphic(iitem);
|
||||
}
|
||||
|
||||
void InventoryItem::SetGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptInvItem *, iitem, int, piccy);
|
||||
AGS3::InventoryItem_SetGraphic(iitem, piccy);
|
||||
}
|
||||
|
||||
void InventoryItem::GetID(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptInvItem *, iitem);
|
||||
params._result = AGS3::InventoryItem_GetID(iitem);
|
||||
}
|
||||
|
||||
void InventoryItem::GetName_New(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptInvItem *, iitem);
|
||||
params._result = AGS3::InventoryItem_GetName_New(iitem);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
59
engines/ags/plugins/core/inventory_item.h
Normal file
59
engines/ags/plugins/core/inventory_item.h
Normal 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 ¶ms);
|
||||
void CheckInteractionAvailable(ScriptMethodParams ¶ms);
|
||||
void GetName(ScriptMethodParams ¶ms);
|
||||
void GetProperty(ScriptMethodParams ¶ms);
|
||||
void GetPropertyText(ScriptMethodParams ¶ms);
|
||||
void GetTextProperty(ScriptMethodParams ¶ms);
|
||||
void SetProperty(ScriptMethodParams ¶ms);
|
||||
void SetTextProperty(ScriptMethodParams ¶ms);
|
||||
void RunInteraction(ScriptMethodParams ¶ms);
|
||||
void SetName(ScriptMethodParams ¶ms);
|
||||
void GetCursorGraphic(ScriptMethodParams ¶ms);
|
||||
void SetCursorGraphic(ScriptMethodParams ¶ms);
|
||||
void GetGraphic(ScriptMethodParams ¶ms);
|
||||
void SetGraphic(ScriptMethodParams ¶ms);
|
||||
void GetID(ScriptMethodParams ¶ms);
|
||||
void GetName_New(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
79
engines/ags/plugins/core/label.cpp
Normal file
79
engines/ags/plugins/core/label.cpp
Normal 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 ¶ms) {
|
||||
PARAMS2(GUILabel *, labl, char *, buffer);
|
||||
AGS3::Label_GetText(labl, buffer);
|
||||
}
|
||||
|
||||
void Label::SetText(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUILabel *, labl, const char *, newtx);
|
||||
AGS3::Label_SetText(labl, newtx);
|
||||
}
|
||||
|
||||
void Label::GetFont(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUILabel *, labl);
|
||||
params._result = AGS3::Label_GetFont(labl);
|
||||
}
|
||||
|
||||
void Label::SetFont(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUILabel *, guil, int, fontnum);
|
||||
AGS3::Label_SetFont(guil, fontnum);
|
||||
}
|
||||
|
||||
void Label::GetText_New(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUILabel *, labl);
|
||||
params._result = AGS3::Label_GetText_New(labl);
|
||||
}
|
||||
|
||||
void Label::GetColor(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUILabel *, labl);
|
||||
params._result = AGS3::Label_GetColor(labl);
|
||||
}
|
||||
|
||||
void Label::SetColor(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUILabel *, labl, int, colr);
|
||||
AGS3::Label_SetColor(labl, colr);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
50
engines/ags/plugins/core/label.h
Normal file
50
engines/ags/plugins/core/label.h
Normal 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 ¶ms);
|
||||
void SetText(ScriptMethodParams ¶ms);
|
||||
void GetFont(ScriptMethodParams ¶ms);
|
||||
void SetFont(ScriptMethodParams ¶ms);
|
||||
void GetText_New(ScriptMethodParams ¶ms);
|
||||
void GetColor(ScriptMethodParams ¶ms);
|
||||
void SetColor(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
187
engines/ags/plugins/core/listbox.cpp
Normal file
187
engines/ags/plugins/core/listbox.cpp
Normal 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 ¶ms) {
|
||||
PARAMS2(GUIListBox *, lbb, const char *, text);
|
||||
params._result = AGS3::ListBox_AddItem(lbb, text);
|
||||
}
|
||||
|
||||
void ListBox::Clear(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIListBox *, listbox);
|
||||
AGS3::ListBox_Clear(listbox);
|
||||
}
|
||||
|
||||
void ListBox::FillDirList(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIListBox *, listbox, const char *, filemask);
|
||||
AGS3::ListBox_FillDirList(listbox, filemask);
|
||||
}
|
||||
|
||||
void ListBox::FillSaveGameList(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIListBox *, listbox);
|
||||
params._result = AGS3::ListBox_FillSaveGameList(listbox);
|
||||
}
|
||||
|
||||
void ListBox::GetItemAtLocation(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(GUIListBox *, listbox, int, x, int, y);
|
||||
params._result = AGS3::ListBox_GetItemAtLocation(listbox, x, y);
|
||||
}
|
||||
|
||||
void ListBox::GetItemText(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(GUIListBox *, listbox, int, index, char *, buffer);
|
||||
params._result = AGS3::ListBox_GetItemText(listbox, index, buffer);
|
||||
}
|
||||
|
||||
void ListBox::InsertItemAt(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(GUIListBox *, lbb, int, index, const char *, text);
|
||||
params._result = AGS3::ListBox_InsertItemAt(lbb, index, text);
|
||||
}
|
||||
|
||||
void ListBox::RemoveItem(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIListBox *, listbox, int, itemIndex);
|
||||
AGS3::ListBox_RemoveItem(listbox, itemIndex);
|
||||
}
|
||||
|
||||
void ListBox::ScrollDown(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIListBox *, listbox);
|
||||
AGS3::ListBox_ScrollDown(listbox);
|
||||
}
|
||||
|
||||
void ListBox::ScrollUp(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIListBox *, listbox);
|
||||
AGS3::ListBox_ScrollUp(listbox);
|
||||
}
|
||||
|
||||
void ListBox::SetItemText(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(GUIListBox *, listbox, int, index, const char *, newtext);
|
||||
AGS3::ListBox_SetItemText(listbox, index, newtext);
|
||||
}
|
||||
|
||||
void ListBox::GetFont(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIListBox *, listbox);
|
||||
params._result = AGS3::ListBox_GetFont(listbox);
|
||||
}
|
||||
|
||||
void ListBox::SetFont(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIListBox *, listbox, int, newfont);
|
||||
AGS3::ListBox_SetFont(listbox, newfont);
|
||||
}
|
||||
|
||||
void ListBox::GetHideBorder(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIListBox *, listbox);
|
||||
params._result = AGS3::ListBox_GetHideBorder(listbox);
|
||||
}
|
||||
|
||||
void ListBox::SetHideBorder(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIListBox *, listbox, int, newValue);
|
||||
AGS3::ListBox_SetHideBorder(listbox, newValue);
|
||||
}
|
||||
|
||||
void ListBox::GetHideScrollArrows(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIListBox *, listbox);
|
||||
params._result = AGS3::ListBox_GetHideScrollArrows(listbox);
|
||||
}
|
||||
|
||||
void ListBox::SetHideScrollArrows(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIListBox *, listbox, int, newValue);
|
||||
AGS3::ListBox_SetHideScrollArrows(listbox, newValue);
|
||||
}
|
||||
|
||||
void ListBox::GetItemCount(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIListBox *, listbox);
|
||||
params._result = AGS3::ListBox_GetItemCount(listbox);
|
||||
}
|
||||
|
||||
void ListBox::GetItems(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIListBox *, listbox, int, index);
|
||||
params._result = AGS3::ListBox_GetItems(listbox, index);
|
||||
}
|
||||
|
||||
void ListBox::GetRowCount(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIListBox *, listbox);
|
||||
params._result = AGS3::ListBox_GetRowCount(listbox);
|
||||
}
|
||||
|
||||
void ListBox::GetSaveGameSlots(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIListBox *, listbox, int, index);
|
||||
params._result = AGS3::ListBox_GetSaveGameSlots(listbox, index);
|
||||
}
|
||||
|
||||
void ListBox::GetSelectedIndex(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIListBox *, listbox);
|
||||
params._result = AGS3::ListBox_GetSelectedIndex(listbox);
|
||||
}
|
||||
|
||||
void ListBox::SetSelectedIndex(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIListBox *, guisl, int, newsel);
|
||||
AGS3::ListBox_SetSelectedIndex(guisl, newsel);
|
||||
}
|
||||
|
||||
void ListBox::GetTopItem(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUIListBox *, listbox);
|
||||
params._result = AGS3::ListBox_GetTopItem(listbox);
|
||||
}
|
||||
|
||||
void ListBox::SetTopItem(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUIListBox *, guisl, int, item);
|
||||
AGS3::ListBox_SetTopItem(guisl, item);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
68
engines/ags/plugins/core/listbox.h
Normal file
68
engines/ags/plugins/core/listbox.h
Normal 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 ¶ms);
|
||||
void Clear(ScriptMethodParams ¶ms);
|
||||
void FillDirList(ScriptMethodParams ¶ms);
|
||||
void FillSaveGameList(ScriptMethodParams ¶ms);
|
||||
void GetItemAtLocation(ScriptMethodParams ¶ms);
|
||||
void GetItemText(ScriptMethodParams ¶ms);
|
||||
void InsertItemAt(ScriptMethodParams ¶ms);
|
||||
void RemoveItem(ScriptMethodParams ¶ms);
|
||||
void ScrollDown(ScriptMethodParams ¶ms);
|
||||
void ScrollUp(ScriptMethodParams ¶ms);
|
||||
void SetItemText(ScriptMethodParams ¶ms);
|
||||
void GetFont(ScriptMethodParams ¶ms);
|
||||
void SetFont(ScriptMethodParams ¶ms);
|
||||
void GetHideBorder(ScriptMethodParams ¶ms);
|
||||
void SetHideBorder(ScriptMethodParams ¶ms);
|
||||
void GetHideScrollArrows(ScriptMethodParams ¶ms);
|
||||
void SetHideScrollArrows(ScriptMethodParams ¶ms);
|
||||
void GetItemCount(ScriptMethodParams ¶ms);
|
||||
void GetItems(ScriptMethodParams ¶ms);
|
||||
void GetRowCount(ScriptMethodParams ¶ms);
|
||||
void GetSaveGameSlots(ScriptMethodParams ¶ms);
|
||||
void GetSelectedIndex(ScriptMethodParams ¶ms);
|
||||
void SetSelectedIndex(ScriptMethodParams ¶ms);
|
||||
void GetTopItem(ScriptMethodParams ¶ms);
|
||||
void SetTopItem(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
143
engines/ags/plugins/core/maths.cpp
Normal file
143
engines/ags/plugins/core/maths.cpp
Normal 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 ¶ms) {
|
||||
PARAMS1(float, value);
|
||||
params._result = AGS3::Math_ArcCos(value);
|
||||
}
|
||||
|
||||
void Maths::ArcSin(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(float, value);
|
||||
params._result = AGS3::Math_ArcSin(value);
|
||||
}
|
||||
|
||||
void Maths::ArcTan(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(float, value);
|
||||
params._result = AGS3::Math_ArcTan(value);
|
||||
}
|
||||
|
||||
void Maths::ArcTan2(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(float, yval, float, xval);
|
||||
params._result = AGS3::Math_ArcTan2(yval, xval);
|
||||
}
|
||||
|
||||
void Maths::Cos(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(float, value);
|
||||
params._result = AGS3::Math_Cos(value);
|
||||
}
|
||||
|
||||
void Maths::Cosh(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(float, value);
|
||||
params._result = AGS3::Math_Cosh(value);
|
||||
}
|
||||
|
||||
void Maths::DegreesToRadians(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(float, value);
|
||||
params._result = AGS3::Math_DegreesToRadians(value);
|
||||
}
|
||||
|
||||
void Maths::Exp(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(float, value);
|
||||
params._result = AGS3::Math_Exp(value);
|
||||
}
|
||||
|
||||
void Maths::Log(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(float, value);
|
||||
params._result = AGS3::Math_Log(value);
|
||||
}
|
||||
|
||||
void Maths::Log10(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(float, value);
|
||||
params._result = AGS3::Math_Log10(value);
|
||||
}
|
||||
|
||||
void Maths::RadiansToDegrees(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(float, value);
|
||||
params._result = AGS3::Math_RadiansToDegrees(value);
|
||||
}
|
||||
|
||||
void Maths::RaiseToPower(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(float, base, float, exp);
|
||||
params._result = AGS3::Math_RaiseToPower(base, exp);
|
||||
}
|
||||
|
||||
void Maths::Sin(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(float, value);
|
||||
params._result = AGS3::Math_Sin(value);
|
||||
}
|
||||
|
||||
void Maths::Sinh(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(float, value);
|
||||
params._result = AGS3::Math_Sinh(value);
|
||||
}
|
||||
|
||||
void Maths::Sqrt(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(float, value);
|
||||
params._result = AGS3::Math_Sqrt(value);
|
||||
}
|
||||
|
||||
void Maths::Tan(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(float, value);
|
||||
params._result = AGS3::Math_Tan(value);
|
||||
}
|
||||
|
||||
void Maths::Tanh(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(float, value);
|
||||
params._result = AGS3::Math_Tanh(value);
|
||||
}
|
||||
|
||||
void Maths::GetPi(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Math_GetPi();
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
61
engines/ags/plugins/core/maths.h
Normal file
61
engines/ags/plugins/core/maths.h
Normal 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 ¶ms);
|
||||
void ArcSin(ScriptMethodParams ¶ms);
|
||||
void ArcTan(ScriptMethodParams ¶ms);
|
||||
void ArcTan2(ScriptMethodParams ¶ms);
|
||||
void Cos(ScriptMethodParams ¶ms);
|
||||
void Cosh(ScriptMethodParams ¶ms);
|
||||
void DegreesToRadians(ScriptMethodParams ¶ms);
|
||||
void Exp(ScriptMethodParams ¶ms);
|
||||
void Log(ScriptMethodParams ¶ms);
|
||||
void Log10(ScriptMethodParams ¶ms);
|
||||
void RadiansToDegrees(ScriptMethodParams ¶ms);
|
||||
void RaiseToPower(ScriptMethodParams ¶ms);
|
||||
void Sin(ScriptMethodParams ¶ms);
|
||||
void Sinh(ScriptMethodParams ¶ms);
|
||||
void Sqrt(ScriptMethodParams ¶ms);
|
||||
void Tan(ScriptMethodParams ¶ms);
|
||||
void Tanh(ScriptMethodParams ¶ms);
|
||||
void GetPi(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
150
engines/ags/plugins/core/mouse.cpp
Normal file
150
engines/ags/plugins/core/mouse.cpp
Normal 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 ¶ms) {
|
||||
PARAMS2(int, curs, int, newslot);
|
||||
AGS3::ChangeCursorGraphic(curs, newslot);
|
||||
}
|
||||
|
||||
void Mouse::ChangeCursorHotspot(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(int, curs, int, x, int, y);
|
||||
AGS3::ChangeCursorHotspot(curs, x, y);
|
||||
}
|
||||
|
||||
void Mouse::Mouse_ChangeModeView2(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(int, curs, int, newview);
|
||||
AGS3::Mouse_ChangeModeView2(curs, newview);
|
||||
}
|
||||
|
||||
void Mouse::disable_cursor_mode(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, modd);
|
||||
AGS3::disable_cursor_mode(modd);
|
||||
}
|
||||
|
||||
void Mouse::enable_cursor_mode(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, modd);
|
||||
AGS3::enable_cursor_mode(modd);
|
||||
}
|
||||
|
||||
void Mouse::Mouse_GetModeGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, curs);
|
||||
params._result = AGS3::Mouse_GetModeGraphic(curs);
|
||||
}
|
||||
|
||||
void Mouse::IsButtonDown(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, curs);
|
||||
params._result = AGS3::IsButtonDown(curs);
|
||||
}
|
||||
|
||||
void Mouse::IsModeEnabled(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, curs);
|
||||
params._result = AGS3::IsModeEnabled(curs);
|
||||
}
|
||||
|
||||
void Mouse::SaveCursorForLocationChange(ScriptMethodParams ¶ms) {
|
||||
AGS3::SaveCursorForLocationChange();
|
||||
}
|
||||
|
||||
void Mouse::SetNextCursor(ScriptMethodParams ¶ms) {
|
||||
AGS3::SetNextCursor();
|
||||
}
|
||||
|
||||
void Mouse::SetPreviousCursor(ScriptMethodParams ¶ms) {
|
||||
AGS3::SetPreviousCursor();
|
||||
}
|
||||
|
||||
void Mouse::SetMouseBounds(ScriptMethodParams ¶ms) {
|
||||
PARAMS4(int, x1, int, y1, int, x2, int, y2);
|
||||
AGS3::SetMouseBounds(x1, y1, x2, y2);
|
||||
}
|
||||
|
||||
void Mouse::SetMousePosition(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(int, newx, int, newy);
|
||||
AGS3::SetMousePosition(newx, newy);
|
||||
}
|
||||
|
||||
void Mouse::RefreshMouse(ScriptMethodParams ¶ms) {
|
||||
AGS3::RefreshMouse();
|
||||
}
|
||||
|
||||
void Mouse::set_default_cursor(ScriptMethodParams ¶ms) {
|
||||
AGS3::set_default_cursor();
|
||||
}
|
||||
|
||||
void Mouse::set_mouse_cursor(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, newcurs);
|
||||
AGS3::set_mouse_cursor(newcurs);
|
||||
}
|
||||
|
||||
void Mouse::GetCursorMode(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::GetCursorMode();
|
||||
}
|
||||
|
||||
void Mouse::set_cursor_mode(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, newmode);
|
||||
AGS3::set_cursor_mode(newmode);
|
||||
}
|
||||
|
||||
void Mouse::Mouse_GetVisible(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Mouse_GetVisible();
|
||||
}
|
||||
|
||||
void Mouse::Mouse_SetVisible(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, isOn);
|
||||
AGS3::Mouse_SetVisible(isOn);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
63
engines/ags/plugins/core/mouse.h
Normal file
63
engines/ags/plugins/core/mouse.h
Normal 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 ¶ms);
|
||||
void ChangeCursorHotspot(ScriptMethodParams ¶ms);
|
||||
void Mouse_ChangeModeView2(ScriptMethodParams ¶ms);
|
||||
void disable_cursor_mode(ScriptMethodParams ¶ms);
|
||||
void enable_cursor_mode(ScriptMethodParams ¶ms);
|
||||
void Mouse_GetModeGraphic(ScriptMethodParams ¶ms);
|
||||
void IsButtonDown(ScriptMethodParams ¶ms);
|
||||
void IsModeEnabled(ScriptMethodParams ¶ms);
|
||||
void SaveCursorForLocationChange(ScriptMethodParams ¶ms);
|
||||
void SetNextCursor(ScriptMethodParams ¶ms);
|
||||
void SetPreviousCursor(ScriptMethodParams ¶ms);
|
||||
void SetMouseBounds(ScriptMethodParams ¶ms);
|
||||
void SetMousePosition(ScriptMethodParams ¶ms);
|
||||
void RefreshMouse(ScriptMethodParams ¶ms);
|
||||
void set_default_cursor(ScriptMethodParams ¶ms);
|
||||
void set_mouse_cursor(ScriptMethodParams ¶ms);
|
||||
void GetCursorMode(ScriptMethodParams ¶ms);
|
||||
void set_cursor_mode(ScriptMethodParams ¶ms);
|
||||
void Mouse_GetVisible(ScriptMethodParams ¶ms);
|
||||
void Mouse_SetVisible(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
336
engines/ags/plugins/core/object.cpp
Normal file
336
engines/ags/plugins/core/object.cpp
Normal 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 ¶ms) {
|
||||
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 ¶ms) {
|
||||
PARAMS2(ScriptObject *, objj, ScriptObject *, obj2);
|
||||
params._result = AGS3::Object_IsCollidingWithObject(objj, obj2);
|
||||
}
|
||||
|
||||
void Object::GetName(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptObject *, objj, char *, buffer);
|
||||
AGS3::Object_GetName(objj, buffer);
|
||||
}
|
||||
|
||||
void Object::GetProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptObject *, objj, const char *, property);
|
||||
params._result = AGS3::Object_GetProperty(objj, property);
|
||||
}
|
||||
|
||||
void Object::GetPropertyText(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(ScriptObject *, objj, const char *, property, char *, buffer);
|
||||
AGS3::Object_GetPropertyText(objj, property, buffer);
|
||||
}
|
||||
|
||||
void Object::GetTextProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptObject *, objj, const char *, property);
|
||||
params._result = AGS3::Object_GetTextProperty(objj, property);
|
||||
}
|
||||
|
||||
void Object::SetProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(ScriptObject *, objj, const char *, property, int, value);
|
||||
params._result = AGS3::Object_SetProperty(objj, property, value);
|
||||
}
|
||||
|
||||
void Object::SetTextProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(ScriptObject *, objj, const char *, property, const char *, value);
|
||||
params._result = AGS3::Object_SetTextProperty(objj, property, value);
|
||||
}
|
||||
|
||||
void Object::MergeIntoBackground(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
AGS3::Object_MergeIntoBackground(objj);
|
||||
}
|
||||
|
||||
void Object::Move(ScriptMethodParams ¶ms) {
|
||||
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 ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
AGS3::Object_RemoveTint(objj);
|
||||
}
|
||||
|
||||
void Object::RunInteraction(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptObject *, objj, int, mode);
|
||||
AGS3::Object_RunInteraction(objj, mode);
|
||||
}
|
||||
|
||||
void Object::SetPosition(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(ScriptObject *, objj, int, xx, int, yy);
|
||||
AGS3::Object_SetPosition(objj, xx, yy);
|
||||
}
|
||||
|
||||
void Object::SetView(ScriptMethodParams ¶ms) {
|
||||
PARAMS4(ScriptObject *, objj, int, view, int, loop, int, frame);
|
||||
AGS3::Object_SetView(objj, view, loop, frame);
|
||||
}
|
||||
|
||||
void Object::StopAnimating(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
AGS3::Object_StopAnimating(objj);
|
||||
}
|
||||
|
||||
void Object::StopMoving(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
AGS3::Object_StopMoving(objj);
|
||||
}
|
||||
|
||||
void Object::Tint(ScriptMethodParams ¶ms) {
|
||||
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 ¶ms) {
|
||||
PARAMS2(int, x, int, y);
|
||||
params._result = AGS3::GetObjectAtRoom(x, y);
|
||||
}
|
||||
|
||||
void Object::GetObjectAtScreen(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(int, xx, int, yy);
|
||||
params._result = AGS3::GetObjectAtScreen(xx, yy);
|
||||
}
|
||||
|
||||
void Object::GetAnimating(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetAnimating(objj);
|
||||
}
|
||||
|
||||
void Object::GetBaseline(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetBaseline(objj);
|
||||
}
|
||||
|
||||
void Object::SetBaseline(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptObject *, objj, int, basel);
|
||||
AGS3::Object_SetBaseline(objj, basel);
|
||||
}
|
||||
|
||||
void Object::GetBlockingHeight(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetBlockingHeight(objj);
|
||||
}
|
||||
|
||||
void Object::SetBlockingHeight(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptObject *, objj, int, bhit);
|
||||
AGS3::Object_SetBlockingHeight(objj, bhit);
|
||||
}
|
||||
|
||||
void Object::GetBlockingWidth(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetBlockingWidth(objj);
|
||||
}
|
||||
|
||||
void Object::SetBlockingWidth(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptObject *, objj, int, bwid);
|
||||
AGS3::Object_SetBlockingWidth(objj, bwid);
|
||||
}
|
||||
|
||||
void Object::GetClickable(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetClickable(objj);
|
||||
}
|
||||
|
||||
void Object::SetClickable(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptObject *, objj, int, clik);
|
||||
AGS3::Object_SetClickable(objj, clik);
|
||||
}
|
||||
|
||||
void Object::GetFrame(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetFrame(objj);
|
||||
}
|
||||
|
||||
void Object::GetGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetGraphic(objj);
|
||||
}
|
||||
|
||||
void Object::SetGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptObject *, objj, int, slott);
|
||||
AGS3::Object_SetGraphic(objj, slott);
|
||||
}
|
||||
|
||||
void Object::GetID(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetID(objj);
|
||||
}
|
||||
|
||||
void Object::GetIgnoreScaling(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetIgnoreScaling(objj);
|
||||
}
|
||||
|
||||
void Object::SetIgnoreScaling(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptObject *, objj, int, newval);
|
||||
AGS3::Object_SetIgnoreScaling(objj, newval);
|
||||
}
|
||||
|
||||
void Object::GetIgnoreWalkbehinds(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetIgnoreWalkbehinds(objj);
|
||||
}
|
||||
|
||||
void Object::SetIgnoreWalkbehinds(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptObject *, chaa, int, clik);
|
||||
AGS3::Object_SetIgnoreWalkbehinds(chaa, clik);
|
||||
}
|
||||
|
||||
void Object::GetLoop(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetLoop(objj);
|
||||
}
|
||||
|
||||
void Object::GetMoving(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetMoving(objj);
|
||||
}
|
||||
|
||||
void Object::GetName_New(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetName_New(objj);
|
||||
}
|
||||
|
||||
void Object::GetSolid(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetSolid(objj);
|
||||
}
|
||||
|
||||
void Object::SetSolid(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptObject *, objj, int, solid);
|
||||
AGS3::Object_SetSolid(objj, solid);
|
||||
}
|
||||
|
||||
void Object::GetTransparency(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetTransparency(objj);
|
||||
}
|
||||
|
||||
void Object::SetTransparency(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptObject *, objj, int, trans);
|
||||
AGS3::Object_SetTransparency(objj, trans);
|
||||
}
|
||||
|
||||
void Object::GetView(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetView(objj);
|
||||
}
|
||||
|
||||
void Object::GetVisible(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetVisible(objj);
|
||||
}
|
||||
|
||||
void Object::SetVisible(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptObject *, objj, int, onOrOff);
|
||||
AGS3::Object_SetVisible(objj, onOrOff);
|
||||
}
|
||||
|
||||
void Object::GetX(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetX(objj);
|
||||
}
|
||||
|
||||
void Object::SetX(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptObject *, objj, int, xx);
|
||||
AGS3::Object_SetY(objj, xx);
|
||||
}
|
||||
|
||||
void Object::GetY(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptObject *, objj);
|
||||
params._result = AGS3::Object_GetY(objj);
|
||||
}
|
||||
|
||||
void Object::SetY(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptObject *, objj, int, yy);
|
||||
AGS3::Object_SetY(objj, yy);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
93
engines/ags/plugins/core/object.h
Normal file
93
engines/ags/plugins/core/object.h
Normal 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 ¶ms);
|
||||
void IsCollidingWithObject(ScriptMethodParams ¶ms);
|
||||
void GetName(ScriptMethodParams ¶ms);
|
||||
void GetProperty(ScriptMethodParams ¶ms);
|
||||
void GetPropertyText(ScriptMethodParams ¶ms);
|
||||
void GetTextProperty(ScriptMethodParams ¶ms);
|
||||
void SetProperty(ScriptMethodParams ¶ms);
|
||||
void SetTextProperty(ScriptMethodParams ¶ms);
|
||||
void MergeIntoBackground(ScriptMethodParams ¶ms);
|
||||
void Move(ScriptMethodParams ¶ms);
|
||||
void RemoveTint(ScriptMethodParams ¶ms);
|
||||
void RunInteraction(ScriptMethodParams ¶ms);
|
||||
void SetPosition(ScriptMethodParams ¶ms);
|
||||
void SetView(ScriptMethodParams ¶ms);
|
||||
void StopAnimating(ScriptMethodParams ¶ms);
|
||||
void StopMoving(ScriptMethodParams ¶ms);
|
||||
void Tint(ScriptMethodParams ¶ms);
|
||||
void GetObjectAtRoom(ScriptMethodParams ¶ms);
|
||||
void GetObjectAtScreen(ScriptMethodParams ¶ms);
|
||||
void GetAnimating(ScriptMethodParams ¶ms);
|
||||
void GetBaseline(ScriptMethodParams ¶ms);
|
||||
void SetBaseline(ScriptMethodParams ¶ms);
|
||||
void GetBlockingHeight(ScriptMethodParams ¶ms);
|
||||
void SetBlockingHeight(ScriptMethodParams ¶ms);
|
||||
void GetBlockingWidth(ScriptMethodParams ¶ms);
|
||||
void SetBlockingWidth(ScriptMethodParams ¶ms);
|
||||
void GetClickable(ScriptMethodParams ¶ms);
|
||||
void SetClickable(ScriptMethodParams ¶ms);
|
||||
void GetFrame(ScriptMethodParams ¶ms);
|
||||
void GetGraphic(ScriptMethodParams ¶ms);
|
||||
void SetGraphic(ScriptMethodParams ¶ms);
|
||||
void GetID(ScriptMethodParams ¶ms);
|
||||
void GetIgnoreScaling(ScriptMethodParams ¶ms);
|
||||
void SetIgnoreScaling(ScriptMethodParams ¶ms);
|
||||
void GetIgnoreWalkbehinds(ScriptMethodParams ¶ms);
|
||||
void SetIgnoreWalkbehinds(ScriptMethodParams ¶ms);
|
||||
void GetLoop(ScriptMethodParams ¶ms);
|
||||
void GetMoving(ScriptMethodParams ¶ms);
|
||||
void GetName_New(ScriptMethodParams ¶ms);
|
||||
void GetSolid(ScriptMethodParams ¶ms);
|
||||
void SetSolid(ScriptMethodParams ¶ms);
|
||||
void GetTransparency(ScriptMethodParams ¶ms);
|
||||
void SetTransparency(ScriptMethodParams ¶ms);
|
||||
void GetView(ScriptMethodParams ¶ms);
|
||||
void GetVisible(ScriptMethodParams ¶ms);
|
||||
void SetVisible(ScriptMethodParams ¶ms);
|
||||
void GetX(ScriptMethodParams ¶ms);
|
||||
void SetX(ScriptMethodParams ¶ms);
|
||||
void GetY(ScriptMethodParams ¶ms);
|
||||
void SetY(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
91
engines/ags/plugins/core/overlay.cpp
Normal file
91
engines/ags/plugins/core/overlay.cpp
Normal 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 ¶ms) {
|
||||
PARAMS4(int, x, int, y, int, slot, int, transparent);
|
||||
params._result = AGS3::Overlay_CreateGraphical(x, y, slot, transparent);
|
||||
}
|
||||
|
||||
void Overlay::ScPl_CreateTextual(ScriptMethodParams ¶ms) {
|
||||
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 ¶ms) {
|
||||
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 ¶ms) {
|
||||
PARAMS1(ScriptOverlay *, sco);
|
||||
AGS3::Overlay_Remove(sco);
|
||||
}
|
||||
|
||||
void Overlay::GetValid(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptOverlay *, sco);
|
||||
params._result = AGS3::Overlay_GetValid(sco);
|
||||
}
|
||||
|
||||
void Overlay::GetX(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptOverlay *, sco);
|
||||
params._result = AGS3::Overlay_GetX(sco);
|
||||
}
|
||||
|
||||
void Overlay::SetX(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptOverlay *, scover, int, newx);
|
||||
AGS3::Overlay_SetX(scover, newx);
|
||||
}
|
||||
|
||||
void Overlay::GetY(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptOverlay *, sco);
|
||||
params._result = AGS3::Overlay_GetY(sco);
|
||||
}
|
||||
|
||||
void Overlay::SetY(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptOverlay *, scover, int, newy);
|
||||
AGS3::Overlay_SetY(scover, newy);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
52
engines/ags/plugins/core/overlay.h
Normal file
52
engines/ags/plugins/core/overlay.h
Normal 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 ¶ms);
|
||||
void ScPl_CreateTextual(ScriptMethodParams ¶ms);
|
||||
void ScPl_SetText(ScriptMethodParams ¶ms);
|
||||
void Remove(ScriptMethodParams ¶ms);
|
||||
void GetValid(ScriptMethodParams ¶ms);
|
||||
void GetX(ScriptMethodParams ¶ms);
|
||||
void SetX(ScriptMethodParams ¶ms);
|
||||
void GetY(ScriptMethodParams ¶ms);
|
||||
void SetY(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
59
engines/ags/plugins/core/parser.cpp
Normal file
59
engines/ags/plugins/core/parser.cpp
Normal 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 ¶ms) {
|
||||
PARAMS1(const char *, wordToFind);
|
||||
params._result = AGS3::Parser_FindWordID(wordToFind);
|
||||
}
|
||||
|
||||
void Parser::ParseText(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(const char *, text);
|
||||
AGS3::Parser_FindWordID(text);
|
||||
}
|
||||
|
||||
void Parser::SaidUnknownWord(ScriptMethodParams ¶ms) {
|
||||
AGS3::Parser_SaidUnknownWord();
|
||||
}
|
||||
|
||||
void Parser::Said(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(const char *, checkWords);
|
||||
params._result = AGS3::Parser_FindWordID(checkWords);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
47
engines/ags/plugins/core/parser.h
Normal file
47
engines/ags/plugins/core/parser.h
Normal 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 ¶ms);
|
||||
void ParseText(ScriptMethodParams ¶ms);
|
||||
void SaidUnknownWord(ScriptMethodParams ¶ms);
|
||||
void Said(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
120
engines/ags/plugins/core/region.cpp
Normal file
120
engines/ags/plugins/core/region.cpp
Normal 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 ¶ms) {
|
||||
PARAMS2(int, xx, int, yy);
|
||||
params._result = AGS3::GetRegionAtRoom(xx, yy);
|
||||
}
|
||||
|
||||
void Region::GetRegionAtScreen(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(int, x, int, y);
|
||||
params._result = AGS3::GetRegionAtScreen(x, y);
|
||||
}
|
||||
|
||||
void Region::TintNoLum(ScriptMethodParams ¶ms) {
|
||||
PARAMS5(ScriptRegion *, srr, int, red, int, green, int, blue, int, amount);
|
||||
AGS3::Region_TintNoLum(srr, red, green, blue, amount);
|
||||
}
|
||||
|
||||
void Region::RunInteraction(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptRegion *, ssr, int, mood);
|
||||
AGS3::Region_RunInteraction(ssr, mood);
|
||||
}
|
||||
|
||||
void Region::GetEnabled(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptRegion *, ssr);
|
||||
params._result = AGS3::Region_GetEnabled(ssr);
|
||||
}
|
||||
|
||||
void Region::SetEnabled(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptRegion *, ssr, int, enable);
|
||||
AGS3::Region_SetEnabled(ssr, enable);
|
||||
}
|
||||
|
||||
void Region::GetID(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptRegion *, ssr);
|
||||
params._result = AGS3::Region_GetID(ssr);
|
||||
}
|
||||
|
||||
void Region::GetLightLevel(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptRegion *, ssr);
|
||||
params._result = AGS3::Region_GetLightLevel(ssr);
|
||||
}
|
||||
|
||||
void Region::SetLightLevel(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptRegion *, ssr, int, brightness);
|
||||
AGS3::Region_SetLightLevel(ssr, brightness);
|
||||
}
|
||||
|
||||
void Region::GetTintEnabled(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptRegion *, ssr);
|
||||
params._result = AGS3::Region_GetTintEnabled(ssr);
|
||||
}
|
||||
|
||||
void Region::GetTintBlue(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptRegion *, ssr);
|
||||
params._result = AGS3::Region_GetTintBlue(ssr);
|
||||
}
|
||||
|
||||
void Region::GetTintGreen(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptRegion *, ssr);
|
||||
params._result = AGS3::Region_GetTintGreen(ssr);
|
||||
}
|
||||
|
||||
void Region::GetTintRed(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptRegion *, ssr);
|
||||
params._result = AGS3::Region_GetTintRed(ssr);
|
||||
}
|
||||
|
||||
void Region::GetTintSaturation(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptRegion *, ssr);
|
||||
params._result = AGS3::Region_GetTintSaturation(ssr);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
57
engines/ags/plugins/core/region.h
Normal file
57
engines/ags/plugins/core/region.h
Normal 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 ¶ms);
|
||||
void GetRegionAtScreen(ScriptMethodParams ¶ms);
|
||||
void TintNoLum(ScriptMethodParams ¶ms);
|
||||
void RunInteraction(ScriptMethodParams ¶ms);
|
||||
void GetEnabled(ScriptMethodParams ¶ms);
|
||||
void SetEnabled(ScriptMethodParams ¶ms);
|
||||
void GetID(ScriptMethodParams ¶ms);
|
||||
void GetLightLevel(ScriptMethodParams ¶ms);
|
||||
void SetLightLevel(ScriptMethodParams ¶ms);
|
||||
void GetTintEnabled(ScriptMethodParams ¶ms);
|
||||
void GetTintBlue(ScriptMethodParams ¶ms);
|
||||
void GetTintGreen(ScriptMethodParams ¶ms);
|
||||
void GetTintRed(ScriptMethodParams ¶ms);
|
||||
void GetTintSaturation(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
122
engines/ags/plugins/core/room.cpp
Normal file
122
engines/ags/plugins/core/room.cpp
Normal 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 ¶ms) {
|
||||
PARAMS1(int, backgroundNumber);
|
||||
params._result = AGS3::Room_GetDrawingSurfaceForBackground(backgroundNumber);
|
||||
}
|
||||
|
||||
void Room::GetProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(const char *, property);
|
||||
params._result = AGS3::Room_GetProperty(property);
|
||||
}
|
||||
|
||||
void Room::GetTextProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(const char *, property);
|
||||
params._result = AGS3::Room_GetTextProperty(property);
|
||||
}
|
||||
|
||||
void Room::SetProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(const char *, property, int, value);
|
||||
params._result = AGS3::Room_SetProperty(property, value);
|
||||
}
|
||||
|
||||
void Room::SetTextProperty(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(const char *, property, const char *, value);
|
||||
params._result = AGS3::Room_SetTextProperty(property, value);
|
||||
}
|
||||
|
||||
void Room::GetBottomEdge(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Room_GetBottomEdge();
|
||||
}
|
||||
|
||||
void Room::GetColorDepth(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Room_GetColorDepth();
|
||||
}
|
||||
|
||||
void Room::GetHeight(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Room_GetHeight();
|
||||
}
|
||||
|
||||
void Room::GetLeftEdge(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Room_GetLeftEdge();
|
||||
}
|
||||
|
||||
void Room::GetMessages(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, index);
|
||||
params._result = AGS3::Room_GetMessages(index);
|
||||
}
|
||||
|
||||
void Room::GetMusicOnLoad(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Room_GetMusicOnLoad();
|
||||
}
|
||||
|
||||
void Room::GetObjectCount(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Room_GetObjectCount();
|
||||
}
|
||||
|
||||
void Room::GetRightEdge(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Room_GetRightEdge();
|
||||
}
|
||||
|
||||
void Room::GetTopEdge(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Room_GetTopEdge();
|
||||
}
|
||||
|
||||
void Room::GetWidth(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Room_GetWidth();
|
||||
}
|
||||
|
||||
void Room::RoomExists(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, room);
|
||||
params._result = AGS3::Room_Exists(room);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
59
engines/ags/plugins/core/room.h
Normal file
59
engines/ags/plugins/core/room.h
Normal 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 ¶ms);
|
||||
void GetProperty(ScriptMethodParams ¶ms);
|
||||
void GetTextProperty(ScriptMethodParams ¶ms);
|
||||
void SetProperty(ScriptMethodParams ¶ms);
|
||||
void SetTextProperty(ScriptMethodParams ¶ms);
|
||||
void GetBottomEdge(ScriptMethodParams ¶ms);
|
||||
void GetColorDepth(ScriptMethodParams ¶ms);
|
||||
void GetHeight(ScriptMethodParams ¶ms);
|
||||
void GetLeftEdge(ScriptMethodParams ¶ms);
|
||||
void GetMessages(ScriptMethodParams ¶ms);
|
||||
void GetMusicOnLoad(ScriptMethodParams ¶ms);
|
||||
void GetObjectCount(ScriptMethodParams ¶ms);
|
||||
void GetRightEdge(ScriptMethodParams ¶ms);
|
||||
void GetTopEdge(ScriptMethodParams ¶ms);
|
||||
void GetWidth(ScriptMethodParams ¶ms);
|
||||
void RoomExists(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
79
engines/ags/plugins/core/screen.cpp
Normal file
79
engines/ags/plugins/core/screen.cpp
Normal 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 ¶ms) {
|
||||
params._result = AGS3::Screen_GetScreenHeight();
|
||||
}
|
||||
|
||||
void Screen::GetScreenWidth(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Screen_GetScreenWidth();
|
||||
}
|
||||
|
||||
void Screen::GetAutoSizeViewport(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Screen_GetAutoSizeViewport();
|
||||
}
|
||||
|
||||
void Screen::SetAutoSizeViewport(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(bool, on);
|
||||
AGS3::Screen_SetAutoSizeViewport(on);
|
||||
}
|
||||
|
||||
void Screen::GetViewport(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Screen_GetAnyViewport();
|
||||
}
|
||||
|
||||
void Screen::GetViewportCount(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::Screen_GetViewportCount();
|
||||
}
|
||||
|
||||
void Screen::GetAnyViewport(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, index);
|
||||
params._result = AGS3::Room_GetColorDepth(index);
|
||||
}
|
||||
|
||||
void Screen::RoomToScreenPoint(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(int, roomx, int, roomy);
|
||||
params._result = AGS3::Room_GetHeight(roomx, roomy);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
51
engines/ags/plugins/core/screen.h
Normal file
51
engines/ags/plugins/core/screen.h
Normal 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 ¶ms);
|
||||
void GetScreenWidth(ScriptMethodParams ¶ms);
|
||||
void GetAutoSizeViewport(ScriptMethodParams ¶ms);
|
||||
void SetAutoSizeViewport(ScriptMethodParams ¶ms);
|
||||
void GetViewport(ScriptMethodParams ¶ms);
|
||||
void GetViewportCount(ScriptMethodParams ¶ms);
|
||||
void GetAnyViewport(ScriptMethodParams ¶ms);
|
||||
void RoomToScreenPoint(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
108
engines/ags/plugins/core/slider.cpp
Normal file
108
engines/ags/plugins/core/slider.cpp
Normal 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 ¶ms) {
|
||||
PARAMS1(GUISlider *, guisl);
|
||||
params._result = AGS3::Slider_GetBackgroundGraphic(guisl);
|
||||
}
|
||||
|
||||
void Slider::SetBackgroundGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUISlider *, guisl, int, newImage);
|
||||
AGS3::Slider_SetBackgroundGraphic(guisl, newImage);
|
||||
}
|
||||
|
||||
void Slider::GetHandleGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUISlider *, guisl);
|
||||
params._result = AGS3::Slider_GetHandleGraphic(guisl);
|
||||
}
|
||||
|
||||
void Slider::SetHandleGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUISlider *, guisl, int, newImage);
|
||||
AGS3::Slider_SetHandleGraphic(guisl, newImage);
|
||||
}
|
||||
|
||||
void Slider::GetHandleOffset(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUISlider *, guisl);
|
||||
params._result = AGS3::Slider_GetHandleOffset(guisl);
|
||||
}
|
||||
|
||||
void Slider::SetHandleOffset(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUISlider *, guisl, int, newOffset);
|
||||
AGS3::Slider_SetHandleOffset(guisl, newOffset);
|
||||
}
|
||||
|
||||
void Slider::GetMax(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUISlider *, guisl);
|
||||
params._result = AGS3::Slider_GetMax(guisl);
|
||||
}
|
||||
|
||||
void Slider::SetMax(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUISlider *, guisl, int, valn);
|
||||
AGS3::Slider_SetMax(guisl, valn);
|
||||
}
|
||||
|
||||
void Slider::GetMin(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUISlider *, guisl);
|
||||
params._result = AGS3::Slider_GetMin(guisl);
|
||||
}
|
||||
|
||||
void Slider::SetMin(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUISlider *, guisl, int, valn);
|
||||
AGS3::Slider_SetMin(guisl, valn);
|
||||
}
|
||||
|
||||
void Slider::GetValue(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUISlider *, guisl);
|
||||
params._result = AGS3::Slider_GetValue(guisl);
|
||||
}
|
||||
|
||||
void Slider::SetValue(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUISlider *, guisl, int, valn);
|
||||
AGS3::Slider_SetValue(guisl, valn);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
55
engines/ags/plugins/core/slider.h
Normal file
55
engines/ags/plugins/core/slider.h
Normal 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 ¶ms);
|
||||
void SetBackgroundGraphic(ScriptMethodParams ¶ms);
|
||||
void GetHandleGraphic(ScriptMethodParams ¶ms);
|
||||
void SetHandleGraphic(ScriptMethodParams ¶ms);
|
||||
void GetHandleOffset(ScriptMethodParams ¶ms);
|
||||
void SetHandleOffset(ScriptMethodParams ¶ms);
|
||||
void GetMax(ScriptMethodParams ¶ms);
|
||||
void SetMax(ScriptMethodParams ¶ms);
|
||||
void GetMin(ScriptMethodParams ¶ms);
|
||||
void SetMin(ScriptMethodParams ¶ms);
|
||||
void GetValue(ScriptMethodParams ¶ms);
|
||||
void SetValue(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
152
engines/ags/plugins/core/string.cpp
Normal file
152
engines/ags/plugins/core/string.cpp
Normal 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 ¶ms) {
|
||||
PARAMS1(const char *, str);
|
||||
params._result = AGS3::String_IsNullOrEmpty(str);
|
||||
}
|
||||
|
||||
void String::Append(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(const char *, str, const char *, extrabit);
|
||||
params._result = AGS3::String_Append(str, extrabit);
|
||||
}
|
||||
|
||||
void String::AppendChar(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(const char *, str, char, extraOne);
|
||||
params._result = AGS3::String_AppendChar(str, extraOne);
|
||||
}
|
||||
|
||||
void String::CompareTo(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(const char *, str1, const char *, str2, bool, caseSensitive);
|
||||
params._result = AGS3::String_CompareTo(str1, str2, caseSensitive);
|
||||
}
|
||||
|
||||
void String::StrContains(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(const char *, s1, const char *, s2);
|
||||
params._result = AGS3::StrContains(s1, s2);
|
||||
}
|
||||
|
||||
void String::Copy(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(const char *, str);
|
||||
params._result = AGS3::String_Copy(str);
|
||||
}
|
||||
|
||||
void String::EndsWith(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(const char *, s1, const char *, s2, bool, caseSensitive);
|
||||
params._result = AGS3::String_EndsWith(s1, s2, caseSensitive);
|
||||
}
|
||||
|
||||
void String::ScPl_String_Format(ScriptMethodParams ¶ms) {
|
||||
Common::String text = params.format(0);
|
||||
params._result = AGS3::CreateNewScriptString(text.c_str());
|
||||
}
|
||||
|
||||
void String::LowerCase(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(const char *, str);
|
||||
params._result = AGS3::String_LowerCase(str);
|
||||
}
|
||||
|
||||
void String::Replace(ScriptMethodParams ¶ms) {
|
||||
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 ¶ms) {
|
||||
PARAMS3(const char *, thisString, int, index, char, newChar);
|
||||
params._result = AGS3::String_ReplaceCharAt(thisString, index, newChar);
|
||||
}
|
||||
|
||||
void String::StartsWith(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(const char *, thisString, const char *, checkForString, bool, caseSensitive);
|
||||
params._result = AGS3::String_StartsWith(thisString, checkForString, caseSensitive);
|
||||
}
|
||||
|
||||
void String::Substring(ScriptMethodParams ¶ms) {
|
||||
PARAMS3(const char *, thisString, int, index, int, length);
|
||||
params._result = AGS3::String_Substring(thisString, index, length);
|
||||
}
|
||||
|
||||
void String::Truncate(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(const char *, thisString, int, length);
|
||||
params._result = AGS3::String_Truncate(thisString, length);
|
||||
}
|
||||
|
||||
void String::UpperCase(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(const char *, str);
|
||||
params._result = AGS3::String_UpperCase(str);
|
||||
}
|
||||
|
||||
void String::StringToFloat(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(const char *, value);
|
||||
params._result = AGS3::StringToFloat(value);
|
||||
}
|
||||
|
||||
void String::StringToInt(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(const char *, value);
|
||||
params._result = AGS3::StringToInt(value);
|
||||
}
|
||||
|
||||
void String::GetChars(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(const char *, texx, int, index);
|
||||
params._result = AGS3::String_GetChars(texx, index);
|
||||
}
|
||||
|
||||
void String::GetLength(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(const char *, s);
|
||||
params._result = ::strlen(s);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
62
engines/ags/plugins/core/string.h
Normal file
62
engines/ags/plugins/core/string.h
Normal 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 ¶ms);
|
||||
void Append(ScriptMethodParams ¶ms);
|
||||
void AppendChar(ScriptMethodParams ¶ms);
|
||||
void CompareTo(ScriptMethodParams ¶ms);
|
||||
void StrContains(ScriptMethodParams ¶ms);
|
||||
void Copy(ScriptMethodParams ¶ms);
|
||||
void EndsWith(ScriptMethodParams ¶ms);
|
||||
void ScPl_String_Format(ScriptMethodParams ¶ms);
|
||||
void LowerCase(ScriptMethodParams ¶ms);
|
||||
void Replace(ScriptMethodParams ¶ms);
|
||||
void ReplaceCharAt(ScriptMethodParams ¶ms);
|
||||
void StartsWith(ScriptMethodParams ¶ms);
|
||||
void Substring(ScriptMethodParams ¶ms);
|
||||
void Truncate(ScriptMethodParams ¶ms);
|
||||
void UpperCase(ScriptMethodParams ¶ms);
|
||||
void StringToFloat(ScriptMethodParams ¶ms);
|
||||
void StringToInt(ScriptMethodParams ¶ms);
|
||||
void GetChars(ScriptMethodParams ¶ms);
|
||||
void GetLength(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
151
engines/ags/plugins/core/system.cpp
Normal file
151
engines/ags/plugins/core/system.cpp
Normal 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 ¶ms) {
|
||||
params._result = AGS3::System_GetAudioChannelCount();
|
||||
}
|
||||
|
||||
void System::GetAudioChannels(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, index);
|
||||
params._result = AGS3::System_GetAudioChannels(index);
|
||||
}
|
||||
|
||||
void System::GetCapsLock(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::System_GetCapsLock();
|
||||
}
|
||||
|
||||
void System::GetColorDepth(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::System_GetColorDepth();
|
||||
}
|
||||
|
||||
void System::GetGamma(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::System_GetGamma();
|
||||
}
|
||||
|
||||
void System::SetGamma(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, newValue);
|
||||
AGS3::System_SetGamma(newValue);
|
||||
}
|
||||
|
||||
void System::GetHardwareAcceleration(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::System_GetHardwareAcceleration();
|
||||
}
|
||||
|
||||
void System::GetNumLock(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::System_GetNumLock();
|
||||
}
|
||||
|
||||
void System::GetOS(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::System_GetOS();
|
||||
}
|
||||
|
||||
void System::GetRuntimeInfo(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::System_GetRuntimeInfo();
|
||||
}
|
||||
|
||||
void System::GetScreenHeight(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::System_GetScreenHeight();
|
||||
}
|
||||
|
||||
void System::GetScreenWidth(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::System_GetScreenWidth();
|
||||
}
|
||||
|
||||
void System::GetScrollLock(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::System_GetScrollLock();
|
||||
}
|
||||
|
||||
void System::GetSupportsGammaControl(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::System_GetSupportsGammaControl();
|
||||
}
|
||||
|
||||
void System::GetVersion(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::System_GetVersion();
|
||||
}
|
||||
|
||||
void System::GetViewportHeight(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::System_GetViewportHeight();
|
||||
}
|
||||
|
||||
void System::GetViewportWidth(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::System_GetViewportWidth();
|
||||
}
|
||||
|
||||
void System::GetVolume(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::System_GetVolume();
|
||||
}
|
||||
|
||||
void System::SetVolume(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, newvol);
|
||||
AGS3::System_SetVolume(newvol);
|
||||
}
|
||||
|
||||
void System::GetVsync(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::System_GetVsync();
|
||||
}
|
||||
|
||||
void System::SetVsync(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(int, newValue);
|
||||
AGS3::System_SetVsync(newValue);
|
||||
}
|
||||
|
||||
void System::GetWindowed(ScriptMethodParams ¶ms) {
|
||||
params._result = AGS3::System_GetWindowed();
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
65
engines/ags/plugins/core/system.h
Normal file
65
engines/ags/plugins/core/system.h
Normal 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 ¶ms);
|
||||
void GetAudioChannels(ScriptMethodParams ¶ms);
|
||||
void GetCapsLock(ScriptMethodParams ¶ms);
|
||||
void GetColorDepth(ScriptMethodParams ¶ms);
|
||||
void GetGamma(ScriptMethodParams ¶ms);
|
||||
void SetGamma(ScriptMethodParams ¶ms);
|
||||
void GetHardwareAcceleration(ScriptMethodParams ¶ms);
|
||||
void GetNumLock(ScriptMethodParams ¶ms);
|
||||
void GetOS(ScriptMethodParams ¶ms);
|
||||
void GetRuntimeInfo(ScriptMethodParams ¶ms);
|
||||
void GetScreenHeight(ScriptMethodParams ¶ms);
|
||||
void GetScreenWidth(ScriptMethodParams ¶ms);
|
||||
void GetScrollLock(ScriptMethodParams ¶ms);
|
||||
void GetSupportsGammaControl(ScriptMethodParams ¶ms);
|
||||
void GetVersion(ScriptMethodParams ¶ms);
|
||||
void GetViewportHeight(ScriptMethodParams ¶ms);
|
||||
void GetViewportWidth(ScriptMethodParams ¶ms);
|
||||
void GetVolume(ScriptMethodParams ¶ms);
|
||||
void SetVolume(ScriptMethodParams ¶ms);
|
||||
void GetVsync(ScriptMethodParams ¶ms);
|
||||
void SetVsync(ScriptMethodParams ¶ms);
|
||||
void GetWindowed(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
79
engines/ags/plugins/core/textbox.cpp
Normal file
79
engines/ags/plugins/core/textbox.cpp
Normal 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 ¶ms) {
|
||||
PARAMS2(GUITextBox *, texbox, char *, buffer);
|
||||
AGS3::TextBox_GetText(texbox, buffer);
|
||||
}
|
||||
|
||||
void Textbox::SetText(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUITextBox *, texbox, const char *, newtex);
|
||||
AGS3::TextBox_SetText(texbox, newtex);
|
||||
}
|
||||
|
||||
void Textbox::GetText_New(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUITextBox *, texbox);
|
||||
params._result = AGS3::TextBox_GetText_New(texbox);
|
||||
}
|
||||
|
||||
void Textbox::GetFont(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUITextBox *, texbox);
|
||||
params._result = AGS3::TextBox_GetFont(texbox);
|
||||
}
|
||||
|
||||
void Textbox::SetFont(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUITextBox *, guit, int, fontnum);
|
||||
AGS3::TextBox_SetFont(guit, fontnum);
|
||||
}
|
||||
|
||||
void Textbox::GetTextColor(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(GUITextBox *, texbox);
|
||||
params._result = AGS3::TextBox_GetTextColor(texbox);
|
||||
}
|
||||
|
||||
void Textbox::SetTextColor(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(GUITextBox *, guit, int, colr);
|
||||
AGS3::TextBox_SetTextColor(guit, colr);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
50
engines/ags/plugins/core/textbox.h
Normal file
50
engines/ags/plugins/core/textbox.h
Normal 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 ¶ms);
|
||||
void SetText(ScriptMethodParams ¶ms);
|
||||
void GetText_New(ScriptMethodParams ¶ms);
|
||||
void GetFont(ScriptMethodParams ¶ms);
|
||||
void SetFont(ScriptMethodParams ¶ms);
|
||||
void GetTextColor(ScriptMethodParams ¶ms);
|
||||
void SetTextColor(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
102
engines/ags/plugins/core/view_frame.cpp
Normal file
102
engines/ags/plugins/core/view_frame.cpp
Normal 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 ¶ms) {
|
||||
PARAMS1(ScriptViewFrame *, svf);
|
||||
params._result = AGS3::ViewFrame_GetFlipped(svf);
|
||||
}
|
||||
|
||||
void ViewFrame::GetFrame(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptViewFrame *, svf);
|
||||
params._result = AGS3::ViewFrame_GetFrame(svf);
|
||||
}
|
||||
|
||||
void ViewFrame::GetGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptViewFrame *, svf);
|
||||
params._result = AGS3::ViewFrame_GetGraphic(svf);
|
||||
}
|
||||
|
||||
void ViewFrame::SetGraphic(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptViewFrame *, svf, int, newPic);
|
||||
AGS3::ViewFrame_SetGraphic(svf, newPic);
|
||||
}
|
||||
|
||||
void ViewFrame::GetLinkedAudio(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptViewFrame *, svf);
|
||||
params._result = AGS3::ViewFrame_GetLinkedAudio(svf);
|
||||
}
|
||||
|
||||
void ViewFrame::SetLinkedAudio(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptViewFrame *, svf, ScriptAudioClip *, clip);
|
||||
AGS3::ViewFrame_SetLinkedAudio(svf, clip);
|
||||
}
|
||||
|
||||
void ViewFrame::GetLoop(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptViewFrame *, svf);
|
||||
params._result = AGS3::ViewFrame_GetLoop(svf);
|
||||
}
|
||||
|
||||
void ViewFrame::GetSound(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptViewFrame *, svf);
|
||||
params._result = AGS3::ViewFrame_GetSound(svf);
|
||||
}
|
||||
|
||||
void ViewFrame::SetSound(ScriptMethodParams ¶ms) {
|
||||
PARAMS2(ScriptViewFrame *, svf, int, newSound);
|
||||
AGS3::ViewFrame_SetSound(svf, newSound);
|
||||
}
|
||||
|
||||
void ViewFrame::GetSpeed(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptViewFrame *, svf);
|
||||
params._result = AGS3::ViewFrame_GetSpeed(svf);
|
||||
}
|
||||
|
||||
void ViewFrame::GetView(ScriptMethodParams ¶ms) {
|
||||
PARAMS1(ScriptViewFrame *, svf);
|
||||
params._result = AGS3::ViewFrame_GetView(svf);
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
54
engines/ags/plugins/core/view_frame.h
Normal file
54
engines/ags/plugins/core/view_frame.h
Normal 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 ¶ms);
|
||||
void GetFrame(ScriptMethodParams ¶ms);
|
||||
void GetGraphic(ScriptMethodParams ¶ms);
|
||||
void SetGraphic(ScriptMethodParams ¶ms);
|
||||
void GetLinkedAudio(ScriptMethodParams ¶ms);
|
||||
void SetLinkedAudio(ScriptMethodParams ¶ms);
|
||||
void GetLoop(ScriptMethodParams ¶ms);
|
||||
void GetSound(ScriptMethodParams ¶ms);
|
||||
void SetSound(ScriptMethodParams ¶ms);
|
||||
void GetSpeed(ScriptMethodParams ¶ms);
|
||||
void GetView(ScriptMethodParams ¶ms);
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
} // namespace Plugins
|
||||
} // namespace AGS3
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user