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
06d98be4
Commit
06d98be4
authored
Mar 25, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
d3dcc211
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
64 additions
and
50 deletions
+64
-50
gframe/client_card.cpp
gframe/client_card.cpp
+16
-9
gframe/client_card.h
gframe/client_card.h
+4
-1
gframe/data_manager.cpp
gframe/data_manager.cpp
+5
-0
gframe/deck_con.cpp
gframe/deck_con.cpp
+2
-4
gframe/drawing.cpp
gframe/drawing.cpp
+7
-11
gframe/event_handler.cpp
gframe/event_handler.cpp
+13
-10
gframe/game.cpp
gframe/game.cpp
+11
-9
gframe/game.h
gframe/game.h
+6
-6
No files found.
gframe/client_card.cpp
View file @
06d98be4
...
...
@@ -27,6 +27,7 @@ ClientCard::ClientCard() {
alias
=
0
;
level
=
0
;
rank
=
0
;
link
=
0
;
race
=
0
;
attribute
=
0
;
attack
=
0
;
...
...
@@ -35,7 +36,7 @@ ClientCard::ClientCard() {
base_defense
=
0
;
lscale
=
0
;
rscale
=
0
;
link
=
0
;
link
_marker
=
0
;
cHint
=
0
;
chValue
=
0
;
atkstring
[
0
]
=
0
;
...
...
@@ -88,13 +89,6 @@ void ClientCard::UpdateInfo(char* buf) {
myswprintf
(
lvstring
,
L"R%d"
,
rank
);
}
}
if
(
flag
&
QUERY_LINK
)
{
pdata
=
BufferIO
::
ReadInt32
(
buf
);
if
(
link
!=
(
unsigned
int
)
pdata
)
{
link
=
pdata
;
myswprintf
(
lvstring
,
L"L%d"
,
link
);
}
}
if
(
flag
&
QUERY_ATTRIBUTE
)
attribute
=
BufferIO
::
ReadInt32
(
buf
);
if
(
flag
&
QUERY_RACE
)
...
...
@@ -109,7 +103,10 @@ void ClientCard::UpdateInfo(char* buf) {
}
if
(
flag
&
QUERY_DEFENSE
)
{
defense
=
BufferIO
::
ReadInt32
(
buf
);
if
(
defense
<
0
)
{
if
(
type
&
TYPE_LINK
)
{
defstring
[
0
]
=
'-'
;
defstring
[
1
]
=
0
;
}
else
if
(
defense
<
0
)
{
defstring
[
0
]
=
'?'
;
defstring
[
1
]
=
0
;
}
else
...
...
@@ -170,6 +167,16 @@ void ClientCard::UpdateInfo(char* buf) {
rscale
=
BufferIO
::
ReadInt32
(
buf
);
myswprintf
(
rscstring
,
L"%d"
,
rscale
);
}
if
(
flag
&
QUERY_LINK
)
{
pdata
=
BufferIO
::
ReadInt32
(
buf
);
if
(
link
!=
(
unsigned
int
)
pdata
)
{
link
=
pdata
;
}
pdata
=
BufferIO
::
ReadInt32
(
buf
);
if
(
link_marker
!=
(
unsigned
int
)
pdata
)
{
link_marker
=
pdata
;
}
}
}
void
ClientCard
::
ClearTarget
()
{
for
(
auto
cit
=
cardTarget
.
begin
();
cit
!=
cardTarget
.
end
();
++
cit
)
{
...
...
gframe/client_card.h
View file @
06d98be4
...
...
@@ -20,6 +20,7 @@ struct CardData {
int
defense
;
unsigned
int
lscale
;
unsigned
int
rscale
;
unsigned
int
link_marker
;
};
struct
CardDataC
{
unsigned
int
code
;
...
...
@@ -33,6 +34,7 @@ struct CardDataC {
int
defense
;
unsigned
int
lscale
;
unsigned
int
rscale
;
unsigned
int
link_marker
;
unsigned
int
ot
;
unsigned
int
category
;
};
...
...
@@ -69,6 +71,7 @@ public:
u32
type
;
u32
level
;
u32
rank
;
u32
link
;
u32
attribute
;
u32
race
;
s32
attack
;
...
...
@@ -77,7 +80,7 @@ public:
s32
base_defense
;
u32
lscale
;
u32
rscale
;
u32
link
;
u32
link
_marker
;
u32
reason
;
u32
select_seq
;
u8
owner
;
...
...
gframe/data_manager.cpp
View file @
06d98be4
...
...
@@ -31,6 +31,11 @@ bool DataManager::LoadDB(const char* file) {
cd
.
type
=
sqlite3_column_int
(
pStmt
,
4
);
cd
.
attack
=
sqlite3_column_int
(
pStmt
,
5
);
cd
.
defense
=
sqlite3_column_int
(
pStmt
,
6
);
if
(
cd
.
type
&
TYPE_LINK
)
{
cd
.
link_marker
=
cd
.
defense
;
cd
.
defense
=
0
;
}
else
cd
.
link_marker
=
0
;
unsigned
int
level
=
sqlite3_column_int
(
pStmt
,
7
);
cd
.
level
=
level
&
0xff
;
cd
.
lscale
=
(
level
>>
24
)
&
0xff
;
...
...
gframe/deck_con.cpp
View file @
06d98be4
...
...
@@ -381,10 +381,8 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
if
(
mainGame
->
cbCardType2
->
getSelected
()
==
8
)
{
mainGame
->
ebDefense
->
setEnabled
(
false
);
mainGame
->
ebDefense
->
setText
(
L""
);
}
else
{
}
else
{
mainGame
->
ebDefense
->
setEnabled
(
true
);
}
}
break
;
...
...
@@ -825,7 +823,7 @@ void DeckBuilder::FilterCards() {
if
((
filter_deftype
==
1
&&
data
.
defense
!=
filter_def
)
||
(
filter_deftype
==
2
&&
data
.
defense
<
filter_def
)
||
(
filter_deftype
==
3
&&
data
.
defense
<=
filter_def
)
||
(
filter_deftype
==
4
&&
(
data
.
defense
>
filter_def
||
data
.
defense
<
0
))
||
(
filter_deftype
==
5
&&
(
data
.
defense
>=
filter_def
||
data
.
defense
<
0
))
||
(
filter_deftype
==
6
&&
data
.
defense
!=
-
2
)
||
(
data
.
type
&
TYPE_LINK
))
||
(
data
.
type
&
TYPE_LINK
))
continue
;
}
if
(
filter_lvtype
)
{
...
...
gframe/drawing.cpp
View file @
06d98be4
...
...
@@ -487,17 +487,13 @@ void Game::DrawMisc() {
}
}
void
Game
::
DrawStatus
(
ClientCard
*
pcard
,
int
x1
,
int
y1
,
int
x2
,
int
y2
)
{
if
(
pcard
->
type
&
TYPE_LINK
)
{
adFont
->
draw
(
pcard
->
atkstring
,
recti
(
x1
-
4
,
y1
,
x1
+
4
,
y1
+
20
),
0xff000000
,
true
,
false
,
0
);
adFont
->
draw
(
pcard
->
atkstring
,
recti
(
x1
-
3
,
y1
+
1
,
x1
+
5
,
y1
+
21
),
0xffffffff
,
true
,
false
,
0
);
}
else
{
adFont
->
draw
(
L"/"
,
recti
(
x1
-
4
,
y1
,
x1
+
4
,
y1
+
20
),
0xff000000
,
true
,
false
,
0
);
adFont
->
draw
(
L"/"
,
recti
(
x1
-
3
,
y1
+
1
,
x1
+
5
,
y1
+
21
),
0xffffffff
,
true
,
false
,
0
);
int
w
=
adFont
->
getDimension
(
pcard
->
atkstring
).
Width
;
adFont
->
draw
(
pcard
->
atkstring
,
recti
(
x1
-
5
-
w
,
y1
,
x1
-
5
,
y1
+
20
),
0xff000000
,
false
,
false
,
0
);
adFont
->
draw
(
pcard
->
atkstring
,
recti
(
x1
-
4
-
w
,
y1
+
1
,
x1
-
4
,
y1
+
21
),
pcard
->
attack
>
pcard
->
base_attack
?
0xffffff00
:
pcard
->
attack
<
pcard
->
base_attack
?
0xffff2090
:
0xffffffff
,
false
,
false
,
0
);
adFont
->
draw
(
L"/"
,
recti
(
x1
-
4
,
y1
,
x1
+
4
,
y1
+
20
),
0xff000000
,
true
,
false
,
0
);
adFont
->
draw
(
L"/"
,
recti
(
x1
-
3
,
y1
+
1
,
x1
+
5
,
y1
+
21
),
0xffffffff
,
true
,
false
,
0
);
int
w
=
adFont
->
getDimension
(
pcard
->
atkstring
).
Width
;
adFont
->
draw
(
pcard
->
atkstring
,
recti
(
x1
-
5
-
w
,
y1
,
x1
-
5
,
y1
+
20
),
0xff000000
,
false
,
false
,
0
);
adFont
->
draw
(
pcard
->
atkstring
,
recti
(
x1
-
4
-
w
,
y1
+
1
,
x1
-
4
,
y1
+
21
),
pcard
->
attack
>
pcard
->
base_attack
?
0xffffff00
:
pcard
->
attack
<
pcard
->
base_attack
?
0xffff2090
:
0xffffffff
,
false
,
false
,
0
);
if
(
!
(
pcard
->
type
&
TYPE_LINK
))
{
w
=
adFont
->
getDimension
(
pcard
->
defstring
).
Width
;
adFont
->
draw
(
pcard
->
defstring
,
recti
(
x1
+
4
,
y1
,
x1
+
4
+
w
,
y1
+
20
),
0xff000000
,
false
,
false
,
0
);
adFont
->
draw
(
pcard
->
defstring
,
recti
(
x1
+
5
,
y1
+
1
,
x1
+
5
+
w
,
y1
+
21
),
...
...
gframe/event_handler.cpp
View file @
06d98be4
...
...
@@ -1747,20 +1747,23 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
myswprintf
(
formatBuffer
,
L"
\n
(%ls)"
,
dataManager
.
GetName
(
mcard
->
alias
));
str
.
append
(
formatBuffer
);
}
if
(
mcard
->
type
&
TYPE_LINK
)
{
myswprintf
(
formatBuffer
,
L"
\n
%ls/Link %d"
,
mcard
->
atkstring
,
mcard
->
link
);
str
.
append
(
formatBuffer
);
myswprintf
(
formatBuffer
,
L"
\n
%ls/%ls"
,
dataManager
.
FormatRace
(
mcard
->
race
),
dataManager
.
FormatAttribute
(
mcard
->
attribute
));
str
.
append
(
formatBuffer
);
}
else
{
myswprintf
(
formatBuffer
,
L"
\n
%ls/%ls"
,
mcard
->
atkstring
,
mcard
->
defstring
);
str
.
append
(
formatBuffer
);
myswprintf
(
formatBuffer
,
L"
\n
%ls/%ls"
,
mcard
->
atkstring
,
mcard
->
defstring
);
str
.
append
(
formatBuffer
);
if
(
!
(
mcard
->
type
&
TYPE_LINK
))
{
int
form
=
0x2605
;
if
(
mcard
->
rank
)
++
form
;
myswprintf
(
formatBuffer
,
L"
\n
%c%d %ls/%ls"
,
form
,
(
mcard
->
level
?
mcard
->
level
:
mcard
->
rank
),
dataManager
.
FormatRace
(
mcard
->
race
),
dataManager
.
FormatAttribute
(
mcard
->
attribute
));
myswprintf
(
formatBuffer
,
L"
\n
%c%d"
,
form
,
(
mcard
->
level
?
mcard
->
level
:
mcard
->
rank
));
str
.
append
(
formatBuffer
);
}
else
{
myswprintf
(
formatBuffer
,
L"
\n
LINK-%d"
,
mcard
->
link
);
str
.
append
(
formatBuffer
);
if
(
mcard
->
link_marker
&
LINK_MARKER_TOP
)
{
myswprintf
(
formatBuffer
,
L" %ls"
,
dataManager
.
GetSysString
(
1361
));
str
.
append
(
formatBuffer
);
}
}
myswprintf
(
formatBuffer
,
L" %ls/%ls"
,
dataManager
.
FormatRace
(
mcard
->
race
),
dataManager
.
FormatAttribute
(
mcard
->
attribute
));
str
.
append
(
formatBuffer
);
if
(
mcard
->
location
==
LOCATION_HAND
&&
(
mcard
->
type
&
TYPE_PENDULUM
))
{
myswprintf
(
formatBuffer
,
L"
\n
%d/%d"
,
mcard
->
lscale
,
mcard
->
rscale
);
str
.
append
(
formatBuffer
);
...
...
gframe/game.cpp
View file @
06d98be4
...
...
@@ -1025,15 +1025,9 @@ void Game::ShowCardInfo(int code) {
if
(
cd
.
type
&
TYPE_MONSTER
)
{
myswprintf
(
formatBuffer
,
L"[%ls] %ls/%ls"
,
dataManager
.
FormatType
(
cd
.
type
),
dataManager
.
FormatRace
(
cd
.
race
),
dataManager
.
FormatAttribute
(
cd
.
attribute
));
stInfo
->
setText
(
formatBuffer
);
int
form
=
0x2605
;
if
(
cd
.
type
&
TYPE_XYZ
)
++
form
;
if
(
cd
.
type
&
TYPE_LINK
)
{
if
(
cd
.
attack
<
0
)
myswprintf
(
formatBuffer
,
L"?/Link %d"
,
cd
.
level
);
else
myswprintf
(
formatBuffer
,
L"%d/Link %d"
,
cd
.
attack
,
cd
.
level
);
}
else
{
if
(
!
(
cd
.
type
&
TYPE_LINK
))
{
int
form
=
0x2605
;
if
(
cd
.
type
&
TYPE_XYZ
)
++
form
;
myswprintf
(
formatBuffer
,
L"[%c%d] "
,
form
,
cd
.
level
);
wchar_t
adBuffer
[
16
];
if
(
cd
.
attack
<
0
&&
cd
.
defense
<
0
)
...
...
@@ -1045,6 +1039,14 @@ void Game::ShowCardInfo(int code) {
else
myswprintf
(
adBuffer
,
L"%d/%d"
,
cd
.
attack
,
cd
.
defense
);
wcscat
(
formatBuffer
,
adBuffer
);
}
else
{
myswprintf
(
formatBuffer
,
L"[LINK-%d] "
,
cd
.
level
);
wchar_t
adBuffer
[
16
];
if
(
cd
.
attack
<
0
)
myswprintf
(
adBuffer
,
L"?/-"
);
else
myswprintf
(
adBuffer
,
L"%d/-"
,
cd
.
attack
);
wcscat
(
formatBuffer
,
adBuffer
);
}
if
(
cd
.
type
&
TYPE_PENDULUM
)
{
wchar_t
scaleBuffer
[
16
];
...
...
gframe/game.h
View file @
06d98be4
...
...
@@ -519,12 +519,12 @@ extern Game* mainGame;
#define BUTTON_SIDE_OK 309
#define BUTTON_SHUFFLE_DECK 310
#define COMBOBOX_MAINTYPE 311
#define
BUTTON_EFFECT_FILTER
312
#define BUTTON_
START_FILTER
313
#define
SCROLL_FILTER
314
#define
EDITBOX_KEYWORD
315
#define
BUTTON_CLEAR_FILTER
316
#define
COMBOBOX_SECONDTYPE
317
#define
COMBOBOX_SECONDTYPE
312
#define BUTTON_
EFFECT_FILTER
313
#define
BUTTON_START_FILTER
314
#define
SCROLL_FILTER
315
#define
EDITBOX_KEYWORD
316
#define
BUTTON_CLEAR_FILTER
317
#define BUTTON_REPLAY_START 320
#define BUTTON_REPLAY_PAUSE 321
#define BUTTON_REPLAY_STEP 322
...
...
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