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
a3cd3967
Commit
a3cd3967
authored
Jun 07, 2012
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
2b6359c0
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
86 additions
and
8 deletions
+86
-8
gframe/game.cpp
gframe/game.cpp
+14
-2
gframe/game.h
gframe/game.h
+11
-1
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+14
-0
gframe/single_mode.cpp
gframe/single_mode.cpp
+0
-0
gframe/single_mode.h
gframe/single_mode.h
+35
-0
ocgcore/operations.cpp
ocgcore/operations.cpp
+8
-2
script/c82003859.lua
script/c82003859.lua
+1
-1
strings.conf
strings.conf
+3
-2
No files found.
gframe/game.cpp
View file @
a3cd3967
...
...
@@ -66,7 +66,7 @@ bool Game::Initialize() {
wMainMenu
=
env
->
addWindow
(
rect
<
s32
>
(
370
,
200
,
650
,
450
),
false
,
strbuf
);
wMainMenu
->
getCloseButton
()
->
setVisible
(
false
);
btnLanMode
=
env
->
addButton
(
rect
<
s32
>
(
10
,
30
,
270
,
60
),
wMainMenu
,
BUTTON_LAN_MODE
,
dataManager
.
GetSysString
(
1200
));
btnServerMode
=
env
->
addButton
(
rect
<
s32
>
(
10
,
65
,
270
,
95
),
wMainMenu
,
BUTTON_S
ERVER
_MODE
,
dataManager
.
GetSysString
(
1201
));
btnServerMode
=
env
->
addButton
(
rect
<
s32
>
(
10
,
65
,
270
,
95
),
wMainMenu
,
BUTTON_S
INGLE
_MODE
,
dataManager
.
GetSysString
(
1201
));
btnReplayMode
=
env
->
addButton
(
rect
<
s32
>
(
10
,
100
,
270
,
130
),
wMainMenu
,
BUTTON_REPLAY_MODE
,
dataManager
.
GetSysString
(
1202
));
btnTestMode
=
env
->
addButton
(
rect
<
s32
>
(
10
,
135
,
270
,
165
),
wMainMenu
,
BUTTON_TEST_MODE
,
dataManager
.
GetSysString
(
1203
));
btnDeckEdit
=
env
->
addButton
(
rect
<
s32
>
(
10
,
170
,
270
,
200
),
wMainMenu
,
BUTTON_DECK_EDIT
,
dataManager
.
GetSysString
(
1204
));
...
...
@@ -424,12 +424,22 @@ bool Game::Initialize() {
wReplay
=
env
->
addWindow
(
rect
<
s32
>
(
220
,
100
,
800
,
520
),
false
,
dataManager
.
GetSysString
(
1200
));
wReplay
->
getCloseButton
()
->
setVisible
(
false
);
wReplay
->
setVisible
(
false
);
lstReplayList
=
env
->
addListBox
(
rect
<
s32
>
(
10
,
30
,
350
,
35
0
),
wReplay
,
LISTBOX_REPLAY_LIST
,
true
);
lstReplayList
=
env
->
addListBox
(
rect
<
s32
>
(
10
,
30
,
350
,
40
0
),
wReplay
,
LISTBOX_REPLAY_LIST
,
true
);
lstReplayList
->
setItemHeight
(
18
);
btnLoadReplay
=
env
->
addButton
(
rect
<
s32
>
(
460
,
355
,
570
,
380
),
wReplay
,
BUTTON_LOAD_REPLAY
,
dataManager
.
GetSysString
(
1348
));
btnReplayCancel
=
env
->
addButton
(
rect
<
s32
>
(
460
,
385
,
570
,
410
),
wReplay
,
BUTTON_CANCEL_REPLAY
,
dataManager
.
GetSysString
(
1347
));
env
->
addStaticText
(
dataManager
.
GetSysString
(
1349
),
rect
<
s32
>
(
360
,
30
,
570
,
50
),
false
,
true
,
wReplay
);
stReplayInfo
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
360
,
60
,
570
,
350
),
false
,
true
,
wReplay
);
//single play window
wSinglePlay
=
env
->
addWindow
(
rect
<
s32
>
(
220
,
100
,
800
,
520
),
false
,
dataManager
.
GetSysString
(
1201
));
wSinglePlay
->
getCloseButton
()
->
setVisible
(
false
);
wSinglePlay
->
setVisible
(
false
);
lstSinglePlayList
=
env
->
addListBox
(
rect
<
s32
>
(
10
,
30
,
350
,
400
),
wSinglePlay
,
LISTBOX_SINGLEPLAY_LIST
,
true
);
lstSinglePlayList
->
setItemHeight
(
18
);
btnLoadSinglePlay
=
env
->
addButton
(
rect
<
s32
>
(
460
,
355
,
570
,
380
),
wSinglePlay
,
BUTTON_LOAD_SINGLEPLAY
,
dataManager
.
GetSysString
(
1211
));
btnSinglePlayCancel
=
env
->
addButton
(
rect
<
s32
>
(
460
,
385
,
570
,
410
),
wSinglePlay
,
BUTTON_CANCEL_SINGLEPLAY
,
dataManager
.
GetSysString
(
1210
));
env
->
addStaticText
(
dataManager
.
GetSysString
(
1352
),
rect
<
s32
>
(
360
,
30
,
570
,
50
),
false
,
true
,
wSinglePlay
);
stSinglePlayInfo
=
env
->
addStaticText
(
L""
,
rect
<
s32
>
(
360
,
60
,
570
,
350
),
false
,
true
,
wSinglePlay
);
//replay save
wReplaySave
=
env
->
addWindow
(
rect
<
s32
>
(
510
,
200
,
820
,
320
),
false
,
dataManager
.
GetSysString
(
1340
));
wReplaySave
->
getCloseButton
()
->
setVisible
(
false
);
...
...
@@ -646,6 +656,8 @@ void Game::RefreshReplay() {
}
#endif
}
void
Game
::
RefreshSingleplay
()
{
}
void
Game
::
LoadConfig
()
{
FILE
*
fp
=
fopen
(
"system.conf"
,
"r"
);
if
(
!
fp
)
...
...
gframe/game.h
View file @
a3cd3967
...
...
@@ -70,6 +70,7 @@ public:
void
SetStaticText
(
irr
::
gui
::
IGUIStaticText
*
pControl
,
u32
cWidth
,
irr
::
gui
::
CGUITTFont
*
font
,
wchar_t
*
text
);
void
RefreshDeck
(
irr
::
gui
::
IGUIComboBox
*
cbDeck
);
void
RefreshReplay
();
void
RefreshSingleplay
();
void
DrawSelectionLine
(
irr
::
video
::
S3DVertex
*
vec
,
bool
strip
,
int
width
,
float
*
cv
);
void
DrawBackGround
();
void
DrawCards
();
...
...
@@ -217,6 +218,12 @@ public:
irr
::
gui
::
IGUIStaticText
*
stReplayInfo
;
irr
::
gui
::
IGUIButton
*
btnLoadReplay
;
irr
::
gui
::
IGUIButton
*
btnReplayCancel
;
//single play
irr
::
gui
::
IGUIWindow
*
wSinglePlay
;
irr
::
gui
::
IGUIListBox
*
lstSinglePlayList
;
irr
::
gui
::
IGUIStaticText
*
stSinglePlayInfo
;
irr
::
gui
::
IGUIButton
*
btnLoadSinglePlay
;
irr
::
gui
::
IGUIButton
*
btnSinglePlayCancel
;
//hand
irr
::
gui
::
IGUIWindow
*
wHand
;
irr
::
gui
::
IGUIButton
*
btnHand
[
3
];
...
...
@@ -357,7 +364,7 @@ extern Game* mainGame;
#define COMMAND_LIST 0x0080
#define BUTTON_LAN_MODE 100
#define BUTTON_S
ERVER
_MODE 101
#define BUTTON_S
INGLE
_MODE 101
#define BUTTON_REPLAY_MODE 102
#define BUTTON_TEST_MODE 103
#define BUTTON_DECK_EDIT 104
...
...
@@ -444,4 +451,7 @@ extern Game* mainGame;
#define BUTTON_REPLAY_SWAP 324
#define BUTTON_REPLAY_SAVE 330
#define BUTTON_REPLAY_CANCEL 331
#define LISTBOX_SINGLEPLAY_LIST 350
#define BUTTON_LOAD_SINGLEPLAY 351
#define BUTTON_CANCEL_SINGLEPLAY 352
#endif // GAME_H
gframe/menu_handler.cpp
View file @
a3cd3967
...
...
@@ -124,6 +124,12 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame
->
RefreshReplay
();
break
;
}
case
BUTTON_SINGLE_MODE
:
{
mainGame
->
HideElement
(
mainGame
->
wMainMenu
);
mainGame
->
ShowElement
(
mainGame
->
wSinglePlay
);
mainGame
->
RefreshSingleplay
();
break
;
}
case
BUTTON_LOAD_REPLAY
:
{
if
(
mainGame
->
lstReplayList
->
getSelected
()
==
-
1
)
break
;
...
...
@@ -156,6 +162,14 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame
->
ShowElement
(
mainGame
->
wMainMenu
);
break
;
}
case
BUTTON_LOAD_SINGLEPLAY
:
{
break
;
}
case
BUTTON_CANCEL_SINGLEPLAY
:
{
mainGame
->
HideElement
(
mainGame
->
wSinglePlay
);
mainGame
->
ShowElement
(
mainGame
->
wMainMenu
);
break
;
}
case
BUTTON_DECK_EDIT
:
{
mainGame
->
RefreshDeck
(
mainGame
->
cbDBDecks
);
if
(
mainGame
->
cbDBDecks
->
getSelected
()
!=
-
1
)
...
...
gframe/single_mode.cpp
0 → 100644
View file @
a3cd3967
gframe/single_mode.h
0 → 100644
View file @
a3cd3967
#ifndef SINGLE_MODE_H
#define SINGLE_MODE_H
#include "config.h"
#include "data_manager.h"
#include "deck_manager.h"
#include "../ocgcore/mtrandom.h"
namespace
ygo
{
class
SingleMode
{
private:
static
long
pduel
;
static
wchar_t
event_string
[
256
];
public:
static
bool
StartPlay
();
static
void
StopReplay
(
bool
is_exiting
=
false
);
static
bool
ReadReplayResponse
();
static
int
SinglePlayThread
(
void
*
param
);
static
bool
SinglePlayAnalyze
(
char
*
msg
,
unsigned
int
len
);
static
void
SinglePlayRefresh
(
int
flag
=
0x181fff
);
static
void
SinglePlayRefreshHand
(
int
player
,
int
flag
=
0x181fff
);
static
void
SinglePlayRefreshGrave
(
int
player
,
int
flag
=
0x181fff
);
static
void
SinglePlayRefreshDeck
(
int
player
,
int
flag
=
0x181fff
);
static
void
SinglePlayRefreshExtra
(
int
player
,
int
flag
=
0x181fff
);
static
void
SinglePlayRefreshSingle
(
int
player
,
int
location
,
int
sequence
,
int
flag
=
0x181fff
);
static
int
MessageHandler
(
long
fduel
,
int
type
);
};
}
#endif //SINGLE_MODE_H
ocgcore/operations.cpp
View file @
a3cd3967
...
...
@@ -2181,7 +2181,13 @@ int32 field::destroy(uint16 step, group * targets, effect * reason_effect, uint3
case
5
:
{
core
.
operated_set
.
clear
();
core
.
operated_set
=
targets
->
container
;
returns
.
ivalue
[
0
]
=
targets
->
container
.
size
();
for
(
auto
cit
=
core
.
operated_set
.
begin
();
cit
!=
core
.
operated_set
.
end
();)
{
if
((
*
cit
)
->
current
.
reason
&
REASON_REPLACE
)
core
.
operated_set
.
erase
(
cit
++
);
else
cit
++
;
}
returns
.
ivalue
[
0
]
=
core
.
operated_set
.
size
();
pduel
->
delete_group
(
targets
);
return
TRUE
;
}
...
...
@@ -2483,7 +2489,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
if
(
core
.
deck_reversed
)
{
int32
d0
=
player
[
0
].
list_main
.
size
()
-
1
,
s0
=
d0
;
int32
d1
=
player
[
1
].
list_main
.
size
()
-
1
,
s1
=
d1
;
for
(
int
i
=
0
;
i
<
cv
.
size
();
++
i
)
{
for
(
int
i
=
0
;
i
<
cv
.
size
();
++
i
)
{
card
*
pcard
=
cv
[
i
];
if
(
pcard
->
current
.
location
!=
LOCATION_DECK
)
continue
;
...
...
script/c82003859.lua
View file @
a3cd3967
...
...
@@ -25,7 +25,7 @@ function c82003859.initial_effect(c)
e3
:
SetTargetRange
(
1
,
1
)
c
:
RegisterEffect
(
e3
)
end
function
c82003859
.
s
tcon
(
e
)
function
c82003859
.
a
tcon
(
e
)
c82003859
[
0
]
=
false
return
true
end
...
...
strings.conf
View file @
a3cd3967
...
...
@@ -209,8 +209,8 @@
!
system
1157
攻击
!
system
1158
查看列表
#menu
!
system
1200
局域网
模式
!
system
1201
N/A
!
system
1200
联机
模式
!
system
1201
单人模式
!
system
1202
观看录像
!
system
1203
N/A
!
system
1204
编辑卡组
...
...
@@ -309,6 +309,7 @@
!
system
1349
录像信息:
!
system
1350
离开
!
system
1351
投降
!
system
1352
主要信息:
!
system
1390
等待行动中...
!
system
1391
等待行动中....
!
system
1392
等待行动中.....
...
...
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