1 #ifndef OPERATIONQUEUE_H 2 #define OPERATIONQUEUE_H 3 4 #include <stdint.h> 5 #include "tilemap.h" 6 7 typedef struct { 8 float x; 9 float y; 10 float radius; 11 uint16_t color_r; 12 uint16_t color_g; 13 uint16_t color_b; 14 float color_a; 15 float opaque; 16 float hardness; 17 float aspect_ratio; 18 float angle; 19 float normal; 20 float lock_alpha; 21 float colorize; 22 float posterize; 23 float posterize_num; 24 float paint; 25 } OperationDataDrawDab; 26 27 typedef struct OperationQueue OperationQueue; 28 29 OperationQueue *operation_queue_new(void); 30 void operation_queue_free(OperationQueue *self); 31 32 int operation_queue_get_dirty_tiles(OperationQueue *self, TileIndex** tiles_out); 33 void operation_queue_clear_dirty_tiles(OperationQueue *self); 34 35 void operation_queue_add(OperationQueue *self, TileIndex index, OperationDataDrawDab *op); 36 OperationDataDrawDab *operation_queue_pop(OperationQueue *self, TileIndex index); 37 38 OperationDataDrawDab *operation_queue_peek_first(OperationQueue *self, TileIndex index); 39 OperationDataDrawDab *operation_queue_peek_last(OperationQueue *self, TileIndex index); 40 41 #endif // OPERATIONQUEUE_H 42