Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
fallenstardust
YGOMobile
Commits
18b078ba
Commit
18b078ba
authored
Sep 24, 2022
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
showing pack lists
minor change declare order
parent
a6f67de7
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
325 additions
and
211 deletions
+325
-211
Classes/gframe/data_manager.cpp
Classes/gframe/data_manager.cpp
+5
-9
Classes/gframe/data_manager.h
Classes/gframe/data_manager.h
+2
-2
Classes/gframe/deck_con.cpp
Classes/gframe/deck_con.cpp
+60
-13
Classes/gframe/deck_con.h
Classes/gframe/deck_con.h
+4
-1
Classes/gframe/deck_manager.cpp
Classes/gframe/deck_manager.cpp
+47
-16
Classes/gframe/deck_manager.h
Classes/gframe/deck_manager.h
+9
-4
Classes/gframe/drawing.cpp
Classes/gframe/drawing.cpp
+82
-67
Classes/gframe/duelclient.cpp
Classes/gframe/duelclient.cpp
+2
-0
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+19
-5
Classes/gframe/game.h
Classes/gframe/game.h
+92
-94
mobile/assets/data/conf/strings.conf
mobile/assets/data/conf/strings.conf
+1
-0
mobile/assets_en/data/conf/strings.conf
mobile/assets_en/data/conf/strings.conf
+1
-0
mobile/assets_ko/data/conf/strings.conf
mobile/assets_ko/data/conf/strings.conf
+1
-0
No files found.
Classes/gframe/data_manager.cpp
View file @
18b078ba
...
...
@@ -11,13 +11,8 @@ DataManager dataManager;
bool
DataManager
::
LoadDB
(
const
wchar_t
*
wfile
)
{
char
file
[
256
];
wchar_t
strBuffer
[
4096
];
BufferIO
::
EncodeUTF8
(
wfile
,
file
);
#ifdef _WIN32
IReadFile
*
reader
=
FileSystem
->
createAndOpenFile
(
wfile
);
#else
IReadFile
*
reader
=
FileSystem
->
createAndOpenFile
(
file
);
#endif
if
(
reader
==
NULL
)
return
false
;
spmemvfs_db_t
db
;
...
...
@@ -42,6 +37,7 @@ bool DataManager::LoadDB(const wchar_t* wfile) {
}
CardDataC
cd
;
CardString
cs
;
wchar_t
strBuffer
[
4096
];
int
step
=
0
;
do
{
step
=
sqlite3_step
(
pStmt
);
...
...
@@ -99,7 +95,7 @@ bool DataManager::LoadStrings(const char* file) {
ReadStringConfLine
(
linebuf
);
}
fclose
(
fp
);
for
(
int
i
=
0
;
i
<
255
;
++
i
)
for
(
int
i
=
0
;
i
<
301
;
++
i
)
myswprintf
(
numStrings
[
i
],
L"%d"
,
i
);
return
true
;
}
...
...
@@ -191,10 +187,10 @@ const wchar_t* DataManager::GetText(int code) {
return
csit
->
second
.
text
.
c_str
();
return
unknown_string
;
}
const
wchar_t
*
DataManager
::
GetDesc
(
int
strCode
)
{
if
(
(
unsigned
int
)
strCode
<
10000u
)
const
wchar_t
*
DataManager
::
GetDesc
(
unsigned
int
strCode
)
{
if
(
strCode
<
10000u
)
return
GetSysString
(
strCode
);
unsigned
int
code
=
strCode
>>
4
;
unsigned
int
code
=
(
strCode
>>
4
)
&
0x0fffffff
;
unsigned
int
offset
=
strCode
&
0xf
;
auto
csit
=
_strings
.
find
(
code
);
if
(
csit
==
_strings
.
end
())
...
...
Classes/gframe/data_manager.h
View file @
18b078ba
...
...
@@ -26,7 +26,7 @@ public:
bool
GetString
(
int
code
,
CardString
*
pStr
);
const
wchar_t
*
GetName
(
int
code
);
const
wchar_t
*
GetText
(
int
code
);
const
wchar_t
*
GetDesc
(
int
strCode
);
const
wchar_t
*
GetDesc
(
unsigned
int
strCode
);
const
wchar_t
*
GetSysString
(
int
code
);
const
wchar_t
*
GetVictoryString
(
int
code
);
const
wchar_t
*
GetCounterName
(
int
code
);
...
...
@@ -47,7 +47,7 @@ public:
std
::
unordered_map
<
unsigned
int
,
std
::
wstring
>
_setnameStrings
;
std
::
unordered_map
<
unsigned
int
,
std
::
wstring
>
_sysStrings
;
wchar_t
numStrings
[
256
][
4
];
wchar_t
numStrings
[
301
][
4
];
wchar_t
numBuffer
[
6
];
wchar_t
attBuffer
[
128
];
wchar_t
racBuffer
[
128
];
...
...
Classes/gframe/deck_con.cpp
View file @
18b078ba
...
...
@@ -92,6 +92,7 @@ void DeckBuilder::Initialize() {
prev_deck
=
mainGame
->
cbDBDecks
->
getSelected
();
prev_category
=
mainGame
->
cbDBCategory
->
getSelected
();
RefreshReadonly
(
prev_category
);
RefreshPackListScroll
();
prev_operation
=
0
;
prev_sel
=
-
1
;
is_modified
=
false
;
...
...
@@ -116,6 +117,8 @@ void DeckBuilder::Terminate() {
mainGame
->
wACMessage
->
setVisible
(
false
);
mainGame
->
ClearTextures
();
mainGame
->
scrFilter
->
setVisible
(
false
);
mainGame
->
scrPackCards
->
setVisible
(
false
);
mainGame
->
scrPackCards
->
setPos
(
0
);
int
catesel
=
mainGame
->
cbDBCategory
->
getSelected
();
char
linebuf
[
256
];
if
(
catesel
>=
0
)
...
...
@@ -1047,7 +1050,8 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
wchar_t
catepath
[
256
];
deckManager
.
GetCategoryPath
(
catepath
,
mainGame
->
lstCategories
->
getSelected
(),
mainGame
->
lstCategories
->
getListItem
(
mainGame
->
lstCategories
->
getSelected
()));
myswprintf
(
filepath
,
L"%ls/%ls.ydk"
,
catepath
,
mainGame
->
lstDecks
->
getListItem
(
decksel
));
deckManager
.
LoadDeck
(
filepath
);
deckManager
.
LoadDeck
(
filepath
,
showing_pack
);
RefreshPackListScroll
();
prev_deck
=
decksel
;
break
;
}
...
...
@@ -1069,6 +1073,8 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
if
(
hovered_pos
==
0
||
hovered_seq
==
-
1
)
break
;
click_pos
=
hovered_pos
;
if
(
readonly
)
break
;
dragx
=
event
.
MouseInput
.
X
;
dragy
=
event
.
MouseInput
.
Y
;
draging_pointer
=
dataManager
.
GetCodePointer
(
hovered_code
);
...
...
@@ -1141,6 +1147,8 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
if
(
!
is_draging
)
{
if
(
hovered_pos
==
0
||
hovered_seq
==
-
1
)
break
;
if
(
readonly
)
break
;
mainGame
->
soundManager
->
PlaySoundEffect
(
SoundManager
::
SFX
::
CARD_DROP
);
if
(
hovered_pos
==
1
)
{
pop_main
(
hovered_seq
);
...
...
@@ -1180,6 +1188,8 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break
;
if
(
hovered_pos
==
0
||
hovered_seq
==
-
1
)
break
;
if
(
readonly
)
break
;
if
(
is_draging
)
break
;
auto
pointer
=
dataManager
.
GetCodePointer
(
hovered_code
);
...
...
@@ -1257,7 +1267,33 @@ void DeckBuilder::GetHoveredCard() {
int
y
=
mouse_pos
.
Y
;
is_lastcard
=
0
;
if
(
x
>=
314
*
mainGame
->
xScale
&&
x
<=
794
*
mainGame
->
xScale
)
{
if
(
y
>=
164
*
mainGame
->
yScale
&&
y
<=
435
*
mainGame
->
yScale
)
{
if
(
showing_pack
)
{
if
((
x
<=
772
*
mainGame
->
xScale
||
!
mainGame
->
scrPackCards
->
isVisible
())
&&
y
>=
164
*
mainGame
->
yScale
&&
y
<=
624
*
mainGame
->
yScale
)
{
int
mainsize
=
deckManager
.
current_deck
.
main
.
size
();
int
lx
=
10
;
int
dy
=
68
*
mainGame
->
yScale
;
if
(
mainsize
>
10
*
7
)
lx
=
11
;
if
(
mainsize
>
11
*
7
)
lx
=
12
;
if
(
mainsize
>
60
)
dy
=
66
*
mainGame
->
yScale
;
int
px
;
int
py
=
(
y
-
164
*
mainGame
->
yScale
)
/
dy
;
hovered_pos
=
1
;
if
(
x
>=
750
*
mainGame
->
xScale
)
px
=
lx
-
1
;
else
px
=
(
x
-
314
*
mainGame
->
xScale
)
*
(
lx
-
1
)
/
((
mainGame
->
scrPackCards
->
isVisible
()
?
414.0
f
:
436.0
f
)
*
mainGame
->
xScale
);
hovered_seq
=
py
*
lx
+
px
+
mainGame
->
scrPackCards
->
getPos
()
*
lx
;
if
(
hovered_seq
>=
mainsize
)
{
hovered_seq
=
-
1
;
hovered_code
=
0
;
}
else
{
hovered_code
=
deckManager
.
current_deck
.
main
[
hovered_seq
]
->
first
;
}
}
}
else
if
(
y
>=
164
*
mainGame
->
yScale
&&
y
<=
435
*
mainGame
->
yScale
)
{
int
lx
=
10
,
px
,
py
=
(
y
-
164
*
mainGame
->
yScale
)
/
(
68
*
mainGame
->
yScale
);
hovered_pos
=
1
;
if
(
deckManager
.
current_deck
.
main
.
size
()
>
40
)
...
...
@@ -1603,21 +1639,17 @@ void DeckBuilder::RefreshDeckList() {
wchar_t
catepath
[
256
];
deckManager
.
GetCategoryPath
(
catepath
,
lstCategories
->
getSelected
(),
lstCategories
->
getListItem
(
lstCategories
->
getSelected
()));
lstDecks
->
clear
();
FileSystem
::
TraversalDir
(
catepath
,
[
lstDecks
](
const
wchar_t
*
name
,
bool
isdir
)
{
if
(
!
isdir
&&
wcsrchr
(
name
,
'.'
)
&&
!
wcsncasecmp
(
wcsrchr
(
name
,
'.'
),
L".ydk"
,
4
))
{
size_t
len
=
wcslen
(
name
);
wchar_t
deckname
[
256
];
wcsncpy
(
deckname
,
name
,
len
-
4
);
deckname
[
len
-
4
]
=
0
;
lstDecks
->
addItem
(
deckname
);
}
});
mainGame
->
RefreshDeck
(
catepath
,
[
lstDecks
](
const
wchar_t
*
item
)
{
lstDecks
->
addItem
(
item
);
});
}
void
DeckBuilder
::
RefreshReadonly
(
int
catesel
)
{
bool
hasDeck
=
mainGame
->
cbDBDecks
->
getItemCount
()
!=
0
;
readonly
=
catesel
<
2
;
showing_pack
=
catesel
==
0
;
mainGame
->
btnSaveDeck
->
setEnabled
(
!
readonly
);
mainGame
->
btnSaveDeckAs
->
setEnabled
(
!
readonly
);
mainGame
->
btnClearDeck
->
setEnabled
(
!
readonly
);
mainGame
->
btnShuffleDeck
->
setEnabled
(
!
readonly
);
mainGame
->
btnSortDeck
->
setEnabled
(
!
readonly
);
mainGame
->
btnDeleteDeck
->
setEnabled
(
hasDeck
&&
!
readonly
);
mainGame
->
btnRenameCategory
->
setEnabled
(
catesel
>
3
);
mainGame
->
btnDeleteCategory
->
setEnabled
(
catesel
>
3
);
...
...
@@ -1627,11 +1659,26 @@ void DeckBuilder::RefreshReadonly(int catesel) {
mainGame
->
btnMoveDeck
->
setEnabled
(
hasDeck
&&
!
readonly
);
mainGame
->
btnCopyDeck
->
setEnabled
(
hasDeck
);
}
void
DeckBuilder
::
RefreshPackListScroll
()
{
if
(
showing_pack
)
{
mainGame
->
scrPackCards
->
setPos
(
0
);
int
mainsize
=
deckManager
.
current_deck
.
main
.
size
();
if
(
mainsize
<=
7
*
12
)
{
mainGame
->
scrPackCards
->
setVisible
(
false
);
}
else
{
mainGame
->
scrPackCards
->
setVisible
(
true
);
mainGame
->
scrPackCards
->
setMax
((
int
)
ceil
(((
float
)
mainsize
-
7
*
12
)
/
12.0
f
));
}
}
else
{
mainGame
->
scrPackCards
->
setVisible
(
false
);
mainGame
->
scrPackCards
->
setPos
(
0
);
}
}
void
DeckBuilder
::
ChangeCategory
(
int
catesel
)
{
mainGame
->
RefreshDeck
(
mainGame
->
cbDBCategory
,
mainGame
->
cbDBDecks
);
mainGame
->
cbDBDecks
->
setSelected
(
0
);
deckManager
.
LoadDeck
(
mainGame
->
cbDBCategory
,
mainGame
->
cbDBDecks
);
RefreshReadonly
(
catesel
);
deckManager
.
LoadDeck
(
mainGame
->
cbDBCategory
,
mainGame
->
cbDBDecks
);
is_modified
=
false
;
prev_category
=
catesel
;
prev_deck
=
0
;
...
...
@@ -1651,7 +1698,7 @@ void DeckBuilder::ShowDeckManage() {
if
(
isdir
)
{
lstCategories
->
addItem
(
name
);
}
});
});
lstCategories
->
setSelected
(
prev_category
);
RefreshDeckList
();
RefreshReadonly
(
prev_category
);
...
...
Classes/gframe/deck_con.h
View file @
18b078ba
...
...
@@ -28,6 +28,7 @@ public:
void
RefreshDeckList
();
void
RefreshReadonly
(
int
catesel
);
void
RefreshPackListScroll
();
void
ChangeCategory
(
int
catesel
);
void
ShowDeckManage
();
...
...
@@ -78,11 +79,13 @@ public:
int
prev_sel
;
bool
is_modified
;
bool
readonly
;
bool
showing_pack
;
mt19937
rnd
;
std
::
unordered_map
<
int
,
int
>*
filterList
;
const
std
::
unordered_map
<
int
,
int
>*
filterList
;
std
::
vector
<
code_pointer
>
results
;
wchar_t
result_string
[
8
];
std
::
vector
<
std
::
wstring
>
expansionPacks
;
};
}
...
...
Classes/gframe/deck_manager.cpp
View file @
18b078ba
...
...
@@ -6,6 +6,7 @@
namespace
ygo
{
char
DeckManager
::
deckBuffer
[
0x10000
];
DeckManager
deckManager
;
void
DeckManager
::
LoadLFListSingle
(
const
char
*
path
)
{
...
...
@@ -65,7 +66,7 @@ const wchar_t* DeckManager::GetLFListName(int lfhash) {
return
lit
->
listName
.
c_str
();
return
dataManager
.
unknown_string
;
}
std
::
unordered_map
<
int
,
int
>*
DeckManager
::
GetLFListContent
(
int
lfhash
)
{
const
std
::
unordered_map
<
int
,
int
>*
DeckManager
::
GetLFListContent
(
int
lfhash
)
{
auto
lit
=
std
::
find_if
(
_lfList
.
begin
(),
_lfList
.
end
(),
[
lfhash
](
const
ygo
::
LFList
&
list
)
{
return
list
.
hash
==
lfhash
;
});
...
...
@@ -142,7 +143,7 @@ int DeckManager::CheckDeck(Deck& deck, int lfhash, int rule) {
}
return
0
;
}
int
DeckManager
::
LoadDeck
(
Deck
&
deck
,
int
*
dbuf
,
int
mainc
,
int
sidec
)
{
int
DeckManager
::
LoadDeck
(
Deck
&
deck
,
int
*
dbuf
,
int
mainc
,
int
sidec
,
bool
is_packlist
)
{
deck
.
clear
();
int
code
;
int
errorcode
=
0
;
...
...
@@ -155,6 +156,10 @@ int DeckManager::LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec) {
}
if
(
cd
.
type
&
TYPE_TOKEN
)
continue
;
else
if
(
is_packlist
)
{
deck
.
main
.
push_back
(
dataManager
.
GetCodePointer
(
code
));
continue
;
}
else
if
(
cd
.
type
&
(
TYPE_FUSION
|
TYPE_SYNCHRO
|
TYPE_XYZ
|
TYPE_LINK
))
{
if
(
deck
.
extra
.
size
()
>=
15
)
continue
;
...
...
@@ -236,7 +241,11 @@ void DeckManager::GetDeckFile(wchar_t* ret, irr::gui::IGUIComboBox* cbCategory,
bool
DeckManager
::
LoadDeck
(
irr
::
gui
::
IGUIComboBox
*
cbCategory
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
)
{
wchar_t
filepath
[
256
];
GetDeckFile
(
filepath
,
cbCategory
,
cbDeck
);
return
LoadDeck
(
filepath
);
bool
is_packlist
=
cbCategory
->
getSelected
()
==
0
;
bool
res
=
LoadDeck
(
filepath
,
is_packlist
);
if
(
res
&&
mainGame
->
is_building
)
mainGame
->
deckBuilder
.
RefreshPackListScroll
();
return
res
;
}
FILE
*
DeckManager
::
OpenDeckFile
(
const
wchar_t
*
file
,
const
char
*
mode
)
{
#ifdef WIN32
...
...
@@ -248,20 +257,43 @@ FILE* DeckManager::OpenDeckFile(const wchar_t* file, const char* mode) {
#endif
return
fp
;
}
bool
DeckManager
::
LoadDeck
(
const
wchar_t
*
file
)
{
int
sp
=
0
,
ct
=
0
,
mainc
=
0
,
sidec
=
0
,
code
;
FILE
*
fp
=
OpenDeckFile
(
file
,
"r"
);
if
(
!
fp
)
{
IReadFile
*
DeckManager
::
OpenDeckReader
(
const
wchar_t
*
file
)
{
char
file2
[
256
];
BufferIO
::
EncodeUTF8
(
file
,
file2
);
IReadFile
*
reader
=
dataManager
.
FileSystem
->
createAndOpenFile
(
file2
);
return
reader
;
}
bool
DeckManager
::
LoadDeck
(
const
wchar_t
*
file
,
bool
is_packlist
)
{
IReadFile
*
reader
=
OpenDeckReader
(
file
);
if
(
!
reader
)
{
wchar_t
localfile
[
64
];
myswprintf
(
localfile
,
L"./deck/%ls.ydk"
,
file
);
fp
=
OpenDeckFile
(
localfile
,
"r"
);
reader
=
OpenDeckReader
(
localfile
);
}
if
(
!
fp
)
if
(
!
reader
&&
!
wcsncasecmp
(
file
,
L"./pack"
,
6
))
{
wchar_t
zipfile
[
64
];
myswprintf
(
zipfile
,
L"%ls"
,
file
+
2
);
reader
=
OpenDeckReader
(
zipfile
);
}
if
(
!
reader
)
return
false
;
size_t
size
=
reader
->
getSize
();
if
(
size
>=
0x20000
)
{
reader
->
drop
();
return
false
;
int
cardlist
[
128
];
}
memset
(
deckBuffer
,
0
,
sizeof
(
deckBuffer
));
reader
->
read
(
deckBuffer
,
size
);
reader
->
drop
();
std
::
istringstream
deckStream
(
deckBuffer
);
return
LoadDeck
(
&
deckStream
,
is_packlist
);
}
bool
DeckManager
::
LoadDeck
(
std
::
istringstream
*
deckStream
,
bool
is_packlist
)
{
int
sp
=
0
,
ct
=
0
,
mainc
=
0
,
sidec
=
0
,
code
;
int
cardlist
[
300
];
bool
is_side
=
false
;
char
linebuf
[
256
]
;
while
(
fgets
(
linebuf
,
256
,
fp
)
&&
ct
<
128
)
{
std
::
string
linebuf
;
while
(
std
::
getline
(
*
deckStream
,
linebuf
)
&&
ct
<
300
)
{
if
(
linebuf
[
0
]
==
'!'
)
{
is_side
=
true
;
continue
;
...
...
@@ -271,14 +303,13 @@ bool DeckManager::LoadDeck(const wchar_t* file) {
sp
=
0
;
while
(
linebuf
[
sp
]
>=
'0'
&&
linebuf
[
sp
]
<=
'9'
)
sp
++
;
linebuf
[
sp
]
=
0
;
code
=
a
toi
(
linebuf
);
code
=
std
::
s
toi
(
linebuf
);
cardlist
[
ct
++
]
=
code
;
if
(
is_side
)
sidec
++
;
else
mainc
++
;
}
fclose
(
fp
);
LoadDeck
(
current_deck
,
cardlist
,
mainc
,
sidec
);
return
true
;
LoadDeck
(
current_deck
,
cardlist
,
mainc
,
sidec
,
is_packlist
);
return
true
;
// the above LoadDeck has return value but we ignore it here for now
}
bool
DeckManager
::
SaveDeck
(
Deck
&
deck
,
const
wchar_t
*
file
)
{
if
(
!
FileSystem
::
IsDirExists
(
L"./deck"
)
&&
!
FileSystem
::
MakeDir
(
L"./deck"
))
...
...
Classes/gframe/deck_manager.h
View file @
18b078ba
...
...
@@ -5,6 +5,7 @@
#include "client_card.h"
#include <unordered_map>
#include <vector>
#include <sstream>
namespace
ygo
{
...
...
@@ -35,18 +36,22 @@ public:
Deck
current_deck
;
std
::
vector
<
LFList
>
_lfList
;
static
char
deckBuffer
[
0x10000
];
void
LoadLFListSingle
(
const
char
*
path
);
void
LoadLFList
(
android
::
InitOptions
*
options
);
const
wchar_t
*
GetLFListName
(
int
lfhash
);
std
::
unordered_map
<
int
,
int
>*
GetLFListContent
(
int
lfhash
);
const
std
::
unordered_map
<
int
,
int
>*
GetLFListContent
(
int
lfhash
);
int
CheckDeck
(
Deck
&
deck
,
int
lfhash
,
int
rule
);
int
LoadDeck
(
Deck
&
deck
,
int
*
dbuf
,
int
mainc
,
int
sidec
);
int
LoadDeck
(
Deck
&
deck
,
int
*
dbuf
,
int
mainc
,
int
sidec
,
bool
is_packlist
=
false
);
bool
LoadSide
(
Deck
&
deck
,
int
*
dbuf
,
int
mainc
,
int
sidec
);
void
GetCategoryPath
(
wchar_t
*
ret
,
int
index
,
const
wchar_t
*
text
);
void
GetDeckFile
(
wchar_t
*
ret
,
irr
::
gui
::
IGUIComboBox
*
cbCategory
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
);
bool
LoadDeck
(
irr
::
gui
::
IGUIComboBox
*
cbCategory
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
);
FILE
*
OpenDeckFile
(
const
wchar_t
*
file
,
const
char
*
mode
);
bool
LoadDeck
(
const
wchar_t
*
file
);
FILE
*
OpenDeckFile
(
const
wchar_t
*
file
,
const
char
*
mode
);
IReadFile
*
OpenDeckReader
(
const
wchar_t
*
file
);
bool
LoadDeck
(
const
wchar_t
*
file
,
bool
is_packlist
=
false
);
bool
LoadDeck
(
std
::
istringstream
*
deckStream
,
bool
is_packlist
=
false
);
bool
SaveDeck
(
Deck
&
deck
,
const
wchar_t
*
file
);
bool
DeleteDeck
(
const
wchar_t
*
file
);
bool
CreateCategory
(
const
wchar_t
*
name
);
...
...
Classes/gframe/drawing.cpp
View file @
18b078ba
...
...
@@ -1256,12 +1256,13 @@ void Game::DrawThumb(code_pointer cp, position2di pos, const std::unordered_map<
void
Game
::
DrawDeckBd
()
{
wchar_t
textBuffer
[
64
];
//main deck
int
mainsize
=
deckManager
.
current_deck
.
main
.
size
();
driver
->
draw2DRectangle
(
recti
(
310
*
mainGame
->
xScale
,
137
*
mainGame
->
yScale
,
410
*
mainGame
->
xScale
,
157
*
mainGame
->
yScale
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
recti
(
309
*
mainGame
->
xScale
,
136
*
mainGame
->
yScale
,
410
*
mainGame
->
xScale
,
157
*
mainGame
->
yScale
));
DrawShadowText
(
textFont
,
dataManager
.
GetSysString
(
1330
),
recti
(
300
*
mainGame
->
xScale
,
136
*
mainGame
->
yScale
,
395
*
mainGame
->
xScale
,
156
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
current_deck
.
main
.
size
()
],
recti
(
360
*
mainGame
->
xScale
,
137
*
mainGame
->
yScale
,
420
*
mainGame
->
xScale
,
157
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
driver
->
draw2DRectangle
(
recti
(
310
*
mainGame
->
xScale
,
160
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
436
*
mainGame
->
yScale
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
recti
(
309
*
mainGame
->
xScale
,
159
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
436
*
mainGame
->
yScale
));
DrawShadowText
(
textFont
,
dataManager
.
GetSysString
(
deckBuilder
.
showing_pack
?
1477
:
1330
),
recti
(
300
*
mainGame
->
xScale
,
136
*
mainGame
->
yScale
,
395
*
mainGame
->
xScale
,
156
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
mainsize
],
recti
(
360
*
mainGame
->
xScale
,
137
*
mainGame
->
yScale
,
420
*
mainGame
->
xScale
,
157
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
driver
->
draw2DRectangle
(
recti
(
310
*
mainGame
->
xScale
,
160
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
(
deckBuilder
.
showing_pack
?
630
:
436
)
*
mainGame
->
yScale
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
recti
(
309
*
mainGame
->
xScale
,
159
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
(
deckBuilder
.
showing_pack
?
630
:
436
)
*
mainGame
->
yScale
));
//type count 2DRectangle
driver
->
draw2DRectangle
(
recti
(
638
*
mainGame
->
xScale
,
137
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
157
*
mainGame
->
yScale
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
recti
(
637
*
mainGame
->
xScale
,
136
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
157
*
mainGame
->
yScale
));
...
...
@@ -1275,75 +1276,89 @@ void Game::DrawDeckBd() {
driver
->
draw2DImage
(
imageManager
.
tCardType
,
recti
(
745
*
mainGame
->
xScale
,
136
*
mainGame
->
yScale
,
(
745
+
14
+
3
/
8
)
*
mainGame
->
xScale
,
156
*
mainGame
->
yScale
),
recti
(
46
,
0
,
69
,
32
),
0
,
0
,
true
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
TypeCount
(
deckManager
.
current_deck
.
main
,
TYPE_TRAP
)],
recti
(
770
*
mainGame
->
xScale
,
137
*
mainGame
->
yScale
,
790
*
mainGame
->
xScale
,
157
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
int
lx
;
int
dy
=
68
;
float
dx
;
if
(
deckManager
.
current_deck
.
main
.
size
()
<=
40
)
{
if
(
mainsize
<=
40
)
{
dx
=
436.0
f
/
9
;
lx
=
10
;
}
else
if
(
deckBuilder
.
showing_pack
)
{
lx
=
10
;
if
(
mainsize
>
10
*
7
)
lx
=
11
;
if
(
mainsize
>
11
*
7
)
lx
=
12
;
dx
=
(
mainGame
->
scrPackCards
->
isVisible
()
?
414.0
f
:
436.0
f
)
/
(
lx
-
1
);
if
(
mainsize
>
60
)
dy
=
66
;
}
else
{
lx
=
(
deckManager
.
current_deck
.
main
.
size
()
-
41
)
/
4
+
11
;
lx
=
(
mainsize
-
41
)
/
4
+
11
;
dx
=
436.0
f
/
(
lx
-
1
);
}
for
(
size_t
i
=
0
;
i
<
deckManager
.
current_deck
.
main
.
size
();
++
i
)
{
DrawThumb
(
deckManager
.
current_deck
.
main
[
i
],
position2di
((
314
+
(
i
%
lx
)
*
dx
)
*
mainGame
->
xScale
,
(
164
+
(
i
/
lx
)
*
68
)
*
mainGame
->
yScale
),
deckBuilder
.
filterList
);
if
(
deckBuilder
.
hovered_pos
==
1
&&
deckBuilder
.
hovered_seq
==
(
int
)
i
)
driver
->
draw2DRectangleOutline
(
recti
((
313
+
(
i
%
lx
)
*
dx
)
*
mainGame
->
xScale
,
(
163
+
(
i
/
lx
)
*
68
)
*
mainGame
->
yScale
,
(
359
+
(
i
%
lx
)
*
dx
)
*
mainGame
->
xScale
,
(
228
+
(
i
/
lx
)
*
68
)
*
mainGame
->
yScale
));
}
//extra deck
driver
->
draw2DRectangle
(
recti
(
310
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
410
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
recti
(
309
*
mainGame
->
xScale
,
439
*
mainGame
->
yScale
,
410
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
));
DrawShadowText
(
textFont
,
dataManager
.
GetSysString
(
1331
),
recti
(
300
*
mainGame
->
xScale
,
439
*
mainGame
->
yScale
,
395
*
mainGame
->
xScale
,
459
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
current_deck
.
extra
.
size
()],
recti
(
360
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
420
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
driver
->
draw2DRectangle
(
recti
(
310
*
mainGame
->
xScale
,
463
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
533
*
mainGame
->
yScale
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
recti
(
309
*
mainGame
->
xScale
,
462
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
533
*
mainGame
->
yScale
));
//type count 2DRectangle
driver
->
draw2DRectangle
(
recti
(
582
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
recti
(
581
*
mainGame
->
xScale
,
439
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
));
//fusion count
driver
->
draw2DImage
(
imageManager
.
tCardType
,
recti
(
595
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
(
595
+
14
+
3
/
8
)
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
0
,
32
,
23
,
64
),
0
,
0
,
true
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
TypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_FUSION
)],
recti
(
620
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
640
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
//synchro count
driver
->
draw2DImage
(
imageManager
.
tCardType
,
recti
(
645
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
(
645
+
14
+
3
/
8
)
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
23
,
32
,
46
,
64
),
0
,
0
,
true
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
TypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_SYNCHRO
)],
recti
(
670
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
690
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
//XYZ count
driver
->
draw2DImage
(
imageManager
.
tCardType
,
recti
(
695
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
(
695
+
14
+
3
/
8
)
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
46
,
32
,
69
,
64
),
0
,
0
,
true
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
TypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_XYZ
)],
recti
(
720
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
740
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
//link count
driver
->
draw2DImage
(
imageManager
.
tCardType
,
recti
(
745
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
(
745
+
14
+
3
/
8
)
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
0
,
64
,
23
,
96
),
0
,
0
,
true
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
TypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_LINK
)],
recti
(
770
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
790
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
if
(
deckManager
.
current_deck
.
extra
.
size
()
<=
10
)
dx
=
436.0
f
/
9
;
else
dx
=
436.0
f
/
(
deckManager
.
current_deck
.
extra
.
size
()
-
1
);
for
(
size_t
i
=
0
;
i
<
deckManager
.
current_deck
.
extra
.
size
();
++
i
)
{
DrawThumb
(
deckManager
.
current_deck
.
extra
[
i
],
position2di
((
314
+
i
*
dx
)
*
mainGame
->
xScale
,
466
*
mainGame
->
yScale
),
deckBuilder
.
filterList
);
if
(
deckBuilder
.
hovered_pos
==
2
&&
deckBuilder
.
hovered_seq
==
(
int
)
i
)
driver
->
draw2DRectangleOutline
(
recti
((
313
+
i
*
dx
)
*
mainGame
->
xScale
,
465
*
mainGame
->
yScale
,
(
359
+
i
*
dx
)
*
mainGame
->
xScale
,
531
*
mainGame
->
yScale
));
}
//side deck
driver
->
draw2DRectangle
(
recti
(
310
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
410
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
recti
(
309
*
mainGame
->
xScale
,
536
*
mainGame
->
yScale
,
410
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
));
DrawShadowText
(
textFont
,
dataManager
.
GetSysString
(
1332
),
recti
(
300
*
mainGame
->
xScale
,
536
*
mainGame
->
yScale
,
395
*
mainGame
->
xScale
,
556
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
current_deck
.
side
.
size
()],
recti
(
360
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
420
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
driver
->
draw2DRectangle
(
recti
(
310
*
mainGame
->
xScale
,
560
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
630
*
mainGame
->
yScale
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
recti
(
309
*
mainGame
->
xScale
,
559
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
630
*
mainGame
->
yScale
));
//type count 2DRectangle
driver
->
draw2DRectangle
(
recti
(
638
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
recti
(
637
*
mainGame
->
xScale
,
536
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
));
//monster count
driver
->
draw2DImage
(
imageManager
.
tCardType
,
recti
(
645
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
(
645
+
14
+
3
/
8
)
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
recti
(
0
,
0
,
23
,
32
),
0
,
0
,
true
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
TypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_MONSTER
)],
recti
(
670
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
690
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
//spell count
driver
->
draw2DImage
(
imageManager
.
tCardType
,
recti
(
695
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
(
695
+
14
+
3
/
8
)
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
recti
(
23
,
0
,
46
,
32
),
0
,
0
,
true
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
TypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_SPELL
)],
recti
(
720
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
740
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
//trap count
driver
->
draw2DImage
(
imageManager
.
tCardType
,
recti
(
745
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
(
745
+
14
+
3
/
8
)
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
recti
(
46
,
0
,
69
,
32
),
0
,
0
,
true
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
TypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_TRAP
)],
recti
(
770
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
790
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
if
(
deckManager
.
current_deck
.
side
.
size
()
<=
10
)
dx
=
436.0
f
/
9
;
else
dx
=
436.0
f
/
(
deckManager
.
current_deck
.
side
.
size
()
-
1
);
for
(
size_t
i
=
0
;
i
<
deckManager
.
current_deck
.
side
.
size
();
++
i
)
{
DrawThumb
(
deckManager
.
current_deck
.
side
[
i
],
position2di
((
314
+
i
*
dx
)
*
mainGame
->
xScale
,
564
*
mainGame
->
yScale
),
deckBuilder
.
filterList
);
if
(
deckBuilder
.
hovered_pos
==
3
&&
deckBuilder
.
hovered_seq
==
(
int
)
i
)
driver
->
draw2DRectangleOutline
(
recti
((
313
+
i
*
dx
)
*
mainGame
->
xScale
,
563
*
mainGame
->
yScale
,
(
359
+
i
*
dx
)
*
mainGame
->
xScale
,
629
*
mainGame
->
yScale
));
int
padding
=
scrPackCards
->
getPos
()
*
lx
;
for
(
size_t
i
=
0
;
i
<
mainsize
-
padding
&&
i
<
7
*
lx
;
++
i
)
{
size_t
j
=
i
+
padding
;
DrawThumb
(
deckManager
.
current_deck
.
main
[
j
],
position2di
((
314
+
(
i
%
lx
)
*
dx
)
*
mainGame
->
xScale
,
(
164
+
(
i
/
lx
)
*
dy
)
*
mainGame
->
yScale
),
deckBuilder
.
filterList
);
if
(
deckBuilder
.
hovered_pos
==
1
&&
deckBuilder
.
hovered_seq
==
(
int
)
j
)
driver
->
draw2DRectangleOutline
(
recti
((
313
+
(
i
%
lx
)
*
dx
)
*
mainGame
->
xScale
,
(
163
+
(
i
/
lx
)
*
dy
)
*
mainGame
->
yScale
,
(
359
+
(
i
%
lx
)
*
dx
)
*
mainGame
->
xScale
,
(
228
+
(
i
/
lx
)
*
dy
)
*
mainGame
->
yScale
));
}
if
(
!
deckBuilder
.
showing_pack
)
{
//extra deck
driver
->
draw2DRectangle
(
recti
(
310
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
410
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
recti
(
309
*
mainGame
->
xScale
,
439
*
mainGame
->
yScale
,
410
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
));
DrawShadowText
(
textFont
,
dataManager
.
GetSysString
(
1331
),
recti
(
300
*
mainGame
->
xScale
,
439
*
mainGame
->
yScale
,
395
*
mainGame
->
xScale
,
459
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
current_deck
.
extra
.
size
()],
recti
(
360
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
420
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
driver
->
draw2DRectangle
(
recti
(
310
*
mainGame
->
xScale
,
463
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
533
*
mainGame
->
yScale
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
recti
(
309
*
mainGame
->
xScale
,
462
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
533
*
mainGame
->
yScale
));
//type count 2DRectangle
driver
->
draw2DRectangle
(
recti
(
582
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
recti
(
581
*
mainGame
->
xScale
,
439
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
));
//fusion count
driver
->
draw2DImage
(
imageManager
.
tCardType
,
recti
(
595
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
(
595
+
14
+
3
/
8
)
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
0
,
32
,
23
,
64
),
0
,
0
,
true
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
TypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_FUSION
)],
recti
(
620
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
640
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
//synchro count
driver
->
draw2DImage
(
imageManager
.
tCardType
,
recti
(
645
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
(
645
+
14
+
3
/
8
)
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
23
,
32
,
46
,
64
),
0
,
0
,
true
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
TypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_SYNCHRO
)],
recti
(
670
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
690
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
//XYZ count
driver
->
draw2DImage
(
imageManager
.
tCardType
,
recti
(
695
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
(
695
+
14
+
3
/
8
)
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
46
,
32
,
69
,
64
),
0
,
0
,
true
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
TypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_XYZ
)],
recti
(
720
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
740
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
//link count
driver
->
draw2DImage
(
imageManager
.
tCardType
,
recti
(
745
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
(
745
+
14
+
3
/
8
)
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
0
,
64
,
23
,
96
),
0
,
0
,
true
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
TypeCount
(
deckManager
.
current_deck
.
extra
,
TYPE_LINK
)],
recti
(
770
*
mainGame
->
xScale
,
440
*
mainGame
->
yScale
,
790
*
mainGame
->
xScale
,
460
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
if
(
deckManager
.
current_deck
.
extra
.
size
()
<=
10
)
dx
=
436.0
f
/
9
;
else
dx
=
436.0
f
/
(
deckManager
.
current_deck
.
extra
.
size
()
-
1
);
for
(
size_t
i
=
0
;
i
<
deckManager
.
current_deck
.
extra
.
size
();
++
i
)
{
DrawThumb
(
deckManager
.
current_deck
.
extra
[
i
],
position2di
((
314
+
i
*
dx
)
*
mainGame
->
xScale
,
466
*
mainGame
->
yScale
),
deckBuilder
.
filterList
);
if
(
deckBuilder
.
hovered_pos
==
2
&&
deckBuilder
.
hovered_seq
==
(
int
)
i
)
driver
->
draw2DRectangleOutline
(
recti
((
313
+
i
*
dx
)
*
mainGame
->
xScale
,
465
*
mainGame
->
yScale
,
(
359
+
i
*
dx
)
*
mainGame
->
xScale
,
531
*
mainGame
->
yScale
));
}
//side deck
driver
->
draw2DRectangle
(
recti
(
310
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
410
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
recti
(
309
*
mainGame
->
xScale
,
536
*
mainGame
->
yScale
,
410
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
));
DrawShadowText
(
textFont
,
dataManager
.
GetSysString
(
1332
),
recti
(
300
*
mainGame
->
xScale
,
536
*
mainGame
->
yScale
,
395
*
mainGame
->
xScale
,
556
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
current_deck
.
side
.
size
()],
recti
(
360
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
420
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
driver
->
draw2DRectangle
(
recti
(
310
*
mainGame
->
xScale
,
560
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
630
*
mainGame
->
yScale
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
recti
(
309
*
mainGame
->
xScale
,
559
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
630
*
mainGame
->
yScale
));
//type count 2DRectangle
driver
->
draw2DRectangle
(
recti
(
638
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
recti
(
637
*
mainGame
->
xScale
,
536
*
mainGame
->
yScale
,
797
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
));
//monster count
driver
->
draw2DImage
(
imageManager
.
tCardType
,
recti
(
645
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
(
645
+
14
+
3
/
8
)
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
recti
(
0
,
0
,
23
,
32
),
0
,
0
,
true
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
TypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_MONSTER
)],
recti
(
670
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
690
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
//spell count
driver
->
draw2DImage
(
imageManager
.
tCardType
,
recti
(
695
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
(
695
+
14
+
3
/
8
)
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
recti
(
23
,
0
,
46
,
32
),
0
,
0
,
true
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
TypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_SPELL
)],
recti
(
720
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
740
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
//trap count
driver
->
draw2DImage
(
imageManager
.
tCardType
,
recti
(
745
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
(
745
+
14
+
3
/
8
)
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
recti
(
46
,
0
,
69
,
32
),
0
,
0
,
true
);
DrawShadowText
(
numFont
,
dataManager
.
numStrings
[
deckManager
.
TypeCount
(
deckManager
.
current_deck
.
side
,
TYPE_TRAP
)],
recti
(
770
*
mainGame
->
xScale
,
537
*
mainGame
->
yScale
,
790
*
mainGame
->
xScale
,
557
*
mainGame
->
yScale
),
recti
(
0
,
1
*
mainGame
->
yScale
,
2
*
mainGame
->
xScale
,
0
),
0xffffffff
,
0xff000000
,
true
,
false
);
if
(
deckManager
.
current_deck
.
side
.
size
()
<=
10
)
dx
=
436.0
f
/
9
;
else
dx
=
436.0
f
/
(
deckManager
.
current_deck
.
side
.
size
()
-
1
);
for
(
size_t
i
=
0
;
i
<
deckManager
.
current_deck
.
side
.
size
();
++
i
)
{
DrawThumb
(
deckManager
.
current_deck
.
side
[
i
],
position2di
((
314
+
i
*
dx
)
*
mainGame
->
xScale
,
564
*
mainGame
->
yScale
),
deckBuilder
.
filterList
);
if
(
deckBuilder
.
hovered_pos
==
3
&&
deckBuilder
.
hovered_seq
==
(
int
)
i
)
driver
->
draw2DRectangleOutline
(
recti
((
313
+
i
*
dx
)
*
mainGame
->
xScale
,
563
*
mainGame
->
yScale
,
(
359
+
i
*
dx
)
*
mainGame
->
xScale
,
629
*
mainGame
->
yScale
));
}
}
//search result
driver
->
draw2DRectangle
(
recti
(
805
*
mainGame
->
xScale
,
137
*
mainGame
->
yScale
,
915
*
mainGame
->
xScale
,
157
*
mainGame
->
yScale
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
...
...
Classes/gframe/duelclient.cpp
View file @
18b078ba
...
...
@@ -394,6 +394,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
deckBuilder
.
hovered_code
=
0
;
mainGame
->
deckBuilder
.
is_draging
=
false
;
mainGame
->
deckBuilder
.
is_starting_dragging
=
false
;
mainGame
->
deckBuilder
.
readonly
=
false
;
mainGame
->
deckBuilder
.
showing_pack
=
false
;
mainGame
->
deckBuilder
.
pre_mainc
=
deckManager
.
current_deck
.
main
.
size
();
mainGame
->
deckBuilder
.
pre_extrac
=
deckManager
.
current_deck
.
extra
.
size
();
mainGame
->
deckBuilder
.
pre_sidec
=
deckManager
.
current_deck
.
side
.
size
();
...
...
Classes/gframe/game.cpp
View file @
18b078ba
...
...
@@ -906,6 +906,10 @@ bool Game::Initialize(ANDROID_APP app, android::InitOptions *options) {
btnDMOK
=
env
->
addButton
(
rect
<
s32
>
(
70
*
xScale
,
100
*
yScale
,
160
*
xScale
,
150
*
yScale
),
wDMQuery
,
BUTTON_DM_OK
,
dataManager
.
GetSysString
(
1211
));
ChangeToIGUIImageButton
(
btnDMOK
,
imageManager
.
tButton_S
,
imageManager
.
tButton_S_pressed
);
btnDMCancel
=
env
->
addButton
(
rect
<
s32
>
(
180
*
xScale
,
100
*
yScale
,
270
*
xScale
,
150
*
yScale
),
wDMQuery
,
BUTTON_DM_CANCEL
,
dataManager
.
GetSysString
(
1212
));
scrPackCards
=
env
->
addScrollBar
(
false
,
recti
(
775
*
xScale
,
161
*
yScale
,
795
*
xScale
,
629
*
yScale
),
0
,
SCROLL_FILTER
);
scrPackCards
->
setLargeStep
(
1
);
scrPackCards
->
setSmallStep
(
1
);
scrPackCards
->
setVisible
(
false
);
ChangeToIGUIImageButton
(
btnDMCancel
,
imageManager
.
tButton_S
,
imageManager
.
tButton_S_pressed
);
stDBCategory
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1300
),
rect
<
s32
>
(
10
*
xScale
,
9
*
yScale
,
100
*
xScale
,
29
*
yScale
),
false
,
false
,
wDeckEdit
);
cbDBCategory
=
CAndroidGUIComboBox
::
addAndroidComboBox
(
env
,
rect
<
s32
>
(
80
*
xScale
,
5
*
yScale
,
220
*
xScale
,
30
*
yScale
),
wDeckEdit
,
COMBOBOX_DBCATEGORY
);
...
...
@@ -1635,19 +1639,29 @@ void Game::RefreshCategoryDeck(irr::gui::IGUIComboBox* cbCategory, irr::gui::IGU
}
}
void
Game
::
RefreshDeck
(
irr
::
gui
::
IGUIComboBox
*
cbCategory
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
)
{
if
(
cbCategory
!=
cbDBCategory
&&
cbCategory
->
getSelected
()
==
0
)
{
// can't use pack list in duel
cbDeck
->
clear
();
return
;
}
wchar_t
catepath
[
256
];
deckManager
.
GetCategoryPath
(
catepath
,
cbCategory
->
getSelected
(),
cbCategory
->
getText
());
RefreshDeck
(
catepath
,
cbDeck
);
}
void
Game
::
RefreshDeck
(
const
wchar_t
*
deckpath
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
)
{
cbDeck
->
clear
();
FileSystem
::
TraversalDir
(
deckpath
,
[
cbDeck
](
const
wchar_t
*
name
,
bool
isdir
)
{
RefreshDeck
(
catepath
,
[
cbDeck
](
const
wchar_t
*
item
)
{
cbDeck
->
addItem
(
item
);
});
}
void
Game
::
RefreshDeck
(
const
wchar_t
*
deckpath
,
const
std
::
function
<
void
(
const
wchar_t
*
)
>&
additem
)
{
if
(
!
wcsncasecmp
(
deckpath
,
L"./pack"
,
6
))
{
for
(
auto
pack
:
deckBuilder
.
expansionPacks
)
{
additem
(
pack
.
substr
(
5
,
pack
.
size
()
-
9
).
c_str
());
}
}
FileSystem
::
TraversalDir
(
deckpath
,
[
additem
](
const
wchar_t
*
name
,
bool
isdir
)
{
if
(
!
isdir
&&
wcsrchr
(
name
,
'.'
)
&&
!
wcsncasecmp
(
wcsrchr
(
name
,
'.'
),
L".ydk"
,
4
))
{
size_t
len
=
wcslen
(
name
);
wchar_t
deckname
[
256
];
wcsncpy
(
deckname
,
name
,
len
-
4
);
deckname
[
len
-
4
]
=
0
;
cbDeck
->
addI
tem
(
deckname
);
addi
tem
(
deckname
);
}
});
}
...
...
Classes/gframe/game.h
View file @
18b078ba
...
...
@@ -144,7 +144,7 @@ public:
void
LoadExpansions
();
void
RefreshCategoryDeck
(
irr
::
gui
::
IGUIComboBox
*
cbCategory
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
,
bool
selectlastused
=
true
);
void
RefreshDeck
(
irr
::
gui
::
IGUIComboBox
*
cbCategory
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
);
void
RefreshDeck
(
const
wchar_t
*
deckpath
,
irr
::
gui
::
IGUIComboBox
*
cbDeck
);
void
RefreshDeck
(
const
wchar_t
*
deckpath
,
const
std
::
function
<
void
(
const
wchar_t
*
)
>&
additem
);
void
RefreshReplay
();
void
RefreshSingleplay
();
void
RefreshBot
();
...
...
@@ -348,13 +348,13 @@ public:
irr
::
gui
::
IGUIImage
*
bgLanWindow
;
irr
::
gui
::
IGUIEditBox
*
ebNickName
;
irr
::
gui
::
IGUIListBox
*
lstHostList
;
irr
::
gui
::
IGUIButton
*
btnLanRefresh
;
//
irr
::
gui
::
IGUIButton
*
btnLanRefresh
;
irr
::
gui
::
IGUIEditBox
*
ebJoinHost
;
irr
::
gui
::
IGUIEditBox
*
ebJoinPort
;
irr
::
gui
::
IGUIEditBox
*
ebJoinPass
;
irr
::
gui
::
IGUIButton
*
btnJoinHost
;
//
irr
::
gui
::
IGUIButton
*
btnJoinCancel
;
//
irr
::
gui
::
IGUIButton
*
btnCreateHost
;
//
irr
::
gui
::
IGUIButton
*
btnJoinHost
;
irr
::
gui
::
IGUIButton
*
btnJoinCancel
;
irr
::
gui
::
IGUIButton
*
btnCreateHost
;
//create host
irr
::
gui
::
IGUIWindow
*
wCreateHost
;
irr
::
gui
::
IGUIImage
*
bgCreateHost
;
...
...
@@ -370,35 +370,35 @@ public:
irr
::
gui
::
IGUIComboBox
*
cbDuelRule
;
irr
::
gui
::
IGUICheckBox
*
chkNoCheckDeck
;
irr
::
gui
::
IGUICheckBox
*
chkNoShuffleDeck
;
irr
::
gui
::
IGUIButton
*
btnHostConfirm
;
//
irr
::
gui
::
IGUIButton
*
btnHostCancel
;
//
irr
::
gui
::
IGUIButton
*
btnHostConfirm
;
irr
::
gui
::
IGUIButton
*
btnHostCancel
;
//host panel
irr
::
gui
::
IGUIWindow
*
wHostPrepare
;
irr
::
gui
::
IGUIImage
*
bgHostPrepare
;
irr
::
gui
::
IGUIButton
*
btnHostPrepDuelist
;
//
irr
::
gui
::
IGUIButton
*
btnHostPrepOB
;
//
irr
::
gui
::
IGUIButton
*
btnHostPrepDuelist
;
irr
::
gui
::
IGUIButton
*
btnHostPrepOB
;
irr
::
gui
::
IGUIStaticText
*
stHostPrepDuelist
[
4
];
irr
::
gui
::
IGUICheckBox
*
chkHostPrepReady
[
4
];
irr
::
gui
::
CGUIImageButton
*
btnHostPrepKick
[
4
];
//
irr
::
gui
::
CGUIImageButton
*
btnHostPrepKick
[
4
];
irr
::
gui
::
IGUIComboBox
*
cbCategorySelect
;
irr
::
gui
::
IGUIComboBox
*
cbDeckSelect
;
irr
::
gui
::
IGUIStaticText
*
stHostPrepRule
;
irr
::
gui
::
IGUIStaticText
*
stHostPrepOB
;
irr
::
gui
::
IGUIButton
*
btnHostPrepReady
;
//
irr
::
gui
::
IGUIButton
*
btnHostPrepNotReady
;
//
irr
::
gui
::
IGUIButton
*
btnHostPrepStart
;
//
irr
::
gui
::
IGUIButton
*
btnHostPrepCancel
;
//
irr
::
gui
::
IGUIButton
*
btnHostPrepReady
;
irr
::
gui
::
IGUIButton
*
btnHostPrepNotReady
;
irr
::
gui
::
IGUIButton
*
btnHostPrepStart
;
irr
::
gui
::
IGUIButton
*
btnHostPrepCancel
;
//replay
irr
::
gui
::
IGUIWindow
*
wReplay
;
irr
::
gui
::
IGUIImage
*
bgReplay
;
irr
::
gui
::
IGUIListBox
*
lstReplayList
;
irr
::
gui
::
IGUIStaticText
*
stReplayInfo
;
irr
::
gui
::
IGUIButton
*
btnLoadReplay
;
//
irr
::
gui
::
IGUIButton
*
btnDeleteReplay
;
//
irr
::
gui
::
IGUIButton
*
btnRenameReplay
;
//
irr
::
gui
::
IGUIButton
*
btnReplayCancel
;
//
irr
::
gui
::
IGUIButton
*
btnExportDeck
;
//
irr
::
gui
::
IGUIButton
*
btnShareReplay
;
//
irr
::
gui
::
IGUIButton
*
btnLoadReplay
;
irr
::
gui
::
IGUIButton
*
btnDeleteReplay
;
irr
::
gui
::
IGUIButton
*
btnRenameReplay
;
irr
::
gui
::
IGUIButton
*
btnReplayCancel
;
irr
::
gui
::
IGUIButton
*
btnExportDeck
;
irr
::
gui
::
IGUIButton
*
btnShareReplay
;
irr
::
gui
::
IGUIEditBox
*
ebRepStartTurn
;
//single play
irr
::
gui
::
IGUIWindow
*
wSinglePlay
;
...
...
@@ -406,33 +406,32 @@ public:
//TEST BOT MODE
irr
::
gui
::
IGUIListBox
*
lstBotList
;
irr
::
gui
::
IGUIStaticText
*
stBotInfo
;
irr
::
gui
::
IGUIButton
*
btnStartBot
;
//
irr
::
gui
::
IGUIButton
*
btnBotCancel
;
//
irr
::
gui
::
IGUIButton
*
btnStartBot
;
irr
::
gui
::
IGUIButton
*
btnBotCancel
;
irr
::
gui
::
IGUIComboBox
*
cbBotDeckCategory
;
irr
::
gui
::
IGUIComboBox
*
cbBotDeck
;
irr
::
gui
::
IGUIComboBox
*
cbBotRule
;
irr
::
gui
::
IGUICheckBox
*
chkBotHand
;
irr
::
gui
::
IGUICheckBox
*
chkBotNoCheckDeck
;
irr
::
gui
::
IGUICheckBox
*
chkBotNoShuffleDeck
;
irr
::
gui
::
IGUIListBox
*
lstSinglePlayList
;
irr
::
gui
::
IGUIStaticText
*
stSinglePlayInfo
;
irr
::
gui
::
IGUICheckBox
*
chkSinglePlayReturnDeckTop
;
irr
::
gui
::
IGUIButton
*
btnLoadSinglePlay
;
//
irr
::
gui
::
IGUIButton
*
btnSinglePlayCancel
;
//
irr
::
gui
::
IGUIButton
*
btnLoadSinglePlay
;
irr
::
gui
::
IGUIButton
*
btnSinglePlayCancel
;
//hand
irr
::
gui
::
IGUIWindow
*
wHand
;
irr
::
gui
::
CGUIImageButton
*
btnHand
[
3
];
//
irr
::
gui
::
IGUIWindow
*
wFTSelect
;
irr
::
gui
::
IGUIImage
*
bgFTSelect
;
irr
::
gui
::
IGUIButton
*
btnFirst
;
//
irr
::
gui
::
IGUIButton
*
btnSecond
;
//
irr
::
gui
::
IGUIButton
*
btnFirst
;
irr
::
gui
::
IGUIButton
*
btnSecond
;
//message
irr
::
gui
::
IGUIWindow
*
wMessage
;
irr
::
gui
::
IGUIImage
*
bgMessage
;
irr
::
gui
::
IGUIStaticText
*
stMessage
;
irr
::
gui
::
IGUIButton
*
btnMsgOK
;
//
irr
::
gui
::
IGUIButton
*
btnMsgOK
;
//system message
irr
::
gui
::
IGUIWindow
*
wSysMessage
;
irr
::
gui
::
IGUIImage
*
bgSysMessage
;
...
...
@@ -445,22 +444,22 @@ public:
irr
::
gui
::
IGUIWindow
*
wQuery
;
irr
::
gui
::
IGUIImage
*
bgQuery
;
irr
::
gui
::
IGUIStaticText
*
stQMessage
;
irr
::
gui
::
IGUIButton
*
btnYes
;
//
irr
::
gui
::
IGUIButton
*
btnNo
;
//
irr
::
gui
::
IGUIButton
*
btnYes
;
irr
::
gui
::
IGUIButton
*
btnNo
;
//surrender yes/no
irr
::
gui
::
IGUIWindow
*
wSurrender
;
irr
::
gui
::
IGUIImage
*
bgSurrender
;
irr
::
gui
::
IGUIStaticText
*
stSurrenderMessage
;
irr
::
gui
::
IGUIButton
*
btnSurrenderYes
;
//
irr
::
gui
::
IGUIButton
*
btnSurrenderNo
;
//
irr
::
gui
::
IGUIButton
*
btnSurrenderYes
;
irr
::
gui
::
IGUIButton
*
btnSurrenderNo
;
//options
irr
::
gui
::
IGUIWindow
*
wOptions
;
irr
::
gui
::
IGUIImage
*
bgOptions
;
irr
::
gui
::
IGUIStaticText
*
stOptions
;
irr
::
gui
::
IGUIButton
*
btnOptionp
;
//
irr
::
gui
::
IGUIButton
*
btnOptionn
;
//
irr
::
gui
::
IGUIButton
*
btnOptionOK
;
//
irr
::
gui
::
IGUIButton
*
btnOption
[
5
];
//
irr
::
gui
::
IGUIButton
*
btnOptionp
;
irr
::
gui
::
IGUIButton
*
btnOptionn
;
irr
::
gui
::
IGUIButton
*
btnOptionOK
;
irr
::
gui
::
IGUIButton
*
btnOption
[
5
];
irr
::
gui
::
IGUIScrollBar
*
scrOption
;
//pos selection
irr
::
gui
::
IGUIWindow
*
wPosSelect
;
...
...
@@ -474,9 +473,9 @@ public:
irr
::
gui
::
IGUIImage
*
bgCardSelect
;
irr
::
gui
::
IGUIStaticText
*
stCardSelect
;
irr
::
gui
::
CGUIImageButton
*
btnCardSelect
[
5
];
irr
::
gui
::
IGUIStaticText
*
stCardPos
[
5
];
irr
::
gui
::
IGUIScrollBar
*
scrCardList
;
irr
::
gui
::
IGUIButton
*
btnSelectOK
;
//
irr
::
gui
::
IGUIStaticText
*
stCardPos
[
5
];
irr
::
gui
::
IGUIScrollBar
*
scrCardList
;
irr
::
gui
::
IGUIButton
*
btnSelectOK
;
//card display
irr
::
gui
::
IGUIWindow
*
wCardDisplay
;
irr
::
gui
::
IGUIImage
*
bgCardDisplay
;
...
...
@@ -484,21 +483,21 @@ public:
irr
::
gui
::
CGUIImageButton
*
btnCardDisplay
[
5
];
irr
::
gui
::
IGUIStaticText
*
stDisplayPos
[
5
];
irr
::
gui
::
IGUIScrollBar
*
scrDisplayList
;
irr
::
gui
::
IGUIButton
*
btnDisplayOK
;
//
irr
::
gui
::
IGUIButton
*
btnDisplayOK
;
//announce number
irr
::
gui
::
IGUIWindow
*
wANNumber
;
irr
::
gui
::
IGUIImage
*
bgANNumber
;
irr
::
gui
::
IGUIStaticText
*
stANNumber
;
irr
::
gui
::
IGUIComboBox
*
cbANNumber
;
irr
::
gui
::
IGUIButton
*
btnANNumber
[
12
];
//
irr
::
gui
::
IGUIButton
*
btnANNumberOK
;
//
irr
::
gui
::
IGUIButton
*
btnANNumber
[
12
];
irr
::
gui
::
IGUIButton
*
btnANNumberOK
;
//announce card
irr
::
gui
::
IGUIWindow
*
wANCard
;
irr
::
gui
::
IGUIImage
*
bgANCard
;
irr
::
gui
::
IGUIStaticText
*
stANCard
;
irr
::
gui
::
IGUIEditBox
*
ebANCard
;
irr
::
gui
::
IGUIListBox
*
lstANCard
;
irr
::
gui
::
IGUIButton
*
btnANCardOK
;
//
irr
::
gui
::
IGUIButton
*
btnANCardOK
;
//announce attribute
irr
::
gui
::
IGUIWindow
*
wANAttribute
;
irr
::
gui
::
IGUIImage
*
bgANAttribute
;
...
...
@@ -511,17 +510,17 @@ public:
irr
::
gui
::
IGUICheckBox
*
chkRace
[
25
];
//cmd menu
irr
::
gui
::
IGUIWindow
*
wCmdMenu
;
irr
::
gui
::
IGUIButton
*
btnActivate
;
//
irr
::
gui
::
IGUIButton
*
btnSummon
;
//
irr
::
gui
::
IGUIButton
*
btnSPSummon
;
//
irr
::
gui
::
IGUIButton
*
btnMSet
;
//
irr
::
gui
::
IGUIButton
*
btnSSet
;
//
irr
::
gui
::
IGUIButton
*
btnRepos
;
//
irr
::
gui
::
IGUIButton
*
btnAttack
;
//
irr
::
gui
::
IGUIButton
*
btnShowList
;
//
irr
::
gui
::
IGUIButton
*
btnOperation
;
//
irr
::
gui
::
IGUIButton
*
btnReset
;
//
irr
::
gui
::
IGUIButton
*
btnShuffle
;
//
irr
::
gui
::
IGUIButton
*
btnActivate
;
irr
::
gui
::
IGUIButton
*
btnSummon
;
irr
::
gui
::
IGUIButton
*
btnSPSummon
;
irr
::
gui
::
IGUIButton
*
btnMSet
;
irr
::
gui
::
IGUIButton
*
btnSSet
;
irr
::
gui
::
IGUIButton
*
btnRepos
;
irr
::
gui
::
IGUIButton
*
btnAttack
;
irr
::
gui
::
IGUIButton
*
btnShowList
;
irr
::
gui
::
IGUIButton
*
btnOperation
;
irr
::
gui
::
IGUIButton
*
btnReset
;
irr
::
gui
::
IGUIButton
*
btnShuffle
;
//chat window
irr
::
gui
::
IGUIWindow
*
wChat
;
irr
::
gui
::
IGUIListBox
*
lstChatLog
;
...
...
@@ -530,22 +529,22 @@ public:
irr
::
gui
::
IGUICheckBox
*
chkIgnore2
;
//phase button
irr
::
gui
::
IGUIStaticText
*
wPhase
;
irr
::
gui
::
IGUIButton
*
btnPhaseStatus
;
//
irr
::
gui
::
IGUIButton
*
btnBP
;
//
irr
::
gui
::
IGUIButton
*
btnM2
;
//
irr
::
gui
::
IGUIButton
*
btnEP
;
//
irr
::
gui
::
IGUIButton
*
btnPhaseStatus
;
irr
::
gui
::
IGUIButton
*
btnBP
;
irr
::
gui
::
IGUIButton
*
btnM2
;
irr
::
gui
::
IGUIButton
*
btnEP
;
//deck edit
irr
::
gui
::
IGUIWindow
*
wDeckEdit
;
irr
::
gui
::
IGUIImage
*
bgDeckEdit
;
irr
::
gui
::
IGUIComboBox
*
cbDBCategory
;
irr
::
gui
::
IGUIComboBox
*
cbDBDecks
;
irr
::
gui
::
IGUIButton
*
btnManageDeck
;
//
irr
::
gui
::
IGUIButton
*
btnClearDeck
;
//
irr
::
gui
::
IGUIButton
*
btnManageDeck
;
irr
::
gui
::
IGUIButton
*
btnClearDeck
;
irr
::
gui
::
IGUIButton
*
btnSortDeck
;
irr
::
gui
::
IGUIButton
*
btnShuffleDeck
;
//
irr
::
gui
::
IGUIButton
*
btnShuffleDeck
;
irr
::
gui
::
IGUIButton
*
btnSaveDeck
;
irr
::
gui
::
IGUIButton
*
btnDeleteDeck
;
//
irr
::
gui
::
IGUIButton
*
btnSaveDeckAs
;
//
irr
::
gui
::
IGUIButton
*
btnDeleteDeck
;
irr
::
gui
::
IGUIButton
*
btnSaveDeckAs
;
irr
::
gui
::
IGUIButton
*
btnSideOK
;
irr
::
gui
::
IGUIButton
*
btnSideShuffle
;
irr
::
gui
::
IGUIButton
*
btnSideSort
;
...
...
@@ -567,24 +566,24 @@ public:
irr
::
gui
::
IGUIImage
*
bgDeckManage
;
irr
::
gui
::
IGUIListBox
*
lstCategories
;
irr
::
gui
::
IGUIListBox
*
lstDecks
;
irr
::
gui
::
IGUIButton
*
btnNewCategory
;
//
irr
::
gui
::
IGUIButton
*
btnRenameCategory
;
//
irr
::
gui
::
IGUIButton
*
btnDeleteCategory
;
//
irr
::
gui
::
IGUIButton
*
btnNewDeck
;
//
irr
::
gui
::
IGUIButton
*
btnRenameDeck
;
//
irr
::
gui
::
IGUIButton
*
btnDMDeleteDeck
;
//
irr
::
gui
::
IGUIButton
*
btnMoveDeck
;
//
irr
::
gui
::
IGUIButton
*
btnCopyDeck
;
//
irr
::
gui
::
IGUIButton
*
btnCloseDM
;
//
irr
::
gui
::
IGUIButton
*
btnNewCategory
;
irr
::
gui
::
IGUIButton
*
btnRenameCategory
;
irr
::
gui
::
IGUIButton
*
btnDeleteCategory
;
irr
::
gui
::
IGUIButton
*
btnNewDeck
;
irr
::
gui
::
IGUIButton
*
btnRenameDeck
;
irr
::
gui
::
IGUIButton
*
btnDMDeleteDeck
;
irr
::
gui
::
IGUIButton
*
btnMoveDeck
;
irr
::
gui
::
IGUIButton
*
btnCopyDeck
;
irr
::
gui
::
IGUIButton
*
btnCloseDM
;
irr
::
gui
::
IGUIWindow
*
wDMQuery
;
irr
::
gui
::
IGUIImage
*
bgDMQuery
;
irr
::
gui
::
IGUIStaticText
*
stDMMessage
;
irr
::
gui
::
IGUIStaticText
*
stDMMessage2
;
irr
::
gui
::
IGUIEditBox
*
ebDMName
;
irr
::
gui
::
IGUIComboBox
*
cbDMCategory
;
irr
::
gui
::
IGUIButton
*
btnDMOK
;
//
irr
::
gui
::
IGUIButton
*
btnDMCancel
;
//
irr
::
gui
::
IGUI
ComboBox
*
cbLFList
;
irr
::
gui
::
IGUIButton
*
btnDMOK
;
irr
::
gui
::
IGUIButton
*
btnDMCancel
;
irr
::
gui
::
IGUI
ScrollBar
*
scrPackCards
;
//filter
irr
::
gui
::
IGUIWindow
*
wFilter
;
irr
::
gui
::
IGUIImage
*
bgFilter
;
...
...
@@ -599,9 +598,9 @@ public:
irr
::
gui
::
IGUIEditBox
*
ebAttack
;
irr
::
gui
::
IGUIEditBox
*
ebDefense
;
irr
::
gui
::
IGUIEditBox
*
ebCardName
;
irr
::
gui
::
IGUIButton
*
btnEffectFilter
;
//
irr
::
gui
::
IGUIButton
*
btnStartFilter
;
//
irr
::
gui
::
IGUIButton
*
btnClearFilter
;
//
irr
::
gui
::
IGUIButton
*
btnEffectFilter
;
irr
::
gui
::
IGUIButton
*
btnStartFilter
;
irr
::
gui
::
IGUIButton
*
btnClearFilter
;
irr
::
gui
::
IGUIWindow
*
wCategories
;
irr
::
gui
::
IGUIImage
*
bgCategories
;
irr
::
gui
::
IGUICheckBox
*
chkCategory
[
32
];
...
...
@@ -618,26 +617,26 @@ public:
irr
::
gui
::
IGUIWindow
*
wReplaySave
;
irr
::
gui
::
IGUIImage
*
bgReplaySave
;
irr
::
gui
::
IGUIEditBox
*
ebRSName
;
irr
::
gui
::
IGUIButton
*
btnRSYes
;
//
irr
::
gui
::
IGUIButton
*
btnRSNo
;
//
irr
::
gui
::
IGUIButton
*
btnRSYes
;
irr
::
gui
::
IGUIButton
*
btnRSNo
;
//replay control
irr
::
gui
::
IGUIWindow
*
wReplayControl
;
irr
::
gui
::
IGUIButton
*
btnReplayStart
;
//
irr
::
gui
::
IGUIButton
*
btnReplayPause
;
//
irr
::
gui
::
IGUIButton
*
btnReplayStep
;
//
irr
::
gui
::
IGUIButton
*
btnReplayUndo
;
//
irr
::
gui
::
IGUIButton
*
btnReplayExit
;
//
irr
::
gui
::
IGUIButton
*
btnReplaySwap
;
//
irr
::
gui
::
IGUIButton
*
btnReplayStart
;
irr
::
gui
::
IGUIButton
*
btnReplayPause
;
irr
::
gui
::
IGUIButton
*
btnReplayStep
;
irr
::
gui
::
IGUIButton
*
btnReplayUndo
;
irr
::
gui
::
IGUIButton
*
btnReplayExit
;
irr
::
gui
::
IGUIButton
*
btnReplaySwap
;
//surrender/leave
irr
::
gui
::
IGUIButton
*
btnLeaveGame
;
//
irr
::
gui
::
IGUIButton
*
btnLeaveGame
;
//swap
irr
::
gui
::
IGUIButton
*
btnSpectatorSwap
;
//
irr
::
gui
::
IGUIButton
*
btnSpectatorSwap
;
//chain control
irr
::
gui
::
IGUIButton
*
btnChainIgnore
;
//
irr
::
gui
::
IGUIButton
*
btnChainAlways
;
//
irr
::
gui
::
IGUIButton
*
btnChainWhenAvail
;
//
irr
::
gui
::
IGUIButton
*
btnChainIgnore
;
irr
::
gui
::
IGUIButton
*
btnChainAlways
;
irr
::
gui
::
IGUIButton
*
btnChainWhenAvail
;
//cancel or finish
irr
::
gui
::
IGUIButton
*
btnCancelOrFinish
;
//
irr
::
gui
::
IGUIButton
*
btnCancelOrFinish
;
//big picture
irr
::
gui
::
IGUIWindow
*
wBigCard
;
irr
::
gui
::
IGUIImage
*
imgBigCard
;
...
...
@@ -683,8 +682,7 @@ private:
core
::
position2di
InputFix
;
};
extern
Game
*
mainGame
;
extern
Game
*
mainGame
;
template
<
typename
T
>
inline
std
::
vector
<
T
>
Game
::
TokenizeString
(
T
input
,
const
T
&
token
)
{
std
::
vector
<
T
>
res
;
...
...
mobile/assets/data/conf/strings.conf
View file @
18b078ba
...
...
@@ -486,6 +486,7 @@
!
system
1474
已存在同名分类
!
system
1475
已存在同名卡组
!
system
1476
删除失败
!
system
1477
卡片数:
!
system
1481
OCG
!
system
1482
TCG
!
system
1483
简体中文
...
...
mobile/assets_en/data/conf/strings.conf
View file @
18b078ba
...
...
@@ -486,6 +486,7 @@
!
system
1474
There
is
already
a
category
with
this
name
.
!
system
1475
There
is
already
a
deck
with
this
name
.
!
system
1476
Delete
failed
.
!
system
1477
count
:
!
system
1481
OCG
!
system
1482
TCG
!
system
1483
Simplified
Chinese
...
...
mobile/assets_ko/data/conf/strings.conf
View file @
18b078ba
...
...
@@ -486,6 +486,7 @@
!
system
1474
같은 이름의 카테고리가 존재합니다.
!
system
1475
같은 이름의 덱이 존재합니다.
!
system
1476
제거 실패
!
system
1477
계수:
!
system
1481
OCG
!
system
1482
TCG
!
system
1483
CCG
...
...
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