diff options
author | NielsCoding <48092678+heavydemon21@users.noreply.github.com> | 2023-04-04 15:25:34 +0200 |
---|---|---|
committer | NielsCoding <48092678+heavydemon21@users.noreply.github.com> | 2023-04-04 15:25:34 +0200 |
commit | 854a80001b9798d1454e4308e4efba96431e44d8 (patch) | |
tree | 8e023b13df43b3aaef5241e59bcbe5c90b1a2f8a /src/engine/draw_screen.c | |
parent | f6c1eb582ac44b92c86816352bd56da5a6f4f1b5 (diff) |
bullet/player/enemy/gameplay
bullet only needs different directions
player is done
enemy needs ai(Bjorn)
gameplay may need some finetuning
Diffstat (limited to 'src/engine/draw_screen.c')
-rw-r--r-- | src/engine/draw_screen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/engine/draw_screen.c b/src/engine/draw_screen.c index 823c284..74b4ff2 100644 --- a/src/engine/draw_screen.c +++ b/src/engine/draw_screen.c @@ -10,7 +10,7 @@ uint8_t hh_world_to_tile(vec2 pos){ return tile; } -void hh_update_screen(vec2 view, vec2 player){ +void hh_update_screen(vec2 view){ int current_tile_y = view.y / HH_PPU_SPRITE_HEIGHT; int current_tile_x = view.x / HH_PPU_SPRITE_WIDTH; int offset_py = view.y - (offsetY / 40 * HH_PPU_SPRITE_HEIGHT); @@ -86,7 +86,7 @@ vec_cor hh_draw_screen(vec2 player) { viewport.x = CLAMP(viewport.x, 0, level.size.x * HH_PPU_SPRITE_WIDTH - HH_PPU_SCREEN_WIDTH); viewport.y = CLAMP(viewport.y, 0, level.size.y * HH_PPU_SPRITE_HEIGHT - HH_PPU_SCREEN_HEIGHT); - hh_update_screen((vec2){.y=viewport.y,.x=viewport.x},player); + hh_update_screen((vec2){.y=viewport.y,.x=viewport.x}); if (viewport.x == previousViewport.x && viewport.y == previousViewport.y){} else{ hh_ppu_update_aux((hh_s_ppu_loc_aux){ |