Compare commits
4 Commits
572dff8dbb
...
3db23c32ed
| Author | SHA1 | Date | |
|---|---|---|---|
| 3db23c32ed | |||
| dbd4912b04 | |||
| b3d0a10a23 | |||
| 273a672542 |
BIN
data/SEQ11.GIF
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.0 KiB |
BIN
data/SEQ12.GIF
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.0 KiB |
BIN
data/SEQ13.GIF
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.6 KiB |
BIN
data/SEQ14.GIF
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.3 KiB |
BIN
data/SEQ21.GIF
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 3.8 KiB |
BIN
data/SEQ22.GIF
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
data/SEQ31.GIF
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.2 KiB |
BIN
data/SEQ32.GIF
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.6 KiB |
BIN
data/SEQ41.GIF
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 6.6 KiB |
BIN
data/SEQ42.GIF
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.8 KiB |
BIN
data/SEQ51.GIF
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.4 KiB |
BIN
data/SEQ52.GIF
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
data/SEQ61.GIF
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.0 KiB |
BIN
data/SEQ71.GIF
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.6 KiB |
BIN
data/SEQ72.GIF
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 3.4 KiB |
BIN
data/SEQ73.GIF
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.0 KiB |
BIN
data/SEQ74.GIF
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.3 KiB |
BIN
data/aigua.gif
|
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 513 B |
BIN
data/black.gif
|
Before Width: | Height: | Size: 379 B |
BIN
data/boto.gif
|
Before Width: | Height: | Size: 79 B After Width: | Height: | Size: 280 B |
BIN
data/crono.gif
|
Before Width: | Height: | Size: 203 B |
BIN
data/cursor.gif
|
Before Width: | Height: | Size: 838 B After Width: | Height: | Size: 255 B |
BIN
data/final01.GIF
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 6.8 KiB |
BIN
data/final02.GIF
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 4.5 KiB |
BIN
data/final03.GIF
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 4.7 KiB |
BIN
data/final04.GIF
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.1 KiB |
BIN
data/final05.GIF
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.6 KiB |
BIN
data/fuente1.gif
|
Before Width: | Height: | Size: 405 B After Width: | Height: | Size: 789 B |
BIN
data/intro01.GIF
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
data/intro02.GIF
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.1 KiB |
BIN
data/intro03.GIF
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.0 KiB |
BIN
data/intro04.GIF
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
data/intro05.GIF
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.2 KiB |
BIN
data/intro06.GIF
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 4.6 KiB |
BIN
data/marca.gif
|
Before Width: | Height: | Size: 66 B After Width: | Height: | Size: 265 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
data/menu.gif
|
Before Width: | Height: | Size: 345 B After Width: | Height: | Size: 754 B |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.3 KiB |
BIN
data/mort.gif
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.1 KiB |
BIN
data/prefase.gif
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.5 KiB |
BIN
data/puerta.gif
|
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 304 B |
BIN
data/sprites.gif
|
Before Width: | Height: | Size: 466 B After Width: | Height: | Size: 667 B |
BIN
data/tiles.gif
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
11
source/gamestate_play.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "gamestates.h"
|
||||
#include "jgame.h"
|
||||
#include <string>
|
||||
|
||||
namespace gamestate
|
||||
{
|
||||
namespace play
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -5,5 +5,6 @@ namespace gamestate
|
||||
namespace sequence { void init(); }
|
||||
namespace menu { void init(); }
|
||||
namespace prefase { void init(); }
|
||||
namespace play { void init(); }
|
||||
namespace postfase { void init(); }
|
||||
}
|
||||
|
||||
64
tools/paleta.pal
Normal file
@@ -0,0 +1,64 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
61
|
||||
255 0 255
|
||||
0 0 252
|
||||
120 56 0
|
||||
228 188 140
|
||||
228 252 196
|
||||
252 0 0
|
||||
252 132 132
|
||||
252 252 252
|
||||
0 0 132
|
||||
0 132 0
|
||||
24 24 24
|
||||
40 40 40
|
||||
132 80 0
|
||||
132 132 132
|
||||
188 188 188
|
||||
196 196 252
|
||||
220 220 220
|
||||
164 164 164
|
||||
252 252 0
|
||||
140 140 140
|
||||
0 0 196
|
||||
132 132 252
|
||||
140 80 48
|
||||
196 0 0
|
||||
0 196 0
|
||||
212 156 88
|
||||
0 252 0
|
||||
172 104 0
|
||||
64 64 64
|
||||
196 196 196
|
||||
228 172 104
|
||||
112 112 112
|
||||
204 204 204
|
||||
56 56 56
|
||||
156 156 156
|
||||
196 132 8
|
||||
8 8 8
|
||||
148 80 0
|
||||
0 16 81
|
||||
0 8 42
|
||||
56 62 88
|
||||
8 42 0
|
||||
13 63 0
|
||||
81 65 0
|
||||
84 51 34
|
||||
81 81 81
|
||||
64 64 252
|
||||
132 0 0
|
||||
164 88 24
|
||||
196 228 252
|
||||
212 148 80
|
||||
148 148 148
|
||||
255 196 0
|
||||
255 172 0
|
||||
255 132 0
|
||||
88 72 72
|
||||
0 0 64
|
||||
252 196 196
|
||||
0 192 0
|
||||
0 128 0
|
||||
255 255 0
|
||||
101
tools/paletter.cpp
Normal file
@@ -0,0 +1,101 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
#include "../source/gif.c"
|
||||
|
||||
#define NUM_RESOURCES 39
|
||||
|
||||
const char *resources[NUM_RESOURCES] = {
|
||||
"../data/final01.GIF",
|
||||
"../data/final02.GIF",
|
||||
"../data/final03.GIF",
|
||||
"../data/final04.GIF",
|
||||
"../data/final05.GIF",
|
||||
"../data/intro01.GIF",
|
||||
"../data/intro02.GIF",
|
||||
"../data/intro03.GIF",
|
||||
"../data/intro04.GIF",
|
||||
"../data/intro05.GIF",
|
||||
"../data/intro06.GIF",
|
||||
"../data/menuprin.gif",
|
||||
"../data/mort.gif",
|
||||
"../data/postfase.gif",
|
||||
"../data/prefase.gif",
|
||||
"../data/SEQ11.GIF",
|
||||
"../data/SEQ12.GIF",
|
||||
"../data/SEQ13.GIF",
|
||||
"../data/SEQ14.GIF",
|
||||
"../data/SEQ21.GIF",
|
||||
"../data/SEQ22.GIF",
|
||||
"../data/SEQ31.GIF",
|
||||
"../data/SEQ32.GIF",
|
||||
"../data/SEQ41.GIF",
|
||||
"../data/SEQ42.GIF",
|
||||
"../data/SEQ51.GIF",
|
||||
"../data/SEQ52.GIF",
|
||||
"../data/SEQ61.GIF",
|
||||
"../data/SEQ71.GIF",
|
||||
"../data/SEQ72.GIF",
|
||||
"../data/SEQ73.GIF",
|
||||
"../data/SEQ74.GIF",
|
||||
"../data/tiles.gif",
|
||||
"../data/boto.gif",
|
||||
"../data/marca.gif",
|
||||
"../data/marcador.gif",
|
||||
"../data/puerta.gif",
|
||||
"../data/sprites.gif",
|
||||
"../data/aigua.gif"
|
||||
};
|
||||
|
||||
uint32_t main_palette[256];
|
||||
int num_entries = 0;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
for (int i=0; i<256; ++i) main_palette[i]=0;
|
||||
|
||||
for (int i = 0; i<NUM_RESOURCES; ++i)
|
||||
{
|
||||
const char *resourcename = resources[i];
|
||||
FILE *f = fopen(resourcename, "rb");
|
||||
fseek(f, 0, SEEK_END);
|
||||
int filesize = ftell(f);
|
||||
fseek(f, 0, SEEK_SET);
|
||||
uint8_t *buffer = (uint8_t *)malloc(filesize);
|
||||
fread(buffer, filesize, 1, f);
|
||||
fclose(f);
|
||||
uint16_t w, h;
|
||||
uint8_t *pixels = LoadGif(buffer, &w, &h);
|
||||
int paletteSize;
|
||||
uint32_t *pal = LoadPalette(buffer, &paletteSize);
|
||||
free(buffer);
|
||||
|
||||
bool used[256];
|
||||
for (int i=0; i<256; ++i) used[i] = false;
|
||||
|
||||
for (int y=0; y<h; ++y)
|
||||
for (int x=0; x<w; ++x)
|
||||
used[pixels[x+y*w]] = true;
|
||||
|
||||
for (int i=0; i<256; ++i)
|
||||
if (used[i])
|
||||
{
|
||||
bool found = false;
|
||||
for (int j=0; j<256; ++j) if (main_palette[j] == pal[i]) found = true;
|
||||
if (!found) main_palette[num_entries++] = pal[i];
|
||||
}
|
||||
free(pixels);
|
||||
free(pal);
|
||||
}
|
||||
printf("Num entries: %i\n", num_entries);
|
||||
|
||||
FILE *f = fopen("paleta.pal", "w");
|
||||
fprintf(f, "JASC-PAL\n");
|
||||
fprintf(f, "0100\n");
|
||||
fprintf(f, "%i\n", num_entries);
|
||||
for (int i=0; i<num_entries; ++i) fprintf(f, "%i %i %i\n", (main_palette[i]>>16)&0xff, (main_palette[i]>>8)&0xff, main_palette[i]&0xff);
|
||||
fclose(f);
|
||||
|
||||
return 0;
|
||||
}
|
||||