2021-09-13 06:39:07 +02:00
|
|
|
#ifndef CONSTANTS_H
|
|
|
|
#define CONSTANTS_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* FIXME: These should be used everywhere...
|
|
|
|
* FIXME: This should include more constants!
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define SCREEN_WIDTH_TILES 40
|
|
|
|
#define SCREEN_HEIGHT_TILES 30
|
|
|
|
|
|
|
|
#define SCREEN_WIDTH_PIXELS (SCREEN_WIDTH_TILES * 8)
|
2021-10-01 18:35:28 +02:00
|
|
|
#define SCREEN_HEIGHT_PIXELS (SCREEN_HEIGHT_TILES * 8)
|
2021-09-13 06:39:07 +02:00
|
|
|
|
2021-09-25 01:37:27 +02:00
|
|
|
#define TILE_IDX(x, y) (x + y * SCREEN_WIDTH_TILES)
|
|
|
|
|
2021-09-13 06:39:07 +02:00
|
|
|
/* 4 bytes per char, for UTF-8 encoding. */
|
|
|
|
#define SCREEN_WIDTH_CHARS (SCREEN_WIDTH_TILES * 4)
|
|
|
|
|
|
|
|
#endif /* CONSTANTS_H */
|