1
0
mirror of https://frontier.innolan.net/github/AmigaExamples.git synced 2026-01-12 01:00:13 +00:00

Kinda workinng extra half brite converter

This commit is contained in:
alpine9000
2016-03-06 21:00:16 +11:00
parent bac29239be
commit 8d2a6e7f19
3 changed files with 13 additions and 4 deletions

View File

@ -17,6 +17,7 @@ usage
--output-bitplanes
--output-mask
--output-copperlist
--extra-half-brite
--use-palette <palette file>
--verbose
```
@ -71,6 +72,10 @@ Generate m68k assembler instructions to install the palette. No symbols are gene
Generate m68k assembler instructions to install a greyscale version of the palette. No symbols are generated. Registers are preserved.
**--extra-half-brite
Generate an extra half brite image. This only works in combination with --colors 32. A 32 color palette will be output, however there will be a sixth bitplane that includes the half brite control bits for any pixels that can use it.
**--use-palette** &lt;palette file>
Specify a palette file to use that will override the image or quantized palette. Overrides the --colors and --quantize options.

View File

@ -342,9 +342,13 @@ outputBitplanes(char* outFilename, imagecon_image_t* ic)
int palette_index = ic->amigaImage[(ic->width*y)+x];
int ehb = 0;
if (palette_index >= numColors) {
printf("EHB Detected %d -> ", palette_index);
if (config.verbose) {
printf("EHB Detected e%d -> ", palette_index);
}
palette_index -= numColors;
printf("%d\n", palette_index);
if (config.verbose) {
printf("%d\n", palette_index);
}
ehb = 1;
}
int _numBitPlanes = config.ehbMode ? numBitPlanes-1 : numBitPlanes;

View File

@ -1,6 +1,6 @@
#pragma once
#define MAX_PALETTE 64
#define MAX_PALETTE 32
typedef struct {
@ -32,7 +32,7 @@ typedef struct {
int height;
png_bytep* rowPointers;
unsigned char* amigaImage;
amiga_color_t palette[MAX_PALETTE];
amiga_color_t palette[MAX_PALETTE*2]; // extra half brite mode
} imagecon_image_t;