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:
@ -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** <palette file>
|
||||
|
||||
Specify a palette file to use that will override the image or quantized palette. Overrides the --colors and --quantize options.
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user