changeset 2148:487157934904

Clarifications in comments.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 02 Jun 2019 23:12:53 +0300
parents 735b55414a1e
children 810fc98d9003
files tools/lib64gfx.h tools/libgfx.h
diffstat 2 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64gfx.h	Sun Jun 02 23:03:55 2019 +0300
+++ b/tools/lib64gfx.h	Sun Jun 02 23:12:53 2019 +0300
@@ -256,7 +256,7 @@
 
 
 //
-// Compression types and flags
+// Compression types
 //
 enum
 {
@@ -264,14 +264,16 @@
     DM_COMP_RLE_MASK        = 2, // RLE that has marker bits and lower part acts as run length
 };
 
+
+// Compression flags
 enum
 {
     DM_RLE_BYTE_RUNS        = 0x0001, // Uses one-byte run lengths
     DM_RLE_WORD_RUNS        = 0x0002, // Uses two-byte (word) run lengths
-    DM_RLE_RUNS_MASK        = 0x0003,
+    DM_RLE_RUNS_MASK        = 0x000f,
 
-    DM_RLE_ORDER_1          = 0x0000, // Order: <marker>, <count/run length>, <data>
-    DM_RLE_ORDER_2          = 0x0010, // Order: <marker>, <data>, <count/run length>
+    DM_RLE_ORDER_1          = 0x0010, // Order: <marker>, <count/run length>, <data>
+    DM_RLE_ORDER_2          = 0x0020, // Order: <marker>, <data>, <count/run length>
     DM_RLE_ORDER_MASK       = 0x00f0,
 
     DM_RLE_BACKWARDS_INPUT  = 0x0100, // Input is read backwards
@@ -288,9 +290,9 @@
 typedef struct
 {
     char *func;
-    int type;
-    int flags;
     size_t cropOutLen;
+    int type;                // DM_COMP_*
+    int flags;               //
 
     Uint8
         // DM_COMP_RLE_MARKER mode
--- a/tools/libgfx.h	Sun Jun 02 23:03:55 2019 +0300
+++ b/tools/libgfx.h	Sun Jun 02 23:12:53 2019 +0300
@@ -103,7 +103,8 @@
 {
     int  fmtid;               // DM_IMGFMT_* of target format (a bit of a kludge here)
     int  format;              // Target color format DM_COLFMT_*
-    int  scaleX, scaleY;      // Scale factors (1..)
+    int  scaleX, scaleY;      // Integer scale factors (1..)
+
     int  nplanes, bpp, mask;  // number of planes, bits per PLANE, masking
     BOOL planar;              // use planar format if the format supports it
     int  compression;         // Use compression/compression level (0 = none, 9 = max)