2020-11-01 16:45:29 +01:00
|
|
|
#pragma once
|
2020-11-15 15:39:00 +01:00
|
|
|
#include "gdrv.h"
|
2020-11-01 16:45:29 +01:00
|
|
|
|
2020-11-07 16:41:14 +01:00
|
|
|
struct scoreStruct
|
2020-11-01 16:45:29 +01:00
|
|
|
{
|
2020-12-12 14:36:20 +01:00
|
|
|
int Score;
|
|
|
|
bool DirtyFlag;
|
2020-11-15 15:39:00 +01:00
|
|
|
gdrv_bitmap8* BackgroundBmp;
|
2020-12-12 14:36:20 +01:00
|
|
|
int OffsetX;
|
|
|
|
int OffsetY;
|
|
|
|
int Width;
|
|
|
|
int Height;
|
|
|
|
gdrv_bitmap8* CharBmp[10];
|
2020-11-01 16:45:29 +01:00
|
|
|
};
|
|
|
|
|
2020-12-03 15:47:36 +01:00
|
|
|
struct score_msg_font_type
|
|
|
|
{
|
2020-12-11 17:03:13 +01:00
|
|
|
int GapWidth;
|
|
|
|
int Height;
|
2021-10-10 11:22:21 +02:00
|
|
|
gdrv_bitmap8* Chars[128]{};
|
2020-12-11 17:03:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2020-11-01 16:45:29 +01:00
|
|
|
class score
|
|
|
|
{
|
|
|
|
public:
|
2020-12-03 15:47:36 +01:00
|
|
|
static score_msg_font_type* msg_fontp;
|
2020-11-07 16:41:14 +01:00
|
|
|
static int init();
|
2020-11-15 15:39:00 +01:00
|
|
|
static scoreStruct* create(LPCSTR fieldName, gdrv_bitmap8* renderBgBmp);
|
2020-11-01 16:45:29 +01:00
|
|
|
static scoreStruct* dup(scoreStruct* score, int scoreIndex);
|
2020-12-11 17:03:13 +01:00
|
|
|
static void load_msg_font(LPCSTR lpName);
|
2020-12-04 16:35:47 +01:00
|
|
|
static void unload_msg_font();
|
2020-12-12 14:36:20 +01:00
|
|
|
static void erase(scoreStruct* score, int blitFlag);
|
|
|
|
static void set(scoreStruct* score, int value);
|
|
|
|
static void update(scoreStruct* score);
|
|
|
|
static void string_format(int score, char* str);
|
2020-11-01 16:45:29 +01:00
|
|
|
};
|