diff options
| author | cflip <cflip@cflip.net> | 2022-02-27 19:37:36 -0700 | 
|---|---|---|
| committer | cflip <cflip@cflip.net> | 2022-02-27 19:37:36 -0700 | 
| commit | 8c8096dab1538592e6bacea6ba4e1f9882ae6e0b (patch) | |
| tree | 35a69e588af9ace66a5b8c0211e05167ea40428b /src/level.h | |
| parent | bba66a0ccb7281cd6c717fe9784a04a4fcf72700 (diff) | |
Miscellaneous code cleanup
Diffstat (limited to 'src/level.h')
| -rw-r--r-- | src/level.h | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/src/level.h b/src/level.h index 344d35f..948dfcb 100644 --- a/src/level.h +++ b/src/level.h @@ -1,5 +1,6 @@  #pragma once +#include "bitmap.h"  #include <cstdint>  #include <cstring> @@ -10,9 +11,13 @@ public:  	uint8_t get(int x, int y);  	void set(int x, int y, uint8_t tile); -	bool inBounds(int x, int y) { return x >= 0 && x < m_width && y >= 0 && y < m_height; } +	bool inBounds(int x, int y) const { return x >= 0 && x < m_width && y >= 0 && y < m_height; } + +	void draw(Bitmap& bitmap, int xo, int yo); +	void toggleTile(int x, int y);  private: +	Bitmap m_tileSprites;  	int m_width, m_height;  	uint8_t* m_tiles;  };  | 
