+static void player__skate_animator_exchange( bitpack_ctx *ctx, void *data ){
+ struct player_skate_animator *animator = data;
+
+ bitpack_qv3f( ctx, 24, -1024.0f, 1024.0f, animator->root_co );
+ bitpack_qquat( ctx, animator->root_q );
+
+ bitpack_qv3f( ctx, 8, -1.0f, 1.0f, animator->offset );
+ bitpack_qv3f( ctx, 8, -1.0f, 1.0f, animator->local_cog );
+ bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->slide );
+ bitpack_qf32( ctx, 8, -1.0f, 1.0f, &animator->z );
+ bitpack_qf32( ctx, 8, -1.0f, 1.0f, &animator->x );
+
+ /* these could likely be pressed down into single bits if needed */
+ bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->fly );
+ bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->grind );
+ bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->stand );
+ bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->push );
+ bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->jump ); /*??*/
+ bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->jump_charge ); /*??*/
+
+ /* just the sign bit? */
+ bitpack_qf32( ctx, 8, -1.0f, 1.0f, &animator->reverse );
+ bitpack_qf32( ctx, 8, -1.0f, 1.0f, &animator->delayed_slip_dir );
+ bitpack_bytes( ctx, 1, &animator->jump_dir );
+ bitpack_bytes( ctx, 1, &animator->trick_type );
+
+ bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->grind_balance );
+ bitpack_qf32( ctx, 8, -1.0f, 1.0f, &animator->airdir );
+ bitpack_qf32( ctx, 8, -1.0f, 1.0f, &animator->weight );
+ bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->trick_foot );
+ bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->slap );
+ bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->subslap );
+ bitpack_qf32( ctx, 8, 0.0f, 1.0f, &animator->grabbing );
+
+ /* animator->wobble is ommited */
+
+ bitpack_qv2f( ctx, 8, -1.0f, 1.0f, animator->foot_offset );
+ bitpack_qquat( ctx, animator->qfixuptotal );
+ bitpack_qquat( ctx, animator->qflip );
+
+ bitpack_qv3f( ctx, 16, -100.0f, 100.0f, animator->board_euler );
+ bitpack_qf32( ctx, 8, -1.0f, 1.0f, &animator->board_lean );
+ bitpack_qv2f( ctx, 8, -1.0f, 1.0f, animator->steer );
+ bitpack_qv2f( ctx, 8, -1.0f, 1.0f, animator->grab );
+
+ bitpack_qf32( ctx, 16, 0.0f, 120.0f, &animator->push_time );
+ bitpack_qf32( ctx, 16, 0.0f, 120.0f, &animator->jump_time );
+}
+
+static void player__skate_sfx_oneshot( u8 id, v3f pos, f32 volume ){
+ audio_lock();
+
+ if( id == k_player_skate_soundeffect_jump ){
+ audio_oneshot_3d( &audio_jumps[vg_randu32()%2], pos, 40.0f, volume );
+ }
+ else if( id == k_player_skate_soundeffect_tap ){
+ audio_oneshot_3d( &audio_taps[vg_randu32()%4], pos, 40.0f, volume );
+ }
+ else if( id == k_player_skate_soundeffect_land_good ){
+ audio_oneshot_3d( &audio_lands[vg_randu32()%3], pos, 40.0f, volume );
+ }
+ else if( id == k_player_skate_soundeffect_land_bad ){
+ audio_oneshot_3d( &audio_lands[vg_randu32()%2+3], pos, 40.0f, volume );
+ }
+ else if( id == k_player_skate_soundeffect_grind_metal ){
+ audio_oneshot_3d( &audio_board[3], pos, 40.0f, volume );
+ }
+ else if( id == k_player_skate_soundeffect_grind_wood ){
+ audio_oneshot_3d( &audio_board[8], pos, 40.0f, volume );
+ }