1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 #ifndef AGS_ENGINE_AC_DYNAMICSPRITE_H 24 #define AGS_ENGINE_AC_DYNAMICSPRITE_H 25 26 #include "ags/engine/ac/dynobj/script_dynamic_sprite.h" 27 #include "ags/engine/ac/dynobj/script_drawing_surface.h" 28 29 namespace AGS3 { 30 31 void DynamicSprite_Delete(ScriptDynamicSprite *sds); 32 ScriptDrawingSurface *DynamicSprite_GetDrawingSurface(ScriptDynamicSprite *dss); 33 int DynamicSprite_GetGraphic(ScriptDynamicSprite *sds); 34 int DynamicSprite_GetWidth(ScriptDynamicSprite *sds); 35 int DynamicSprite_GetHeight(ScriptDynamicSprite *sds); 36 int DynamicSprite_GetColorDepth(ScriptDynamicSprite *sds); 37 void DynamicSprite_Resize(ScriptDynamicSprite *sds, int width, int height); 38 void DynamicSprite_Flip(ScriptDynamicSprite *sds, int direction); 39 void DynamicSprite_CopyTransparencyMask(ScriptDynamicSprite *sds, int sourceSprite); 40 void DynamicSprite_ChangeCanvasSize(ScriptDynamicSprite *sds, int width, int height, int x, int y); 41 void DynamicSprite_Crop(ScriptDynamicSprite *sds, int x1, int y1, int width, int height); 42 void DynamicSprite_Rotate(ScriptDynamicSprite *sds, int angle, int width, int height); 43 void DynamicSprite_Tint(ScriptDynamicSprite *sds, int red, int green, int blue, int saturation, int luminance); 44 int DynamicSprite_SaveToFile(ScriptDynamicSprite *sds, const char *namm); 45 ScriptDynamicSprite *DynamicSprite_CreateFromSaveGame(int sgslot, int width, int height); 46 ScriptDynamicSprite *DynamicSprite_CreateFromFile(const char *filename); 47 ScriptDynamicSprite *DynamicSprite_CreateFromScreenShot(int width, int height); 48 ScriptDynamicSprite *DynamicSprite_CreateFromExistingSprite(int slot, int preserveAlphaChannel); 49 ScriptDynamicSprite *DynamicSprite_CreateFromDrawingSurface(ScriptDrawingSurface *sds, int x, int y, int width, int height); 50 ScriptDynamicSprite *DynamicSprite_Create(int width, int height, int alphaChannel); 51 ScriptDynamicSprite *DynamicSprite_CreateFromExistingSprite_Old(int slot); 52 ScriptDynamicSprite *DynamicSprite_CreateFromBackground(int frame, int x1, int y1, int width, int height); 53 54 55 void add_dynamic_sprite(int gotSlot, Shared::Bitmap *redin, bool hasAlpha = false); 56 void free_dynamic_sprite(int gotSlot); 57 58 } // namespace AGS3 59 60 #endif 61