mirror of
https://github.com/deater/tb1.git
synced 2024-06-07 05:29:28 +00:00
snes: make pcx_to_compressed_tilemap take palette argument
This commit is contained in:
parent
81e592bd31
commit
60997734cb
|
@ -37,8 +37,8 @@ static int rgb2bgr(int r,int g, int b) {
|
||||||
|
|
||||||
static char symbol_name[BUFSIZ]="temp";
|
static char symbol_name[BUFSIZ]="temp";
|
||||||
|
|
||||||
#define MAX_TILE_X 32
|
#define MAX_TILE_X 64
|
||||||
#define MAX_TILE_Y 32
|
#define MAX_TILE_Y 64
|
||||||
#define MAX_PLANES_DIV2 4
|
#define MAX_PLANES_DIV2 4
|
||||||
#define Y_SIZE 8
|
#define Y_SIZE 8
|
||||||
|
|
||||||
|
@ -49,8 +49,9 @@ static unsigned short
|
||||||
static unsigned short temp_tile[Y_SIZE][MAX_PLANES_DIV2];
|
static unsigned short temp_tile[Y_SIZE][MAX_PLANES_DIV2];
|
||||||
static int total_tiles=0;
|
static int total_tiles=0;
|
||||||
static int compressed_tiles=0;
|
static int compressed_tiles=0;
|
||||||
static int max_planes=8;
|
|
||||||
|
|
||||||
|
static int max_planes=8;
|
||||||
|
static int palette=0;
|
||||||
|
|
||||||
/* File already open */
|
/* File already open */
|
||||||
static int vmwLoadPCX(int pcx_fd) {
|
static int vmwLoadPCX(int pcx_fd) {
|
||||||
|
@ -176,7 +177,7 @@ static int vmwLoadPCX(int pcx_fd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int v=0,h=0,o=0,pal=0,found_tile=0,found=0,match;
|
int v=0,h=0,o=0,pal=palette,found_tile=0,found=0,match;
|
||||||
|
|
||||||
/* see if the new tile matches an existing one */
|
/* see if the new tile matches an existing one */
|
||||||
|
|
||||||
|
@ -353,6 +354,10 @@ int main(int argc, char **argv) {
|
||||||
max_planes=atoi(argv[2]);
|
max_planes=atoi(argv[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (argc>3) {
|
||||||
|
palette=atoi(argv[3]);
|
||||||
|
}
|
||||||
|
|
||||||
/* read from stdin */
|
/* read from stdin */
|
||||||
|
|
||||||
result=vmwLoadPCX(fileno(stdin));
|
result=vmwLoadPCX(fileno(stdin));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user