@@ -74,6 +74,7 @@ typedef struct ba_thread_stack ba_thread_stack_t;
7474typedef struct ba_thread_wait ba_thread_wait_t ;
7575typedef union ba_runtime_union ba_runtime_union_t ;
7676typedef struct ba_audio_stream ba_audio_stream_t ;
77+ typedef struct ba_pen ba_pen_t ;
7778
7879typedef unsigned char * (* ba_load_file_t )(ba_runtime_t * rt , const char * path , int * size );
7980typedef void (* ba_swap_buffer_t )(ba_runtime_t * rt );
@@ -175,12 +176,19 @@ union ba_runtime_union {
175176 ba_zip_t * zip ;
176177};
177178
179+ struct ba_pen {
180+ double color [3 ];
181+
182+ double * coords ;
183+ };
184+
178185struct ba_runtime {
179186 ba_cJSON * json ;
180187
181188 ba_target_t * * targets ;
182189 ba_thread_t * * threads ;
183190 ba_sprite_t * * sprites ;
191+ ba_pen_t * * pens ;
184192
185193 ba_audio_t * audio ;
186194
@@ -299,6 +307,9 @@ struct ba_inputkv {
299307
300308struct ba_sprite {
301309 ba_target_t * target ;
310+ double pen_color [3 ];
311+
312+ ba_pen_t * pen ;
302313
303314 int costume ;
304315
@@ -338,6 +349,7 @@ BADECL ba_sprite_t* ba_runtime_get_stage_sprite(ba_runtime_t* rt);
338349BADECL ba_bool ba_runtime_load_path (ba_runtime_t * rt , const char * path );
339350BADECL void ba_runtime_block_handler (ba_runtime_t * rt , const char * name , ba_thread_block_handler_t handler );
340351BADECL void ba_runtime_shadow_handler (ba_runtime_t * rt , const char * name , ba_thread_shadow_handler_t handler );
352+ BADECL ba_pen_t * ba_runtime_pen (ba_runtime_t * rt );
341353
342354/* audio.c */
343355BADECL ba_audio_t * ba_audio_open (ba_runtime_t * rt );
@@ -415,6 +427,7 @@ BADECL void ba_block_sound(ba_runtime_t* rt);
415427BADECL void ba_block_event (ba_runtime_t * rt );
416428BADECL void ba_block_control (ba_runtime_t * rt );
417429BADECL void ba_block_text2speech (ba_runtime_t * rt );
430+ BADECL void ba_block_pen (ba_runtime_t * rt );
418431
419432/* shadows */
420433BADECL void ba_shadow_sound (ba_runtime_t * rt );
0 commit comments