aboutsummaryrefslogtreecommitdiff
path: root/game/src
diff options
context:
space:
mode:
authorPedro de Medeiros <pedro.medeiros@gmail.com>2022-01-07 15:53:15 -0300
committerPedro de Medeiros <pedro.medeiros@gmail.com>2022-01-07 15:59:19 -0300
commitce3c89948e6fc3c7234e8f47e048d74f917e6bf9 (patch)
treed9e29728697bc3ccf34d322a29a7e9b47e6ea2b0 /game/src
parentc149e9f96d9f6901656a2dfe4482bb8b45f1f62b (diff)
downloadubox-msx-lib-ce3c89948e6fc3c7234e8f47e048d74f917e6bf9.tar.gz
ubox-msx-lib-ce3c89948e6fc3c7234e8f47e048d74f917e6bf9.zip
Replacing VRAM magic numbers with constants
Diffstat (limited to 'game/src')
-rw-r--r--game/src/game.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/game/src/game.c b/game/src/game.c
index d4942c1..62d5edb 100644
--- a/game/src/game.c
+++ b/game/src/game.c
@@ -17,6 +17,8 @@
#include "player.h"
#include "enemy.h"
+#define BG_TILE_MAP 0x1800
+
void init_map_entities()
{
const uint8_t *m = cur_map;
@@ -91,7 +93,7 @@ void draw_map()
// so we do it in one call by coping our map to the backtround tile map
// addr in the VDP VRAM
ubox_wait_vsync();
- ubox_write_vm((uint8_t *)0x1800, MAP_W * MAP_H, cur_map_data);
+ ubox_write_vm((uint8_t *)BG_TILE_MAP, MAP_W * MAP_H, cur_map_data);
}
void draw_hud()