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
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
ygopro
Commits
5c106955
Commit
5c106955
authored
Mar 15, 2018
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro
parents
8956aa07
3f419cc9
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
520 additions
and
320 deletions
+520
-320
gframe/client_card.h
gframe/client_card.h
+3
-3
gframe/client_field.cpp
gframe/client_field.cpp
+11
-10
gframe/client_field.h
gframe/client_field.h
+1
-0
gframe/config.h
gframe/config.h
+6
-0
gframe/data_manager.cpp
gframe/data_manager.cpp
+22
-29
gframe/deck_con.cpp
gframe/deck_con.cpp
+6
-3
gframe/deck_con.h
gframe/deck_con.h
+1
-0
gframe/duelclient.cpp
gframe/duelclient.cpp
+8
-0
gframe/event_handler.cpp
gframe/event_handler.cpp
+129
-253
gframe/game.cpp
gframe/game.cpp
+6
-2
gframe/game.h
gframe/game.h
+5
-0
gframe/gframe.cpp
gframe/gframe.cpp
+18
-0
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+78
-0
gframe/menu_handler.h
gframe/menu_handler.h
+3
-1
gframe/replay.cpp
gframe/replay.cpp
+30
-0
gframe/replay.h
gframe/replay.h
+2
-0
gframe/single_mode.cpp
gframe/single_mode.cpp
+1
-0
lflist.conf
lflist.conf
+179
-17
ocgcore
ocgcore
+1
-1
script
script
+1
-1
strings.conf
strings.conf
+9
-0
No files found.
gframe/client_card.h
View file @
5c106955
...
...
@@ -39,9 +39,9 @@ struct CardDataC {
unsigned
int
category
;
};
struct
CardString
{
wchar_t
*
name
;
wchar_t
*
text
;
wchar_t
*
desc
[
16
];
std
::
wstring
name
;
std
::
wstring
text
;
std
::
wstring
desc
[
16
];
};
typedef
std
::
unordered_map
<
unsigned
int
,
CardDataC
>::
const_iterator
code_pointer
;
...
...
gframe/client_field.cpp
View file @
5c106955
...
...
@@ -645,6 +645,7 @@ void ClientField::ReplaySwap() {
(
*
cit
)
->
is_moving
=
false
;
}
mainGame
->
dInfo
.
isFirst
=
!
mainGame
->
dInfo
.
isFirst
;
mainGame
->
dInfo
.
isReplaySwapped
=
!
mainGame
->
dInfo
.
isReplaySwapped
;
std
::
swap
(
mainGame
->
dInfo
.
lp
[
0
],
mainGame
->
dInfo
.
lp
[
1
]);
std
::
swap
(
mainGame
->
dInfo
.
strLP
[
0
],
mainGame
->
dInfo
.
strLP
[
1
]);
std
::
swap
(
mainGame
->
dInfo
.
hostname
,
mainGame
->
dInfo
.
clientname
);
...
...
@@ -1369,7 +1370,7 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
if
(
dataManager
.
GetString
(
trycode
,
&
cstr
)
&&
dataManager
.
GetData
(
trycode
,
&
cd
)
&&
is_declarable
(
cd
,
declarable_type
))
{
mainGame
->
lstANCard
->
clear
();
ancard
.
clear
();
mainGame
->
lstANCard
->
addItem
(
cstr
.
name
);
mainGame
->
lstANCard
->
addItem
(
cstr
.
name
.
c_str
()
);
ancard
.
push_back
(
trycode
);
return
;
}
...
...
@@ -1378,15 +1379,15 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
mainGame
->
lstANCard
->
clear
();
ancard
.
clear
();
for
(
auto
cit
=
dataManager
.
_strings
.
begin
();
cit
!=
dataManager
.
_strings
.
end
();
++
cit
)
{
if
(
wcsstr
(
cit
->
second
.
name
,
pname
)
!=
0
)
{
if
(
cit
->
second
.
name
.
find
(
pname
)
!=
std
::
wstring
::
npos
)
{
auto
cp
=
dataManager
.
GetCodePointer
(
cit
->
first
);
//verified by _strings
//datas.alias can be double card names or alias
if
(
is_declarable
(
cp
->
second
,
declarable_type
))
{
if
(
wcscmp
(
pname
,
cit
->
second
.
name
)
==
0
)
{
//exact match
mainGame
->
lstANCard
->
insertItem
(
0
,
cit
->
second
.
name
,
-
1
);
if
(
pname
==
cit
->
second
.
name
)
{
//exact match
mainGame
->
lstANCard
->
insertItem
(
0
,
cit
->
second
.
name
.
c_str
()
,
-
1
);
ancard
.
insert
(
ancard
.
begin
(),
cit
->
first
);
}
else
{
mainGame
->
lstANCard
->
addItem
(
cit
->
second
.
name
);
mainGame
->
lstANCard
->
addItem
(
cit
->
second
.
name
.
c_str
()
);
ancard
.
push_back
(
cit
->
first
);
}
}
...
...
@@ -1401,7 +1402,7 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
if
(
dataManager
.
GetString
(
trycode
,
&
cstr
)
&&
dataManager
.
GetData
(
trycode
,
&
cd
)
&&
is_declarable
(
cd
,
opcode
))
{
mainGame
->
lstANCard
->
clear
();
ancard
.
clear
();
mainGame
->
lstANCard
->
addItem
(
cstr
.
name
);
mainGame
->
lstANCard
->
addItem
(
cstr
.
name
.
c_str
()
);
ancard
.
push_back
(
trycode
);
return
;
}
...
...
@@ -1410,15 +1411,15 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
mainGame
->
lstANCard
->
clear
();
ancard
.
clear
();
for
(
auto
cit
=
dataManager
.
_strings
.
begin
();
cit
!=
dataManager
.
_strings
.
end
();
++
cit
)
{
if
(
wcsstr
(
cit
->
second
.
name
,
pname
)
!=
0
)
{
if
(
cit
->
second
.
name
.
find
(
pname
)
!=
std
::
wstring
::
npos
)
{
auto
cp
=
dataManager
.
GetCodePointer
(
cit
->
first
);
//verified by _strings
//datas.alias can be double card names or alias
if
(
is_declarable
(
cp
->
second
,
opcode
))
{
if
(
wcscmp
(
pname
,
cit
->
second
.
name
)
==
0
)
{
//exact match
mainGame
->
lstANCard
->
insertItem
(
0
,
cit
->
second
.
name
,
-
1
);
if
(
pname
==
cit
->
second
.
name
)
{
//exact match
mainGame
->
lstANCard
->
insertItem
(
0
,
cit
->
second
.
name
.
c_str
()
,
-
1
);
ancard
.
insert
(
ancard
.
begin
(),
cit
->
first
);
}
else
{
mainGame
->
lstANCard
->
addItem
(
cit
->
second
.
name
);
mainGame
->
lstANCard
->
addItem
(
cit
->
second
.
name
.
c_str
()
);
ancard
.
push_back
(
cit
->
first
);
}
}
...
...
gframe/client_field.h
View file @
5c106955
...
...
@@ -137,6 +137,7 @@ public:
void
ShowCancelOrFinishButton
(
int
buttonOp
);
void
SetShowMark
(
ClientCard
*
pcard
,
bool
enable
);
void
SetResponseSelectedCards
()
const
;
void
CancelOrFinish
();
};
}
...
...
gframe/config.h
View file @
5c106955
...
...
@@ -13,8 +13,12 @@
#ifdef _MSC_VER
#define myswprintf _swprintf
#define mywcsncasecmp _wcsnicmp
#define mystrncasecmp _strnicmp
#else
#define myswprintf swprintf
#define mywcsncasecmp wcsncasecmp
#define mystrncasecmp strncasecmp
#endif
#define socklen_t int
...
...
@@ -41,6 +45,8 @@
#include <wchar.h>
#define myswprintf(buf, fmt, ...) swprintf(buf, 4096, fmt, ##__VA_ARGS__)
#define mywcsncasecmp wcsncasecmp
#define mystrncasecmp strncasecmp
inline
int
_wtoi
(
const
wchar_t
*
s
)
{
wchar_t
*
endptr
;
return
(
int
)
wcstol
(
s
,
&
endptr
,
10
);
...
...
gframe/data_manager.cpp
View file @
5c106955
...
...
@@ -17,8 +17,7 @@ bool DataManager::LoadDB(const char* file) {
return
Error
(
pDB
);
CardDataC
cd
;
CardString
cs
;
for
(
int
i
=
0
;
i
<
16
;
++
i
)
cs
.
desc
[
i
]
=
0
;
int
step
=
0
,
len
=
0
;
int
step
=
0
;
do
{
step
=
sqlite3_step
(
pStmt
);
if
(
step
==
SQLITE_BUSY
||
step
==
SQLITE_ERROR
||
step
==
SQLITE_MISUSE
)
...
...
@@ -44,27 +43,21 @@ bool DataManager::LoadDB(const char* file) {
cd
.
attribute
=
sqlite3_column_int
(
pStmt
,
9
);
cd
.
category
=
sqlite3_column_int
(
pStmt
,
10
);
_datas
.
insert
(
std
::
make_pair
(
cd
.
code
,
cd
));
len
=
BufferIO
::
DecodeUTF8
((
const
char
*
)
sqlite3_column_text
(
pStmt
,
12
),
strBuffer
);
if
(
len
)
{
cs
.
name
=
new
wchar_t
[
len
+
1
];
memcpy
(
cs
.
name
,
strBuffer
,
(
len
+
1
)
*
sizeof
(
wchar_t
));
}
else
cs
.
name
=
0
;
len
=
BufferIO
::
DecodeUTF8
((
const
char
*
)
sqlite3_column_text
(
pStmt
,
13
),
strBuffer
);
if
(
len
)
{
cs
.
text
=
new
wchar_t
[
len
+
1
];
memcpy
(
cs
.
text
,
strBuffer
,
(
len
+
1
)
*
sizeof
(
wchar_t
));
}
else
{
cs
.
text
=
new
wchar_t
[
1
];
cs
.
text
[
0
]
=
0
;
if
(
const
char
*
text
=
(
const
char
*
)
sqlite3_column_text
(
pStmt
,
12
))
{
BufferIO
::
DecodeUTF8
(
text
,
strBuffer
);
cs
.
name
=
strBuffer
;
}
for
(
int
i
=
14
;
i
<
30
;
++
i
)
{
len
=
BufferIO
::
DecodeUTF8
((
const
char
*
)
sqlite3_column_text
(
pStmt
,
i
),
strBuffer
);
if
(
len
)
{
cs
.
desc
[
i
-
14
]
=
new
wchar_t
[
len
+
1
];
memcpy
(
cs
.
desc
[
i
-
14
],
strBuffer
,
(
len
+
1
)
*
sizeof
(
wchar_t
));
}
else
cs
.
desc
[
i
-
14
]
=
0
;
if
(
const
char
*
text
=
(
const
char
*
)
sqlite3_column_text
(
pStmt
,
13
))
{
BufferIO
::
DecodeUTF8
(
text
,
strBuffer
);
cs
.
text
=
strBuffer
;
}
_strings
.
insert
(
std
::
make_pair
(
cd
.
code
,
cs
));
for
(
int
i
=
0
;
i
<
16
;
++
i
)
{
if
(
const
char
*
text
=
(
const
char
*
)
sqlite3_column_text
(
pStmt
,
i
+
14
))
{
BufferIO
::
DecodeUTF8
(
text
,
strBuffer
);
cs
.
desc
[
i
]
=
strBuffer
;
}
}
_strings
.
emplace
(
cd
.
code
,
cs
);
}
}
while
(
step
!=
SQLITE_DONE
);
sqlite3_finalize
(
pStmt
);
...
...
@@ -126,8 +119,8 @@ code_pointer DataManager::GetCodePointer(int code) {
bool
DataManager
::
GetString
(
int
code
,
CardString
*
pStr
)
{
auto
csit
=
_strings
.
find
(
code
);
if
(
csit
==
_strings
.
end
())
{
pStr
->
name
=
(
wchar_t
*
)
unknown_string
;
pStr
->
text
=
(
wchar_t
*
)
unknown_string
;
pStr
->
name
=
unknown_string
;
pStr
->
text
=
unknown_string
;
return
false
;
}
*
pStr
=
csit
->
second
;
...
...
@@ -137,16 +130,16 @@ const wchar_t* DataManager::GetName(int code) {
auto
csit
=
_strings
.
find
(
code
);
if
(
csit
==
_strings
.
end
())
return
unknown_string
;
if
(
csit
->
second
.
name
)
return
csit
->
second
.
name
;
if
(
!
csit
->
second
.
name
.
empty
()
)
return
csit
->
second
.
name
.
c_str
()
;
return
unknown_string
;
}
const
wchar_t
*
DataManager
::
GetText
(
int
code
)
{
auto
csit
=
_strings
.
find
(
code
);
if
(
csit
==
_strings
.
end
())
return
unknown_string
;
if
(
csit
->
second
.
text
)
return
csit
->
second
.
text
;
if
(
!
csit
->
second
.
text
.
empty
()
)
return
csit
->
second
.
text
.
c_str
()
;
return
unknown_string
;
}
const
wchar_t
*
DataManager
::
GetDesc
(
int
strCode
)
{
...
...
@@ -157,8 +150,8 @@ const wchar_t* DataManager::GetDesc(int strCode) {
auto
csit
=
_strings
.
find
(
code
);
if
(
csit
==
_strings
.
end
())
return
unknown_string
;
if
(
csit
->
second
.
desc
[
offset
]
)
return
csit
->
second
.
desc
[
offset
];
if
(
!
csit
->
second
.
desc
[
offset
].
empty
()
)
return
csit
->
second
.
desc
[
offset
]
.
c_str
()
;
return
unknown_string
;
}
const
wchar_t
*
DataManager
::
GetSysString
(
int
code
)
{
...
...
gframe/deck_con.cpp
View file @
5c106955
...
...
@@ -84,6 +84,7 @@ void DeckBuilder::Initialize() {
is_starting_dragging
=
false
;
prev_deck
=
mainGame
->
cbDBDecks
->
getSelected
();
prev_operation
=
0
;
prev_sel
=
-
1
;
is_modified
=
false
;
mainGame
->
device
->
setEventReceiver
(
this
);
}
...
...
@@ -184,6 +185,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
gMutex
.
Unlock
();
prev_operation
=
id
;
prev_sel
=
sel
;
break
;
}
case
BUTTON_LEAVE_GAME
:
{
...
...
@@ -260,7 +262,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
deckManager
.
current_deck
.
extra
.
clear
();
deckManager
.
current_deck
.
side
.
clear
();
}
else
if
(
prev_operation
==
BUTTON_DELETE_DECK
)
{
int
sel
=
mainGame
->
cbDBDecks
->
getSelected
()
;
int
sel
=
prev_sel
;
if
(
deckManager
.
DeleteDeck
(
deckManager
.
current_deck
,
mainGame
->
cbDBDecks
->
getItem
(
sel
)))
{
mainGame
->
cbDBDecks
->
removeItem
(
sel
);
int
count
=
mainGame
->
cbDBDecks
->
getItemCount
();
...
...
@@ -274,6 +276,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
prev_deck
=
sel
;
is_modified
=
false
;
}
prev_sel
=
-
1
;
}
else
if
(
prev_operation
==
BUTTON_LEAVE_GAME
)
{
Terminate
();
}
else
if
(
prev_operation
==
COMBOBOX_DBDECKS
)
{
...
...
@@ -845,12 +848,12 @@ void DeckBuilder::FilterCards() {
}
if
(
pstr
)
{
if
(
pstr
[
0
]
==
L'$'
)
{
if
(
!
CardNameContains
(
text
.
name
,
&
pstr
[
1
]))
if
(
!
CardNameContains
(
text
.
name
.
c_str
()
,
&
pstr
[
1
]))
continue
;
}
else
if
(
pstr
[
0
]
==
L'@'
&&
set_code
)
{
if
(
!
check_set_code
(
data
,
set_code
))
continue
;
}
else
{
if
(
!
CardNameContains
(
text
.
name
,
pstr
)
&&
wcsstr
(
text
.
text
,
pstr
)
==
0
if
(
!
CardNameContains
(
text
.
name
.
c_str
(),
pstr
)
&&
text
.
text
.
find
(
pstr
)
==
std
::
wstring
::
npos
&&
(
!
set_code
||
!
check_set_code
(
data
,
set_code
)))
continue
;
}
...
...
gframe/deck_con.h
View file @
5c106955
...
...
@@ -62,6 +62,7 @@ public:
code_pointer
draging_pointer
;
int
prev_deck
;
s32
prev_operation
;
int
prev_sel
;
bool
is_modified
;
std
::
unordered_map
<
int
,
int
>*
filterList
;
...
...
gframe/duelclient.cpp
View file @
5c106955
...
...
@@ -562,6 +562,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
dInfo
.
time_left
[
0
]
=
0
;
mainGame
->
dInfo
.
time_left
[
1
]
=
0
;
mainGame
->
dInfo
.
time_player
=
2
;
mainGame
->
dInfo
.
isReplaySwapped
=
false
;
mainGame
->
is_building
=
false
;
mainGame
->
wCardImg
->
setVisible
(
true
);
mainGame
->
wInfos
->
setVisible
(
true
);
...
...
@@ -672,6 +673,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
wchar_t
timetext
[
80
];
mbstowcs
(
timetext
,
timebuf
,
size
);
mainGame
->
ebRSName
->
setText
(
timetext
);
mainGame
->
wReplaySave
->
setText
(
dataManager
.
GetSysString
(
1340
));
mainGame
->
PopupElement
(
mainGame
->
wReplaySave
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
replaySignal
.
Reset
();
...
...
@@ -1050,6 +1052,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
dField
.
Initial
(
mainGame
->
LocalPlayer
(
1
),
deckc
,
extrac
);
mainGame
->
dInfo
.
turn
=
0
;
mainGame
->
dInfo
.
is_shuffling
=
false
;
if
(
mainGame
->
dInfo
.
isReplaySwapped
)
{
std
::
swap
(
mainGame
->
dInfo
.
hostname
,
mainGame
->
dInfo
.
clientname
);
std
::
swap
(
mainGame
->
dInfo
.
hostname_tag
,
mainGame
->
dInfo
.
clientname_tag
);
mainGame
->
dInfo
.
isReplaySwapped
=
false
;
mainGame
->
dField
.
ReplaySwap
();
}
mainGame
->
gMutex
.
Unlock
();
return
true
;
}
...
...
gframe/event_handler.cpp
View file @
5c106955
...
...
@@ -158,133 +158,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break
;
}
case
BUTTON_CANCEL_OR_FINISH
:
{
switch
(
mainGame
->
dInfo
.
curMsg
)
{
case
MSG_WAITING
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
}
break
;
}
case
MSG_SELECT_BATTLECMD
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wOptions
);
ShowCancelOrFinishButton
(
0
);
}
break
;
}
case
MSG_SELECT_IDLECMD
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wOptions
);
ShowCancelOrFinishButton
(
0
);
}
break
;
}
case
MSG_SELECT_YESNO
:
case
MSG_SELECT_EFFECTYN
:
{
if
(
highlighting_card
)
highlighting_card
->
is_highlighting
=
false
;
highlighting_card
=
0
;
DuelClient
::
SetResponseI
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
case
MSG_SELECT_CARD
:
{
if
(
selected_cards
.
size
()
==
0
)
{
if
(
select_cancelable
)
{
DuelClient
::
SetResponseI
(
-
1
);
ShowCancelOrFinishButton
(
0
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
DuelClient
::
SendResponse
();
}
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
if
(
select_ready
)
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
DuelClient
::
SendResponse
();
}
break
;
}
case
MSG_SELECT_TRIBUTE
:
{
if
(
selected_cards
.
size
()
==
0
)
{
if
(
select_cancelable
)
{
DuelClient
::
SetResponseI
(
-
1
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
DuelClient
::
SendResponse
();
}
break
;
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
break
;
}
case
MSG_SELECT_SUM
:
{
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
break
;
}
case
MSG_SELECT_CHAIN
:
{
if
(
chain_forced
)
break
;
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
break
;
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
DuelClient
::
SetResponseI
(
-
1
);
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
}
else
{
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
ShowCancelOrFinishButton
(
0
);
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
DuelClient
::
SetResponseI
(
-
1
);
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wOptions
);
}
break
;
}
case
MSG_SORT_CHAIN
:
case
MSG_SORT_CARD
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
DuelClient
::
SetResponseI
(
-
1
);
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
}
break
;
}
}
CancelOrFinish
();
break
;
}
case
BUTTON_MSG_OK
:
{
...
...
@@ -1499,132 +1373,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame
->
wCmdMenu
->
setVisible
(
false
);
if
(
mainGame
->
fadingList
.
size
())
break
;
switch
(
mainGame
->
dInfo
.
curMsg
)
{
case
MSG_WAITING
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
}
break
;
}
case
MSG_SELECT_BATTLECMD
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wOptions
);
ShowCancelOrFinishButton
(
0
);
}
break
;
}
case
MSG_SELECT_IDLECMD
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wOptions
);
ShowCancelOrFinishButton
(
0
);
}
break
;
}
case
MSG_SELECT_YESNO
:
case
MSG_SELECT_EFFECTYN
:
{
if
(
highlighting_card
)
highlighting_card
->
is_highlighting
=
false
;
highlighting_card
=
0
;
DuelClient
::
SetResponseI
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
case
MSG_SELECT_CARD
:
{
if
(
selected_cards
.
size
()
==
0
)
{
if
(
select_cancelable
)
{
DuelClient
::
SetResponseI
(
-
1
);
ShowCancelOrFinishButton
(
0
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
DuelClient
::
SendResponse
();
}
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
if
(
select_ready
)
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
DuelClient
::
SendResponse
();
}
break
;
}
case
MSG_SELECT_TRIBUTE
:
{
if
(
selected_cards
.
size
()
==
0
)
{
if
(
select_cancelable
)
{
DuelClient
::
SetResponseI
(
-
1
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
DuelClient
::
SendResponse
();
}
break
;
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
break
;
}
case
MSG_SELECT_SUM
:
{
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
break
;
}
case
MSG_SELECT_CHAIN
:
{
if
(
chain_forced
)
break
;
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
break
;
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
DuelClient
::
SetResponseI
(
-
1
);
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
}
else
{
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
ShowCancelOrFinishButton
(
0
);
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
DuelClient
::
SetResponseI
(
-
1
);
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wOptions
);
}
break
;
}
case
MSG_SORT_CHAIN
:
case
MSG_SORT_CARD
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
DuelClient
::
SetResponseI
(
-
1
);
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
}
break
;
}
}
CancelOrFinish
();
break
;
}
case
irr
:
:
EMIE_MOUSE_MOVED
:
{
...
...
@@ -2361,4 +2110,131 @@ void ClientField::SetResponseSelectedCards() const {
respbuf
[
i
+
1
]
=
selected_cards
[
i
]
->
select_seq
;
DuelClient
::
SetResponseB
(
respbuf
,
selected_cards
.
size
()
+
1
);
}
void
ClientField
::
CancelOrFinish
()
{
switch
(
mainGame
->
dInfo
.
curMsg
)
{
case
MSG_WAITING
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
}
break
;
}
case
MSG_SELECT_BATTLECMD
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wOptions
);
ShowCancelOrFinishButton
(
0
);
}
break
;
}
case
MSG_SELECT_IDLECMD
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
ShowCancelOrFinishButton
(
0
);
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wOptions
);
ShowCancelOrFinishButton
(
0
);
}
break
;
}
case
MSG_SELECT_YESNO
:
case
MSG_SELECT_EFFECTYN
:
{
if
(
highlighting_card
)
highlighting_card
->
is_highlighting
=
false
;
highlighting_card
=
0
;
DuelClient
::
SetResponseI
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
case
MSG_SELECT_CARD
:
{
if
(
selected_cards
.
size
()
==
0
)
{
if
(
select_cancelable
)
{
DuelClient
::
SetResponseI
(
-
1
);
ShowCancelOrFinishButton
(
0
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
DuelClient
::
SendResponse
();
}
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
if
(
select_ready
)
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
DuelClient
::
SendResponse
();
}
break
;
}
case
MSG_SELECT_TRIBUTE
:
{
if
(
selected_cards
.
size
()
==
0
)
{
if
(
select_cancelable
)
{
DuelClient
::
SetResponseI
(
-
1
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
else
DuelClient
::
SendResponse
();
}
break
;
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
break
;
}
case
MSG_SELECT_SUM
:
{
if
(
mainGame
->
wQuery
->
isVisible
())
{
SetResponseSelectedCards
();
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
}
break
;
}
case
MSG_SELECT_CHAIN
:
{
if
(
chain_forced
)
break
;
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
break
;
}
if
(
mainGame
->
wQuery
->
isVisible
())
{
DuelClient
::
SetResponseI
(
-
1
);
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
}
else
{
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
ShowCancelOrFinishButton
(
0
);
}
if
(
mainGame
->
wOptions
->
isVisible
())
{
DuelClient
::
SetResponseI
(
-
1
);
ShowCancelOrFinishButton
(
0
);
mainGame
->
HideElement
(
mainGame
->
wOptions
);
}
break
;
}
case
MSG_SORT_CHAIN
:
case
MSG_SORT_CARD
:
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
DuelClient
::
SetResponseI
(
-
1
);
mainGame
->
HideElement
(
mainGame
->
wCardSelect
,
true
);
}
break
;
}
}
}
}
gframe/game.cpp
View file @
5c106955
...
...
@@ -44,6 +44,8 @@ bool Game::Initialize() {
ignore_chain
=
false
;
chain_when_avail
=
false
;
is_building
=
false
;
menuHandler
.
prev_operation
=
0
;
menuHandler
.
prev_sel
=
-
1
;
memset
(
&
dInfo
,
0
,
sizeof
(
DuelInfo
));
memset
(
chatTiming
,
0
,
sizeof
(
chatTiming
));
deckManager
.
LoadLFList
();
...
...
@@ -544,8 +546,10 @@ bool Game::Initialize() {
wReplay
->
setVisible
(
false
);
lstReplayList
=
env
->
addListBox
(
rect
<
s32
>
(
10
,
30
,
350
,
400
),
wReplay
,
LISTBOX_REPLAY_LIST
,
true
);
lstReplayList
->
setItemHeight
(
18
);
btnLoadReplay
=
env
->
addButton
(
rect
<
s32
>
(
460
,
355
,
570
,
380
),
wReplay
,
BUTTON_LOAD_REPLAY
,
dataManager
.
GetSysString
(
1348
));
btnReplayCancel
=
env
->
addButton
(
rect
<
s32
>
(
460
,
385
,
570
,
410
),
wReplay
,
BUTTON_CANCEL_REPLAY
,
dataManager
.
GetSysString
(
1347
));
btnLoadReplay
=
env
->
addButton
(
rect
<
s32
>
(
470
,
355
,
570
,
380
),
wReplay
,
BUTTON_LOAD_REPLAY
,
dataManager
.
GetSysString
(
1348
));
btnDeleteReplay
=
env
->
addButton
(
rect
<
s32
>
(
360
,
355
,
460
,
380
),
wReplay
,
BUTTON_DELETE_REPLAY
,
dataManager
.
GetSysString
(
1361
));
btnRenameReplay
=
env
->
addButton
(
rect
<
s32
>
(
360
,
385
,
460
,
410
),
wReplay
,
BUTTON_RENAME_REPLAY
,
dataManager
.
GetSysString
(
1362
));
btnReplayCancel
=
env
->
addButton
(
rect
<
s32
>
(
470
,
385
,
570
,
410
),
wReplay
,
BUTTON_CANCEL_REPLAY
,
dataManager
.
GetSysString
(
1347
));
env
->
addStaticText
(
dataManager
.
GetSysString
(
1349
),
rect
<
s32
>
(
360
,
30
,
570
,
50
),
false
,
true
,
wReplay
);
stReplayInfo
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
360
,
60
,
570
,
350
),
false
,
true
,
wReplay
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1353
),
rect
<
s32
>
(
360
,
275
,
570
,
295
),
false
,
true
,
wReplay
);
...
...
gframe/game.h
View file @
5c106955
...
...
@@ -67,6 +67,7 @@ struct DuelInfo {
unsigned
char
time_player
;
unsigned
short
time_limit
;
unsigned
short
time_left
[
2
];
bool
isReplaySwapped
;
};
struct
BotInfo
{
...
...
@@ -284,6 +285,8 @@ public:
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
::
IGUIEditBox
*
ebRepStartTurn
;
//single play
...
...
@@ -498,6 +501,8 @@ extern Game* mainGame;
#define LISTBOX_REPLAY_LIST 130
#define BUTTON_LOAD_REPLAY 131
#define BUTTON_CANCEL_REPLAY 132
#define BUTTON_DELETE_REPLAY 133
#define BUTTON_RENAME_REPLAY 134
#define EDITBOX_CHAT 140
#define BUTTON_MSG_OK 200
#define BUTTON_YES 201
...
...
gframe/gframe.cpp
View file @
5c106955
...
...
@@ -78,6 +78,7 @@ int main(int argc, char* argv[]) {
char
param
[
128
];
GetParameter
(
param
,
&
argv
[
i
][
2
]);
ygo
::
dataManager
.
LoadDB
(
param
);
continue
;
}
if
(
!
strcmp
(
argv
[
i
],
"-e"
))
{
// extra database
++
i
;
...
...
@@ -156,6 +157,23 @@ int main(int argc, char* argv[]) {
if
(
open_file
)
ClickButton
(
ygo
::
mainGame
->
btnLoadSinglePlay
);
break
;
}
else
if
(
argc
==
2
&&
strlen
(
argv
[
1
])
>=
4
)
{
char
*
pstrext
=
argv
[
1
]
+
strlen
(
argv
[
1
])
-
4
;
if
(
!
mystrncasecmp
(
pstrext
,
".ydk"
,
4
))
{
open_file
=
true
;
GetParameterW
(
open_file_name
,
&
argv
[
1
][
0
]);
exit_on_return
=
!
keep_on_return
;
ClickButton
(
ygo
::
mainGame
->
btnDeckEdit
);
break
;
}
if
(
!
mystrncasecmp
(
pstrext
,
".yrp"
,
4
))
{
open_file
=
true
;
GetParameterW
(
open_file_name
,
&
argv
[
1
][
0
]);
exit_on_return
=
!
keep_on_return
;
ClickButton
(
ygo
::
mainGame
->
btnReplayMode
);
ClickButton
(
ygo
::
mainGame
->
btnLoadReplay
);
break
;
}
}
}
ygo
::
mainGame
->
MainLoop
();
...
...
gframe/menu_handler.cpp
View file @
5c106955
...
...
@@ -30,6 +30,14 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
case
irr
:
:
EET_GUI_EVENT
:
{
irr
::
gui
::
IGUIElement
*
caller
=
event
.
GUIEvent
.
Caller
;
s32
id
=
caller
->
getID
();
if
(
mainGame
->
wQuery
->
isVisible
()
&&
id
!=
BUTTON_YES
&&
id
!=
BUTTON_NO
)
{
mainGame
->
wQuery
->
getParent
()
->
bringToFront
(
mainGame
->
wQuery
);
break
;
}
if
(
mainGame
->
wReplaySave
->
isVisible
()
&&
id
!=
BUTTON_REPLAY_SAVE
&&
id
!=
BUTTON_REPLAY_CANCEL
)
{
mainGame
->
wReplaySave
->
getParent
()
->
bringToFront
(
mainGame
->
wReplaySave
);
break
;
}
switch
(
event
.
GUIEvent
.
EventType
)
{
case
irr
:
:
gui
::
EGET_BUTTON_CLICKED
:
{
switch
(
id
)
{
...
...
@@ -185,6 +193,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame
->
HideElement
(
mainGame
->
wMainMenu
);
mainGame
->
ShowElement
(
mainGame
->
wReplay
);
mainGame
->
ebRepStartTurn
->
setText
(
L"1"
);
mainGame
->
stReplayInfo
->
setText
(
L""
);
mainGame
->
RefreshReplay
();
break
;
}
...
...
@@ -230,6 +239,33 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
ReplayMode
::
StartReplay
(
start_turn
);
break
;
}
case
BUTTON_DELETE_REPLAY
:
{
int
sel
=
mainGame
->
lstReplayList
->
getSelected
();
if
(
sel
==
-
1
)
break
;
mainGame
->
gMutex
.
Lock
();
wchar_t
textBuffer
[
256
];
myswprintf
(
textBuffer
,
L"%ls
\n
%ls"
,
mainGame
->
lstReplayList
->
getListItem
(
sel
),
dataManager
.
GetSysString
(
1363
));
mainGame
->
SetStaticText
(
mainGame
->
stQMessage
,
310
,
mainGame
->
textFont
,
(
wchar_t
*
)
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wQuery
);
mainGame
->
gMutex
.
Unlock
();
prev_operation
=
id
;
prev_sel
=
sel
;
break
;
}
case
BUTTON_RENAME_REPLAY
:
{
int
sel
=
mainGame
->
lstReplayList
->
getSelected
();
if
(
sel
==
-
1
)
break
;
mainGame
->
gMutex
.
Lock
();
mainGame
->
wReplaySave
->
setText
(
dataManager
.
GetSysString
(
1364
));
mainGame
->
ebRSName
->
setText
(
mainGame
->
lstReplayList
->
getListItem
(
sel
));
mainGame
->
PopupElement
(
mainGame
->
wReplaySave
);
mainGame
->
gMutex
.
Unlock
();
prev_operation
=
id
;
prev_sel
=
sel
;
break
;
}
case
BUTTON_CANCEL_REPLAY
:
{
mainGame
->
HideElement
(
mainGame
->
wReplay
);
mainGame
->
ShowElement
(
mainGame
->
wMainMenu
);
...
...
@@ -331,6 +367,48 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame
->
deckBuilder
.
Initialize
();
break
;
}
case
BUTTON_YES
:
{
mainGame
->
HideElement
(
mainGame
->
wQuery
);
if
(
prev_operation
==
BUTTON_DELETE_REPLAY
)
{
if
(
Replay
::
DeleteReplay
(
mainGame
->
lstReplayList
->
getListItem
(
prev_sel
)))
{
mainGame
->
stReplayInfo
->
setText
(
L""
);
mainGame
->
lstReplayList
->
removeItem
(
prev_sel
);
}
}
prev_operation
=
0
;
prev_sel
=
-
1
;
break
;
}
case
BUTTON_NO
:
{
mainGame
->
HideElement
(
mainGame
->
wQuery
);
prev_operation
=
0
;
prev_sel
=
-
1
;
break
;
}
case
BUTTON_REPLAY_SAVE
:
{
mainGame
->
HideElement
(
mainGame
->
wReplaySave
);
if
(
prev_operation
==
BUTTON_RENAME_REPLAY
)
{
wchar_t
newname
[
256
];
BufferIO
::
CopyWStr
(
mainGame
->
ebRSName
->
getText
(),
newname
,
256
);
if
(
mywcsncasecmp
(
newname
+
wcslen
(
newname
)
-
4
,
L".yrp"
,
4
))
{
myswprintf
(
newname
,
L"%ls.yrp"
,
mainGame
->
ebRSName
->
getText
());
}
if
(
Replay
::
RenameReplay
(
mainGame
->
lstReplayList
->
getListItem
(
prev_sel
),
newname
))
{
mainGame
->
lstReplayList
->
setItem
(
prev_sel
,
newname
,
-
1
);
}
else
{
mainGame
->
env
->
addMessageBox
(
L""
,
dataManager
.
GetSysString
(
1365
));
}
}
prev_operation
=
0
;
prev_sel
=
-
1
;
break
;
}
case
BUTTON_REPLAY_CANCEL
:
{
mainGame
->
HideElement
(
mainGame
->
wReplaySave
);
prev_operation
=
0
;
prev_sel
=
-
1
;
break
;
}
}
break
;
}
...
...
gframe/menu_handler.h
View file @
5c106955
...
...
@@ -8,7 +8,9 @@ namespace ygo {
class
MenuHandler
:
public
irr
::
IEventReceiver
{
public:
virtual
bool
OnEvent
(
const
irr
::
SEvent
&
event
);
s32
prev_operation
;
int
prev_sel
;
};
}
...
...
gframe/replay.cpp
View file @
5c106955
...
...
@@ -192,6 +192,36 @@ bool Replay::CheckReplay(const wchar_t* name) {
fclose
(
rfp
);
return
rheader
.
id
==
0x31707279
&&
rheader
.
version
>=
0x12d0
;
}
bool
Replay
::
DeleteReplay
(
const
wchar_t
*
name
)
{
wchar_t
fname
[
256
];
myswprintf
(
fname
,
L"./replay/%ls"
,
name
);
#ifdef WIN32
BOOL
result
=
DeleteFileW
(
fname
);
return
!!
result
;
#else
char
filefn
[
256
];
BufferIO
::
EncodeUTF8
(
fname
,
filefn
);
int
result
=
unlink
(
filefn
);
return
result
==
0
;
#endif
}
bool
Replay
::
RenameReplay
(
const
wchar_t
*
oldname
,
const
wchar_t
*
newname
)
{
wchar_t
oldfname
[
256
];
wchar_t
newfname
[
256
];
myswprintf
(
oldfname
,
L"./replay/%ls"
,
oldname
);
myswprintf
(
newfname
,
L"./replay/%ls"
,
newname
);
#ifdef WIN32
BOOL
result
=
MoveFileW
(
oldfname
,
newfname
);
return
!!
result
;
#else
char
oldfilefn
[
256
];
char
newfilefn
[
256
];
BufferIO
::
EncodeUTF8
(
oldfname
,
oldfilefn
);
BufferIO
::
EncodeUTF8
(
newfname
,
newfilefn
);
int
result
=
rename
(
oldfilefn
,
newfilefn
);
return
result
==
0
;
#endif
}
bool
Replay
::
ReadNextResponse
(
unsigned
char
resp
[
64
])
{
if
(
pdata
-
replay_data
>=
(
int
)
replay_size
)
return
false
;
...
...
gframe/replay.h
View file @
5c106955
...
...
@@ -36,6 +36,8 @@ public:
void
SaveReplay
(
const
wchar_t
*
name
);
bool
OpenReplay
(
const
wchar_t
*
name
);
static
bool
CheckReplay
(
const
wchar_t
*
name
);
static
bool
DeleteReplay
(
const
wchar_t
*
name
);
static
bool
RenameReplay
(
const
wchar_t
*
oldname
,
const
wchar_t
*
newname
);
bool
ReadNextResponse
(
unsigned
char
resp
[
64
]);
void
ReadName
(
wchar_t
*
data
);
void
ReadHeader
(
ReplayHeader
&
header
);
...
...
gframe/single_mode.cpp
View file @
5c106955
...
...
@@ -139,6 +139,7 @@ int SingleMode::SinglePlayThread(void* param) {
wchar_t
timetext
[
80
];
mbstowcs
(
timetext
,
timebuf
,
size
);
mainGame
->
ebRSName
->
setText
(
timetext
);
mainGame
->
wReplaySave
->
setText
(
dataManager
.
GetSysString
(
1340
));
mainGame
->
PopupElement
(
mainGame
->
wReplaySave
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
replaySignal
.
Reset
();
...
...
lflist.conf
View file @
5c106955
#[2018.
1][2018.2 TCG
][2017.10][2017.7][2017.4][2017.1][2016.10][2016.7][2016.4][2016.1][2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2017.11 TCG][2017.9 TCG][2017.6 TCG][2017.3 TCG][2016.8 TCG][2016.4 TCG][2015.11 TCG][2015.7 TCG][2015.4 TCG][2015.1 TCG][2014.10 TCG][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1]
!
2018
.
1
#[2018.
4][2018.2 TCG][2018.1
][2017.10][2017.7][2017.4][2017.1][2016.10][2016.7][2016.4][2016.1][2015.10][2015.4][2015.1][2014.10][2014.7][2014.4][2014.2][2013.9][2017.11 TCG][2017.9 TCG][2017.6 TCG][2017.3 TCG][2016.8 TCG][2016.4 TCG][2015.11 TCG][2015.7 TCG][2015.4 TCG][2015.1 TCG][2014.10 TCG][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1]
!
2018
.
4
#forbidden
20663556
0
--イレカエル
44910027
0
--ヴィクトリー・ドラゴン
20366274
0
--エルシャドール・ネフィリム
25862681
0
--エンシェント・フェアリー・ドラゴン
53804307
0
--焔征竜-ブラスター
68819554
0
--
Em
ダメージ・ジャグラー
...
...
@@ -18,12 +17,13 @@
21593977
0
--処刑人-マキュラ
21377582
0
--真竜剣皇マスター
P
16923472
0
--ゼンマイハンター
56570271
0
--
D
-
HERO
ディスクガイ
18326736
0
--星守の騎士 プトレマイオス
54719828
0
--
No
.
16
色の支配者ショック・ルーラー
26400609
0
--瀑征竜-タイダル
78706415
0
--ファイバーポッド
93369354
0
--フィッシュボーグ-ガンナー
23558733
0
--フェニキシアン・クラスター・アマリリス
09929398
0
--
BF
−朧影のゴウフウ
31178212
0
--マジェスペクター・ユニコーン
34206604
0
--魔導サイエンティスト
96782886
0
--メンタルマスター
...
...
@@ -65,13 +65,16 @@
#limit
64034255
1
--
A
·ジェネクス·バードマン
01561110
1
--
ABC
-ドラゴン・バスター
20366274
1
--エルシャドール・ネフィリム
94977269
1
--エルシャドール・ミドラーシュ
50720316
1
--
E
·
HERO
シャドー·ミスト
40318957
1
--
EM
ドクロバット・ジョーカー
65536818
1
--源竜星-ボウテンコウ
49684352
1
--虹彩の魔術師
74586817
1
--
PSY
フレームロード・Ω
78872731
1
--十二獣モルモラット
06602300
1
--重爆撃禽 ボム・フェネクス
86120751
1
--召喚師アレイスタ
ー
75286621
1
--召喚獣メルカバ
ー
78868119
1
--深海のディーヴァ
58984738
1
--真竜拳士ダイナマイト
K
04474060
1
--
SPYRAL
GEAR
−ドローン
...
...
@@ -80,10 +83,13 @@
65192027
1
--ダーク·アームド·ドラゴン
44335251
1
--魂喰いオヴィラプター
15341821
1
--ダンディライオン
56570271
1
--
D
-
HERO
ディスクガイ
90953320
1
--
TG
ハイパー·ライブラリアン
69015963
1
--デビル・フランケン
75732622
1
--トーチ・ゴーレム
16226786
1
--深淵の暗殺者
28297833
1
--ネクロフェイス
69610326
1
--覇王眷竜ダークヴルム
83531441
1
--彼岸の旅人 ダンテ
70583986
1
--氷結界の虎王ドゥローレン
52687916
1
--氷結界の龍 トリシューラ
...
...
@@ -94,9 +100,9 @@
44519536
1
--封印されし者の左足
08124921
1
--封印されし者の右足
55623480
1
--妖精伝姫−シラユキ
09929398
1
--
BF
−朧影のゴウフウ
09047460
1
--
BF
−隠れ蓑のスチーム
26674724
1
--ブリューナクの影霊衣
35272499
1
--捕食植物オフリス・スコーピオ
36042004
1
--ベビケラサウルス
10802915
1
--魔界発現世行きデスガイド
33508719
1
--メタモルポット
...
...
@@ -104,16 +110,15 @@
89463537
1
--ユニコールの影霊衣
92746535
1
--竜剣士ラスター
P
88264978
1
--レッドアイズ·ダークネスメタルドラゴン
48686504
1
--ローンファイア・ブロッサム
33782437
1
--一時休戦
66957584
1
--インフェルニティガン
81439173
1
--おろかな埋葬
23701465
1
--原初の種
99330325
1
--妨げられた壊獣の眠り
67723438
1
--緊急テレポート
89739383
1
--グリモの魔導書
45305419
1
--継承の印
83764718
1
--死者蘇生
49430782
1
--真竜の継承
54631665
1
--
SPYRAL
RESORT
32807846
1
--増援
54447022
1
--ソウル・チャージ
...
...
@@ -128,10 +133,10 @@
58577036
1
--名推理
23171610
1
--リミッター解除
14733538
1
--竜呼相打つ
23314220
1
--ルドラの魔導書
02295440
1
--ワン·フォー·ワン
05851097
1
--虚無空間
61740673
1
--王宮の勅命
41420027
1
--神の宣告
35125879
1
--真竜皇の復活
36468556
1
--停戦協定
21076084
1
--トリックスター・リンカーネイション
...
...
@@ -141,23 +146,19 @@
45222299
2
--イビリチュア·ガストクラーケ
43722862
2
--
WW
-アイス・ベル
40044918
2
--
E
·
HERO
エアーマン
00423585
2
--召喚僧サモンプリースト
33184167
2
--同族感染ウィルス
75732622
2
--トーチ・ゴーレム
86120751
2
--召喚師アレイスター
14558127
2
--灰流うらら
90307777
2
--影霊衣の術士 シュリット
41386308
2
--マスマティシャン
10028593
2
--輪廻天狗
48686504
2
--ローンファイア・ブロッサム
59750328
2
--命削りの宝札
47325505
2
--化石調査
49430782
2
--真竜の継承
73915051
2
--スケープ・ゴート
91623717
2
--連鎖爆撃
67169062
2
--貪欲な壺
22842126
2
--汎神の帝王
73468603
2
--盆回し
43040603
2
--モンスターゲート
66399653
2
--ユニオン格納庫
84749824
2
--神の警告
41420027
2
--神の宣告
40605147
2
--神の通告
!
2018
.
2
TCG
...
...
@@ -336,6 +337,167 @@
48976825
2
--異次元からの埋葬
91623717
2
--連鎖爆撃
!
2018
.
1
#forbidden
20663556
0
--イレカエル
44910027
0
--ヴィクトリー・ドラゴン
20366274
0
--エルシャドール・ネフィリム
25862681
0
--エンシェント・フェアリー・ドラゴン
53804307
0
--焔征竜-ブラスター
68819554
0
--
Em
ダメージ・ジャグラー
07563579
0
--
Em
ヒグルミ
17330916
0
--
EM
モンキーボード
90411554
0
--巌征竜-レドックス
17412721
0
--旧神ノーデン
34124316
0
--サイバーポッド
88071625
0
--
The
tyrant
NEPTUNE
48905153
0
--十二獣ドランシア
85115440
0
--十二獣ブルホーン
21593977
0
--処刑人-マキュラ
21377582
0
--真竜剣皇マスター
P
16923472
0
--ゼンマイハンター
56570271
0
--
D
-
HERO
ディスクガイ
18326736
0
--星守の騎士 プトレマイオス
54719828
0
--
No
.
16
色の支配者ショック・ルーラー
26400609
0
--瀑征竜-タイダル
78706415
0
--ファイバーポッド
93369354
0
--フィッシュボーグ-ガンナー
31178212
0
--マジェスペクター・ユニコーン
34206604
0
--魔導サイエンティスト
96782886
0
--メンタルマスター
03078576
0
--八汰烏
34086406
0
--ラヴァルバル・チェイン
89399912
0
--嵐征竜-テンペスト
57421866
0
--レベル・スティーラー
41482598
0
--悪夢の蜃気楼
44763025
0
--いたずら好きな双子悪魔
19613556
0
--大嵐
17375316
0
--押収
74191942
0
--苦渋の選択
42829885
0
--強引な番兵
45986603
0
--強奪
55144522
0
--強欲な壺
04031928
0
--心変わり
46060017
0
--十二獣の会局
12580477
0
--サンダー·ボルト
23557835
0
--次元融合
57953380
0
--生還の宝札
60682203
0
--大寒波
69243953
0
--蝶の短剣-エルマ
79571449
0
--天使の施し
13035077
0
--ドラゴニック
D
70828912
0
--早すぎた埋葬
42703248
0
--ハリケーン
34906152
0
--マスドライバー
46448938
0
--魔導書の神判
46411259
0
--突然変異
85602018
0
--遺言状
27174286
0
--異次元からの帰還
93016201
0
--王宮の弾圧
03280747
0
--第六感
64697231
0
--ダスト·シュート
80604091
0
--血の代償
35316708
0
--刻の封印
17178486
0
--ライフチェンジャー
28566710
0
--ラストバトル!
#limit
64034255
1
--
A
·ジェネクス·バードマン
01561110
1
--
ABC
-ドラゴン・バスター
50720316
1
--
E
·
HERO
シャドー·ミスト
40318957
1
--
EM
ドクロバット・ジョーカー
65536818
1
--源竜星-ボウテンコウ
74586817
1
--
PSY
フレームロード・Ω
78872731
1
--十二獣モルモラット
06602300
1
--重爆撃禽 ボム・フェネクス
86120751
1
--召喚師アレイスター
78868119
1
--深海のディーヴァ
58984738
1
--真竜拳士ダイナマイト
K
04474060
1
--
SPYRAL
GEAR
−ドローン
78080961
1
--
SPYRAL
−ジーニアス
81275020
1
--
SR
ベイゴマックス
65192027
1
--ダーク·アームド·ドラゴン
44335251
1
--魂喰いオヴィラプター
15341821
1
--ダンディライオン
90953320
1
--
TG
ハイパー·ライブラリアン
69015963
1
--デビル・フランケン
16226786
1
--深淵の暗殺者
28297833
1
--ネクロフェイス
83531441
1
--彼岸の旅人 ダンテ
70583986
1
--氷結界の虎王ドゥローレン
52687916
1
--氷結界の龍 トリシューラ
05043010
1
--ファイアウォール・ドラゴン
33396948
1
--封印されしエクゾディア
07902349
1
--封印されし者の左腕
70903634
1
--封印されし者の右腕
44519536
1
--封印されし者の左足
08124921
1
--封印されし者の右足
55623480
1
--妖精伝姫−シラユキ
09929398
1
--
BF
−朧影のゴウフウ
09047460
1
--
BF
−隠れ蓑のスチーム
26674724
1
--ブリューナクの影霊衣
36042004
1
--ベビケラサウルス
10802915
1
--魔界発現世行きデスガイド
33508719
1
--メタモルポット
90809975
1
--餅カエル
89463537
1
--ユニコールの影霊衣
92746535
1
--竜剣士ラスター
P
88264978
1
--レッドアイズ·ダークネスメタルドラゴン
33782437
1
--一時休戦
66957584
1
--インフェルニティガン
81439173
1
--おろかな埋葬
23701465
1
--原初の種
99330325
1
--妨げられた壊獣の眠り
67723438
1
--緊急テレポート
89739383
1
--グリモの魔導書
45305419
1
--継承の印
83764718
1
--死者蘇生
49430782
1
--真竜の継承
54631665
1
--
SPYRAL
RESORT
32807846
1
--増援
54447022
1
--ソウル・チャージ
48130397
1
--超融合
72892473
1
--手札抹殺
73628505
1
--テラ・フォーミング
97211663
1
--影霊衣の反魂術
18144506
1
--ハーピィの羽根帚
53208660
1
--ペンデュラム・コール
93600443
1
--マスク・チェンジ・セカンド
15854426
1
--霞の谷の神風
58577036
1
--名推理
23171610
1
--リミッター解除
14733538
1
--竜呼相打つ
02295440
1
--ワン·フォー·ワン
05851097
1
--虚無空間
61740673
1
--王宮の勅命
41420027
1
--神の宣告
35125879
1
--真竜皇の復活
36468556
1
--停戦協定
21076084
1
--トリックスター・リンカーネイション
83555666
1
--破壊輪
32723153
1
--マジカル·エクスプロージョン
#semi limit
45222299
2
--イビリチュア·ガストクラーケ
43722862
2
--
WW
-アイス・ベル
40044918
2
--
E
·
HERO
エアーマン
00423585
2
--召喚僧サモンプリースト
33184167
2
--同族感染ウィルス
75732622
2
--トーチ・ゴーレム
90307777
2
--影霊衣の術士 シュリット
41386308
2
--マスマティシャン
10028593
2
--輪廻天狗
48686504
2
--ローンファイア・ブロッサム
59750328
2
--命削りの宝札
47325505
2
--化石調査
73915051
2
--スケープ・ゴート
91623717
2
--連鎖爆撃
67169062
2
--貪欲な壺
22842126
2
--汎神の帝王
73468603
2
--盆回し
43040603
2
--モンスターゲート
66399653
2
--ユニオン格納庫
84749824
2
--神の警告
40605147
2
--神の通告
!
2017
.
10
#forbidden
20663556
0
--イレカエル
...
...
ocgcore
@
35463ba4
Subproject commit
6a95742d22d570d40db3a2d2e8bcea44baede328
Subproject commit
35463ba465a0926f22f13340bb9d0fd5e5443e85
script
@
47a1517a
Subproject commit
95f03c0bb5ce45fee32ca157dd63d4f6c22e0e9c
Subproject commit
47a1517ad08adc9ef37933cc2388b57d38ab277f
strings.conf
View file @
5c106955
...
...
@@ -49,6 +49,7 @@
!
system
95
是否使用[%
ls
]的效果?
!
system
96
是否使用[%
ls
]的效果代替破坏?
!
system
97
是否把[%
ls
]在魔法与陷阱区域放置?
!
system
98
是否要解放对方怪兽?
!
system
100
先攻
!
system
101
后攻
!
system
200
是否在[%
ls
]发动[%
ls
]的效果?
...
...
@@ -368,6 +369,11 @@
!
system
1357
不提示保留对卡组的修改
!
system
1358
键入关键字后自动进行搜索
!
system
1360
上一步
!
system
1361
删除录像
!
system
1362
重命名
!
system
1363
是否删除这个录像?
!
system
1364
重命名录像
!
system
1365
重命名失败,可能存在同名文件
!
system
1370
星数↑
!
system
1371
攻击↑
!
system
1372
守备↑
...
...
@@ -879,3 +885,6 @@
!
setname
0
x111
武装龙 アームド・ドラゴン
!
setname
0
x112
幻崩 トロイメア
!
setname
0
x113
灵神 霊神
!
setname
0
x114
空牙团 空牙団
!
setname
0
x115
闪刀 閃刀
!
setname
0
x1115
闪刀姬 閃刀姫
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