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
赤子奈落
ygopro
Commits
e546041d
Commit
e546041d
authored
May 13, 2024
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop'
parents
f73f6e1d
5908aabd
Changes
24
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1012 additions
and
893 deletions
+1012
-893
gframe/CGUITTFont.cpp
gframe/CGUITTFont.cpp
+19
-20
gframe/bufferio.h
gframe/bufferio.h
+7
-8
gframe/client_card.cpp
gframe/client_card.cpp
+8
-8
gframe/client_field.cpp
gframe/client_field.cpp
+5
-5
gframe/config.h
gframe/config.h
+1
-3
gframe/data_manager.cpp
gframe/data_manager.cpp
+19
-13
gframe/data_manager.h
gframe/data_manager.h
+5
-3
gframe/deck_con.cpp
gframe/deck_con.cpp
+1
-0
gframe/deck_con.h
gframe/deck_con.h
+37
-37
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+15
-16
gframe/deck_manager.h
gframe/deck_manager.h
+1
-1
gframe/drawing.cpp
gframe/drawing.cpp
+38
-18
gframe/duelclient.cpp
gframe/duelclient.cpp
+389
-368
gframe/duelclient.h
gframe/duelclient.h
+1
-2
gframe/event_handler.cpp
gframe/event_handler.cpp
+2
-1
gframe/game.cpp
gframe/game.cpp
+146
-88
gframe/game.h
gframe/game.h
+7
-3
gframe/gframe.cpp
gframe/gframe.cpp
+1
-1
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+62
-59
gframe/single_duel.cpp
gframe/single_duel.cpp
+85
-85
gframe/single_mode.cpp
gframe/single_mode.cpp
+63
-62
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+90
-90
premake5.lua
premake5.lua
+2
-2
strings.conf
strings.conf
+8
-0
No files found.
gframe/CGUITTFont.cpp
View file @
e546041d
...
@@ -527,29 +527,28 @@ void CGUITTFont::draw(const core::stringw& text, const core::rect<s32>& position
...
@@ -527,29 +527,28 @@ void CGUITTFont::draw(const core::stringw& text, const core::rect<s32>& position
core
::
ustring
::
const_iterator
iter
(
utext
);
core
::
ustring
::
const_iterator
iter
(
utext
);
while
(
!
iter
.
atEnd
())
{
while
(
!
iter
.
atEnd
())
{
uchar32_t
currentChar
=
*
iter
;
uchar32_t
currentChar
=
*
iter
;
bool
lineBreak
=
false
;
if
(
currentChar
==
L'\r'
)
{
// Mac or Windows breaks
lineBreak
=
true
;
if
(
*
(
iter
+
1
)
==
L'\n'
)
// Windows line breaks.
currentChar
=
*
(
++
iter
);
}
else
if
(
currentChar
==
L'\n'
)
{
// Unix breaks
lineBreak
=
true
;
}
if
(
lineBreak
)
{
previousChar
=
0
;
offset
.
Y
+=
supposed_line_height
;
//font_metrics.ascender / 64;
offset
.
X
=
position
.
UpperLeftCorner
.
X
;
if
(
hcenter
)
offset
.
X
+=
(
position
.
getWidth
()
-
textDimension
.
Width
)
>>
1
;
++
iter
;
continue
;
}
n
=
getGlyphIndexByChar
(
currentChar
);
n
=
getGlyphIndexByChar
(
currentChar
);
bool
visible
=
(
Invisible
.
findFirst
(
currentChar
)
==
-
1
);
bool
visible
=
(
Invisible
.
findFirst
(
currentChar
)
==
-
1
);
if
(
n
>
0
&&
visible
)
{
if
(
n
>
0
&&
visible
)
{
bool
lineBreak
=
false
;
if
(
currentChar
==
L'\r'
)
{
// Mac or Windows breaks
lineBreak
=
true
;
if
(
*
(
iter
+
1
)
==
(
uchar32_t
)
'\n'
)
// Windows line breaks.
currentChar
=
*
(
++
iter
);
}
else
if
(
currentChar
==
(
uchar32_t
)
'\n'
)
{
// Unix breaks
lineBreak
=
true
;
}
if
(
lineBreak
)
{
previousChar
=
0
;
offset
.
Y
+=
supposed_line_height
;
//font_metrics.ascender / 64;
offset
.
X
=
position
.
UpperLeftCorner
.
X
;
if
(
hcenter
)
offset
.
X
+=
(
position
.
getWidth
()
-
textDimension
.
Width
)
>>
1
;
++
iter
;
continue
;
}
// Calculate the glyph offset.
// Calculate the glyph offset.
s32
offx
=
Glyphs
[
n
-
1
].
offset
.
X
;
s32
offx
=
Glyphs
[
n
-
1
].
offset
.
X
;
s32
offy
=
(
font_metrics
.
ascender
/
64
)
-
Glyphs
[
n
-
1
].
offset
.
Y
;
s32
offy
=
(
font_metrics
.
ascender
/
64
)
-
Glyphs
[
n
-
1
].
offset
.
Y
;
...
...
gframe/bufferio.h
View file @
e546041d
#ifndef BUFFERIO_H
#ifndef BUFFERIO_H
#define BUFFERIO_H
#define BUFFERIO_H
#ifdef _MSC_VER
#pragma warning(disable: 4244)
#endif
class
BufferIO
{
class
BufferIO
{
public:
public:
...
@@ -53,7 +50,7 @@ public:
...
@@ -53,7 +50,7 @@ public:
inline
static
int
CopyWStr
(
T1
*
src
,
T2
*
pstr
,
int
bufsize
)
{
inline
static
int
CopyWStr
(
T1
*
src
,
T2
*
pstr
,
int
bufsize
)
{
int
l
=
0
;
int
l
=
0
;
while
(
src
[
l
]
&&
l
<
bufsize
-
1
)
{
while
(
src
[
l
]
&&
l
<
bufsize
-
1
)
{
pstr
[
l
]
=
src
[
l
];
pstr
[
l
]
=
(
T2
)
src
[
l
];
l
++
;
l
++
;
}
}
pstr
[
l
]
=
0
;
pstr
[
l
]
=
0
;
...
@@ -63,7 +60,7 @@ public:
...
@@ -63,7 +60,7 @@ public:
inline
static
int
CopyWStrRef
(
T1
*
src
,
T2
*&
pstr
,
int
bufsize
)
{
inline
static
int
CopyWStrRef
(
T1
*
src
,
T2
*&
pstr
,
int
bufsize
)
{
int
l
=
0
;
int
l
=
0
;
while
(
src
[
l
]
&&
l
<
bufsize
-
1
)
{
while
(
src
[
l
]
&&
l
<
bufsize
-
1
)
{
pstr
[
l
]
=
src
[
l
];
pstr
[
l
]
=
(
T2
)
src
[
l
];
l
++
;
l
++
;
}
}
pstr
+=
l
;
pstr
+=
l
;
...
@@ -75,7 +72,7 @@ public:
...
@@ -75,7 +72,7 @@ public:
char
*
pstr
=
str
;
char
*
pstr
=
str
;
while
(
*
wsrc
!=
0
)
{
while
(
*
wsrc
!=
0
)
{
if
(
*
wsrc
<
0x80
)
{
if
(
*
wsrc
<
0x80
)
{
*
str
=
*
wsrc
;
*
str
=
(
char
)
*
wsrc
;
++
str
;
++
str
;
}
else
if
(
*
wsrc
<
0x800
)
{
}
else
if
(
*
wsrc
<
0x800
)
{
str
[
0
]
=
((
*
wsrc
>>
6
)
&
0x1f
)
|
0xc0
;
str
[
0
]
=
((
*
wsrc
>>
6
)
&
0x1f
)
|
0xc0
;
...
@@ -141,12 +138,14 @@ public:
...
@@ -141,12 +138,14 @@ public:
return
wp
-
wstr
;
return
wp
-
wstr
;
}
}
static
int
GetVal
(
const
wchar_t
*
pstr
)
{
static
int
GetVal
(
const
wchar_t
*
pstr
)
{
int
ret
=
0
;
unsigned
int
ret
=
0
;
while
(
*
pstr
>=
L'0'
&&
*
pstr
<=
L'9'
)
{
while
(
*
pstr
>=
L'0'
&&
*
pstr
<=
L'9'
)
{
ret
=
ret
*
10
+
(
*
pstr
-
L'0'
);
ret
=
ret
*
10
+
(
*
pstr
-
L'0'
);
pstr
++
;
pstr
++
;
}
}
return
ret
;
if
(
*
pstr
==
0
)
return
(
int
)
ret
;
return
0
;
}
}
};
};
...
...
gframe/client_card.cpp
View file @
e546041d
...
@@ -113,10 +113,10 @@ void ClientCard::UpdateInfo(unsigned char* buf) {
...
@@ -113,10 +113,10 @@ void ClientCard::UpdateInfo(unsigned char* buf) {
if
(
flag
&
QUERY_REASON_CARD
)
if
(
flag
&
QUERY_REASON_CARD
)
buf
+=
4
;
buf
+=
4
;
if
(
flag
&
QUERY_EQUIP_CARD
)
{
if
(
flag
&
QUERY_EQUIP_CARD
)
{
int
c
=
BufferIO
::
ReadInt8
(
buf
);
int
c
=
BufferIO
::
Read
U
Int8
(
buf
);
int
l
=
BufferIO
::
Read
Int8
(
buf
);
unsigned
int
l
=
BufferIO
::
ReadU
Int8
(
buf
);
int
s
=
BufferIO
::
ReadInt8
(
buf
);
int
s
=
BufferIO
::
Read
U
Int8
(
buf
);
BufferIO
::
ReadInt8
(
buf
);
BufferIO
::
Read
U
Int8
(
buf
);
ClientCard
*
ecard
=
mainGame
->
dField
.
GetCard
(
mainGame
->
LocalPlayer
(
c
),
l
,
s
);
ClientCard
*
ecard
=
mainGame
->
dField
.
GetCard
(
mainGame
->
LocalPlayer
(
c
),
l
,
s
);
if
(
ecard
)
{
if
(
ecard
)
{
equipTarget
=
ecard
;
equipTarget
=
ecard
;
...
@@ -126,10 +126,10 @@ void ClientCard::UpdateInfo(unsigned char* buf) {
...
@@ -126,10 +126,10 @@ void ClientCard::UpdateInfo(unsigned char* buf) {
if
(
flag
&
QUERY_TARGET_CARD
)
{
if
(
flag
&
QUERY_TARGET_CARD
)
{
int
count
=
BufferIO
::
ReadInt32
(
buf
);
int
count
=
BufferIO
::
ReadInt32
(
buf
);
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
int
c
=
BufferIO
::
ReadInt8
(
buf
);
int
c
=
BufferIO
::
Read
U
Int8
(
buf
);
int
l
=
BufferIO
::
Read
Int8
(
buf
);
unsigned
int
l
=
BufferIO
::
ReadU
Int8
(
buf
);
int
s
=
BufferIO
::
ReadInt8
(
buf
);
int
s
=
BufferIO
::
Read
U
Int8
(
buf
);
BufferIO
::
ReadInt8
(
buf
);
BufferIO
::
Read
U
Int8
(
buf
);
ClientCard
*
tcard
=
mainGame
->
dField
.
GetCard
(
mainGame
->
LocalPlayer
(
c
),
l
,
s
);
ClientCard
*
tcard
=
mainGame
->
dField
.
GetCard
(
mainGame
->
LocalPlayer
(
c
),
l
,
s
);
if
(
tcard
)
{
if
(
tcard
)
{
cardTarget
.
insert
(
tcard
);
cardTarget
.
insert
(
tcard
);
...
...
gframe/client_field.cpp
View file @
e546041d
...
@@ -197,7 +197,7 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
...
@@ -197,7 +197,7 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
case
LOCATION_DECK
:
{
case
LOCATION_DECK
:
{
if
(
sequence
!=
0
||
deck
[
controler
].
size
()
==
0
)
{
if
(
sequence
!=
0
||
deck
[
controler
].
size
()
==
0
)
{
deck
[
controler
].
push_back
(
pcard
);
deck
[
controler
].
push_back
(
pcard
);
pcard
->
sequence
=
deck
[
controler
].
size
()
-
1
;
pcard
->
sequence
=
(
unsigned
char
)(
deck
[
controler
].
size
()
-
1
)
;
}
else
{
}
else
{
deck
[
controler
].
push_back
(
0
);
deck
[
controler
].
push_back
(
0
);
for
(
int
i
=
deck
[
controler
].
size
()
-
1
;
i
>
0
;
--
i
)
{
for
(
int
i
=
deck
[
controler
].
size
()
-
1
;
i
>
0
;
--
i
)
{
...
@@ -212,7 +212,7 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
...
@@ -212,7 +212,7 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
}
}
case
LOCATION_HAND
:
{
case
LOCATION_HAND
:
{
hand
[
controler
].
push_back
(
pcard
);
hand
[
controler
].
push_back
(
pcard
);
pcard
->
sequence
=
hand
[
controler
].
size
()
-
1
;
pcard
->
sequence
=
(
unsigned
char
)(
hand
[
controler
].
size
()
-
1
)
;
break
;
break
;
}
}
case
LOCATION_MZONE
:
{
case
LOCATION_MZONE
:
{
...
@@ -225,18 +225,18 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
...
@@ -225,18 +225,18 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
}
}
case
LOCATION_GRAVE
:
{
case
LOCATION_GRAVE
:
{
grave
[
controler
].
push_back
(
pcard
);
grave
[
controler
].
push_back
(
pcard
);
pcard
->
sequence
=
grave
[
controler
].
size
()
-
1
;
pcard
->
sequence
=
(
unsigned
char
)(
grave
[
controler
].
size
()
-
1
)
;
break
;
break
;
}
}
case
LOCATION_REMOVED
:
{
case
LOCATION_REMOVED
:
{
remove
[
controler
].
push_back
(
pcard
);
remove
[
controler
].
push_back
(
pcard
);
pcard
->
sequence
=
remove
[
controler
].
size
()
-
1
;
pcard
->
sequence
=
(
unsigned
char
)(
remove
[
controler
].
size
()
-
1
)
;
break
;
break
;
}
}
case
LOCATION_EXTRA
:
{
case
LOCATION_EXTRA
:
{
if
(
extra_p_count
[
controler
]
==
0
||
(
pcard
->
position
&
POS_FACEUP
))
{
if
(
extra_p_count
[
controler
]
==
0
||
(
pcard
->
position
&
POS_FACEUP
))
{
extra
[
controler
].
push_back
(
pcard
);
extra
[
controler
].
push_back
(
pcard
);
pcard
->
sequence
=
extra
[
controler
].
size
()
-
1
;
pcard
->
sequence
=
(
unsigned
char
)(
extra
[
controler
].
size
()
-
1
)
;
}
else
{
}
else
{
extra
[
controler
].
push_back
(
0
);
extra
[
controler
].
push_back
(
0
);
int
p
=
extra
[
controler
].
size
()
-
extra_p_count
[
controler
]
-
1
;
int
p
=
extra
[
controler
].
size
()
-
extra_p_count
[
controler
]
-
1
;
...
...
gframe/config.h
View file @
e546041d
...
@@ -86,10 +86,8 @@ using namespace video;
...
@@ -86,10 +86,8 @@ using namespace video;
using
namespace
io
;
using
namespace
io
;
using
namespace
gui
;
using
namespace
gui
;
typedef
int
BOOL
;
extern
unsigned
short
PRO_VERSION
;
extern
unsigned
short
PRO_VERSION
;
extern
int
enable_log
;
extern
unsigned
int
enable_log
;
extern
bool
exit_on_return
;
extern
bool
exit_on_return
;
extern
bool
auto_watch_mode
;
extern
bool
auto_watch_mode
;
extern
bool
open_file
;
extern
bool
open_file
;
...
...
gframe/data_manager.cpp
View file @
e546041d
...
@@ -139,24 +139,30 @@ bool DataManager::LoadStrings(IReadFile* reader) {
...
@@ -139,24 +139,30 @@ bool DataManager::LoadStrings(IReadFile* reader) {
void
DataManager
::
ReadStringConfLine
(
const
char
*
linebuf
)
{
void
DataManager
::
ReadStringConfLine
(
const
char
*
linebuf
)
{
if
(
linebuf
[
0
]
!=
'!'
)
if
(
linebuf
[
0
]
!=
'!'
)
return
;
return
;
char
strbuf
[
256
];
char
strbuf
[
256
]{};
int
value
;
int
value
{};
wchar_t
strBuffer
[
4096
];
wchar_t
strBuffer
[
4096
]{};
sscanf
(
linebuf
,
"!%s"
,
strbuf
);
if
(
sscanf
(
linebuf
,
"!%63s"
,
strbuf
)
!=
1
)
return
;
if
(
!
strcmp
(
strbuf
,
"system"
))
{
if
(
!
strcmp
(
strbuf
,
"system"
))
{
sscanf
(
&
linebuf
[
7
],
"%d %240[^
\n
]"
,
&
value
,
strbuf
);
if
(
sscanf
(
&
linebuf
[
7
],
"%d %240[^
\n
]"
,
&
value
,
strbuf
)
!=
2
)
return
;
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
_sysStrings
[
value
]
=
strBuffer
;
_sysStrings
[
value
]
=
strBuffer
;
}
else
if
(
!
strcmp
(
strbuf
,
"victory"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"victory"
))
{
sscanf
(
&
linebuf
[
8
],
"%x %240[^
\n
]"
,
&
value
,
strbuf
);
if
(
sscanf
(
&
linebuf
[
8
],
"%x %240[^
\n
]"
,
&
value
,
strbuf
)
!=
2
)
return
;
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
_victoryStrings
[
value
]
=
strBuffer
;
_victoryStrings
[
value
]
=
strBuffer
;
}
else
if
(
!
strcmp
(
strbuf
,
"counter"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"counter"
))
{
sscanf
(
&
linebuf
[
8
],
"%x %240[^
\n
]"
,
&
value
,
strbuf
);
if
(
sscanf
(
&
linebuf
[
8
],
"%x %240[^
\n
]"
,
&
value
,
strbuf
)
!=
2
)
return
;
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
_counterStrings
[
value
]
=
strBuffer
;
_counterStrings
[
value
]
=
strBuffer
;
}
else
if
(
!
strcmp
(
strbuf
,
"setname"
))
{
}
else
if
(
!
strcmp
(
strbuf
,
"setname"
))
{
sscanf
(
&
linebuf
[
8
],
"%x %240[^
\t\n
]"
,
&
value
,
strbuf
);
//using tab for comment
//using tab for comment
if
(
sscanf
(
&
linebuf
[
8
],
"%x %240[^
\t\n
]"
,
&
value
,
strbuf
)
!=
2
)
return
;
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
BufferIO
::
DecodeUTF8
(
strbuf
,
strBuffer
);
_setnameStrings
[
value
]
=
strBuffer
;
_setnameStrings
[
value
]
=
strBuffer
;
}
}
...
@@ -197,7 +203,7 @@ code_pointer DataManager::GetCodePointer(unsigned int code) const {
...
@@ -197,7 +203,7 @@ code_pointer DataManager::GetCodePointer(unsigned int code) const {
string_pointer
DataManager
::
GetStringPointer
(
unsigned
int
code
)
const
{
string_pointer
DataManager
::
GetStringPointer
(
unsigned
int
code
)
const
{
return
_strings
.
find
(
code
);
return
_strings
.
find
(
code
);
}
}
bool
DataManager
::
GetString
(
int
code
,
CardString
*
pStr
)
{
bool
DataManager
::
GetString
(
unsigned
int
code
,
CardString
*
pStr
)
{
auto
csit
=
_strings
.
find
(
code
);
auto
csit
=
_strings
.
find
(
code
);
if
(
csit
==
_strings
.
end
())
{
if
(
csit
==
_strings
.
end
())
{
pStr
->
name
=
unknown_string
;
pStr
->
name
=
unknown_string
;
...
@@ -207,7 +213,7 @@ bool DataManager::GetString(int code, CardString* pStr) {
...
@@ -207,7 +213,7 @@ bool DataManager::GetString(int code, CardString* pStr) {
*
pStr
=
csit
->
second
;
*
pStr
=
csit
->
second
;
return
true
;
return
true
;
}
}
const
wchar_t
*
DataManager
::
GetName
(
int
code
)
{
const
wchar_t
*
DataManager
::
GetName
(
unsigned
int
code
)
{
auto
csit
=
_strings
.
find
(
code
);
auto
csit
=
_strings
.
find
(
code
);
if
(
csit
==
_strings
.
end
())
if
(
csit
==
_strings
.
end
())
return
unknown_string
;
return
unknown_string
;
...
@@ -215,7 +221,7 @@ const wchar_t* DataManager::GetName(int code) {
...
@@ -215,7 +221,7 @@ const wchar_t* DataManager::GetName(int code) {
return
csit
->
second
.
name
.
c_str
();
return
csit
->
second
.
name
.
c_str
();
return
unknown_string
;
return
unknown_string
;
}
}
const
wchar_t
*
DataManager
::
GetText
(
int
code
)
{
const
wchar_t
*
DataManager
::
GetText
(
unsigned
int
code
)
{
auto
csit
=
_strings
.
find
(
code
);
auto
csit
=
_strings
.
find
(
code
);
if
(
csit
==
_strings
.
end
())
if
(
csit
==
_strings
.
end
())
return
unknown_string
;
return
unknown_string
;
...
@@ -224,7 +230,7 @@ const wchar_t* DataManager::GetText(int code) {
...
@@ -224,7 +230,7 @@ const wchar_t* DataManager::GetText(int code) {
return
unknown_string
;
return
unknown_string
;
}
}
const
wchar_t
*
DataManager
::
GetDesc
(
unsigned
int
strCode
)
{
const
wchar_t
*
DataManager
::
GetDesc
(
unsigned
int
strCode
)
{
if
(
strCode
<
10000u
)
if
(
strCode
<
(
MIN_CARD_ID
<<
4
)
)
return
GetSysString
(
strCode
);
return
GetSysString
(
strCode
);
unsigned
int
code
=
(
strCode
>>
4
)
&
0x0fffffff
;
unsigned
int
code
=
(
strCode
>>
4
)
&
0x0fffffff
;
unsigned
int
offset
=
strCode
&
0xf
;
unsigned
int
offset
=
strCode
&
0xf
;
...
@@ -236,7 +242,7 @@ const wchar_t* DataManager::GetDesc(unsigned int strCode) {
...
@@ -236,7 +242,7 @@ const wchar_t* DataManager::GetDesc(unsigned int strCode) {
return
unknown_string
;
return
unknown_string
;
}
}
const
wchar_t
*
DataManager
::
GetSysString
(
int
code
)
{
const
wchar_t
*
DataManager
::
GetSysString
(
int
code
)
{
if
(
code
<
0
||
code
>=
2048
)
if
(
code
<
0
||
code
>
MAX_STRING_ID
)
return
unknown_string
;
return
unknown_string
;
auto
csit
=
_sysStrings
.
find
(
code
);
auto
csit
=
_sysStrings
.
find
(
code
);
if
(
csit
==
_sysStrings
.
end
())
if
(
csit
==
_sysStrings
.
end
())
...
...
gframe/data_manager.h
View file @
e546041d
...
@@ -8,6 +8,8 @@
...
@@ -8,6 +8,8 @@
#include <unordered_map>
#include <unordered_map>
namespace
ygo
{
namespace
ygo
{
constexpr
int
MAX_STRING_ID
=
0x7ff
;
constexpr
unsigned
int
MIN_CARD_ID
=
(
unsigned
int
)(
MAX_STRING_ID
+
1
)
>>
4
;
class
DataManager
{
class
DataManager
{
public:
public:
...
@@ -20,9 +22,9 @@ public:
...
@@ -20,9 +22,9 @@ public:
bool
GetData
(
unsigned
int
code
,
CardData
*
pData
);
bool
GetData
(
unsigned
int
code
,
CardData
*
pData
);
code_pointer
GetCodePointer
(
unsigned
int
code
)
const
;
code_pointer
GetCodePointer
(
unsigned
int
code
)
const
;
string_pointer
GetStringPointer
(
unsigned
int
code
)
const
;
string_pointer
GetStringPointer
(
unsigned
int
code
)
const
;
bool
GetString
(
int
code
,
CardString
*
pStr
);
bool
GetString
(
unsigned
int
code
,
CardString
*
pStr
);
const
wchar_t
*
GetName
(
int
code
);
const
wchar_t
*
GetName
(
unsigned
int
code
);
const
wchar_t
*
GetText
(
int
code
);
const
wchar_t
*
GetText
(
unsigned
int
code
);
const
wchar_t
*
GetDesc
(
unsigned
int
strCode
);
const
wchar_t
*
GetDesc
(
unsigned
int
strCode
);
const
wchar_t
*
GetSysString
(
int
code
);
const
wchar_t
*
GetSysString
(
int
code
);
const
wchar_t
*
GetVictoryString
(
int
code
);
const
wchar_t
*
GetVictoryString
(
int
code
);
...
...
gframe/deck_con.cpp
View file @
e546041d
...
@@ -94,6 +94,7 @@ void DeckBuilder::Terminate() {
...
@@ -94,6 +94,7 @@ void DeckBuilder::Terminate() {
mainGame
->
btnBigCardZoomIn
->
setVisible
(
false
);
mainGame
->
btnBigCardZoomIn
->
setVisible
(
false
);
mainGame
->
btnBigCardZoomOut
->
setVisible
(
false
);
mainGame
->
btnBigCardZoomOut
->
setVisible
(
false
);
mainGame
->
btnBigCardClose
->
setVisible
(
false
);
mainGame
->
btnBigCardClose
->
setVisible
(
false
);
mainGame
->
ResizeChatInputWindow
();
mainGame
->
PopupElement
(
mainGame
->
wMainMenu
);
mainGame
->
PopupElement
(
mainGame
->
wMainMenu
);
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
menuHandler
);
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
menuHandler
);
mainGame
->
wACMessage
->
setVisible
(
false
);
mainGame
->
wACMessage
->
setVisible
(
false
);
...
...
gframe/deck_con.h
View file @
e546041d
...
@@ -41,49 +41,49 @@ public:
...
@@ -41,49 +41,49 @@ public:
void
pop_side
(
int
seq
);
void
pop_side
(
int
seq
);
bool
check_limit
(
code_pointer
pointer
);
bool
check_limit
(
code_pointer
pointer
);
long
long
filter_effect
;
long
long
filter_effect
{}
;
unsigned
int
filter_type
;
unsigned
int
filter_type
{}
;
unsigned
int
filter_type2
;
unsigned
int
filter_type2
{}
;
unsigned
int
filter_attrib
;
unsigned
int
filter_attrib
{}
;
unsigned
int
filter_race
;
unsigned
int
filter_race
{}
;
unsigned
int
filter_atktype
;
unsigned
int
filter_atktype
{}
;
int
filter_atk
;
int
filter_atk
{}
;
unsigned
int
filter_deftype
;
unsigned
int
filter_deftype
{}
;
int
filter_def
;
int
filter_def
{}
;
unsigned
int
filter_lvtype
;
unsigned
int
filter_lvtype
{}
;
unsigned
int
filter_lv
;
unsigned
int
filter_lv
{}
;
unsigned
int
filter_scltype
;
unsigned
int
filter_scltype
{}
;
unsigned
int
filter_scl
;
unsigned
int
filter_scl
{}
;
unsigned
int
filter_marks
;
unsigned
int
filter_marks
{}
;
int
filter_lm
;
int
filter_lm
{}
;
position2di
mouse_pos
;
position2di
mouse_pos
;
int
hovered_code
;
int
hovered_code
{}
;
int
hovered_pos
;
int
hovered_pos
{}
;
int
hovered_seq
;
int
hovered_seq
{
-
1
}
;
int
is_lastcard
;
int
is_lastcard
{}
;
int
click_pos
;
int
click_pos
{}
;
bool
is_draging
;
bool
is_draging
{}
;
bool
is_starting_dragging
;
bool
is_starting_dragging
{}
;
int
dragx
;
int
dragx
{}
;
int
dragy
;
int
dragy
{}
;
int
bigcard_code
;
int
bigcard_code
{}
;
float
bigcard_zoom
;
float
bigcard_zoom
{}
;
size_t
pre_mainc
;
size_t
pre_mainc
{}
;
size_t
pre_extrac
;
size_t
pre_extrac
{}
;
size_t
pre_sidec
;
size_t
pre_sidec
{}
;
code_pointer
draging_pointer
;
code_pointer
draging_pointer
;
int
prev_category
;
int
prev_category
{}
;
int
prev_deck
;
int
prev_deck
{}
;
s32
prev_operation
;
s32
prev_operation
{}
;
int
prev_sel
;
int
prev_sel
{
-
1
}
;
bool
is_modified
;
bool
is_modified
{}
;
bool
readonly
;
bool
readonly
{}
;
bool
showing_pack
;
bool
showing_pack
{}
;
mt19937
rnd
;
mt19937
rnd
;
const
std
::
unordered_map
<
int
,
int
>*
filterList
;
const
std
::
unordered_map
<
int
,
int
>*
filterList
;
std
::
vector
<
code_pointer
>
results
;
std
::
vector
<
code_pointer
>
results
;
wchar_t
result_string
[
8
];
wchar_t
result_string
[
8
]
{}
;
std
::
vector
<
std
::
wstring
>
expansionPacks
;
std
::
vector
<
std
::
wstring
>
expansionPacks
;
};
};
...
...
gframe/deck_manager.cpp
View file @
e546041d
...
@@ -6,21 +6,22 @@
...
@@ -6,21 +6,22 @@
namespace
ygo
{
namespace
ygo
{
char
DeckManager
::
deckBuffer
[
0x10000
];
char
DeckManager
::
deckBuffer
[
0x10000
]
{}
;
DeckManager
deckManager
;
DeckManager
deckManager
;
void
DeckManager
::
LoadLFListSingle
(
const
char
*
path
)
{
void
DeckManager
::
LoadLFListSingle
(
const
char
*
path
)
{
LFList
*
cur
=
nullptr
;
LFList
*
cur
=
nullptr
;
FILE
*
fp
=
fopen
(
path
,
"r"
);
FILE
*
fp
=
fopen
(
path
,
"r"
);
char
linebuf
[
256
];
char
linebuf
[
256
]
{}
;
wchar_t
strBuffer
[
256
];
wchar_t
strBuffer
[
256
]
{}
;
if
(
fp
)
{
if
(
fp
)
{
while
(
fgets
(
linebuf
,
256
,
fp
))
{
while
(
fgets
(
linebuf
,
256
,
fp
))
{
if
(
linebuf
[
0
]
==
'#'
)
if
(
linebuf
[
0
]
==
'#'
)
continue
;
continue
;
if
(
linebuf
[
0
]
==
'!'
)
{
if
(
linebuf
[
0
]
==
'!'
)
{
int
sa
=
BufferIO
::
DecodeUTF8
(
&
linebuf
[
1
],
strBuffer
);
int
sa
=
BufferIO
::
DecodeUTF8
(
&
linebuf
[
1
],
strBuffer
);
while
(
strBuffer
[
sa
-
1
]
==
L'\r'
||
strBuffer
[
sa
-
1
]
==
L'\n'
)
sa
--
;
while
(
strBuffer
[
sa
-
1
]
==
L'\r'
||
strBuffer
[
sa
-
1
]
==
L'\n'
)
sa
--
;
strBuffer
[
sa
]
=
0
;
strBuffer
[
sa
]
=
0
;
LFList
newlist
;
LFList
newlist
;
_lfList
.
push_back
(
newlist
);
_lfList
.
push_back
(
newlist
);
...
@@ -29,20 +30,18 @@ void DeckManager::LoadLFListSingle(const char* path) {
...
@@ -29,20 +30,18 @@ void DeckManager::LoadLFListSingle(const char* path) {
cur
->
hash
=
0x7dfcee6a
;
cur
->
hash
=
0x7dfcee6a
;
continue
;
continue
;
}
}
int
p
=
0
;
if
(
linebuf
[
0
]
==
0
)
while
(
linebuf
[
p
]
!=
' '
&&
linebuf
[
p
]
!=
'\t'
&&
linebuf
[
p
]
!=
0
)
p
++
;
if
(
linebuf
[
p
]
==
0
)
continue
;
continue
;
linebuf
[
p
++
]
=
0
;
int
code
=
0
;
int
sa
=
p
;
int
count
=
-
1
;
int
code
=
atoi
(
linebuf
);
if
(
sscanf
(
linebuf
,
"%d %d"
,
&
code
,
&
count
)
!=
2
)
if
(
code
==
0
)
continue
;
if
(
code
<=
0
||
code
>
99999999
)
continue
;
if
(
count
<
0
||
count
>
2
)
continue
;
if
(
!
cur
)
continue
;
continue
;
while
(
linebuf
[
p
]
==
' '
||
linebuf
[
p
]
==
'\t'
)
p
++
;
while
(
linebuf
[
p
]
!=
' '
&&
linebuf
[
p
]
!=
'\t'
&&
linebuf
[
p
]
!=
0
)
p
++
;
linebuf
[
p
]
=
0
;
int
count
=
atoi
(
&
linebuf
[
sa
]);
if
(
!
cur
)
continue
;
cur
->
content
[
code
]
=
count
;
cur
->
content
[
code
]
=
count
;
cur
->
hash
=
cur
->
hash
^
((
code
<<
18
)
|
(
code
>>
14
))
^
((
code
<<
(
27
+
count
))
|
(
code
>>
(
5
-
count
)));
cur
->
hash
=
cur
->
hash
^
((
code
<<
18
)
|
(
code
>>
14
))
^
((
code
<<
(
27
+
count
))
|
(
code
>>
(
5
-
count
)));
}
}
...
...
gframe/deck_manager.h
View file @
e546041d
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
namespace
ygo
{
namespace
ygo
{
struct
LFList
{
struct
LFList
{
unsigned
int
hash
;
unsigned
int
hash
{}
;
std
::
wstring
listName
;
std
::
wstring
listName
;
std
::
unordered_map
<
int
,
int
>
content
;
std
::
unordered_map
<
int
,
int
>
content
;
};
};
...
...
gframe/drawing.cpp
View file @
e546041d
...
@@ -1065,26 +1065,40 @@ void Game::DrawSpec() {
...
@@ -1065,26 +1065,40 @@ void Game::DrawSpec() {
showChat
=
false
;
showChat
=
false
;
hideChatTimer
--
;
hideChatTimer
--
;
}
}
int
chatRectY
=
0
;
for
(
int
i
=
0
;
i
<
8
;
++
i
)
{
for
(
int
i
=
0
;
i
<
8
;
++
i
)
{
static
unsigned
int
chatColor
[]
=
{
0xffffffff
,
0xffffffff
,
0xffffffff
,
0xffffffff
,
0xffffffff
,
0xffffffff
,
0xffffffff
,
0xffffffff
,
0xff8080ff
,
0xffff4040
,
0xffff4040
,
static
unsigned
int
chatColor
[]
=
{
0xffffffff
,
0xffffffff
,
0xffffffff
,
0xffffffff
,
0xffffffff
,
0xffffffff
,
0xffffffff
,
0xffffffff
,
0xff8080ff
,
0xffff4040
,
0xffff4040
,
0xffff4040
,
0xff40ff40
,
0xff4040ff
,
0xff40ffff
,
0xffff40ff
,
0xffffff40
,
0xffffffff
,
0xff808080
,
0xff404040
};
0xffff4040
,
0xff40ff40
,
0xff4040ff
,
0xff40ffff
,
0xffff40ff
,
0xffffff40
,
0xffffffff
,
0xff808080
,
0xff404040
};
if
(
chatTiming
[
i
])
{
if
(
chatTiming
[
i
])
{
chatTiming
[
i
]
--
;
chatTiming
[
i
]
--
;
if
(
mainGame
->
dInfo
.
isStarted
&&
i
>=
5
)
if
(
!
is_building
)
{
continue
;
if
(
dInfo
.
isStarted
&&
i
>=
5
)
if
(
!
showChat
&&
i
>
2
)
continue
;
continue
;
if
(
!
showChat
&&
i
>
2
)
int
w
=
guiFont
->
getDimension
(
chatMsg
[
i
].
c_str
()).
Width
;
continue
;
}
int
x
=
wChat
->
getRelativePosition
().
UpperLeftCorner
.
X
;
int
y
=
window_size
.
Height
-
25
;
int
maxwidth
=
705
*
xScale
;
if
(
is_building
)
{
x
=
810
*
xScale
;
maxwidth
=
205
*
xScale
;
}
std
::
wstring
msg
=
SetStaticText
(
nullptr
,
maxwidth
,
guiFont
,
chatMsg
[
i
].
c_str
());
int
w
=
guiFont
->
getDimension
(
msg
).
Width
;
int
h
=
guiFont
->
getDimension
(
msg
).
Height
+
2
;
recti
rectloc
(
mainGame
->
wChat
->
getRelativePosition
().
UpperLeftCorner
.
X
,
mainGame
->
window_size
.
Height
-
45
,
mainGame
->
wChat
->
getRelativePosition
().
UpperLeftCorner
.
X
+
2
+
w
,
mainGame
->
window_size
.
Height
-
25
);
recti
rectloc
(
x
,
y
-
chatRectY
-
h
,
x
+
2
+
w
,
y
-
chatRectY
);
rectloc
-=
position2di
(
0
,
i
*
20
);
recti
msgloc
(
x
,
y
-
chatRectY
-
h
,
x
-
4
,
y
-
chatRectY
);
recti
msgloc
(
mainGame
->
wChat
->
getRelativePosition
().
UpperLeftCorner
.
X
,
mainGame
->
window_size
.
Height
-
45
,
mainGame
->
wChat
->
getRelativePosition
().
UpperLeftCorner
.
X
-
4
,
mainGame
->
window_size
.
Height
-
25
);
msgloc
-=
position2di
(
0
,
i
*
20
);
recti
shadowloc
=
msgloc
+
position2di
(
1
,
1
);
recti
shadowloc
=
msgloc
+
position2di
(
1
,
1
);
driver
->
draw2DRectangle
(
rectloc
,
0xa0000000
,
0xa0000000
,
0xa0000000
,
0xa0000000
);
driver
->
draw2DRectangle
(
rectloc
,
0xa0000000
,
0xa0000000
,
0xa0000000
,
0xa0000000
);
guiFont
->
draw
(
chatMsg
[
i
].
c_str
(),
msgloc
,
0xff000000
,
false
,
false
);
guiFont
->
draw
(
msg
.
c_str
(),
msgloc
,
0xff000000
,
false
,
false
);
guiFont
->
draw
(
chatMsg
[
i
].
c_str
(),
shadowloc
,
chatColor
[
chatType
[
i
]],
false
,
false
);
guiFont
->
draw
(
msg
.
c_str
(),
shadowloc
,
chatColor
[
chatType
[
i
]],
false
,
false
);
chatRectY
+=
h
;
}
}
}
}
}
}
...
@@ -1366,13 +1380,19 @@ void Game::DrawDeckBd() {
...
@@ -1366,13 +1380,19 @@ void Game::DrawDeckBd() {
driver
->
draw2DRectangleOutline
(
Resize
(
313
+
i
*
dx
,
563
,
359
+
i
*
dx
,
629
));
driver
->
draw2DRectangleOutline
(
Resize
(
313
+
i
*
dx
,
563
,
359
+
i
*
dx
,
629
));
}
}
}
}
//search result
if
(
is_siding
)
{
driver
->
draw2DRectangle
(
Resize
(
805
,
137
,
926
,
157
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
// side chat background
driver
->
draw2DRectangleOutline
(
Resize
(
804
,
136
,
926
,
157
));
driver
->
draw2DRectangle
(
Resize
(
805
,
10
,
1020
,
630
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
DrawShadowText
(
textFont
,
dataManager
.
GetSysString
(
1333
),
Resize
(
810
,
137
,
915
,
157
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
driver
->
draw2DRectangleOutline
(
Resize
(
804
,
9
,
1020
,
630
));
DrawShadowText
(
numFont
,
deckBuilder
.
result_string
,
Resize
(
875
,
137
,
935
,
157
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
}
else
{
driver
->
draw2DRectangle
(
Resize
(
805
,
160
,
1020
,
630
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
//search result
driver
->
draw2DRectangleOutline
(
Resize
(
804
,
159
,
1020
,
630
));
driver
->
draw2DRectangle
(
Resize
(
805
,
137
,
926
,
157
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
804
,
136
,
926
,
157
));
DrawShadowText
(
textFont
,
dataManager
.
GetSysString
(
1333
),
Resize
(
810
,
137
,
915
,
157
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
DrawShadowText
(
numFont
,
deckBuilder
.
result_string
,
Resize
(
875
,
137
,
935
,
157
),
Resize
(
1
,
1
,
1
,
1
),
0xffffffff
,
0xff000000
,
false
,
true
);
driver
->
draw2DRectangle
(
Resize
(
805
,
160
,
1020
,
630
),
0x400000ff
,
0x400000ff
,
0x40000000
,
0x40000000
);
driver
->
draw2DRectangleOutline
(
Resize
(
804
,
159
,
1020
,
630
));
}
for
(
size_t
i
=
0
;
i
<
9
&&
i
+
scrFilter
->
getPos
()
<
deckBuilder
.
results
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
9
&&
i
+
scrFilter
->
getPos
()
<
deckBuilder
.
results
.
size
();
++
i
)
{
code_pointer
ptr
=
deckBuilder
.
results
[
i
+
scrFilter
->
getPos
()];
code_pointer
ptr
=
deckBuilder
.
results
[
i
+
scrFilter
->
getPos
()];
if
(
i
>=
7
)
if
(
i
>=
7
)
...
...
gframe/duelclient.cpp
View file @
e546041d
This diff is collapsed.
Click to expand it.
gframe/duelclient.h
View file @
e546041d
...
@@ -62,7 +62,6 @@ private:
...
@@ -62,7 +62,6 @@ private:
static
unsigned
char
response_buf
[
SIZE_RETURN_VALUE
];
static
unsigned
char
response_buf
[
SIZE_RETURN_VALUE
];
static
unsigned
int
response_len
;
static
unsigned
int
response_len
;
static
unsigned
int
watching
;
static
unsigned
int
watching
;
static
unsigned
char
selftype
;
static
bool
is_host
;
static
bool
is_host
;
static
event_base
*
client_base
;
static
event_base
*
client_base
;
static
bufferevent
*
client_bev
;
static
bufferevent
*
client_bev
;
...
@@ -82,7 +81,7 @@ public:
...
@@ -82,7 +81,7 @@ public:
static
unsigned
short
temp_port
;
static
unsigned
short
temp_port
;
static
unsigned
short
temp_ver
;
static
unsigned
short
temp_ver
;
static
bool
try_needed
;
static
bool
try_needed
;
static
unsigned
char
selftype
;
static
bool
StartClient
(
unsigned
int
ip
,
unsigned
short
port
,
bool
create_game
=
true
);
static
bool
StartClient
(
unsigned
int
ip
,
unsigned
short
port
,
bool
create_game
=
true
);
static
void
ConnectTimeout
(
evutil_socket_t
fd
,
short
events
,
void
*
arg
);
static
void
ConnectTimeout
(
evutil_socket_t
fd
,
short
events
,
void
*
arg
);
static
void
StopClient
(
bool
is_exiting
=
false
);
static
void
StopClient
(
bool
is_exiting
=
false
);
...
...
gframe/event_handler.cpp
View file @
e546041d
...
@@ -127,6 +127,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -127,6 +127,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if
(
mainGame
->
dInfo
.
player_type
==
7
)
{
if
(
mainGame
->
dInfo
.
player_type
==
7
)
{
DuelClient
::
StopClient
();
DuelClient
::
StopClient
();
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isInDuel
=
false
;
mainGame
->
dInfo
.
isFinished
=
false
;
mainGame
->
dInfo
.
isFinished
=
false
;
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
menuHandler
);
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
menuHandler
);
mainGame
->
CloseDuelWindow
();
mainGame
->
CloseDuelWindow
();
...
@@ -1947,7 +1948,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
...
@@ -1947,7 +1948,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
}
}
#endif
#endif
case
CHECKBOX_DISABLE_CHAT
:
{
case
CHECKBOX_DISABLE_CHAT
:
{
bool
show
=
!
mainGame
->
is_building
;
bool
show
=
(
mainGame
->
is_building
&&
!
mainGame
->
is_siding
)
?
false
:
true
;
mainGame
->
wChat
->
setVisible
(
show
);
mainGame
->
wChat
->
setVisible
(
show
);
/*
/*
if(!show)
if(!show)
...
...
gframe/game.cpp
View file @
e546041d
This diff is collapsed.
Click to expand it.
gframe/game.h
View file @
e546041d
...
@@ -93,7 +93,8 @@ struct Config {
...
@@ -93,7 +93,8 @@ struct Config {
struct
DuelInfo
{
struct
DuelInfo
{
bool
isStarted
{
false
};
bool
isStarted
{
false
};
bool
isFinished
{
false
};
bool
isInDuel
{
false
};
bool
isFinished
{
false
};
bool
isReplay
{
false
};
bool
isReplay
{
false
};
bool
isReplaySkiping
{
false
};
bool
isReplaySkiping
{
false
};
bool
isFirst
{
false
};
bool
isFirst
{
false
};
...
@@ -196,7 +197,7 @@ public:
...
@@ -196,7 +197,7 @@ public:
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
AddLog
(
const
wchar_t
*
msg
,
int
param
=
0
);
void
AddChatMsg
(
const
wchar_t
*
msg
,
int
player
);
void
AddChatMsg
(
const
wchar_t
*
msg
,
int
player
,
bool
play_sound
=
false
);
void
ClearChatMsg
();
void
ClearChatMsg
();
void
AddDebugMsg
(
const
char
*
msgbuf
);
void
AddDebugMsg
(
const
char
*
msgbuf
);
void
ErrorLog
(
const
char
*
msgbuf
);
void
ErrorLog
(
const
char
*
msgbuf
);
...
@@ -206,7 +207,9 @@ public:
...
@@ -206,7 +207,9 @@ public:
void
CloseGameWindow
();
void
CloseGameWindow
();
void
CloseDuelWindow
();
void
CloseDuelWindow
();
int
LocalPlayer
(
int
player
);
int
LocalPlayer
(
int
player
)
const
;
int
OppositePlayer
(
int
player
);
int
ChatLocalPlayer
(
int
player
);
const
wchar_t
*
LocalName
(
int
local_player
);
const
wchar_t
*
LocalName
(
int
local_player
);
const
char
*
GetLocaleDir
(
const
char
*
dir
);
const
char
*
GetLocaleDir
(
const
char
*
dir
);
const
wchar_t
*
GetLocaleDirWide
(
const
char
*
dir
);
const
wchar_t
*
GetLocaleDirWide
(
const
char
*
dir
);
...
@@ -224,6 +227,7 @@ public:
...
@@ -224,6 +227,7 @@ public:
}
}
void
OnResize
();
void
OnResize
();
void
ResizeChatInputWindow
();
recti
Resize
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
);
recti
Resize
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
);
recti
Resize
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
,
s32
dx
,
s32
dy
,
s32
dx2
,
s32
dy2
);
recti
Resize
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
,
s32
dx
,
s32
dy
,
s32
dx2
,
s32
dy2
);
position2di
Resize
(
s32
x
,
s32
y
);
position2di
Resize
(
s32
x
,
s32
y
);
...
...
gframe/gframe.cpp
View file @
e546041d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#import <CoreFoundation/CoreFoundation.h>
#import <CoreFoundation/CoreFoundation.h>
#endif
#endif
int
enable_log
=
0
;
unsigned
int
enable_log
=
0x3
;
bool
exit_on_return
=
false
;
bool
exit_on_return
=
false
;
bool
auto_watch_mode
=
false
;
bool
auto_watch_mode
=
false
;
bool
open_file
=
false
;
bool
open_file
=
false
;
...
...
gframe/replay_mode.cpp
View file @
e546041d
...
@@ -262,6 +262,7 @@ void ReplayMode::EndDuel() {
...
@@ -262,6 +262,7 @@ void ReplayMode::EndDuel() {
}
}
mainGame
->
gMutex
.
lock
();
mainGame
->
gMutex
.
lock
();
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isInDuel
=
false
;
mainGame
->
dInfo
.
isFinished
=
true
;
mainGame
->
dInfo
.
isFinished
=
true
;
mainGame
->
dInfo
.
isReplay
=
false
;
mainGame
->
dInfo
.
isReplay
=
false
;
mainGame
->
dInfo
.
isSingleMode
=
false
;
mainGame
->
dInfo
.
isSingleMode
=
false
;
...
@@ -280,7 +281,9 @@ void ReplayMode::EndDuel() {
...
@@ -280,7 +281,9 @@ void ReplayMode::EndDuel() {
}
}
void
ReplayMode
::
Restart
(
bool
refresh
)
{
void
ReplayMode
::
Restart
(
bool
refresh
)
{
end_duel
(
pduel
);
end_duel
(
pduel
);
mainGame
->
dInfo
.
isInDuel
=
false
;
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isInDuel
=
false
;
mainGame
->
dInfo
.
isFinished
=
true
;
mainGame
->
dInfo
.
isFinished
=
true
;
mainGame
->
dField
.
Clear
();
mainGame
->
dField
.
Clear
();
//mainGame->device->setEventReceiver(&mainGame->dField);
//mainGame->device->setEventReceiver(&mainGame->dField);
...
@@ -370,141 +373,141 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
...
@@ -370,141 +373,141 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
return
false
;
return
false
;
}
}
case
MSG_SELECT_BATTLECMD
:
{
case
MSG_SELECT_BATTLECMD
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
11
;
pbuf
+=
count
*
11
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
8
+
2
;
pbuf
+=
count
*
8
+
2
;
ReplayRefresh
();
ReplayRefresh
();
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SELECT_IDLECMD
:
{
case
MSG_SELECT_IDLECMD
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
pbuf
+=
count
*
7
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
pbuf
+=
count
*
7
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
pbuf
+=
count
*
7
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
pbuf
+=
count
*
7
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
pbuf
+=
count
*
7
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
11
+
3
;
pbuf
+=
count
*
11
+
3
;
ReplayRefresh
();
ReplayRefresh
();
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SELECT_EFFECTYN
:
{
case
MSG_SELECT_EFFECTYN
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
12
;
pbuf
+=
12
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SELECT_YESNO
:
{
case
MSG_SELECT_YESNO
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
;
pbuf
+=
4
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SELECT_OPTION
:
{
case
MSG_SELECT_OPTION
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
4
;
pbuf
+=
count
*
4
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SELECT_CARD
:
case
MSG_SELECT_CARD
:
case
MSG_SELECT_TRIBUTE
:
{
case
MSG_SELECT_TRIBUTE
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
3
;
pbuf
+=
3
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
8
;
pbuf
+=
count
*
8
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SELECT_UNSELECT_CARD
:
{
case
MSG_SELECT_UNSELECT_CARD
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
;
pbuf
+=
4
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
8
;
pbuf
+=
count
*
8
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
8
;
pbuf
+=
count
*
8
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SELECT_CHAIN
:
{
case
MSG_SELECT_CHAIN
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
10
+
count
*
13
;
pbuf
+=
10
+
count
*
13
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SELECT_PLACE
:
case
MSG_SELECT_PLACE
:
case
MSG_SELECT_DISFIELD
:
{
case
MSG_SELECT_DISFIELD
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
5
;
pbuf
+=
5
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SELECT_POSITION
:
{
case
MSG_SELECT_POSITION
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
5
;
pbuf
+=
5
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SELECT_COUNTER
:
{
case
MSG_SELECT_COUNTER
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
;
pbuf
+=
4
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
9
;
pbuf
+=
count
*
9
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SELECT_SUM
:
{
case
MSG_SELECT_SUM
:
{
pbuf
++
;
pbuf
++
;
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
6
;
pbuf
+=
6
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
11
;
pbuf
+=
count
*
11
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
11
;
pbuf
+=
count
*
11
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_SORT_CARD
:
{
case
MSG_SORT_CARD
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
pbuf
+=
count
*
7
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_CONFIRM_DECKTOP
:
{
case
MSG_CONFIRM_DECKTOP
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
pbuf
+=
count
*
7
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
break
;
}
}
case
MSG_CONFIRM_EXTRATOP
:
{
case
MSG_CONFIRM_EXTRATOP
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
pbuf
+=
count
*
7
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
break
;
}
}
case
MSG_CONFIRM_CARDS
:
{
case
MSG_CONFIRM_CARDS
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
pbuf
+=
count
*
7
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
break
;
}
}
case
MSG_SHUFFLE_DECK
:
{
case
MSG_SHUFFLE_DECK
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
ReplayRefreshDeck
(
player
);
ReplayRefreshDeck
(
player
);
break
;
break
;
}
}
case
MSG_SHUFFLE_HAND
:
{
case
MSG_SHUFFLE_HAND
:
{
/*int oplayer = */
BufferIO
::
ReadInt8
(
pbuf
);
/*int oplayer = */
BufferIO
::
Read
U
Int8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
4
;
pbuf
+=
count
*
4
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
break
;
}
}
case
MSG_SHUFFLE_EXTRA
:
{
case
MSG_SHUFFLE_EXTRA
:
{
/*int oplayer = */
BufferIO
::
ReadInt8
(
pbuf
);
/*int oplayer = */
BufferIO
::
Read
U
Int8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
4
;
pbuf
+=
count
*
4
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
break
;
...
@@ -515,7 +518,7 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
...
@@ -515,7 +518,7 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
break
;
break
;
}
}
case
MSG_SWAP_GRAVE_DECK
:
{
case
MSG_SWAP_GRAVE_DECK
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
ReplayRefreshGrave
(
player
);
ReplayRefreshGrave
(
player
);
break
;
break
;
...
@@ -533,7 +536,7 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
...
@@ -533,7 +536,7 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
}
}
case
MSG_SHUFFLE_SET_CARD
:
{
case
MSG_SHUFFLE_SET_CARD
:
{
pbuf
++
;
pbuf
++
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
8
;
pbuf
+=
count
*
8
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
break
;
...
@@ -547,7 +550,7 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
...
@@ -547,7 +550,7 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
mainGame
->
gMutex
.
unlock
();
mainGame
->
gMutex
.
unlock
();
}
}
}
}
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
break
;
}
}
...
@@ -671,22 +674,22 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
...
@@ -671,22 +674,22 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
}
}
case
MSG_CARD_SELECTED
:
case
MSG_CARD_SELECTED
:
case
MSG_RANDOM_SELECTED
:
{
case
MSG_RANDOM_SELECTED
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
4
;
pbuf
+=
count
*
4
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
pauseable
=
false
;
pauseable
=
false
;
break
;
break
;
}
}
case
MSG_BECOME_TARGET
:
{
case
MSG_BECOME_TARGET
:
{
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
4
;
pbuf
+=
count
*
4
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
break
;
}
}
case
MSG_DRAW
:
{
case
MSG_DRAW
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
4
;
pbuf
+=
count
*
4
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
break
;
...
@@ -779,21 +782,21 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
...
@@ -779,21 +782,21 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
break
;
break
;
}
}
case
MSG_TOSS_COIN
:
{
case
MSG_TOSS_COIN
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
;
pbuf
+=
count
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
break
;
}
}
case
MSG_TOSS_DICE
:
{
case
MSG_TOSS_DICE
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
;
pbuf
+=
count
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
break
;
}
}
case
MSG_ROCK_PAPER_SCISSORS
:
{
case
MSG_ROCK_PAPER_SCISSORS
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_HAND_RES
:
{
case
MSG_HAND_RES
:
{
...
@@ -802,18 +805,18 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
...
@@ -802,18 +805,18 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
break
;
break
;
}
}
case
MSG_ANNOUNCE_RACE
:
{
case
MSG_ANNOUNCE_RACE
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
5
;
pbuf
+=
5
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_ANNOUNCE_ATTRIB
:
{
case
MSG_ANNOUNCE_ATTRIB
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
5
;
pbuf
+=
5
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
}
}
case
MSG_ANNOUNCE_CARD
:
case
MSG_ANNOUNCE_CARD
:
case
MSG_ANNOUNCE_NUMBER
:
{
case
MSG_ANNOUNCE_NUMBER
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
ReadUInt8
(
pbuf
);
count
=
BufferIO
::
ReadUInt8
(
pbuf
);
pbuf
+=
4
*
count
;
pbuf
+=
4
*
count
;
return
ReadReplayResponse
();
return
ReadReplayResponse
();
...
@@ -845,12 +848,12 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
...
@@ -845,12 +848,12 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
for
(
int
p
=
0
;
p
<
2
;
++
p
)
{
for
(
int
p
=
0
;
p
<
2
;
++
p
)
{
pbuf
+=
4
;
pbuf
+=
4
;
for
(
int
seq
=
0
;
seq
<
7
;
++
seq
)
{
for
(
int
seq
=
0
;
seq
<
7
;
++
seq
)
{
int
val
=
BufferIO
::
ReadInt8
(
pbuf
);
int
val
=
BufferIO
::
Read
U
Int8
(
pbuf
);
if
(
val
)
if
(
val
)
pbuf
+=
2
;
pbuf
+=
2
;
}
}
for
(
int
seq
=
0
;
seq
<
8
;
++
seq
)
{
for
(
int
seq
=
0
;
seq
<
8
;
++
seq
)
{
int
val
=
BufferIO
::
ReadInt8
(
pbuf
);
int
val
=
BufferIO
::
Read
U
Int8
(
pbuf
);
if
(
val
)
if
(
val
)
pbuf
++
;
pbuf
++
;
}
}
...
...
gframe/single_duel.cpp
View file @
e546041d
This diff is collapsed.
Click to expand it.
gframe/single_mode.cpp
View file @
e546041d
This diff is collapsed.
Click to expand it.
gframe/tag_duel.cpp
View file @
e546041d
This diff is collapsed.
Click to expand it.
premake5.lua
View file @
e546041d
...
@@ -255,7 +255,7 @@ workspace "YGOPro"
...
@@ -255,7 +255,7 @@ workspace "YGOPro"
filter
{
"configurations:Release"
,
"action:vs*"
}
filter
{
"configurations:Release"
,
"action:vs*"
}
flags
{
"LinkTimeOptimization"
}
flags
{
"LinkTimeOptimization"
}
staticruntime
"On"
staticruntime
"On"
disablewarnings
{
"4244"
,
"4267"
,
"4838"
,
"4577"
,
"4
819"
,
"4018"
,
"4996"
,
"4477"
,
"4091"
,
"4828
"
,
"4800"
,
"6011"
,
"6031"
,
"6054"
,
"6262"
}
disablewarnings
{
"4244"
,
"4267"
,
"4838"
,
"4577"
,
"4
018"
,
"4996"
,
"4477"
,
"4091
"
,
"4800"
,
"6011"
,
"6031"
,
"6054"
,
"6262"
}
filter
{
"configurations:Release"
,
"not action:vs*"
}
filter
{
"configurations:Release"
,
"not action:vs*"
}
symbols
"On"
symbols
"On"
...
@@ -265,7 +265,7 @@ workspace "YGOPro"
...
@@ -265,7 +265,7 @@ workspace "YGOPro"
end
end
filter
{
"configurations:Debug"
,
"action:vs*"
}
filter
{
"configurations:Debug"
,
"action:vs*"
}
disablewarnings
{
"
4819"
,
"4828"
,
"
6011"
,
"6031"
,
"6054"
,
"6262"
}
disablewarnings
{
"6011"
,
"6031"
,
"6054"
,
"6262"
}
filter
"action:vs*"
filter
"action:vs*"
vectorextensions
"SSE2"
vectorextensions
"SSE2"
...
...
strings.conf
View file @
e546041d
...
@@ -665,6 +665,8 @@
...
@@ -665,6 +665,8 @@
!
counter
0
x68
指示物(图腾柱)
!
counter
0
x68
指示物(图腾柱)
!
counter
0
x69
指示物(吠陀-优婆尼沙昙)
!
counter
0
x69
指示物(吠陀-优婆尼沙昙)
!
counter
0
x6a
响鸣指示物
!
counter
0
x6a
响鸣指示物
!
counter
0
x6b
狂乱指示物
!
counter
0
x6c
访问指示物
#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
次世代 ジェネクス
...
@@ -1220,3 +1222,9 @@
...
@@ -1220,3 +1222,9 @@
!
setname
0
x1ab
蕾祸 蕾禍
!
setname
0
x1ab
蕾祸 蕾禍
!
setname
0
x1ac
飞龙炎
Salamandra
!
setname
0
x1ac
飞龙炎
Salamandra
!
setname
0
x1ad
灰尽
Ashened
!
setname
0
x1ad
灰尽
Ashened
!
setname
0
x1ae
千年 千年/ミレニアム
!
setname
0
x1af
艾格佐德 エグゾード
!
setname
0
x1b0
刻魔 デモンスミス
!
setname
0
x1b1
白森林 白き森
!
setname
0
x1b2
欢聚友伴 マルチャミー
!
setname
0
x1b3
徽记 エンブレーマ
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