2 * Copyright (C) 2021-2022 Mt.ZERO Software, Harry Godden - All Rights Reserved
8 #include "vg/vg_store.h"
9 #include "vg/vg_stdint.h"
10 #include "world_info.h"
13 * Designed to be used across client and server,
14 * for the client its only storing the local users records, for server its
18 typedef struct highscore highscore
;
19 typedef struct highscore_record highscore_record
;
20 typedef struct highscore_track_table highscore_track_table
;
21 typedef struct highscore_database highscore_database
;
22 typedef struct highscore_playerinfo highscore_playerinfo
;
26 struct highscore_playerinfo
33 aatree_pool_node aapn
;
34 aatree_node aa_playerid
;
38 struct highscore_record
40 u16 trackid
, points
, time
, reserved0
;
56 aatree_pool_node pool
;
60 struct highscore_track_table
62 aatree_ptr root_points
,
70 struct highscore_database
72 highscore_track_table tracks
[ 128 ];
74 aatree_ptr pool_head
, playerinfo_head
;
76 playerinfo_capacity
, playerinfo_root
;
83 VG_STATIC
struct highscore_system
85 highscore_database dbheader
;
91 aainfo_playerinfo_playerid
,
97 u32 pool_size
, playerinfo_pool_size
;
101 VG_STATIC
int highscore_intr( char *buf
, int value
, int len
, char alt
);
102 VG_STATIC
int highscore_intl( char *buf
, int value
, int len
);
103 VG_STATIC
void highscores_board_printf( FILE *fp
, const char *buf
, u32 count
);
105 #endif /* HIGHSCORES_H */