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
wyykak
ygopro
Commits
1a754caf
Commit
1a754caf
authored
Oct 25, 2017
by
edo9300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update
parent
05afcad7
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
169 additions
and
142 deletions
+169
-142
gframe/duelclient.cpp
gframe/duelclient.cpp
+112
-127
gframe/game.cpp
gframe/game.cpp
+39
-0
gframe/game.h
gframe/game.h
+1
-0
gframe/network.h
gframe/network.h
+17
-15
No files found.
gframe/duelclient.cpp
View file @
1a754caf
This diff is collapsed.
Click to expand it.
gframe/game.cpp
View file @
1a754caf
...
...
@@ -8,6 +8,7 @@
#include "duelclient.h"
#include "netserver.h"
#include "single_mode.h"
#include "../ocgcore/duel.h"
#include <sstream>
#include "utils.h"
...
...
@@ -1395,6 +1396,44 @@ int Game::LocalPlayer(int player) {
const
wchar_t
*
Game
::
LocalName
(
int
local_player
)
{
return
local_player
==
0
?
dInfo
.
hostname
:
dInfo
.
clientname
;
}
int
Game
::
GetMasterRule
(
uint32
param
,
int
*
truerule
)
{
switch
(
param
)
{
case
MASTER_RULE_1
:
{
if
(
truerule
)
*
truerule
=
1
;
return
1
;
break
;
}
case
MASTER_RULE_2
:
{
if
(
truerule
)
*
truerule
=
2
;
return
2
;
break
;
}
case
MASTER_RULE_3
:
{
if
(
truerule
)
*
truerule
=
3
;
return
3
;
break
;
}
case
MASTER_RULE_4
:
{
if
(
truerule
)
*
truerule
=
4
;
return
4
;
break
;
}
default:
{
if
(
truerule
)
*
truerule
=
5
;
if
(
param
&
DUEL_EMZONE
)
return
4
;
else
if
(
param
&
DUEL_PZONE
)
return
3
;
else
return
2
;
}
}
}
void
Game
::
OnResize
()
{
wMainMenu
->
setRelativePosition
(
ResizeWin
(
370
,
200
,
650
,
415
));
...
...
gframe/game.h
View file @
1a754caf
...
...
@@ -126,6 +126,7 @@ public:
int
LocalPlayer
(
int
player
);
const
wchar_t
*
LocalName
(
int
local_player
);
int
GetMasterRule
(
uint32
param
,
int
*
truerule
=
0
);
bool
HasFocus
(
EGUI_ELEMENT_TYPE
type
)
const
{
irr
::
gui
::
IGUIElement
*
focus
=
env
->
getFocus
();
...
...
gframe/network.h
View file @
1a754caf
...
...
@@ -15,27 +15,29 @@ struct HostInfo {
unsigned
int
lflist
;
unsigned
char
rule
;
unsigned
char
mode
;
unsigned
int
duel_flag
;
unsigned
char
duel_rule
;
bool
no_check_deck
;
bool
no_shuffle_deck
;
unsigned
int
start_lp
;
unsigned
char
start_hand
;
unsigned
char
draw_count
;
unsigned
short
time_limit
;
int
destiny_draw
;
int
sealed
;
int
booster
;
int
speed
;
int
concentration
;
int
boss
;
int
city
;
int
kingdom
;
int
dimension
;
int
turbo1
;
int
turbo2
;
int
doubled
;
int
command
;
int
master
;
unsigned
char
check
;
unsigned
int
duel_flag
;
bool
destiny_draw
;
bool
sealed
;
bool
booster
;
bool
speed
;
bool
concentration
;
bool
boss
;
bool
city
;
bool
kingdom
;
bool
dimension
;
bool
turbo1
;
bool
turbo2
;
bool
doubled
;
bool
command
;
bool
master
;
int
rule_count
;
};
struct
HostPacket
{
...
...
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