Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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-core
Commits
12bc15bb
Commit
12bc15bb
authored
Dec 03, 2024
by
Chen Bill
Committed by
GitHub
Dec 03, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move second_code to card_data.h (#685)
parent
1af26196
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
19 deletions
+20
-19
card.cpp
card.cpp
+0
-8
card.h
card.h
+0
-7
card_data.h
card_data.h
+17
-1
playerop.cpp
playerop.cpp
+3
-3
No files found.
card.cpp
View file @
12bc15bb
...
...
@@ -15,14 +15,6 @@
#include "buffer.h"
#include <algorithm>
const
std
::
unordered_map
<
uint32
,
uint32
>
card
::
second_code
=
{
{
CARD_MARINE_DOLPHIN
,
17955766u
},
{
CARD_TWINKLE_MOSS
,
17732278u
},
{
CARD_TIMAEUS
,
10000050u
},
{
CARD_CRITIAS
,
10000060u
},
{
CARD_HERMOS
,
10000070u
}
};
bool
card_sort
::
operator
()(
card
*
const
&
c1
,
card
*
const
&
c2
)
const
{
return
c1
->
cardid
<
c2
->
cardid
;
}
...
...
card.h
View file @
12bc15bb
...
...
@@ -109,12 +109,6 @@ struct material_info {
};
const
material_info
null_info
;
constexpr
uint32
CARD_MARINE_DOLPHIN
=
78734254
;
constexpr
uint32
CARD_TWINKLE_MOSS
=
13857930
;
constexpr
uint32
CARD_TIMAEUS
=
1784686
;
constexpr
uint32
CARD_CRITIAS
=
11082056
;
constexpr
uint32
CARD_HERMOS
=
46232525
;
class
card
{
public:
struct
effect_relation_hash
{
...
...
@@ -149,7 +143,6 @@ public:
uint8
location
{
0
};
uint8
sequence
{
0
};
};
static
const
std
::
unordered_map
<
uint32
,
uint32
>
second_code
;
int32
ref_handle
;
duel
*
pduel
;
...
...
card_data.h
View file @
12bc15bb
#ifndef CARD_DATA_H_
#define CARD_DATA_H_
#include <unordered_map>
#include "common.h"
constexpr
int
CARD_ARTWORK_VERSIONS_OFFSET
=
20
;
constexpr
int
SIZE_SETCODE
=
16
;
constexpr
int
CARD_BLACK_LUSTER_SOLDIER2
=
5405695
;
constexpr
uint32
CARD_BLACK_LUSTER_SOLDIER2
=
5405695
;
//double name
constexpr
uint32
CARD_MARINE_DOLPHIN
=
78734254
;
constexpr
uint32
CARD_TWINKLE_MOSS
=
13857930
;
constexpr
uint32
CARD_TIMAEUS
=
1784686
;
constexpr
uint32
CARD_CRITIAS
=
11082056
;
constexpr
uint32
CARD_HERMOS
=
46232525
;
const
std
::
unordered_map
<
uint32
,
uint32
>
second_code
=
{
{
CARD_MARINE_DOLPHIN
,
17955766u
},
{
CARD_TWINKLE_MOSS
,
17732278u
},
{
CARD_TIMAEUS
,
10000050u
},
{
CARD_CRITIAS
,
10000060u
},
{
CARD_HERMOS
,
10000070u
},
};
struct
card_data
{
uint32
code
{};
...
...
playerop.cpp
View file @
12bc15bb
...
...
@@ -913,7 +913,7 @@ static int32 is_declarable(card_data const& cd, const std::vector<uint32>& opcod
stack
.
pop
();
int32
lhs
=
stack
.
top
();
stack
.
pop
();
stack
.
push
(
lhs
&&
rhs
);
stack
.
push
(
static_cast
<
int32
>
(
lhs
&&
rhs
)
);
}
break
;
}
...
...
@@ -923,7 +923,7 @@ static int32 is_declarable(card_data const& cd, const std::vector<uint32>& opcod
stack
.
pop
();
int32
lhs
=
stack
.
top
();
stack
.
pop
();
stack
.
push
(
lhs
||
rhs
);
stack
.
push
(
static_cast
<
int32
>
(
lhs
||
rhs
)
);
}
break
;
}
...
...
@@ -939,7 +939,7 @@ static int32 is_declarable(card_data const& cd, const std::vector<uint32>& opcod
if
(
stack
.
size
()
>=
1
)
{
int32
val
=
stack
.
top
();
stack
.
pop
();
stack
.
push
(
!
val
);
stack
.
push
(
static_cast
<
int32
>
(
!
val
)
);
}
break
;
}
...
...
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