legend, skip cutscene master
authorhgn <hgodden00@gmail.com>
Mon, 5 May 2025 19:28:21 +0000 (20:28 +0100)
committerhgn <hgodden00@gmail.com>
Mon, 5 May 2025 19:28:21 +0000 (20:28 +0100)
12 files changed:
content_skaterift/textures/menu_icons.qoi
icons/icon_comb.png
icons/legend.svg [new file with mode: 0644]
icons/make.py
src/gameserver_database.c
src/gameserver_database.h
src/menu.c
src/menu.h
src/network_requests.c
src/skaterift.c
src/ui_menu_icons.h0
src/user_profile.c

index 695abb332115a988b4a3bdb0490ba94783a90075..094aa67393c7bedadee579a34e607e3109317971 100644 (file)
Binary files a/content_skaterift/textures/menu_icons.qoi and b/content_skaterift/textures/menu_icons.qoi differ
index 22634218c982889e1c40a02e84777b1672adeed7..3d333dbb32295ece65bcaae5f447e975423f5e63 100644 (file)
Binary files a/icons/icon_comb.png and b/icons/icon_comb.png differ
diff --git a/icons/legend.svg b/icons/legend.svg
new file mode 100644 (file)
index 0000000..fc771cf
--- /dev/null
@@ -0,0 +1,232 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   width="100mm"
+   height="100mm"
+   viewBox="0 0 100 100"
+   version="1.1"
+   id="svg1"
+   inkscape:version="1.4 (e7c3feb100, 2024-10-09)"
+   sodipodi:docname="legend.svg"
+   xml:space="preserve"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
+     id="namedview1"
+     pagecolor="#ffffff"
+     bordercolor="#000000"
+     borderopacity="0.25"
+     inkscape:showpageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="true"
+     inkscape:deskcolor="#d1d1d1"
+     inkscape:document-units="mm"
+     inkscape:zoom="0.18796998"
+     inkscape:cx="-593.17981"
+     inkscape:cy="1021.4397"
+     inkscape:window-width="1920"
+     inkscape:window-height="1053"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="layer1" /><defs
+     id="defs1"><linearGradient
+       id="linearGradient17"
+       inkscape:collect="always"><stop
+         style="stop-color:#b64444;stop-opacity:1;"
+         offset="0"
+         id="stop16" /><stop
+         style="stop-color:#241212;stop-opacity:1;"
+         offset="1"
+         id="stop17" /></linearGradient><linearGradient
+       id="linearGradient13"
+       inkscape:collect="always"><stop
+         style="stop-color:#c0c0c0;stop-opacity:1;"
+         offset="0"
+         id="stop13" /><stop
+         style="stop-color:#c0c0c0;stop-opacity:0;"
+         offset="1"
+         id="stop14" /></linearGradient><linearGradient
+       id="linearGradient12"
+       inkscape:collect="always"><stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0.58671784"
+         id="stop11" /><stop
+         style="stop-color:#edf6fb;stop-opacity:0.39331523;"
+         offset="1"
+         id="stop12" /></linearGradient><linearGradient
+       id="linearGradient9"
+       inkscape:collect="always"><stop
+         style="stop-color:#121212;stop-opacity:1;"
+         offset="0"
+         id="stop3" /><stop
+         style="stop-color:#f1cccc;stop-opacity:1;"
+         offset="0.58006924"
+         id="stop4" /><stop
+         style="stop-color:#ffdbcb;stop-opacity:1;"
+         offset="0.59029508"
+         id="stop8" /><stop
+         style="stop-color:#faebeb;stop-opacity:1;"
+         offset="0.99843603"
+         id="stop9" /></linearGradient><linearGradient
+       id="swatch55"
+       inkscape:swatch="solid"><stop
+         style="stop-color:#000000;stop-opacity:1;"
+         offset="0"
+         id="stop55" /></linearGradient><linearGradient
+       id="linearGradient28"
+       inkscape:collect="always"><stop
+         style="stop-color:#731c1c;stop-opacity:1;"
+         offset="0"
+         id="stop28" /><stop
+         style="stop-color:#241212;stop-opacity:1;"
+         offset="1"
+         id="stop29" /></linearGradient><linearGradient
+       id="linearGradient5"
+       inkscape:collect="always"><stop
+         style="stop-color:#f5e8de;stop-opacity:1;"
+         offset="0"
+         id="stop5" /><stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0.58006924"
+         id="stop6" /><stop
+         style="stop-color:#ffdbcb;stop-opacity:1;"
+         offset="0.59029508"
+         id="stop7" /><stop
+         style="stop-color:#faebeb;stop-opacity:1;"
+         offset="0.99843603"
+         id="stop10" /></linearGradient><linearGradient
+       id="linearGradient1"
+       inkscape:collect="always"><stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop1" /><stop
+         style="stop-color:#2d96cc;stop-opacity:0;"
+         offset="1"
+         id="stop2" /></linearGradient><rect
+       x="31.034908"
+       y="280.25462"
+       width="314.58111"
+       height="71.944559"
+       id="rect12" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient1"
+       id="linearGradient2"
+       x1="65.184967"
+       y1="291.25983"
+       x2="65.184967"
+       y2="279.94586"
+       gradientUnits="userSpaceOnUse" /><rect
+       x="31.034908"
+       y="280.25461"
+       width="314.58112"
+       height="71.944557"
+       id="rect12-3" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5"
+       id="linearGradient6"
+       x1="61.591267"
+       y1="292.61707"
+       x2="59.829739"
+       y2="278.86011"
+       gradientUnits="userSpaceOnUse" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient28"
+       id="linearGradient29"
+       x1="1.8098803"
+       y1="58.864178"
+       x2="93.289337"
+       y2="81.228394"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.051211,0,0,2.1174151,-2.1855803,-74.514645)" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient9"
+       id="linearGradient6-6"
+       x1="61.591267"
+       y1="292.61707"
+       x2="59.829739"
+       y2="278.86011"
+       gradientUnits="userSpaceOnUse" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient12"
+       id="linearGradient2-8"
+       x1="65.184967"
+       y1="291.25983"
+       x2="65.184967"
+       y2="279.94586"
+       gradientUnits="userSpaceOnUse" /><rect
+       x="31.034908"
+       y="280.25461"
+       width="314.58112"
+       height="71.944557"
+       id="rect12-7" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient13"
+       id="linearGradient14"
+       x1="30.979069"
+       y1="58.723377"
+       x2="71.289177"
+       y2="114.83405"
+       gradientUnits="userSpaceOnUse" /><rect
+       x="31.034908"
+       y="280.25462"
+       width="314.58111"
+       height="71.944559"
+       id="rect16" /><linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient17"
+       id="linearGradient16"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.69076387,0,0,0.41919708,0.02465404,20.6184)"
+       x1="39.252972"
+       y1="9.336524"
+       x2="153.91148"
+       y2="95.499077" /></defs><g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"><path
+       id="rect2"
+       style="display:inline;fill:url(#linearGradient29);stroke-width:0.478911;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke markers fill"
+       d="M 3.6997584,55.754416 C 47.76328,55.476891 60.60709,55.825162 97.472822,56.01785 V 97.113856 H 3.5689747 Z"
+       sodipodi:nodetypes="ccccc" /><path
+       id="rect2-5"
+       style="display:inline;fill:url(#linearGradient16);stroke-width:0.172735;stroke-linecap:round;stroke-linejoin:round;paint-order:stroke markers fill"
+       d="m 3.7160352,46.408529 c 50.7723688,0 52.8426698,1.107837 66.8887858,-15.079366 l 26.605734,20.233061 0.02643,3.034472 H 3.6300951 Z"
+       sodipodi:nodetypes="cccccc" /><path
+       style="opacity:0.414441;mix-blend-mode:color-dodge;fill:url(#linearGradient14);stroke:none;stroke-width:0.556001;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-dashoffset:0;paint-order:stroke markers fill"
+       d="M 4.3544873,96.047551 V 76.016907 c 0,0 14.4320157,-10.824011 46.2819807,-10.824011 31.849965,0 45.908738,11.321669 45.908738,11.321669 v 19.408571 z"
+       id="path12" /><path
+       style="opacity:0.157795;mix-blend-mode:screen;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.556001;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-dashoffset:0;paint-order:stroke markers fill"
+       d="M 5.1462527,56.58699 4.5748279,96.384352 22.244195,96.171963 46.483565,56.653619 Z"
+       id="path14"
+       sodipodi:nodetypes="ccccc" /><text
+       xml:space="preserve"
+       transform="matrix(1.577918,0,0,1.5451918,-246.56559,-376.54204)"
+       id="text12"
+       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;font-family:'Caviar Dreams';-inkscape-font-specification:'Caviar Dreams, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;writing-mode:lr-tb;direction:ltr;white-space:pre;shape-inside:url(#rect12);display:inline;opacity:1;mix-blend-mode:overlay;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.440004;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill"
+       x="52.721981"
+       y="0"><tspan
+         x="170.47754"
+         y="291.47543"
+         id="tspan1">URBAN</tspan></text><text
+       xml:space="preserve"
+       transform="matrix(2.9738678,0,0,3.7303147,-509.45429,-968.50562)"
+       id="text12-2"
+       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.41661px;font-family:MODERNIZ;-inkscape-font-specification:'MODERNIZ, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;writing-mode:lr-tb;direction:ltr;white-space:pre;shape-inside:url(#rect12-7);display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.347076;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill"
+       x="52.721981"
+       y="0"><tspan
+         x="173.01514"
+         y="284.94329"
+         id="tspan2">LEGEND</tspan></text><text
+       xml:space="preserve"
+       transform="matrix(1.577918,0,0,1.5451918,-246.56559,-376.54204)"
+       id="text16"
+       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;font-family:'Caviar Dreams';-inkscape-font-specification:'Caviar Dreams, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:center;writing-mode:lr-tb;direction:ltr;white-space:pre;shape-inside:url(#rect16);display:inline;opacity:1;mix-blend-mode:overlay;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.440004;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill"
+       x="52.721981"
+       y="0"><tspan
+         x="170.47754"
+         y="291.47543"
+         id="tspan3">URBAN</tspan></text></g></svg>
index 7302a10d6a1a067da71cab59046d0b149bb3dcf6..550b91dd1c90e2d19ed3b96a2e92b50a72275ceb 100644 (file)
@@ -4,7 +4,8 @@ f = open( "../src/ui_menu_icons.h0", "w" )
 
 all = [ "early", "Early adopter",
         "top3", "Global top 3 time record",
-        "top10", "Global top 10 time record" ]
+        "top10", "Global top 10 time record",
+        "legend", "Previously a record holder in the first year"]
 
 mega_string = ""
 msl = 0
index a9f62820ddef1d52ae094ab5174ae72c5c81318f..f7079f5147398810f3d31e99af69212516a8d5a1 100644 (file)
@@ -357,8 +357,6 @@ enum request_status _gs_db_get_profile( vg_msg *msg, u64 steamid )
             break;
       }
    }
-   u32 flags = 0x00;
-   vg_msg_wkvnum( msg, "flags", k_vg_msg_u32, 1, &flags );
    vg_msg_wkvnum( msg, "race3", k_vg_msg_u16, 1, &top3_count );
    vg_msg_wkvnum( msg, "race10", k_vg_msg_u16, 1, &top10_count );
 
@@ -370,6 +368,8 @@ enum request_status _gs_db_get_profile( vg_msg *msg, u64 steamid )
       vg_msg_wkvstr( msg, "username", profile.name );
       if( profile.cc[0] )
          vg_msg_wkvstr( msg, "cc", profile.cc );
+
+      vg_msg_wkvnum( msg, "flags", k_vg_msg_u32, 1, &profile.flags );
    }
 
    return k_request_status_ok;
index 9fd2f4656f257ffb1c993f102427a6e19430d4a6..a7a01024add4e698bb0eb278838b25e850400a55 100644 (file)
@@ -49,6 +49,7 @@ struct skaterift_profile
 {
    char name[128];
    char cc[4];
+   u32 flags;
 };
 
 struct skaterift_entry
index 45b81ef6504ac8083acd0be880eced4989c4a02b..137ee2623ee5a56855de009322cee47b134b79bf 100644 (file)
@@ -466,7 +466,13 @@ void menu_gui( ui_context *ctx )
 
       if( button_down( k_srbind_mopen ) )
       {
-         menu_open( k_menu_page_main );
+         if( _cutscene.state >= k_cutscene_state_ready )
+         {
+            menu.cs_row = 0;
+            menu_open( k_menu_page_cutscene );
+         }
+         else
+            menu_open( k_menu_page_main );
          return;
       }
 
@@ -952,6 +958,47 @@ void menu_gui( ui_context *ctx )
 
       goto menu_draw;
    }
+/* PAGE spectate */
+   else if( menu.page == k_menu_page_cutscene )
+   {
+      i32 R = menu_nav( &menu.cs_row, mh, 1 );
+      ui_rect panel = { 0,0, 600, 300 },
+              screen = { 0,0, vg.window_x,vg.window_y };
+      ui_rect_center( screen, panel );
+      ui_fill( ctx, panel, ui_opacity( GUI_COL_DARK, 0.35f ) );
+      ui_outline( ctx, panel, 1, GUI_COL_NORM, 0 );
+      ui_rect_pad( panel, (ui_px[]){8,8} );
+
+      ui_rect title;
+      ui_split( panel, k_ui_axis_h, 28*2, 0, title, panel );
+      ctx->font = &vgf_default_title;
+      ui_text( ctx, title, "Skip Cutscene?", 1, k_ui_align_middle_center, 0 );
+
+      ui_split( panel, k_ui_axis_h, 28, 0, title, panel );
+      ctx->font = &vgf_default_large;
+
+      ui_rect end = { panel[0], panel[1] + panel[3] - 48, panel[2], 48 }, a,b;
+      ui_split_ratio( end, k_ui_axis_v, 0.5f, 2, a, b );
+
+      if( menu_button( ctx, a, R == 0, steam_ready, "Skip" ) )
+      {
+         _cutscene.fadeout = 1;
+         _cutscene.fadeout_start = _cutscene.time;
+         _cutscene.meta.info.end_frame = (f32)_cutscene.meta.info.framerate * (_cutscene.time + 0.25f);
+         menu_close();
+      }
+
+      if( menu_button( ctx, b, R == 1, 1, "No" ) || button_down( k_srbind_mback ) )
+      {
+         vg_audio_lock();
+         vg_audio_oneshot( &audio_ui[3], 1.0f, 0.0f, 0, 0 );
+         vg_audio_unlock();
+         menu_close();
+         return;
+      }
+
+      goto menu_draw;
+   }
 
    /*                              TOP BAR 
     * -------------------------------------------------------------------*/
index 8843bf9141ab88d1299cd6235714afe83e950546..d25fbeb314796a79e7352f9ac2a50179f743f726 100644 (file)
@@ -18,6 +18,7 @@ enum menu_page
    k_menu_page_impromptu_guide,
    k_menu_page_quick,
    k_menu_page_spectate,
+   k_menu_page_cutscene,
 };
 
 enum menu_main_subpage
@@ -43,7 +44,8 @@ struct global_menu
        prem_row,
        prof_row,
        quick_row,
-       spectate_row;
+       spectate_row,
+       cs_row;
    f32 mouse_dist;  /* used for waking up mouse */
 
    f32 repeater;
index 3413c5b7e40d07c14d88862906902f0e9f6ac49b..d5447fc3b3a54d18205830a9af94dbb031976f24 100644 (file)
@@ -149,6 +149,9 @@ void network_publish_laptime( const char *mod_uid, const char *route_uid, f64 la
    if( !network_connected() )
       return;
 
+   if( vg_console.cheats )
+      return;
+
    i32 time_centiseconds = lap_time * 100.0;
 
    netmsg_request *packet = alloca( sizeof(netmsg_request) + 512 );
index 7721707a6deba28cd06759744416dc9993163627..d95fcd0e1ed1561202a4d94219e23c3aaf1efa35 100644 (file)
@@ -414,15 +414,9 @@ static void render_main_game(void)
       struct cs_instance *inst = _cutscene.player_binding;
       struct skeleton *sk = &localplayer.skeleton;
       for( u32 i=0; i<sk->bone_count; i ++ )
-      {
          m4x3_copy( inst->skinning_data[i], localplayer.final_mtx[i] );
-      }
-   }
-   else if( skaterift.activity == k_skaterift_replay )
-   {
-      //FIXME
-      //player__animate_from_replay( &player_replay.local );
    }
+   else if( skaterift.activity == k_skaterift_replay ){}
    else
    {
       player__animate();
index f01cf7b4b4134fb1549e49eca94da8eb97307ffc..96e136adf698d08d251cb9b4ec6a7881428c5e18 100644 (file)
@@ -1,10 +1,12 @@
 struct menu_icon_inf k_menu_icons[] = {{0},
 {14},
 {39},
+{65},
 };
-const char k_menu_icon_descriptions[] = {69,97,114,108,121,32,97,100,111,112,116,101,114,0,71,108,111,98,97,108,32,116,111,112,32,51,32,116,105,109,101,32,114,101,99,111,114,100,0,71,108,111,98,97,108,32,116,111,112,32,49,48,32,116,105,109,101,32,114,101,99,111,114,100,0,};
+const char k_menu_icon_descriptions[] = {69,97,114,108,121,32,97,100,111,112,116,101,114,0,71,108,111,98,97,108,32,116,111,112,32,51,32,116,105,109,101,32,114,101,99,111,114,100,0,71,108,111,98,97,108,32,116,111,112,32,49,48,32,116,105,109,101,32,114,101,99,111,114,100,0,80,114,101,118,105,111,117,115,108,121,32,97,32,114,101,99,111,114,100,32,104,111,108,100,101,114,32,105,110,32,116,104,101,32,102,105,114,115,116,32,121,101,97,114,0,};
 enum menu_icon {
 k_menu_icon_early = 0,
 k_menu_icon_top3 = 1,
 k_menu_icon_top10 = 2,
+k_menu_icon_legend = 3,
 };
index 79f1801c0d068a92a26acf3b2ac23c2d86b79134..aa7d1ee6a4b4e98d8d54928e5a1e13778b573ba6 100644 (file)
@@ -227,7 +227,7 @@ void _user_profile_ui( ui_context *ctx, ui_rect box, u64 steamid )
       enum menu_icon which;
       u16 count;
    }
-   medal_list[5];
+   medal_list[8];
 
    u32 medal_count = 0;
    u16 race3 = 0, race10 = 0;
@@ -244,6 +244,18 @@ void _user_profile_ui( ui_context *ctx, ui_rect box, u64 steamid )
       medal_list[ medal_count++ ].count = _user_profile.race10;
    }
 
+   if( _user_profile.flags & 0x2 )
+   {
+      medal_list[ medal_count   ].which = k_menu_icon_legend;
+      medal_list[ medal_count++ ].count = 1;
+   }
+
+   if( _user_profile.flags & 0x1 )
+   {
+      medal_list[ medal_count   ].which = k_menu_icon_early;
+      medal_list[ medal_count++ ].count = 1;
+   }
+
    if( medal_count )
    {
       vg_ui.frosting = 0.015f;