Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
70b48d72
Commit
70b48d72
authored
May 18, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in fields in style file;
No longer doing GetTextExtent("\n"); Moved pt boxes to style files;
parent
c3dfc73e
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
316 additions
and
240 deletions
+316
-240
data/magic-extended-art.mse-style/style
data/magic-extended-art.mse-style/style
+19
-11
data/magic-firepenguinmaster-flip.mse-style/style
data/magic-firepenguinmaster-flip.mse-style/style
+36
-23
data/magic-firepenguinmaster.mse-style/style
data/magic-firepenguinmaster.mse-style/style
+21
-12
data/magic-firepenguinmasterpromo.mse-style/style
data/magic-firepenguinmasterpromo.mse-style/style
+22
-13
data/magic-firepenguinmastersplit.mse-style/style
data/magic-firepenguinmastersplit.mse-style/style
+37
-24
data/magic-firepenguinmastertokens.mse-style/style
data/magic-firepenguinmastertokens.mse-style/style
+22
-13
data/magic-new-flip.mse-style/style
data/magic-new-flip.mse-style/style
+38
-34
data/magic-new-promo.mse-style/style
data/magic-new-promo.mse-style/style
+23
-20
data/magic-new-split.mse-style/style
data/magic-new-split.mse-style/style
+33
-20
data/magic-new.mse-style/style
data/magic-new.mse-style/style
+30
-11
data/magic-planeshifted.mse-style/style
data/magic-planeshifted.mse-style/style
+18
-10
data/magic.mse-game/game
data/magic.mse-game/game
+0
-42
src/render/text/font.cpp
src/render/text/font.cpp
+12
-6
src/util/index_map.hpp
src/util/index_map.hpp
+5
-1
No files found.
data/magic-extended-art.mse-style/style
View file @
70b48d72
...
...
@@ -234,17 +234,6 @@ card style:
color: rgb(0,0,0)
separator color: rgb(200,0,0)
pt box:
left: 271
top: 461
width: 81
height: 42
z index: 1
visible: { card.pt != "" }
render style: image
mask: mask_pt.png
include file: magic-blends.mse-include/card-ptboxes
############################# Copyright stuff
illustrator:
...
...
@@ -268,3 +257,22 @@ card style:
name: MPlantin
size: 6
color: { font_color() }
############################################################## Extra card fields
extra card field:
type: choice
name: pt box
script: card.card_color
extra card style:
pt box:
left: 271
top: 461
width: 81
height: 42
z index: 1
visible: { card.pt != "" }
render style: image
mask: mask_pt.png
include file: magic-blends.mse-include/card-ptboxes
data/magic-firepenguinmaster-flip.mse-style/style
View file @
70b48d72
...
...
@@ -119,9 +119,9 @@ card style:
size: 20
color: rgb(0,0,0)
casting cost:
left:
32
left:
17
top : 150
width:
10
width:
25
height: 195
alignment: top right
direction: vertical
...
...
@@ -160,7 +160,7 @@ card style:
casting cost 2:
left: 334
top : 170
width:
10
width:
25
height: 170
alignment: top right
direction: vertical
...
...
@@ -335,16 +335,6 @@ card style:
shadow color: rgb(0,0,0)
shadow displacement x: 1
shadow displacement y: 1
ptsymbols:
left: 24
top: 340
width: 19
height: 103
z index: 1
visible: { card.power != "" or card.toughness != "" }
render style: image
choice images:
shieldsword: ptshieldsword.png
power 2:
z index: 4
left: 334
...
...
@@ -377,16 +367,6 @@ card style:
shadow color: rgb(0,0,0)
shadow displacement x: 1
shadow displacement y: 1
ptsymbols 2:
left: 333
top: 58
width: 19
height: 103
z index: 1
visible: { card.power_2 != "" or card.toughness_2 != "" }
render style: image
choice images:
shieldsword: ptshieldsword-2.png
############################# Copyright stuff
illustrator:
...
...
@@ -414,3 +394,36 @@ card style:
name: MPlantin
size: 7
color: { font_color() }
############################################################## Extra card fields
extra card field:
type: choice
name: pt symbols
script: "shieldsword"
extra card field:
type: choice
name: pt symbols 2
script: "shieldsword"
extra card style:
pt symbols:
left: 24
top: 340
width: 19
height: 103
z index: 1
visible: { card.power != "" or card.toughness != "" }
render style: image
choice images:
shieldsword: ptshieldsword.png
pt symbols 2:
left: 333
top: 58
width: 19
height: 103
z index: 1
visible: { card.power_2 != "" or card.toughness_2 != "" }
render style: image
choice images:
shieldsword: ptshieldsword-2.png
data/magic-firepenguinmaster.mse-style/style
View file @
70b48d72
...
...
@@ -141,9 +141,9 @@ card style:
size: 20
color: rgb(0,0,0)
casting cost:
left:
35
left:
18
top : 55
width:
10
width:
27
height: 250
direction: vertical
alignment: top right
...
...
@@ -271,16 +271,6 @@ card style:
shadow color: rgb(0,0,0)
shadow displacement x: 1
shadow displacement y: 1
ptsymbols:
left: 25
top: 362
width: 19
height: 103
z index: 1
visible: { card.power != "" or card.toughness != "" }
render style: image
choice images:
shieldsword: ptshieldsword.png
############################# Card sorting / numbering
############################# Copyright stuff
...
...
@@ -311,3 +301,22 @@ card style:
name: MPlantin
size: 7
color: { font_color() }
############################################################## Extra card fields
extra card field:
type: choice
name: pt symbols
script: "shieldsword"
extra card style:
pt symbols:
left: 25
top: 362
width: 19
height: 103
z index: 1
visible: { card.power != "" or card.toughness != "" }
render style: image
choice images:
shieldsword: ptshieldsword.png
data/magic-firepenguinmasterpromo.mse-style/style
View file @
70b48d72
...
...
@@ -148,9 +148,9 @@ card style:
size: 20
color: rgb(0,0,0)
casting cost:
left:
25
left:
18
top : 55
width: 2
0
width: 2
7
height: 250
direction: vertical
alignment: top right
...
...
@@ -270,17 +270,6 @@ card style:
shadow displacement x: 1
shadow displacement y: 1
ptsymbols:
left: 25
top: 362
width: 19
height: 103
z index: 1
visible: { card.power != "" or card.toughness != "" }
render style: image
choice images:
shieldsword: ptshieldsword.png
############################# Copyright stuff
illustrator:
...
...
@@ -315,3 +304,23 @@ card style:
{ if card.font_color = "white" then rgb(255,255,255)
else if card.font_color = "black" then rgb(0,0,0)
else rgb(0,0,0) }
############################################################## Extra card fields
extra card field:
type: choice
name: pt symbols
script: "shieldsword"
extra card style:
pt symbols:
left: 25
top: 362
width: 19
height: 103
z index: 1
visible: { card.power != "" or card.toughness != "" }
render style: image
choice images:
shieldsword: ptshieldsword.png
data/magic-firepenguinmastersplit.mse-style/style
View file @
70b48d72
...
...
@@ -163,9 +163,9 @@ card style:
size: 13.85
color: rgb(0,0,0)
casting cost:
left:
31.24
left:
18.67
top : 45
width:
6.93
width:
19.5
height: 173.16
alignment: top right
direction: vertical
...
...
@@ -178,9 +178,9 @@ card style:
padding top: 0
z index: 2
casting cost 2:
left: 2
84.73
left: 2
72.16
top : 45
width:
6.93
width:
19.5
height: 173.16
alignment: top right
direction: vertical
...
...
@@ -412,26 +412,6 @@ card style:
shadow color: rgb(0,0,0)
shadow displacement x: 1
shadow displacement y: 1
ptsymbols:
left: 23.32
top: 256
width: 13.16
height: 71.34
z index: 1
visible: { card.power != "" or card.toughness != "" }
render style: image
choice images:
shieldsword: ptshieldsword.png
ptsymbols 2:
left: 276.81
top: 256
width: 13.16
height: 71.34
z index: 1
visible: { card.power_2 != "" or card.toughness_2 != "" }
render style: image
choice images:
shieldsword: ptshieldsword.png
############################# Copyright stuff
illustrator:
...
...
@@ -484,3 +464,36 @@ card style:
name: MPlantin
size: 4.85
color: { font_color_2() }
############################################################## Extra card fields
extra card field:
type: choice
name: pt symbols
script: "shieldsword"
extra card field:
type: choice
name: pt symbols 2
script: "shieldsword"
extra card style:
pt symbols:
left: 23.32
top: 256
width: 13.16
height: 71.34
z index: 1
visible: { card.power != "" or card.toughness != "" }
render style: image
choice images:
shieldsword: ptshieldsword.png
pt symbols 2:
left: 276.81
top: 256
width: 13.16
height: 71.34
z index: 1
visible: { card.power_2 != "" or card.toughness_2 != "" }
render style: image
choice images:
shieldsword: ptshieldsword.png
data/magic-firepenguinmastertokens.mse-style/style
View file @
70b48d72
...
...
@@ -144,9 +144,9 @@ card style:
visible:
script: styling.cardname_font == "Matrix"
casting cost:
left:
25
left:
18
top : 55
width: 2
0
width: 2
7
height: 250
alignment: top right
direction: vertical
...
...
@@ -301,17 +301,6 @@ card style:
shadow displacement x: 1
shadow displacement y: 1
ptsymbols:
left: 25
top: 362
width: 19
height: 103
z index: 1
visible: { card.power != "" or card.toughness != "" }
render style: image
choice images:
shieldsword: ptshieldsword.png
############################# Copyright stuff
illustrator:
...
...
@@ -340,3 +329,23 @@ card style:
name: MPlantin
size: 7
color: { font_color() }
############################################################## Extra card fields
extra card field:
type: choice
name: pt symbols
script: "shieldsword"
extra card style:
pt symbols:
left: 25
top: 362
width: 19
height: 103
z index: 1
visible: { card.power != "" or card.toughness != "" }
render style: image
choice images:
shieldsword: ptshieldsword.png
data/magic-new-flip.mse-style/style
View file @
70b48d72
...
...
@@ -112,11 +112,9 @@ card style:
############################# Name line
name:
left:
script: if card.card_symbol=="none" then 32 else 51
left: {if card.card_symbol=="none" then 32 else 51}
top : 30
width:
script: if card.card_symbol=="none" then 246 else 227
width: {if card.card_symbol=="none" then 246 else 227}
height: 23
alignment: bottom shrink-overflow
padding bottom: 0
...
...
@@ -171,8 +169,7 @@ card style:
padding top: 0
card symbol:
left:
script: if card.card_symbol=="none" then 20 else 32
left: {if card.card_symbol=="none" then 20 else 32}
top : 31
height: 20
width: 14
...
...
@@ -338,30 +335,6 @@ card style:
color: rgb(0,0,0)
separator color: rgb(200,0,0)
############################# PT, by Guinea Pig
########### pt box 1 needs to be at 286/124 (captured at 285/123), pt box 2 at 17/342 (captured at 17/342)
pt box:
left: 286
top: 123
width: 70
height: 38
z index: 1
visible:
script: card.pt != ""
render style: image
include file: magic-blends.mse-include/flip-ptboxes
pt box 1b:
left: 17
top: 342
width: 70
height: 38
z index: 2
visible:
script: card.pt_2 != ""
render style: image
include file: magic-blends.mse-include/flip-ptboxes2
############################# Card sorting / numbering
############################# Copyright stuff
...
...
@@ -374,8 +347,7 @@ card style:
font:
name: Matrix
size: 12
color:
script: font_color()
color: { font_color() }
copyright line:
left: 26
...
...
@@ -386,5 +358,37 @@ card style:
font:
name: MPlantin
size: 8
color:
script: font_color()
color: { font_color() }
############################################################## Extra card fields
extra card field:
type: choice
name: pt box
script: card.card_color
extra card field:
type: choice
name: pt box 2
script: card.card_color
extra card style:
pt box:
left: 286
top: 123
width: 70
height: 38
z index: 1
visible: { card.pt != "" }
render style: image
include file: magic-blends.mse-include/flip-ptboxes
pt box 2:
left: 17
top: 342
width: 70
height: 38
z index: 2
visible: { card.pt_2 != "" }
render style: image
include file: magic-blends.mse-include/flip-ptboxes2
data/magic-new-promo.mse-style/style
View file @
70b48d72
...
...
@@ -120,11 +120,9 @@ card style:
############################# Name line
name:
left:
script: if card.card_symbol=="none" then 32 else 51
left: { if card.card_symbol=="none" then 32 else 51 }
top : 30
width:
script: if card.card_symbol=="none" then 246 else 227
width: { if card.card_symbol=="none" then 246 else 227 }
height: 23
alignment: bottom shrink-overflow
padding bottom: 0
...
...
@@ -148,8 +146,7 @@ card style:
z index: 2
padding top: 0
card symbol:
left:
script: if card.card_symbol=="none" then 20 else 32
left: { if card.card_symbol=="none" then 20 else 32 }
top : 31
height: 20
width: 14
...
...
@@ -240,18 +237,6 @@ card style:
color: rgb(0,0,0)
separator color: rgb(200,0,0)
pt box:
left: 271
top: 461
width: 81
height: 42
z index: 1
visible:
script: card.pt != ""
render style: image
mask: mask_pt.png
include file: magic-blends.mse-include/card-ptboxes
############################# Card sorting / numbering
############################# Copyright stuff
...
...
@@ -276,5 +261,23 @@ card style:
font:
name: MPlantin
size: 8
color:
script: font_color()
color: { font_color() }
############################################################## Extra card fields
extra card field:
type: choice
name: pt box
script: card.card_color
extra card style:
pt box:
left: 271
top: 461
width: 81
height: 42
z index: 1
visible: { card.pt != "" }
render style: image
mask: mask_pt.png
include file: magic-blends.mse-include/card-ptboxes
data/magic-new-split.mse-style/style
View file @
70b48d72
...
...
@@ -357,26 +357,6 @@ card style:
color: rgb(0,0,0)
separator color: rgb(200,0,0)
pt box:
left: 194
top: 326
width: 56
height: 29
z index: 1
visible: { card.pt != "" }
render style: image
include file: magic-blends.mse-include/card-ptboxes
pt box 2:
left: 445
top: 326
width: 56
height: 29
z index: 1
visible: { card.pt_2 != "" }
render style: image
include file: magic-blends.mse-include/card-ptboxes
############################# Card sorting / numbering
############################# Copyright stuff
...
...
@@ -423,3 +403,36 @@ card style:
name: MPlantin
size: 6
color: { font_color_2() }
############################################################## Extra card fields
extra card field:
type: choice
name: pt box
script: card.card_color
extra card field:
type: choice
name: pt box 2
script: card.card_color_2
extra card style:
pt box:
left: 194
top: 326
width: 56
height: 29
z index: 1
visible: { card.pt != "" }
render style: image
include file: magic-blends.mse-include/card-ptboxes
pt box 2:
left: 445
top: 326
width: 56
height: 29
z index: 1
visible: { card.pt_2 != "" }
render style: image
include file: magic-blends.mse-include/card-ptboxes
data/magic-new.mse-style/style
View file @
70b48d72
...
...
@@ -92,6 +92,11 @@ styling field:
choice: modern
choice: old
choice: diagonal T
styling field:
type: boolean
name: center short text
description: Center the text on cards with short rule text and no flavor text.
initial: yes
styling style:
artifact style:
...
...
@@ -235,7 +240,13 @@ card style:
then "magic-mana-large"
else "magic-mana-small"
size: 14
alignment: middle left
alignment:
script:
if styling.center_short_text and
not contains(match:"\n", card.rule_text) and
card.flavor_text == "<i-flavor></i-flavor>"
then "middle center"
else "middle left"
z index: 2
padding left: 6
padding top: 2
...
...
@@ -269,16 +280,6 @@ card style:
color: rgb(0,0,0)
separator color: rgb(200,0,0)
pt box:
left: 271
top: 461
width: 81
height: 42
z index: 1
visible: { card.pt != "" }
render style: image
include file: magic-blends.mse-include/card-ptboxes
############################# Card sorting / numbering
############################# Copyright stuff
...
...
@@ -304,3 +305,21 @@ card style:
name: MPlantin
size: 6.5
color: { font_color() }
############################################################## Extra card fields
extra card field:
type: choice
name: pt box
script: card.card_color
extra card style:
pt box:
left: 271
top: 461
width: 81
height: 42
z index: 1
visible: { card.pt != "" }
render style: image
include file: magic-blends.mse-include/card-ptboxes
data/magic-planeshifted.mse-style/style
View file @
70b48d72
...
...
@@ -245,16 +245,6 @@ card style:
shadow displacement y: 1
separator color: rgb(200,0,0)
pt box:
left: 271
top: 461
width: 81
height: 42
z index: 1
visible: { card.pt != "" }
render style: image
include file: magic-blends.mse-include/card-ptboxes
############################# Card sorting / numbering
############################# Copyright stuff
...
...
@@ -280,3 +270,21 @@ card style:
name: MPlantin
size: 6.5
color: { font_color() }
############################################################## Extra card fields
extra card field:
type: choice
name: pt box
script: card.card_color
extra card style:
pt box:
left: 271
top: 461
width: 81
height: 42
z index: 1
visible: { card.pt != "" }
render style: image
include file: magic-blends.mse-include/card-ptboxes
data/magic.mse-game/game
View file @
70b48d72
...
...
@@ -720,14 +720,6 @@ card field:
type: text
name: toughness
icon: stats/toughness.png
#needed for FPM temps
card field:
type: choice
name: ptsymbols
choice: shieldsword
editable: false
save value: false
show statistics: false
card field:
type: text
name: pt
...
...
@@ -747,15 +739,6 @@ card field:
description: Power/toughness
show statistics: false
card field: # box for power/toughness
type: choice
name: pt box
include file: magic-blends.mse-include/card-colors
script: card.card_color
editable: false
save value: false
show statistics: false
############################# Card sorting / numbering
card field:
type: text
...
...
@@ -920,14 +903,6 @@ card field:
name: toughness 2
icon: stats/toughness.png
show statistics: false
#needed for FPM temps
card field:
type: choice
name: ptsymbols 2
choice: shieldsword
editable: false
save value: false
show statistics: false
card field:
type: text
name: pt 2
...
...
@@ -943,23 +918,6 @@ card field:
card list width: 50
card list name: P/T2
show statistics: false
card field:
type: choice
name: pt box 2
include file: magic-blends.mse-include/card-colors
script: card.card_color_2
editable: false
save value: false
show statistics: false
card field:
# Another pt box witht the same value as pt box 1
type: choice
name: pt box 1b
include file: magic-blends.mse-include/card-colors
script: card.card_color
editable: false
save value: false
show statistics: false
card field:
type: text
name: illustrator 2
...
...
src/render/text/font.cpp
View file @
70b48d72
...
...
@@ -33,14 +33,20 @@ void FontTextElement::getCharInfo(RotatedDC& dc, double scale, vector<CharInfo>&
dc
.
SetFont
(
*
font
,
scale
);
// find sizes & breaks
double
prev_width
=
0
;
size_t
line_start
=
start
;
// start of the current line
for
(
size_t
i
=
start
;
i
<
end
;
++
i
)
{
Char
c
=
content
.
GetChar
(
i
-
this
->
start
);
RealSize
s
=
dc
.
GetTextExtent
(
content
.
substr
(
start
-
this
->
start
,
i
-
start
+
1
));
out
.
push_back
(
CharInfo
(
RealSize
(
s
.
width
-
prev_width
,
s
.
height
),
c
==
_
(
'\n'
)
?
break_style
:
c
==
_
(
' '
)
?
BREAK_SOFT
:
BREAK_MAYBE
));
prev_width
=
s
.
width
;
if
(
c
==
_
(
'\n'
))
{
out
.
push_back
(
CharInfo
(
RealSize
(
0
,
dc
.
GetCharHeight
()),
break_style
));
line_start
=
i
+
1
;
prev_width
=
0
;
}
else
{
RealSize
s
=
dc
.
GetTextExtent
(
content
.
substr
(
line_start
-
this
->
start
,
i
-
line_start
+
1
));
out
.
push_back
(
CharInfo
(
RealSize
(
s
.
width
-
prev_width
,
s
.
height
),
c
==
_
(
' '
)
?
BREAK_SOFT
:
BREAK_MAYBE
));
prev_width
=
s
.
width
;
}
}
}
...
...
src/util/index_map.hpp
View file @
70b48d72
...
...
@@ -44,7 +44,11 @@ class IndexMap : private vector<Value> {
/// Initialize this map with default values given a list of keys
/** has no effect if already initialized with the given keys */
bool
init
(
const
vector
<
Key
>&
keys
)
{
if
(
this
->
size
()
==
keys
.
size
()
&&
(
this
->
empty
()
||
get_key
(
this
->
front
())
==
keys
.
front
()))
return
false
;
if
(
!
this
->
empty
()
&&
(
keys
.
empty
()
||
get_key
(
this
->
front
())
!=
keys
.
front
()))
{
// switch to different keys
clear
();
}
if
(
this
->
size
()
==
keys
.
size
())
return
false
;
this
->
reserve
(
keys
.
size
());
for
(
typename
vector
<
Key
>::
const_iterator
it
=
keys
.
begin
()
;
it
!=
keys
.
end
()
;
++
it
)
{
const
Key
&
key
=
*
it
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment