- Jo que se, moltes coses

This commit is contained in:
2024-01-29 06:59:46 +01:00
parent a690619865
commit 3832fdf5e4
13 changed files with 1068 additions and 399 deletions

35
datos/convert.cpp Normal file
View File

@@ -0,0 +1,35 @@
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
FILE *f = fopen("graf.mif", "rb");
fseek(f, 0, SEEK_END);
int size = ftell(f);
fseek(f, 0, SEEK_SET);
unsigned char *buffer = (unsigned char*)malloc(size);
fread(buffer, size, 1, f);
fclose(f);
unsigned char *p = buffer;
int num_img = *p++;
p += num_img*8;
for (int i=0; i<num_img; ++i)
{
p += 64000;
for (int j=0; j<768; ++j)
{
unsigned char color = *p;
*p = color << 2;
p++;
}
}
f = fopen("graf.mif", "wb");
fwrite(buffer, size, 1, f);
fclose(f);
free(buffer);
return 0;
}

File diff suppressed because one or more lines are too long

BIN
datos/sprites.dat Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB