linije

Клон игре Color lines
git clone https://git.sr.ht/~strahinja/linije
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

hiscore.h (753B)


      1 /* This program is licensed under the terms of GNU GPL v3 or (at your option)
      2  * any later version. Copyright (C) 2025  Страхиња Радић.
      3  * See the file LICENSE for exact copyright and license details. */
      4 
      5 #define HI_SCORE_DEFAULT_NAME "Unknown player"
      6 #define HI_SCORE_MAX 10
      7 
      8 struct HiScoreEntry {
      9 	char* name;
     10 	int name_len;
     11 	int score;
     12 };
     13 
     14 int hs_add(struct HiScoreEntry** table, const char* name, const int name_len,
     15 	const int score);
     16 int hs_assign(const struct HiScoreEntry* source, struct HiScoreEntry* dest);
     17 int hs_assign_ss(const struct HiScoreEntry* source, struct HiScoreEntry* dest);
     18 int hs_assign_ps(const char* name, const int name_len, const int score,
     19 	struct HiScoreEntry* dest);
     20 int hs_init(struct HiScoreEntry** table);