summaryrefslogtreecommitdiff
path: root/game/src
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2021-01-09 09:42:24 +0000
committerJuan J. Martinez <jjm@usebox.net>2021-01-09 09:42:24 +0000
commitac092732fc2e79902d85706e117da95163dd3c9f (patch)
tree2e204d08cdd4b2669ba83f624466ccec793ceb3f /game/src
parent3713f545e4c3e8f2f603be966dec919f27c469a5 (diff)
downloadubox-msx-lib-ac092732fc2e79902d85706e117da95163dd3c9f.tar.gz
ubox-msx-lib-ac092732fc2e79902d85706e117da95163dd3c9f.zip
Added compression to the map
Diffstat (limited to 'game/src')
-rw-r--r--game/src/Makefile2
-rw-r--r--game/src/game.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/game/src/Makefile b/game/src/Makefile
index 32354fd..f05d1fa 100644
--- a/game/src/Makefile
+++ b/game/src/Makefile
@@ -10,7 +10,7 @@ ROM_MAX = 8000
OUTPUT = ../build
OBJS = $(patsubst %.c,$(OUTPUT)/%.rel,$(wildcard *.c)) $(OUTPUT)/akm.rel
UBOX_LIBS = $(wildcard ../../lib/*.lib)
-LIBS = -lubox -lspman -lmplayer
+LIBS = -lubox -lspman -lmplayer -lap
CC = sdcc
AS = sdasz80
diff --git a/game/src/game.c b/game/src/game.c
index f5f5970..5bfeffb 100644
--- a/game/src/game.c
+++ b/game/src/game.c
@@ -4,6 +4,7 @@
#include "ubox.h"
#include "spman.h"
#include "mplayer.h"
+#include "ap.h"
#include "helpers.h"
#include "main.h"
@@ -383,9 +384,9 @@ void run_game()
// we only have one map, select it
cur_map = map[0];
- // copy map data into RAM, we will modify it
+ // uncompress map data into RAM, we will modify it
// map data starts on byte 3 (skip map data size and entities size)
- memcpy(cur_map_data, cur_map + 3, MAP_W * MAP_H);
+ ap_uncompress(cur_map_data, cur_map + 3);
// init entities before drawing
init_map_entities();