Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wind2009
ygopro
Commits
beaf490e
Commit
beaf490e
authored
May 30, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/Fluorohydride/ygopro
parents
ac042685
c1ac0d7f
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
516 additions
and
283 deletions
+516
-283
gframe/client_field.cpp
gframe/client_field.cpp
+7
-7
gframe/client_field.h
gframe/client_field.h
+3
-3
gframe/deck_con.cpp
gframe/deck_con.cpp
+2
-0
gframe/duelclient.cpp
gframe/duelclient.cpp
+23
-34
gframe/event_handler.cpp
gframe/event_handler.cpp
+18
-3
gframe/game.cpp
gframe/game.cpp
+25
-1
gframe/game.h
gframe/game.h
+34
-26
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+1
-1
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+1
-1
gframe/single_duel.cpp
gframe/single_duel.cpp
+1
-1
gframe/single_mode.cpp
gframe/single_mode.cpp
+1
-1
gframe/sound_manager.cpp
gframe/sound_manager.cpp
+4
-0
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-1
lflist.conf
lflist.conf
+373
-186
ocgcore
ocgcore
+1
-1
script
script
+1
-1
strings.conf
strings.conf
+20
-16
No files found.
gframe/client_field.cpp
View file @
beaf490e
...
@@ -1418,7 +1418,7 @@ static bool is_declarable(T const& cd, const std::vector<int>& opcode) {
...
@@ -1418,7 +1418,7 @@ static bool is_declarable(T const& cd, const std::vector<int>& opcode) {
return
cd
.
code
==
CARD_MARINE_DOLPHIN
||
cd
.
code
==
CARD_TWINKLE_MOSS
return
cd
.
code
==
CARD_MARINE_DOLPHIN
||
cd
.
code
==
CARD_TWINKLE_MOSS
||
(
!
cd
.
alias
&&
(
cd
.
type
&
(
TYPE_MONSTER
+
TYPE_TOKEN
))
!=
(
TYPE_MONSTER
+
TYPE_TOKEN
));
||
(
!
cd
.
alias
&&
(
cd
.
type
&
(
TYPE_MONSTER
+
TYPE_TOKEN
))
!=
(
TYPE_MONSTER
+
TYPE_TOKEN
));
}
}
void
ClientField
::
UpdateDeclarableCodeType
(
bool
enter
)
{
void
ClientField
::
UpdateDeclarableCodeType
()
{
const
wchar_t
*
pname
=
mainGame
->
ebANCard
->
getText
();
const
wchar_t
*
pname
=
mainGame
->
ebANCard
->
getText
();
int
trycode
=
BufferIO
::
GetVal
(
pname
);
int
trycode
=
BufferIO
::
GetVal
(
pname
);
CardString
cstr
;
CardString
cstr
;
...
@@ -1430,7 +1430,7 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
...
@@ -1430,7 +1430,7 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
ancard
.
push_back
(
trycode
);
ancard
.
push_back
(
trycode
);
return
;
return
;
}
}
if
(
(
pname
[
0
]
==
0
||
pname
[
1
]
==
0
)
&&
!
enter
)
{
if
(
pname
[
0
]
==
0
)
{
std
::
vector
<
int
>
cache
;
std
::
vector
<
int
>
cache
;
cache
.
swap
(
ancard
);
cache
.
swap
(
ancard
);
int
sel
=
mainGame
->
lstANCard
->
getSelected
();
int
sel
=
mainGame
->
lstANCard
->
getSelected
();
...
@@ -1465,7 +1465,7 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
...
@@ -1465,7 +1465,7 @@ void ClientField::UpdateDeclarableCodeType(bool enter) {
}
}
}
}
}
}
void
ClientField
::
UpdateDeclarableCodeOpcode
(
bool
enter
)
{
void
ClientField
::
UpdateDeclarableCodeOpcode
()
{
const
wchar_t
*
pname
=
mainGame
->
ebANCard
->
getText
();
const
wchar_t
*
pname
=
mainGame
->
ebANCard
->
getText
();
int
trycode
=
BufferIO
::
GetVal
(
pname
);
int
trycode
=
BufferIO
::
GetVal
(
pname
);
CardString
cstr
;
CardString
cstr
;
...
@@ -1477,7 +1477,7 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
...
@@ -1477,7 +1477,7 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
ancard
.
push_back
(
trycode
);
ancard
.
push_back
(
trycode
);
return
;
return
;
}
}
if
(
(
pname
[
0
]
==
0
||
pname
[
1
]
==
0
)
&&
!
enter
)
{
if
(
pname
[
0
]
==
0
)
{
std
::
vector
<
int
>
cache
;
std
::
vector
<
int
>
cache
;
cache
.
swap
(
ancard
);
cache
.
swap
(
ancard
);
int
sel
=
mainGame
->
lstANCard
->
getSelected
();
int
sel
=
mainGame
->
lstANCard
->
getSelected
();
...
@@ -1512,10 +1512,10 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
...
@@ -1512,10 +1512,10 @@ void ClientField::UpdateDeclarableCodeOpcode(bool enter) {
}
}
}
}
}
}
void
ClientField
::
UpdateDeclarableCode
(
bool
enter
)
{
void
ClientField
::
UpdateDeclarableCode
()
{
if
(
opcode
.
size
()
==
0
)
if
(
opcode
.
size
()
==
0
)
UpdateDeclarableCodeType
(
enter
);
UpdateDeclarableCodeType
();
else
else
UpdateDeclarableCodeOpcode
(
enter
);
UpdateDeclarableCodeOpcode
();
}
}
}
}
gframe/client_field.h
View file @
beaf490e
...
@@ -112,9 +112,9 @@ public:
...
@@ -112,9 +112,9 @@ public:
void
check_sel_sum_t
(
const
std
::
set
<
ClientCard
*>&
left
,
int
acc
);
void
check_sel_sum_t
(
const
std
::
set
<
ClientCard
*>&
left
,
int
acc
);
bool
check_sum
(
std
::
set
<
ClientCard
*>::
const_iterator
index
,
std
::
set
<
ClientCard
*>::
const_iterator
end
,
int
acc
,
int
count
);
bool
check_sum
(
std
::
set
<
ClientCard
*>::
const_iterator
index
,
std
::
set
<
ClientCard
*>::
const_iterator
end
,
int
acc
,
int
count
);
void
UpdateDeclarableCodeType
(
bool
enter
);
void
UpdateDeclarableCodeType
();
void
UpdateDeclarableCodeOpcode
(
bool
enter
);
void
UpdateDeclarableCodeOpcode
();
void
UpdateDeclarableCode
(
bool
enter
);
void
UpdateDeclarableCode
();
irr
::
gui
::
IGUIElement
*
panel
;
irr
::
gui
::
IGUIElement
*
panel
;
std
::
vector
<
int
>
ancard
;
std
::
vector
<
int
>
ancard
;
...
...
gframe/deck_con.cpp
View file @
beaf490e
...
@@ -984,6 +984,8 @@ void DeckBuilder::ClearSearch() {
...
@@ -984,6 +984,8 @@ void DeckBuilder::ClearSearch() {
mainGame
->
ebStar
->
setEnabled
(
false
);
mainGame
->
ebStar
->
setEnabled
(
false
);
mainGame
->
ebScale
->
setEnabled
(
false
);
mainGame
->
ebScale
->
setEnabled
(
false
);
mainGame
->
ebCardName
->
setText
(
L""
);
mainGame
->
ebCardName
->
setText
(
L""
);
mainGame
->
scrFilter
->
setVisible
(
false
);
mainGame
->
scrFilter
->
setPos
(
0
);
ClearFilter
();
ClearFilter
();
results
.
clear
();
results
.
clear
();
myswprintf
(
result_string
,
L"%d"
,
0
);
myswprintf
(
result_string
,
L"%d"
,
0
);
...
...
gframe/duelclient.cpp
View file @
beaf490e
...
@@ -343,7 +343,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -343,7 +343,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
}
}
case
STOC_SELECT_TP
:
{
case
STOC_SELECT_TP
:
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
Show
Element
(
mainGame
->
wFTSelect
);
mainGame
->
Popup
Element
(
mainGame
->
wFTSelect
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
break
;
break
;
}
}
...
@@ -641,6 +641,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -641,6 +641,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
btnChainAlways
->
setVisible
(
false
);
mainGame
->
btnChainAlways
->
setVisible
(
false
);
mainGame
->
btnChainWhenAvail
->
setVisible
(
false
);
mainGame
->
btnChainWhenAvail
->
setVisible
(
false
);
mainGame
->
btnCancelOrFinish
->
setVisible
(
false
);
mainGame
->
btnCancelOrFinish
->
setVisible
(
false
);
mainGame
->
wSurrender
->
setVisible
(
false
);
mainGame
->
stMessage
->
setText
(
dataManager
.
GetSysString
(
1500
));
mainGame
->
stMessage
->
setText
(
dataManager
.
GetSysString
(
1500
));
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
...
@@ -674,6 +675,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -674,6 +675,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
case
STOC_REPLAY
:
{
case
STOC_REPLAY
:
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
wPhase
->
setVisible
(
false
);
mainGame
->
wPhase
->
setVisible
(
false
);
mainGame
->
wSurrender
->
setVisible
(
false
);
if
(
mainGame
->
dInfo
.
player_type
<
7
)
if
(
mainGame
->
dInfo
.
player_type
<
7
)
mainGame
->
btnLeaveGame
->
setVisible
(
false
);
mainGame
->
btnLeaveGame
->
setVisible
(
false
);
mainGame
->
btnChainIgnore
->
setVisible
(
false
);
mainGame
->
btnChainIgnore
->
setVisible
(
false
);
...
@@ -937,8 +939,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -937,8 +939,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
}
case
HINT_OPSELECTED
:
{
case
HINT_OPSELECTED
:
{
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1510
),
dataManager
.
GetDesc
(
data
));
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1510
),
dataManager
.
GetDesc
(
data
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
...
@@ -955,8 +956,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -955,8 +956,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
}
case
HINT_RACE
:
{
case
HINT_RACE
:
{
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
FormatRace
(
data
));
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
FormatRace
(
data
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
...
@@ -966,8 +966,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -966,8 +966,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
}
case
HINT_ATTRIB
:
{
case
HINT_ATTRIB
:
{
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
FormatAttribute
(
data
));
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
FormatAttribute
(
data
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
...
@@ -977,8 +976,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -977,8 +976,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
}
case
HINT_CODE
:
{
case
HINT_CODE
:
{
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
GetName
(
data
));
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
GetName
(
data
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
AddLog
(
textBuffer
,
data
);
mainGame
->
logParam
.
push_back
(
data
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
...
@@ -988,8 +986,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -988,8 +986,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
}
case
HINT_NUMBER
:
{
case
HINT_NUMBER
:
{
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1512
),
data
);
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1512
),
data
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
guiFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
...
@@ -1869,14 +1866,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1869,14 +1866,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return
true
;
return
true
;
soundManager
.
PlaySoundEffect
(
SOUND_REVEAL
);
soundManager
.
PlaySoundEffect
(
SOUND_REVEAL
);
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
207
),
count
);
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
207
),
count
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
pcard
=
*
(
mainGame
->
dField
.
deck
[
player
].
rbegin
()
+
i
);
pcard
=
*
(
mainGame
->
dField
.
deck
[
player
].
rbegin
()
+
i
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
myswprintf
(
textBuffer
,
L"*[%ls]"
,
dataManager
.
GetName
(
pcard
->
code
));
myswprintf
(
textBuffer
,
L"*[%ls]"
,
dataManager
.
GetName
(
pcard
->
code
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
AddLog
(
textBuffer
,
pcard
->
code
);
mainGame
->
logParam
.
push_back
(
pcard
->
code
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
float
shift
=
-
0.15
f
;
float
shift
=
-
0.15
f
;
if
(
player
==
1
)
shift
=
0.15
f
;
if
(
player
==
1
)
shift
=
0.15
f
;
...
@@ -1909,14 +1904,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1909,14 +1904,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return
true
;
return
true
;
soundManager
.
PlaySoundEffect
(
SOUND_REVEAL
);
soundManager
.
PlaySoundEffect
(
SOUND_REVEAL
);
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
207
),
count
);
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
207
),
count
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
pcard
=
*
(
mainGame
->
dField
.
extra
[
player
].
rbegin
()
+
i
+
mainGame
->
dField
.
extra_p_count
[
player
]);
pcard
=
*
(
mainGame
->
dField
.
extra
[
player
].
rbegin
()
+
i
+
mainGame
->
dField
.
extra_p_count
[
player
]);
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
myswprintf
(
textBuffer
,
L"*[%ls]"
,
dataManager
.
GetName
(
pcard
->
code
));
myswprintf
(
textBuffer
,
L"*[%ls]"
,
dataManager
.
GetName
(
pcard
->
code
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
AddLog
(
textBuffer
,
pcard
->
code
);
mainGame
->
logParam
.
push_back
(
pcard
->
code
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
if
(
player
==
0
)
if
(
player
==
0
)
pcard
->
dPos
=
irr
::
core
::
vector3df
(
0
,
-
0.20
f
,
0
);
pcard
->
dPos
=
irr
::
core
::
vector3df
(
0
,
-
0.20
f
,
0
);
...
@@ -1944,8 +1937,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1944,8 +1937,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
}
soundManager
.
PlaySoundEffect
(
SOUND_REVEAL
);
soundManager
.
PlaySoundEffect
(
SOUND_REVEAL
);
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
208
),
count
);
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
208
),
count
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
code
=
BufferIO
::
ReadInt32
(
pbuf
);
code
=
BufferIO
::
ReadInt32
(
pbuf
);
c
=
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
c
=
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
...
@@ -1956,8 +1948,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -1956,8 +1948,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard
->
SetCode
(
code
);
pcard
->
SetCode
(
code
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
myswprintf
(
textBuffer
,
L"*[%ls]"
,
dataManager
.
GetName
(
code
));
myswprintf
(
textBuffer
,
L"*[%ls]"
,
dataManager
.
GetName
(
code
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
AddLog
(
textBuffer
,
code
);
mainGame
->
logParam
.
push_back
(
code
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
if
(
l
&
0x41
)
{
if
(
l
&
0x41
)
{
if
(
count
==
1
)
{
if
(
count
==
1
)
{
...
@@ -2272,6 +2263,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2272,6 +2263,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
btnLeaveGame
->
setText
(
dataManager
.
GetSysString
(
1351
));
mainGame
->
btnLeaveGame
->
setText
(
dataManager
.
GetSysString
(
1351
));
mainGame
->
btnLeaveGame
->
setVisible
(
true
);
mainGame
->
btnLeaveGame
->
setVisible
(
true
);
}
}
if
(
mainGame
->
wSurrender
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wSurrender
);
if
(
!
mainGame
->
dInfo
.
isReplay
&&
mainGame
->
dInfo
.
player_type
<
7
)
{
if
(
!
mainGame
->
dInfo
.
isReplay
&&
mainGame
->
dInfo
.
player_type
<
7
)
{
if
(
mainGame
->
gameConf
.
control_mode
==
0
)
{
if
(
mainGame
->
gameConf
.
control_mode
==
0
)
{
mainGame
->
btnChainIgnore
->
setVisible
(
true
);
mainGame
->
btnChainIgnore
->
setVisible
(
true
);
...
@@ -2886,8 +2879,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -2886,8 +2879,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
else
}
else
mainGame
->
WaitFrameSignal
(
30
);
mainGame
->
WaitFrameSignal
(
30
);
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1610
),
dataManager
.
GetName
(
pcard
->
code
),
dataManager
.
FormatLocation
(
l
,
s
),
s
+
1
);
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1610
),
dataManager
.
GetName
(
pcard
->
code
),
dataManager
.
FormatLocation
(
l
,
s
),
s
+
1
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
AddLog
(
textBuffer
,
pcard
->
code
);
mainGame
->
logParam
.
push_back
(
pcard
->
code
);
pcard
->
is_highlighting
=
false
;
pcard
->
is_highlighting
=
false
;
}
}
return
true
;
return
true
;
...
@@ -3290,8 +3282,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3290,8 +3282,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
BufferIO
::
ReadInt32
(
pbuf
);
BufferIO
::
ReadInt32
(
pbuf
);
unsigned
int
code
=
(
unsigned
int
)
BufferIO
::
ReadInt32
(
pbuf
);
unsigned
int
code
=
(
unsigned
int
)
BufferIO
::
ReadInt32
(
pbuf
);
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1622
),
dataManager
.
GetName
(
code
));
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1622
),
dataManager
.
GetName
(
code
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
AddLog
(
textBuffer
,
code
);
mainGame
->
logParam
.
push_back
(
code
);
return
true
;
return
true
;
}
}
case
MSG_TOSS_COIN
:
{
case
MSG_TOSS_COIN
:
{
...
@@ -3310,8 +3301,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3310,8 +3301,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return
true
;
return
true
;
soundManager
.
PlaySoundEffect
(
SOUND_COIN
);
soundManager
.
PlaySoundEffect
(
SOUND_COIN
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
stACMessage
->
setText
(
textBuffer
);
mainGame
->
stACMessage
->
setText
(
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
...
@@ -3334,8 +3324,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3334,8 +3324,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
return
true
;
return
true
;
soundManager
.
PlaySoundEffect
(
SOUND_DICE
);
soundManager
.
PlaySoundEffect
(
SOUND_DICE
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
AddLog
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
stACMessage
->
setText
(
textBuffer
);
mainGame
->
stACMessage
->
setText
(
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
...
@@ -3419,7 +3408,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3419,7 +3408,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
ebANCard
->
setText
(
L""
);
mainGame
->
ebANCard
->
setText
(
L""
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
dField
.
UpdateDeclarableCode
(
false
);
mainGame
->
dField
.
UpdateDeclarableCode
();
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
return
false
;
return
false
;
...
@@ -3446,7 +3435,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3446,7 +3435,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
}
case
MSG_ANNOUNCE_CARD_FILTER
:
{
case
MSG_ANNOUNCE_CARD_FILTER
:
{
/*int player = */
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
/*int player = */
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
mainGame
->
dField
.
declarable_type
=
0
;
mainGame
->
dField
.
declarable_type
=
0
;
mainGame
->
dField
.
opcode
.
clear
();
mainGame
->
dField
.
opcode
.
clear
();
for
(
int
i
=
0
;
i
<
count
;
++
i
)
for
(
int
i
=
0
;
i
<
count
;
++
i
)
...
@@ -3458,7 +3447,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
...
@@ -3458,7 +3447,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
ebANCard
->
setText
(
L""
);
mainGame
->
ebANCard
->
setText
(
L""
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
dField
.
UpdateDeclarableCode
(
false
);
mainGame
->
dField
.
UpdateDeclarableCode
();
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
return
false
;
return
false
;
...
...
gframe/event_handler.cpp
View file @
beaf490e
...
@@ -20,6 +20,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -20,6 +20,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
return
false
;
return
false
;
switch
(
event
.
EventType
)
{
switch
(
event
.
EventType
)
{
case
irr
:
:
EET_GUI_EVENT
:
{
case
irr
:
:
EET_GUI_EVENT
:
{
if
(
mainGame
->
fadingList
.
size
())
break
;
s32
id
=
event
.
GUIEvent
.
Caller
->
getID
();
s32
id
=
event
.
GUIEvent
.
Caller
->
getID
();
switch
(
event
.
GUIEvent
.
EventType
)
{
switch
(
event
.
GUIEvent
.
EventType
)
{
case
irr
:
:
gui
::
EGET_BUTTON_CLICKED
:
{
case
irr
:
:
gui
::
EGET_BUTTON_CLICKED
:
{
...
@@ -147,10 +149,21 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -147,10 +149,21 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if
(
exit_on_return
)
if
(
exit_on_return
)
mainGame
->
device
->
closeDevice
();
mainGame
->
device
->
closeDevice
();
}
else
{
}
else
{
DuelClient
::
SendPacketToServer
(
CTOS_SURRENDER
);
mainGame
->
PopupElement
(
mainGame
->
wSurrender
);
}
}
break
;
break
;
}
}
case
BUTTON_SURRENDER_YES
:
{
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
DuelClient
::
SendPacketToServer
(
CTOS_SURRENDER
);
mainGame
->
HideElement
(
mainGame
->
wSurrender
);
break
;
}
case
BUTTON_SURRENDER_NO
:
{
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
mainGame
->
HideElement
(
mainGame
->
wSurrender
);
break
;
}
case
BUTTON_CHAIN_IGNORE
:
{
case
BUTTON_CHAIN_IGNORE
:
{
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
mainGame
->
ignore_chain
=
mainGame
->
btnChainIgnore
->
isPressed
();
mainGame
->
ignore_chain
=
mainGame
->
btnChainIgnore
->
isPressed
();
...
@@ -948,7 +961,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -948,7 +961,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
irr
:
:
gui
::
EGET_EDITBOX_CHANGED
:
{
case
irr
:
:
gui
::
EGET_EDITBOX_CHANGED
:
{
switch
(
id
)
{
switch
(
id
)
{
case
EDITBOX_ANCARD
:
{
case
EDITBOX_ANCARD
:
{
UpdateDeclarableCode
(
false
);
UpdateDeclarableCode
();
break
;
break
;
}
}
}
}
...
@@ -957,7 +970,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -957,7 +970,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case
irr
:
:
gui
::
EGET_EDITBOX_ENTER
:
{
case
irr
:
:
gui
::
EGET_EDITBOX_ENTER
:
{
switch
(
id
)
{
switch
(
id
)
{
case
EDITBOX_ANCARD
:
{
case
EDITBOX_ANCARD
:
{
UpdateDeclarableCode
(
true
);
UpdateDeclarableCode
();
break
;
break
;
}
}
}
}
...
@@ -1422,6 +1435,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1422,6 +1435,8 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame
->
chain_when_avail
=
false
;
mainGame
->
chain_when_avail
=
false
;
UpdateChainButtons
();
UpdateChainButtons
();
}
}
if
(
mainGame
->
wSurrender
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wSurrender
);
mainGame
->
wCmdMenu
->
setVisible
(
false
);
mainGame
->
wCmdMenu
->
setVisible
(
false
);
if
(
mainGame
->
fadingList
.
size
())
if
(
mainGame
->
fadingList
.
size
())
break
;
break
;
...
...
gframe/game.cpp
View file @
beaf490e
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#include "netserver.h"
#include "netserver.h"
#include "single_mode.h"
#include "single_mode.h"
const
unsigned
short
PRO_VERSION
=
0x134
9
;
const
unsigned
short
PRO_VERSION
=
0x134
A
;
namespace
ygo
{
namespace
ygo
{
...
@@ -385,6 +385,14 @@ bool Game::Initialize() {
...
@@ -385,6 +385,14 @@ bool Game::Initialize() {
stQMessage
->
setTextAlignment
(
irr
::
gui
::
EGUIA_UPPERLEFT
,
irr
::
gui
::
EGUIA_CENTER
);
stQMessage
->
setTextAlignment
(
irr
::
gui
::
EGUIA_UPPERLEFT
,
irr
::
gui
::
EGUIA_CENTER
);
btnYes
=
env
->
addButton
(
rect
<
s32
>
(
100
,
105
,
150
,
130
),
wQuery
,
BUTTON_YES
,
dataManager
.
GetSysString
(
1213
));
btnYes
=
env
->
addButton
(
rect
<
s32
>
(
100
,
105
,
150
,
130
),
wQuery
,
BUTTON_YES
,
dataManager
.
GetSysString
(
1213
));
btnNo
=
env
->
addButton
(
rect
<
s32
>
(
200
,
105
,
250
,
130
),
wQuery
,
BUTTON_NO
,
dataManager
.
GetSysString
(
1214
));
btnNo
=
env
->
addButton
(
rect
<
s32
>
(
200
,
105
,
250
,
130
),
wQuery
,
BUTTON_NO
,
dataManager
.
GetSysString
(
1214
));
//surrender yes/no (310)
wSurrender
=
env
->
addWindow
(
rect
<
s32
>
(
490
,
200
,
840
,
340
),
false
,
dataManager
.
GetSysString
(
560
));
wSurrender
->
getCloseButton
()
->
setVisible
(
false
);
wSurrender
->
setVisible
(
false
);
stSurrenderMessage
=
env
->
addStaticText
(
dataManager
.
GetSysString
(
1359
),
rect
<
s32
>
(
20
,
20
,
350
,
100
),
false
,
true
,
wSurrender
,
-
1
,
false
);
stSurrenderMessage
->
setTextAlignment
(
irr
::
gui
::
EGUIA_UPPERLEFT
,
irr
::
gui
::
EGUIA_CENTER
);
btnSurrenderYes
=
env
->
addButton
(
rect
<
s32
>
(
100
,
105
,
150
,
130
),
wSurrender
,
BUTTON_SURRENDER_YES
,
dataManager
.
GetSysString
(
1213
));
btnSurrenderNo
=
env
->
addButton
(
rect
<
s32
>
(
200
,
105
,
250
,
130
),
wSurrender
,
BUTTON_SURRENDER_NO
,
dataManager
.
GetSysString
(
1214
));
//options (310)
//options (310)
wOptions
=
env
->
addWindow
(
rect
<
s32
>
(
490
,
200
,
840
,
340
),
false
,
L""
);
wOptions
=
env
->
addWindow
(
rect
<
s32
>
(
490
,
200
,
840
,
340
),
false
,
L""
);
wOptions
->
getCloseButton
()
->
setVisible
(
false
);
wOptions
->
getCloseButton
()
->
setVisible
(
false
);
...
@@ -744,6 +752,13 @@ bool Game::Initialize() {
...
@@ -744,6 +752,13 @@ bool Game::Initialize() {
col
.
setAlpha
(
224
);
col
.
setAlpha
(
224
);
env
->
getSkin
()
->
setColor
((
EGUI_DEFAULT_COLOR
)
i
,
col
);
env
->
getSkin
()
->
setColor
((
EGUI_DEFAULT_COLOR
)
i
,
col
);
}
}
dimension2du
size
=
driver
->
getScreenSize
();
if
(
window_size
!=
size
)
{
window_size
=
size
;
xScale
=
window_size
.
Width
/
1024.0
;
yScale
=
window_size
.
Height
/
640.0
;
OnResize
();
}
hideChat
=
false
;
hideChat
=
false
;
hideChatTimer
=
0
;
hideChatTimer
=
0
;
return
true
;
return
true
;
...
@@ -1349,6 +1364,13 @@ void Game::ClearCardInfo(int player) {
...
@@ -1349,6 +1364,13 @@ void Game::ClearCardInfo(int player) {
stText
->
setText
(
L""
);
stText
->
setText
(
L""
);
scrCardText
->
setVisible
(
false
);
scrCardText
->
setVisible
(
false
);
}
}
void
Game
::
AddLog
(
const
wchar_t
*
msg
,
int
param
)
{
logParam
.
push_back
(
param
);
lstLog
->
addItem
(
msg
);
if
(
!
env
->
hasFocus
(
lstLog
))
{
lstLog
->
setSelected
(
-
1
);
}
}
void
Game
::
AddChatMsg
(
const
wchar_t
*
msg
,
int
player
)
{
void
Game
::
AddChatMsg
(
const
wchar_t
*
msg
,
int
player
)
{
for
(
int
i
=
7
;
i
>
0
;
--
i
)
{
for
(
int
i
=
7
;
i
>
0
;
--
i
)
{
chatMsg
[
i
]
=
chatMsg
[
i
-
1
];
chatMsg
[
i
]
=
chatMsg
[
i
-
1
];
...
@@ -1458,6 +1480,7 @@ void Game::CloseDuelWindow() {
...
@@ -1458,6 +1480,7 @@ void Game::CloseDuelWindow() {
wPhase
->
setVisible
(
false
);
wPhase
->
setVisible
(
false
);
wPosSelect
->
setVisible
(
false
);
wPosSelect
->
setVisible
(
false
);
wQuery
->
setVisible
(
false
);
wQuery
->
setVisible
(
false
);
wSurrender
->
setVisible
(
false
);
wReplayControl
->
setVisible
(
false
);
wReplayControl
->
setVisible
(
false
);
wReplaySave
->
setVisible
(
false
);
wReplaySave
->
setVisible
(
false
);
stHintMsg
->
setVisible
(
false
);
stHintMsg
->
setVisible
(
false
);
...
@@ -1581,6 +1604,7 @@ void Game::OnResize() {
...
@@ -1581,6 +1604,7 @@ void Game::OnResize() {
wMessage
->
setRelativePosition
(
ResizeWin
(
490
,
200
,
840
,
340
));
wMessage
->
setRelativePosition
(
ResizeWin
(
490
,
200
,
840
,
340
));
wACMessage
->
setRelativePosition
(
ResizeWin
(
490
,
240
,
840
,
300
));
wACMessage
->
setRelativePosition
(
ResizeWin
(
490
,
240
,
840
,
300
));
wQuery
->
setRelativePosition
(
ResizeWin
(
490
,
200
,
840
,
340
));
wQuery
->
setRelativePosition
(
ResizeWin
(
490
,
200
,
840
,
340
));
wSurrender
->
setRelativePosition
(
ResizeWin
(
490
,
200
,
840
,
340
));
wOptions
->
setRelativePosition
(
ResizeWin
(
490
,
200
,
840
,
340
));
wOptions
->
setRelativePosition
(
ResizeWin
(
490
,
200
,
840
,
340
));
wPosSelect
->
setRelativePosition
(
ResizeWin
(
340
,
200
,
935
,
410
));
wPosSelect
->
setRelativePosition
(
ResizeWin
(
340
,
200
,
935
,
410
));
wCardSelect
->
setRelativePosition
(
ResizeWin
(
320
,
100
,
1000
,
400
));
wCardSelect
->
setRelativePosition
(
ResizeWin
(
320
,
100
,
1000
,
400
));
...
...
gframe/game.h
View file @
beaf490e
...
@@ -140,6 +140,7 @@ public:
...
@@ -140,6 +140,7 @@ public:
void
SaveConfig
();
void
SaveConfig
();
void
ShowCardInfo
(
int
code
,
bool
resize
=
false
);
void
ShowCardInfo
(
int
code
,
bool
resize
=
false
);
void
ClearCardInfo
(
int
player
=
0
);
void
ClearCardInfo
(
int
player
=
0
);
void
AddLog
(
const
wchar_t
*
msg
,
int
param
=
0
);
void
AddChatMsg
(
const
wchar_t
*
msg
,
int
player
);
void
AddChatMsg
(
const
wchar_t
*
msg
,
int
player
);
void
ClearChatMsg
();
void
ClearChatMsg
();
void
AddDebugMsg
(
const
char
*
msgbuf
);
void
AddDebugMsg
(
const
char
*
msgbuf
);
...
@@ -381,6 +382,11 @@ public:
...
@@ -381,6 +382,11 @@ public:
irr
::
gui
::
IGUIStaticText
*
stQMessage
;
irr
::
gui
::
IGUIStaticText
*
stQMessage
;
irr
::
gui
::
IGUIButton
*
btnYes
;
irr
::
gui
::
IGUIButton
*
btnYes
;
irr
::
gui
::
IGUIButton
*
btnNo
;
irr
::
gui
::
IGUIButton
*
btnNo
;
//surrender yes/no
irr
::
gui
::
IGUIWindow
*
wSurrender
;
irr
::
gui
::
IGUIStaticText
*
stSurrenderMessage
;
irr
::
gui
::
IGUIButton
*
btnSurrenderYes
;
irr
::
gui
::
IGUIButton
*
btnSurrenderNo
;
//options
//options
irr
::
gui
::
IGUIWindow
*
wOptions
;
irr
::
gui
::
IGUIWindow
*
wOptions
;
irr
::
gui
::
IGUIStaticText
*
stOptions
;
irr
::
gui
::
IGUIStaticText
*
stOptions
;
...
@@ -575,7 +581,22 @@ extern Game* mainGame;
...
@@ -575,7 +581,22 @@ extern Game* mainGame;
#define BUTTON_CANCEL_REPLAY 132
#define BUTTON_CANCEL_REPLAY 132
#define BUTTON_DELETE_REPLAY 133
#define BUTTON_DELETE_REPLAY 133
#define BUTTON_RENAME_REPLAY 134
#define BUTTON_RENAME_REPLAY 134
#define EDITBOX_CHAT 140
#define BUTTON_REPLAY_START 140
#define BUTTON_REPLAY_PAUSE 141
#define BUTTON_REPLAY_STEP 142
#define BUTTON_REPLAY_UNDO 143
#define BUTTON_REPLAY_EXIT 144
#define BUTTON_REPLAY_SWAP 145
#define BUTTON_REPLAY_SAVE 146
#define BUTTON_REPLAY_CANCEL 147
#define LISTBOX_SINGLEPLAY_LIST 150
#define BUTTON_LOAD_SINGLEPLAY 151
#define BUTTON_CANCEL_SINGLEPLAY 152
#define LISTBOX_BOT_LIST 153
#define BUTTON_BOT_START 154
#define CHECKBOX_BOT_OLD_RULE 155
#define EDITBOX_CHAT 199
#define BUTTON_MSG_OK 200
#define BUTTON_MSG_OK 200
#define BUTTON_YES 201
#define BUTTON_YES 201
#define BUTTON_NO 202
#define BUTTON_NO 202
...
@@ -640,7 +661,9 @@ extern Game* mainGame;
...
@@ -640,7 +661,9 @@ extern Game* mainGame;
#define BUTTON_DISPLAY_4 294
#define BUTTON_DISPLAY_4 294
#define SCROLL_CARD_DISPLAY 295
#define SCROLL_CARD_DISPLAY 295
#define BUTTON_CARD_DISP_OK 296
#define BUTTON_CARD_DISP_OK 296
#define BUTTON_CATEGORY_OK 300
#define BUTTON_SURRENDER_YES 297
#define BUTTON_SURRENDER_NO 298
#define COMBOBOX_DBLFLIST 301
#define COMBOBOX_DBLFLIST 301
#define COMBOBOX_DBDECKS 302
#define COMBOBOX_DBDECKS 302
#define BUTTON_CLEAR_DECK 303
#define BUTTON_CLEAR_DECK 303
...
@@ -660,25 +683,12 @@ extern Game* mainGame;
...
@@ -660,25 +683,12 @@ extern Game* mainGame;
#define BUTTON_CLEAR_FILTER 317
#define BUTTON_CLEAR_FILTER 317
#define COMBOBOX_ATTRIBUTE 318
#define COMBOBOX_ATTRIBUTE 318
#define COMBOBOX_RACE 319
#define COMBOBOX_RACE 319
#define BUTTON_REPLAY_START 320
#define COMBOBOX_LIMIT 320
#define BUTTON_REPLAY_PAUSE 321
#define BUTTON_CATEGORY_OK 321
#define BUTTON_REPLAY_STEP 322
#define BUTTON_MARKS_FILTER 322
#define BUTTON_REPLAY_UNDO 323
#define BUTTON_MARKERS_OK 323
#define BUTTON_REPLAY_EXIT 324
#define COMBOBOX_SORTTYPE 324
#define BUTTON_REPLAY_SWAP 325
#define BUTTON_REPLAY_SAVE 330
#define BUTTON_REPLAY_CANCEL 331
#define BUTTON_BOT_START 340
#define LISTBOX_BOT_LIST 341
#define CHECKBOX_BOT_OLD_RULE 342
#define LISTBOX_SINGLEPLAY_LIST 343
#define BUTTON_LOAD_SINGLEPLAY 344
#define BUTTON_CANCEL_SINGLEPLAY 345
#define SCROLL_TAB_HELPER 350
#define SCROLL_TAB_SYSTEM 351
#define CHECKBOX_AUTO_SEARCH 360
#define CHECKBOX_AUTO_SEARCH 360
#define CHECKBOX_MULTI_KEYWORDS 372
#define CHECKBOX_PREFER_EXPANSION 373
#define CHECKBOX_ENABLE_SOUND 361
#define CHECKBOX_ENABLE_SOUND 361
#define CHECKBOX_ENABLE_MUSIC 362
#define CHECKBOX_ENABLE_MUSIC 362
#define SCROLL_VOLUME 363
#define SCROLL_VOLUME 363
...
@@ -688,12 +698,10 @@ extern Game* mainGame;
...
@@ -688,12 +698,10 @@ extern Game* mainGame;
#define BUTTON_WINDOW_RESIZE_L 367
#define BUTTON_WINDOW_RESIZE_L 367
#define BUTTON_WINDOW_RESIZE_XL 368
#define BUTTON_WINDOW_RESIZE_XL 368
#define CHECKBOX_QUICK_ANIMATION 369
#define CHECKBOX_QUICK_ANIMATION 369
#define SCROLL_TAB_HELPER 370
#define COMBOBOX_SORTTYPE 370
#define SCROLL_TAB_SYSTEM 371
#define COMBOBOX_LIMIT 371
#define CHECKBOX_MULTI_KEYWORDS 372
#define CHECKBOX_PREFER_EXPANSION 373
#define BUTTON_MARKS_FILTER 380
#define BUTTON_MARKERS_OK 381
#define DEFAULT_DUEL_RULE 4
#define DEFAULT_DUEL_RULE 4
...
...
gframe/menu_handler.cpp
View file @
beaf490e
...
@@ -285,7 +285,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -285,7 +285,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
NetServer
::
StopServer
();
NetServer
::
StopServer
();
break
;
break
;
}
}
STARTUPINFO
si
;
STARTUPINFO
W
si
;
PROCESS_INFORMATION
pi
;
PROCESS_INFORMATION
pi
;
ZeroMemory
(
&
si
,
sizeof
(
si
));
ZeroMemory
(
&
si
,
sizeof
(
si
));
si
.
cb
=
sizeof
(
si
);
si
.
cb
=
sizeof
(
si
);
...
...
gframe/replay_mode.cpp
View file @
beaf490e
...
@@ -775,7 +775,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
...
@@ -775,7 +775,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_CARD_FILTER
:
{
case
MSG_ANNOUNCE_CARD_FILTER
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
*
count
;
pbuf
+=
4
*
count
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
...
...
gframe/single_duel.cpp
View file @
beaf490e
...
@@ -1347,7 +1347,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
...
@@ -1347,7 +1347,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_CARD_FILTER
:
{
case
MSG_ANNOUNCE_CARD_FILTER
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
*
count
;
pbuf
+=
4
*
count
;
WaitforResponse
(
player
);
WaitforResponse
(
player
);
NetServer
::
SendBufferToPlayer
(
players
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
SendBufferToPlayer
(
players
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
...
...
gframe/single_mode.cpp
View file @
beaf490e
...
@@ -693,7 +693,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
...
@@ -693,7 +693,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_CARD_FILTER
:
{
case
MSG_ANNOUNCE_CARD_FILTER
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
*
count
;
pbuf
+=
4
*
count
;
if
(
!
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
))
{
if
(
!
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
))
{
mainGame
->
singleSignal
.
Reset
();
mainGame
->
singleSignal
.
Reset
();
...
...
gframe/sound_manager.cpp
View file @
beaf490e
...
@@ -179,6 +179,8 @@ void SoundManager::PlayDialogSound(irr::gui::IGUIElement * element) {
...
@@ -179,6 +179,8 @@ void SoundManager::PlayDialogSound(irr::gui::IGUIElement * element) {
PlaySoundEffect
(
SOUND_INFO
);
PlaySoundEffect
(
SOUND_INFO
);
}
else
if
(
element
==
mainGame
->
wQuery
)
{
}
else
if
(
element
==
mainGame
->
wQuery
)
{
PlaySoundEffect
(
SOUND_QUESTION
);
PlaySoundEffect
(
SOUND_QUESTION
);
}
else
if
(
element
==
mainGame
->
wSurrender
)
{
PlaySoundEffect
(
SOUND_QUESTION
);
}
else
if
(
element
==
mainGame
->
wOptions
)
{
}
else
if
(
element
==
mainGame
->
wOptions
)
{
PlaySoundEffect
(
SOUND_QUESTION
);
PlaySoundEffect
(
SOUND_QUESTION
);
}
else
if
(
element
==
mainGame
->
wANAttribute
)
{
}
else
if
(
element
==
mainGame
->
wANAttribute
)
{
...
@@ -191,6 +193,8 @@ void SoundManager::PlayDialogSound(irr::gui::IGUIElement * element) {
...
@@ -191,6 +193,8 @@ void SoundManager::PlayDialogSound(irr::gui::IGUIElement * element) {
PlaySoundEffect
(
SOUND_QUESTION
);
PlaySoundEffect
(
SOUND_QUESTION
);
}
else
if
(
element
==
mainGame
->
wReplaySave
)
{
}
else
if
(
element
==
mainGame
->
wReplaySave
)
{
PlaySoundEffect
(
SOUND_QUESTION
);
PlaySoundEffect
(
SOUND_QUESTION
);
}
else
if
(
element
==
mainGame
->
wFTSelect
)
{
PlaySoundEffect
(
SOUND_QUESTION
);
}
}
}
}
void
SoundManager
::
PlayMusic
(
char
*
song
,
bool
loop
)
{
void
SoundManager
::
PlayMusic
(
char
*
song
,
bool
loop
)
{
...
...
gframe/tag_duel.cpp
View file @
beaf490e
...
@@ -1396,7 +1396,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
...
@@ -1396,7 +1396,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_NUMBER
:
case
MSG_ANNOUNCE_CARD_FILTER
:
{
case
MSG_ANNOUNCE_CARD_FILTER
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
*
count
;
pbuf
+=
4
*
count
;
WaitforResponse
(
player
);
WaitforResponse
(
player
);
NetServer
::
SendBufferToPlayer
(
cur_player
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
SendBufferToPlayer
(
cur_player
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
...
...
lflist.conf
View file @
beaf490e
This diff is collapsed.
Click to expand it.
ocgcore
@
02691a96
Subproject commit
8a0195b233fe36cdca8f313a8550037e2d4f22e4
Subproject commit
02691a9601d3c36279ffb07a672e26404bc7e621
script
@
9ec1a442
Subproject commit
bcbf3043ea4824a87484533f0b325d80d99c71b3
Subproject commit
9ec1a4429cf9e3a3fd5002b6286061f9a83db917
strings.conf
View file @
beaf490e
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
!
system
6
反转召唤成功
!
system
6
反转召唤成功
!
system
7
发动
!
system
7
发动
!
system
10
移除指示物
!
system
10
移除指示物
!
system
11
支付
LP
!
system
11
支付
基本分
!
system
12
移除本身的素材
!
system
12
移除本身的素材
!
system
20
抽卡阶段中
!
system
20
抽卡阶段中
!
system
21
准备阶段中
!
system
21
准备阶段中
...
@@ -88,9 +88,9 @@
...
@@ -88,9 +88,9 @@
!
system
508
请选择要召唤的卡
!
system
508
请选择要召唤的卡
!
system
509
请选择要特殊召唤的卡
!
system
509
请选择要特殊召唤的卡
!
system
510
请选择要盖放的卡
!
system
510
请选择要盖放的卡
!
system
511
请选择
融合召唤的素材
!
system
511
请选择
要作为融合素材的卡
!
system
512
请选择
同调召唤的素材
!
system
512
请选择
要作为同调素材的卡
!
system
513
请选择
超量召唤的素材
!
system
513
请选择
要作为超量素材的卡
!
system
514
请选择表侧表示的卡
!
system
514
请选择表侧表示的卡
!
system
515
请选择里侧表示的卡
!
system
515
请选择里侧表示的卡
!
system
516
请选择攻击表示的怪兽
!
system
516
请选择攻击表示的怪兽
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
!
system
530
请选择对方的卡
!
system
530
请选择对方的卡
!
system
531
请选择上级召唤用需要解放的怪兽
!
system
531
请选择上级召唤用需要解放的怪兽
!
system
532
请选择要取除超量素材的怪兽
!
system
532
请选择要取除超量素材的怪兽
!
system
533
请选择
连接召唤的素材
!
system
533
请选择
要作为连接素材的卡
!
system
534
请选择要保留在场上的卡
!
system
534
请选择要保留在场上的卡
!
system
549
请选择攻击的对象
!
system
549
请选择攻击的对象
!
system
550
请选择要发动的效果
!
system
550
请选择要发动的效果
...
@@ -169,7 +169,7 @@
...
@@ -169,7 +169,7 @@
!
system
1036
恐龙
!
system
1036
恐龙
!
system
1037
鱼
!
system
1037
鱼
!
system
1038
海龙
!
system
1038
海龙
!
system
1039
爬虫
!
system
1039
爬虫
类
!
system
1040
念动力
!
system
1040
念动力
!
system
1041
幻神兽
!
system
1041
幻神兽
!
system
1042
创造神
!
system
1042
创造神
...
@@ -284,7 +284,7 @@
...
@@ -284,7 +284,7 @@
!
system
1228
↓额外选项(无特殊要求请勿修改)
!
system
1228
↓额外选项(无特殊要求请勿修改)
!
system
1229
不检查卡组
!
system
1229
不检查卡组
!
system
1230
不洗切卡组
!
system
1230
不洗切卡组
!
system
1231
初始
LP
:
!
system
1231
初始
基本分
:
!
system
1232
初始手卡数:
!
system
1232
初始手卡数:
!
system
1233
每回合抽卡:
!
system
1233
每回合抽卡:
!
system
1234
主机名称:
!
system
1234
主机名称:
...
@@ -316,7 +316,7 @@
...
@@ -316,7 +316,7 @@
!
system
1273
系统设定
!
system
1273
系统设定
!
system
1274
自动选择怪兽卡片位置
!
system
1274
自动选择怪兽卡片位置
!
system
1275
↑随机选择位置
!
system
1275
↑随机选择位置
!
system
1276
自动
排列连锁顺序
!
system
1276
自动
发动并排序必发效果
!
system
1277
没有可连锁的卡时延迟回应
!
system
1277
没有可连锁的卡时延迟回应
!
system
1278
自动选择魔陷卡片位置
!
system
1278
自动选择魔陷卡片位置
!
system
1279
开启音效
!
system
1279
开启音效
...
@@ -392,6 +392,7 @@
...
@@ -392,6 +392,7 @@
!
system
1356
是否要放弃对卡组的修改?
!
system
1356
是否要放弃对卡组的修改?
!
system
1357
不提示保留对卡组的修改
!
system
1357
不提示保留对卡组的修改
!
system
1358
键入关键字后自动进行搜索
!
system
1358
键入关键字后自动进行搜索
!
system
1359
是否确定投降?
!
system
1360
上一步
!
system
1360
上一步
!
system
1361
删除录像
!
system
1361
删除录像
!
system
1362
重命名
!
system
1362
重命名
...
@@ -456,11 +457,11 @@
...
@@ -456,11 +457,11 @@
!
system
1609
[%
ls
]的效果发动
!
system
1609
[%
ls
]的效果发动
!
system
1610
[%
ls
](%
ls
,%
d
)成为对象
!
system
1610
[%
ls
](%
ls
,%
d
)成为对象
!
system
1611
我方抽了%
d
张卡
!
system
1611
我方抽了%
d
张卡
!
system
1612
对
手
抽了%
d
张卡
!
system
1612
对
方
抽了%
d
张卡
!
system
1613
我方受到%
d
伤害
!
system
1613
我方受到%
d
伤害
!
system
1614
对方受到%
d
伤害
!
system
1614
对方受到%
d
伤害
!
system
1615
我方回复%
d
LP
!
system
1615
我方回复%
d
基本分
!
system
1616
对方回复%
d
LP
!
system
1616
对方回复%
d
基本分
!
system
1617
[%
ls
]放置了%
d
个[%
ls
]
!
system
1617
[%
ls
]放置了%
d
个[%
ls
]
!
system
1618
[%
ls
]移除了%
d
个[%
ls
]
!
system
1618
[%
ls
]移除了%
d
个[%
ls
]
!
system
1619
[%
ls
]攻击[%
ls
]
!
system
1619
[%
ls
]攻击[%
ls
]
...
@@ -473,7 +474,7 @@
...
@@ -473,7 +474,7 @@
!
system
1700
可以用鼠标右键%
ls
!
system
1700
可以用鼠标右键%
ls
#victory reason
#victory reason
!
victory
0
x0
投降
!
victory
0
x0
投降
!
victory
0
x1
LP
变成
0
!
victory
0
x1
基本分
变成
0
!
victory
0
x2
没有卡可抽
!
victory
0
x2
没有卡可抽
!
victory
0
x3
超时
!
victory
0
x3
超时
!
victory
0
x4
失去连接
!
victory
0
x4
失去连接
...
@@ -569,6 +570,7 @@
...
@@ -569,6 +570,7 @@
!
counter
0
x4e
指示物(魂之灵摆)
!
counter
0
x4e
指示物(魂之灵摆)
!
counter
0
x104f
蛊指示物
!
counter
0
x104f
蛊指示物
!
counter
0
x50
指示物(娱乐伙伴 掉头跑骑兵)
!
counter
0
x50
指示物(娱乐伙伴 掉头跑骑兵)
!
counter
0
x51
指示物(蜂军巢)
#setnames, using tab for comment
#setnames, using tab for comment
!
setname
0
x1
正义盟军
A
・
O
・
J
!
setname
0
x1
正义盟军
A
・
O
・
J
!
setname
0
x2
次世代 ジェネクス
!
setname
0
x2
次世代 ジェネクス
...
@@ -581,7 +583,7 @@
...
@@ -581,7 +583,7 @@
!
setname
0
x7
古代的机械 アンティーク・ギア
!
setname
0
x7
古代的机械 アンティーク・ギア
!
setname
0
x8
英雄
HERO
!
setname
0
x8
英雄
HERO
!
setname
0
x3008
元素英雄
E
・
HERO
!
setname
0
x3008
元素英雄
E
・
HERO
#
setname 0x5008 幻影英雄 V・HERO
!
setname
0
x5008
幻影英雄
V
・
HERO
#setname 0x6008 邪心英雄 E-HERO
#setname 0x6008 邪心英雄 E-HERO
!
setname
0
xa008
假面英雄
M
・
HERO
!
setname
0
xa008
假面英雄
M
・
HERO
!
setname
0
xc008
命运英雄
D
-
HERO
!
setname
0
xc008
命运英雄
D
-
HERO
...
@@ -773,7 +775,7 @@
...
@@ -773,7 +775,7 @@
!
setname
0
x4093
电子暗黑 サイバー・ダーク/サイバーダーク
!
setname
0
x4093
电子暗黑 サイバー・ダーク/サイバーダーク
!
setname
0
x94
电子科技 サイバネティック
!
setname
0
x94
电子科技 サイバネティック
!
setname
0
x95
升阶魔法
RUM
!
setname
0
x95
升阶魔法
RUM
!
setname
0
x96
电子鱼人 フィッシュボーグ
!
setname
0
x96
电子鱼人
|非「电子」
フィッシュボーグ
!
setname
0
x97
古遗物 アーティファクト
!
setname
0
x97
古遗物 アーティファクト
!
setname
0
x98
魔术师 魔術師
!
setname
0
x98
魔术师 魔術師
!
setname
0
x99
异色眼 オッドアイズ
!
setname
0
x99
异色眼 オッドアイズ
...
@@ -802,7 +804,7 @@
...
@@ -802,7 +804,7 @@
!
setname
0
xa9
毛绒动物 ファーニマル
!
setname
0
xa9
毛绒动物 ファーニマル
!
setname
0
xaa
机壳 クリフォート
!
setname
0
xaa
机壳 クリフォート
!
setname
0
x10aa
隐藏的机壳 アポクリフォート
!
setname
0
x10aa
隐藏的机壳 アポクリフォート
!
setname
0
xab
文具电子人 ブンボーグ
!
setname
0
xab
文具电子人
|非「电子」
ブンボーグ
!
setname
0
xac
哥布林 ゴブリン
!
setname
0
xac
哥布林 ゴブリン
!
setname
0
xad
魔玩具 デストーイ
!
setname
0
xad
魔玩具 デストーイ
!
setname
0
xae
契约书 契約書
!
setname
0
xae
契约书 契約書
...
@@ -921,7 +923,7 @@
...
@@ -921,7 +923,7 @@
!
setname
0
x10a
珀耳修斯 パーシアス
!
setname
0
x10a
珀耳修斯 パーシアス
!
setname
0
x10b
廷达魔三角 ティンダングル
!
setname
0
x10b
廷达魔三角 ティンダングル
!
setname
0
x10c
机界骑士 ジャックナイツ
!
setname
0
x10c
机界骑士 ジャックナイツ
!
setname
0
x10d
魔导兽 魔導獣
!
setname
0
x10d
魔导兽
|非「魔导」
魔導獣
!
setname
0
x10e
进化药 進化薬
!
setname
0
x10e
进化药 進化薬
!
setname
0
x10f
枪管 ヴァレル
!
setname
0
x10f
枪管 ヴァレル
!
setname
0
x110
眼纳祭神 アイズ・サクリファイス
!
setname
0
x110
眼纳祭神 アイズ・サクリファイス
...
@@ -955,3 +957,5 @@
...
@@ -955,3 +957,5 @@
!
setname
0
x12b
海晶少女 マリンセス
!
setname
0
x12b
海晶少女 マリンセス
!
setname
0
x12c
天威
!
setname
0
x12c
天威
!
setname
0
x12d
斯摩夫 シムルグ
!
setname
0
x12d
斯摩夫 シムルグ
!
setname
0
x12e
占卜魔女 占い魔女
!
setname
0
x12f
蜂军
B
・
F
(ビー・フォース)
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