diff --git a/src/global.h b/src/global.h index 0bf4d00f..0e23822f 100644 --- a/src/global.h +++ b/src/global.h @@ -699,7 +699,7 @@ GFX2_GLOBAL Func_gradient Gradient_function; /// either ::Pixel (if the gradient must be drawn on menus only) /// or ::Display_pixel (if the gradient must be drawn on the image) GFX2_GLOBAL Func_pixel Gradient_pixel; -/// Index in ::T_Page::Gradient_array of the currently selected gradient. +/// Index in ::T_Page::Gradients of the currently selected gradient. GFX2_GLOBAL byte Current_gradient; /// Boolean, true when the color cycling is active. GFX2_GLOBAL byte Cycling_mode; diff --git a/src/loadsave.c b/src/loadsave.c index d2738916..063b8ecf 100644 --- a/src/loadsave.c +++ b/src/loadsave.c @@ -1108,6 +1108,7 @@ void Load_SDL_Image(T_IO_Context *context) /// /// Load an arbitrary SDL_Surface. +/// @param full_name Full (absolute) path of the file to load. /// @param gradients Pass the address of a target T_Gradient_array if you want the gradients, NULL otherwise SDL_Surface * Load_surface(char *full_name, T_Gradient_array *gradients) { diff --git a/src/op_c.c b/src/op_c.c index fd785223..b3cab93f 100644 --- a/src/op_c.c +++ b/src/op_c.c @@ -1027,7 +1027,19 @@ void GS_Generate(T_Gradient_set * ds,T_Cluster_set * cs) /// Compute best palette for given picture. -/// @param size in pixels +/// +/// The picture is first depth-reduced to the given +/// r,g,b resolution, then the median cut algorithm is used to find 256 colors which are suitable +/// for the given picture. +/// +/// @returns a conversion tree to be used for converting the picture to indexed with the generated palette (with or without dithering). +/// +/// @param image The true-color image for which the palette needs to be optimized +/// @param size in pixels (number of pixels, the height/width doesn't matter) +/// @param palette pointer to the space where the palette will be stored (256 entries at most) +/// @param r Resolution for red +/// @param g Resolution for green +/// @param b Resolution for blue CT_Tree* Optimize_palette(T_Bitmap24B image, int size, T_Components * palette, int r, int g, int b) { diff --git a/src/pages.h b/src/pages.h index f02ea4a9..47dcdff1 100644 --- a/src/pages.h +++ b/src/pages.h @@ -44,7 +44,7 @@ extern byte * FX_feedback_screen; extern T_Bitmap Main_visible_image; /// The pixels of visible layers, flattened copy, used for no-feedback effects. extern T_Bitmap Main_visible_image_backup; -/// The index of visible pixels from ::Visible image. Points to the right layer. +/// The index of visible pixels from ::Main_visible_image. Points to the right layer. extern T_Bitmap Main_visible_image_depth_buffer; /// The pixels of visible layers for the spare page, flattened copy. extern T_Bitmap Spare_visible_image;