2023-03-10 10:32:50 +00:00
|
|
|
// This file is part of noxos and licensed under the MIT open source license
|
2023-02-05 13:39:35 +00:00
|
|
|
|
|
|
|
#ifndef NOX_BITMAP_H
|
|
|
|
#define NOX_BITMAP_H
|
|
|
|
|
|
|
|
#include "stdtypes.h"
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
uint32_t size;
|
2023-03-03 16:23:52 +00:00
|
|
|
uint32_t size_bits;
|
2023-02-05 13:39:35 +00:00
|
|
|
uint8_t* buffer;
|
|
|
|
} bitmap_T;
|
|
|
|
|
|
|
|
bitmap_T bitmap_init_from_buffer (void* buffer, uint32_t size);
|
|
|
|
bitmap_T bitmap_init (uint32_t size);
|
|
|
|
void bitmap_destruct (bitmap_T* bitmap);
|
|
|
|
bool bitmap_set (bitmap_T* bitmap, uint32_t index, bool value);
|
|
|
|
bool bitmap_get (bitmap_T* bitmap, uint32_t index);
|
|
|
|
|
|
|
|
#endif //NOX_BITMAP_H
|