Changeset 6853 in orxonox.OLD for trunk/src/story_entities/story_entity.cc
- Timestamp:
- Jan 30, 2006, 3:40:05 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/story_entity.cc
r6848 r6853 41 41 this->storyID = -1; 42 42 this->description = NULL; 43 this->menuItemImage = "pictures/menu/DefaultMenuItem.png";43 this->menuItemImage = NULL; 44 44 this->nextStoryID = WORLD_ID_GAMEEND; 45 45 this->bMenuEntry = false; … … 82 82 PRINTF(4)("Loaded StoryEntity specific stuff\n"); 83 83 } 84 85 86 /** 87 * sets the descroption of this StoryEntity 88 * @param name name 89 */ 90 void StoryEntity::setDescription(const char* description) 91 { 92 if (this->description) 93 delete[] this->description; 94 if (description!= NULL) 95 { 96 this->description= new char[strlen(description)+1]; 97 strcpy(this->description, description); 98 } 99 else this->description= NULL; 100 } 101 102 103 /** 104 * sets the menu item image of this StoryEntity 105 * @param name name 106 */ 107 void StoryEntity::setMenuItemImage(const char* image) 108 { 109 if (this->menuItemImage) 110 delete[] this->menuItemImage; 111 if (image != NULL) 112 { 113 this->menuItemImage = new char[strlen(image)+1]; 114 strcpy(this->menuItemImage, image); 115 } 116 else this->menuItemImage = NULL; 117 } 118 119 120 /** sets the menu screenshoot of this StoryEntity @param name name */ 121 void StoryEntity::setMenuScreenshoot(const char* image) 122 { 123 if (this->menuScreenshoot) 124 delete[] this->menuScreenshoot; 125 if (image != NULL) 126 { 127 this->menuScreenshoot = new char[strlen(image)+1]; 128 strcpy(this->menuScreenshoot, image); 129 } 130 else this->menuScreenshoot = NULL; 131 } 132 133
Note: See TracChangeset
for help on using the changeset viewer.