diff --git a/include/fxengine/model/bitmap.h b/include/fxengine/model/bitmap.h index e66973a..abf5eef 100644 --- a/include/fxengine/model/bitmap.h +++ b/include/fxengine/model/bitmap.h @@ -20,30 +20,18 @@ typedef struct fe_bitmap } fe_bitmap; -/* fe_bitmap_new() - creates a new bitmap in the ram - with this function, the bmp is dynamic only, but there is still a way tou create it staticly : - you create a dynamic bmp - you create a static bmp - you do a memcpy*/ -fe_bitmap* fe_bitmap_new( - uint32_t size_px_x, uint32_t size_px_y, // bitmap size - uint32_t* color, bool copy_color, // color table address and type (static | dynamic) - uint32_t *layout, bool copy_layout // layout table address and type (static | dynamic) - ); +fe_bitmap* fe_bitmap_new(uint32_t size_px_x, uint32_t size_px_y, uint32_t* color, bool copy_color, uint32_t *layout, bool copy_layout); -/* fe_bitmap_del() -deletes the bitmap from the ram */ -void fe_bitmap_del(fe_bitmap * txtr); +void fe_bitmap_del(fe_bitmap * bmp); /* fe_bitmap_get_pixel() returns the color of a pixel in the gint's type*/ -uint8_t fe_bitmap_get_pixel(const fe_bitmap * txtr, uint32_t x, uint32_t y); +uint8_t fe_bitmap_get_px(const fe_bitmap * bmp, uint32_t x, uint32_t y); /* fe_bitmap_display_pixel() display a specific rich bitmap pixel on the screen (on vram) */ -void fe_bitmap_display_pixel(const fe_bitmap * txtr, uint32_t txtr_x, uint32_t txtr_y, uint32_t x, uint32_t y); +void fe_bitmap_display_px(const fe_bitmap * bmp, uint32_t bmp_x, uint32_t bmp_y, uint32_t scr_x, uint32_t scr_y); #endif diff --git a/include/fxengine/model/bitmap.md b/include/fxengine/model/bitmap.md index e232548..0323de7 100644 --- a/include/fxengine/model/bitmap.md +++ b/include/fxengine/model/bitmap.md @@ -55,4 +55,5 @@ The bitmap is dynamically allocated, so it should be deleted by using `free()` m The only argument to pass is the bitmap's address. ### Display -Basically, you can display the bitmap with `` \ No newline at end of file +You cannot display the bitmap yet, but in fxengine, it is not a priority. +However, you can display a specific pixel with `fe_bitmap_display_px()`, or you can get its color with `fe_bitmap_get_px`. \ No newline at end of file