From b6e7e454ed6242475163dcd534051897d3c9158c Mon Sep 17 00:00:00 2001 From: lamp Date: Sun, 5 Mar 2023 21:25:03 +0000 Subject: init --- include/pipe.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 include/pipe.h (limited to 'include/pipe.h') diff --git a/include/pipe.h b/include/pipe.h new file mode 100644 index 0000000..2602614 --- /dev/null +++ b/include/pipe.h @@ -0,0 +1,33 @@ +#pragma once +#include +#include + +#include "defines.h" + +enum SPECIAL_SPRITES { + PIPE_TILE_TOP_LEFT, + PIPE_TILE_TOP_MIDDLE, + PIPE_TILE_TOP_RIGHT, + PIPE_TILE_BOTTOM_LEFT, + PIPE_TILE_BOTTOM_MIDDLE, + PIPE_TILE_BOTTOM_RIGHT, +}; + +enum PIPE_TILES { + CAP_LEFT, + CAP_MIDDLE, + MAIN_LEFT, + MAIN_MIDDLE, +}; + +typedef struct Pipe { + UINT8 x; + UINT8 height_of_gap; + UINT8 gap_skip; + UINT8 sprite_ids[36]; // 15 high, minus 3 tile gap, times 3 wide = 36 +} Pipe; + +inline void pipe_init(Pipe *pipe); +inline void pipe_scroll_horizontal(Pipe *pipe, ScreenCoordinate x); +inline void pipe_move_gap_height(Pipe *pipe, UINT8 gap_height); +inline void pipe_hide(Pipe *pipe); -- cgit v1.2.3