Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
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
fallenstardust
YGOMobile-Cn-Ko-En
Commits
52503985
Commit
52503985
authored
Aug 01, 2018
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sync ocgcore
parent
369143c5
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
188 additions
and
230 deletions
+188
-230
Classes/gframe/deck_con.cpp
Classes/gframe/deck_con.cpp
+6
-10
Classes/gframe/game.cpp
Classes/gframe/game.cpp
+2
-2
Classes/gframe/game.h
Classes/gframe/game.h
+2
-0
Classes/gframe/gframe.cpp
Classes/gframe/gframe.cpp
+2
-1
Classes/gframe/replay_mode.cpp
Classes/gframe/replay_mode.cpp
+1
-1
Classes/ocgcore/field.h
Classes/ocgcore/field.h
+1
-4
Classes/ocgcore/processor.cpp
Classes/ocgcore/processor.cpp
+174
-212
No files found.
Classes/gframe/deck_con.cpp
View file @
52503985
...
...
@@ -833,15 +833,6 @@ void DeckBuilder::StartFilter() {
void
DeckBuilder
::
FilterCards
()
{
results
.
clear
();
const
wchar_t
*
pstr
=
mainGame
->
ebCardName
->
getText
();
int
trycode
=
BufferIO
::
GetVal
(
pstr
);
if
(
dataManager
.
GetData
(
trycode
,
0
))
{
auto
ptr
=
dataManager
.
GetCodePointer
(
trycode
);
// verified by GetData()
results
.
push_back
(
ptr
);
mainGame
->
scrFilter
->
setVisible
(
false
);
mainGame
->
scrFilter
->
setPos
(
0
);
myswprintf
(
result_string
,
L"%d"
,
results
.
size
());
return
;
}
unsigned
int
set_code
=
0
;
if
(
pstr
[
0
]
==
L'@'
)
set_code
=
dataManager
.
GetSetCode
(
&
pstr
[
1
]);
...
...
@@ -929,9 +920,14 @@ void DeckBuilder::FilterCards() {
}
else
if
(
pstr
[
0
]
==
L'@'
&&
set_code
)
{
if
(
!
check_set_code
(
data
,
set_code
))
continue
;
}
else
{
if
(
!
CardNameContains
(
text
.
name
.
c_str
(),
pstr
)
&&
text
.
text
.
find
(
pstr
)
==
std
::
wstring
::
npos
int
trycode
=
BufferIO
::
GetVal
(
pstr
);
bool
tryresult
=
dataManager
.
GetData
(
trycode
,
0
);
if
(
!
tryresult
&&
!
CardNameContains
(
text
.
name
.
c_str
(),
pstr
)
&&
text
.
text
.
find
(
pstr
)
==
std
::
wstring
::
npos
&&
(
!
set_code
||
!
check_set_code
(
data
,
set_code
)))
continue
;
if
(
tryresult
&&
data
.
code
!=
trycode
&&
!
(
data
.
alias
==
trycode
&&
(
data
.
alias
-
data
.
code
<
CARD_ARTWORK_VERSIONS_OFFSET
||
data
.
code
-
data
.
alias
<
CARD_ARTWORK_VERSIONS_OFFSET
)))
continue
;
}
}
results
.
push_back
(
ptr
);
...
...
Classes/gframe/game.cpp
View file @
52503985
...
...
@@ -1305,7 +1305,7 @@ void Game::MainLoop() {
driver
->
draw2DImage
(
imageManager
.
tBackGround
,
recti
(
0
*
xScale
,
0
*
yScale
,
1280
*
xScale
,
720
*
yScale
),
recti
(
0
,
0
,
imageManager
.
tBackGround
->
getOriginalSize
().
Width
,
imageManager
.
tBackGround
->
getOriginalSize
().
Height
));
#endif
gMutex
.
Lock
();
if
(
dInfo
.
isStarted
||
dInfo
.
isReplaySkiping
)
{
if
(
dInfo
.
isStarted
)
{
DrawBackImage
(
imageManager
.
tBackGround
);
DrawBackGround
();
DrawCards
();
...
...
@@ -1725,7 +1725,7 @@ void Game::ShowCardInfo(int code) {
memset
(
&
cd
,
0
,
sizeof
(
CardData
));
imgCard
->
setImage
(
imageManager
.
GetTexture
(
code
));
imgCard
->
setScaleImage
(
true
);
if
(
cd
.
alias
!=
0
&&
(
cd
.
alias
-
code
<
10
||
code
-
cd
.
alias
<
10
))
if
(
cd
.
alias
!=
0
&&
(
cd
.
alias
-
code
<
CARD_ARTWORK_VERSIONS_OFFSET
||
code
-
cd
.
alias
<
CARD_ARTWORK_VERSIONS_OFFSET
))
myswprintf
(
formatBuffer
,
L"%ls[%08d]"
,
dataManager
.
GetName
(
cd
.
alias
),
cd
.
alias
);
else
myswprintf
(
formatBuffer
,
L"%ls[%08d]"
,
dataManager
.
GetName
(
code
),
code
);
stName
->
setText
(
formatBuffer
);
...
...
Classes/gframe/game.h
View file @
52503985
...
...
@@ -641,6 +641,8 @@ extern Game* mainGame;
#define DEFAULT_DUEL_RULE 4
#define CARD_ARTWORK_VERSIONS_OFFSET 10
#ifdef _IRR_ANDROID_PLATFORM_
#define GUI_INFO_FPS 1000
#endif
...
...
Classes/gframe/gframe.cpp
View file @
52503985
...
...
@@ -59,7 +59,8 @@ int main(int argc, char* argv[]) {
event
.
GUIEvent
.
Caller
=
ygo
::
mainGame
->
btnJoinHost
;
ygo
::
mainGame
->
device
->
postEventFromUser
(
event
);
}
else
if
(
!
strcmp
(
argv
[
i
],
"-j"
))
{
// Join host
ygo
::
mainGame
->
HideElement
(
ygo
::
mainGame
->
wMainMenu
);
event
.
GUIEvent
.
Caller
=
ygo
::
mainGame
->
btnDeckEdit
;
// ygo::mainGame->HideElement(ygo::mainGame->wMainMenu);
ygo
::
mainGame
->
device
->
postEventFromUser
(
event
);
}
else
if
(
!
strcmp
(
argv
[
i
],
"-r"
))
{
// Replay
event
.
GUIEvent
.
Caller
=
ygo
::
mainGame
->
btnReplayMode
;
...
...
Classes/gframe/replay_mode.cpp
View file @
52503985
...
...
@@ -110,6 +110,7 @@ int ReplayMode::ReplayThread(void* param) {
get_message
(
pduel
,
(
byte
*
)
engineBuffer
);
is_continuing
=
ReplayAnalyze
(
engineBuffer
,
len
);
if
(
is_restarting
)
{
mainGame
->
gMutex
.
Lock
();
is_restarting
=
false
;
int
step
=
current_step
-
1
;
if
(
step
<
0
)
...
...
@@ -284,7 +285,6 @@ void ReplayMode::Undo() {
return
;
mainGame
->
dInfo
.
isReplaySkiping
=
true
;
Restart
(
false
);
mainGame
->
gMutex
.
Lock
();
Pause
(
false
,
false
);
}
bool
ReplayMode
::
ReplayAnalyze
(
char
*
msg
,
unsigned
int
len
)
{
...
...
Classes/ocgcore/field.h
View file @
52503985
...
...
@@ -192,8 +192,6 @@ struct processor {
event_list
sub_solving_event
;
chain_array
select_chains
;
chain_array
current_chain
;
chain_list
tpchain
;
chain_list
ntpchain
;
chain_list
continuous_chain
;
chain_list
desrep_chain
;
chain_list
new_fchain
;
...
...
@@ -498,7 +496,6 @@ public:
int32
process_turn
(
uint16
step
,
uint8
turn_player
);
int32
add_chain
(
uint16
step
);
int32
sort_chain
(
uint16
step
,
uint8
tp
);
int32
solve_continuous
(
uint16
step
,
effect
*
peffect
,
uint8
triggering_player
);
int32
solve_chain
(
uint16
step
,
uint32
chainend_arg1
,
uint32
chainend_arg2
);
int32
break_effect
();
...
...
@@ -687,7 +684,7 @@ public:
#define PROCESSOR_SELECT_PLACE 18
#define PROCESSOR_SELECT_POSITION 19
#define PROCESSOR_SELECT_TRIBUTE_P 20
#define PROCESSOR_SORT_CHAIN 21
//
#define PROCESSOR_SORT_CHAIN 21
#define PROCESSOR_SELECT_COUNTER 22
#define PROCESSOR_SELECT_SUM 23
#define PROCESSOR_SELECT_DISFIELD 24
...
...
Classes/ocgcore/processor.cpp
View file @
52503985
This diff is collapsed.
Click to expand it.
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