wrap_command macro
This commit is contained in:
parent
18f0be072a
commit
1eb59d986a
13 changed files with 162 additions and 107 deletions
|
@ -33,7 +33,7 @@ bool log_command(struct Command command) {
|
|||
size_t x, y;
|
||||
sp_cmd_bitmap_get_origin(bitmapCommand, &x, &y);
|
||||
|
||||
Bitmap *bitmap = sp_cmd_bitmap_get(bitmapCommand);
|
||||
Bitmap *bitmap = sp_cmd_bitmap_get_bitmap_mut(bitmapCommand);
|
||||
size_t w = sp_bitmap_width(bitmap);
|
||||
size_t h = sp_bitmap_height(bitmap);
|
||||
|
||||
|
@ -47,7 +47,7 @@ bool log_command(struct Command command) {
|
|||
size_t x, y;
|
||||
sp_cmd_brightness_grid_get_origin(gridCommand, &x, &y);
|
||||
|
||||
BrightnessGrid *grid = sp_cmd_brightness_grid_get(gridCommand);
|
||||
BrightnessGrid *grid = sp_cmd_brightness_grid_get_grid_mut(gridCommand);
|
||||
size_t w = sp_brightness_grid_width(grid);
|
||||
size_t h = sp_brightness_grid_height(grid);
|
||||
|
||||
|
@ -61,7 +61,7 @@ bool log_command(struct Command command) {
|
|||
size_t x, y;
|
||||
sp_cmd_char_grid_get_origin(gridCommand, &x, &y);
|
||||
|
||||
CharGrid *grid = sp_cmd_char_grid_get(gridCommand);
|
||||
CharGrid *grid = sp_cmd_char_grid_get_grid_mut(gridCommand);
|
||||
size_t w = sp_char_grid_width(grid);
|
||||
size_t h = sp_char_grid_height(grid);
|
||||
|
||||
|
@ -75,7 +75,7 @@ bool log_command(struct Command command) {
|
|||
size_t x, y;
|
||||
sp_cmd_cp437_grid_get_origin(gridCommand, &x, &y);
|
||||
|
||||
Cp437Grid *grid = sp_cmd_cp437_grid_get(gridCommand);
|
||||
Cp437Grid *grid = sp_cmd_cp437_grid_get_grid_mut(gridCommand);
|
||||
size_t w = sp_cp437_grid_width(grid);
|
||||
size_t h = sp_cp437_grid_height(grid);
|
||||
|
||||
|
@ -84,7 +84,7 @@ bool log_command(struct Command command) {
|
|||
break;
|
||||
}
|
||||
case COMMAND_TAG_BIT_VEC: {
|
||||
BitVecCommand *bitvecCommand = command.data.bitvec;
|
||||
BitVecCommand *bitvecCommand = command.data.bit_vec;
|
||||
|
||||
size_t offset = sp_cmd_bitvec_get_offset(bitvecCommand);
|
||||
CompressionCode compression = sp_cmd_bitvec_get_compression(bitvecCommand);
|
||||
|
@ -109,7 +109,7 @@ bool log_command(struct Command command) {
|
|||
break;
|
||||
}
|
||||
|
||||
BitVec *bitvec = sp_cmd_bitvec_get(bitvecCommand);
|
||||
BitVec *bitvec = sp_cmd_bitvec_get_bitvec_mut(bitvecCommand);
|
||||
size_t len = sp_bitvec_len(bitvec);
|
||||
|
||||
printf("-> BitVecCommand with params: offset=%zu, length=%zu, compression=%hu, operation=%s\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue