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-520DIY
ygopro
Commits
00bdca54
Commit
00bdca54
authored
Sep 24, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweak dynamic LP bar
parent
85201b70
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
20 deletions
+12
-20
gframe/client_field.cpp
gframe/client_field.cpp
+0
-1
gframe/drawing.cpp
gframe/drawing.cpp
+8
-10
gframe/duelclient.cpp
gframe/duelclient.cpp
+1
-4
gframe/game.h
gframe/game.h
+1
-1
gframe/replay_mode.cpp
gframe/replay_mode.cpp
+1
-2
gframe/single_mode.cpp
gframe/single_mode.cpp
+1
-2
No files found.
gframe/client_field.cpp
View file @
00bdca54
...
...
@@ -753,7 +753,6 @@ void ClientField::ReplaySwap() {
mainGame
->
dInfo
.
isReplaySwapped
=
!
mainGame
->
dInfo
.
isReplaySwapped
;
std
::
swap
(
mainGame
->
dInfo
.
lp
[
0
],
mainGame
->
dInfo
.
lp
[
1
]);
std
::
swap
(
mainGame
->
dInfo
.
strLP
[
0
],
mainGame
->
dInfo
.
strLP
[
1
]);
std
::
swap
(
mainGame
->
dInfo
.
start_lp
[
0
],
mainGame
->
dInfo
.
start_lp
[
1
]);
std
::
swap
(
mainGame
->
dInfo
.
hostname
,
mainGame
->
dInfo
.
clientname
);
std
::
swap
(
mainGame
->
dInfo
.
hostname_tag
,
mainGame
->
dInfo
.
clientname_tag
);
RefreshCardCountDisplay
();
...
...
gframe/drawing.cpp
View file @
00bdca54
...
...
@@ -556,16 +556,14 @@ void Game::DrawMisc() {
}
driver
->
draw2DImage
(
imageManager
.
tLPFrame
,
Resize
(
330
,
10
,
629
,
30
),
recti
(
0
,
0
,
200
,
20
),
0
,
0
,
true
);
driver
->
draw2DImage
(
imageManager
.
tLPFrame
,
Resize
(
691
,
10
,
990
,
30
),
recti
(
0
,
0
,
200
,
20
),
0
,
0
,
true
);
if
(
!
dInfo
.
start_lp
[
0
])
driver
->
draw2DImage
(
imageManager
.
tLPBar
,
Resize
(
335
,
12
,
335
,
28
),
recti
(
0
,
0
,
16
,
16
),
0
,
0
,
true
);
else
if
(
dInfo
.
lp
[
0
]
>=
dInfo
.
start_lp
[
0
])
if
(
dInfo
.
start_lp
)
{
if
(
dInfo
.
lp
[
0
]
>=
dInfo
.
start_lp
)
driver
->
draw2DImage
(
imageManager
.
tLPBar
,
Resize
(
335
,
12
,
625
,
28
),
recti
(
0
,
0
,
16
,
16
),
0
,
0
,
true
);
else
driver
->
draw2DImage
(
imageManager
.
tLPBar
,
Resize
(
335
,
12
,
335
+
290
*
dInfo
.
lp
[
0
]
/
dInfo
.
start_lp
[
0
],
28
),
recti
(
0
,
0
,
16
,
16
),
0
,
0
,
true
);
if
(
!
dInfo
.
start_lp
[
1
])
driver
->
draw2DImage
(
imageManager
.
tLPBar
,
Resize
(
986
,
12
,
986
,
28
),
recti
(
0
,
0
,
16
,
16
),
0
,
0
,
true
);
else
if
(
dInfo
.
lp
[
1
]
>=
dInfo
.
start_lp
[
1
])
else
driver
->
draw2DImage
(
imageManager
.
tLPBar
,
Resize
(
335
,
12
,
335
+
290
*
dInfo
.
lp
[
0
]
/
dInfo
.
start_lp
,
28
),
recti
(
0
,
0
,
16
,
16
),
0
,
0
,
true
);
if
(
dInfo
.
lp
[
1
]
>=
dInfo
.
start_lp
)
driver
->
draw2DImage
(
imageManager
.
tLPBar
,
Resize
(
696
,
12
,
986
,
28
),
recti
(
0
,
0
,
16
,
16
),
0
,
0
,
true
);
else
driver
->
draw2DImage
(
imageManager
.
tLPBar
,
Resize
(
986
-
290
*
dInfo
.
lp
[
1
]
/
dInfo
.
start_lp
[
1
],
12
,
986
,
28
),
recti
(
0
,
0
,
16
,
16
),
0
,
0
,
true
);
else
driver
->
draw2DImage
(
imageManager
.
tLPBar
,
Resize
(
986
-
290
*
dInfo
.
lp
[
1
]
/
dInfo
.
start_lp
,
12
,
986
,
28
),
recti
(
0
,
0
,
16
,
16
),
0
,
0
,
true
);
}
if
(
lpframe
)
{
dInfo
.
lp
[
lpplayer
]
-=
lpd
;
myswprintf
(
dInfo
.
strLP
[
lpplayer
],
L"%d"
,
dInfo
.
lp
[
lpplayer
]);
...
...
gframe/duelclient.cpp
View file @
00bdca54
...
...
@@ -598,6 +598,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
wChat
->
setVisible
(
true
);
mainGame
->
gMutex
.
unlock
();
mainGame
->
dInfo
.
duel_rule
=
pkt
->
info
.
duel_rule
;
mainGame
->
dInfo
.
start_lp
=
pkt
->
info
.
start_lp
;
watching
=
0
;
connect_state
|=
0x4
;
break
;
...
...
@@ -684,8 +685,6 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
dInfo
.
isFinished
=
false
;
mainGame
->
dInfo
.
lp
[
0
]
=
0
;
mainGame
->
dInfo
.
lp
[
1
]
=
0
;
mainGame
->
dInfo
.
start_lp
[
0
]
=
0
;
mainGame
->
dInfo
.
start_lp
[
1
]
=
0
;
mainGame
->
dInfo
.
strLP
[
0
][
0
]
=
0
;
mainGame
->
dInfo
.
strLP
[
1
][
0
]
=
0
;
mainGame
->
dInfo
.
turn
=
0
;
...
...
@@ -1364,8 +1363,6 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
dInfo
.
duel_rule
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dInfo
.
lp
[
mainGame
->
LocalPlayer
(
0
)]
=
BufferIO
::
ReadInt32
(
pbuf
);
mainGame
->
dInfo
.
lp
[
mainGame
->
LocalPlayer
(
1
)]
=
BufferIO
::
ReadInt32
(
pbuf
);
mainGame
->
dInfo
.
start_lp
[
0
]
=
mainGame
->
dInfo
.
lp
[
0
];
mainGame
->
dInfo
.
start_lp
[
1
]
=
mainGame
->
dInfo
.
lp
[
1
];
myswprintf
(
mainGame
->
dInfo
.
strLP
[
0
],
L"%d"
,
mainGame
->
dInfo
.
lp
[
0
]);
myswprintf
(
mainGame
->
dInfo
.
strLP
[
1
],
L"%d"
,
mainGame
->
dInfo
.
lp
[
1
]);
int
deckc
=
BufferIO
::
ReadInt16
(
pbuf
);
...
...
gframe/game.h
View file @
00bdca54
...
...
@@ -82,7 +82,7 @@ struct DuelInfo {
bool
is_swapped
;
bool
tag_player
[
2
];
int
lp
[
2
];
int
start_lp
[
2
]
;
int
start_lp
;
int
card_count
[
2
];
int
total_attack
[
2
];
int
duel_rule
;
...
...
gframe/replay_mode.cpp
View file @
00bdca54
...
...
@@ -177,8 +177,7 @@ bool ReplayMode::StartDuel() {
set_player_info
(
pduel
,
1
,
start_lp
,
start_hand
,
draw_count
);
mainGame
->
dInfo
.
lp
[
0
]
=
start_lp
;
mainGame
->
dInfo
.
lp
[
1
]
=
start_lp
;
mainGame
->
dInfo
.
start_lp
[
0
]
=
start_lp
;
mainGame
->
dInfo
.
start_lp
[
1
]
=
start_lp
;
mainGame
->
dInfo
.
start_lp
=
start_lp
;
myswprintf
(
mainGame
->
dInfo
.
strLP
[
0
],
L"%d"
,
mainGame
->
dInfo
.
lp
[
0
]);
myswprintf
(
mainGame
->
dInfo
.
strLP
[
1
],
L"%d"
,
mainGame
->
dInfo
.
lp
[
1
]);
mainGame
->
dInfo
.
turn
=
0
;
...
...
gframe/single_mode.cpp
View file @
00bdca54
...
...
@@ -46,8 +46,7 @@ int SingleMode::SinglePlayThread() {
set_player_info
(
pduel
,
1
,
start_lp
,
start_hand
,
draw_count
);
mainGame
->
dInfo
.
lp
[
0
]
=
start_lp
;
mainGame
->
dInfo
.
lp
[
1
]
=
start_lp
;
mainGame
->
dInfo
.
start_lp
[
0
]
=
start_lp
;
mainGame
->
dInfo
.
start_lp
[
1
]
=
start_lp
;
mainGame
->
dInfo
.
start_lp
=
start_lp
;
myswprintf
(
mainGame
->
dInfo
.
strLP
[
0
],
L"%d"
,
mainGame
->
dInfo
.
lp
[
0
]);
myswprintf
(
mainGame
->
dInfo
.
strLP
[
1
],
L"%d"
,
mainGame
->
dInfo
.
lp
[
1
]);
BufferIO
::
CopyWStr
(
mainGame
->
ebNickName
->
getText
(),
mainGame
->
dInfo
.
hostname
,
20
);
...
...
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