- Timestamp:
- Jan 24, 2006, 8:24:48 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/subprojects/importer/Makefile.am
r6631 r6676 6 6 importer_LDFLAGS = $(MWINDOWS) 7 7 8 bin_PROGRAMS = importer \ 9 multitex \ 10 movie_player_test 8 bin_PROGRAMS = \ 9 importer \ 10 multitex \ 11 movie_player_test 11 12 12 13 importer_LDADD = \ … … 17 18 $(MAINSRCDIR)/lib/shell/libORXshell.a \ 18 19 $(MAINSRCDIR)/lib/sound/libORXsound.a \ 19 $(MAINSRCDIR)/lib/graphics/importer/libORXimporter.a 20 $(MAINSRCDIR)/lib/graphics/importer/libORXimporter.a \ 21 $(MAINSRCDIR)/lib/graphics/importer/libtc.a 20 22 21 importer_SOURCES= ../framework.cc\22 importer.cc \23 tc.cc \24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 23 importer_SOURCES= \ 24 ../framework.cc \ 25 importer.cc \ 26 $(MAINSRCDIR)/util/state.cc \ 27 $(MAINSRCDIR)/world_entities/camera.cc \ 28 $(MAINSRCDIR)/lib/lang/base_object.cc \ 29 $(MAINSRCDIR)/lib/lang/class_list.cc \ 30 $(MAINSRCDIR)/lib/math/vector.cc \ 31 $(MAINSRCDIR)/lib/math/quaternion.cc \ 32 $(MAINSRCDIR)/util/loading/resource_manager.cc \ 33 $(MAINSRCDIR)/lib/parser/ini_parser/ini_parser.cc \ 34 $(MAINSRCDIR)/lib/coord/p_node.cc \ 35 $(MAINSRCDIR)/util/loading/load_param.cc \ 36 $(MAINSRCDIR)/util/loading/load_param_description.cc \ 37 $(MAINSRCDIR)/lib/util/helper_functions.cc \ 38 $(MAINSRCDIR)/lib/util/substring.cc \ 39 $(MAINSRCDIR)/lib/util/color.cc \ 40 $(MAINSRCDIR)/lib/util/multi_type.cc \ 41 $(MAINSRCDIR)/lib/util/executor/executor.cc \ 42 $(MAINSRCDIR)/util/loading/factory.cc 41 43 42 44 43 45 44 multitex_LDADD = $(MAINSRCDIR)/lib/event/libORXevent.a \ 45 $(MAINSRCDIR)/lib/network/libORXnet.a \ 46 $(MAINSRCDIR)/lib/parser/tinyxml/libtinyxml.a \ 47 $(MAINSRCDIR)/lib/graphics/libORXgraphics.a \ 48 $(MAINSRCDIR)/lib/shell/libORXshell.a \ 49 $(MAINSRCDIR)/lib/sound/libORXsound.a \ 50 $(MAINSRCDIR)/lib/graphics/importer/libORXimporter.a 46 multitex_LDADD = \ 47 $(MAINSRCDIR)/lib/event/libORXevent.a \ 48 $(MAINSRCDIR)/lib/network/libORXnet.a \ 49 $(MAINSRCDIR)/lib/parser/tinyxml/libtinyxml.a \ 50 $(MAINSRCDIR)/lib/graphics/libORXgraphics.a \ 51 $(MAINSRCDIR)/lib/shell/libORXshell.a \ 52 $(MAINSRCDIR)/lib/sound/libORXsound.a \ 53 $(MAINSRCDIR)/lib/graphics/importer/libORXimporter.a 51 54 52 multitex_SOURCES= ../framework.cc \ 53 multitex.cc \ 54 $(MAINSRCDIR)/util/state.cc \ 55 $(MAINSRCDIR)/world_entities/camera.cc \ 56 $(MAINSRCDIR)/lib/lang/base_object.cc \ 57 $(MAINSRCDIR)/lib/lang/class_list.cc \ 58 $(MAINSRCDIR)/lib/math/vector.cc \ 59 $(MAINSRCDIR)/lib/math/quaternion.cc \ 60 $(MAINSRCDIR)/util/loading/resource_manager.cc \ 61 $(MAINSRCDIR)/lib/parser/ini_parser/ini_parser.cc \ 62 $(MAINSRCDIR)/lib/coord/p_node.cc \ 63 $(MAINSRCDIR)/util/loading/load_param.cc \ 64 $(MAINSRCDIR)/util/loading/load_param_description.cc \ 65 $(MAINSRCDIR)/lib/util/helper_functions.cc \ 66 $(MAINSRCDIR)/lib/util/substring.cc \ 67 $(MAINSRCDIR)/lib/util/color.cc \ 68 $(MAINSRCDIR)/lib/util/multi_type.cc \ 69 $(MAINSRCDIR)/lib/util/executor/executor.cc \ 70 $(MAINSRCDIR)/util/loading/factory.cc 55 multitex_SOURCES= \ 56 ../framework.cc \ 57 multitex.cc \ 58 $(MAINSRCDIR)/util/state.cc \ 59 $(MAINSRCDIR)/world_entities/camera.cc \ 60 $(MAINSRCDIR)/lib/lang/base_object.cc \ 61 $(MAINSRCDIR)/lib/lang/class_list.cc \ 62 $(MAINSRCDIR)/lib/math/vector.cc \ 63 $(MAINSRCDIR)/lib/math/quaternion.cc \ 64 $(MAINSRCDIR)/util/loading/resource_manager.cc \ 65 $(MAINSRCDIR)/lib/parser/ini_parser/ini_parser.cc \ 66 $(MAINSRCDIR)/lib/coord/p_node.cc \ 67 $(MAINSRCDIR)/util/loading/load_param.cc \ 68 $(MAINSRCDIR)/util/loading/load_param_description.cc \ 69 $(MAINSRCDIR)/lib/util/helper_functions.cc \ 70 $(MAINSRCDIR)/lib/util/substring.cc \ 71 $(MAINSRCDIR)/lib/util/color.cc \ 72 $(MAINSRCDIR)/lib/util/multi_type.cc \ 73 $(MAINSRCDIR)/lib/util/executor/executor.cc \ 74 $(MAINSRCDIR)/util/loading/factory.cc 71 75 72 movie_player_test_LDADD = $(MAINSRCDIR)/lib/event/libORXevent.a \ 76 movie_player_test_LDADD = \ 77 $(MAINSRCDIR)/lib/event/libORXevent.a \ 73 78 $(MAINSRCDIR)/lib/network/libORXnet.a \ 74 75 76 77 78 79 $(MAINSRCDIR)/lib/parser/tinyxml/libtinyxml.a \ 80 $(MAINSRCDIR)/lib/graphics/libORXgraphics.a \ 81 $(MAINSRCDIR)/lib/shell/libORXshell.a \ 82 $(MAINSRCDIR)/lib/sound/libORXsound.a \ 83 $(MAINSRCDIR)/lib/graphics/importer/libORXimporter.a 79 84 80 movie_player_test_SOURCES= ../framework.cc \ 81 movie_player_test.cc \ 82 $(MAINSRCDIR)/util/state.cc \ 83 $(MAINSRCDIR)/world_entities/camera.cc \ 84 $(MAINSRCDIR)/lib/lang/base_object.cc \ 85 $(MAINSRCDIR)/lib/lang/class_list.cc \ 86 $(MAINSRCDIR)/lib/math/vector.cc \ 87 $(MAINSRCDIR)/util/loading/resource_manager.cc \ 88 $(MAINSRCDIR)/lib/parser/ini_parser/ini_parser.cc \ 89 $(MAINSRCDIR)/lib/coord/p_node.cc \ 90 $(MAINSRCDIR)/lib/coord/null_parent.cc \ 91 $(MAINSRCDIR)/util/loading/load_param.cc \ 92 $(MAINSRCDIR)/util/loading/load_param_description.cc \ 93 $(MAINSRCDIR)/lib/util/helper_functions.cc \ 94 $(MAINSRCDIR)/lib/util/substring.cc \ 95 $(MAINSRCDIR)/lib/util/color.cc \ 96 $(MAINSRCDIR)/lib/util/multi_type.cc \ 97 $(MAINSRCDIR)/lib/util/executor/executor.cc \ 98 $(MAINSRCDIR)/util/loading/factory.cc 85 movie_player_test_SOURCES= \ 86 ../framework.cc \ 87 movie_player_test.cc \ 88 $(MAINSRCDIR)/util/state.cc \ 89 $(MAINSRCDIR)/world_entities/camera.cc \ 90 $(MAINSRCDIR)/lib/lang/base_object.cc \ 91 $(MAINSRCDIR)/lib/lang/class_list.cc \ 92 $(MAINSRCDIR)/lib/math/vector.cc \ 93 $(MAINSRCDIR)/util/loading/resource_manager.cc \ 94 $(MAINSRCDIR)/lib/parser/ini_parser/ini_parser.cc \ 95 $(MAINSRCDIR)/lib/coord/p_node.cc \ 96 $(MAINSRCDIR)/lib/coord/null_parent.cc \ 97 $(MAINSRCDIR)/util/loading/load_param.cc \ 98 $(MAINSRCDIR)/util/loading/load_param_description.cc \ 99 $(MAINSRCDIR)/lib/util/helper_functions.cc \ 100 $(MAINSRCDIR)/lib/util/substring.cc \ 101 $(MAINSRCDIR)/lib/util/color.cc \ 102 $(MAINSRCDIR)/lib/util/multi_type.cc \ 103 $(MAINSRCDIR)/lib/util/executor/executor.cc \ 104 $(MAINSRCDIR)/util/loading/factory.cc -
trunk/src/world_entities/movie_entity.cc
r6600 r6676 19 19 #include "load_param.h" 20 20 #include "factory.h" 21 22 #include "network_game_manager.h"23 #include "converter.h"24 21 25 22 using namespace std; -
trunk/src/world_entities/playable.cc
r6669 r6676 52 52 void Playable::addWeapon(Weapon* weapon, int configID, int slotID) 53 53 { 54 this->weaponMan->addWeapon(weapon );54 this->weaponMan->addWeapon(weapon, configID, slotID); 55 55 56 56 this->weaponConfigChanged(); -
trunk/src/world_entities/weapons/weapon_manager.cc
r6669 r6676 208 208 int weaponConf = this->currentConfigID; 209 209 int slot; 210 if (slot = this->getNextFreeSlot(weaponConf, weapon->getCapability()) == -1 )210 if (slot = this->getNextFreeSlot(weaponConf, weapon->getCapability()) != -1 ) 211 211 this->addWeapon(weapon, weaponConf, slot); 212 else 213 this->addWeapon(weapon, -1, -1); 212 214 } 213 215 … … 231 233 } 232 234 233 if (this->configs[configID][slotID] != NULL && configID > 0 && slotID > 0) 234 PRINTF(3)("Weapon-slot %d/%d of %s already poulated, overwriting\n", configID, slotID, this->getName()); 235 236 if (slotID == -1) // WM_FREE_SLOT 235 if (configID > 0 && slotID > 0 && this->configs[configID][slotID] != NULL) 236 { 237 PRINTF(3)("Weapon-slot %d/%d of %s already poulated, remove weapon (%s::%s) first\n", configID, slotID, this->getName(), weapon->getClassName(), weapon->getName()); 238 return false; 239 } 240 241 if (slotID <= -1) // WM_FREE_SLOT 237 242 { 238 243 slotID = this->getNextFreeSlot(configID, weapon->getCapability()); … … 253 258 254 259 //! @todo check if the weapon is already assigned to another config in another slot 260 assert(this->configs[configID][slotID] == NULL); 261 255 262 this->configs[configID][slotID] = weapon; 256 263 weapon->setAmmoContainer(this->getAmmoContainer(weapon->getProjectileType())); … … 259 266 this->parent->addChild(weapon); 260 267 } 261 PRINTF(3)("Added a new Weapon to the WeaponManager: config %i/ slot %i\n", configID, slotID);268 PRINTF(3)("Added a new Weapon (%s::%s) to the WeaponManager: config %i/ slot %i\n", weapon->getClassName(), weapon->getName(), configID, slotID); 262 269 return true; 263 270 } … … 433 440 int WeaponManager::getNextFreeSlot(int configID, long capability) 434 441 { 435 for( int i = 0; i < this->slotCount; ++i) 436 { 437 if( this->configs[configID][i] == NULL && 438 (this->currentSlotConfig[i].capability & capability & WTYPE_ALLKINDS) && 439 (this->currentSlotConfig[i].capability & capability & WTYPE_ALLDIRS)) 440 return i; 442 if (configID == -1) 443 { 444 for (configID = 0; configID < WM_MAX_CONFIGS; configID++) 445 for( int i = 0; i < this->slotCount; ++i) 446 { 447 if( this->configs[configID][i] == NULL && 448 (this->currentSlotConfig[i].capability & capability & WTYPE_ALLKINDS) && 449 (this->currentSlotConfig[i].capability & capability & WTYPE_ALLDIRS)) 450 return i; 451 } 452 } 453 else 454 { 455 for( int i = 0; i < this->slotCount; ++i) 456 { 457 if( this->configs[configID][i] == NULL && 458 (this->currentSlotConfig[i].capability & capability & WTYPE_ALLKINDS) && 459 (this->currentSlotConfig[i].capability & capability & WTYPE_ALLDIRS)) 460 return i; 461 } 441 462 } 442 463 return -1;
Note: See TracChangeset
for help on using the changeset viewer.