+VG_STATIC int network_scores_updated = 0;
+
+VG_STATIC u32 utf8_byte0_byte_count( u8 char0 )
+{
+ for( u32 k=2; k<4; k++ )
+ {
+ if( !(char0 & (0x80 >> k)) )
+ return k;
+ }
+
+ return 0;
+}
+
+VG_STATIC void str_utf8_collapse( const char *str, char *buf, u32 length )
+{
+ u8 *ustr = (u8 *)str;
+ u32 utf32_code = 0x00000000;
+ u32 i=0, j=0, utf32_byte_ct=0;
+
+ for(;i < length-1;)
+ {
+ if( ustr[i] == 0x00 )
+ break;
+
+ if( ustr[i] & 0x80 )
+ {
+ if( utf32_byte_ct )
+ {
+ utf32_byte_ct --;
+ utf32_code |= (ustr[i] & 0x3F) << (utf32_byte_ct*6);
+
+ if( !utf32_byte_ct )
+ {
+ const char *match;
+ size_t chars = anyascii( utf32_code, &match );
+
+ for( u32 k=0; k<VG_MIN(chars, length-1-j); k++ )
+ {
+ buf[ j++ ] = (u8)match[k];
+ }
+ }
+ }
+ else
+ {
+ utf32_byte_ct = utf8_byte0_byte_count( ustr[i] )-1;
+ utf32_code = ustr[i] & (0x3F >> utf32_byte_ct);
+ utf32_code <<= utf32_byte_ct*6;
+ }
+ }
+ else
+ {
+ utf32_byte_ct = 0x00;
+ buf[j ++] = str[i];
+ }
+
+ i++;
+ }
+
+ buf[j] = 0x00;
+}
+
+VG_STATIC float
+ k_runspeed = 20.0f, /* depr */
+ k_board_radius = 0.3f,
+ k_board_length = 0.45f,
+ k_board_allowance = 0.04f,
+ k_friction_lat = 12.0f,
+ k_friction_resistance = 0.01f,
+ k_max_push_speed = 16.0f,
+ k_push_accel = 10.0f,
+ k_push_cycle_rate = 8.0f,
+ k_steer_ground = 2.5f,
+ k_steer_air = 3.6f,
+ k_steer_air_lerp = 0.3f,
+ k_pump_force = 0.0f,
+ k_downforce = 5.0f,
+ k_walk_downforce = 8.0f,
+ k_jump_charge_speed = (1.0f/1.0f),
+ k_jump_force = 5.0f,
+ k_pitch_limit = 1.5f,
+ k_look_speed = 2.0f,
+
+ k_cog_spring = 0.2f,
+ k_cog_damp = 0.02f,
+ k_cog_mass_ratio = 0.9f,
+
+ k_mmthrow_scale = 6.0f,
+ k_mmcollect_lat = 2.0f,
+ k_mmcollect_vert = 0.0f,
+ k_mmdecay = 12.0f,
+ k_spring_angular = 1.0f,
+
+ k_spring_force = 15.0f,
+ k_spring_dampener = 5.0f;
+
+