From c9f28c1ce3ffda9c407003a26adf903d810b681b Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 6 May 2023 22:00:16 +0100 Subject: Set tighter qualifiers for pointer parameters This should prevent warnings when using source data from ROM. --- include/ubox.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'include/ubox.h') diff --git a/include/ubox.h b/include/ubox.h index b66c76e..842f2f4 100644 --- a/include/ubox.h +++ b/include/ubox.h @@ -193,7 +193,7 @@ uint8_t ubox_get_vsync_freq(); * All the tiles functions use an index in this tile set (usually via a `tile` * parameter). */ -void ubox_set_tiles(uint8_t *tiles) __z88dk_fastcall; +void ubox_set_tiles(const uint8_t *tiles) __z88dk_fastcall; /** * Sets the current color table for current tile set to the color table pointed @@ -203,7 +203,7 @@ void ubox_set_tiles(uint8_t *tiles) __z88dk_fastcall; * of the tiles table (8 rows, 8 bytes per tile). The colors will be loaded into * the VDP in all three screen sections. */ -void ubox_set_tiles_colors(uint8_t *colors) __z88dk_fastcall; +void ubox_set_tiles_colors(const uint8_t *colors) __z88dk_fastcall; /** * Puts a tile from current tile set on the screen. The tile is identified by @@ -409,7 +409,7 @@ struct sprite_attr { * * See [ubox_set_sprite_pat16](#ubox_set_sprite_pat16) to set a 16x16 pixels pattern. */ -void ubox_set_sprite_pat8(uint8_t *data, uint8_t pattern); +void ubox_set_sprite_pat8(const uint8_t *data, uint8_t pattern); /** * Sets the sprite pattern data pointed by `data` into pattern number @@ -422,7 +422,7 @@ void ubox_set_sprite_pat8(uint8_t *data, uint8_t pattern); * See [ubox_set_sprite_pat16_flip](#ubox_set_sprite_pat16_flip) to set a 16x16 * pixels pattern. */ -void ubox_set_sprite_pat8_flip(uint8_t *data, uint8_t pattern); +void ubox_set_sprite_pat8_flip(const uint8_t *data, uint8_t pattern); /** * Sets the sprite attributes of sprite number `sprite` using the attributes @@ -442,7 +442,7 @@ void ubox_set_sprite_pat8_flip(uint8_t *data, uint8_t pattern); * table, it is recommended to use [ubox_write_vm](#ubox_write_vm). The sprite * attribute table is in the memory address `0x1b00`. */ -void ubox_set_sprite_attr(struct sprite_attr *attr, uint8_t sprite); +void ubox_set_sprite_attr(const struct sprite_attr *attr, uint8_t sprite); /** * Sets the sprite pattern data pointed by `data` into pattern number @@ -455,7 +455,7 @@ void ubox_set_sprite_attr(struct sprite_attr *attr, uint8_t sprite); * * See [ubox_set_sprite_pat8](#ubox_set_sprite_pat8) to set a 8x8 pixels pattern. */ -void ubox_set_sprite_pat16(uint8_t *data, uint8_t pattern); +void ubox_set_sprite_pat16(const uint8_t *data, uint8_t pattern); /** * Sets the sprite pattern data pointed by `data` into pattern number @@ -469,7 +469,7 @@ void ubox_set_sprite_pat16(uint8_t *data, uint8_t pattern); * See [ubox_set_sprite_pat8_flip](#ubox_set_sprite_pat8_flip) to set a 8x8 * pixels pattern. */ -void ubox_set_sprite_pat16_flip(uint8_t *data, uint8_t pattern); +void ubox_set_sprite_pat16_flip(const uint8_t *data, uint8_t pattern); // @Control functions // -- cgit v1.2.3