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

Password:

OPEERSCH.CPP Source File
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

OPEERSCH.CPP

Go to the documentation of this file.
00001 //Filename   : OPEERSCH.CPP
00002 //Description: PeerSchool class methods -- also see Peer_Insts of HE.initialization.xls
00003 //Owner:                        Fred
00004 
00005 #include <OSCHOOL.H>
00006 #include <OSCHLRES.H>
00007 #include <OPEERSCH.H>
00008 
00009 //--------- Begin of function PeerSchool::init --------//
00013 void PeerSchool::init(int recno) {
00014     memset( this, 0, sizeof(PeerSchool));
00015 
00016     if ( recno > 0 ) {                              // for handling palyerschool
00017         //--- copy all vars from a School object in db_school_array[] to player_school_ex ---//
00018 #if(GAME_VERSION>=200)
00019         School* sPtr = school_res.desired_school_array+recno-1;
00020 #else
00021         School *sPtr = (school_res.db_school_array+recno-1);
00022 #endif
00023 
00024         memcpy( this, sPtr, sizeof(School) );         // PeerSchool is a derived class of School
00025 
00026         SchoolEx::init(recno);
00027     }
00028 }
00029 
00030 //--------- End of function PeerSchool::init --------//

Generated on Fri Aug 23 01:38:10 2002 for VirtualU by doxygen1.2.17