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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 654 additions & 939 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 6 additions & 5 deletions
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.
Lines changed: 1 addition & 1 deletion
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

Lines changed: 129 additions & 129 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)