simplify property exports
This commit is contained in:
parent
7a836783e1
commit
92ce27af68
11 changed files with 70 additions and 119 deletions
|
@ -20,7 +20,7 @@ int main(void) {
|
|||
sp_chargrid_set(grid, 3, 1, 'l');
|
||||
sp_chargrid_set(grid, 4, 1, 'd');
|
||||
|
||||
Packet *packet = sp_chargrid_into_packet(grid, 0, 0);
|
||||
Packet *packet = sp_chargrid_try_into_packet(grid, 0, 0);
|
||||
if (packet == NULL)
|
||||
return 1;
|
||||
sp_udpsocket_send_packet(sock, packet);
|
||||
|
|
|
@ -26,7 +26,7 @@ int main(void) {
|
|||
BrightnessGrid *grid = sp_brightnessgrid_new(TILE_WIDTH, TILE_HEIGHT);
|
||||
make_brightness_pattern(grid);
|
||||
|
||||
Packet *packet = sp_brightnessgridcommand_into_packet(sp_brightnessgridcommand_from_grid(grid));
|
||||
Packet *packet = sp_brightnessgridcommand_try_into_packet(sp_brightnessgridcommand_from_grid(grid));
|
||||
if (packet == NULL)
|
||||
return -2;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ int main(void) {
|
|||
|
||||
sp_bitmap_fill(pixels, true);
|
||||
|
||||
Packet *packet = sp_bitmap_into_packet(pixels, 0, 0, COMPRESSION_CODE_UNCOMPRESSED);
|
||||
Packet *packet = sp_bitmap_try_into_packet(pixels, 0, 0, COMPRESSION_CODE_UNCOMPRESSED);
|
||||
if (packet == NULL)
|
||||
return 1;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue