2019-12-01 15:32:22 +00:00
|
|
|
typedef enum {
|
2020-01-29 07:57:06 +00:00
|
|
|
PLAYCHAR_REIMU = 0,
|
|
|
|
PLAYCHAR_MIMA = 1,
|
|
|
|
PLAYCHAR_MARISA = 2,
|
|
|
|
PLAYCHAR_ELLEN = 3,
|
|
|
|
PLAYCHAR_KOTOHIME = 4,
|
|
|
|
PLAYCHAR_KANA = 5,
|
|
|
|
PLAYCHAR_RIKAKO = 6,
|
|
|
|
PLAYCHAR_CHIYURI = 7,
|
|
|
|
PLAYCHAR_YUMEMI = 8,
|
|
|
|
PLAYCHAR_COUNT = 9,
|
2019-12-01 15:32:22 +00:00
|
|
|
} playchars_t;
|
2019-12-01 17:13:28 +00:00
|
|
|
|
2020-02-19 14:53:51 +00:00
|
|
|
// Encodes a playchars_t together with its alternate palette flag.
|
|
|
|
#pragma option -a1
|
|
|
|
struct playchar_paletted_t {
|
|
|
|
unsigned char v;
|
|
|
|
|
|
|
|
int filename_id() const {
|
|
|
|
return (v - 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
playchars_t char_id() const {
|
|
|
|
return static_cast<playchars_t>(filename_id() / 2);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
#pragma option -a.
|
|
|
|
|
|
|
|
#define TO_PALETTED(playchar) ((playchar << 1) + 1)
|