]> bicyclesonthemoon.info Git - ott/enhance/blobdiff - core.h
palette tools online
[ott/enhance] / core.h
diff --git a/core.h b/core.h
index 15af4061da1581fc56a96ea759fbea148f30163a..999bf5ec9b30c0ed63b53b26ed1f008b0cded00d 100644 (file)
--- a/core.h
+++ b/core.h
@@ -1,7 +1,7 @@
  /*
 core.h
 The tool with multiple enhancements and manipulations of pictures
-29.11.2022
+03.12.2022
 
 Copyright (C) 2022  Balthasar SzczepaƄski
 
@@ -179,7 +179,7 @@ struct ColorInfo
        ILuint value;
        ILuint alpha;
        ILuint index;
-}
+};
 
 
 typedef int (ACTION_F)(ILuint n, struct PixelInfo *info, void *data);
@@ -190,7 +190,7 @@ void finish (int const returnvalue, char const * const returntext);
 int init (void);
 ILuint get_handle (uint_fast16_t id);
 int get_data (uint_fast16_t id, void **data, ILuint frame);
-int get_palette (uint_fast16_t id, void **palette, ILuint frame);
+int get_palette (uint_fast16_t id, void *palette, ILuint frame);
 int set_palette (uint_fast16_t id, void *palette, ILuint size, ILenum type, ILuint frame);
 void create_picture (uint_fast16_t id);
 int create_pictures (uint_fast16_t n);
@@ -201,6 +201,7 @@ int reserve_pictures (uint_fast16_t n);
 void get_flags (struct IL_full_info *info, FLAG_TYPE *flags);
 int convert_picture (uint_fast16_t id, struct IL_full_info *info, FLAG_TYPE *flags);
 int load_picture (uint_fast16_t id, char *path, struct IL_full_info *info, FLAG_TYPE *flags);
+int load_picture_mem (uint_fast16_t id, const void *address, ILuint size, struct IL_full_info *info, FLAG_TYPE *flags);
 int save_picture (uint_fast16_t id, char *path, FLAG_TYPE flags);
 int build_picture (uint_fast16_t id, ILint width, ILint height, ILint frames, struct IL_full_info *info, FLAG_TYPE *flags);
 int build_picture_from_info (uint_fast16_t id, struct IL_full_info *reference_info, struct IL_full_info *info, FLAG_TYPE *flags);
@@ -209,6 +210,14 @@ int get_info (uint_fast16_t id, struct IL_full_info *info, ILint frame);
 ILuint upscale_value (ILubyte x, ILint bytes);
 ILubyte downscale_value (ILuint x, ILint bytes);
 
+int perform_action_1picture_1pixel (
+       uint_fast16_t id,
+       ILint x, ILint y, ILint f,
+       ACTION_F *function,
+       FLAG_TYPE flags,
+       void *data
+);
+
 int perform_action_1picture (
        uint_fast16_t id,
        ILint x0, ILint y0, ILint f0,
@@ -238,5 +247,7 @@ int perform_action_palette_mix (
 
 
 int copy_pixels (ILuint n, struct PixelInfo *p, void *data);
-ILuint copy_1p_alpha (ILint64 src, ILint64 dst, ILint64 alpha, iILint64 max);
-int fill_color (ILuint n, struct PixelInfo *p, void *data);
\ No newline at end of file
+ILuint copy_1p_alpha (ILint64 src, ILint64 dst, ILint64 alpha, ILint64 max);
+int fill_color (ILuint n, struct PixelInfo *p, void *data);
+int palette_mix_index (ILuint n, struct PixelInfo *p, void *data);
+ILuint tsqrt(ILuint s);