move some definitions outside of utility.h

This commit is contained in:
hkz 2025-10-15 07:38:55 +02:00
commit 3219687fd7
4 changed files with 11 additions and 6 deletions

8
src/hgr_graphics.h Normal file
View file

@ -0,0 +1,8 @@
#ifndef _HGR_GRAPHICS_HEADER_
#define _HGR_GRAPHICS_HEADER_
#define SCREEN_HEIGHT 192
#define SCREEN_WIDTH_BYTES 128
#define BYTES_PER_LINE 40
#endif /* _HGR_GRAPHICS_HEADER_ */

View file

@ -1,6 +1,6 @@
#include <stdint.h>
#include "utility.h"
#include "hgr_graphics.h"
const uint16_t line_offset_map[SCREEN_HEIGHT] = {
0x0000, 0x0400, 0x0800, 0x0C00, 0x1000, 0x1400, 0x1800, 0x1C00, 0x0080, 0x0480, 0x0880, 0x0C80,

View file

@ -2,7 +2,8 @@
#define _HGR_LINE_DATA_HEADER_
#include <stdint.h>
#include "utility.h"
#include "hgr_graphics.h"
extern const uint16_t line_offset_map[SCREEN_HEIGHT];

View file

@ -3,10 +3,6 @@
#include <stdint.h>
#define SCREEN_HEIGHT 192
#define SCREEN_WIDTH_BYTES 128
#define BYTES_PER_LINE 40
#define PEEKZ(a) (*(volatile uint8_t* __attribute__((zpage)))(a))
#define POKEZ(a, b) ((*(volatile uint8_t* __attribute__((zpage)))(a)) = b)