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
nanahira
ygopro
Commits
3472f1a2
Commit
3472f1a2
authored
May 04, 2024
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'fh/master' into develop
parents
197fd3de
3d8c3621
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
748 additions
and
730 deletions
+748
-730
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/data_manager.cpp
gframe/data_manager.cpp
+5
-5
gframe/data_manager.h
gframe/data_manager.h
+5
-3
gframe/deck_con.h
gframe/deck_con.h
+37
-37
gframe/deck_manager.cpp
gframe/deck_manager.cpp
+1
-1
gframe/deck_manager.h
gframe/deck_manager.h
+1
-1
gframe/duelclient.cpp
gframe/duelclient.cpp
+368
-360
gframe/game.cpp
gframe/game.cpp
+4
-3
gframe/game.h
gframe/game.h
+1
-1
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+59
-59
gframe/single_duel.cpp
gframe/single_duel.cpp
+85
-85
gframe/single_mode.cpp
gframe/single_mode.cpp
+62
-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/bufferio.h
View file @
3472f1a2
#ifndef BUFFERIO_H
#define BUFFERIO_H
#ifdef _MSC_VER
#pragma warning(disable: 4244)
#endif
class
BufferIO
{
public:
...
...
@@ -53,7 +50,7 @@ public:
inline
static
int
CopyWStr
(
T1
*
src
,
T2
*
pstr
,
int
bufsize
)
{
int
l
=
0
;
while
(
src
[
l
]
&&
l
<
bufsize
-
1
)
{
pstr
[
l
]
=
src
[
l
];
pstr
[
l
]
=
(
T2
)
src
[
l
];
l
++
;
}
pstr
[
l
]
=
0
;
...
...
@@ -63,7 +60,7 @@ public:
inline
static
int
CopyWStrRef
(
T1
*
src
,
T2
*&
pstr
,
int
bufsize
)
{
int
l
=
0
;
while
(
src
[
l
]
&&
l
<
bufsize
-
1
)
{
pstr
[
l
]
=
src
[
l
];
pstr
[
l
]
=
(
T2
)
src
[
l
];
l
++
;
}
pstr
+=
l
;
...
...
@@ -75,7 +72,7 @@ public:
char
*
pstr
=
str
;
while
(
*
wsrc
!=
0
)
{
if
(
*
wsrc
<
0x80
)
{
*
str
=
*
wsrc
;
*
str
=
(
char
)
*
wsrc
;
++
str
;
}
else
if
(
*
wsrc
<
0x800
)
{
str
[
0
]
=
((
*
wsrc
>>
6
)
&
0x1f
)
|
0xc0
;
...
...
@@ -141,12 +138,14 @@ public:
return
wp
-
wstr
;
}
static
int
GetVal
(
const
wchar_t
*
pstr
)
{
int
ret
=
0
;
unsigned
int
ret
=
0
;
while
(
*
pstr
>=
L'0'
&&
*
pstr
<=
L'9'
)
{
ret
=
ret
*
10
+
(
*
pstr
-
L'0'
);
pstr
++
;
}
return
ret
;
if
(
*
pstr
==
0
)
return
(
int
)
ret
;
return
0
;
}
};
...
...
gframe/client_card.cpp
View file @
3472f1a2
...
...
@@ -113,10 +113,10 @@ void ClientCard::UpdateInfo(unsigned char* buf) {
if
(
flag
&
QUERY_REASON_CARD
)
buf
+=
4
;
if
(
flag
&
QUERY_EQUIP_CARD
)
{
int
c
=
BufferIO
::
ReadInt8
(
buf
);
int
l
=
BufferIO
::
Read
Int8
(
buf
);
int
s
=
BufferIO
::
ReadInt8
(
buf
);
BufferIO
::
ReadInt8
(
buf
);
int
c
=
BufferIO
::
Read
U
Int8
(
buf
);
unsigned
int
l
=
BufferIO
::
ReadU
Int8
(
buf
);
int
s
=
BufferIO
::
Read
U
Int8
(
buf
);
BufferIO
::
Read
U
Int8
(
buf
);
ClientCard
*
ecard
=
mainGame
->
dField
.
GetCard
(
mainGame
->
LocalPlayer
(
c
),
l
,
s
);
if
(
ecard
)
{
equipTarget
=
ecard
;
...
...
@@ -126,10 +126,10 @@ void ClientCard::UpdateInfo(unsigned char* buf) {
if
(
flag
&
QUERY_TARGET_CARD
)
{
int
count
=
BufferIO
::
ReadInt32
(
buf
);
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
int
c
=
BufferIO
::
ReadInt8
(
buf
);
int
l
=
BufferIO
::
Read
Int8
(
buf
);
int
s
=
BufferIO
::
ReadInt8
(
buf
);
BufferIO
::
ReadInt8
(
buf
);
int
c
=
BufferIO
::
Read
U
Int8
(
buf
);
unsigned
int
l
=
BufferIO
::
ReadU
Int8
(
buf
);
int
s
=
BufferIO
::
Read
U
Int8
(
buf
);
BufferIO
::
Read
U
Int8
(
buf
);
ClientCard
*
tcard
=
mainGame
->
dField
.
GetCard
(
mainGame
->
LocalPlayer
(
c
),
l
,
s
);
if
(
tcard
)
{
cardTarget
.
insert
(
tcard
);
...
...
gframe/client_field.cpp
View file @
3472f1a2
...
...
@@ -197,7 +197,7 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
case
LOCATION_DECK
:
{
if
(
sequence
!=
0
||
deck
[
controler
].
size
()
==
0
)
{
deck
[
controler
].
push_back
(
pcard
);
pcard
->
sequence
=
deck
[
controler
].
size
()
-
1
;
pcard
->
sequence
=
(
unsigned
char
)(
deck
[
controler
].
size
()
-
1
)
;
}
else
{
deck
[
controler
].
push_back
(
0
);
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
}
case
LOCATION_HAND
:
{
hand
[
controler
].
push_back
(
pcard
);
pcard
->
sequence
=
hand
[
controler
].
size
()
-
1
;
pcard
->
sequence
=
(
unsigned
char
)(
hand
[
controler
].
size
()
-
1
)
;
break
;
}
case
LOCATION_MZONE
:
{
...
...
@@ -225,18 +225,18 @@ void ClientField::AddCard(ClientCard* pcard, int controler, int location, int se
}
case
LOCATION_GRAVE
:
{
grave
[
controler
].
push_back
(
pcard
);
pcard
->
sequence
=
grave
[
controler
].
size
()
-
1
;
pcard
->
sequence
=
(
unsigned
char
)(
grave
[
controler
].
size
()
-
1
)
;
break
;
}
case
LOCATION_REMOVED
:
{
remove
[
controler
].
push_back
(
pcard
);
pcard
->
sequence
=
remove
[
controler
].
size
()
-
1
;
pcard
->
sequence
=
(
unsigned
char
)(
remove
[
controler
].
size
()
-
1
)
;
break
;
}
case
LOCATION_EXTRA
:
{
if
(
extra_p_count
[
controler
]
==
0
||
(
pcard
->
position
&
POS_FACEUP
))
{
extra
[
controler
].
push_back
(
pcard
);
pcard
->
sequence
=
extra
[
controler
].
size
()
-
1
;
pcard
->
sequence
=
(
unsigned
char
)(
extra
[
controler
].
size
()
-
1
)
;
}
else
{
extra
[
controler
].
push_back
(
0
);
int
p
=
extra
[
controler
].
size
()
-
extra_p_count
[
controler
]
-
1
;
...
...
gframe/data_manager.cpp
View file @
3472f1a2
...
...
@@ -197,7 +197,7 @@ code_pointer DataManager::GetCodePointer(unsigned int code) const {
string_pointer
DataManager
::
GetStringPointer
(
unsigned
int
code
)
const
{
return
_strings
.
find
(
code
);
}
bool
DataManager
::
GetString
(
int
code
,
CardString
*
pStr
)
{
bool
DataManager
::
GetString
(
unsigned
int
code
,
CardString
*
pStr
)
{
auto
csit
=
_strings
.
find
(
code
);
if
(
csit
==
_strings
.
end
())
{
pStr
->
name
=
unknown_string
;
...
...
@@ -207,7 +207,7 @@ bool DataManager::GetString(int code, CardString* pStr) {
*
pStr
=
csit
->
second
;
return
true
;
}
const
wchar_t
*
DataManager
::
GetName
(
int
code
)
{
const
wchar_t
*
DataManager
::
GetName
(
unsigned
int
code
)
{
auto
csit
=
_strings
.
find
(
code
);
if
(
csit
==
_strings
.
end
())
return
unknown_string
;
...
...
@@ -215,7 +215,7 @@ const wchar_t* DataManager::GetName(int code) {
return
csit
->
second
.
name
.
c_str
();
return
unknown_string
;
}
const
wchar_t
*
DataManager
::
GetText
(
int
code
)
{
const
wchar_t
*
DataManager
::
GetText
(
unsigned
int
code
)
{
auto
csit
=
_strings
.
find
(
code
);
if
(
csit
==
_strings
.
end
())
return
unknown_string
;
...
...
@@ -224,7 +224,7 @@ const wchar_t* DataManager::GetText(int code) {
return
unknown_string
;
}
const
wchar_t
*
DataManager
::
GetDesc
(
unsigned
int
strCode
)
{
if
(
strCode
<
10000u
)
if
(
strCode
<
(
MIN_CARD_ID
<<
4
)
)
return
GetSysString
(
strCode
);
unsigned
int
code
=
(
strCode
>>
4
)
&
0x0fffffff
;
unsigned
int
offset
=
strCode
&
0xf
;
...
...
@@ -236,7 +236,7 @@ const wchar_t* DataManager::GetDesc(unsigned int strCode) {
return
unknown_string
;
}
const
wchar_t
*
DataManager
::
GetSysString
(
int
code
)
{
if
(
code
<
0
||
code
>=
2048
)
if
(
code
<
0
||
code
>
MAX_STRING_ID
)
return
unknown_string
;
auto
csit
=
_sysStrings
.
find
(
code
);
if
(
csit
==
_sysStrings
.
end
())
...
...
gframe/data_manager.h
View file @
3472f1a2
...
...
@@ -8,6 +8,8 @@
#include <unordered_map>
namespace
ygo
{
constexpr
int
MAX_STRING_ID
=
0x7ff
;
constexpr
unsigned
int
MIN_CARD_ID
=
(
unsigned
int
)(
MAX_STRING_ID
+
1
)
>>
4
;
class
DataManager
{
public:
...
...
@@ -20,9 +22,9 @@ public:
bool
GetData
(
unsigned
int
code
,
CardData
*
pData
);
code_pointer
GetCodePointer
(
unsigned
int
code
)
const
;
string_pointer
GetStringPointer
(
unsigned
int
code
)
const
;
bool
GetString
(
int
code
,
CardString
*
pStr
);
const
wchar_t
*
GetName
(
int
code
);
const
wchar_t
*
GetText
(
int
code
);
bool
GetString
(
unsigned
int
code
,
CardString
*
pStr
);
const
wchar_t
*
GetName
(
unsigned
int
code
);
const
wchar_t
*
GetText
(
unsigned
int
code
);
const
wchar_t
*
GetDesc
(
unsigned
int
strCode
);
const
wchar_t
*
GetSysString
(
int
code
);
const
wchar_t
*
GetVictoryString
(
int
code
);
...
...
gframe/deck_con.h
View file @
3472f1a2
...
...
@@ -41,49 +41,49 @@ public:
void
pop_side
(
int
seq
);
bool
check_limit
(
code_pointer
pointer
);
long
long
filter_effect
;
unsigned
int
filter_type
;
unsigned
int
filter_type2
;
unsigned
int
filter_attrib
;
unsigned
int
filter_race
;
unsigned
int
filter_atktype
;
int
filter_atk
;
unsigned
int
filter_deftype
;
int
filter_def
;
unsigned
int
filter_lvtype
;
unsigned
int
filter_lv
;
unsigned
int
filter_scltype
;
unsigned
int
filter_scl
;
unsigned
int
filter_marks
;
int
filter_lm
;
long
long
filter_effect
{}
;
unsigned
int
filter_type
{}
;
unsigned
int
filter_type2
{}
;
unsigned
int
filter_attrib
{}
;
unsigned
int
filter_race
{}
;
unsigned
int
filter_atktype
{}
;
int
filter_atk
{}
;
unsigned
int
filter_deftype
{}
;
int
filter_def
{}
;
unsigned
int
filter_lvtype
{}
;
unsigned
int
filter_lv
{}
;
unsigned
int
filter_scltype
{}
;
unsigned
int
filter_scl
{}
;
unsigned
int
filter_marks
{}
;
int
filter_lm
{}
;
position2di
mouse_pos
;
int
hovered_code
;
int
hovered_pos
;
int
hovered_seq
;
int
is_lastcard
;
int
click_pos
;
bool
is_draging
;
bool
is_starting_dragging
;
int
dragx
;
int
dragy
;
int
bigcard_code
;
float
bigcard_zoom
;
size_t
pre_mainc
;
size_t
pre_extrac
;
size_t
pre_sidec
;
int
hovered_code
{}
;
int
hovered_pos
{}
;
int
hovered_seq
{
-
1
}
;
int
is_lastcard
{}
;
int
click_pos
{}
;
bool
is_draging
{}
;
bool
is_starting_dragging
{}
;
int
dragx
{}
;
int
dragy
{}
;
int
bigcard_code
{}
;
float
bigcard_zoom
{}
;
size_t
pre_mainc
{}
;
size_t
pre_extrac
{}
;
size_t
pre_sidec
{}
;
code_pointer
draging_pointer
;
int
prev_category
;
int
prev_deck
;
s32
prev_operation
;
int
prev_sel
;
bool
is_modified
;
bool
readonly
;
bool
showing_pack
;
int
prev_category
{}
;
int
prev_deck
{}
;
s32
prev_operation
{}
;
int
prev_sel
{
-
1
}
;
bool
is_modified
{}
;
bool
readonly
{}
;
bool
showing_pack
{}
;
mt19937
rnd
;
const
std
::
unordered_map
<
int
,
int
>*
filterList
;
std
::
vector
<
code_pointer
>
results
;
wchar_t
result_string
[
8
];
wchar_t
result_string
[
8
]
{}
;
std
::
vector
<
std
::
wstring
>
expansionPacks
;
};
...
...
gframe/deck_manager.cpp
View file @
3472f1a2
...
...
@@ -6,7 +6,7 @@
namespace
ygo
{
char
DeckManager
::
deckBuffer
[
0x10000
];
char
DeckManager
::
deckBuffer
[
0x10000
]
{}
;
DeckManager
deckManager
;
void
DeckManager
::
LoadLFListSingle
(
const
char
*
path
)
{
...
...
gframe/deck_manager.h
View file @
3472f1a2
...
...
@@ -10,7 +10,7 @@
namespace
ygo
{
struct
LFList
{
unsigned
int
hash
;
unsigned
int
hash
{}
;
std
::
wstring
listName
;
std
::
unordered_map
<
int
,
int
>
content
;
};
...
...
gframe/duelclient.cpp
View file @
3472f1a2
This diff is collapsed.
Click to expand it.
gframe/game.cpp
View file @
3472f1a2
...
...
@@ -1139,7 +1139,7 @@ void Game::MainLoop() {
SingleMode
::
StopPlay
(
true
);
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
milliseconds
(
500
));
SaveConfig
();
//
device->drop();
device
->
drop
();
}
void
Game
::
RefreshTimeDisplay
()
{
for
(
int
i
=
0
;
i
<
2
;
++
i
)
{
...
...
@@ -2078,8 +2078,9 @@ void Game::CloseDuelWindow() {
ClearTextures
();
closeDoneSignal
.
Set
();
}
int
Game
::
LocalPlayer
(
int
player
)
{
return
dInfo
.
isFirst
?
player
:
1
-
player
;
int
Game
::
LocalPlayer
(
int
player
)
const
{
int
pid
=
player
?
1
:
0
;
return
dInfo
.
isFirst
?
pid
:
1
-
pid
;
}
const
wchar_t
*
Game
::
LocalName
(
int
local_player
)
{
return
local_player
==
0
?
dInfo
.
hostname
:
dInfo
.
clientname
;
...
...
gframe/game.h
View file @
3472f1a2
...
...
@@ -206,7 +206,7 @@ public:
void
CloseGameWindow
();
void
CloseDuelWindow
();
int
LocalPlayer
(
int
player
);
int
LocalPlayer
(
int
player
)
const
;
const
wchar_t
*
LocalName
(
int
local_player
);
const
char
*
GetLocaleDir
(
const
char
*
dir
);
const
wchar_t
*
GetLocaleDirWide
(
const
char
*
dir
);
...
...
gframe/replay_mode.cpp
View file @
3472f1a2
...
...
@@ -370,141 +370,141 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
return
false
;
}
case
MSG_SELECT_BATTLECMD
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
11
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
8
+
2
;
ReplayRefresh
();
return
ReadReplayResponse
();
}
case
MSG_SELECT_IDLECMD
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
11
+
3
;
ReplayRefresh
();
return
ReadReplayResponse
();
}
case
MSG_SELECT_EFFECTYN
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
12
;
return
ReadReplayResponse
();
}
case
MSG_SELECT_YESNO
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
;
return
ReadReplayResponse
();
}
case
MSG_SELECT_OPTION
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
4
;
return
ReadReplayResponse
();
}
case
MSG_SELECT_CARD
:
case
MSG_SELECT_TRIBUTE
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
3
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
8
;
return
ReadReplayResponse
();
}
case
MSG_SELECT_UNSELECT_CARD
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
8
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
8
;
return
ReadReplayResponse
();
}
case
MSG_SELECT_CHAIN
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
10
+
count
*
13
;
return
ReadReplayResponse
();
}
case
MSG_SELECT_PLACE
:
case
MSG_SELECT_DISFIELD
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
5
;
return
ReadReplayResponse
();
}
case
MSG_SELECT_POSITION
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
5
;
return
ReadReplayResponse
();
}
case
MSG_SELECT_COUNTER
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
4
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
9
;
return
ReadReplayResponse
();
}
case
MSG_SELECT_SUM
:
{
pbuf
++
;
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
6
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
11
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
11
;
return
ReadReplayResponse
();
}
case
MSG_SORT_CARD
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
return
ReadReplayResponse
();
}
case
MSG_CONFIRM_DECKTOP
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
}
case
MSG_CONFIRM_EXTRATOP
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
}
case
MSG_CONFIRM_CARDS
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
7
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
}
case
MSG_SHUFFLE_DECK
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
ReplayRefreshDeck
(
player
);
break
;
}
case
MSG_SHUFFLE_HAND
:
{
/*int oplayer = */
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
/*int oplayer = */
BufferIO
::
Read
U
Int8
(
pbuf
);
int
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
4
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
}
case
MSG_SHUFFLE_EXTRA
:
{
/*int oplayer = */
BufferIO
::
ReadInt8
(
pbuf
);
int
count
=
BufferIO
::
ReadInt8
(
pbuf
);
/*int oplayer = */
BufferIO
::
Read
U
Int8
(
pbuf
);
int
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
4
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
...
...
@@ -515,7 +515,7 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
break
;
}
case
MSG_SWAP_GRAVE_DECK
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
ReplayRefreshGrave
(
player
);
break
;
...
...
@@ -533,7 +533,7 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
}
case
MSG_SHUFFLE_SET_CARD
:
{
pbuf
++
;
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
8
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
...
...
@@ -547,7 +547,7 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
mainGame
->
gMutex
.
unlock
();
}
}
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
}
...
...
@@ -671,22 +671,22 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
}
case
MSG_CARD_SELECTED
:
case
MSG_RANDOM_SELECTED
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
4
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
pauseable
=
false
;
break
;
}
case
MSG_BECOME_TARGET
:
{
count
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
4
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
}
case
MSG_DRAW
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
*
4
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
...
...
@@ -779,21 +779,21 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
break
;
}
case
MSG_TOSS_COIN
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
}
case
MSG_TOSS_DICE
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
count
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
count
;
DuelClient
::
ClientAnalyze
(
offset
,
pbuf
-
offset
);
break
;
}
case
MSG_ROCK_PAPER_SCISSORS
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
return
ReadReplayResponse
();
}
case
MSG_HAND_RES
:
{
...
...
@@ -802,18 +802,18 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
break
;
}
case
MSG_ANNOUNCE_RACE
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
5
;
return
ReadReplayResponse
();
}
case
MSG_ANNOUNCE_ATTRIB
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
pbuf
+=
5
;
return
ReadReplayResponse
();
}
case
MSG_ANNOUNCE_CARD
:
case
MSG_ANNOUNCE_NUMBER
:
{
player
=
BufferIO
::
ReadInt8
(
pbuf
);
player
=
BufferIO
::
Read
U
Int8
(
pbuf
);
count
=
BufferIO
::
ReadUInt8
(
pbuf
);
pbuf
+=
4
*
count
;
return
ReadReplayResponse
();
...
...
@@ -845,12 +845,12 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
for
(
int
p
=
0
;
p
<
2
;
++
p
)
{
pbuf
+=
4
;
for
(
int
seq
=
0
;
seq
<
7
;
++
seq
)
{
int
val
=
BufferIO
::
ReadInt8
(
pbuf
);
int
val
=
BufferIO
::
Read
U
Int8
(
pbuf
);
if
(
val
)
pbuf
+=
2
;
}
for
(
int
seq
=
0
;
seq
<
8
;
++
seq
)
{
int
val
=
BufferIO
::
ReadInt8
(
pbuf
);
int
val
=
BufferIO
::
Read
U
Int8
(
pbuf
);
if
(
val
)
pbuf
++
;
}
...
...
gframe/single_duel.cpp
View file @
3472f1a2
This diff is collapsed.
Click to expand it.
gframe/single_mode.cpp
View file @
3472f1a2
This diff is collapsed.
Click to expand it.
gframe/tag_duel.cpp
View file @
3472f1a2
This diff is collapsed.
Click to expand it.
premake5.lua
View file @
3472f1a2
...
...
@@ -255,7 +255,7 @@ workspace "YGOPro"
filter
{
"configurations:Release"
,
"action:vs*"
}
flags
{
"LinkTimeOptimization"
}
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*"
}
symbols
"On"
...
...
@@ -265,7 +265,7 @@ workspace "YGOPro"
end
filter
{
"configurations:Debug"
,
"action:vs*"
}
disablewarnings
{
"
4819"
,
"4828"
,
"
6011"
,
"6031"
,
"6054"
,
"6262"
}
disablewarnings
{
"6011"
,
"6031"
,
"6054"
,
"6262"
}
filter
"action:vs*"
vectorextensions
"SSE2"
...
...
strings.conf
View file @
3472f1a2
...
...
@@ -665,6 +665,8 @@
!
counter
0
x68
指示物(图腾柱)
!
counter
0
x69
指示物(吠陀-优婆尼沙昙)
!
counter
0
x6a
响鸣指示物
!
counter
0
x6b
狂乱指示物
!
counter
0
x6c
访问指示物
#setnames, using tab for comment
!
setname
0
x1
正义盟军
A
・
O
・
J
!
setname
0
x2
次世代 ジェネクス
...
...
@@ -1220,3 +1222,9 @@
!
setname
0
x1ab
蕾祸 蕾禍
!
setname
0
x1ac
飞龙炎
Salamandra
!
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