Skip to content

Commit 8273e9b

Browse files
Much better compression stuff
1 parent fe26915 commit 8273e9b

File tree

19 files changed

+2023
-2266
lines changed

19 files changed

+2023
-2266
lines changed

CEdev/bin/main_makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LIBHEADER_ASM := libheader.asm
77
#----------------------------
88

99
SHELL := cmd.exe
10-
VERSION := 6.7
10+
VERSION := 6.8
1111

1212
#----------------------------
1313
# Try not to edit anything below these lines unless you know what you are doing
Binary file not shown.

CEdev/examples/library_examples/graphics/demo_5/src/gfx/all_gfx.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#define all_gfx_H
55
#include <stdint.h>
66

7-
extern uint8_t apple_data_compressed[29966];
7+
extern uint8_t apple_compressed[20881];
88
extern uint16_t all_gfx_pal[256];
99

1010
#endif

CEdev/examples/library_examples/graphics/demo_5/src/gfx/apple.c

+654-939
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#GroupC : all_gfx
2-
#Compression : lz77
2+
#Compression : zx7
33
#PNGImages :
44
apple

CEdev/examples/library_examples/graphics/demo_5/src/gfx/convpng.log

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Building palette with [256] available indices ...
55
Built palette with [256] indices.
66
Palette quality : 95.62%
77
1:
8-
apple : 95.39% (compress: 52802 -> 29966 bytes)
8+
apple : 95.39% (compress: 52802 -> 20881 bytes)
99

10-
Converted in 2 s
10+
Converted in 1 s
1111

1212
Finished!

CEdev/examples/library_examples/graphics/demo_5/src/main.c

+6-5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
#include <stdlib.h>
1111
#include <string.h>
1212

13+
/* Decompression functions */
14+
#include <decompress.h>
15+
1316
/* Shared libraries */
1417
#include <lib/ce/graphx.h>
1518
#include "gfx/all_gfx.h"
@@ -25,18 +28,16 @@ void main(void) {
2528
/* Allocate space for the decompressed sprite */
2629
apple = gfx_MallocSprite( 220, 240 );
2730

31+
/* Decompress the sprite */
32+
dzx7_Standard( apple_compressed, apple ); // or dzx7_Turbo
33+
2834
/* Initialize the 8bpp graphics */
2935
gfx_Begin( gfx_8bpp );
3036

3137
/* Set up the palette */
3238
gfx_SetPalette( all_gfx_pal, sizeof(all_gfx_pal), 0 );
33-
34-
/* Looking at the output palette, this color is white */
3539
gfx_FillScreen( 0x00 );
3640

37-
/* Decompress the sprite */
38-
gfx_LZDecompressSprite( apple_data_compressed, apple );
39-
4041
/* Draw the decompressed sprite */
4142
gfx_Sprite( apple, (320 - 220) / 2, (240 - 240) / 2);
4243

Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#GroupC : tiles_gfx
22
#TranspColor : 255,201,14,255
3-
#Compression : lz77
3+
#Compression : zx7
44
#Tilemap : 16,16,true
55
#PNGImages :
66
tileset

CEdev/examples/library_examples/graphics/demo_7/src/gfx/convpng.log

+129-129
Large diffs are not rendered by default.

CEdev/examples/library_examples/graphics/demo_7/src/gfx/tiles_gfx.h

+129-129
Original file line numberDiff line numberDiff line change
@@ -6,135 +6,135 @@
66

77
#define tiles_gfx_transpcolor_index 0
88

9-
extern uint8_t tileset_tile_0_data_compressed[];
10-
extern uint8_t tileset_tile_1_data_compressed[];
11-
extern uint8_t tileset_tile_2_data_compressed[];
12-
extern uint8_t tileset_tile_3_data_compressed[];
13-
extern uint8_t tileset_tile_4_data_compressed[];
14-
extern uint8_t tileset_tile_5_data_compressed[];
15-
extern uint8_t tileset_tile_6_data_compressed[];
16-
extern uint8_t tileset_tile_7_data_compressed[];
17-
extern uint8_t tileset_tile_8_data_compressed[];
18-
extern uint8_t tileset_tile_9_data_compressed[];
19-
extern uint8_t tileset_tile_10_data_compressed[];
20-
extern uint8_t tileset_tile_11_data_compressed[];
21-
extern uint8_t tileset_tile_12_data_compressed[];
22-
extern uint8_t tileset_tile_13_data_compressed[];
23-
extern uint8_t tileset_tile_14_data_compressed[];
24-
extern uint8_t tileset_tile_15_data_compressed[];
25-
extern uint8_t tileset_tile_16_data_compressed[];
26-
extern uint8_t tileset_tile_17_data_compressed[];
27-
extern uint8_t tileset_tile_18_data_compressed[];
28-
extern uint8_t tileset_tile_19_data_compressed[];
29-
extern uint8_t tileset_tile_20_data_compressed[];
30-
extern uint8_t tileset_tile_21_data_compressed[];
31-
extern uint8_t tileset_tile_22_data_compressed[];
32-
extern uint8_t tileset_tile_23_data_compressed[];
33-
extern uint8_t tileset_tile_24_data_compressed[];
34-
extern uint8_t tileset_tile_25_data_compressed[];
35-
extern uint8_t tileset_tile_26_data_compressed[];
36-
extern uint8_t tileset_tile_27_data_compressed[];
37-
extern uint8_t tileset_tile_28_data_compressed[];
38-
extern uint8_t tileset_tile_29_data_compressed[];
39-
extern uint8_t tileset_tile_30_data_compressed[];
40-
extern uint8_t tileset_tile_31_data_compressed[];
41-
extern uint8_t tileset_tile_32_data_compressed[];
42-
extern uint8_t tileset_tile_33_data_compressed[];
43-
extern uint8_t tileset_tile_34_data_compressed[];
44-
extern uint8_t tileset_tile_35_data_compressed[];
45-
extern uint8_t tileset_tile_36_data_compressed[];
46-
extern uint8_t tileset_tile_37_data_compressed[];
47-
extern uint8_t tileset_tile_38_data_compressed[];
48-
extern uint8_t tileset_tile_39_data_compressed[];
49-
extern uint8_t tileset_tile_40_data_compressed[];
50-
extern uint8_t tileset_tile_41_data_compressed[];
51-
extern uint8_t tileset_tile_42_data_compressed[];
52-
extern uint8_t tileset_tile_43_data_compressed[];
53-
extern uint8_t tileset_tile_44_data_compressed[];
54-
extern uint8_t tileset_tile_45_data_compressed[];
55-
extern uint8_t tileset_tile_46_data_compressed[];
56-
extern uint8_t tileset_tile_47_data_compressed[];
57-
extern uint8_t tileset_tile_48_data_compressed[];
58-
extern uint8_t tileset_tile_49_data_compressed[];
59-
extern uint8_t tileset_tile_50_data_compressed[];
60-
extern uint8_t tileset_tile_51_data_compressed[];
61-
extern uint8_t tileset_tile_52_data_compressed[];
62-
extern uint8_t tileset_tile_53_data_compressed[];
63-
extern uint8_t tileset_tile_54_data_compressed[];
64-
extern uint8_t tileset_tile_55_data_compressed[];
65-
extern uint8_t tileset_tile_56_data_compressed[];
66-
extern uint8_t tileset_tile_57_data_compressed[];
67-
extern uint8_t tileset_tile_58_data_compressed[];
68-
extern uint8_t tileset_tile_59_data_compressed[];
69-
extern uint8_t tileset_tile_60_data_compressed[];
70-
extern uint8_t tileset_tile_61_data_compressed[];
71-
extern uint8_t tileset_tile_62_data_compressed[];
72-
extern uint8_t tileset_tile_63_data_compressed[];
73-
extern uint8_t tileset_tile_64_data_compressed[];
74-
extern uint8_t tileset_tile_65_data_compressed[];
75-
extern uint8_t tileset_tile_66_data_compressed[];
76-
extern uint8_t tileset_tile_67_data_compressed[];
77-
extern uint8_t tileset_tile_68_data_compressed[];
78-
extern uint8_t tileset_tile_69_data_compressed[];
79-
extern uint8_t tileset_tile_70_data_compressed[];
80-
extern uint8_t tileset_tile_71_data_compressed[];
81-
extern uint8_t tileset_tile_72_data_compressed[];
82-
extern uint8_t tileset_tile_73_data_compressed[];
83-
extern uint8_t tileset_tile_74_data_compressed[];
84-
extern uint8_t tileset_tile_75_data_compressed[];
85-
extern uint8_t tileset_tile_76_data_compressed[];
86-
extern uint8_t tileset_tile_77_data_compressed[];
87-
extern uint8_t tileset_tile_78_data_compressed[];
88-
extern uint8_t tileset_tile_79_data_compressed[];
89-
extern uint8_t tileset_tile_80_data_compressed[];
90-
extern uint8_t tileset_tile_81_data_compressed[];
91-
extern uint8_t tileset_tile_82_data_compressed[];
92-
extern uint8_t tileset_tile_83_data_compressed[];
93-
extern uint8_t tileset_tile_84_data_compressed[];
94-
extern uint8_t tileset_tile_85_data_compressed[];
95-
extern uint8_t tileset_tile_86_data_compressed[];
96-
extern uint8_t tileset_tile_87_data_compressed[];
97-
extern uint8_t tileset_tile_88_data_compressed[];
98-
extern uint8_t tileset_tile_89_data_compressed[];
99-
extern uint8_t tileset_tile_90_data_compressed[];
100-
extern uint8_t tileset_tile_91_data_compressed[];
101-
extern uint8_t tileset_tile_92_data_compressed[];
102-
extern uint8_t tileset_tile_93_data_compressed[];
103-
extern uint8_t tileset_tile_94_data_compressed[];
104-
extern uint8_t tileset_tile_95_data_compressed[];
105-
extern uint8_t tileset_tile_96_data_compressed[];
106-
extern uint8_t tileset_tile_97_data_compressed[];
107-
extern uint8_t tileset_tile_98_data_compressed[];
108-
extern uint8_t tileset_tile_99_data_compressed[];
109-
extern uint8_t tileset_tile_100_data_compressed[];
110-
extern uint8_t tileset_tile_101_data_compressed[];
111-
extern uint8_t tileset_tile_102_data_compressed[];
112-
extern uint8_t tileset_tile_103_data_compressed[];
113-
extern uint8_t tileset_tile_104_data_compressed[];
114-
extern uint8_t tileset_tile_105_data_compressed[];
115-
extern uint8_t tileset_tile_106_data_compressed[];
116-
extern uint8_t tileset_tile_107_data_compressed[];
117-
extern uint8_t tileset_tile_108_data_compressed[];
118-
extern uint8_t tileset_tile_109_data_compressed[];
119-
extern uint8_t tileset_tile_110_data_compressed[];
120-
extern uint8_t tileset_tile_111_data_compressed[];
121-
extern uint8_t tileset_tile_112_data_compressed[];
122-
extern uint8_t tileset_tile_113_data_compressed[];
123-
extern uint8_t tileset_tile_114_data_compressed[];
124-
extern uint8_t tileset_tile_115_data_compressed[];
125-
extern uint8_t tileset_tile_116_data_compressed[];
126-
extern uint8_t tileset_tile_117_data_compressed[];
127-
extern uint8_t tileset_tile_118_data_compressed[];
128-
extern uint8_t tileset_tile_119_data_compressed[];
129-
extern uint8_t tileset_tile_120_data_compressed[];
130-
extern uint8_t tileset_tile_121_data_compressed[];
131-
extern uint8_t tileset_tile_122_data_compressed[];
132-
extern uint8_t tileset_tile_123_data_compressed[];
133-
extern uint8_t tileset_tile_124_data_compressed[];
134-
extern uint8_t tileset_tile_125_data_compressed[];
135-
extern uint8_t tileset_tile_126_data_compressed[];
136-
extern uint8_t tileset_tile_127_data_compressed[];
137-
extern uint8_t *tileset_tiles_data_compressed[128];
9+
extern uint8_t tileset_tile_0_compressed[];
10+
extern uint8_t tileset_tile_1_compressed[];
11+
extern uint8_t tileset_tile_2_compressed[];
12+
extern uint8_t tileset_tile_3_compressed[];
13+
extern uint8_t tileset_tile_4_compressed[];
14+
extern uint8_t tileset_tile_5_compressed[];
15+
extern uint8_t tileset_tile_6_compressed[];
16+
extern uint8_t tileset_tile_7_compressed[];
17+
extern uint8_t tileset_tile_8_compressed[];
18+
extern uint8_t tileset_tile_9_compressed[];
19+
extern uint8_t tileset_tile_10_compressed[];
20+
extern uint8_t tileset_tile_11_compressed[];
21+
extern uint8_t tileset_tile_12_compressed[];
22+
extern uint8_t tileset_tile_13_compressed[];
23+
extern uint8_t tileset_tile_14_compressed[];
24+
extern uint8_t tileset_tile_15_compressed[];
25+
extern uint8_t tileset_tile_16_compressed[];
26+
extern uint8_t tileset_tile_17_compressed[];
27+
extern uint8_t tileset_tile_18_compressed[];
28+
extern uint8_t tileset_tile_19_compressed[];
29+
extern uint8_t tileset_tile_20_compressed[];
30+
extern uint8_t tileset_tile_21_compressed[];
31+
extern uint8_t tileset_tile_22_compressed[];
32+
extern uint8_t tileset_tile_23_compressed[];
33+
extern uint8_t tileset_tile_24_compressed[];
34+
extern uint8_t tileset_tile_25_compressed[];
35+
extern uint8_t tileset_tile_26_compressed[];
36+
extern uint8_t tileset_tile_27_compressed[];
37+
extern uint8_t tileset_tile_28_compressed[];
38+
extern uint8_t tileset_tile_29_compressed[];
39+
extern uint8_t tileset_tile_30_compressed[];
40+
extern uint8_t tileset_tile_31_compressed[];
41+
extern uint8_t tileset_tile_32_compressed[];
42+
extern uint8_t tileset_tile_33_compressed[];
43+
extern uint8_t tileset_tile_34_compressed[];
44+
extern uint8_t tileset_tile_35_compressed[];
45+
extern uint8_t tileset_tile_36_compressed[];
46+
extern uint8_t tileset_tile_37_compressed[];
47+
extern uint8_t tileset_tile_38_compressed[];
48+
extern uint8_t tileset_tile_39_compressed[];
49+
extern uint8_t tileset_tile_40_compressed[];
50+
extern uint8_t tileset_tile_41_compressed[];
51+
extern uint8_t tileset_tile_42_compressed[];
52+
extern uint8_t tileset_tile_43_compressed[];
53+
extern uint8_t tileset_tile_44_compressed[];
54+
extern uint8_t tileset_tile_45_compressed[];
55+
extern uint8_t tileset_tile_46_compressed[];
56+
extern uint8_t tileset_tile_47_compressed[];
57+
extern uint8_t tileset_tile_48_compressed[];
58+
extern uint8_t tileset_tile_49_compressed[];
59+
extern uint8_t tileset_tile_50_compressed[];
60+
extern uint8_t tileset_tile_51_compressed[];
61+
extern uint8_t tileset_tile_52_compressed[];
62+
extern uint8_t tileset_tile_53_compressed[];
63+
extern uint8_t tileset_tile_54_compressed[];
64+
extern uint8_t tileset_tile_55_compressed[];
65+
extern uint8_t tileset_tile_56_compressed[];
66+
extern uint8_t tileset_tile_57_compressed[];
67+
extern uint8_t tileset_tile_58_compressed[];
68+
extern uint8_t tileset_tile_59_compressed[];
69+
extern uint8_t tileset_tile_60_compressed[];
70+
extern uint8_t tileset_tile_61_compressed[];
71+
extern uint8_t tileset_tile_62_compressed[];
72+
extern uint8_t tileset_tile_63_compressed[];
73+
extern uint8_t tileset_tile_64_compressed[];
74+
extern uint8_t tileset_tile_65_compressed[];
75+
extern uint8_t tileset_tile_66_compressed[];
76+
extern uint8_t tileset_tile_67_compressed[];
77+
extern uint8_t tileset_tile_68_compressed[];
78+
extern uint8_t tileset_tile_69_compressed[];
79+
extern uint8_t tileset_tile_70_compressed[];
80+
extern uint8_t tileset_tile_71_compressed[];
81+
extern uint8_t tileset_tile_72_compressed[];
82+
extern uint8_t tileset_tile_73_compressed[];
83+
extern uint8_t tileset_tile_74_compressed[];
84+
extern uint8_t tileset_tile_75_compressed[];
85+
extern uint8_t tileset_tile_76_compressed[];
86+
extern uint8_t tileset_tile_77_compressed[];
87+
extern uint8_t tileset_tile_78_compressed[];
88+
extern uint8_t tileset_tile_79_compressed[];
89+
extern uint8_t tileset_tile_80_compressed[];
90+
extern uint8_t tileset_tile_81_compressed[];
91+
extern uint8_t tileset_tile_82_compressed[];
92+
extern uint8_t tileset_tile_83_compressed[];
93+
extern uint8_t tileset_tile_84_compressed[];
94+
extern uint8_t tileset_tile_85_compressed[];
95+
extern uint8_t tileset_tile_86_compressed[];
96+
extern uint8_t tileset_tile_87_compressed[];
97+
extern uint8_t tileset_tile_88_compressed[];
98+
extern uint8_t tileset_tile_89_compressed[];
99+
extern uint8_t tileset_tile_90_compressed[];
100+
extern uint8_t tileset_tile_91_compressed[];
101+
extern uint8_t tileset_tile_92_compressed[];
102+
extern uint8_t tileset_tile_93_compressed[];
103+
extern uint8_t tileset_tile_94_compressed[];
104+
extern uint8_t tileset_tile_95_compressed[];
105+
extern uint8_t tileset_tile_96_compressed[];
106+
extern uint8_t tileset_tile_97_compressed[];
107+
extern uint8_t tileset_tile_98_compressed[];
108+
extern uint8_t tileset_tile_99_compressed[];
109+
extern uint8_t tileset_tile_100_compressed[];
110+
extern uint8_t tileset_tile_101_compressed[];
111+
extern uint8_t tileset_tile_102_compressed[];
112+
extern uint8_t tileset_tile_103_compressed[];
113+
extern uint8_t tileset_tile_104_compressed[];
114+
extern uint8_t tileset_tile_105_compressed[];
115+
extern uint8_t tileset_tile_106_compressed[];
116+
extern uint8_t tileset_tile_107_compressed[];
117+
extern uint8_t tileset_tile_108_compressed[];
118+
extern uint8_t tileset_tile_109_compressed[];
119+
extern uint8_t tileset_tile_110_compressed[];
120+
extern uint8_t tileset_tile_111_compressed[];
121+
extern uint8_t tileset_tile_112_compressed[];
122+
extern uint8_t tileset_tile_113_compressed[];
123+
extern uint8_t tileset_tile_114_compressed[];
124+
extern uint8_t tileset_tile_115_compressed[];
125+
extern uint8_t tileset_tile_116_compressed[];
126+
extern uint8_t tileset_tile_117_compressed[];
127+
extern uint8_t tileset_tile_118_compressed[];
128+
extern uint8_t tileset_tile_119_compressed[];
129+
extern uint8_t tileset_tile_120_compressed[];
130+
extern uint8_t tileset_tile_121_compressed[];
131+
extern uint8_t tileset_tile_122_compressed[];
132+
extern uint8_t tileset_tile_123_compressed[];
133+
extern uint8_t tileset_tile_124_compressed[];
134+
extern uint8_t tileset_tile_125_compressed[];
135+
extern uint8_t tileset_tile_126_compressed[];
136+
extern uint8_t tileset_tile_127_compressed[];
137+
extern uint8_t *tileset_tiles_compressed[128];
138138
extern uint16_t tiles_gfx_pal[76];
139139

140140
#endif

0 commit comments

Comments
 (0)