libansilove

Library for converting ANSI, ASCII, and other formats to PNG
Log | Files | Refs | README | LICENSE

commit b5595d09938a1ae0ec9974c3fdf24ba15d1ef91a
parent 6be11834084b631b7af607a45143545d0514a754
Author: Frederic Cambus <fred@statdns.com>
Date:   Sat, 26 Sep 2020 00:05:15 +0200

Correct values for TUNDRA_COLOR_FOREGROUND and TUNDRA_COLOR_BACKGROUND macros.

No functional change.

Diffstat:
Msrc/loaders/tundra.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/loaders/tundra.c b/src/loaders/tundra.c @@ -25,8 +25,8 @@ #define TUNDRA_HEADER_LENGTH 9 /* 8 + 1 */ #define TUNDRA_POSITION 1 -#define TUNDRA_COLOR_BACKGROUND 2 -#define TUNDRA_COLOR_FOREGROUND 4 +#define TUNDRA_COLOR_FOREGROUND 2 +#define TUNDRA_COLOR_BACKGROUND 4 #define TUNDRA_COLOR_BOTH 6 int @@ -94,12 +94,12 @@ ansilove_tundra(struct ansilove_ctx *ctx, struct ansilove_options *options) loop += 8; break; - case TUNDRA_COLOR_BACKGROUND: + case TUNDRA_COLOR_FOREGROUND: loop += 5; column++; break; - case TUNDRA_COLOR_FOREGROUND: + case TUNDRA_COLOR_BACKGROUND: loop += 5; column++; break; @@ -156,7 +156,7 @@ ansilove_tundra(struct ansilove_ctx *ctx, struct ansilove_options *options) loop += 8; break; - case TUNDRA_COLOR_BACKGROUND: + case TUNDRA_COLOR_FOREGROUND: foreground = (ctx->buffer[loop + 3] << 16) + (ctx->buffer[loop + 4] << 8) + @@ -167,7 +167,7 @@ ansilove_tundra(struct ansilove_ctx *ctx, struct ansilove_options *options) loop += 5; break; - case TUNDRA_COLOR_FOREGROUND: + case TUNDRA_COLOR_BACKGROUND: background = (ctx->buffer[loop + 3] << 16) + (ctx->buffer[loop + 4] << 8) + ctx->buffer[loop + 5];