| 40 | |
| 41 | template<> |
| 42 | void* Resource<ForestData>::create( const Torque::Path &path ) |
| 43 | { |
| 44 | FileStream stream; |
| 45 | stream.open( path.getFullPath(), Torque::FS::File::Read ); |
| 46 | if ( stream.getStatus() != Stream::Ok ) |
| 47 | return NULL; |
| 48 | |
| 49 | ForestData *file = new ForestData(); |
| 50 | if ( !file->read( stream ) ) |
| 51 | { |
| 52 | delete file; |
| 53 | return NULL; |
| 54 | } |
| 55 | |
| 56 | return file; |
| 57 | } |
| 58 | |
| 59 | |
| 60 | U32 ForestData::smNextItemId = 1; |