This repository has been archived by the owner on Aug 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsprite_cards.h
108 lines (103 loc) · 4.58 KB
/
sprite_cards.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#ifndef __SPRITE_CARDS_H__
#define __SPRITE_CARDS_H__
#define SPRITE_CARD_SIZE_W 8
#define SPRITE_CARD_SIZE_H 6
#define SPRITE_CARD_SPADE_A L"┌──────┐" \
L"│ A │" \
L"│ ♠ │" \
L"│ │" \
L"│ │" \
L"└──────┘"
#define SPRITE_CARD_SPADE_2 L"┌──────┐" \
L"│ 2 │" \
L"│ ♠ │" \
L"│ │" \
L"│ │" \
L"└──────┘"
#define SPRITE_CARD_SPADE_3 L"┌──────┐" \
L"│ 3 │" \
L"│ ♠ │" \
L"│ │" \
L"│ │" \
L"└──────┘"
#define SPRITE_CARD_SPADE_4 L"┌──────┐" \
L"│ 4 │" \
L"│ ♠ │" \
L"│ │" \
L"│ │" \
L"└──────┘"
#define SPRITE_CARD_SPADE_5 L"┌──────┐" \
L"│ 5 │" \
L"│ ♠ │" \
L"│ │" \
L"│ │" \
L"└──────┘"
#define SPRITE_CARD_SPADE_6 L"┌──────┐" \
L"│ 6 │" \
L"│ ♠ │" \
L"│ │" \
L"│ │" \
L"└──────┘"
#define SPRITE_CARD_SPADE_7 L"┌──────┐" \
L"│ 7 │" \
L"│ ♠ │" \
L"│ │" \
L"│ │" \
L"└──────┘"
#define SPRITE_CARD_SPADE_8 L"┌──────┐" \
L"│ 8 │" \
L"│ ♠ │" \
L"│ │" \
L"│ │" \
L"└──────┘"
#define SPRITE_CARD_SPADE_9 L"┌──────┐" \
L"│ 9 │" \
L"│ ♠ │" \
L"│ │" \
L"│ │" \
L"└──────┘"
#define SPRITE_CARD_SPADE_J L"┌──────┐" \
L"│ J │" \
L"│ ♠ │" \
L"│ │" \
L"│ │" \
L"└──────┘"
#define SPRITE_CARD_SPADE_Q L"┌──────┐" \
L"│ Q │" \
L"│ ♠ │" \
L"│ │" \
L"│ │" \
L"└──────┘"
#define SPRITE_CARD_SPADE_K L"┌──────┐" \
L"│ K │" \
L"│ ♠ │" \
L"│ │" \
L"│ │" \
L"└──────┘"
#define SPRITE_CARD_UNKNOWN L"┌──────┐" \
L"│ ? │" \
L"│ │" \
L"│ │" \
L"│ │" \
L"└──────┘"
#define SPRITE_CARD(m,n) ( \
(m) == 'S' ? ( \
(n) == 1 ? SPRITE_CARD_SPADE_A : \
(n) == 2 ? SPRITE_CARD_SPADE_2 : \
(n) == 3 ? SPRITE_CARD_SPADE_3 : \
(n) == 4 ? SPRITE_CARD_SPADE_4 : \
(n) == 5 ? SPRITE_CARD_SPADE_5 : \
(n) == 6 ? SPRITE_CARD_SPADE_6 : \
(n) == 7 ? SPRITE_CARD_SPADE_7 : \
(n) == 8 ? SPRITE_CARD_SPADE_8 : \
(n) == 9 ? SPRITE_CARD_SPADE_9 : \
(n) == 10 ? SPRITE_CARD_SPADE_J : \
(n) == 11 ? SPRITE_CARD_SPADE_Q : \
(n) == 12 ? SPRITE_CARD_SPADE_K : \
SPRITE_CARD_UNKNOWN \
): \
SPRITE_CARD_UNKNOWN \
)
#define CREATE_CARD_SPRITE(m,n) \
create_sprite(SPRITE_CARD_SIZE_W, SPRITE_CARD_SIZE_H, SPRITE_CARD((m), (n)));
#endif