… | |
… | |
1995 | |
1995 | |
1996 | sub cf::client::send_drawinfo { |
1996 | sub cf::client::send_drawinfo { |
1997 | my ($self, $text, $flags) = @_; |
1997 | my ($self, $text, $flags) = @_; |
1998 | |
1998 | |
1999 | utf8::encode $text; |
1999 | utf8::encode $text; |
2000 | $self->send_packet (sprintf "drawinfo %d %s", $flags, $text); |
2000 | $self->send_packet (sprintf "drawinfo %d %s", $flags || cf::NDI_BLACK, $text); |
2001 | } |
2001 | } |
2002 | |
2002 | |
2003 | |
2003 | |
2004 | =item $success = $client->query ($flags, "text", \&cb) |
2004 | =item $success = $client->query ($flags, "text", \&cb) |
2005 | |
2005 | |
… | |
… | |
2282 | |
2282 | |
2283 | Coro::cede; |
2283 | Coro::cede; |
2284 | $faces = Storable::thaw $faces; |
2284 | $faces = Storable::thaw $faces; |
2285 | Coro::cede; |
2285 | Coro::cede; |
2286 | |
2286 | |
|
|
2287 | my $meta = delete $faces->{""}; |
|
|
2288 | $meta->{version} == 1 |
|
|
2289 | or cf::cleanup "$path: version mismatch, cannot proceed."; |
|
|
2290 | |
2287 | while (my ($face, $info) = each %$faces) { |
2291 | while (my ($face, $info) = each %$faces) { |
2288 | my $idx = (cf::face::find $face) || cf::face::alloc $face; |
2292 | my $idx = (cf::face::find $face) || cf::face::alloc $face; |
2289 | cf::face::set $idx, $info->{visibility}, $info->{magicmap}; |
2293 | cf::face::set $idx, $info->{visibility}, $info->{magicmap}; |
2290 | cf::face::set_data $idx, 0, $info->{data32}, $info->{chksum32}; |
2294 | cf::face::set_data $idx, 0, $info->{data32}, $info->{chksum32}; |
|
|
2295 | Coro::cede; |
|
|
2296 | } |
|
|
2297 | |
|
|
2298 | while (my ($face, $info) = each %$faces) { |
|
|
2299 | next unless $info->{smooth}; |
|
|
2300 | my $idx = cf::face::find $face |
|
|
2301 | or next; |
|
|
2302 | if (my $smooth = cf::face::find $info->{smooth}) { |
|
|
2303 | cf::face::set_smooth $idx, $smooth; |
|
|
2304 | } else { |
|
|
2305 | warn "smooth face '$info->{smooth}' not found for face '$face'"; |
|
|
2306 | } |
2291 | Coro::cede; |
2307 | Coro::cede; |
2292 | } |
2308 | } |
2293 | |
2309 | |
2294 | 1 |
2310 | 1 |
2295 | } |
2311 | } |