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
REIKAI
ygopro
Commits
862e5463
Commit
862e5463
authored
Jun 19, 2017
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove useless texture
parent
842c7a08
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
73 additions
and
108 deletions
+73
-108
gframe/client_card.h
gframe/client_card.h
+0
-1
gframe/client_field.cpp
gframe/client_field.cpp
+18
-54
gframe/client_field.h
gframe/client_field.h
+1
-1
gframe/config.h
gframe/config.h
+1
-1
gframe/drawing.cpp
gframe/drawing.cpp
+44
-42
gframe/duelclient.cpp
gframe/duelclient.cpp
+7
-9
gframe/image_manager.cpp
gframe/image_manager.cpp
+2
-0
No files found.
gframe/client_card.h
View file @
862e5463
...
...
@@ -47,7 +47,6 @@ typedef std::unordered_map<unsigned int, CardDataC>::const_iterator code_pointer
class
ClientCard
{
public:
irr
::
video
::
ITexture
*
curTexture
;
irr
::
core
::
matrix4
mTransform
;
irr
::
core
::
vector3df
curPos
;
irr
::
core
::
vector3df
curRot
;
...
...
gframe/client_field.cpp
View file @
862e5463
...
...
@@ -93,9 +93,7 @@ void ClientField::Initial(int player, int deckc, int extrac) {
pcard
->
location
=
0x1
;
pcard
->
sequence
=
i
;
pcard
->
position
=
POS_FACEDOWN_DEFENSE
;
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
);
pcard
->
mTransform
.
setTranslation
(
pcard
->
curPos
);
pcard
->
mTransform
.
setRotationRadians
(
pcard
->
curRot
);
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
,
true
);
}
for
(
int
i
=
0
;
i
<
extrac
;
++
i
)
{
pcard
=
new
ClientCard
;
...
...
@@ -105,9 +103,7 @@ void ClientField::Initial(int player, int deckc, int extrac) {
pcard
->
location
=
0x40
;
pcard
->
sequence
=
i
;
pcard
->
position
=
POS_FACEDOWN_DEFENSE
;
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
);
pcard
->
mTransform
.
setTranslation
(
pcard
->
curPos
);
pcard
->
mTransform
.
setRotationRadians
(
pcard
->
curRot
);
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
,
true
);
}
}
ClientCard
*
ClientField
::
GetCard
(
int
controler
,
int
location
,
int
sequence
,
int
sub_seq
)
{
...
...
@@ -582,63 +578,47 @@ void ClientField::ReplaySwap() {
for
(
int
p
=
0
;
p
<
2
;
++
p
)
{
for
(
auto
cit
=
deck
[
p
].
begin
();
cit
!=
deck
[
p
].
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
for
(
auto
cit
=
hand
[
p
].
begin
();
cit
!=
hand
[
p
].
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
for
(
auto
cit
=
mzone
[
p
].
begin
();
cit
!=
mzone
[
p
].
end
();
++
cit
)
{
if
(
*
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
szone
[
p
].
begin
();
cit
!=
szone
[
p
].
end
();
++
cit
)
{
if
(
*
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
grave
[
p
].
begin
();
cit
!=
grave
[
p
].
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
for
(
auto
cit
=
remove
[
p
].
begin
();
cit
!=
remove
[
p
].
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
for
(
auto
cit
=
extra
[
p
].
begin
();
cit
!=
extra
[
p
].
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
overlay_cards
.
begin
();
cit
!=
overlay_cards
.
end
();
++
cit
)
{
(
*
cit
)
->
controler
=
1
-
(
*
cit
)
->
controler
;
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
mainGame
->
dInfo
.
isFirst
=
!
mainGame
->
dInfo
.
isFirst
;
...
...
@@ -656,56 +636,40 @@ void ClientField::ReplaySwap() {
void
ClientField
::
RefreshAllCards
()
{
for
(
int
p
=
0
;
p
<
2
;
++
p
)
{
for
(
auto
cit
=
deck
[
p
].
begin
();
cit
!=
deck
[
p
].
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
for
(
auto
cit
=
hand
[
p
].
begin
();
cit
!=
hand
[
p
].
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
for
(
auto
cit
=
mzone
[
p
].
begin
();
cit
!=
mzone
[
p
].
end
();
++
cit
)
{
if
(
*
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
szone
[
p
].
begin
();
cit
!=
szone
[
p
].
end
();
++
cit
)
{
if
(
*
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
grave
[
p
].
begin
();
cit
!=
grave
[
p
].
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
for
(
auto
cit
=
remove
[
p
].
begin
();
cit
!=
remove
[
p
].
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
for
(
auto
cit
=
extra
[
p
].
begin
();
cit
!=
extra
[
p
].
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
}
for
(
auto
cit
=
overlay_cards
.
begin
();
cit
!=
overlay_cards
.
end
();
++
cit
)
{
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
);
(
*
cit
)
->
mTransform
.
setTranslation
((
*
cit
)
->
curPos
);
(
*
cit
)
->
mTransform
.
setRotationRadians
((
*
cit
)
->
curRot
);
GetCardLocation
(
*
cit
,
&
(
*
cit
)
->
curPos
,
&
(
*
cit
)
->
curRot
,
true
);
(
*
cit
)
->
is_moving
=
false
;
}
}
...
...
gframe/client_field.h
View file @
862e5463
...
...
@@ -8,7 +8,7 @@ namespace ygo {
class
ClientCard
;
struct
ChainInfo
{
struct
ChainInfo
{
irr
::
core
::
vector3df
chain_pos
;
ClientCard
*
chain_card
;
int
code
;
...
...
gframe/config.h
View file @
862e5463
...
...
@@ -4,7 +4,7 @@
#pragma once
#define _IRR_STATIC_LIB_
#define
_
IRR_COMPILE_WITH_DX9_DEV_PACK
#define IRR_COMPILE_WITH_DX9_DEV_PACK
#ifdef _WIN32
#include <WinSock2.h>
...
...
gframe/drawing.cpp
View file @
862e5463
...
...
@@ -24,6 +24,7 @@ void Game::DrawSelectionLine(irr::video::S3DVertex* vec, bool strip, int width,
glEnd
();
glMaterialfv
(
GL_FRONT
,
GL_AMBIENT
,
origin
);
glDisable
(
GL_LINE_STIPPLE
);
glEnable
(
GL_TEXTURE_2D
);
}
else
{
driver
->
setMaterial
(
matManager
.
mOutLine
);
if
(
strip
)
{
...
...
@@ -64,39 +65,39 @@ void Game::DrawBackGround() {
//draw field
//draw field spell card
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
irr
::
core
::
IdentityMatrix
);
int
fieldcode1
=
-
1
;
int
fieldcode2
=
-
1
;
bool
drawField
=
false
;
int
rule
=
(
dInfo
.
duel_rule
>=
4
)
?
1
:
0
;
if
(
mainGame
->
gameConf
.
draw_field_spell
&&
mainGame
->
dField
.
szone
[
0
][
5
]
&&
mainGame
->
dField
.
szone
[
0
][
5
]
->
position
&
POS_FACEUP
)
fieldcode1
=
mainGame
->
dField
.
szone
[
0
][
5
]
->
code
;
if
(
mainGame
->
gameConf
.
draw_field_spell
&&
mainGame
->
dField
.
szone
[
1
][
5
]
&&
mainGame
->
dField
.
szone
[
1
][
5
]
->
position
&
POS_FACEUP
)
fieldcode2
=
mainGame
->
dField
.
szone
[
1
][
5
]
->
code
;
int
fieldcode
=
(
fieldcode1
>
0
)
?
fieldcode1
:
fieldcode2
;
if
(
fieldcode1
>
0
&&
fieldcode2
>
0
&&
fieldcode1
!=
fieldcode2
)
{
ITexture
*
texture
=
imageManager
.
GetTextureField
(
fieldcode1
);
if
(
texture
)
{
drawField
=
true
;
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell1
,
4
,
matManager
.
iRectangle
,
2
);
}
texture
=
imageManager
.
GetTextureField
(
fieldcode2
);
if
(
texture
)
{
drawField
=
true
;
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell2
,
4
,
matManager
.
iRectangle
,
2
);
}
}
else
if
(
fieldcode
>
0
)
{
ITexture
*
texture
=
imageManager
.
GetTextureField
(
fieldcode
);
if
(
texture
)
{
drawField
=
true
;
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell
,
4
,
matManager
.
iRectangle
,
2
);
if
(
mainGame
->
gameConf
.
draw_field_spell
)
{
int
fieldcode1
=
-
1
;
int
fieldcode2
=
-
1
;
if
(
mainGame
->
dField
.
szone
[
0
][
5
]
&&
mainGame
->
dField
.
szone
[
0
][
5
]
->
position
&
POS_FACEUP
)
fieldcode1
=
mainGame
->
dField
.
szone
[
0
][
5
]
->
code
;
if
(
mainGame
->
dField
.
szone
[
1
][
5
]
&&
mainGame
->
dField
.
szone
[
1
][
5
]
->
position
&
POS_FACEUP
)
fieldcode2
=
mainGame
->
dField
.
szone
[
1
][
5
]
->
code
;
int
fieldcode
=
(
fieldcode1
>
0
)
?
fieldcode1
:
fieldcode2
;
if
(
fieldcode1
>
0
&&
fieldcode2
>
0
&&
fieldcode1
!=
fieldcode2
)
{
ITexture
*
texture
=
imageManager
.
GetTextureField
(
fieldcode1
);
if
(
texture
)
{
drawField
=
true
;
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell1
,
4
,
matManager
.
iRectangle
,
2
);
}
texture
=
imageManager
.
GetTextureField
(
fieldcode2
);
if
(
texture
)
{
drawField
=
true
;
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell2
,
4
,
matManager
.
iRectangle
,
2
);
}
}
else
if
(
fieldcode
>
0
)
{
ITexture
*
texture
=
imageManager
.
GetTextureField
(
fieldcode
);
if
(
texture
)
{
drawField
=
true
;
matManager
.
mTexture
.
setTexture
(
0
,
texture
);
driver
->
setMaterial
(
matManager
.
mTexture
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vFieldSpell
,
4
,
matManager
.
iRectangle
,
2
);
}
}
}
matManager
.
mTexture
.
setTexture
(
0
,
drawField
?
imageManager
.
tFieldTransparent
[
rule
]
:
imageManager
.
tField
[
rule
]);
...
...
@@ -249,7 +250,6 @@ void Game::DrawCards() {
DrawCard
(
*
cit
);
}
void
Game
::
DrawCard
(
ClientCard
*
pcard
)
{
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
pcard
->
mTransform
);
if
(
pcard
->
aniFrame
)
{
if
(
pcard
->
is_moving
)
{
pcard
->
curPos
+=
pcard
->
dPos
;
...
...
@@ -267,16 +267,18 @@ void Game::DrawCard(ClientCard* pcard) {
}
matManager
.
mCard
.
AmbientColor
=
0xffffffff
;
matManager
.
mCard
.
DiffuseColor
=
(
pcard
->
curAlpha
<<
24
)
|
0xffffff
;
matManager
.
mCard
.
setTexture
(
0
,
imageManager
.
GetTexture
(
pcard
->
code
));
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
pcard
->
mTransform
);
driver
->
setMaterial
(
matManager
.
mCard
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vCardFront
,
4
,
matManager
.
iRectangle
,
2
);
if
(
pcard
->
controler
==
0
||
!
imageManager
.
tCover
[
1
])
matManager
.
mCard
.
setTexture
(
0
,
imageManager
.
tCover
[
0
]);
else
matManager
.
mCard
.
setTexture
(
0
,
imageManager
.
tCover
[
1
]);
driver
->
setMaterial
(
matManager
.
mCard
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vCardBack
,
4
,
matManager
.
iRectangle
,
2
);
auto
cosy
=
std
::
cos
(
pcard
->
curRot
.
Y
);
if
(
cosy
>
-
0.99
f
)
{
matManager
.
mCard
.
setTexture
(
0
,
imageManager
.
GetTexture
(
pcard
->
code
));
driver
->
setMaterial
(
matManager
.
mCard
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vCardFront
,
4
,
matManager
.
iRectangle
,
2
);
}
if
(
cosy
<
0.99
f
)
{
matManager
.
mCard
.
setTexture
(
0
,
imageManager
.
tCover
[
pcard
->
controler
]);
driver
->
setMaterial
(
matManager
.
mCard
);
driver
->
drawVertexPrimitiveList
(
matManager
.
vCardBack
,
4
,
matManager
.
iRectangle
,
2
);
}
if
(
pcard
->
is_showequip
)
{
matManager
.
mTexture
.
setTexture
(
0
,
imageManager
.
tEquip
);
driver
->
setMaterial
(
matManager
.
mTexture
);
...
...
@@ -845,7 +847,7 @@ void Game::DrawSpec() {
matk
.
setRotationRadians
(
atk_r
);
driver
->
setTransform
(
irr
::
video
::
ETS_WORLD
,
matk
);
driver
->
setMaterial
(
matManager
.
mATK
);
driver
->
drawVertexPrimitiveList
(
&
matManager
.
vArrow
[
attack_sv
],
40
,
matManager
.
iArrow
,
10
,
EVT_STANDARD
,
EPT_TRIANGLE_STRIP
);
driver
->
drawVertexPrimitiveList
(
&
matManager
.
vArrow
[
attack_sv
],
12
,
matManager
.
iArrow
,
10
,
EVT_STANDARD
,
EPT_TRIANGLE_STRIP
);
attack_sv
+=
4
;
if
(
attack_sv
>
28
)
attack_sv
=
0
;
...
...
gframe/duelclient.cpp
View file @
862e5463
...
...
@@ -2008,9 +2008,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
dField
.
AddCard
(
pcard
,
cc
,
cl
,
cs
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
dField
.
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
);
pcard
->
mTransform
.
setTranslation
(
pcard
->
curPos
);
pcard
->
mTransform
.
setRotationRadians
(
pcard
->
curRot
);
mainGame
->
dField
.
GetCardLocation
(
pcard
,
&
pcard
->
curPos
,
&
pcard
->
curRot
,
true
);
pcard
->
curAlpha
=
5
;
mainGame
->
dField
.
FadeCard
(
pcard
,
255
,
20
);
mainGame
->
WaitFrameSignal
(
20
);
...
...
@@ -2368,12 +2366,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
dField
.
GetChainLocation
(
cc
,
cl
,
cs
,
&
mainGame
->
dField
.
current_chain
.
chain_pos
);
mainGame
->
dField
.
current_chain
.
solved
=
false
;
int
chc
=
0
;
for
(
size_t
i
=
0
;
i
<
mainGame
->
dField
.
chains
.
size
();
++
i
)
{
for
(
auto
chit
=
mainGame
->
dField
.
chains
.
begin
();
chit
!=
mainGame
->
dField
.
chains
.
end
();
++
chit
)
{
if
(
cl
==
0x10
||
cl
==
0x20
)
{
if
(
mainGame
->
dField
.
chains
[
i
].
controler
==
cc
&&
mainGame
->
dField
.
chains
[
i
].
location
==
cl
)
if
(
chit
->
controler
==
cc
&&
chit
->
location
==
cl
)
chc
++
;
}
else
{
if
(
mainGame
->
dField
.
chains
[
i
].
controler
==
cc
&&
mainGame
->
dField
.
chains
[
i
].
location
==
cl
&&
mainGame
->
dField
.
chains
[
i
].
sequence
==
cs
)
if
(
chit
->
controler
==
cc
&&
chit
->
location
==
cl
&&
chit
->
sequence
==
cs
)
chc
++
;
}
}
...
...
@@ -3318,12 +3316,12 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame
->
dField
.
GetChainLocation
(
cc
,
cl
,
cs
,
&
mainGame
->
dField
.
current_chain
.
chain_pos
);
mainGame
->
dField
.
current_chain
.
solved
=
false
;
int
chc
=
0
;
for
(
size_t
i
=
0
;
i
<
mainGame
->
dField
.
chains
.
size
();
++
i
)
{
for
(
auto
chit
=
mainGame
->
dField
.
chains
.
begin
();
chit
!=
mainGame
->
dField
.
chains
.
end
();
++
chit
)
{
if
(
cl
==
0x10
||
cl
==
0x20
)
{
if
(
mainGame
->
dField
.
chains
[
i
].
controler
==
cc
&&
mainGame
->
dField
.
chains
[
i
].
location
==
cl
)
if
(
chit
->
controler
==
cc
&&
chit
->
location
==
cl
)
chc
++
;
}
else
{
if
(
mainGame
->
dField
.
chains
[
i
].
controler
==
cc
&&
mainGame
->
dField
.
chains
[
i
].
location
==
cl
&&
mainGame
->
dField
.
chains
[
i
].
sequence
==
cs
)
if
(
chit
->
controler
==
cc
&&
chit
->
location
==
cl
&&
chit
->
sequence
==
cs
)
chc
++
;
}
}
...
...
gframe/image_manager.cpp
View file @
862e5463
...
...
@@ -7,6 +7,8 @@ ImageManager imageManager;
bool
ImageManager
::
Initial
()
{
tCover
[
0
]
=
driver
->
getTexture
(
"textures/cover.jpg"
);
tCover
[
1
]
=
driver
->
getTexture
(
"textures/cover2.jpg"
);
if
(
!
tCover
[
1
])
tCover
[
1
]
=
tCover
[
0
];
tUnknown
=
driver
->
getTexture
(
"textures/unknown.jpg"
);
tAct
=
driver
->
getTexture
(
"textures/act.png"
);
tAttack
=
driver
->
getTexture
(
"textures/attack.png"
);
...
...
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