76cfb3cdade24194da2dc6583cd0a50c0745ebb5
10 static void skaterift_write_savedata(void){
12 sav
.buf
= savedata
.buf
;
13 sav
.max
= sizeof(savedata
.buf
);
15 vg_msg_frame( &sav
, "player" );
17 if( localplayer
.board_view_slot
){
18 struct cache_board
*cache_ptr
= localplayer
.board_view_slot
;
19 if( cache_ptr
->reg_ptr
){
20 if( cache_ptr
->reg_ptr
->workshop_id
)
21 vg_msg_wkvu64( &sav
, "board", cache_ptr
->reg_ptr
->workshop_id
);
23 vg_msg_wkvstr( &sav
, "board", cache_ptr
->reg_ptr
->foldername
);
27 vg_msg_end_frame( &sav
);
28 savedata
.len
= sav
.len
;
30 FILE *fp
= fopen( "save.bkv", "wb" );
32 fwrite( savedata
.buf
, sav
.len
, 1, fp
);
37 static void skaterift_read_savedata(void){
38 FILE *fp
= fopen( "save.bkv", "rb" );
40 savedata
.len
= fread( savedata
.buf
, 1, sizeof(savedata
.buf
), fp
);