[CARDLIB]

* Move some inclusions to the main header.
* Remove inclusions and definitions that already exist in the main header.
CORE-7716

svn path=/trunk/; revision=61532
This commit is contained in:
Amine Khaldi 2014-01-04 15:01:58 +00:00
parent d8b726afc2
commit 8bda2730f2
21 changed files with 24 additions and 112 deletions

View file

@ -102,4 +102,4 @@ private:
bool fFaceUp; bool fFaceUp;
}; };
#endif #endif /* _CARD_INCLUDED */

View file

@ -5,16 +5,7 @@
// Copyright J Brown 2001 // Copyright J Brown 2001
// //
//#include <windows.h> #include "cardlib.h"
#define WIN32_NO_STATUS
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
#include "globals.h"
#include "cardcolor.h"
#ifndef __REACTOS__ #ifndef __REACTOS__
#pragma comment( lib, "..\\CardLib\\cards16.lib" ) #pragma comment( lib, "..\\CardLib\\cards16.lib" )

View file

@ -4,16 +4,8 @@
// Freeware // Freeware
// Copyright J Brown 2001 // Copyright J Brown 2001
// //
//#include <windows.h>
//#include <tchar.h>
#define WIN32_NO_STATUS
#include <windef.h>
#include "cardlib.h" #include "cardlib.h"
//#include "cardwindow.h"
//#include "cardbutton.h"
#include "cardcolor.h"
HPALETTE UseNicePalette(HDC, HPALETTE); HPALETTE UseNicePalette(HDC, HPALETTE);
void RestorePalette(HDC, HPALETTE); void RestorePalette(HDC, HPALETTE);

View file

@ -3,8 +3,6 @@
#define MAXBUTTONTEXT 64 #define MAXBUTTONTEXT 64
//#include "cardlib.h"
class CardButton class CardButton
{ {
friend class CardWindow; friend class CardWindow;
@ -98,4 +96,4 @@ private:
pButtonProc ButtonCallback; pButtonProc ButtonCallback;
}; };
#endif #endif /* CARDBUTTON_INCLUDED */

View file

@ -1,11 +1,8 @@
// //
// Colour support // Colour support
// //
//#include <windows.h>
#define WIN32_NO_STATUS #include "cardlib.h"
#include <windef.h>
#include <wingdi.h>
#define MakeRGB RGB #define MakeRGB RGB

View file

@ -1,3 +1,4 @@
#pragma once
COLORREF ColorScaleRGB( const COLORREF Col1, COLORREF ColorScaleRGB( const COLORREF Col1,
const COLORREF Col2, const COLORREF Col2,

View file

@ -18,6 +18,7 @@
// //
// count.Clear(); // count.Clear();
// //
#include "cardcount.h" #include "cardcount.h"
CardCount::CardCount() CardCount::CardCount()

View file

@ -1,18 +1,6 @@
#ifndef _CARDCOUNT_INCLUDED #ifndef _CARDCOUNT_INCLUDED
#define _CARDCOUNT_INCLUDED #define _CARDCOUNT_INCLUDED
//#include <windows.h>
#define WIN32_NO_STATUS
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
#include <stdlib.h>
#include "cardstack.h"
class CardCount class CardCount
{ {
public: public:
@ -36,4 +24,4 @@ private:
//(ace,2,3,4,5,6,7,8,9,10,J,Q,K) //(ace,2,3,4,5,6,7,8,9,10,J,Q,K)
}; };
#endif #endif /* _CARDCOUNT_INCLUDED */

View file

@ -4,13 +4,8 @@
// Freeware // Freeware
// Copyright J Brown 2001 // Copyright J Brown 2001
// //
//#include <windows.h>
#define WIN32_NO_STATUS
#include <windef.h>
#include "cardlib.h" #include "cardlib.h"
//#include "globals.h"
void LoadCardBitmaps(void); void LoadCardBitmaps(void);

View file

@ -2,11 +2,13 @@
#define CARDLIB_INCLUDED #define CARDLIB_INCLUDED
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h>
#define WIN32_NO_STATUS #define WIN32_NO_STATUS
#include <windef.h> #include <windef.h>
#include <winbase.h> #include <winbase.h>
#include <wingdi.h> #include <wingdi.h>
#include <winuser.h>
#define CARDLIBPROC __stdcall #define CARDLIBPROC __stdcall
@ -91,12 +93,13 @@ typedef int (CARDLIBPROC *pDropZoneProc) (int dzid, const CardStack &cards);
typedef void (CARDLIBPROC *pButtonProc) (CardButton &pButton); typedef void (CARDLIBPROC *pButtonProc) (CardButton &pButton);
#include "globals.h"
//#include "card.h" #include "card.h"
#include "cardbutton.h" #include "cardbutton.h"
//#include "cardstack.h" #include "cardcolor.h"
#include "cardstack.h"
#include "cardregion.h" #include "cardregion.h"
#include "cardcount.h" #include "dropzone.h"
#include "cardwindow.h" #include "cardwindow.h"
#ifdef _DEBUG #ifdef _DEBUG
@ -104,5 +107,4 @@ typedef bool (CARDLIBPROC *pDebugClickProc) (CardRegion &stackobj);
void CardLib_SetStackClickProc(pDebugClickProc proc); void CardLib_SetStackClickProc(pDebugClickProc proc);
#endif #endif
#endif /* CARDLIB_INCLUDED */
#endif

View file

@ -4,15 +4,8 @@
// Freeware // Freeware
// Copyright J Brown 2001 // Copyright J Brown 2001
// //
//#include <windows.h>
#define WIN32_NO_STATUS
#include <windef.h>
#include "cardlib.h" #include "cardlib.h"
//#include "cardregion.h"
//#include "cardwindow.h"
//#include "cardcolor.h"
HBITMAP CreateSinkBmp(HDC hdcCompat, HDC hdc, int width, int height); HBITMAP CreateSinkBmp(HDC hdcCompat, HDC hdc, int width, int height);

View file

@ -1,10 +1,6 @@
#ifndef CARDREGION_INCLUDED #ifndef CARDREGION_INCLUDED
#define CARDREGION_INCLUDED #define CARDREGION_INCLUDED
#include "globals.h"
#include "cardstack.h"
//#include "cardlib.h"
class CardWindow; class CardWindow;
// //
@ -215,5 +211,4 @@ private:
HANDLE mxlock; HANDLE mxlock;
}; };
#endif #endif /* CARDREGION_INCLUDED */

View file

@ -4,15 +4,8 @@
// Freeware // Freeware
// Copyright J Brown 2001 // Copyright J Brown 2001
// //
//#include <windows.h>
#define WIN32_NO_STATUS
#include <windef.h>
//#include <stdlib.h>
#include "cardlib.h" #include "cardlib.h"
//#include "cardregion.h"
//#include "cardcolor.h"
HPALETTE UseNicePalette(HDC hdc, HPALETTE hPalette); HPALETTE UseNicePalette(HDC hdc, HPALETTE hPalette);
void PaintRect(HDC hdc, RECT *rect, COLORREF colour); void PaintRect(HDC hdc, RECT *rect, COLORREF colour);

View file

@ -4,17 +4,10 @@
// Freeware // Freeware
// Copyright J Brown 2001 // Copyright J Brown 2001
// //
//#include <windows.h>
#define WIN32_NO_STATUS
#include <windef.h>
#include <math.h>
//#include <stdio.h>
#include "cardlib.h" #include "cardlib.h"
//#include "cardwindow.h"
//#include "cardregion.h" #include <math.h>
#if 1 #if 1
#define TRACE(s) #define TRACE(s)

View file

@ -4,12 +4,6 @@
// Freeware // Freeware
// Copyright J Brown 2001 // Copyright J Brown 2001
// //
//#include <windows.h>
#define WIN32_NO_STATUS
#include <windef.h>
#include <stdlib.h>
#include "cardstack.h" #include "cardstack.h"

View file

@ -1,8 +1,6 @@
#ifndef CARDSTACK_INCLUDED #ifndef CARDSTACK_INCLUDED
#define CARDSTACK_INCLUDED #define CARDSTACK_INCLUDED
#include "card.h"
#define MAX_CARDSTACK_SIZE 128 #define MAX_CARDSTACK_SIZE 128
class CardStack class CardStack
@ -50,4 +48,5 @@ private:
int nNumCards; int nNumCards;
}; };
#endif #endif /* CARDSTACK_INCLUDED */

View file

@ -4,20 +4,10 @@
// Freeware // Freeware
// Copyright J Brown 2001 // Copyright J Brown 2001
// //
//#include <windows.h>
#define WIN32_NO_STATUS #include "cardlib.h"
#include <windef.h>
#include <tchar.h> #include <tchar.h>
//#include <stdlib.h>
//#include "globals.h"
#include "cardlib.h"
//#include "cardbutton.h"
//#include "cardregion.h"
//#include "cardwindow.h"
#include "cardcolor.h"
extern HPALETTE __holdplacepal; extern HPALETTE __holdplacepal;

View file

@ -5,9 +5,6 @@
#define MAXCARDSTACKS 32 #define MAXCARDSTACKS 32
#define MAXDROPZONES 8 #define MAXDROPZONES 8
#include "dropzone.h"
//#include "cardlib.h"
class CardRegion; class CardRegion;
class CardButton; class CardButton;
@ -116,5 +113,4 @@ static LRESULT CALLBACK CardWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM
}; };
#endif /* CARDBOARD_INCLUDED */
#endif

View file

@ -4,14 +4,8 @@
// Freeware // Freeware
// Copyright J Brown 2001 // Copyright J Brown 2001
// //
//#include <windows.h>
#define WIN32_NO_STATUS
#include <windef.h>
#include "cardlib.h" #include "cardlib.h"
//#include "cardwindow.h"
//#include "dropzone.h"
bool CardWindow::RegisterDropZone(int id, RECT *rect, pDropZoneProc proc) bool CardWindow::RegisterDropZone(int id, RECT *rect, pDropZoneProc proc)
{ {

View file

@ -36,4 +36,4 @@ private:
pDropZoneProc DropZoneCallback; pDropZoneProc DropZoneCallback;
}; };
#endif #endif /* DROPZONE_INCLUDED */

View file

@ -12,4 +12,4 @@ extern HBITMAP __hbmPlaceHolder;
extern HPALETTE __hPalette; extern HPALETTE __hPalette;
#endif #endif /* GLOBALS_INCLUDED */