Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
REIKAI
ygopro
Commits
5639bc37
Commit
5639bc37
authored
Apr 27, 2019
by
mycard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'server' of
https://github.com/purerosefallen/ygopro
parents
d8311e01
1a15b37f
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
401 additions
and
40 deletions
+401
-40
cards.cdb
cards.cdb
+0
-0
gframe/base64.h
gframe/base64.h
+256
-0
gframe/client_field.cpp
gframe/client_field.cpp
+12
-6
gframe/deck_con.cpp
gframe/deck_con.cpp
+47
-0
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+26
-0
gframe/deck_manager.h
gframe/deck_manager.h
+2
-0
gframe/event_handler.cpp
gframe/event_handler.cpp
+14
-25
gframe/game.cpp
gframe/game.cpp
+16
-0
gframe/game.h
gframe/game.h
+19
-6
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+1
-1
strings.conf
strings.conf
+7
-1
system.conf
system.conf
+1
-1
No files found.
cards.cdb
View file @
5639bc37
No preview for this file type
gframe/base64.h
0 → 100644
View file @
5639bc37
#ifndef BASE64_H
#define BASE64_H
#include <string>
const
char
kBase64Alphabet
[]
=
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789+/"
;
class
Base64
{
public:
static
bool
Encode
(
const
std
::
string
&
in
,
std
::
string
*
out
)
{
int
i
=
0
,
j
=
0
;
size_t
enc_len
=
0
;
unsigned
char
a3
[
3
];
unsigned
char
a4
[
4
];
out
->
resize
(
EncodedLength
(
in
));
int
input_len
=
in
.
size
();
std
::
string
::
const_iterator
input
=
in
.
begin
();
while
(
input_len
--
)
{
a3
[
i
++
]
=
*
(
input
++
);
if
(
i
==
3
)
{
a3_to_a4
(
a4
,
a3
);
for
(
i
=
0
;
i
<
4
;
i
++
)
{
(
*
out
)[
enc_len
++
]
=
kBase64Alphabet
[
a4
[
i
]];
}
i
=
0
;
}
}
if
(
i
)
{
for
(
j
=
i
;
j
<
3
;
j
++
)
{
a3
[
j
]
=
'\0'
;
}
a3_to_a4
(
a4
,
a3
);
for
(
j
=
0
;
j
<
i
+
1
;
j
++
)
{
(
*
out
)[
enc_len
++
]
=
kBase64Alphabet
[
a4
[
j
]];
}
while
((
i
++
<
3
))
{
(
*
out
)[
enc_len
++
]
=
'='
;
}
}
return
(
enc_len
==
out
->
size
());
}
static
bool
Encode
(
const
char
*
input
,
size_t
input_length
,
char
*
out
,
size_t
out_length
)
{
int
i
=
0
,
j
=
0
;
char
*
out_begin
=
out
;
unsigned
char
a3
[
3
];
unsigned
char
a4
[
4
];
size_t
encoded_length
=
EncodedLength
(
input_length
);
if
(
out_length
<
encoded_length
)
return
false
;
while
(
input_length
--
)
{
a3
[
i
++
]
=
*
input
++
;
if
(
i
==
3
)
{
a3_to_a4
(
a4
,
a3
);
for
(
i
=
0
;
i
<
4
;
i
++
)
{
*
out
++
=
kBase64Alphabet
[
a4
[
i
]];
}
i
=
0
;
}
}
if
(
i
)
{
for
(
j
=
i
;
j
<
3
;
j
++
)
{
a3
[
j
]
=
'\0'
;
}
a3_to_a4
(
a4
,
a3
);
for
(
j
=
0
;
j
<
i
+
1
;
j
++
)
{
*
out
++
=
kBase64Alphabet
[
a4
[
j
]];
}
while
((
i
++
<
3
))
{
*
out
++
=
'='
;
}
}
return
(
out
==
(
out_begin
+
encoded_length
));
}
static
bool
Decode
(
const
std
::
string
&
in
,
std
::
string
*
out
)
{
int
i
=
0
,
j
=
0
;
size_t
dec_len
=
0
;
unsigned
char
a3
[
3
];
unsigned
char
a4
[
4
];
int
input_len
=
in
.
size
();
std
::
string
::
const_iterator
input
=
in
.
begin
();
out
->
resize
(
DecodedLength
(
in
));
while
(
input_len
--
)
{
if
(
*
input
==
'='
)
{
break
;
}
a4
[
i
++
]
=
*
(
input
++
);
if
(
i
==
4
)
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
a4
[
i
]
=
b64_lookup
(
a4
[
i
]);
}
a4_to_a3
(
a3
,
a4
);
for
(
i
=
0
;
i
<
3
;
i
++
)
{
(
*
out
)[
dec_len
++
]
=
a3
[
i
];
}
i
=
0
;
}
}
if
(
i
)
{
for
(
j
=
i
;
j
<
4
;
j
++
)
{
a4
[
j
]
=
'\0'
;
}
for
(
j
=
0
;
j
<
4
;
j
++
)
{
a4
[
j
]
=
b64_lookup
(
a4
[
j
]);
}
a4_to_a3
(
a3
,
a4
);
for
(
j
=
0
;
j
<
i
-
1
;
j
++
)
{
(
*
out
)[
dec_len
++
]
=
a3
[
j
];
}
}
return
(
dec_len
==
out
->
size
());
}
static
bool
Decode
(
const
char
*
input
,
size_t
input_length
,
char
*
out
,
size_t
out_length
)
{
int
i
=
0
,
j
=
0
;
char
*
out_begin
=
out
;
unsigned
char
a3
[
3
];
unsigned
char
a4
[
4
];
size_t
decoded_length
=
DecodedLength
(
input
,
input_length
);
if
(
out_length
<
decoded_length
)
return
false
;
while
(
input_length
--
)
{
if
(
*
input
==
'='
)
{
break
;
}
a4
[
i
++
]
=
*
(
input
++
);
if
(
i
==
4
)
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
a4
[
i
]
=
b64_lookup
(
a4
[
i
]);
}
a4_to_a3
(
a3
,
a4
);
for
(
i
=
0
;
i
<
3
;
i
++
)
{
*
out
++
=
a3
[
i
];
}
i
=
0
;
}
}
if
(
i
)
{
for
(
j
=
i
;
j
<
4
;
j
++
)
{
a4
[
j
]
=
'\0'
;
}
for
(
j
=
0
;
j
<
4
;
j
++
)
{
a4
[
j
]
=
b64_lookup
(
a4
[
j
]);
}
a4_to_a3
(
a3
,
a4
);
for
(
j
=
0
;
j
<
i
-
1
;
j
++
)
{
*
out
++
=
a3
[
j
];
}
}
return
(
out
==
(
out_begin
+
decoded_length
));
}
static
int
DecodedLength
(
const
char
*
in
,
size_t
in_length
)
{
int
numEq
=
0
;
const
char
*
in_end
=
in
+
in_length
;
while
(
*--
in_end
==
'='
)
++
numEq
;
return
((
6
*
in_length
)
/
8
)
-
numEq
;
}
static
int
DecodedLength
(
const
std
::
string
&
in
)
{
int
numEq
=
0
;
int
n
=
in
.
size
();
for
(
std
::
string
::
const_reverse_iterator
it
=
in
.
rbegin
();
*
it
==
'='
;
++
it
)
{
++
numEq
;
}
return
((
6
*
n
)
/
8
)
-
numEq
;
}
inline
static
int
EncodedLength
(
size_t
length
)
{
return
(
length
+
2
-
((
length
+
2
)
%
3
))
/
3
*
4
;
}
inline
static
int
EncodedLength
(
const
std
::
string
&
in
)
{
return
EncodedLength
(
in
.
length
());
}
inline
static
void
StripPadding
(
std
::
string
*
in
)
{
while
(
!
in
->
empty
()
&&
*
(
in
->
rbegin
())
==
'='
)
in
->
resize
(
in
->
size
()
-
1
);
}
private:
static
inline
void
a3_to_a4
(
unsigned
char
*
a4
,
unsigned
char
*
a3
)
{
a4
[
0
]
=
(
a3
[
0
]
&
0xfc
)
>>
2
;
a4
[
1
]
=
((
a3
[
0
]
&
0x03
)
<<
4
)
+
((
a3
[
1
]
&
0xf0
)
>>
4
);
a4
[
2
]
=
((
a3
[
1
]
&
0x0f
)
<<
2
)
+
((
a3
[
2
]
&
0xc0
)
>>
6
);
a4
[
3
]
=
(
a3
[
2
]
&
0x3f
);
}
static
inline
void
a4_to_a3
(
unsigned
char
*
a3
,
unsigned
char
*
a4
)
{
a3
[
0
]
=
(
a4
[
0
]
<<
2
)
+
((
a4
[
1
]
&
0x30
)
>>
4
);
a3
[
1
]
=
((
a4
[
1
]
&
0xf
)
<<
4
)
+
((
a4
[
2
]
&
0x3c
)
>>
2
);
a3
[
2
]
=
((
a4
[
2
]
&
0x3
)
<<
6
)
+
a4
[
3
];
}
static
inline
unsigned
char
b64_lookup
(
unsigned
char
c
)
{
if
(
c
>=
'A'
&&
c
<=
'Z'
)
return
c
-
'A'
;
if
(
c
>=
'a'
&&
c
<=
'z'
)
return
c
-
71
;
if
(
c
>=
'0'
&&
c
<=
'9'
)
return
c
+
4
;
if
(
c
==
'+'
)
return
62
;
if
(
c
==
'/'
)
return
63
;
return
255
;
}
};
#endif // BASE64_H
gframe/client_field.cpp
View file @
5639bc37
...
...
@@ -605,18 +605,23 @@ void ClientField::ShowSelectOption(int select_hint) {
selected_option
=
0
;
wchar_t
textBuffer
[
256
];
int
count
=
select_options
.
size
();
bool
quickmode
=
(
count
<=
5
)
;
bool
quickmode
=
true
;
mainGame
->
gMutex
.
Lock
();
for
(
int
i
=
0
;
(
i
<
count
)
&&
quickmode
;
i
++
)
{
const
wchar_t
*
option
=
dataManager
.
GetDesc
(
select_options
[
i
]);
irr
::
core
::
dimension2d
<
unsigned
int
>
dtxt
=
mainGame
->
guiFont
->
getDimension
(
option
);
if
(
dtxt
.
Width
>
310
)
{
for
(
auto
option
:
select_options
)
{
if
(
mainGame
->
guiFont
->
getDimension
(
dataManager
.
GetDesc
(
option
)).
Width
>
310
)
{
quickmode
=
false
;
break
;
}
}
for
(
int
i
=
0
;
(
i
<
count
)
&&
(
i
<
5
)
&&
quickmode
;
i
++
)
{
const
wchar_t
*
option
=
dataManager
.
GetDesc
(
select_options
[
i
]);
mainGame
->
btnOption
[
i
]
->
setText
(
option
);
}
if
(
quickmode
)
{
bool
scrollbar
=
count
>
5
;
mainGame
->
scrOption
->
setVisible
(
scrollbar
);
mainGame
->
scrOption
->
setPos
(
0
);
mainGame
->
scrOption
->
setMax
(
scrollbar
?
(
count
-
5
)
:
1
);
mainGame
->
stOptions
->
setVisible
(
false
);
mainGame
->
btnOptionp
->
setVisible
(
false
);
mainGame
->
btnOptionn
->
setVisible
(
false
);
...
...
@@ -624,9 +629,10 @@ void ClientField::ShowSelectOption(int select_hint) {
for
(
int
i
=
0
;
i
<
5
;
i
++
)
mainGame
->
btnOption
[
i
]
->
setVisible
(
i
<
count
);
recti
pos
=
mainGame
->
wOptions
->
getRelativePosition
();
int
newheight
=
30
+
40
*
count
;
int
newheight
=
30
+
40
*
(
scrollbar
?
5
:
count
)
;
int
oldheight
=
pos
.
LowerRightCorner
.
Y
-
pos
.
UpperLeftCorner
.
Y
;
pos
.
UpperLeftCorner
.
Y
=
pos
.
UpperLeftCorner
.
Y
+
(
oldheight
-
newheight
)
/
2
;
pos
.
LowerRightCorner
.
X
=
pos
.
UpperLeftCorner
.
X
+
(
scrollbar
?
375
:
350
);
pos
.
LowerRightCorner
.
Y
=
pos
.
UpperLeftCorner
.
Y
+
newheight
;
mainGame
->
wOptions
->
setRelativePosition
(
pos
);
}
else
{
...
...
gframe/deck_con.cpp
View file @
5639bc37
...
...
@@ -219,6 +219,47 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
prev_sel
=
-
1
;
break
;
}
case
BUTTON_DECK_CODE
:
{
int
sel
=
mainGame
->
cbDBDecks
->
getSelected
();
if
(
sel
==
-
1
)
break
;
mainGame
->
gMutex
.
Lock
();
mainGame
->
wDeckCode
->
setText
(
dataManager
.
GetSysString
(
1387
));
if
(
deckManager
.
current_deck
.
main
.
size
()
>
0
||
deckManager
.
current_deck
.
extra
.
size
()
>
0
||
deckManager
.
current_deck
.
side
.
size
()
>
0
)
{
wchar_t
deck_code
[
2048
];
char
deck_code_utf8
[
1024
];
deckManager
.
SaveDeckToCode
(
deckManager
.
current_deck
,
deck_code_utf8
);
BufferIO
::
DecodeUTF8
(
deck_code_utf8
,
deck_code
);
mainGame
->
ebDeckCode
->
setText
(
deck_code
);
}
else
mainGame
->
ebDeckCode
->
setText
(
L""
);
mainGame
->
PopupElement
(
mainGame
->
wDeckCode
);
mainGame
->
gMutex
.
Unlock
();
prev_operation
=
id
;
prev_sel
=
sel
;
break
;
}
case
BUTTON_DECK_CODE_SAVE
:
{
mainGame
->
HideElement
(
mainGame
->
wDeckCode
);
if
(
prev_operation
==
BUTTON_DECK_CODE
)
{
Deck
new_deck
;
char
deck_code
[
1024
];
BufferIO
::
EncodeUTF8
(
mainGame
->
ebDeckCode
->
getText
(),
deck_code
);
if
(
deckManager
.
LoadDeckFromCode
(
new_deck
,
deck_code
,
strlen
(
deck_code
)))
deckManager
.
current_deck
=
new_deck
;
else
mainGame
->
env
->
addMessageBox
(
L""
,
dataManager
.
GetSysString
(
1389
));
}
prev_operation
=
0
;
prev_sel
=
-
1
;
break
;
}
case
BUTTON_DECK_CODE_CANCEL
:
{
mainGame
->
HideElement
(
mainGame
->
wDeckCode
);
prev_operation
=
0
;
prev_sel
=
-
1
;
break
;
}
case
BUTTON_DELETE_DECK
:
{
int
sel
=
mainGame
->
cbDBDecks
->
getSelected
();
if
(
sel
==
-
1
)
...
...
@@ -374,6 +415,12 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break
;
}
case
irr
:
:
gui
::
EGET_SCROLL_BAR_CHANGED
:
{
switch
(
id
)
{
case
SCROLL_FILTER
:
{
GetHoveredCard
();
break
;
}
}
break
;
}
case
irr
:
:
gui
::
EGET_EDITBOX_ENTER
:
{
...
...
gframe/deck_manager.cpp
View file @
5639bc37
...
...
@@ -2,6 +2,7 @@
#include "data_manager.h"
#include "network.h"
#include "game.h"
#include "base64.h"
#include <algorithm>
namespace
ygo
{
...
...
@@ -294,4 +295,29 @@ int DeckManager::TypeCount(std::vector<code_pointer> list, unsigned int ctype) {
}
return
res
;
}
bool
DeckManager
::
LoadDeckFromCode
(
Deck
&
deck
,
const
char
*
code
,
int
len
)
{
char
data
[
1024
],
*
pdeck
=
data
,
*
data_
=
data
;
int
decoded_len
=
Base64
::
DecodedLength
(
code
,
len
);
if
(
decoded_len
<
8
||
!
Base64
::
Decode
(
code
,
len
,
data_
,
decoded_len
))
return
false
;
int
mainc
=
BufferIO
::
ReadInt32
(
pdeck
);
int
sidec
=
BufferIO
::
ReadInt32
(
pdeck
);
int
errorcode
=
LoadDeck
(
deck
,
(
int
*
)
pdeck
,
mainc
,
sidec
);
return
(
errorcode
==
0
);
}
int
DeckManager
::
SaveDeckToCode
(
Deck
&
deck
,
char
*
code
)
{
char
deckbuf
[
1024
],
*
pdeck
=
deckbuf
;
BufferIO
::
WriteInt32
(
pdeck
,
deck
.
main
.
size
()
+
deck
.
extra
.
size
());
BufferIO
::
WriteInt32
(
pdeck
,
deck
.
side
.
size
());
for
(
size_t
i
=
0
;
i
<
deck
.
main
.
size
();
++
i
)
BufferIO
::
WriteInt32
(
pdeck
,
deck
.
main
[
i
]
->
first
);
for
(
size_t
i
=
0
;
i
<
deck
.
extra
.
size
();
++
i
)
BufferIO
::
WriteInt32
(
pdeck
,
deck
.
extra
[
i
]
->
first
);
for
(
size_t
i
=
0
;
i
<
deck
.
side
.
size
();
++
i
)
BufferIO
::
WriteInt32
(
pdeck
,
deck
.
side
[
i
]
->
first
);
int
len
=
pdeck
-
deckbuf
;
int
encoded_len
=
Base64
::
EncodedLength
(
len
);
Base64
::
Encode
(
deckbuf
,
len
,
code
,
encoded_len
);
return
encoded_len
;
}
}
gframe/deck_manager.h
View file @
5639bc37
...
...
@@ -48,6 +48,8 @@ public:
static
bool
RenameDeck
(
const
wchar_t
*
oldname
,
const
wchar_t
*
newname
);
wchar_t
DeckFormatBuffer
[
128
];
int
TypeCount
(
std
::
vector
<
code_pointer
>
list
,
unsigned
int
ctype
);
bool
LoadDeckFromCode
(
Deck
&
deck
,
const
char
*
code
,
int
len
);
int
SaveDeckToCode
(
Deck
&
deck
,
char
*
code
);
};
extern
DeckManager
deckManager
;
...
...
gframe/event_handler.cpp
View file @
5639bc37
...
...
@@ -302,33 +302,14 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame
->
SetStaticText
(
mainGame
->
stOptions
,
310
,
mainGame
->
guiFont
,
dataManager
.
GetDesc
(
select_options
[
selected_option
]));
break
;
}
case
BUTTON_OPTION_0
:
{
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
selected_option
=
0
;
SetResponseSelectedOption
();
break
;
}
case
BUTTON_OPTION_1
:
{
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
selected_option
=
1
;
SetResponseSelectedOption
();
break
;
}
case
BUTTON_OPTION_2
:
{
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
selected_option
=
2
;
SetResponseSelectedOption
();
break
;
}
case
BUTTON_OPTION_3
:
{
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
selected_option
=
3
;
SetResponseSelectedOption
();
break
;
}
case
BUTTON_OPTION_0
:
case
BUTTON_OPTION_1
:
case
BUTTON_OPTION_2
:
case
BUTTON_OPTION_3
:
case
BUTTON_OPTION_4
:
{
soundManager
.
PlaySoundEffect
(
SOUND_BUTTON
);
selected_option
=
4
;
int
step
=
mainGame
->
scrOption
->
isVisible
()
?
mainGame
->
scrOption
->
getPos
()
:
0
;
selected_option
=
id
-
BUTTON_OPTION_0
+
step
;
SetResponseSelectedOption
();
break
;
}
...
...
@@ -857,6 +838,14 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
}
case
irr
:
:
gui
::
EGET_SCROLL_BAR_CHANGED
:
{
switch
(
id
)
{
case
SCROLL_OPTION_SELECT
:
{
int
step
=
mainGame
->
scrOption
->
isVisible
()
?
mainGame
->
scrOption
->
getPos
()
:
0
;
for
(
int
i
=
0
;
i
<
5
;
i
++
)
{
const
wchar_t
*
option
=
dataManager
.
GetDesc
(
select_options
[
i
+
step
]);
mainGame
->
btnOption
[
i
]
->
setText
(
option
);
}
break
;
}
case
SCROLL_CARD_SELECT
:
{
int
pos
=
mainGame
->
scrCardList
->
getPos
()
/
10
;
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
...
...
gframe/game.cpp
View file @
5639bc37
...
...
@@ -475,6 +475,10 @@ bool Game::Initialize() {
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
btnOption
[
i
]
=
env
->
addButton
(
rect
<
s32
>
(
10
,
30
+
40
*
i
,
340
,
60
+
40
*
i
),
wOptions
,
BUTTON_OPTION_0
+
i
,
L""
);
}
scrOption
=
env
->
addScrollBar
(
false
,
rect
<
s32
>
(
350
,
30
,
365
,
220
),
wOptions
,
SCROLL_OPTION_SELECT
);
scrOption
->
setLargeStep
(
1
);
scrOption
->
setSmallStep
(
1
);
scrOption
->
setMin
(
0
);
//pos select
wPosSelect
=
env
->
addWindow
(
rect
<
s32
>
(
340
,
200
,
935
,
410
),
false
,
dataManager
.
GetSysString
(
561
));
wPosSelect
->
getCloseButton
()
->
setVisible
(
false
);
...
...
@@ -594,6 +598,7 @@ bool Game::Initialize() {
btnSideReload
=
env
->
addButton
(
rect
<
s32
>
(
440
,
100
,
500
,
130
),
0
,
BUTTON_SIDE_RELOAD
,
dataManager
.
GetSysString
(
1309
));
btnSideReload
->
setVisible
(
false
);
btnRenameDeck
=
env
->
addButton
(
rect
<
s32
>
(
170
,
99
,
220
,
120
),
wDeckEdit
,
BUTTON_RENAME_DECK
,
dataManager
.
GetSysString
(
1362
));
btnDeckCode
=
env
->
addButton
(
rect
<
s32
>
(
5
,
65
,
75
,
90
),
wDeckEdit
,
BUTTON_DECK_CODE
,
dataManager
.
GetSysString
(
1387
));
//
scrFilter
=
env
->
addScrollBar
(
false
,
recti
(
999
,
161
,
1019
,
629
),
0
,
SCROLL_FILTER
);
scrFilter
->
setLargeStep
(
10
);
...
...
@@ -608,6 +613,15 @@ bool Game::Initialize() {
ebREName
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
btnREYes
=
env
->
addButton
(
rect
<
s32
>
(
70
,
80
,
140
,
105
),
wRenameDeck
,
BUTTON_RENAME_DECK_SAVE
,
dataManager
.
GetSysString
(
1341
));
btnRENo
=
env
->
addButton
(
rect
<
s32
>
(
170
,
80
,
240
,
105
),
wRenameDeck
,
BUTTON_RENAME_DECK_CANCEL
,
dataManager
.
GetSysString
(
1212
));
//deck code
wDeckCode
=
env
->
addWindow
(
rect
<
s32
>
(
510
,
200
,
820
,
320
),
false
,
dataManager
.
GetSysString
(
1387
));
wDeckCode
->
getCloseButton
()
->
setVisible
(
false
);
wDeckCode
->
setVisible
(
false
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1388
),
rect
<
s32
>
(
20
,
25
,
290
,
45
),
false
,
false
,
wDeckCode
);
ebDeckCode
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
20
,
50
,
290
,
70
),
true
,
wDeckCode
,
-
1
);
ebDeckCode
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
btnDeckCodeYes
=
env
->
addButton
(
rect
<
s32
>
(
70
,
80
,
140
,
105
),
wDeckCode
,
BUTTON_DECK_CODE_SAVE
,
dataManager
.
GetSysString
(
1341
));
btnDeckCodeNo
=
env
->
addButton
(
rect
<
s32
>
(
170
,
80
,
240
,
105
),
wDeckCode
,
BUTTON_DECK_CODE_CANCEL
,
dataManager
.
GetSysString
(
1212
));
//sort type
wSort
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
930
,
132
,
1020
,
156
),
true
,
false
,
0
,
-
1
,
true
);
cbSortType
=
env
->
addComboBox
(
rect
<
s32
>
(
10
,
2
,
85
,
22
),
wSort
,
COMBOBOX_SORTTYPE
);
...
...
@@ -1965,6 +1979,7 @@ void Game::OnResize() {
btnSideReload
->
setRelativePosition
(
Resize
(
440
,
100
,
500
,
130
));
btnDeleteDeck
->
setRelativePosition
(
Resize
(
225
,
95
,
290
,
120
));
btnRenameDeck
->
setRelativePosition
(
Resize
(
170
,
99
,
220
,
120
));
btnDeckCode
->
setRelativePosition
(
Resize
(
5
,
65
,
75
,
90
));
wLanWindow
->
setRelativePosition
(
ResizeWin
(
220
,
100
,
800
,
520
));
wCreateHost
->
setRelativePosition
(
ResizeWin
(
320
,
100
,
700
,
520
));
...
...
@@ -1986,6 +2001,7 @@ void Game::OnResize() {
wANAttribute
->
setRelativePosition
(
ResizeWin
(
500
,
200
,
830
,
285
));
wANRace
->
setRelativePosition
(
ResizeWin
(
480
,
200
,
850
,
410
));
wReplaySave
->
setRelativePosition
(
ResizeWin
(
510
,
200
,
820
,
320
));
wRenameDeck
->
setRelativePosition
(
ResizeWin
(
510
,
200
,
820
,
320
));
stHintMsg
->
setRelativePosition
(
ResizeWin
(
660
-
160
*
xScale
,
60
,
660
+
160
*
xScale
,
90
));
...
...
gframe/game.h
View file @
5639bc37
...
...
@@ -438,6 +438,7 @@ public:
irr
::
gui
::
IGUIButton
*
btnOptionn
;
irr
::
gui
::
IGUIButton
*
btnOptionOK
;
irr
::
gui
::
IGUIButton
*
btnOption
[
5
];
irr
::
gui
::
IGUIScrollBar
*
scrOption
;
//pos selection
irr
::
gui
::
IGUIWindow
*
wPosSelect
;
irr
::
gui
::
CGUIImageButton
*
btnPSAU
;
...
...
@@ -511,6 +512,19 @@ public:
irr
::
gui
::
IGUIButton
*
btnSideSort
;
irr
::
gui
::
IGUIButton
*
btnSideReload
;
irr
::
gui
::
IGUIEditBox
*
ebDeckname
;
irr
::
gui
::
IGUIButton
*
btnRenameDeck
;
irr
::
gui
::
IGUIButton
*
btnDeckCode
;
//deck rename
irr
::
gui
::
IGUIWindow
*
wRenameDeck
;
irr
::
gui
::
IGUIEditBox
*
ebREName
;
irr
::
gui
::
IGUIButton
*
btnREYes
;
irr
::
gui
::
IGUIButton
*
btnRENo
;
//deck code
irr
::
gui
::
IGUIWindow
*
wDeckCode
;
irr
::
gui
::
IGUIEditBox
*
ebDeckCode
;
irr
::
gui
::
IGUIButton
*
btnDeckCodeYes
;
irr
::
gui
::
IGUIButton
*
btnDeckCodeNo
;
//
irr
::
gui
::
IGUIStaticText
*
stBanlist
;
irr
::
gui
::
IGUIStaticText
*
stDeck
;
irr
::
gui
::
IGUIStaticText
*
stCategory
;
...
...
@@ -522,12 +536,6 @@ public:
irr
::
gui
::
IGUIStaticText
*
stStar
;
irr
::
gui
::
IGUIStaticText
*
stSearch
;
irr
::
gui
::
IGUIStaticText
*
stScale
;
irr
::
gui
::
IGUIButton
*
btnRenameDeck
;
//deck rename
irr
::
gui
::
IGUIWindow
*
wRenameDeck
;
irr
::
gui
::
IGUIEditBox
*
ebREName
;
irr
::
gui
::
IGUIButton
*
btnREYes
;
irr
::
gui
::
IGUIButton
*
btnRENo
;
//filter
irr
::
gui
::
IGUIStaticText
*
wFilter
;
irr
::
gui
::
IGUIScrollBar
*
scrFilter
;
...
...
@@ -658,6 +666,7 @@ extern HostInfo game_info;
#define BUTTON_OPTION_2 225
#define BUTTON_OPTION_3 226
#define BUTTON_OPTION_4 227
#define SCROLL_OPTION_SELECT 228
#define BUTTON_CARD_0 230
#define BUTTON_CARD_1 231
#define BUTTON_CARD_2 232
...
...
@@ -764,6 +773,10 @@ extern HostInfo game_info;
#define BUTTON_RENAME_DECK_SAVE 387
#define BUTTON_RENAME_DECK_CANCEL 388
#define BUTTON_DECK_CODE 389
#define BUTTON_DECK_CODE_SAVE 390
#define BUTTON_DECK_CODE_CANCEL 391
#define TEXTURE_DUEL 0
#define TEXTURE_DECK 1
#define TEXTURE_MENU 2
...
...
gframe/tag_duel.cpp
View file @
5639bc37
...
...
@@ -1704,7 +1704,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
case
MSG_ROCK_PAPER_SCISSORS
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
WaitforResponse
(
player
);
NetServer
::
SendBufferToPlayer
(
players
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
NetServer
::
SendBufferToPlayer
(
cur_player
[
player
],
STOC_GAME_MSG
,
offset
,
pbuf
-
offset
);
return
1
;
}
case
MSG_HAND_RES
:
{
...
...
strings.conf
View file @
5639bc37
...
...
@@ -422,6 +422,9 @@
!
system
1384
电脑锁定出剪刀
!
system
1385
列表为空,可能未安装合适的人机
!
system
1386
使用正则表达式搜索卡片
!
system
1387
卡组代码
!
system
1388
Ctrl
+
A
全选,
Ctrl
+
C
复制,
Ctrl
+
V
粘贴
!
system
1389
卡组代码无效。
!
system
1390
等待行动中...
!
system
1391
等待行动中....
!
system
1392
等待行动中.....
...
...
@@ -737,7 +740,7 @@
!
setname
0
x73
超量 エクシーズ
!
setname
0
x1073
混沌超量
CX
(カオスエクシーズ)
!
setname
0
x2073
超量龙 エクシーズ・ドラゴン
!
setname
0
x74
水精鱗
!
setname
0
x74
水精
鳞 水精
鱗
!
setname
0
x75
深渊 アビス
!
setname
0
x76
纹章兽 紋章獣
!
setname
0
x77
海皇
...
...
@@ -961,3 +964,6 @@
!
setname
0
x128
魔女术 ウィッチクラフト
!
setname
0
x129
咒眼 呪眼
!
setname
0
x12a
恩底弥翁 エンディミオン
!
setname
0
x12b
海晶少女 マリンセス
!
setname
0
x12c
天威
!
setname
0
x12d
斯摩夫 シムルグ
system.conf
View file @
5639bc37
...
...
@@ -2,7 +2,7 @@
#nickname & gamename should be less than 20 characters
use_d3d
=
0
use_image_scale
=
1
pro_version
=
493
6
pro_version
=
493
7
antialias
=
2
errorlog
=
3
nickname
=
Komeiji
Koishi
...
...
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