Compare commits

...

4 Commits

45 changed files with 84 additions and 22 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 B

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 B

After

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 B

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 667 B

After

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

View File

@@ -1,6 +1,6 @@
JASC-PAL
0100
61
128
255 0 255
0 0 252
120 56 0
@@ -62,3 +62,70 @@ JASC-PAL
0 192 0
0 128 0
255 255 0
255 255 255
0 0 0
0 0 0
212 172 40
196 132 8
172 104 0
148 80 0
212 172 40
196 132 8
172 104 0
148 80 0
252 0 0
132 0 0
252 132 132
252 196 196
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0

View File

@@ -112,6 +112,7 @@ namespace gamestate
salir = true;
return true;
}
return true;
}
void drawText(const int x, const int y, const uint8_t color, std::string text)
@@ -119,13 +120,12 @@ namespace gamestate
draw::surface *pic = draw::loadSurface("fuente2.gif");
draw::setSource(pic);
draw::setTrans(0);
draw::setPaletteEntry(64, 255, 255, 255);
draw::setPaletteEntry(65, 255, 0, 0);
draw::setPaletteEntry(66, 0, 255, 0);
draw::setPaletteEntry(67, 0, 0, 255);
draw::setPaletteEntry(68, 0, 0, 0);
draw::swapcol(1, color+64);
draw::swapcol(2, 68);
switch (color) {
case 0: draw::setPaletteEntry(63, 255, 255, 255); break;
case 1: draw::setPaletteEntry(63, 255, 0, 0); break;
case 2: draw::setPaletteEntry(63, 0, 255, 0); break;
case 3: draw::setPaletteEntry(63, 0, 0, 255); break;
}
const int len = text.length();
for (int i=0;i<len;++i)
{
@@ -133,8 +133,6 @@ namespace gamestate
draw::draw(x+i*7, y, 6, 6, (int(chr)-32)*7, 0);
}
draw::setTrans(255);
draw::restorecol(1);
draw::restorecol(2);
draw::freeSurface(pic);
draw::render();
}

View File

@@ -100,14 +100,14 @@ namespace gamestate
{
draw::setSource(font);
draw::setTrans(0);
for (int i=1;i<=5;++i) draw::swapcol(i, 79+i);
//for (int i=1;i<=5;++i) draw::swapcol(i, 79+i);
const int len = text.length();
for (int i=0;i<len;++i)
{
char chr = text[i];
draw::draw(x+i*7, y, 5, 5, (int(chr)-32)*7, 0);
}
for (int i=1;i<=5;++i) draw::restorecol(i);
//for (int i=1;i<=5;++i) draw::restorecol(i);
}
}

View File

@@ -135,13 +135,12 @@ namespace gamestate
draw::surface *pic = draw::loadSurface("fuente2.gif");
draw::setSource(pic);
draw::setTrans(0);
draw::setPaletteEntry(64, 255, 255, 255);
draw::setPaletteEntry(65, 255, 0, 0);
draw::setPaletteEntry(66, 0, 255, 0);
draw::setPaletteEntry(67, 0, 0, 255);
draw::setPaletteEntry(68, 0, 0, 0);
draw::swapcol(1, color+64);
draw::swapcol(2, 68);
switch (color) {
case 0: draw::setPaletteEntry(63, 255, 255, 255); break;
case 1: draw::setPaletteEntry(63, 255, 0, 0); break;
case 2: draw::setPaletteEntry(63, 0, 255, 0); break;
case 3: draw::setPaletteEntry(63, 0, 0, 255); break;
}
const int len = text.length();
for (int i=0;i<len;++i)
{
@@ -149,8 +148,6 @@ namespace gamestate
draw::draw(x+i*7, y, 6, 6, (int(chr)-32)*7, 0);
}
draw::setTrans(255);
draw::restorecol(1);
draw::restorecol(2);
draw::freeSurface(pic);
draw::render();
}

View File

@@ -141,7 +141,7 @@ namespace draw
// Copiem eixe array al nostre array de la paleta de sistema. Ara ja tenim la paleta carregada.
for (int i=0;i<256;++i) {
palette[i] = i<paletteSize ? pal[i] : pal[i] = 0;
palette[i] = i<paletteSize ? pal[i] : 0;
}
//memset(palette, 0, 1024); // Fiquem tot a 0, que la paleta potser no es de 256 i quedaria basura
//memcpy(palette, pal, paletteSize*4); // 32 bits per entrada == 4 bytes x 'paletteSize' entrades