Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
f6c513ca
Commit
f6c513ca
authored
Mar 29, 2004
by
Sami Nopanen
Committed by
Alexandre Julliard
Mar 29, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented invisibleghost, deckx and decko drawing modes, and
improved ghost drawing mode.
parent
74bd1e47
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
18 deletions
+42
-18
.cvsignore
dlls/cards/.cvsignore
+3
-0
Makefile.in
dlls/cards/Makefile.in
+4
-1
cards.c
dlls/cards/cards.c
+33
-15
cards.h
dlls/cards/cards.h
+2
-2
cards.rc
dlls/cards/cards.rc
+0
-0
No files found.
dlls/cards/.cvsignore
View file @
f6c513ca
...
...
@@ -30,6 +30,7 @@ d9.bmp
dj.bmp
dk.bmp
dq.bmp
free.bmp
h1.bmp
h10.bmp
h2.bmp
...
...
@@ -57,4 +58,6 @@ s9.bmp
sj.bmp
sk.bmp
sq.bmp
theo.bmp
thex.bmp
version.res
dlls/cards/Makefile.in
View file @
f6c513ca
...
...
@@ -42,6 +42,7 @@ RC_BINARIES = \
dj.bmp
\
dk.bmp
\
dq.bmp
\
free.bmp
\
h1.bmp
\
h2.bmp
\
h3.bmp
\
...
...
@@ -68,7 +69,9 @@ RC_BINARIES = \
s10.bmp
\
sj.bmp
\
sk.bmp
\
sq.bmp
sq.bmp
\
theo.bmp
\
thex.bmp
@MAKE_DLL_RULES@
...
...
dlls/cards/cards.c
View file @
f6c513ca
...
...
@@ -86,6 +86,8 @@ BOOL WINAPI cdtDrawExt(HDC hdc, int x, int y, int dx, int dy, int card, int mode
DWORD
rasterOp
=
SRCCOPY
;
BOOL
roundCornersFlag
;
COLORREF
savedPixels
[
12
];
BOOL
eraseFlag
=
FALSE
;
BOOL
drawFlag
=
TRUE
;
TRACE
(
"(%p, %d, %d, %d, %d, %d, %d, %ld)
\n
"
,
hdc
,
x
,
y
,
dx
,
dy
,
card
,
mode
,
color
);
...
...
@@ -105,17 +107,41 @@ BOOL WINAPI cdtDrawExt(HDC hdc, int x, int y, int dx, int dy, int card, int mode
return
FALSE
;
}
if
(
mode
==
MODE_INVISIBLEGHOST
||
mode
==
MODE_DECKX
||
mode
==
MODE_DECKO
)
switch
(
mode
)
{
FIXME
(
"Mode %d not implemented.
\n
"
,
mode
);
return
FALSE
;
case
MODE_FACEUP
:
break
;
case
MODE_FACEDOWN
:
break
;
case
MODE_HILITE
:
rasterOp
=
NOTSRCCOPY
;
break
;
case
MODE_GHOST
:
card
=
CARD_FREE_MASK
;
eraseFlag
=
TRUE
;
rasterOp
=
SRCAND
;
break
;
case
MODE_REMOVE
:
eraseFlag
=
TRUE
;
drawFlag
=
FALSE
;
break
;
case
MODE_INVISIBLEGHOST
:
card
=
CARD_FREE_MASK
;
rasterOp
=
SRCAND
;
break
;
case
MODE_DECKX
:
card
=
CARD_BACK_THE_X
;
break
;
case
MODE_DECKO
:
card
=
CARD_BACK_THE_O
;
break
;
}
hMemoryDC
=
CreateCompatibleDC
(
hdc
);
if
(
hMemoryDC
==
0
)
return
FALSE
;
if
(
(
mode
==
MODE_REMOVE
)
||
(
mode
==
MODE_GHOST
)
)
if
(
eraseFlag
)
{
HBRUSH
hBrush
;
RECT
rect
;
...
...
@@ -125,18 +151,10 @@ BOOL WINAPI cdtDrawExt(HDC hdc, int x, int y, int dx, int dy, int card, int mode
rect
.
right
=
x
+
cardWidth
-
1
;
rect
.
bottom
=
y
+
cardHeight
-
1
;
FillRect
(
hdc
,
&
rect
,
hBrush
);
if
(
mode
==
MODE_GHOST
)
{
hBrush
=
CreateSolidBrush
(
RGB
(
255
,
255
,
255
));
FrameRect
(
hdc
,
&
rect
,
hBrush
);
}
}
else
/* MODE_FACEUP, MODE_FACEDOWN, MODE_HILITE */
{
if
(
mode
==
MODE_HILITE
)
rasterOp
=
NOTSRCCOPY
;
if
(
drawFlag
)
{
hCardBitmap
=
cardBitmaps
[
card
];
if
(
hCardBitmap
==
0
)
return
FALSE
;
...
...
@@ -204,7 +222,7 @@ BOOL WINAPI cdtDrawExt(HDC hdc, int x, int y, int dx, int dy, int card, int mode
* MODE_HILITE ; draw face up, with NOTSRCCOPY
* MODE_GHOST ; draw 'ghost' card
* MODE_REMOVE ; draw with background color
* MODE_INVISIBLEGHOST ;
?
* MODE_INVISIBLEGHOST ;
draw 'ghost' card, without clearing background
* MODE_DECKX ; draw X
* MODE_DECKO ; draw O
*
...
...
dlls/cards/cards.h
View file @
f6c513ca
...
...
@@ -29,9 +29,9 @@
/* 0-51 = normal 52 cards of deck */
/* 52 =
?
*/
/* 52 =
ghost card mask
*/
/* 53-68 = card backs */
#define CARD_
UNKNOWN
52
#define CARD_
FREE_MASK
52
#define CARD_BACK_CROSSHATCH 53
#define CARD_BACK_WEAVE1 54
#define CARD_BACK_WEAVE2 55
...
...
dlls/cards/cards.rc
View file @
f6c513ca
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