Browse CVS Repository
Contents of /xoonips/AL/itemtype.cc
Parent Directory
| Revision Log
| Revision Graph
Revision 1.2 -
( show annotations)
( download)
( as text)
Mon Jan 24 10:51:11 2005 UTC
(19 years, 2 months ago)
by youi
Branch: MAIN
CVS Tags: mv_to_sourceforge_20050217, demo20050128
Changes since 1.1: +20 -7 lines
File MIME type: text/x-c++src
モジュールID,アイテムタイプ表示名の扱いを追加した.
| 1 |
/* |
| 2 |
* |
| 3 |
* $Revision: 1.1 $ |
| 4 |
* $Log: itemtype.cc,v $ |
| 5 |
* Revision 1.1 2005/01/14 04:28:07 youi |
| 6 |
* initial version |
| 7 |
* |
| 8 |
* |
| 9 |
*/ |
| 10 |
#include <string.h> |
| 11 |
|
| 12 |
#include "common.h" |
| 13 |
#include "itemtype.h" |
| 14 |
|
| 15 |
|
| 16 |
itemtype::itemtype() |
| 17 |
{ |
| 18 |
item_type_id = 0; |
| 19 |
mid = 0; |
| 20 |
memset( name, '\0', XNP_ITEMTYPE_NAME_LEN + 1 ); |
| 21 |
memset( display_name, '\0', XNP_ITEMTYPE_DISPLAY_NAME_LEN + 1 ); |
| 22 |
} |
| 23 |
|
| 24 |
itemtype::~itemtype(){} |
| 25 |
|
| 26 |
itemtypeid_t itemtype::getItemTypeID() const { return item_type_id; } |
| 27 |
const char* itemtype::getName() const { return name; } |
| 28 |
const char* itemtype::getDisplayName() const { return display_name; } |
| 29 |
itemtypeid_t itemtype::getModuleID() const { return mid; } |
| 30 |
|
| 31 |
void itemtype::setItemTypeID( itemtypeid_t x ){ this -> item_type_id = x; } |
| 32 |
void itemtype::setName( const char* x ) |
| 33 |
{ |
| 34 |
strncpy( this -> name, x, XNP_ITEMTYPE_NAME_LEN ); |
| 35 |
this -> name[ XNP_ITEMTYPE_NAME_LEN ] = '\0'; |
| 36 |
} |
| 37 |
void itemtype::setDisplayName( const char* x ) |
| 38 |
{ |
| 39 |
strncpy( this -> display_name, x, XNP_ITEMTYPE_DISPLAY_NAME_LEN ); |
| 40 |
this -> display_name[ XNP_ITEMTYPE_DISPLAY_NAME_LEN ] = '\0'; |
| 41 |
} |
| 42 |
void itemtype::setModuleID( unsigned int x ){ this -> mid = x; } |
|