Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
List
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
REIKAI
ygopro
Commits
20babc45
Commit
20babc45
authored
May 19, 2018
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync with edo
parent
fba37799
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+6
-6
gframe/deck_manager.h
gframe/deck_manager.h
+1
-1
No files found.
gframe/deck_manager.cpp
View file @
20babc45
...
...
@@ -314,23 +314,23 @@ bool DeckManager::DeleteDeck(Deck& deck, const wchar_t* name) {
#endif
}
const
wchar_t
*
DeckManager
::
GetMainFormatString
()
{
myswprintf
(
DeckFormatBuffer
,
L"%d ( Monster: %d / Spell: %d / Trap: %d )"
,
current_deck
.
main
.
size
(),
GetTypeCount
(
current_deck
.
main
,
TYPE_MONSTER
),
GetTypeCount
(
current_deck
.
main
,
TYPE_SPELL
),
Get
TypeCount
(
current_deck
.
main
,
TYPE_TRAP
));
myswprintf
(
DeckFormatBuffer
,
L"%d ( Monster: %d / Spell: %d / Trap: %d )"
,
current_deck
.
main
.
size
(),
TypeCount
(
current_deck
.
main
,
TYPE_MONSTER
),
TypeCount
(
current_deck
.
main
,
TYPE_SPELL
),
TypeCount
(
current_deck
.
main
,
TYPE_TRAP
));
wchar_t
*
result
=
DeckFormatBuffer
;
return
result
;
}
const
wchar_t
*
DeckManager
::
GetExtraFormatString
()
{
myswprintf
(
DeckFormatBuffer
,
L"%d ( Fusion: %d / Synchro: %d / Xyz: %d / Link: %d )"
,
current_deck
.
extra
.
size
(),
GetTypeCount
(
current_deck
.
extra
,
TYPE_FUSION
),
GetTypeCount
(
current_deck
.
extra
,
TYPE_SYNCHRO
),
GetTypeCount
(
current_deck
.
extra
,
TYPE_XYZ
),
Get
TypeCount
(
current_deck
.
extra
,
TYPE_LINK
));
myswprintf
(
DeckFormatBuffer
,
L"%d ( Fusion: %d / Synchro: %d / Xyz: %d / Link: %d )"
,
current_deck
.
extra
.
size
(),
TypeCount
(
current_deck
.
extra
,
TYPE_FUSION
),
TypeCount
(
current_deck
.
extra
,
TYPE_SYNCHRO
),
TypeCount
(
current_deck
.
extra
,
TYPE_XYZ
),
TypeCount
(
current_deck
.
extra
,
TYPE_LINK
));
wchar_t
*
result
=
DeckFormatBuffer
;
return
result
;
}
const
wchar_t
*
DeckManager
::
GetSideFormatString
()
{
int
mc
=
Get
TypeCount
(
current_deck
.
side
,
TYPE_MONSTER
);
int
ec
=
Get
TypeCount
(
current_deck
.
side
,
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
);
myswprintf
(
DeckFormatBuffer
,
L"%d ( Monster: %d / Spell: %d / Trap: %d / Extra: %d )"
,
current_deck
.
side
.
size
(),
mc
-
ec
,
GetTypeCount
(
current_deck
.
side
,
TYPE_SPELL
),
Get
TypeCount
(
current_deck
.
side
,
TYPE_TRAP
),
ec
);
int
mc
=
TypeCount
(
current_deck
.
side
,
TYPE_MONSTER
);
int
ec
=
TypeCount
(
current_deck
.
side
,
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
);
myswprintf
(
DeckFormatBuffer
,
L"%d ( Monster: %d / Spell: %d / Trap: %d / Extra: %d )"
,
current_deck
.
side
.
size
(),
mc
-
ec
,
TypeCount
(
current_deck
.
side
,
TYPE_SPELL
),
TypeCount
(
current_deck
.
side
,
TYPE_TRAP
),
ec
);
wchar_t
*
result
=
DeckFormatBuffer
;
return
result
;
}
int
DeckManager
::
Get
TypeCount
(
std
::
vector
<
code_pointer
>
list
,
unsigned
int
ctype
)
{
int
DeckManager
::
TypeCount
(
std
::
vector
<
code_pointer
>
list
,
unsigned
int
ctype
)
{
int
res
=
0
;
for
(
size_t
i
=
0
;
i
<
list
.
size
();
++
i
)
{
code_pointer
cur
=
list
[
i
];
...
...
gframe/deck_manager.h
View file @
20babc45
...
...
@@ -49,7 +49,7 @@ public:
const
wchar_t
*
GetMainFormatString
();
const
wchar_t
*
GetSideFormatString
();
const
wchar_t
*
GetExtraFormatString
();
int
Get
TypeCount
(
std
::
vector
<
code_pointer
>
list
,
unsigned
int
ctype
);
int
TypeCount
(
std
::
vector
<
code_pointer
>
list
,
unsigned
int
ctype
);
};
extern
DeckManager
deckManager
;
...
...
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