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

📄 cpcitem.h

📁 国外网络游戏 《The Kingdom of the Winds》 的服务端源码C+编写 有兴趣的可以
💻 H
字号:
// cPcItem.h: interface for the cPcItem class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_CPCITEM_H__AE6128A1_1234_11D5_B811_00C026DC0C35__INCLUDED_)
#define AFX_CPCITEM_H__AE6128A1_1234_11D5_B811_00C026DC0C35__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class cPcItem  
{
protected:
	item_st *DefaultItem;//The item send if an out of bounds is referenced.

	vector<item_st *> Items;//Vector of pointers to items, NULL if no item at that pos
	unsigned long Acctual; //Number of items in existance

	vector<unsigned long> FreeNums;//Vector of free item numbers
	unsigned int Free; //Number of free spaces in Acctual (Recyle item numbers)
	bool isFree( unsigned long Num );//Check to see if this item is marked free

public:
	cPcItem(); //Class Constructor
	~cPcItem();//Class Destructor

	unsigned long New( void );//Get Memory for a new item, Returns Item number
	void Delete( long int );//Free memory used by this item
	unsigned long Size( void );//Return the size (in bytes) of ram items are taking up
	void Reserve( unsigned int );//Reserve memory for this number of items (UNUSED)
	unsigned long Count( void );//Return Acctual-> the number of items in world.

	item_st& operator[] ( long int );//Reference an item
};

#endif // !defined(AFX_CPCITEM_H__AE6128A1_1234_11D5_B811_00C026DC0C35__INCLUDED_)

⌨️ 快捷键说明

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