⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 billiardsdoc.h

📁 桌面台球3D 开发环境VC 库DIRECTX8.1以上
💻 H
字号:
// BilliardsDoc.h : interface of the CBilliardsDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_BILLIARDSDOC_H__44D559A0_930E_46BD_A6AA_8C6E34F57AA3__INCLUDED_)
#define AFX_BILLIARDSDOC_H__44D559A0_930E_46BD_A6AA_8C6E34F57AA3__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "ListenSocket.h"
#include "ClientSocket.h"

class CClientSocket;
class CListenSocket;


#define SERVER  0
#define CLIENT  1
#define IDLE    2

//NAME    '0'
//MSG     '1'
//SHOOT   '2'
//QUIT    '3'

class CBilliardsDoc : public CDocument
{
protected: // create from serialization only
	CBilliardsDoc();
	DECLARE_DYNCREATE(CBilliardsDoc)

// Attributes
public:
	CListenSocket* m_pListenSocket;
	CClientSocket* m_pClientSocket;
	
	BOOL m_bPlayer;

	CString m_strClient;
	CString m_strServer;

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CBilliardsDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	//}}AFX_VIRTUAL

// Implementation
public:
    void ReceiveVelocity(char *pBuf);
	BOOL ReceiveMSG(CString strTemp);
	BOOL AcceptConnection();
    void SendVelocity(float m_fVelocity[3]);
	
    virtual ~CBilliardsDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CBilliardsDoc)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

struct Velocity{
    char type;
    float fvalue0;
    float fvalue1;
    float fvalue2;
};
/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_BILLIARDSDOC_H__44D559A0_930E_46BD_A6AA_8C6E34F57AA3__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -