22 #ifndef AGS_PLUGINS_AGSFLASHLIGHT_AGSFLASHLIGHT_H 23 #define AGS_PLUGINS_AGSFLASHLIGHT_AGSFLASHLIGHT_H 25 #include "ags/plugins/ags_plugin.h" 26 #include "ags/plugins/serializer.h" 27 #include "ags/lib/allegro.h" 31 namespace AGSFlashlight {
40 int32 screen_width = 320;
41 int32 screen_height = 200;
42 int32 screen_color_depth = 16;
43 bool g_BitmapMustBeUpdated =
true;
47 int g_DarknessLightLevel = 100;
48 int g_BrightnessLightLevel = 100;
49 int g_DarknessSize = 0;
50 int g_DarknessDiameter = 0;
51 int g_BrightnessSize = 0;
52 int32 g_FlashlightX = 0;
53 int32 g_FlashlightY = 0;
54 int32 g_FlashlightDrawAtX = 0;
55 int32 g_FlashlightDrawAtY = 0;
56 bool g_FlashlightFollowMouse =
false;
57 int g_FollowCharacterId = 0;
58 int g_FollowCharacterDx = 0;
59 int g_FollowCharacterDy = 0;
60 int g_FollowCharacterHorz = 0;
61 int g_FollowCharacterVert = 0;
63 BITMAP *g_LightBitmap =
nullptr;
64 uint32 flashlight_x = 0, flashlight_n = 0;
72 inline uint32 _blender_alpha16_bgr(uint32 y);
73 inline void calc_x_n(uint32 x);
74 inline void setPixel(
int x,
int y, uint32
color, uint32 *pixel);
75 void plotCircle(
int xm,
int ym,
int r, uint32 color);
76 void ClipToRange(
int &variable,
int min,
int max);
77 void AlphaBlendBitmap();
80 void CreateLightBitmap();
82 uint32 blendPixel(uint32 col,
bool isAlpha24,
int light);
116 const char *AGS_GetPluginName()
override;
117 void AGS_EngineStartup(
IAGSEngine *engine)
override;
118 int64 AGS_EngineOnEvent(
int event,
NumberPtr data)
override;
Definition: ags_plugin.h:131
Definition: serializer.h:32
Definition: plugin_base.h:171
Definition: plugin_base.h:131
Definition: ags_plugin.h:328
Definition: ags_flashlight.h:37