diff options
author | UnavailableDev <ggwildplay@gmail.com> | 2023-03-12 12:58:51 +0100 |
---|---|---|
committer | UnavailableDev <ggwildplay@gmail.com> | 2023-03-12 12:58:51 +0100 |
commit | 43951373604173c70bb2423dd56988b60a6704db (patch) | |
tree | 990932b86648ef13384a49ef8e19426f7c0b3216 /src/engine/draw_screen.c | |
parent | 7882ccc99d36ed225534227bd343923a7f4696c0 (diff) |
camera movement
Diffstat (limited to 'src/engine/draw_screen.c')
-rw-r--r-- | src/engine/draw_screen.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c index acf5b41..0295241 100644 --- a/src/engine/draw_screen.c +++ b/src/engine/draw_screen.c @@ -1,4 +1,5 @@ -#include "draw_screen.h" +#include "engine/draw_screen.h" +#include "engine/sprite_controller.h" uint8_t hh_world_to_tile(vec2 pos){ @@ -37,8 +38,8 @@ void hh_draw_screen(vec_cor viewport){ void hh_setup_screen(){ //(HH_map_size_X*HH_map_size_Y) - int size = 3200; // max X = 40 en max Y = 80 - FILE* level = fopen("../test/bin/test_map.bin", "rb"); /* open binary file */ + int size = 2400; // max X = 40 en max Y = 80 + FILE* level = fopen("../test/bin/level1_test.bin", "rb"); /* open binary file */ if (!level) { /* check if file opened successfully */ fprintf(stderr, "Error: Failed to open file.\n"); return; @@ -53,7 +54,7 @@ void hh_setup_screen(){ hh_ppu_update_background(BAM_index, (hh_s_ppu_loc_bam_entry){ .horizontal_flip = false, .vertical_flip = false, - .palette_index = tile[BAM_index]+1, + .palette_index = hh_get_palette(tile[BAM_index]), .tilemap_index = tile[BAM_index], }); } |