Virtual U.org
Get Personal Training on VU Today
    
Top shadow
 
 register/help
User Name:

Password:

PlantRes class Reference
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

PlantRes Class Reference

#include <OPLANT.H>

List of all members.

Public Methods

 PlantRes ()
 ~PlantRes ()
void init ()
void deinit ()
PlantInfooperator[] (int plantId)
 PlantRes ()
void init ()
void deinit ()
int scan (int climateZone, int teraType, int townAge)
short plant_recno (short bitmapId)
PlantBitmapget_bitmap (int bitmapId)
PlantInfooperator[] (int plantId)

Public Attributes

bool init_flag
short plant_count
PlantInfoinfo_array
ResourceIdx res_bitmap [MAX_ZOOM_LEVEL]
short plant_bitmap_count
PlantInfoplant_info_array
PlantBitmapplant_bitmap_array
short * scan_id_array
char plant_map_color
char init_flag
ResourceDb res_bitmap


Detailed Description

Resource class which loads and makes available the plant names and bitmaps.

Definition at line 36 of file OPLANT.H.


Constructor & Destructor Documentation

PlantRes::PlantRes  
 

Definition at line 18 of file OPLANT.CPP.

PlantRes::~PlantRes  
 

Definition at line 27 of file OPLANT.CPP.

References deinit().

PlantRes::PlantRes  
 


Member Function Documentation

void PlantRes::deinit  
 

void PlantRes::deinit  
 

Definition at line 58 of file OPLANT.CPP.

References MAX_ZOOM_LEVEL, and mem_del.

Referenced by ~PlantRes().

PlantBitmap* PlantRes::get_bitmap int    bitmapId [inline]
 

Definition at line 120 of file OPLANT3.H.

void PlantRes::init  
 

void PlantRes::init  
 

This function must be called after a map is generated.

Definition at line 35 of file OPLANT.CPP.

References ZOOM_LARGE, ZOOM_MEDIUM, and ZOOM_SMALL.

PlantInfo* PlantRes::operator[] int    plantId [inline]
 

Definition at line 121 of file OPLANT3.H.

PlantInfo * PlantRes::operator[] int    plantId
 

Definition at line 129 of file OPLANT.CPP.

References err_if, err_now, info_array, and plant_count.

short PlantRes::plant_recno short    bitmapId
 

Definition at line 257 of file OPLANT3.CPP.

References PlantInfo::bitmap_count, PlantInfo::first_bitmap, plant_count, and plant_info_array.

int PlantRes::scan int    climateZone,
int    teraType,
int    townAge
 

Check if any plant in resource matches the given criteria and return the plant bitmap id. of the matched one.

<int> climateZone - the climate zone where the plant is. (either ZONE_TROPICAL or ZONE_TEMPERATE) 0 - any climate zone <int> teraType - the terrain type where the plant is. 0 - any terrain type <int> townAge - the age level of the town. 0 - any town age

return : <int> plantBitmapId - the id. of the plant bitmap.

Definition at line 212 of file OPLANT3.CPP.

References PlantInfo::bitmap_count, PlantInfo::climate_zone, err_when, PlantInfo::first_bitmap, PlantInfo::tera_type, and PlantBitmap::town_age.


Member Data Documentation

PlantInfo* PlantRes::info_array
 

Definition at line 41 of file OPLANT.H.

Referenced by operator[]().

char PlantRes::init_flag
 

Definition at line 103 of file OPLANT3.H.

bool PlantRes::init_flag
 

Definition at line 38 of file OPLANT.H.

PlantBitmap* PlantRes::plant_bitmap_array
 

Definition at line 98 of file OPLANT3.H.

short PlantRes::plant_bitmap_count
 

Definition at line 95 of file OPLANT3.H.

short PlantRes::plant_count
 

Definition at line 94 of file OPLANT3.H.

Referenced by operator[](), and plant_recno().

PlantInfo* PlantRes::plant_info_array
 

Definition at line 97 of file OPLANT3.H.

Referenced by plant_recno().

char PlantRes::plant_map_color
 

Definition at line 101 of file OPLANT3.H.

ResourceDb PlantRes::res_bitmap
 

Definition at line 104 of file OPLANT3.H.

ResourceIdx PlantRes::res_bitmap[MAX_ZOOM_LEVEL]
 

Definition at line 43 of file OPLANT.H.

short* PlantRes::scan_id_array
 

Definition at line 99 of file OPLANT3.H.


The documentation for this class was generated from the following files:
Generated on Fri Aug 23 01:39:29 2002 for VirtualU by doxygen1.2.17