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
wyykak
ygopro
Commits
e33d4b1b
Commit
e33d4b1b
authored
Mar 26, 2012
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
3eda8ed1
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
31 deletions
+47
-31
gframe/drawing.cpp
gframe/drawing.cpp
+7
-10
gframe/game.h
gframe/game.h
+6
-0
gframe/image_manager.cpp
gframe/image_manager.cpp
+22
-16
ocgcore/field.cpp
ocgcore/field.cpp
+1
-1
ocgcore/processor.cpp
ocgcore/processor.cpp
+6
-0
script/c18096222.lua
script/c18096222.lua
+2
-1
script/c8198712.lua
script/c8198712.lua
+1
-1
system.conf
system.conf
+2
-2
No files found.
gframe/drawing.cpp
View file @
e33d4b1b
...
...
@@ -703,20 +703,17 @@ void Game::WaitFrameSignal(int frame) {
frameSignal
.
Wait
();
}
void
Game
::
DrawThumb
(
code_pointer
cp
,
position2di
pos
,
std
::
unordered_map
<
int
,
int
>*
lflist
)
{
const
int
width
=
44
;
//standard pic size, maybe it should be defined in game.h
const
int
height
=
64
;
const
int
width
=
44
;
//standard pic size, maybe it should be defined in game.h
const
int
height
=
64
;
int
code
=
cp
->
first
;
int
lcode
=
cp
->
second
.
alias
;
if
(
lcode
==
0
)
lcode
=
code
;
irr
::
video
::
ITexture
*
img
=
imageManager
.
GetTextureThumb
(
code
);
if
(
img
==
NULL
)
return
;
//NULL->getSize() will cause a crash
dimension2d
<
u32
>
size
=
img
->
getSize
();
if
(
size
.
Width
==
width
and
size
.
Height
==
height
)
driver
->
draw2DImage
(
img
,
pos
);
else
driver
->
draw2DImage
(
img
,
rect
<
s32
>
(
pos
.
X
,
pos
.
Y
,
pos
.
X
+
width
,
pos
.
Y
+
height
),
rect
<
s32
>
(
0
,
0
,
size
.
Width
,
size
.
Height
));
irr
::
video
::
ITexture
*
img
=
imageManager
.
GetTextureThumb
(
code
);
if
(
img
==
NULL
)
return
;
//NULL->getSize() will cause a crash
dimension2d
<
u32
>
size
=
img
->
getOriginalSize
();
driver
->
draw2DImage
(
img
,
rect
<
s32
>
(
pos
.
X
,
pos
.
Y
,
pos
.
X
+
width
,
pos
.
Y
+
height
),
rect
<
s32
>
(
0
,
0
,
size
.
Width
,
size
.
Height
));
if
(
lflist
->
count
(
lcode
))
{
switch
((
*
lflist
)[
lcode
])
{
...
...
gframe/game.h
View file @
e33d4b1b
...
...
@@ -270,6 +270,12 @@ public:
irr
::
gui
::
IGUIButton
*
btnRepos
;
irr
::
gui
::
IGUIButton
*
btnAttack
;
irr
::
gui
::
IGUIButton
*
btnShowList
;
//chat window
irr
::
gui
::
IGUIWindow
*
wChat
;
irr
::
gui
::
IGUIListBox
*
lstChatLog
;
irr
::
gui
::
IGUIEditBox
*
ebChatInput
;
irr
::
gui
::
IGUICheckBox
*
chkIgnore1
;
irr
::
gui
::
IGUICheckBox
*
chkIgnore2
;
//phase button
irr
::
gui
::
IGUIStaticText
*
wPhase
;
irr
::
gui
::
IGUIButton
*
btnDP
;
...
...
gframe/image_manager.cpp
View file @
e33d4b1b
...
...
@@ -42,7 +42,7 @@ void ImageManager::ClearTexture() {
}
void
ImageManager
::
RemoveTexture
(
int
code
)
{
auto
tit
=
tMap
.
find
(
code
);
if
(
tit
!=
tMap
.
end
()
and
tThumb
.
find
(
code
)
->
second
!=
tit
->
second
)
{
//if member of tThumb point to this; don't remove
if
(
tit
!=
tMap
.
end
()
)
{
if
(
tit
->
second
)
driver
->
removeTexture
(
tit
->
second
);
tMap
.
erase
(
tit
);
...
...
@@ -56,14 +56,17 @@ irr::video::ITexture* ImageManager::GetTexture(int code) {
char
file
[
256
];
sprintf
(
file
,
"pics/%d.jpg"
,
code
);
//suggest that define the path in game.h
irr
::
video
::
ITexture
*
img
=
driver
->
getTexture
(
file
);
if
(
img
==
NULL
){
sprintf
(
file
,
"pics/thumbnail/%d.jpg"
,
code
);
img
=
driver
->
getTexture
(
file
);
if
(
img
)
tThumb
[
code
]
=
img
;
if
(
img
==
NULL
)
{
sprintf
(
file
,
"pics/thumbnail/%d.jpg"
,
code
);
img
=
driver
->
getTexture
(
file
);
}
if
(
img
==
NULL
)
{
tMap
[
code
]
=
tUnknown
;
return
tUnknown
;
}
else
{
tMap
[
code
]
=
img
;
return
img
;
}
tMap
[
code
]
=
img
;
return
img
;
}
if
(
tit
->
second
)
return
tit
->
second
;
...
...
@@ -78,16 +81,19 @@ irr::video::ITexture* ImageManager::GetTextureThumb(int code) {
char
file
[
32
];
sprintf
(
file
,
"pics/thumbnail/%d.jpg"
,
code
);
irr
::
video
::
ITexture
*
img
=
driver
->
getTexture
(
file
);
if
(
img
==
NULL
){
sprintf
(
file
,
"pics/%d.jpg"
,
code
);
img
=
driver
->
getTexture
(
file
);
if
(
img
)
tMap
[
code
]
=
img
;
if
(
img
==
NULL
)
{
sprintf
(
file
,
"pics/%d.jpg"
,
code
);
img
=
driver
->
getTexture
(
file
);
}
if
(
img
==
NULL
)
{
tThumb
[
code
]
=
tUnknown
;
return
tUnknown
;
}
else
{
tThumb
[
code
]
=
img
;
return
img
;
}
tThumb
[
code
]
=
img
;
return
img
;
}
if
(
tit
->
second
)
if
(
tit
->
second
)
return
tit
->
second
;
else
return
tUnknown
;
...
...
ocgcore/field.cpp
View file @
e33d4b1b
...
...
@@ -16,7 +16,7 @@
int32
field
::
field_used_count
[
32
]
=
{
0
,
1
,
1
,
2
,
1
,
2
,
2
,
3
,
1
,
2
,
2
,
3
,
2
,
3
,
3
,
4
,
1
,
2
,
2
,
3
,
2
,
3
,
3
,
4
,
2
,
3
,
3
,
4
,
3
,
4
,
4
,
5
};
bool
chain
::
chain_operation_sort
(
chain
c1
,
chain
c2
)
{
return
c1
.
triggering_effect
->
id
>
c2
.
triggering_effect
->
id
;
return
c1
.
triggering_effect
->
id
<
c2
.
triggering_effect
->
id
;
}
field
::
field
(
duel
*
pduel
)
{
this
->
pduel
=
pduel
;
...
...
ocgcore/processor.cpp
View file @
e33d4b1b
...
...
@@ -1235,6 +1235,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
peffect = pr.first->second;
if(!peffect->is_activateable(check_player, nil_event))
continue;
peffect->id = infos.effect_id++;
newchain.triggering_effect = peffect;
core.select_chains.push_back(newchain);
to_count++;
...
...
@@ -1252,6 +1253,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
peffect = pr.first->second;
if(!peffect->is_chainable(check_player) || !peffect->is_activateable(check_player, nil_event))
continue;
peffect->id = infos.effect_id++;
newchain.triggering_effect = peffect;
if(check_hint_timing(peffect))
core.spe_effect[check_player]++;
...
...
@@ -1263,6 +1265,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
peffect = pr.first->second;
if(!peffect->is_chainable(check_player) || !peffect->is_activateable(check_player, nil_event))
continue;
peffect->id = infos.effect_id++;
newchain.triggering_effect = peffect;
if(check_hint_timing(peffect))
core.spe_effect[check_player]++;
...
...
@@ -1362,6 +1365,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
peffect = pr.first->second;
if(!peffect->is_activateable(check_player, nil_event))
continue;
peffect->id = infos.effect_id++;
newchain.triggering_effect = peffect;
core.select_chains.push_back(newchain);
to_count++;
...
...
@@ -1379,6 +1383,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
peffect = pr.first->second;
if(!peffect->is_chainable(check_player) || !peffect->is_activateable(check_player, nil_event))
continue;
peffect->id = infos.effect_id++;
newchain.triggering_effect = peffect;
if(check_hint_timing(peffect))
core.spe_effect[check_player]++;
...
...
@@ -1390,6 +1395,7 @@ int32 field::process_phase_event(int16 step, int32 phase) {
peffect = pr.first->second;
if(!peffect->is_chainable(check_player) || !peffect->is_activateable(check_player, nil_event))
continue;
peffect->id = infos.effect_id++;
newchain.triggering_effect = peffect;
if(check_hint_timing(peffect))
core.spe_effect[check_player]++;
...
...
script/c18096222.lua
View file @
e33d4b1b
...
...
@@ -62,7 +62,8 @@ function c18096222.eqlimit(e,c)
return
c
:
GetControler
()
==
e
:
GetOwnerPlayer
()
and
c
:
IsType
(
TYPE_DUAL
)
end
function
c18096222
.
dacon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsLocation
(
LOCATION_GRAVE
)
and
e
:
GetHandler
():
GetEquipTarget
()
~=
nil
return
e
:
GetHandler
():
IsLocation
(
LOCATION_GRAVE
)
and
e
:
GetHandler
():
IsReason
(
REASON_DESTROY
)
and
e
:
GetHandler
():
GetEquipTarget
()
~=
nil
end
function
c18096222
.
dafilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_DUAL
)
and
not
c
:
IsDualState
()
...
...
script/c8198712.lua
View file @
e33d4b1b
...
...
@@ -4,5 +4,5 @@ function c8198712.initial_effect(c)
end
function
c8198712
.
ritual_filter
(
c
)
local
code
=
c
:
GetCode
()
return
c
==
72426662
or
c
==
46427957
return
c
ode
==
72426662
or
code
==
46427957
end
system.conf
View file @
e33d4b1b
...
...
@@ -3,9 +3,9 @@
antialias
=
2
nickname
=
Player
gamename
=
Game
lastdeck
=
sixsamurai
lastdeck
=
test
textfont
=
c
:/
windows
/
fonts
/
simsun
.
ttc
14
numfont
=
c
:/
windows
/
fonts
/
arialbd
.
ttf
serverport
=
7911
lastip
=
192
.
168
.
2
.
100
lastip
=
192
.
168
.
3
.
235
lastport
=
7911
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