-
Notifications
You must be signed in to change notification settings - Fork 1
/
basic-deck.nde
35 lines (29 loc) · 1.42 KB
/
basic-deck.nde
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
INCLUDE=deck-common.nde
INCLUDE=deck-macros.nde
'info
[suits]=spades.png|hearts.png|diamonds.png|clubs.png
[colors]=#000000|#FF0000|#FF0000|#000000
[deckname]=basic-deck.png
[numsuits]=4
[numcards]=52
[numlines]=58
[cardrange]="1-52"
'rectangle=[cardrange],[wid_border],[ht_border_mod],[wid_internal],[ht_internal_mod],#DDDDDD
LINK = "data-basic-deck.csv"
CARDS=[num_tts_cards]
[img_suit]=JOIN([dir_img],"/",[suits])
FOR=a,1,[numlines]
FOR=b,0,[numsuits]-1
; make Ace of Spade bigger. swap [base_scale] with [ace_scale]
if = ({suits?{b+1}} = spades.png) _AND_ ({cornervalue?a} = A)
DRAWPIP = {{cardvalue?a}+13*b}, {img_suit?{b+1}}, {[wid_internal]*({x?a}/[wid_cells]) - ({scale?a}*[ace_scale])/2 + [wid_border]}, {[ht_internal] *({y?a}/[ht_cells]) - {{scale?a}*[ace_scale]}/2 + [ht_border]}, {{scale?a}*[ace_scale]},{angle?a},{flags?a}
else
DRAWPIP = {{cardvalue?a}+13*b}, {img_suit?{b+1}}, {[wid_internal]*({x?a}/[wid_cells]) - ({scale?a}*[base_scale])/2 + [wid_border]}, {[ht_internal] *({y?a}/[ht_cells]) - {{scale?a}*[base_scale]}/2 + [ht_border]}, {{scale?a}*[base_scale]},{angle?a},{flags?a}
endif
CORNER_ICON = {{cardvalue?a}+13*b},{img_suit?{b+1}},{cornervalue?a},{colors?{b+1}}
if = {imgface?a} <> 0
image={{cardvalue?a}+13*b},{imgface?a},50%-[wid_face]/2,{yface?a},[wid_face],[ht_face],0,TP
endif
NEXT
NEXT
SAVETTS=[num_tts_cards],[dir_tts]/[deckname]