Changeset 1021 for code/trunk
- Timestamp:
- Apr 10, 2008, 5:03:34 PM (17 years ago)
- Location:
- code/trunk
- Files:
-
- 4 deleted
- 60 edited
- 27 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/CMakeLists.txt
r790 r1021 71 71 FIND_PACKAGE(OggVorbis) 72 72 FIND_PACKAGE(ZLIB) 73 FIND_PACKAGE(Lua) 74 #FIND_PACKAGE(ToLua) 73 75 74 76 #Sets the search paths for the linking 75 LINK_DIRECTORIES(${OGRE_LIB_DIR} ${OIS_LIB_DIR} ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR} ${ENet_LIBRARY} ${Boost_LIBRARY_DIRS} ${Zlib_LIBRARY_DIR} core objects loader network weapon classHierarchy audio)77 LINK_DIRECTORIES(${OGRE_LIB_DIR} ${OIS_LIB_DIR} ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR} ${ENet_LIBRARY} ${Boost_LIBRARY_DIRS} ${Zlib_LIBRARY_DIR} ${Lua_LIBRARIES} core objects loader network weapon classHierarchy audio) 76 78 #Sets the search path for include files 77 INCLUDE_DIRECTORIES(${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR} ${CEGUI_INCLUDE_DIR} ${CEGUI_OGRE_INCLUDE_DIR} ${ENet_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${OPENAL_INCLUDE_DIR} ${ALUT_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR} ${OGG_INCLUDE_DIR} )79 INCLUDE_DIRECTORIES(${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR} ${CEGUI_INCLUDE_DIR} ${CEGUI_OGRE_INCLUDE_DIR} ${ENet_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${OPENAL_INCLUDE_DIR} ${ALUT_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR} ${OGG_INCLUDE_DIR} ${Lua_INCLUDE_DIR}) 78 80 79 81 #Set the execution directory -
code/trunk/bin/levels/sample.oxw
r1010 r1021 8 8 <ogg src="tha_silent_partner_-_void" /> 9 9 </ambient> 10 </audio> 10 </audio> 11 11 12 --> 12 13 … … 23 24 <NPC position="100,0,400" scale="1" mesh="razor.mesh"/> 24 25 25 <!-- 26 <Model name="starship" position="200,0,500" scale="10" mesh="starship.mesh" yawpitchroll="-90,-90,0" /> 27 <Model name="drone" position="-200,0,500" scale="10" mesh="drone.mesh" yawpitchroll="-90,-90,0"> 26 <!--Model name="starship" position="200,0,500" scale="10" mesh="starship.mesh" yawpitchroll="-90,-90,0" /--> 27 <!--Model name="drone" position="-200,0,500" scale="10" mesh="drone.mesh" yawpitchroll="-90,-90,0"> 28 28 <attached> 29 29 <Model name="drone2" position="200,-100,-500" scale="10" mesh="drone.mesh" yawpitchroll="-90,-90,0"> … … 33 33 </Model> 34 34 </attached> 35 </Model> 36 --> 35 </Model --> 37 36 38 37 <Model position="-200,1000,500" scale="10" mesh="hoover_body.mesh" yawpitchroll="-90,-90,0" /> … … 42 41 <Model position="-200,1000,500" scale="10" mesh="hoover_turbine.mesh" yawpitchroll="-90,-90,0" /> 43 42 44 <Model position="-16779,42,11043" scale="95" mesh="ast2.mesh" rotationAxis="0.281711,0.152518,0" rotationRate="27" /> 45 <Model position="12893,-1583,-17939" scale="48" mesh="ast1.mesh" rotationAxis="0.0597998,0.923364,0" rotationRate="36" /> 46 <Model position="-2107,259,-19814" scale="29" mesh="ast4.mesh" rotationAxis="0.298639,0.96907,0" rotationRate="32" /> 47 <Model position="-9583,-2284,-19904" scale="33" mesh="ast5.mesh" rotationAxis="0,0.675659,0.0196445" rotationRate="44" /> 48 <Model position="-19597,-15494,3163" scale="37" mesh="ast5.mesh" rotationAxis="0.477996,0,0.048639" rotationRate="23" /> 49 <Model position="-182,6442,-4496" scale="25" mesh="ast5.mesh" rotationAxis="0.142225,0,0.154393" rotationRate="37" /> 50 <Model position="1004,-19639,-13744" scale="21" mesh="ast1.mesh" rotationAxis="0.974865,0.299775,0" rotationRate="29" /> 51 <Model position="-13204,-10191,-1555" scale="31" mesh="ast1.mesh" rotationAxis="0.41675,0,0.385001" rotationRate="42" /> 52 <Model position="-1843,12203,2346" scale="81" mesh="ast5.mesh" rotationAxis="0.221171,0,0.331917" rotationRate="41" /> 53 <Model position="-1560,-1443,-17416" scale="68" mesh="ast1.mesh" rotationAxis="0.653787,0.00935241,0" rotationRate="44" /> 54 <Model position="-7723,18661,3363" scale="94" mesh="ast5.mesh" rotationAxis="0.450345,0,0.417313" rotationRate="29" /> 55 <Model position="-8122,5764,16342" scale="45" mesh="ast4.mesh" rotationAxis="0.268558,0,0.089161" rotationRate="30" /> 56 <Model position="17575,-14054,-16710" scale="80" mesh="ast1.mesh" rotationAxis="0,0.615899,0.571064" rotationRate="18" /> 57 <Model position="-15304,-17381,4149" scale="32" mesh="ast6.mesh" rotationAxis="0.015051,0,0.764924" rotationRate="10" /> 58 <Model position="5587,2382,-13876" scale="49" mesh="ast4.mesh" rotationAxis="0.501173,0.208012,0" rotationRate="27" /> 59 <Model position="12167,-12466,-3364" scale="29" mesh="ast3.mesh" rotationAxis="0.897424,0.896971,0" rotationRate="21" /> 60 <Model position="3157,12173,4070" scale="78" mesh="ast2.mesh" rotationAxis="0.496178,0.760223,0" rotationRate="36" /> 61 <Model position="-13948,-6497,18368" scale="96" mesh="ast3.mesh" rotationAxis="0,0.0655793,0.17843" rotationRate="47" /> 62 <Model position="9304,-16367,-8429" scale="112" mesh="ast3.mesh" rotationAxis="0,0.220054,0.123838" rotationRate="10" /> 63 <Model position="-19293,9147,5573" scale="97" mesh="ast6.mesh" rotationAxis="0,0.0590435,0.200379" rotationRate="27" /> 64 <Model position="-13022,13902,19960" scale="67" mesh="ast6.mesh" rotationAxis="0,0.637161,0.286825" rotationRate="22" /> 65 <Model position="16898,12368,4477" scale="41" mesh="ast3.mesh" rotationAxis="0.962958,0,0.0295571" rotationRate="30" /> 66 <Model position="6687,12586,-11721" scale="33" mesh="ast2.mesh" rotationAxis="0.596958,0.326804,0" rotationRate="24" /> 67 <Model position="15066,11759,5229" scale="47" mesh="ast5.mesh" rotationAxis="0,0.993547,0.7269" rotationRate="45" /> 68 <Model position="7329,-9876,2203" scale="78" mesh="ast4.mesh" rotationAxis="0,0.170628,0.522448" rotationRate="31" /> 69 <Model position="-9132,9542,-14753" scale="20" mesh="ast6.mesh" rotationAxis="0.578006,0.738023,0" rotationRate="47" /> 70 <Model position="12958,2638,9476" scale="107" mesh="ast2.mesh" rotationAxis="0.815402,0.549519,0" rotationRate="42" /> 71 <Model position="3327,-10549,9196" scale="102" mesh="ast3.mesh" rotationAxis="0.403431,0,0.392179" rotationRate="43" /> 72 <Model position="-8947,15802,-16153" scale="72" mesh="ast3.mesh" rotationAxis="0,0.863891,0.789231" rotationRate="28" /> 73 <Model position="-5340,12944,14528" scale="108" mesh="ast2.mesh" rotationAxis="0.91406,0.865657,0" rotationRate="34" /> 74 <Model position="5107,5365,-5004" scale="75" mesh="ast6.mesh" rotationAxis="0,0.663461,0.406224" rotationRate="13" /> 75 <Model position="-6998,18403,8238" scale="70" mesh="ast6.mesh" rotationAxis="0.550689,0,0.834949" rotationRate="41" /> 76 <Model position="-9089,7495,-15512" scale="59" mesh="ast6.mesh" rotationAxis="0.0784585,0,0.580422" rotationRate="16" /> 77 <Model position="-6698,19465,14091" scale="70" mesh="ast5.mesh" rotationAxis="0,0.0536133,0.663091" rotationRate="48" /> 78 <Model position="-9943,9390,19361" scale="115" mesh="ast3.mesh" rotationAxis="0.745415,0.302601,0" rotationRate="25" /> 79 <Model position="9341,-6947,7223" scale="49" mesh="ast1.mesh" rotationAxis="0.0217983,0.829754,0" rotationRate="40" /> 80 <Model position="10259,8970,-7673" scale="70" mesh="ast3.mesh" rotationAxis="0,0.705347,0.0544375" rotationRate="30" /> 81 <Model position="4538,-17169,-15829" scale="119" mesh="ast4.mesh" rotationAxis="0.659901,0,0.6408" rotationRate="42" /> 82 <Model position="7746,-9746,14917" scale="89" mesh="ast4.mesh" rotationAxis="0.579678,0,0.632015" rotationRate="46" /> 83 <Model position="-4550,1554,11166" scale="49" mesh="ast1.mesh" rotationAxis="0.805799,0.905452,0" rotationRate="25" /> 84 <Model position="-4571,-14392,14887" scale="20" mesh="ast2.mesh" rotationAxis="0.163796,0.62884,0" rotationRate="38" /> 85 <Model position="18390,-19165,-6118" scale="28" mesh="ast2.mesh" rotationAxis="0.386394,0,0.290423" rotationRate="39" /> 86 <Model position="-19119,8707,-11377" scale="119" mesh="ast1.mesh" rotationAxis="0.912683,0,0.722097" rotationRate="17" /> 87 <Model position="-15827,6956,-3785" scale="32" mesh="ast1.mesh" rotationAxis="0.901503,0,0.548708" rotationRate="29" /> 88 <Model position="1956,-13954,18055" scale="59" mesh="ast1.mesh" rotationAxis="0,0.0523992,0.756846" rotationRate="15" /> 89 <Model position="2197,-13870,-11528" scale="92" mesh="ast2.mesh" rotationAxis="0.469413,0,0.742143" rotationRate="13" /> 90 <Model position="7377,6656,5591" scale="64" mesh="ast6.mesh" rotationAxis="0,0.599119,0.890718" rotationRate="36" /> 91 <Model position="16123,8784,-7928" scale="50" mesh="ast6.mesh" rotationAxis="0.648018,0,0.522075" rotationRate="41" /> 92 <Model position="-12751,-2191,-11527" scale="94" mesh="ast2.mesh" rotationAxis="0,0.715065,0.332238" rotationRate="36" /> 93 <Model position="18020,-16499,18874" scale="31" mesh="ast6.mesh" rotationAxis="0,0.0608362,0.523216" rotationRate="13" /> 94 <Model position="-15807,-7678,16780" scale="37" mesh="ast1.mesh" rotationAxis="0,0.658659,0.0366738" rotationRate="18" /> 95 <Model position="-17711,-14807,13817" scale="82" mesh="ast6.mesh" rotationAxis="0.16894,0,0.131653" rotationRate="10" /> 96 <Model position="-4428,5259,9741" scale="66" mesh="ast6.mesh" rotationAxis="0.424995,0.0971331,0" rotationRate="39" /> 97 <Model position="1682,8250,263" scale="34" mesh="ast2.mesh" rotationAxis="0,0.509205,0.22658" rotationRate="35" /> 98 <Model position="13624,-5594,12058" scale="61" mesh="ast5.mesh" rotationAxis="0,0.786326,0.21092" rotationRate="41" /> 99 <Model position="-5772,8251,15090" scale="89" mesh="ast6.mesh" rotationAxis="0.446662,0,0.039521" rotationRate="46" /> 100 <Model position="18732,8386,-17834" scale="115" mesh="ast3.mesh" rotationAxis="0.484641,0.0994628,0" rotationRate="29" /> 101 <Model position="-4662,-13023,1337" scale="116" mesh="ast3.mesh" rotationAxis="0.575875,0.380544,0" rotationRate="34" /> 102 <Model position="3193,-18575,-13293" scale="55" mesh="ast3.mesh" rotationAxis="0,0.562414,0.669598" rotationRate="23" /> 103 <Model position="-18127,15281,-9961" scale="59" mesh="ast5.mesh" rotationAxis="0,0.430401,0.690096" rotationRate="20" /> 104 <Model position="-3978,-10245,108" scale="80" mesh="ast4.mesh" rotationAxis="0,0.0821224,0.236512" rotationRate="25" /> 105 <Model position="-11319,-12567,5192" scale="109" mesh="ast2.mesh" rotationAxis="0.39942,0,0.537407" rotationRate="24" /> 106 <Model position="-4977,-3230,-7025" scale="34" mesh="ast2.mesh" rotationAxis="0,0.464353,0.474219" rotationRate="31" /> 107 <Model position="10069,-14931,15176" scale="97" mesh="ast6.mesh" rotationAxis="0.173174,0.520451,0" rotationRate="26" /> 108 <Model position="2766,-16062,-10919" scale="78" mesh="ast4.mesh" rotationAxis="0.521386,0,0.717508" rotationRate="36" /> 109 <Model position="-9128,12247,2916" scale="67" mesh="ast2.mesh" rotationAxis="0.347868,0.717047,0" rotationRate="28" /> 110 <Model position="6440,-16563,-18432" scale="36" mesh="ast5.mesh" rotationAxis="0.265539,0,0.71717" rotationRate="35" /> 111 <Model position="12669,-1534,2196" scale="71" mesh="ast2.mesh" rotationAxis="0,0.472099,0.464159" rotationRate="40" /> 112 <Model position="172,-18075,11429" scale="108" mesh="ast5.mesh" rotationAxis="0.0320382,0.32207,0" rotationRate="16" /> 113 <Model position="2426,8901,-3677" scale="114" mesh="ast5.mesh" rotationAxis="0.778803,0.0691138,0" rotationRate="46" /> 114 <Model position="-4576,-13668,14863" scale="40" mesh="ast6.mesh" rotationAxis="0.979052,0.428032,0" rotationRate="30" /> 115 <Model position="9222,-15457,4825" scale="24" mesh="ast6.mesh" rotationAxis="0,0.106496,0.409635" rotationRate="38" /> 116 <Model position="-3613,-4696,-13838" scale="82" mesh="ast4.mesh" rotationAxis="0.676407,0,0.69673" rotationRate="16" /> 117 <Model position="12743,-1674,8050" scale="78" mesh="ast3.mesh" rotationAxis="0.161952,0.389888,0" rotationRate="19" /> 118 <Model position="3398,-19196,10512" scale="96" mesh="ast1.mesh" rotationAxis="0,0.799917,0.520012" rotationRate="38" /> 119 <Model position="-2837,-9264,-11236" scale="97" mesh="ast4.mesh" rotationAxis="0.892116,0,0.048004" rotationRate="22" /> 120 <Model position="13220,-13790,-9710" scale="90" mesh="ast5.mesh" rotationAxis="0,0.931551,0.148539" rotationRate="19" /> 121 <Model position="-9560,19189,2493" scale="24" mesh="ast2.mesh" rotationAxis="0.169182,0.962125,0" rotationRate="22" /> 122 <Model position="-18545,-13577,5941" scale="92" mesh="ast4.mesh" rotationAxis="0,0.145122,0.499773" rotationRate="24" /> 123 <Model position="-12874,-481,7016" scale="89" mesh="ast4.mesh" rotationAxis="0,0.878644,0.744372" rotationRate="31" /> 124 <Model position="5290,-11553,-15958" scale="103" mesh="ast4.mesh" rotationAxis="0,0.0858311,0.860834" rotationRate="26" /> 125 <Model position="-18189,19019,16471" scale="72" mesh="ast4.mesh" rotationAxis="0,0.206421,0.423981" rotationRate="33" /> 126 <Model position="13736,17565,-4338" scale="72" mesh="ast1.mesh" rotationAxis="0.647033,0,0.0993164" rotationRate="26" /> 127 <Model position="-11103,-18306,17096" scale="112" mesh="ast6.mesh" rotationAxis="0.938456,0.184833,0" rotationRate="17" /> 128 <Model position="16665,322,-13614" scale="57" mesh="ast5.mesh" rotationAxis="0,0.850806,0.942188" rotationRate="30" /> 129 <Model position="-13234,-5004,-19934" scale="100" mesh="ast6.mesh" rotationAxis="0.712244,0.214422,0" rotationRate="30" /> 130 <Model position="2334,-2954,-17614" scale="50" mesh="ast5.mesh" rotationAxis="0.62725,0,0.646295" rotationRate="22" /> 131 <Model position="16214,-12149,-6186" scale="72" mesh="ast1.mesh" rotationAxis="0,0.6434,0.0914027" rotationRate="40" /> 132 <Model position="-11746,15630,-12814" scale="92" mesh="ast1.mesh" rotationAxis="0.0516508,0,0.534206" rotationRate="31" /> 133 <Model position="19389,-8340,17620" scale="96" mesh="ast5.mesh" rotationAxis="0.806963,0.925497,0" rotationRate="19" /> 134 <Model position="12269,18075,5380" scale="103" mesh="ast6.mesh" rotationAxis="0,0.685539,0.0816417" rotationRate="38" /> 135 <Model position="16499,13080,-14830" scale="58" mesh="ast3.mesh" rotationAxis="0.776935,0.430662,0" rotationRate="21" /> 136 <Model position="14398,-9629,16663" scale="90" mesh="ast2.mesh" rotationAxis="0.405098,0.0716397,0" rotationRate="31" /> 137 <Model position="16021,-8497,-11384" scale="73" mesh="ast1.mesh" rotationAxis="0.284874,0.262371,0" rotationRate="22" /> 138 <Model position="-12197,19157,-5268" scale="46" mesh="ast6.mesh" rotationAxis="0.301399,0,0.852104" rotationRate="42" /> 139 <Model position="3523,-10238,-17036" scale="58" mesh="ast3.mesh" rotationAxis="0.408875,0,0.896493" rotationRate="32" /> 140 <Model position="-9942,2328,437" scale="47" mesh="ast6.mesh" rotationAxis="0.391488,0.552897,0" rotationRate="18" /> 141 <Model position="-5089,13146,2485" scale="115" mesh="ast3.mesh" rotationAxis="0,0.77605,0.0301674" rotationRate="46" /> 142 <Model position="-3325,16428,-42" scale="59" mesh="ast4.mesh" rotationAxis="0.80208,0.306772,0" rotationRate="11" /> 143 <Model position="-8399,370,12441" scale="58" mesh="ast4.mesh" rotationAxis="0,0.673135,0.940884" rotationRate="46" /> 144 <Model position="12101,13398,-15098" scale="58" mesh="ast2.mesh" rotationAxis="0.168778,0,0.0517661" rotationRate="38" /> 145 <Model position="-2875,-11869,11008" scale="55" mesh="ast3.mesh" rotationAxis="0,0.248125,0.642059" rotationRate="40" /> 146 <Model position="1690,-9053,14913" scale="52" mesh="ast4.mesh" rotationAxis="0.454649,0.81489,0" rotationRate="23" /> 147 <Model position="17507,7536,-8757" scale="29" mesh="ast3.mesh" rotationAxis="0.947894,0,0.283392" rotationRate="41" /> 148 <Model position="-1623,-12605,-14277" scale="58" mesh="ast3.mesh" rotationAxis="0,0.253805,0.162647" rotationRate="46" /> 149 <Model position="-4045,-535,-14585" scale="88" mesh="ast4.mesh" rotationAxis="0.257327,0,0.894532" rotationRate="24" /> 150 <Model position="-9199,715,4150" scale="117" mesh="ast5.mesh" rotationAxis="0.359984,0,0.231855" rotationRate="18" /> 151 <Model position="3202,-6145,19403" scale="97" mesh="ast6.mesh" rotationAxis="0,0.470211,0.784929" rotationRate="11" /> 152 <Model position="127,-9694,1418" scale="62" mesh="ast1.mesh" rotationAxis="0.0974775,0.108828,0" rotationRate="33" /> 153 <Model position="-1033,-8523,14218" scale="89" mesh="ast1.mesh" rotationAxis="0.483568,0,0.581196" rotationRate="14" /> 154 <Model position="-28,-1140,7779" scale="47" mesh="ast2.mesh" rotationAxis="0.0572967,0.588805,0" rotationRate="25" /> 155 <Model position="-2434,-17785,-6679" scale="104" mesh="ast2.mesh" rotationAxis="0,0.458048,0.639973" rotationRate="37" /> 156 <Model position="4260,8520,-1144" scale="51" mesh="ast3.mesh" rotationAxis="0.403191,0,0.167267" rotationRate="33" /> 157 <Model position="-3288,-10630,-16957" scale="111" mesh="ast4.mesh" rotationAxis="0.451879,0.909329,0" rotationRate="34" /> 158 <Model position="9481,13063,8871" scale="74" mesh="ast6.mesh" rotationAxis="0.962342,0,0.728256" rotationRate="12" /> 159 <Model position="-13869,-19298,8075" scale="107" mesh="ast4.mesh" rotationAxis="0.989258,0,0.644457" rotationRate="38" /> 160 <Model position="946,11917,5191" scale="109" mesh="ast5.mesh" rotationAxis="0.495949,0,0.243745" rotationRate="20" /> 161 <Model position="7633,-4709,8785" scale="77" mesh="ast2.mesh" rotationAxis="0.167179,0,0.393167" rotationRate="10" /> 162 <Model position="-19647,-5229,19334" scale="48" mesh="ast6.mesh" rotationAxis="0.358825,0.560023,0" rotationRate="20" /> 163 <Model position="-17999,8929,-15681" scale="112" mesh="ast3.mesh" rotationAxis="0,0.243106,0.553743" rotationRate="37" /> 164 <Model position="8866,-1606,7639" scale="23" mesh="ast4.mesh" rotationAxis="0,0.605223,0.587725" rotationRate="31" /> 165 <Model position="-11575,15941,-9048" scale="32" mesh="ast4.mesh" rotationAxis="0.0341828,0.453673,0" rotationRate="45" /> 166 <Model position="13969,15246,-7756" scale="109" mesh="ast5.mesh" rotationAxis="0.755033,0,0.296033" rotationRate="20" /> 167 <Model position="-2325,19875,-19124" scale="86" mesh="ast2.mesh" rotationAxis="0.966503,0.242477,0" rotationRate="12" /> 168 <Model position="10304,19403,4335" scale="77" mesh="ast4.mesh" rotationAxis="0,0.00236773,0.681625" rotationRate="47" /> 169 <Model position="18514,-3055,13163" scale="78" mesh="ast5.mesh" rotationAxis="0,0.515333,0.653287" rotationRate="43" /> 170 <Model position="5789,11308,15861" scale="37" mesh="ast5.mesh" rotationAxis="0,0.382628,0.808718" rotationRate="45" /> 171 <Model position="-2178,6872,18230" scale="77" mesh="ast2.mesh" rotationAxis="0.297912,0,0.219303" rotationRate="31" /> 172 <Model position="7070,-4542,19838" scale="105" mesh="ast5.mesh" rotationAxis="0.687377,0.740396,0" rotationRate="22" /> 173 <Model position="-12823,16872,9832" scale="58" mesh="ast1.mesh" rotationAxis="0.58246,0,0.787929" rotationRate="20" /> 174 <Model position="2918,6409,8922" scale="68" mesh="ast1.mesh" rotationAxis="0.17433,0,0.826748" rotationRate="39" /> 175 <Model position="-8622,5979,-8353" scale="36" mesh="ast5.mesh" rotationAxis="0.0687289,0.268192,0" rotationRate="46" /> 176 <Model position="5979,-7415,3301" scale="31" mesh="ast6.mesh" rotationAxis="0,0.0143773,0.425826" rotationRate="46" /> 177 <Model position="-7788,19257,6317" scale="106" mesh="ast2.mesh" rotationAxis="0,0.266194,0.403447" rotationRate="39" /> 178 <Model position="12192,-12550,8480" scale="60" mesh="ast1.mesh" rotationAxis="0,0.734682,0.846663" rotationRate="25" /> 179 <Model position="440,17184,-7600" scale="113" mesh="ast4.mesh" rotationAxis="0.449652,0,0.149964" rotationRate="24" /> 180 <Model position="-12127,-16899,-8417" scale="110" mesh="ast6.mesh" rotationAxis="0,0.650716,0.368006" rotationRate="11" /> 181 <Model position="-9670,-7112,18003" scale="30" mesh="ast5.mesh" rotationAxis="0,0.139076,0.954704" rotationRate="14" /> 182 <Model position="-12697,177,7300" scale="75" mesh="ast3.mesh" rotationAxis="0.266301,0.479015,0" rotationRate="42" /> 183 <Model position="8585,-11163,10773" scale="88" mesh="ast4.mesh" rotationAxis="0.466253,0,0.430903" rotationRate="47" /> 184 <Model position="11710,-10481,-1554" scale="86" mesh="ast1.mesh" rotationAxis="0,0.964012,0.587305" rotationRate="35" /> 185 <Model position="-2643,-17331,-997" scale="77" mesh="ast1.mesh" rotationAxis="0.156293,0,0.663295" rotationRate="39" /> 186 <Model position="19531,-19531,-12541" scale="24" mesh="ast2.mesh" rotationAxis="0,0.848482,0.338155" rotationRate="17" /> 187 <Model position="7408,8762,3078" scale="26" mesh="ast5.mesh" rotationAxis="0.993064,0.489089,0" rotationRate="21" /> 188 <Model position="-14555,8711,8121" scale="20" mesh="ast6.mesh" rotationAxis="0.831339,0,0.151149" rotationRate="32" /> 189 <Model position="13295,-1765,5131" scale="26" mesh="ast1.mesh" rotationAxis="0,0.357794,0.743133" rotationRate="30" /> 190 <Model position="-19884,7732,-1186" scale="115" mesh="ast3.mesh" rotationAxis="0.958775,0,0.669833" rotationRate="23" /> 191 <Model position="18179,-17940,-19923" scale="20" mesh="ast5.mesh" rotationAxis="0.878644,0,0.217331" rotationRate="44" /> 192 <Model position="300,-9529,2789" scale="51" mesh="ast3.mesh" rotationAxis="0.54208,0,0.14456" rotationRate="37" /> 193 <Model position="14279,-9293,-11689" scale="114" mesh="ast3.mesh" rotationAxis="0,0.601114,0.645571" rotationRate="33" /> 194 <Model position="-14721,-14492,-18237" scale="76" mesh="ast3.mesh" rotationAxis="0.261656,0.207217,0" rotationRate="28" /> 195 <Model position="-1436,16914,6450" scale="73" mesh="ast1.mesh" rotationAxis="0.0323497,0,0.291569" rotationRate="28" /> 196 <Model position="19533,5238,-16963" scale="65" mesh="ast5.mesh" rotationAxis="0.0116926,0.373665,0" rotationRate="18" /> 197 <Model position="13828,8837,-12011" scale="111" mesh="ast5.mesh" rotationAxis="0,0.153227,0.382767" rotationRate="22" /> 198 <Model position="-18321,8723,2799" scale="49" mesh="ast6.mesh" rotationAxis="0.96622,0.89771,0" rotationRate="30" /> 199 <Model position="-15854,16336,11058" scale="103" mesh="ast2.mesh" rotationAxis="0.0964953,0,0.375937" rotationRate="27" /> 200 <Model position="-18187,-9952,-18073" scale="22" mesh="ast6.mesh" rotationAxis="0.61819,0.17807,0" rotationRate="33" /> 201 <Model position="-15558,-3796,17538" scale="113" mesh="ast2.mesh" rotationAxis="0.384199,0,0.383805" rotationRate="15" /> 202 <Model position="1366,12633,14581" scale="97" mesh="ast6.mesh" rotationAxis="0.930072,0,0.824122" rotationRate="22" /> 203 <Model position="-17562,12612,-2860" scale="85" mesh="ast1.mesh" rotationAxis="0.872863,0,0.10971" rotationRate="45" /> 204 <Model position="-6467,11186,272" scale="43" mesh="ast4.mesh" rotationAxis="0,0.12058,0.8878" rotationRate="32" /> 205 <Model position="-9182,-5778,-18432" scale="72" mesh="ast4.mesh" rotationAxis="0,0.317,0.972754" rotationRate="28" /> 206 <Model position="-2685,2227,-7017" scale="75" mesh="ast1.mesh" rotationAxis="0.00795897,0.859802,0" rotationRate="13" /> 207 <Model position="202,2704,7869" scale="94" mesh="ast5.mesh" rotationAxis="0,0.0867517,0.971227" rotationRate="49" /> 208 <Model position="3157,2393,4862" scale="45" mesh="ast2.mesh" rotationAxis="0.143034,0,0.945654" rotationRate="46" /> 209 <Model position="17734,11752,-2817" scale="37" mesh="ast3.mesh" rotationAxis="0.380276,0,0.284309" rotationRate="16" /> 210 <Model position="5533,9168,-2009" scale="23" mesh="ast5.mesh" rotationAxis="0,0.59324,0.275897" rotationRate="28" /> 211 <Model position="-5583,14555,-13629" scale="99" mesh="ast2.mesh" rotationAxis="0.246217,0,0.279914" rotationRate="12" /> 212 <Model position="5755,18319,-13966" scale="111" mesh="ast1.mesh" rotationAxis="0.945343,0.981593,0" rotationRate="19" /> 213 <Model position="-506,19330,10258" scale="57" mesh="ast2.mesh" rotationAxis="0.156282,0.449472,0" rotationRate="28" /> 214 <Model position="-18180,10800,-19387" scale="111" mesh="ast4.mesh" rotationAxis="0,0.138856,0.558955" rotationRate="46" /> 215 <Model position="-19442,9153,6667" scale="65" mesh="ast3.mesh" rotationAxis="0.496782,0,0.891285" rotationRate="18" /> 216 <Model position="-1991,12109,-18981" scale="39" mesh="ast1.mesh" rotationAxis="0.251609,0.291046,0" rotationRate="16" /> 217 <Model position="3016,6118,758" scale="102" mesh="ast4.mesh" rotationAxis="0.0817345,0.394506,0" rotationRate="36" /> 218 <Model position="-5930,6728,8780" scale="57" mesh="ast6.mesh" rotationAxis="0.266048,0.376193,0" rotationRate="19" /> 219 <Model position="-747,-11495,13870" scale="44" mesh="ast3.mesh" rotationAxis="0.414018,0,0.750772" rotationRate="21" /> 220 <Model position="305,-7504,9849" scale="83" mesh="ast1.mesh" rotationAxis="0.984976,0,0.0811671" rotationRate="25" /> 221 <Model position="4685,-10642,-2497" scale="85" mesh="ast6.mesh" rotationAxis="0.415558,0.751553,0" rotationRate="27" /> 222 <Model position="17354,16699,2394" scale="44" mesh="ast1.mesh" rotationAxis="0.693572,0.147356,0" rotationRate="35" /> 223 <Model position="9192,-17477,-14279" scale="61" mesh="ast2.mesh" rotationAxis="0.461486,0,0.928585" rotationRate="41" /> 224 <Model position="8023,-15706,-19451" scale="98" mesh="ast6.mesh" rotationAxis="0,0.000410601,0.90886" rotationRate="23" /> 225 <Model position="-4958,16296,-4095" scale="109" mesh="ast1.mesh" rotationAxis="0.533062,0,0.249216" rotationRate="47" /> 226 <Model position="843,16586,-13247" scale="36" mesh="ast6.mesh" rotationAxis="0,0.594639,0.732396" rotationRate="38" /> 227 <Model position="19074,8315,17723" scale="95" mesh="ast2.mesh" rotationAxis="0.966402,0,0.119558" rotationRate="44" /> 228 <Model position="-12490,734,18210" scale="35" mesh="ast4.mesh" rotationAxis="0.0976298,0.455641,0" rotationRate="24" /> 229 <Model position="-11940,6896,-17968" scale="33" mesh="ast1.mesh" rotationAxis="0,0.77757,0.432964" rotationRate="39" /> 230 <Model position="-2941,-2680,-17184" scale="54" mesh="ast2.mesh" rotationAxis="0.350042,0,0.659718" rotationRate="22" /> 231 <Model position="-9114,5177,-14254" scale="69" mesh="ast1.mesh" rotationAxis="0.65862,0.380363,0" rotationRate="27" /> 232 <Model position="-7909,1216,-6815" scale="44" mesh="ast2.mesh" rotationAxis="0,0.031546,0.392351" rotationRate="31" /> 233 <Model position="1091,-3609,53" scale="27" mesh="ast1.mesh" rotationAxis="0.702045,0.669888,0" rotationRate="17" /> 234 <Model position="8211,-10441,-7536" scale="30" mesh="ast3.mesh" rotationAxis="0,0.792689,0.311823" rotationRate="17" /> 235 <Model position="1533,8849,17655" scale="38" mesh="ast6.mesh" rotationAxis="0,0.742122,0.71549" rotationRate="49" /> 236 <Model position="6546,-5931,9791" scale="71" mesh="ast1.mesh" rotationAxis="0.373001,0,0.854548" rotationRate="47" /> 237 <Model position="14884,-14921,13589" scale="20" mesh="ast4.mesh" rotationAxis="0,0.874073,0.518839" rotationRate="28" /> 238 <Model position="-4888,1727,-581" scale="40" mesh="ast1.mesh" rotationAxis="0,0.612156,0.58926" rotationRate="49" /> 239 <Model position="16617,1806,15260" scale="28" mesh="ast1.mesh" rotationAxis="0.437493,0,0.353516" rotationRate="27" /> 240 <Model position="17792,4774,-5272" scale="101" mesh="ast3.mesh" rotationAxis="0,0.916476,0.853167" rotationRate="46" /> 241 <Model position="12856,255,-5396" scale="47" mesh="ast6.mesh" rotationAxis="0,0.18605,0.637593" rotationRate="26" /> 242 <Model position="-17573,-12764,13494" scale="107" mesh="ast5.mesh" rotationAxis="0.573851,0,0.982895" rotationRate="16" /> 243 <Model position="19722,-1137,-18060" scale="71" mesh="ast5.mesh" rotationAxis="0.273151,0.392637,0" rotationRate="34" /> 244 <Model position="12155,-1739,-17329" scale="31" mesh="ast2.mesh" rotationAxis="0,0.891737,0.832436" rotationRate="22" /> 245 <Model position="-4996,-11586,-15279" scale="119" mesh="ast2.mesh" rotationAxis="0,0.123074,0.209338" rotationRate="16" /> 246 <Model position="-13104,865,-611" scale="57" mesh="ast3.mesh" rotationAxis="0.393178,0,0.345322" rotationRate="18" /> 247 <Model position="15005,-9877,15622" scale="97" mesh="ast1.mesh" rotationAxis="0,0.152896,0.0210835" rotationRate="25" /> 248 <Model position="17583,9888,16829" scale="76" mesh="ast2.mesh" rotationAxis="0,0.947973,0.28026" rotationRate="15" /> 249 <Model position="-5279,15909,15382" scale="82" mesh="ast1.mesh" rotationAxis="0,0.499884,0.773145" rotationRate="18" /> 250 <Model position="-5938,14646,17243" scale="56" mesh="ast6.mesh" rotationAxis="0,0.0967167,0.348338" rotationRate="16" /> 251 <Model position="19518,17215,-1274" scale="119" mesh="ast1.mesh" rotationAxis="0.223859,0,0.252346" rotationRate="44" /> 252 <Model position="-16237,-17619,-6745" scale="65" mesh="ast6.mesh" rotationAxis="0.0241466,0.491285,0" rotationRate="39" /> 253 <Model position="12763,1468,-3165" scale="78" mesh="ast3.mesh" rotationAxis="0.800474,0.278164,0" rotationRate="37" /> 254 <Model position="13946,-7517,13683" scale="92" mesh="ast1.mesh" rotationAxis="0.142206,0.894399,0" rotationRate="40" /> 255 <Model position="-5491,-1084,-11117" scale="84" mesh="ast2.mesh" rotationAxis="0.174864,0,0.298694" rotationRate="14" /> 256 <Model position="2799,9189,7344" scale="54" mesh="ast3.mesh" rotationAxis="0.330476,0.71494,0" rotationRate="31" /> 257 <Model position="-18445,-17042,3296" scale="110" mesh="ast6.mesh" rotationAxis="0,0.320011,0.644437" rotationRate="20" /> 258 <Model position="-15377,5559,-12082" scale="26" mesh="ast4.mesh" rotationAxis="0,0.451157,0.102375" rotationRate="20" /> 259 <Model position="-2331,-14260,17200" scale="85" mesh="ast5.mesh" rotationAxis="0.0446891,0.515642,0" rotationRate="37" /> 260 <Model position="-9613,-4258,4537" scale="103" mesh="ast1.mesh" rotationAxis="0.820812,0.60695,0" rotationRate="13" /> 261 <Model position="-6169,19264,-4878" scale="69" mesh="ast3.mesh" rotationAxis="0,0.585115,0.235653" rotationRate="32" /> 262 <Model position="8717,-16685,9115" scale="37" mesh="ast4.mesh" rotationAxis="0.0512168,0.899599,0" rotationRate="15" /> 263 <Model position="18826,17155,4947" scale="84" mesh="ast4.mesh" rotationAxis="0.204495,0,0.838098" rotationRate="48" /> 264 <Model position="7971,3645,-9858" scale="65" mesh="ast3.mesh" rotationAxis="0.348379,0,0.384062" rotationRate="19" /> 265 <Model position="9202,8689,-6795" scale="37" mesh="ast4.mesh" rotationAxis="0.826781,0,0.641626" rotationRate="40" /> 266 <Model position="-12115,6664,5786" scale="105" mesh="ast1.mesh" rotationAxis="0.794331,0.43244,0" rotationRate="40" /> 267 <Model position="17142,15709,-8725" scale="57" mesh="ast5.mesh" rotationAxis="0,0.561188,0.300935" rotationRate="36" /> 268 <Model position="1991,-11949,-15733" scale="68" mesh="ast1.mesh" rotationAxis="0,0.390655,0.623811" rotationRate="41" /> 269 <Model position="-6787,1792,287" scale="71" mesh="ast6.mesh" rotationAxis="0.161019,0.130015,0" rotationRate="36" /> 270 <Model position="-7223,-13574,-11873" scale="24" mesh="ast4.mesh" rotationAxis="0.792203,0,0.177188" rotationRate="38" /> 43 <?lua 44 for i = 1, 226, 1 45 do ?> 46 <Model position="<?lua print(math.random(-19597, 18732))?>, <?lua print(math.random(-19597, 18732)) ?>, <?lua print(math.random(-19597, 18732)) ?>" scale="<?lua print(math.random( 20, 119)) ?>" mesh="ast<?lua print(i%6 + 1) ?>.mesh" rotationAxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationRate="<?lua print(math.random(16, 44)) ?>" /> 47 <?lua 48 end 49 ?> -
code/trunk/bin/plugins.cfg-init
r790 r1021 2 2 3 3 # Define plugin folder 4 PluginFolder=/usr/l ib/OGRE4 PluginFolder=/usr/local/lib/OGRE 5 5 6 6 # Define plugins -
code/trunk/src/audio/AudioManager.cc
r790 r1021 42 42 AudioManager::~AudioManager() 43 43 { 44 for (unsigned int i=0;i< =bgSounds.size();i++)44 for (unsigned int i=0;i<bgSounds.size();i++) 45 45 { 46 46 bgSounds[i].release(); … … 84 84 } 85 85 86 void AudioManager:: update()86 void AudioManager::tick(float dt) 87 87 { 88 88 if (bgSounds.size() > 0) -
code/trunk/src/audio/AudioManager.h
r790 r1021 3 3 4 4 #include "AudioIncludes.h" 5 6 #include "core/Tickable.h" 5 7 6 8 #include "AudioPrereqs.h" … … 12 14 namespace audio 13 15 { 14 class _AudioExport AudioManager 16 class _AudioExport AudioManager : public orxonox::Tickable 15 17 { 16 18 public: … … 37 39 38 40 // Update 39 void update();41 void tick(float dt); 40 42 41 43 void ambientAdd(std::string file); -
code/trunk/src/network/Client.cc
r790 r1021 184 184 while(!(client_connection.queueEmpty())){ 185 185 packet = client_connection.getPacket(); 186 //std::cout<< "tick packet size " << packet->dataLength << std::endl;186 COUT(5) << "tick packet size " << packet->dataLength << std::endl; 187 187 elaborate(packet, 0); // ================= i guess we got to change this .... (client_ID is always same = server) 188 188 } … … 191 191 192 192 void Client::processGamestate( GameStateCompressed *data){ 193 int id = data->id; 194 COUT(5) << "received gamestate id: " << data->id << std::endl; 193 195 gamestate.pushGameState(data); 194 std::cout << "received gamestate id: " << data->id << std::endl; 195 client_connection.addPacket(pck_gen.acknowledgement(data->id)); 196 client_connection.addPacket(pck_gen.acknowledgement(id)); 196 197 client_connection.sendPackets(); 197 198 return; … … 203 204 if(id!=NULL) 204 205 id->setNetworkID(clid->clid); 206 COUT(4) << "received and set network id: " << clid->clid << "; classname: " << clid->message << std::endl; 205 207 return; 206 208 } 207 209 208 210 void Client::processChat( chat *data){ 209 std::cout<< "Server: " << data->message << std::endl;211 COUT(0) << "Server: " << data->message << std::endl; 210 212 } 211 213 -
code/trunk/src/network/Client.h
r790 r1021 17 17 18 18 #include "NetworkPrereqs.h" 19 20 #include "core/Tickable.h" 19 21 #include "ClientConnection.h" 20 22 #include "PacketManager.h" 21 23 #include "GameStateClient.h" 22 24 //#include "NetworkFrameListener.h" 25 23 26 24 27 … … 32 35 * 33 36 */ 34 class _NetworkExport Client : PacketDecoder {37 class _NetworkExport Client : PacketDecoder, public orxonox::Tickable{ 35 38 public: 36 39 Client(); -
code/trunk/src/network/ClientConnection.cc
r790 r1021 43 43 44 44 #include "util/Sleep.h" 45 #include "orxonox/core/Debug.h" 45 46 #include "ClientConnection.h" 46 47 … … 159 160 case ENET_EVENT_TYPE_CONNECT: 160 161 case ENET_EVENT_TYPE_RECEIVE: 161 //std::cout << "gotpacket" << std::endl;162 COUT(5) << "receiver-Thread: got new packet" << std::endl; 162 163 processData(&event); 163 164 break; … … 215 216 216 217 bool ClientConnection::processData(ENetEvent *event) { 217 //std::cout<< "got packet, pushing to queue" << std::endl;218 COUT(5) << "got packet, pushing to queue" << std::endl; 218 219 // just add packet to the buffer 219 220 // this can be extended with some preprocessing -
code/trunk/src/network/ConnectionManager.cc
r790 r1021 257 257 258 258 void ConnectionManager::syncClassid(int clientID) { 259 int i=0;259 unsigned int network_id=0; 260 260 std::string classname; 261 bool abort=false;262 261 orxonox::Identifier *id; 263 while(!abort){ 264 id = ID(i); 265 std::cout << "syncid: " << i << ", ID(id): " << id << std::endl; 266 if(id == NULL){ 267 if(i!=0) 268 abort=true; 269 else{ 270 ++i; 271 continue; 272 } 273 } 274 else{ 275 classname = id->getName(); 276 addPacket(packet_gen.clid( i, classname ),clientID); 277 } 278 ++i; 262 std::map<std::string, orxonox::Identifier*>::const_iterator it = orxonox::Factory::getFactoryBegin(); 263 while(it != orxonox::Factory::getFactoryEnd()){ 264 id = (*it).second; 265 if(id == NULL) 266 continue; 267 classname = id->getName(); 268 network_id = id->getNetworkID(); 269 COUT(4) << "network_id: " << network_id << ", classname: " << classname << std::endl; 270 271 addPacket(packet_gen.clid( (int)network_id, classname ), clientID); 272 273 ++it; 279 274 } 280 275 sendPackets(); 281 276 } 282 277 278 279 280 void ConnectionManager::addClientsObjectID( int clientID, int objectID ) { 281 COUT(4) << "ship of client: " << clientID << ": " << objectID << " mapped" << std::endl; 282 clientsShip.insert( std::make_pair( clientID, objectID ) ); 283 } 284 285 int ConnectionManager::getClientsShipID( int clientID ) { 286 return clientsShip[clientID]; 287 } 288 289 int ConnectionManager::getObjectsClientID( int objectID ) { 290 std::map<int, int>::iterator iter = clientsShip.begin(); 291 while( iter != clientsShip.end() ) { 292 if( iter->second == objectID ) return iter->first; 293 } 294 return -99; 295 } 296 297 void ConnectionManager::deleteClientIDReg( int clientID ) { 298 clientsShip.erase( clientID ); 299 } 300 301 void ConnectionManager::deleteObjectIDReg( int objectID ) { 302 std::map<int, int>::iterator iter = clientsShip.begin(); 303 while( iter != clientsShip.end() ) { 304 if( iter->second == objectID ) break; 305 } 306 clientsShip.erase( iter->first ); 307 } 308 283 309 } -
code/trunk/src/network/ConnectionManager.h
r790 r1021 14 14 15 15 #include <string> 16 #include <map> 16 17 // enet library for networking support 17 18 #include <enet/enet.h> … … 73 74 bool quit; // quit-variable (communication with threads) 74 75 ClientInformation *head_; 76 77 //functions to map what object every clients uses 78 std::map<int, int> clientsShip; 79 void addClientsObjectID( int clientID, int objectID ); 80 int getClientsShipID( int clientID ); 81 int getObjectsClientID( int objectID ); 82 void deleteClientIDReg( int clientID ); 83 void deleteObjectIDReg( int objectID ); 75 84 }; 76 85 -
code/trunk/src/network/GameStateClient.cc
r871 r1021 40 40 41 41 bool GameStateClient::pushGameState(GameStateCompressed *compstate) { 42 GameState *gs; 42 43 if(compstate->diffed) 43 return loadSnapshot(decode(reference, *compstate));44 gs = decode(reference, compstate); 44 45 else 45 return loadSnapshot(decode(*compstate)); 46 gs = decode(compstate); 47 if(gs) 48 return loadSnapshot(gs); 49 COUT(4) << "could not use gamestate sent by server" << std::endl; 50 return false; 46 51 } 47 52 … … 61 66 * @param state a GameState struct containing the size of the gamestate and a pointer linking to a flat list (returned by getSnapshot) 62 67 */ 63 bool GameStateClient::loadSnapshot(GameState state) {64 unsigned char *data=state .data;65 std::cout << "loadSnapshot: loading gs: " << state.id << std::endl;68 bool GameStateClient::loadSnapshot(GameState *state) { 69 unsigned char *data=state->data; 70 COUT(4) << "loadSnapshot: loading gs: " << state->id << std::endl; 66 71 // get the start of the Synchronisable list 67 72 orxonox::Iterator<Synchronisable> it=orxonox::ObjectList<Synchronisable>::start(); 68 73 syncData sync; 69 74 // loop as long as we have some data ;) 70 while(data < state .data+state.size){75 while(data < state->data+state->size){ 71 76 // prepare the syncData struct 72 77 sync.length = (int)*data; … … 82 87 // bad luck ;) 83 88 // delete the synchronisable (obviously seems to be deleted on the server) 84 while(it && it->objectID!=sync.objectID) {89 while(it && it->objectID!=sync.objectID) 85 90 removeObject(it); 86 } 87 if(it==0){ 88 std::cout << "classid: " << sync.classID << ", name: " << ID(sync.classID)->getName() << std::endl; 89 Synchronisable *no = (Synchronisable*)(ID(sync.classID)->fabricate()); 91 92 93 if(!it){ 94 COUT(5) << "classid: " << sync.classID << ", name: " << ID((unsigned int) sync.classID)->getName() << std::endl; 95 Synchronisable *no = (Synchronisable*)(ID((unsigned int) sync.classID)->fabricate()); 90 96 no->objectID=sync.objectID; 91 97 no->classID=sync.classID; … … 93 99 // update data and create object/entity... 94 100 if( !no->updateData(sync) && !no->create() ) 95 COUT( 0) << "We couldn't create/update the object: " << sync.objectID << std::endl;101 COUT(1) << "We couldn't create/update the object: " << sync.objectID << std::endl; 96 102 ++it; 97 103 } … … 99 105 // we have our object 100 106 if(! it->updateData(sync)) 101 std::cout<< "We couldn't update objectID: " \107 COUT(1) << "We couldn't update objectID: " \ 102 108 << sync.objectID << "; classID: " << sync.classID << std::endl; 103 109 } … … 108 114 } 109 115 110 GameState GameStateClient::diff(GameState a, GameStateb) {111 unsigned char *ap = a .data, *bp = b.data;116 GameState *GameStateClient::undiff(GameState *a, GameState *b) { 117 unsigned char *ap = a->data, *bp = b->data; 112 118 int of=0; // pointers offset 113 119 int dest_length=0; 114 if(a .size>=b.size)115 dest_length=a .size;120 if(a->size>=b->size) 121 dest_length=a->size; 116 122 else 117 dest_length=b .size;123 dest_length=b->size; 118 124 unsigned char *dp = (unsigned char *)malloc(dest_length*sizeof(unsigned char)); 119 while(of<a .size && of<b.size){125 while(of<a->size && of<b->size){ 120 126 *(dp+of)=*(ap+of)^*(bp+of); // do the xor 121 127 ++of; 122 128 } 123 if(a .size!=b.size){ // do we have to fill up ?129 if(a->size!=b->size){ // do we have to fill up ? 124 130 unsigned char n=0; 125 if(a .size<b.size){131 if(a->size<b->size){ 126 132 while(of<dest_length){ 127 133 *(dp+of)=n^*(bp+of); … … 137 143 // should be finished now 138 144 // FIXME: is it true or false now? (struct has changed, producing warnings) 139 GameState r = {b.id, dest_length, true, dp}; 145 GameState *r = new GameState; 146 r->id = b->id; 147 r->size = dest_length; 148 r->diffed = false; 149 r->data = dp; 140 150 return r; 141 151 } 142 152 143 GameState GameStateClient::decompress(GameStateCompresseda) {144 int normsize = a .normsize;145 int compsize = a .compsize;153 GameState *GameStateClient::decompress(GameStateCompressed *a) { 154 int normsize = a->normsize; 155 int compsize = a->compsize; 146 156 int bufsize; 147 157 if(normsize < compsize) … … 154 164 //std::cout << "gamestateclient" << std::endl; 155 165 //std::cout << "normsize " << a.normsize << " compsize " << a.compsize << " " << bufsize << std::endl; 156 retval = uncompress( dest, &length, a .data, (uLong)compsize );166 retval = uncompress( dest, &length, a->data, (uLong)compsize ); 157 167 //std::cout << "length " << length << std::endl; 158 168 switch ( retval ) { 159 case Z_OK: std::cout<< "successfully decompressed" << std::endl; break;160 case Z_MEM_ERROR: std::cout << "not enough memory available" << std::endl; break;161 case Z_BUF_ERROR: std::cout << "not enough memory available in the buffer" << std::endl; break;162 case Z_DATA_ERROR: std::cout << "data corrupted" << std::endl; break;169 case Z_OK: COUT(4) << "successfully decompressed" << std::endl; break; 170 case Z_MEM_ERROR: COUT(1) << "not enough memory available" << std::endl; return NULL; 171 case Z_BUF_ERROR: COUT(2) << "not enough memory available in the buffer" << std::endl; return NULL; 172 case Z_DATA_ERROR: COUT(2) << "data corrupted" << std::endl; return NULL; 163 173 } 164 174 165 GameState gamestate; 166 gamestate.id = a.id; 167 gamestate.size = normsize; 168 gamestate.data = dest; 169 gamestate.diffed = a.diffed; 175 GameState *gamestate = new GameState; 176 gamestate->id = a->id; 177 gamestate->size = normsize; 178 gamestate->data = dest; 179 gamestate->diffed = a->diffed; 180 181 delete a->data; //delete compressed data 182 delete a; //we do not need the old (struct) gamestate anymore 170 183 171 184 return gamestate; 172 185 } 173 186 174 GameState GameStateClient::decode(GameState a, GameStateCompressedx) {175 GameState t = decompress(x);176 return diff(a, t);187 GameState *GameStateClient::decode(GameState *a, GameStateCompressed *x) { 188 GameState *t = decompress(x); 189 return undiff(a, t); 177 190 } 178 191 179 GameState GameStateClient::decode(GameStateCompressedx) {180 GameState t = decompress(x);192 GameState *GameStateClient::decode(GameStateCompressed *x) { 193 GameState *t = decompress(x); 181 194 return t; 182 195 } -
code/trunk/src/network/GameStateClient.h
r790 r1021 25 25 bool pushGameState(GameStateCompressed *compstate); 26 26 private: 27 bool loadSnapshot(GameState state);28 GameState diff(GameState a, GameStateb);29 GameState decompress(GameStateCompresseda);30 GameState decode(GameState a, GameStateCompressedx);31 GameState decode(GameStateCompressedx);27 bool loadSnapshot(GameState *state); 28 GameState *undiff(GameState *a, GameState *b); 29 GameState *decompress(GameStateCompressed *a); 30 GameState *decode(GameState *a, GameStateCompressed *x); 31 GameState *decode(GameStateCompressed *x); 32 32 void removeObject(orxonox::Iterator<Synchronisable> &it); 33 33 34 GameState reference;34 GameState *reference; 35 35 }; 36 36 -
code/trunk/src/network/GameStateManager.cc
r871 r1021 43 43 44 44 #include "core/CoreIncludes.h" 45 45 46 #include "ClientInformation.h" 46 47 #include "Synchronisable.h" … … 65 66 } 66 67 67 GameStateCompressed GameStateManager::popGameState(int clientID) {68 GameStateCompressed *GameStateManager::popGameState(int clientID) { 68 69 int gID = head_->findClient(clientID)->getGamestateID(); 69 std::cout<< "popgamestate: sending gstate id: " << id << "diffed from: " << gID << std::endl;70 COUT(4) << "popgamestate: sending gstate id: " << id << "diffed from: " << gID << std::endl; 70 71 if(gID!=GAMESTATEID_INITIAL){ 71 72 GameState *client = gameStateMap[gID]; … … 100 101 GameState *retval=new GameState; //return value 101 102 retval->id=id++; 102 std::cout<< "producing gamestate with id: " << retval->id << std::endl;103 COUT(4) << "producing gamestate with id: " << retval->id << std::endl; 103 104 // reserve a little memory and increase it later on 104 //COUT(2) << "mallocing" << std::endl;105 COUT(5) << "mallocing" << std::endl; 105 106 retval->data = (unsigned char*)malloc(memsize); 106 //COUT(2) << "malloced" << std::endl;107 COUT(5) << "malloced" << std::endl; 107 108 108 109 // offset of memory functions … … 113 114 //get size of the synchronisable 114 115 tempsize=it->getSize(); 115 //std::cout<< "size of temp gamestate: " << tempsize << std::endl;116 // COUT(5) << "size of temp gamestate: " << tempsize << std::endl; 116 117 //COUT(2) << "size of synchronisable: " << tempsize << std::endl; 117 118 // add place for data and 3 ints (length,classid,objectid) … … 137 138 offset+=tempsize+3*sizeof(int); 138 139 } 140 COUT(5) << "Gamestate size: " << totalsize << std::endl; 139 141 retval->size=totalsize; 140 142 return retval; 141 143 } 142 144 143 GameStateCompressed GameStateManager::encode(GameState *a, GameState *b) {145 GameStateCompressed *GameStateManager::encode(GameState *a, GameState *b) { 144 146 //GameState r = diff(a,b); 145 147 //r.diffed = true; 146 GameState r = *b;147 r .diffed = false;148 return compress_( &r);149 } 150 151 GameStateCompressed GameStateManager::encode(GameState *a) {148 GameState *r = b; 149 r->diffed = false; 150 return compress_(r); 151 } 152 153 GameStateCompressed *GameStateManager::encode(GameState *a) { 152 154 a->diffed=false; 153 155 return compress_(a); 154 156 } 155 157 156 GameState GameStateManager::diff(GameState *a, GameState *b) {158 GameState *GameStateManager::diff(GameState *a, GameState *b) { 157 159 unsigned char *ap = a->data, *bp = b->data; 158 160 int of=0; // pointers offset … … 181 183 } 182 184 } 183 // should be finished now 184 // FIXME: is it true or false now? (struct has changed, producing warnings) 185 GameState r = {b->id, dest_length, true, dp}; 185 186 GameState *r = new GameState; 187 r->id = b->id; 188 r->size = dest_length; 189 r->diffed = true; 190 r->data = dp; 186 191 return r; 187 192 } 188 193 189 GameStateCompressed GameStateManager::compress_(GameState *a) {190 //COUT(2) << "compressing gamestate" << std::endl;194 GameStateCompressed *GameStateManager::compress_(GameState *a) { 195 COUT(5) << "compressing gamestate" << std::endl; 191 196 int size = a->size; 192 197 uLongf buffer = (uLongf)((a->size + 12)*1.01)+1; … … 198 203 199 204 switch ( retval ) { 200 case Z_OK: std::cout << "successfully compressed" << std::endl; break; 201 case Z_MEM_ERROR: std::cout << "not enough memory available" << std::endl; break; 202 case Z_BUF_ERROR: std::cout << "not enough memory available in the buffer" << std::endl; break; 203 case Z_DATA_ERROR: std::cout << "decompress: data corrupted" << std::endl; break; 204 } 205 206 GameStateCompressed compressedGamestate; 207 compressedGamestate.compsize = buffer; 208 //std::cout << "compressedGamestate.compsize = buffer; " << buffer << std::endl; 209 compressedGamestate.normsize = size; 210 //std::cout << "compressedGamestate.normsize = size; " << size << std::endl; 211 compressedGamestate.id = a->id; 212 compressedGamestate.data = dest; 213 compressedGamestate.diffed = a->diffed; 205 case Z_OK: COUT(5) << "successfully compressed" << std::endl; break; 206 case Z_MEM_ERROR: COUT(1) << "not enough memory available in gamestate.compress" << std::endl; 207 return NULL; 208 case Z_BUF_ERROR: COUT(2) << "not enough memory available in the buffer in gamestate.compress" << std::endl; 209 return NULL; 210 case Z_DATA_ERROR: COUT(2) << "decompress: data corrupted in gamestate.compress" << std::endl; 211 return NULL; 212 } 213 214 GameStateCompressed *compressedGamestate = new GameStateCompressed; 215 compressedGamestate->compsize = buffer; 216 // std::cout << "compressedGamestate.compsize = buffer; " << buffer << std::endl; 217 compressedGamestate->normsize = size; 218 // std::cout << "compressedGamestate.normsize = size; " << size << std::endl; 219 compressedGamestate->id = a->id; 220 compressedGamestate->data = dest; 221 compressedGamestate->diffed = a->diffed; 214 222 215 223 return compressedGamestate; -
code/trunk/src/network/GameStateManager.h
r790 r1021 43 43 ~GameStateManager(); 44 44 void update(); 45 GameStateCompressed popGameState(int clientID);45 GameStateCompressed *popGameState(int clientID); 46 46 void ackGameState(int clientID, int gamestateID); 47 47 int id; 48 48 private: 49 49 GameState *getSnapshot(int id); 50 GameStateCompressed encode(GameState *a, GameState *b);51 GameStateCompressed encode(GameState *a);52 GameState diff(GameState *a, GameState *b);53 GameStateCompressed compress_(GameState *a);50 GameStateCompressed *encode(GameState *a, GameState *b); 51 GameStateCompressed *encode(GameState *a); 52 GameState *diff(GameState *a, GameState *b); 53 GameStateCompressed *compress_(GameState *a); 54 54 bool deleteUnusedGameState(int gamestateID); 55 55 -
code/trunk/src/network/PacketDecoder.cc
r790 r1021 38 38 #include "PacketTypes.h" 39 39 #include "PacketManager.h" 40 #include "orxonox/core/Debug.h" 40 41 41 42 namespace network 42 43 { 43 using namespace std;44 44 45 45 PacketDecoder::PacketDecoder(){} … … 52 52 { 53 53 int client = clientId; 54 cout << "clientId: " << client <<endl; //control cout, not important, just debugging info54 COUT(5) << "clientId: " << client << std::endl; //control cout, not important, just debugging info 55 55 int id = (int)*packet->data; //the first 4 bytes are always the enet packet id 56 std::cout<< "packet id: " << id << std::endl;57 std::cout<< "packet size inside packetdecoder: " << packet->dataLength << std::endl;56 COUT(5) << "packet id: " << id << std::endl; 57 // COUT(5) << "packet size inside packetdecoder: " << packet->dataLength << std::endl; 58 58 switch( id ) { 59 59 case ACK: … … 93 93 94 94 95 std::cout<< "got ack id: " << a->id << std::endl;95 COUT(5) << "got ack id: " << a->id << std::endl; 96 96 processAck( a, clientId ); //debug info 97 97 … … 144 144 void PacketDecoder::gstate( ENetPacket* packet ) 145 145 { 146 GameStateCompressed* currentState = new GameStateCompressed; 146 GameStateCompressed* currentState = NULL; 147 currentState = new GameStateCompressed; 148 if(currentState == NULL){ 149 COUT(3) << "could not generate new GameStateCompressed" << std::endl; 150 return; 151 } 147 152 //since it's not alowed to use void* for pointer arithmetic 148 unsigned char* data = (unsigned char *)packet->data;153 unsigned char* data = (unsigned char *)(packet->data); 149 154 //copy the GameStateCompressed id into the struct, which is located at second place data+sizeof( int ) 150 155 //memcpy( (void*)&(currentState->id), (const void*)(data+sizeof( int )), sizeof( int ) ); 151 currentState->id = (int)*(data+sizeof(int)); 152 std::cout << "id: " << currentState->id << std::endl; 156 //currentState->id = *((int *)packet->data+sizeof(int)); 157 memcpy( (void*)&(currentState->id), (const void*)(packet->data+1*sizeof( int )), sizeof( int) ); 158 COUT(5) << "decoder: received gs id: " << currentState->id << std::endl; 159 // std::cout << "id: " << currentState->id << std::endl; 153 160 //copy the size of the GameStateCompressed compressed data into the new GameStateCompressed struct, located at 3th 154 161 //position of the data stream, data+2*sizeof( int ) 155 memcpy( (void*)&(currentState->compsize), (const void*)( data+2*sizeof( int )), sizeof( int) );162 memcpy( (void*)&(currentState->compsize), (const void*)(packet->data+2*sizeof( int )), sizeof( int) ); 156 163 //currentState->compsize = (int)*(data+2*sizeof(int)); 157 std::cout << "compsize: " << currentState->compsize << std::endl;164 // std::cout << "compsize: " << currentState->compsize << std::endl; 158 165 //size of uncompressed data 159 memcpy( (void*)&(currentState->normsize), (const void*)( data+3*sizeof( int )), sizeof( int ) );166 memcpy( (void*)&(currentState->normsize), (const void*)(packet->data+3*sizeof( int )), sizeof( int ) ); 160 167 //currentState->normsize = (int)*(data+3*sizeof(int)); 161 std::cout << "normsize. " << currentState->normsize << std::endl;168 // std::cout << "normsize. " << currentState->normsize << std::endl; 162 169 //since the packetgenerator was changed, due to a new parameter, change this function too 163 memcpy( (void*)&(currentState->diffed), (const void*)( data+4*sizeof(int)), sizeof(bool));170 memcpy( (void*)&(currentState->diffed), (const void*)(packet->data+4*sizeof(int)), sizeof(bool)); 164 171 //currentState->diffed = (bool)*(data+4*sizeof(int)); 165 std::cout << "diffed: " << currentState->diffed << std::endl;172 // std::cout << "diffed: " << currentState->diffed << std::endl; 166 173 //since data is not allocated, because it's just a pointer, allocate it with size of gamestatedatastream 174 if(currentState->compsize==0) 175 COUT(2) << "compsize is 0" << std::endl; 167 176 currentState->data = (unsigned char*)(malloc( currentState->compsize )); 168 177 if(currentState->data==NULL) 169 std::cout << "memory leak" << std::endl;178 COUT(2) << "Gamestatepacket-decoder: memory leak" << std::endl; 170 179 //copy the GameStateCompressed data 171 180 //std::cout << "packet size (enet): " << packet->dataLength << std::endl; 172 181 //std::cout << "totallen: " << 4*sizeof(int)+sizeof(bool)+currentState->compsize << std::endl; 173 memcpy( (void*)(currentState->data), (const void*)(data+4*sizeof( int ) + sizeof(bool)), currentState->compsize ); 174 175 //clean memory 176 enet_packet_destroy( packet ); 177 //run processGameStateCompressed 178 //TODO: not yet implemented! 182 memcpy( (void*)(currentState->data), (const void*)(packet->data+4*sizeof( int ) + sizeof(bool)), currentState->compsize ); 183 184 //clean memory 185 enet_packet_destroy( packet ); 179 186 processGamestate(currentState); 180 187 } … … 189 196 void *data = (void *)cid->message; 190 197 memcpy(data, (const void*)(packet->data+3*sizeof(int)), cid->length); 191 std::cout<< "classid: " << cid->clid << ", name: " << cid->message << std::endl;198 COUT(4) << "classid: " << cid->clid << ", name: " << cid->message << std::endl; 192 199 enet_packet_destroy( packet ); 193 200 processClassid(cid); … … 223 230 void PacketDecoder::printAck( ack* data ) 224 231 { 225 cout << "data id: " << data->id <<endl;226 cout << "data: " << data->a <<endl;232 COUT(5) << "data id: " << data->id << std::endl; 233 COUT(5) << "data: " << data->a << std::endl; 227 234 } 228 235 229 236 void PacketDecoder::printMouse( mouse* data ) 230 237 { 231 cout << "data id: " << data->id <<endl;232 cout << "data: " << data->x << " " << data->y <<endl;238 COUT(5) << "data id: " << data->id << std::endl; 239 COUT(5) << "data: " << data->x << " " << data->y << std::endl; 233 240 } 234 241 235 242 void PacketDecoder::printKey( keyboard* data ) 236 243 { 237 cout << "data id: " << data->id <<endl;238 cout << "data: " << (char)data->press <<endl;244 COUT(5) << "data id: " << data->id << std::endl; 245 COUT(5) << "data: " << (char)data->press << std::endl; 239 246 } 240 247 … … 242 249 { 243 250 if(clientId!=CLIENTID_CLIENT) 244 cout << "client: " << clientId <<endl;245 cout << "data id: " << data->id <<endl;246 cout << "data: " << data->message <<endl;251 COUT(5) << "client: " << clientId << std::endl; 252 COUT(5) << "data id: " << data->id << std::endl; 253 COUT(5) << "data: " << data->message << std::endl; 247 254 } 248 255 249 256 void PacketDecoder::printGamestate( GameStateCompressed* data ) 250 257 { 251 cout << "id of GameStateCompressed: " << data->id <<endl;252 cout << "size of GameStateCompressed: " << data->compsize <<endl;258 COUT(5) << "id of GameStateCompressed: " << data->id << std::endl; 259 COUT(5) << "size of GameStateCompressed: " << data->compsize << std::endl; 253 260 } 254 261 255 262 void PacketDecoder::printClassid( classid *cid) 256 263 { 257 cout << "id of classid: " << cid->id <<endl;258 cout << "size of classid: " << cid->length <<endl;259 cout << "ID of classid: " << cid->clid <<endl;260 cout << "data of classid: " << cid->message <<endl;264 COUT(5) << "id of classid: " << cid->id << std::endl; 265 COUT(5) << "size of classid: " << cid->length << std::endl; 266 COUT(5) << "ID of classid: " << cid->clid << std::endl; 267 COUT(5) << "data of classid: " << cid->message << std::endl; 261 268 } 262 269 -
code/trunk/src/network/PacketGenerator.cc
r790 r1021 50 50 ENetPacket* PacketGenerator::acknowledgement( int state, int reliable ) 51 51 { 52 std::cout<< "generating new acknowledgement, id: " << state << std::endl;52 COUT(4) << "generating new acknowledgement, id: " << state << std::endl; 53 53 ack* ackreq = new ack; 54 54 ackreq->id = ACK; … … 63 63 ENetPacket* PacketGenerator::mousem( double x, double y, int reliable ) 64 64 { 65 std::cout<< "generating new mouse" << std::endl;65 COUT(4) << "generating new mouse" << std::endl; 66 66 mouse* mousemove = new mouse; 67 67 mousemove->id = MOUSE; … … 77 77 ENetPacket* PacketGenerator::keystrike( char press, int reliable ) 78 78 { 79 std::cout<< "generating new keyboard" << std::endl;79 COUT(4) << "generating new keyboard" << std::endl; 80 80 keyboard* key = new keyboard; 81 81 key->id = KEYBOARD; -
code/trunk/src/network/PacketManager.h
r790 r1021 4 4 #include <string> 5 5 #include <enet/enet.h> 6 7 #include "core/CoreIncludes.h" 6 8 7 9 #include "NetworkPrereqs.h" … … 65 67 virtual void processGamestate(GameStateCompressed *state); 66 68 virtual void processAck( ack *data, int clientID); 67 v oid processClassid( classid *cid);69 virtual void processClassid( classid *cid); 68 70 //virtual void processAck( ack *data); 69 71 -
code/trunk/src/network/Server.cc
r790 r1021 18 18 #include "ClientInformation.h" 19 19 //#include "NetworkFrameListener.h" 20 #include "util/Sleep.h" 20 21 #include "Server.h" 21 22 … … 112 113 processQueue(); 113 114 updateGamestate(); 115 116 sleep(1); // TODO remove 114 117 return; 115 118 } … … 134 137 gamestates->update(); 135 138 //std::cout << "updated gamestate, sending it" << std::endl; 136 sendGameState(); 139 //if(clients->getGamestateID()!=GAMESTATEID_INITIAL) 140 sendGameState(); 137 141 //std::cout << "sent gamestate" << std::endl; 138 142 } … … 142 146 */ 143 147 bool Server::sendGameState() { 144 std::cout << "starting gamestate" << std::endl;148 COUT(5) << "starting sendGameState" << std::endl; 145 149 ClientInformation *temp = clients; 146 150 bool added=false; … … 151 155 } 152 156 if( !(temp->getSynched()) ){ 153 std::cout<< "not sending gamestate" << std::endl;157 COUT(5) << "not sending gamestate" << std::endl; 154 158 temp=temp->next(); 155 159 continue; 156 160 } 157 std::cout << "doing gamestate" << std::endl;161 COUT(5) << "doing gamestate gamestate preparation" << std::endl; 158 162 int gid = temp->getGamestateID(); 159 163 int cid = temp->getID(); 160 std::cout << "server, got acked ID: " << gid << std::endl; 161 GameStateCompressed *gs = &(gamestates->popGameState(cid)); // FIXME: taking address of temporary, check if correct 164 COUT(5) << "server, got acked (gamestate) ID: " << gid << std::endl; 165 GameStateCompressed *gs = gamestates->popGameState(cid); 166 if(gs==NULL){ 167 COUT(2) << "could not generate gamestate" << std::endl; 168 return false; 169 } 162 170 //std::cout << "adding gamestate" << std::endl; 163 171 connection->addPacket(packet_gen.gstate(gs), cid); … … 168 176 if(added) 169 177 return connection->sendPackets(); 170 else171 178 COUT(5) << "had no gamestates to send" << std::endl; 179 return false; 172 180 } 173 181 174 182 void Server::processAck( ack *data, int clientID) { 183 COUT(5) << "processing ack from client: " << clientID << "; ack-id: " << data->id << std::endl; 175 184 clients->findClient(clientID)->setGamestateID(data->a); 176 185 } -
code/trunk/src/network/Server.h
r790 r1021 16 16 #include <string> 17 17 18 #include "NetworkPrereqs.h" 19 20 #include "core/Tickable.h" 18 21 #include "PacketManager.h" 19 #include "NetworkPrereqs.h" 22 23 20 24 21 25 namespace network … … 25 29 * It implements all functions necessary for a Server 26 30 */ 27 class _NetworkExport Server : public PacketDecoder {31 class _NetworkExport Server : public PacketDecoder, public orxonox::Tickable{ 28 32 public: 29 33 Server(); -
code/trunk/src/network/Synchronisable.h
r871 r1021 56 56 int getSize(); 57 57 bool updateData(syncData vars); 58 v oid registerAllVariables();58 virtual void registerAllVariables()=0; 59 59 virtual bool create()=0; 60 60 protected: -
code/trunk/src/network/dummyclient3.cc
r790 r1021 13 13 network::PacketGenerator pck; 14 14 const int PORT = 55556; 15 std::cout<< "Enter address of the server xxx.xxx.xxx.xxx (enter for localhost)" << std::endl;15 COUT(0) << "Enter address of the server xxx.xxx.xxx.xxx (enter for localhost)" << std::endl; 16 16 std::string str; 17 17 std::getline(std::cin, str); 18 std::cout<< "You entered: " << str << std::endl;18 COUT(3) << "You entered: " << str << std::endl; 19 19 if(str.compare("")==0) 20 20 str="127.0.0.1"; … … 22 22 Client client( str, PORT ); 23 23 if ( client.establishConnection() ) 24 std::cout<< "connection established" << std::endl;25 else std::cout<< "problems establishing connection" << std::endl;24 COUT(3) << "connection established" << std::endl; 25 else COUT(0) << "problems establishing connection" << std::endl; 26 26 char message[10000]; 27 27 char signs[] = "abcdefghijklmnopqrstuvwxy"; -
code/trunk/src/orxonox/CMakeLists.txt
r871 r1021 1 1 SET( ORXONOX_SRC_FILES 2 2 GraphicsEngine.cc 3 InputEventListener.cc 4 InputHandler.cc 3 5 Main.cc 4 6 Orxonox.cc 5 objects/Tickable.cc 6 SpaceshipSteering.cc 7 # SpaceshipSteering.cc 7 8 hud/HUD.cc 8 9 particle/ParticleInterface.cc -
code/trunk/src/orxonox/GraphicsEngine.cc
r790 r1021 33 33 34 34 #include <OgreRoot.h> 35 #include <OgreException.h> 35 36 #include <OgreConfigFile.h> 36 37 #include <OgreTextureManager.h> 38 #include <OgreRenderWindow.h> 37 39 40 #include "core/CoreIncludes.h" 38 41 #include "core/Debug.h" 39 42 #include "GraphicsEngine.h" … … 46 49 GraphicsEngine::GraphicsEngine() 47 50 { 51 RegisterObject(GraphicsEngine); 52 //this->bOverwritePath_ = false; 53 this->setConfigValues(); 48 54 // set to standard values 49 55 this->configPath_ = ""; 50 this->dataPath_ = ""; 51 scene_ = NULL; 56 this->root_ = 0; 57 this->scene_ = 0; 58 this->renderWindow_ = 0; 52 59 } 53 60 … … 55 62 GraphicsEngine::~GraphicsEngine() 56 63 { 64 if (!this->root_) 65 delete this->root_; 66 } 67 68 void GraphicsEngine::setConfigValues() 69 { 70 SetConfigValue(dataPath_, dataPath_).description("relative path to media data"); 71 57 72 } 58 73 … … 66 81 root_ = new Root(NULL, configPath_ + "ogre.cfg", configPath_ + "Ogre.log"); 67 82 #endif*/ 68 #if defined(_DEBUG) && defined(WIN32)83 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC && defined(_DEBUG) 69 84 std::string plugin_filename = "plugins_d.cfg"; 70 85 #else … … 87 102 } 88 103 89 bool GraphicsEngine::load( )104 bool GraphicsEngine::load(std::string dataPath) 90 105 { 106 // temporary overwrite of dataPath, change ini file for permanent change 107 if( dataPath != "" ) 108 dataPath_ = dataPath; 91 109 loadRessourceLocations(this->dataPath_); 92 110 if (!root_->restoreConfig() && !root_->showConfigDialog()) … … 95 113 } 96 114 97 void GraphicsEngine:: startRender()115 void GraphicsEngine::initialise() 98 116 { 99 root_->initialise(true, "OrxonoxV2");117 this->renderWindow_ = root_->initialise(true, "OrxonoxV2"); 100 118 TextureManager::getSingleton().setDefaultNumMipmaps(5); 119 //TODO: Do NOT load all the groups, why are we doing that? And do we really do that? initialise != load... 101 120 ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); 102 121 } … … 131 150 } 132 151 152 /** 153 Returns the window handle of the render window. 154 At least the InputHandler uses this to create the OIS::InputManager 155 @return The window handle of the render window 156 */ 157 size_t GraphicsEngine::getWindowHandle() 158 { 159 if (this->renderWindow_) 160 { 161 Ogre::RenderWindow *renderWindow = this->root_->getAutoCreatedWindow(); 162 size_t windowHnd = 0; 163 renderWindow->getCustomAttribute("WINDOW", &windowHnd); 164 return windowHnd; 165 } 166 else 167 return 0; 168 } 169 170 /** 171 Get the width of the current render window 172 @return The width of the current render window 173 */ 174 int GraphicsEngine::getWindowWidth() const 175 { 176 if (this->renderWindow_) 177 { 178 return this->renderWindow_->getWidth(); 179 } 180 else 181 return 0; 182 } 183 184 /** 185 Get the height of the current render window 186 @return The height of the current render window 187 */ 188 int GraphicsEngine::getWindowHeight() const 189 { 190 if (this->renderWindow_) 191 { 192 return this->renderWindow_->getHeight(); 193 } 194 else 195 return 0; 196 } 133 197 134 198 } -
code/trunk/src/orxonox/GraphicsEngine.h
r790 r1021 10 10 #include <string> 11 11 12 #include <OgrePrerequisites.h> 12 13 #include <OgreRoot.h> 13 14 #include <OgreSceneManager.h> 14 15 15 16 #include "OrxonoxPrereqs.h" 17 #include "core/OrxonoxClass.h" 16 18 17 19 … … 21 23 * graphics engine manager class 22 24 */ 23 class _OrxonoxExport GraphicsEngine { 25 class _OrxonoxExport GraphicsEngine : public OrxonoxClass 26 { 24 27 public: 25 28 GraphicsEngine(); 26 29 inline void setConfigPath(std::string path) { this->configPath_ = path; }; 27 30 // find a better way for this 28 inline Ogre::Root* getRoot() { return root_; }; 31 //inline Ogre::Root* getRoot() { return root_; }; 32 void setConfigValues(); 29 33 void setup(); 30 bool load( );34 bool load(std::string path); 31 35 void loadRessourceLocations(std::string path); 32 36 Ogre::SceneManager* getSceneManager(); 33 void startRender(); 37 void initialise(); 38 39 // several window properties 40 Ogre::RenderWindow* getRenderWindow() { return this->renderWindow_; } 41 size_t getWindowHandle(); 42 int getWindowWidth() const; 43 int getWindowHeight() const; 44 45 // Ogre Root access for Orxonox 46 void frameStarted(Ogre::FrameEvent &evt) 47 { if (root_) root_->_fireFrameStarted(evt); } 48 void frameEnded (Ogre::FrameEvent &evt) 49 { if (root_) root_->_fireFrameEnded(evt); } 50 void renderOneFrame() 51 { if (root_) root_->_updateAllRenderTargets(); } 34 52 35 53 virtual ~GraphicsEngine(); 54 36 55 private: 37 56 Ogre::Root* root_; //!< Ogre's root … … 39 58 std::string dataPath_; //!< path to data file 40 59 Ogre::SceneManager* scene_; //!< scene manager of the game 60 Ogre::RenderWindow* renderWindow_;//!< the current render window 61 //bool bOverwritePath_; //!< overwrites path 41 62 42 63 }; -
code/trunk/src/orxonox/Main.cc
r790 r1021 27 27 28 28 /** 29 @file Main.cc30 @brief main file handling most of the machine specific code29 @file 30 @brief Entry point of the program. Platform specific code. 31 31 */ 32 32 33 33 #include "OrxonoxStableHeaders.h" 34 34 35 #include <OgrePlatform.h> 36 #include <OgreException.h> 35 #include <exception> 37 36 38 37 #include "OrxonoxPlatform.h" 39 38 #include "core/SignalHandler.h" 40 39 #include "Orxonox.h" 41 40 42 41 using namespace orxonox; 43 #if O GRE_PLATFORM == OGRE_PLATFORM_APPLE42 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE 44 43 #include <CoreFoundation/CoreFoundation.h> 45 44 … … 72 71 #endif 73 72 74 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 && !defined( __MINGW32__ ) 75 #ifndef WIN32_LEAN_AND_MEAN 76 #define WIN32_LEAN_AND_MEAN 77 #endif 78 #include "windows.h" 79 INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT) 80 { 81 // something like this would be less hacky 82 // maybe one can work with trailing '\0' 83 // or maybe use string based functions 84 // I was unable to test it without working windows version 85 char* cmd = strCmdLine; 86 int argc = 2; 87 int i; 88 int j; 89 for(i = 0; cmd[i] != NULL; i++) 90 { 91 if(cmd[i] == ' ') argc++; 92 } 93 char **argv = new char*[argc]; 94 for (j = 0; j < argc; j++) 95 { 96 argv[j] = new char[i]; 97 } 98 j = 1; 99 int k = 0; 100 for(int i = 0; cmd[i] != NULL; i++) 101 { 102 if(cmd[i] != ' ') { 103 argv[j][k] = cmd[i]; 104 k++; 105 } 106 else { 107 argv[j][k] = '\0'; 108 k = 0; 109 j++; 110 } 111 } 112 argv[j][k] = '\0'; 113 argv[0] = "BeniXonox.exe"; 114 //char *argv[2]; 115 //argv[0] = "asdfProgram"; 116 //argv[1] = strCmdLine; 117 //int argc = 2; 73 int main(int argc, char **argv) 74 { 75 try { 76 SignalHandler::getInstance()->doCatch(argv[0], "orxonox.log"); 77 Orxonox* orx = Orxonox::getSingleton(); 78 79 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE 80 orx->init(argc, argv, macBundlePath()); 118 81 #else 119 int main(int argc, char **argv) 120 { 121 #endif 122 try { 123 srand(time(0)); //initaialize RNG; TODO check if it works on win 124 SignalHandler::getInstance()->doCatch(argv[0], "orxonox.log"); 125 Orxonox* orx = Orxonox::getSingleton(); 126 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE 127 orx->init(argc, argv, macBundlePath()); 128 orx->start(); 129 #else 130 /* 131 for (int i = 0; i < 500; i++) 132 { 133 int x = rand() % 40000 - 20000; 134 int y = rand() % 40000 - 20000; 135 int z = rand() % 40000 - 20000; 136 137 int scale = rand() % 100 + 20; 138 139 int version = rand() % 6 + 1; 140 141 float rotx = float(rand()) / RAND_MAX; 142 float roty = float(rand()) / RAND_MAX; 143 float rotz = float(rand()) / RAND_MAX; 144 145 int axis = rand() % 3 + 1; 146 147 if (axis == 1) 148 rotx = 0; 149 if (axis == 2) 150 roty = 0; 151 if (axis == 3) 152 rotz = 0; 153 154 int rotation = rand() % 40 + 10; 155 156 // <Model position="1000,1500,0" scale="50" mesh="ast1.mesh" rotationAxis="0,1.25,0" rotationRate="70" /> 157 std::cout << " <Model position=\"" << x << "," << y << "," << z << "\" scale=\"" << scale << "\" mesh=\"ast" << version << ".mesh\" rotationAxis=\"" << rotx << "," << roty << "," << rotz << "\" rotationRate=\"" << rotation << "\" />" << std::endl; 158 159 160 } 161 */ 162 orx->init(argc, argv, ""); 163 orx->start(); 164 #endif 165 } 166 catch (Ogre::Exception& e) { 167 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 && !defined( __MINGW32__ ) 168 MessageBoxA(NULL, e.getFullDescription().c_str(), 169 "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL); 170 #else 171 std::cerr << "Exception:\n"; 172 std::cerr << e.getFullDescription().c_str() << "\n"; 173 #endif 174 return 1; 175 } 176 return 0; 177 } 178 179 #ifdef __cplusplus 180 } 82 orx->init(argc, argv, ""); 181 83 #endif 182 84 183 184 /*int main(int argc, char **argv) 185 { 186 try85 orx->start(); 86 orx->destroy(); 87 } 88 catch (std::exception &ex) 187 89 { 188 SignalHandler::getInstance()->doCatch(argv[0], "orxonox.log"); 189 Orxonox* orx = Orxonox::getSingleton(); 190 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE 191 orx->init(argc, argv, macBundlePath()); 192 orx->start(); 193 #else 194 orx->init(argc, argv, ""); 195 orx->start(); 196 #endif 197 198 } 199 catch(Ogre::Exception& e) 200 { 201 fprintf(stderr, "An exception has occurred: %s\n", 202 e.getFullDescription().c_str()); 90 std::cerr << "Exception:\n"; 91 std::cerr << ex.what() << "\n"; 203 92 return 1; 204 93 } … … 207 96 } 208 97 209 */ 98 #ifdef __cplusplus 99 } 100 #endif -
code/trunk/src/orxonox/Orxonox.cc
r871 r1021 35 35 36 36 //****** OGRE ****** 37 #include <OgreException.h> 38 #include <OgreRoot.h> 37 //#include <OgreException.h> 39 38 #include <OgreFrameListener.h> 40 #include <OgreRenderWindow.h>41 #include <OgreTextureManager.h>42 #include <OgreResourceGroupManager.h>43 #include <OgreConfigFile.h>44 39 #include <OgreOverlay.h> 45 40 #include <OgreOverlayManager.h> 46 47 //****** OIS ******* 48 #include <OIS/OIS.h> 41 #include <OgreTimer.h> 42 #include <OgreWindowEventUtilities.h> 49 43 50 44 //****** STD ******* 51 #include <iostream> 52 #include <exception> 45 //#include <iostream> 46 //#include <exception> 47 #include <deque> 53 48 54 49 //***** ORXONOX **** 55 50 //misc 56 #include "util/Sleep.h" 57 58 // loader and audio 59 //#include "loader/LevelLoader.h" 51 //#include "util/Sleep.h" 52 53 // audio 60 54 #include "audio/AudioManager.h" 61 55 … … 63 57 #include "network/Server.h" 64 58 #include "network/Client.h" 65 #include "network/NetworkFrameListener.h" 59 network::Client *client_g; 60 network::Server *server_g; 66 61 67 62 // objects 68 #include "objects/Tickable.h" 63 #include "core/ArgReader.h" 64 #include "core/Debug.h" 65 #include "core/Factory.h" 66 #include "core/Loader.h" 67 #include "core/Tickable.h" 68 #include "hud/HUD.h" 69 69 #include "tools/Timer.h" 70 #include "objects/NPC.h"71 #include "core/ArgReader.h"72 #include "core/Factory.h"73 #include "core/Debug.h"74 #include "core/Loader.h"75 #include "hud/HUD.h"76 70 #include "objects/weapon/BulletManager.h" 77 #include "GraphicsEngine.h" 71 72 #include "InputHandler.h" 78 73 79 74 #include "Orxonox.h" … … 81 76 namespace orxonox 82 77 { 83 // put this in a seperate Class or solve the problem in another fashion 84 class OrxListener : public Ogre::FrameListener 85 { 86 public: 87 OrxListener(OIS::Keyboard *keyboard, audio::AudioManager* auMan, gameMode mode) 88 { 89 mKeyboard = keyboard; 90 mode_=mode; 91 auMan_ = auMan; 92 } 93 94 bool frameStarted(const Ogre::FrameEvent& evt) 95 { 96 auMan_->update(); 97 updateAI(); 98 99 if(mode_ == PRESENTATION) 100 server_g->tick(evt.timeSinceLastFrame); 101 else if(mode_ == CLIENT) 102 client_g->tick(evt.timeSinceLastFrame); 103 104 usleep(10); 105 106 mKeyboard->capture(); 107 return !mKeyboard->isKeyDown(OIS::KC_ESCAPE); 108 } 109 110 void updateAI() 111 { 112 for(Iterator<NPC> it = ObjectList<NPC>::start(); it; ++it) 113 { 114 it->update(); 115 } 116 } 117 118 private: 119 gameMode mode_; 120 OIS::Keyboard *mKeyboard; 121 audio::AudioManager* auMan_; 122 }; 123 124 // init static singleton reference of Orxonox 125 Orxonox* Orxonox::singletonRef_ = NULL; 78 /** 79 @brief Reference to the only instance of the class. 80 */ 81 Orxonox *Orxonox::singletonRef_s = 0; 126 82 127 83 /** … … 131 87 { 132 88 this->ogre_ = new GraphicsEngine(); 89 this->timer_ = 0; 133 90 this->dataPath_ = ""; 134 // this->loader_ = 0;135 91 this->auMan_ = 0; 136 this->singletonRef_ = 0; 137 this->keyboard_ = 0; 138 this->mouse_ = 0; 139 this->inputManager_ = 0; 140 this->frameListener_ = 0; 141 this->root_ = 0; 92 this->inputHandler_ = 0; 93 //this->root_ = 0; 94 // turn on frame smoothing by setting a value different from 0 95 this->frameSmoothingTime_ = 0.0f; 96 this->bAbort_ = false; 142 97 } 143 98 … … 147 102 Orxonox::~Orxonox() 148 103 { 149 // nothing to delete as for now 104 // keep in mind: the order of deletion is very important! 105 if (this->bulletMgr_) 106 delete this->bulletMgr_; 107 if (this->orxonoxHUD_) 108 delete this->orxonoxHUD_; 109 Loader::close(); 110 InputHandler::destroy(); 111 if (this->auMan_) 112 delete this->auMan_; 113 if (this->timer_) 114 delete this->timer_; 115 if (this->ogre_) 116 delete this->ogre_; 117 118 if (client_g) 119 delete client_g; 120 if (server_g) 121 delete server_g; 122 } 123 124 /** 125 * error kills orxonox 126 */ 127 void Orxonox::abortImmediate(/* some error code */) 128 { 129 //TODO: destroy and destruct everything and print nice error msg 130 delete this; 131 } 132 133 /** 134 Asks the mainloop nicely to abort. 135 */ 136 void Orxonox::abortRequest() 137 { 138 bAbort_ = true; 139 } 140 141 /** 142 * @return singleton object 143 */ 144 Orxonox* Orxonox::getSingleton() 145 { 146 if (!singletonRef_s) 147 singletonRef_s = new Orxonox(); 148 return singletonRef_s; 149 //static Orxonox theOnlyInstance; 150 //return &theOnlyInstance; 151 } 152 153 /** 154 @brief Destroys the Orxonox singleton. 155 */ 156 void Orxonox::destroy() 157 { 158 if (singletonRef_s) 159 delete singletonRef_s; 160 singletonRef_s = 0; 150 161 } 151 162 … … 153 164 * initialization of Orxonox object 154 165 * @param argc argument counter 155 * @param argv list of argumen ts166 * @param argv list of argumenst 156 167 * @param path path to config (in home dir or something) 157 168 */ … … 162 173 //TODO: give config file to Ogre 163 174 std::string mode; 164 // if(argc>=2) 165 // mode = std::string(argv[1]); 166 // else 167 // mode = ""; 175 168 176 ArgReader ar = ArgReader(argc, argv); 169 177 ar.checkArgument("mode", mode, false); 170 178 ar.checkArgument("data", this->dataPath_, false); 171 179 ar.checkArgument("ip", serverIp_, false); 172 //mode = "presentation"; 173 if(ar.errorHandling()) die(); 174 if(mode == std::string("server")) 180 if(ar.errorHandling()) abortImmediate(); 181 if(mode == std::string("client")) 175 182 { 183 mode_ = CLIENT; 184 clientInit(path); 185 } 186 else if(mode== std::string("server")){ 187 mode_ = SERVER; 176 188 serverInit(path); 177 mode_ = SERVER;178 }179 else if(mode == std::string("client"))180 {181 clientInit(path);182 mode_ = CLIENT;183 }184 else if(mode == std::string("presentation"))185 {186 serverInit(path);187 mode_ = PRESENTATION;188 189 } 189 190 else{ 191 mode_ = STANDALONE; 190 192 standaloneInit(path); 191 mode_ = STANDALONE;192 193 } 193 194 } 194 195 195 /** 196 * start modules 197 */ 198 void Orxonox::start() 199 { 200 //TODO: start modules 201 ogre_->startRender(); 202 //TODO: run engine 203 Factory::createClassHierarchy(); 204 createScene(); 205 setupScene(); 206 setupInputSystem(); 207 if(mode_!=CLIENT){ // remove this in future ---- presentation hack 208 } 209 else 210 std::cout << "client here" << std::endl; 211 createFrameListener(); 212 switch(mode_){ 213 case PRESENTATION: 214 //ogre_->getRoot()->addFrameListener(new network::ServerFrameListener()); 215 //std::cout << "could not add framelistener" << std::endl; 216 server_g->open(); 217 break; 218 case CLIENT: 219 client_g->establishConnection(); 220 break; 221 case SERVER: 222 case STANDALONE: 223 default: 224 break; 225 } 226 startRenderLoop(); 227 } 228 229 /** 230 * @return singleton object 231 */ 232 Orxonox* Orxonox::getSingleton() 233 { 234 if (!singletonRef_) 235 singletonRef_ = new Orxonox(); 236 return singletonRef_; 237 } 238 239 /** 240 * error kills orxonox 241 */ 242 void Orxonox::die(/* some error code */) 243 { 244 //TODO: destroy and destruct everything and print nice error msg 245 delete this; 246 } 247 248 void Orxonox::standaloneInit(std::string path) 249 { 196 void Orxonox::serverInit(std::string path) 197 { 198 COUT(2) << "initialising server" << std::endl; 199 250 200 ogre_->setConfigPath(path); 251 201 ogre_->setup(); 252 root_ = ogre_->getRoot(); 253 if(!ogre_->load()) die(/* unable to load */); 254 255 //defineResources(); 256 //setupRenderSystem(); 257 //createRenderWindow(); 258 //initializeResourceGroups(); 259 /*createScene(); 260 setupScene(); 261 setupInputSystem(); 262 createFrameListener(); 263 Factory::createClassHierarchy(); 264 startRenderLoop();*/ 265 } 266 267 void Orxonox::playableServer(std::string path) 268 { 269 ogre_->setConfigPath(path); 270 ogre_->setup(); 271 root_ = ogre_->getRoot(); 272 defineResources(); 273 setupRenderSystem(); 274 createRenderWindow(); 275 initializeResourceGroups(); 276 setupInputSystem(); 277 Factory::createClassHierarchy(); 278 createScene(); 279 setupScene(); 280 createFrameListener(); 281 try{ 282 server_g = new network::Server(); //!< add port and bindadress 283 server_g->open(); //!< open server and create listener thread 284 if(ogre_ && ogre_->getRoot()) 285 ogre_->getRoot()->addFrameListener(new network::ServerFrameListener()); // adds a framelistener for the server 286 COUT(3) << "Info: network framelistener added" << std::endl; 287 } 288 catch(...) 289 { 290 COUT(1) << "Error: There was a problem initialising the server :(" << std::endl; 291 } 292 startRenderLoop(); 293 } 294 295 void Orxonox::standalone(){ 296 297 298 299 } 300 301 void Orxonox::serverInit(std::string path) 302 { 303 COUT(2) << "initialising server" << std::endl; 304 ogre_->setConfigPath(path); 305 ogre_->setup(); 306 server_g = new network::Server(); // FIXME add some settings if wanted 307 if(!ogre_->load()) die(/* unable to load */); 308 // FIXME add network framelistener 202 //root_ = ogre_->getRoot(); 203 if(!ogre_->load(this->dataPath_)) abortImmediate(/* unable to load */); 204 205 server_g = new network::Server(); 309 206 } 310 207 311 208 void Orxonox::clientInit(std::string path) 312 209 { 313 COUT(2) << "initialising client" << std::endl; 210 COUT(2) << "initialising client" << std::endl;\ 211 314 212 ogre_->setConfigPath(path); 315 213 ogre_->setup(); … … 317 215 client_g = new network::Client(); 318 216 else 319 client_g = new network::Client(serverIp_, 55556); 320 if(!ogre_->load()) die(/* unable to load */); 321 ogre_->getRoot()->addFrameListener(new network::ClientFrameListener()); 322 } 323 324 void Orxonox::defineResources() 325 { 326 std::string secName, typeName, archName; 327 Ogre::ConfigFile cf; 328 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE 329 cf.load(macBundlePath() + "/Contents/Resources/resources.cfg"); 330 #else 331 cf.load(dataPath_ + "resources.cfg"); 332 #endif 333 334 Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator(); 335 while (seci.hasMoreElements()) 336 { 337 secName = seci.peekNextKey(); 338 Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext(); 339 Ogre::ConfigFile::SettingsMultiMap::iterator i; 340 for (i = settings->begin(); i != settings->end(); ++i) 341 { 342 typeName = i->first; 343 archName = i->second; 344 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE 345 Ogre::ResourceGroupManager::getSingleton().addResourceLocation( std::string(macBundlePath() + "/" + archName), typeName, secName); 346 #else 347 Ogre::ResourceGroupManager::getSingleton().addResourceLocation( archName, typeName, secName); 348 #endif 349 } 217 client_g = new network::Client(serverIp_, NETWORK_PORT); 218 if(!ogre_->load(this->dataPath_)) abortImmediate(/* unable to load */); 219 } 220 221 void Orxonox::standaloneInit(std::string path) 222 { 223 COUT(2) << "initialising standalone mode" << std::endl; 224 225 ogre_->setConfigPath(path); 226 ogre_->setup(); 227 //root_ = ogre_->getRoot(); 228 if(!ogre_->load(this->dataPath_)) abortImmediate(/* unable to load */); 229 } 230 231 /** 232 * start modules 233 */ 234 void Orxonox::start() 235 { 236 switch(mode_){ 237 case CLIENT: 238 clientStart(); 239 break; 240 case SERVER: 241 serverStart(); 242 break; 243 default: 244 standaloneStart(); 350 245 } 351 246 } 352 353 void Orxonox::setupRenderSystem() 354 { 355 if (!root_->restoreConfig() && !root_->showConfigDialog()) 356 throw Ogre::Exception(52, "User canceled the config dialog!", "OrxApplication::setupRenderSystem()"); 357 } 358 359 void Orxonox::createRenderWindow() 360 { 361 root_->initialise(true, "OrxonoxV2"); 362 } 363 364 void Orxonox::initializeResourceGroups() 365 { 366 Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5); 367 Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); 368 } 369 370 /** 371 * 372 * @param 373 */ 374 void Orxonox::createScene(void) 375 { 376 // Init audio 247 248 void Orxonox::clientStart(){ 249 ogre_->initialise(); 250 Factory::createClassHierarchy(); 251 252 377 253 auMan_ = new audio::AudioManager(); 378 254 379 255 bulletMgr_ = new BulletManager(); 380 381 // load this file from config 382 // loader_ = new loader::LevelLoader("sample.oxw"); 383 // loader_->loadLevel(); 384 Level* startlevel = new Level("levels/sample.oxw"); 385 Loader::open(startlevel); 386 256 387 257 Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2"); 388 258 HUD* orxonoxHud; … … 391 261 orxonoxHud->setEnergyDistr(20,20,60); 392 262 hudOverlay->show(); 263 264 client_g->establishConnection(); 265 client_g->tick(0); 266 267 268 //setupInputSystem(); 269 270 startRenderLoop(); 271 } 272 273 void Orxonox::serverStart(){ 274 //TODO: start modules 275 ogre_->initialise(); 276 //TODO: run engine 277 Factory::createClassHierarchy(); 278 createScene(); 279 setupInputSystem(); 280 281 server_g->open(); 282 283 startRenderLoop(); 284 } 285 286 void Orxonox::standaloneStart(){ 287 //TODO: start modules 288 ogre_->initialise(); 289 //TODO: run engine 290 Factory::createClassHierarchy(); 291 createScene(); 292 setupInputSystem(); 293 294 startRenderLoop(); 295 } 296 297 void Orxonox::createScene(void) 298 { 299 // Init audio 300 auMan_ = new audio::AudioManager(); 301 302 bulletMgr_ = new BulletManager(); 303 304 // load this file from config 305 Level* startlevel = new Level("levels/sample.oxw"); 306 Loader::open(startlevel); 307 308 Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2"); 309 orxonoxHUD_ = new HUD(); 310 orxonoxHUD_->setEnergyValue(20); 311 orxonoxHUD_->setEnergyDistr(20,20,60); 312 hudOverlay->show(); 393 313 394 314 /* … … 396 316 auMan_->ambientAdd("a2"); 397 317 auMan_->ambientAdd("a3"); 398 //auMan->ambientAdd("ambient1"); 399 auMan_->ambientStart();*/ 400 } 401 402 403 /** 404 * 405 */ 406 void Orxonox::setupScene() 407 { 408 // SceneManager *mgr = ogre_->getSceneManager(); 409 410 411 // SceneNode* node = (SceneNode*)mgr->getRootSceneNode()->getChild("OgreHeadNode"); 412 // SceneNode *node = mgr->getRootSceneNode()->createChildSceneNode("OgreHeadNode", Vector3(0,0,0)); 413 414 415 /* 416 particle::ParticleInterface *e = new particle::ParticleInterface(mgr,"engine","Orxonox/strahl"); 417 e->particleSystem_->setParameter("local_space","true"); 418 e->setPositionOfEmitter(0, Vector3(0,-10,0)); 419 e->setDirection(Vector3(0,0,-1)); 420 e->addToSceneNode(node); 421 */ 422 } 423 424 318 //auMan->ambientAdd("ambient1"); 319 auMan_->ambientStart(); 320 */ 321 } 322 323 /** 324 @brief Calls the InputHandler which sets up the input devices. 325 The render window width and height are used to set up the mouse movement. 326 */ 425 327 void Orxonox::setupInputSystem() 426 328 { 427 size_t windowHnd = 0; 428 std::ostringstream windowHndStr; 429 OIS::ParamList pl; 430 431 // fixes auto repeat problem 432 #if defined OIS_LINUX_PLATFORM 433 pl.insert(std::make_pair(std::string("XAutoRepeatOn"), std::string("true"))); 434 #endif 435 436 Ogre::RenderWindow *win = ogre_->getRoot()->getAutoCreatedWindow(); 437 win->getCustomAttribute("WINDOW", &windowHnd); 438 windowHndStr << windowHnd; 439 pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str())); 440 inputManager_ = OIS::InputManager::createInputSystem(pl); 441 442 try 329 inputHandler_ = InputHandler::getSingleton(); 330 if (!inputHandler_->initialise(ogre_->getWindowHandle(), 331 ogre_->getWindowWidth(), ogre_->getWindowHeight())) 332 abortImmediate(); 333 } 334 335 /** 336 Main loop of the orxonox game. 337 This is a new solution, using the ogre engine instead of being used by it. 338 An alternative solution would be to simply use the timer of the Root object, 339 but that implies using Ogre in any case. There would be no way to test 340 our code without the help of the root object. 341 There's even a chance that we can dispose of the root object entirely 342 in server mode. 343 About the loop: The design is almost exactly like the one in ogre, so that 344 if any part of ogre registers a framelisteners, it will still behave 345 correctly. Furthermore I have taken over the time smoothing feature from 346 ogre. If turned on (see orxonox constructor), it will calculate the dt_n by 347 means of the recent most dt_n-1, dt_n-2, etc. 348 */ 349 void Orxonox::startRenderLoop() 350 { 351 // use the ogre timer class to measure time. 352 if (!timer_) 353 timer_ = new Ogre::Timer(); 354 timer_->reset(); 355 356 // Contains the times of recently fired events 357 std::deque<unsigned long> eventTimes[3]; 358 // Clear event times 359 for (int i = 0; i < 3; ++i) 360 eventTimes[i].clear(); 361 362 while (!bAbort_) 363 { 364 // Pump messages in all registered RenderWindows 365 Ogre::WindowEventUtilities::messagePump(); 366 367 // get current time 368 unsigned long now = timer_->getMilliseconds(); 369 370 // create an event to pass to the frameStarted method in ogre 371 Ogre::FrameEvent evt; 372 evt.timeSinceLastEvent = calculateEventTime(now, eventTimes[0]); 373 evt.timeSinceLastFrame = calculateEventTime(now, eventTimes[1]); 374 375 // show the current time in the HUD 376 orxonoxHUD_->setTime((int)now, 0); 377 378 // Iterate through all Tickables and call their tick(dt) function 379 for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ) 380 (it++)->tick((float)evt.timeSinceLastFrame); 381 382 // don't forget to call _fireFrameStarted in ogre to make sure 383 // everything goes smoothly 384 ogre_->frameStarted(evt); 385 386 if (mode_ != SERVER) 387 ogre_->renderOneFrame(); // only render in non-server mode 388 389 // get current time 390 now = timer_->getMilliseconds(); 391 392 // create an event to pass to the frameEnded method in ogre 393 evt.timeSinceLastEvent = calculateEventTime(now, eventTimes[0]); 394 evt.timeSinceLastFrame = calculateEventTime(now, eventTimes[2]); 395 396 // again, just to be sure ogre works fine 397 ogre_->frameEnded(evt); 398 } 399 } 400 401 /** 402 Method for calculating the average time between recently fired events. 403 Code directly taken from OgreRoot.cc 404 @param now The current time in ms. 405 @param type The type of event to be considered. 406 */ 407 float Orxonox::calculateEventTime(unsigned long now, std::deque<unsigned long> ×) 408 { 409 // Calculate the average time passed between events of the given type 410 // during the last mFrameSmoothingTime seconds. 411 412 times.push_back(now); 413 414 if(times.size() == 1) 415 return 0; 416 417 // Times up to mFrameSmoothingTime seconds old should be kept 418 unsigned long discardThreshold = 419 static_cast<unsigned long>(frameSmoothingTime_ * 1000.0f); 420 421 // Find the oldest time to keep 422 std::deque<unsigned long>::iterator it = times.begin(), 423 end = times.end()-2; // We need at least two times 424 while(it != end) 443 425 { 444 keyboard_ = static_cast<OIS::Keyboard*>(inputManager_->createInputObject(OIS::OISKeyboard, false)); 445 mouse_ = static_cast<OIS::Mouse*>(inputManager_->createInputObject(OIS::OISMouse, true)); 426 if (now - *it > discardThreshold) 427 ++it; 428 else 429 break; 446 430 } 447 catch (const OIS::Exception &e) 448 { 449 throw new Ogre::Exception(42, e.eText, "OrxApplication::setupInputSystem"); 450 } 451 } 452 453 // FIXME we actually want to do this differently... 454 void Orxonox::createFrameListener() 455 { 456 TickFrameListener* TickFL = new TickFrameListener(); 457 ogre_->getRoot()->addFrameListener(TickFL); 458 459 TimerFrameListener* TimerFL = new TimerFrameListener(); 460 ogre_->getRoot()->addFrameListener(TimerFL); 461 462 //if(mode_!=CLIENT) // FIXME just a hack ------- remove this in future 463 frameListener_ = new OrxListener(keyboard_, auMan_, mode_); 464 ogre_->getRoot()->addFrameListener(frameListener_); 465 } 466 467 void Orxonox::startRenderLoop() 468 { 469 // FIXME 470 // this is a hack!!! 471 // the call to reset the mouse clipping size should probably be somewhere 472 // else, however this works for the moment. 473 unsigned int width, height, depth; 474 int left, top; 475 ogre_->getRoot()->getAutoCreatedWindow()->getMetrics(width, height, depth, left, top); 476 477 if(mode_!=CLIENT){ 478 const OIS::MouseState &ms = mouse_->getMouseState(); 479 ms.width = width; 480 ms.height = height; 481 } 482 ogre_->getRoot()->startRendering(); 431 432 // Remove old times 433 times.erase(times.begin(), it); 434 435 return (float)(times.back() - times.front()) / ((times.size()-1) * 1000); 436 } 437 438 /** 439 @brief Test method for the InputHandler. 440 But: Is actually responsible for catching an exit event.. 441 */ 442 void Orxonox::eventOccured(InputEvent &evt) 443 { 444 if (evt.id == 1) 445 this->abortRequest(); 483 446 } 484 447 } -
code/trunk/src/orxonox/Orxonox.h
r871 r1021 11 11 12 12 #include <OgrePrerequisites.h> 13 #include <OIS/OISPrereqs.h>13 //#include <OIS/OISPrereqs.h> 14 14 15 15 #include "OrxonoxPrereqs.h" 16 //#include "loader/LoaderPrereqs.h"17 16 #include "audio/AudioPrereqs.h" 18 17 19 18 #include "GraphicsEngine.h" 19 #include "InputEventListener.h" 20 20 21 21 … … 25 25 26 26 enum gameMode{ 27 STANDALONE,28 27 SERVER, 29 28 CLIENT, 30 PRESENTATION29 STANDALONE 31 30 }; 32 31 33 class _OrxonoxExport Orxonox 32 class _OrxonoxExport Orxonox : public InputEventListener 34 33 { 35 34 public: … … 37 36 void start(); 38 37 // not sure if this should be private 39 void die(/* some error code */); 38 void abortImmediate(/* some error code */); 39 void abortRequest(); 40 inline Ogre::SceneManager* getSceneManager() { return ogre_->getSceneManager(); }; 41 inline GraphicsEngine* getOgrePointer() { return ogre_; }; 42 inline audio::AudioManager* getAudioManagerPointer() { return auMan_; }; 43 inline BulletManager* getBulletMgr() { return this->bulletMgr_; } 44 40 45 static Orxonox* getSingleton(); 41 inline Ogre::SceneManager* getSceneManager() { return ogre_->getSceneManager(); }; 42 inline GraphicsEngine* getOgrePointer() { return ogre_; }; 43 inline audio::AudioManager* getAudioManagerPointer() { return auMan_; }; 44 inline OIS::Keyboard* getKeyboard() { return this->keyboard_; } 45 inline OIS::Mouse* getMouse() { return this->mouse_; } 46 inline BulletManager* getBulletMgr() { return this->bulletMgr_; } 46 static void destroy(); 47 47 48 private: 48 private: 49 // don't mess with singletons 49 50 Orxonox(); 50 virtual ~Orxonox(); 51 Orxonox(Orxonox& instance); 52 Orxonox& operator=(const Orxonox& instance); 53 ~Orxonox(); 54 51 55 // init functions 52 56 void serverInit(std::string path); 53 57 void clientInit(std::string path); 54 58 void standaloneInit(std::string path); 59 55 60 // run functions 56 void playableServer(std::string path); 57 void standalone(); 58 void defineResources(); 59 void setupRenderSystem(); 60 void createRenderWindow(); 61 void initializeResourceGroups(); 62 void createScene(void); 63 void setupScene(); 61 void serverStart(); 62 void clientStart(); 63 void standaloneStart(); 64 65 void createScene(); 64 66 void setupInputSystem(); 65 void createFrameListener();66 67 void startRenderLoop(); 68 float calculateEventTime(unsigned long, std::deque<unsigned long>&); 69 70 void eventOccured(InputEvent &evt); 67 71 68 72 private: 69 73 GraphicsEngine* ogre_; //!< our dearest graphics engine <3 70 74 std::string dataPath_; //!< path to data 71 // loader::LevelLoader* loader_; //!< level loader builds the scene72 75 audio::AudioManager* auMan_; //!< audio manager 73 76 BulletManager* bulletMgr_; //!< Keeps track of the thrown bullets 74 static Orxonox* singletonRef_; 75 OIS::Keyboard* keyboard_; 76 OIS::Mouse* mouse_; 77 OIS::InputManager* inputManager_; 78 OrxListener* frameListener_; 79 Ogre::Root* root_; 77 InputHandler* inputHandler_; //!< Handles input with key bindings 78 Ogre::Root* root_; //!< Holy grail of Ogre 79 Ogre::Timer* timer_; //!< Main loop timer 80 // TODO: make this a config-value by creating a config class for orxonox 81 float frameSmoothingTime_; 82 // little hack to actually show something dynamic in the HUD 83 HUD* orxonoxHUD_; 84 bool bAbort_; //!< aborts the render loop if true 80 85 81 86 // this is used to identify the mode (server/client/...) we're in 82 87 gameMode mode_; 83 88 std::string serverIp_; 89 90 static Orxonox *singletonRef_s; 84 91 }; 85 92 } -
code/trunk/src/orxonox/OrxonoxPlatform.h
r890 r1021 210 210 //# pragma warning (disable : 4503) 211 211 212 // disable: "conversion from 'double' to 'float', possible loss of data 212 // disable: conversion from 'double' to 'float', possible loss of data 213 // disable: conversion from 'ogg_int64_t' to 'long', possible loss of data 214 // This has been dealt with in base_properties of the solution since the 215 // warning primarily occurs in library header files (which are mostly 216 // included before OrxonoxPlatform.h is) 213 217 //# pragma warning (disable : 4244) 214 218 … … 221 225 // disable: "<type> needs to have dll-interface to be used by clients' 222 226 // Happens on STL member variables which are not public therefore is ok 227 // This has been dealt with in base_properties of the solution since the 228 // warning primarily occurs in library header files (which are mostly 229 // included before OrxonoxPlatform.h is) 223 230 //# pragma warning (disable : 4251) 231 232 // disable: 'MultiTypeString' : multiple assignment operators specified 233 // Used in MultiType and works fine so far 234 # pragma warning (disable : 4522) 224 235 225 236 // disable: "non dll-interface class used as base for dll-interface class" … … 252 263 253 264 254 // Create a logical xor operator265 // Define the english written operators like and, or, xor 255 266 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC 256 # define XOR ^ 257 #elif ORXONOX_COMPILER == ORXONOX_COMPILER_GCC 258 # define XOR xor 259 #else 260 # define XOR ^ 267 # include <iso646.h> 261 268 #endif 262 269 -
code/trunk/src/orxonox/OrxonoxPrereqs.h
r790 r1021 68 68 class Camera; 69 69 class GraphicsEngine; 70 struct InputEvent; 71 class InputEventListener; 72 class InputHandler; 70 73 class Mesh; 71 74 class Model; -
code/trunk/src/orxonox/OrxonoxStableHeaders.h
r890 r1021 41 41 42 42 // not including the entire Ogre.h doesn't exceed the default heap size for pch 43 #ifndef WIN32_LEAN_AND_MEAN 44 // prevent Ogre from including winsock.h that messes with winsock2.h from enet 45 # define WIN32_LEAN_AND_MEAN 46 #endif 43 47 //#include <Ogre.h> 44 48 #include <OgreBillboardSet.h> 45 49 #include <OgreCamera.h> 50 #include <OgreColourValue.h> 46 51 #include <OgreConfigFile.h> 47 52 #include <OgreEntity.h> … … 49 54 #include <OgreFrameListener.h> 50 55 #include <OgreLight.h> 56 #include <OgreMath.h> 57 #include <OgreMatrix3.h> 51 58 #include <OgreOverlay.h> 52 59 #include <OgreOverlayElement.h> … … 56 63 #include <OgrePlatform.h> 57 64 #include <OgrePrerequisites.h> 65 #include <OgreQuaternion.h> 66 #include <OgreResourceGroupManager.h> 58 67 #include <OgreRenderWindow.h> 59 68 #include <OgreRoot.h> … … 62 71 #include <OgreStringConverter.h> 63 72 #include <OgreTextureManager.h> 73 #include <OgreTimer.h> 74 #include <OgreVector2.h> 75 #include <OgreVector3.h> 76 #include <OgreVector3.h> 64 77 #include <OgreViewport.h> 78 #include <OgreWindowEventUtilities.h> 65 79 66 80 #include <OIS/OIS.h> … … 68 82 /** 69 83 * Some of the not so stable header files. 70 * But it's not very useful to include them anyway..84 * It's not very useful to include them anyway.. 71 85 **/ 72 86 73 //#include "audio/AudioManager.h" 74 75 //#include "core/CoreIncludes.h" 87 #include "core/CoreIncludes.h" 76 88 #include "core/BaseObject.h" 77 //#include "core/ArgReader.h"89 #include "core/Tickable.h" 78 90 #include "core/Error.h" 91 #include "core/Loader.h" 92 #include "core/XMLPort.h" 79 93 80 94 #include "network/Synchronisable.h" … … 97 111 #include "util/tinyxml/tinyxml.h" 98 112 99 //#include "hud/HUD.h"100 //#include "loader/LevelLoader.h"101 //#include "objects/weapon/AmmunitionDump.h"102 //#include "objects/weapon/BarrelGun.h"103 //#include "objects/weapon/Bullet.h"104 //#include "objects/weapon/BulletManager.h"105 //#include "objects/weapon/WeaponStation.h"106 //#include "objects/Ambient.h"107 //#include "objects/Camera.h"108 //#include "objects/Explosion.h"109 //#include "objects/Fighter.h"110 113 #include "objects/Model.h" 111 //#include "objects/NPC.h"112 //#include "objects/Projectile.h"113 //#include "objects/Skybox.h"114 //#include "objects/SpaceShipSteeringObject.h"115 #include "objects/Tickable.h"116 114 #include "objects/WorldEntity.h" 117 //#include "particle/ParticleInterface.h"118 //#include "tools/BillboardSet.h"119 //#include "tools/Light.h"120 //#include "tools/Mesh.h"121 //#include "tools/Timer.h"122 //#include "GraphicsEngine.h"123 //#include "InputManager.h"124 //#include "Orxonox.h"125 //#include "SpaceshipSteering.h"126 115 127 116 #endif -
code/trunk/src/orxonox/PrecompiledHeaderFiles.cc
r790 r1021 27 27 28 28 /** 29 @file PrecompiledHeaderFiles.cc29 @file 30 30 @brief This file actually generates the precompiled header file 31 31 */ -
code/trunk/src/orxonox/core/BaseObject.cc
r871 r1021 27 27 28 28 /** 29 @file BaseObject.cc29 @file 30 30 @brief Implementation of the BaseObject class. 31 31 */ -
code/trunk/src/orxonox/core/CMakeLists.txt
r871 r1021 17 17 Executor.cc 18 18 XMLPort.cc 19 Tickable.cc 20 Script.cc 19 21 ) 20 22 … … 24 26 TARGET_LINK_LIBRARIES( core 25 27 util 28 ${Lua_LIBRARIES} 26 29 ) -
code/trunk/src/orxonox/core/ClassTreeMask.cc
r890 r1021 592 592 { 593 593 const Identifier* subclass = it->getClass(); 594 newmask.add(subclass, this->isIncluded(subclass) ||other.isIncluded(subclass), false, false);594 newmask.add(subclass, this->isIncluded(subclass) or other.isIncluded(subclass), false, false); 595 595 } 596 596 … … 599 599 { 600 600 const Identifier* subclass = it->getClass(); 601 newmask.add(subclass, this->isIncluded(subclass) ||other.isIncluded(subclass), false, false);601 newmask.add(subclass, this->isIncluded(subclass) or other.isIncluded(subclass), false, false); 602 602 } 603 603 … … 623 623 { 624 624 const Identifier* subclass = it->getClass(); 625 newmask.add(subclass, this->isIncluded(subclass) &&other.isIncluded(subclass), false, false);625 newmask.add(subclass, this->isIncluded(subclass) and other.isIncluded(subclass), false, false); 626 626 } 627 627 … … 630 630 { 631 631 const Identifier* subclass = it->getClass(); 632 newmask.add(subclass, this->isIncluded(subclass) &&other.isIncluded(subclass), false, false);632 newmask.add(subclass, this->isIncluded(subclass) and other.isIncluded(subclass), false, false); 633 633 } 634 634 … … 737 737 { 738 738 const Identifier* subclass = it->getClass(); 739 newmask.add(subclass, this->isIncluded(subclass) XORother.isIncluded(subclass), false, false);739 newmask.add(subclass, this->isIncluded(subclass) xor other.isIncluded(subclass), false, false); 740 740 } 741 741 … … 744 744 { 745 745 const Identifier* subclass = it->getClass(); 746 newmask.add(subclass, this->isIncluded(subclass) XORother.isIncluded(subclass), false, false);746 newmask.add(subclass, this->isIncluded(subclass) xor other.isIncluded(subclass), false, false); 747 747 } 748 748 -
code/trunk/src/orxonox/core/DebugLevel.cc
r871 r1021 95 95 96 96 // Return a constant value while we're creating the object 97 return 4;97 return 3; 98 98 } 99 99 } -
code/trunk/src/orxonox/core/Loader.cc
r871 r1021 33 33 #include "Debug.h" 34 34 #include "CoreIncludes.h" 35 #include "Script.h" 35 36 36 37 #include "util/tinyxml/ticpp.h" … … 107 108 Loader::currentMask_s = level->getMask() * mask; 108 109 110 // let Lua work this out: 111 //Script* lua; 112 /*Script::loadFile(level->getFile(), true); 113 Script::init(Script::getLuaState()); 114 Script::run();*/ 115 Script* lua = Script::getInstance(); 116 lua->loadFile(level->getFile(), true); 117 lua->run(); 118 109 119 try 110 120 { … … 112 122 COUT(3) << "Mask: " << Loader::currentMask_s << std::endl; 113 123 114 ticpp::Document xmlfile(level->getFile()); 115 xmlfile.LoadFile(); 124 //ticpp::Document xmlfile(level->getFile()); 125 //xmlfile.LoadFile(); 126 //ticpp::Element myelement(*Script::getFileString()); 127 ticpp::Document xmlfile; 128 //xmlfile.ToDocument(); 129 xmlfile.Parse(lua->getLuaOutput(), true); 116 130 117 131 for ( ticpp::Iterator<ticpp::Element> child = xmlfile.FirstChildElement(false); child != child.end(); child++ ) -
code/trunk/src/orxonox/objects/Camera.cc
r790 r1021 6 6 #include <OgreSceneManager.h> 7 7 #include <OgreSceneNode.h> 8 #include <OgreRoot.h>9 8 #include <OgreRenderWindow.h> 10 9 #include <OgreViewport.h> … … 69 68 70 69 // FIXME: unused var 71 Ogre::Viewport* vp = orxonox::Orxonox::getSingleton()->getOgrePointer()->getR oot()->getAutoCreatedWindow()->addViewport(cam);70 Ogre::Viewport* vp = orxonox::Orxonox::getSingleton()->getOgrePointer()->getRenderWindow()->addViewport(cam); 72 71 73 72 -
code/trunk/src/orxonox/objects/Fighter.cc
r790 r1021 37 37 #include "util/tinyxml/tinyxml.h" 38 38 #include "util/String2Number.h" 39 #include "../core/CoreIncludes.h" 40 #include "../Orxonox.h" 41 #include "../particle/ParticleInterface.h" 39 #include "core/CoreIncludes.h" 40 #include "Orxonox.h" 41 #include "InputHandler.h" 42 #include "particle/ParticleInterface.h" 42 43 #include "weapon/AmmunitionDump.h" 43 44 #include "weapon/BarrelGun.h" … … 207 208 208 209 node->attachObject(cam); 209 Orxonox::getSingleton()->getOgrePointer()->getR oot()->getAutoCreatedWindow()->addViewport(cam);210 Orxonox::getSingleton()->getOgrePointer()->getRenderWindow()->addViewport(cam); 210 211 } 211 212 } … … 254 255 if (!this->setMouseEventCallback_) 255 256 { 256 if ( Orxonox::getSingleton()->getMouse())257 if (InputHandler::getSingleton()->getMouse()) 257 258 { 258 Orxonox::getSingleton()->getMouse()->setEventCallback(this);259 InputHandler::getSingleton()->getMouse()->setEventCallback(this); 259 260 this->setMouseEventCallback_ = true; 260 261 } … … 263 264 WorldEntity::tick(dt); 264 265 265 OIS::Keyboard* mKeyboard = Orxonox::getSingleton()->getKeyboard();266 OIS::Mouse* mMouse = Orxonox::getSingleton()->getMouse();266 OIS::Keyboard* mKeyboard = InputHandler::getSingleton()->getKeyboard(); 267 OIS::Mouse* mMouse = InputHandler::getSingleton()->getMouse(); 267 268 268 269 mKeyboard->capture(); -
code/trunk/src/orxonox/objects/Model.cc
r871 r1021 44 44 { 45 45 RegisterObject(Model); 46 registerAllVariables(); 46 47 } 47 48 … … 63 64 /** 64 65 @brief XML loading and saving. 65 @param xmlelement The XML-element 66 @p 67 aram xmlelement The XML-element 66 68 @param loading Loading (true) or saving (false) 67 69 @return The XML-element … … 82 84 83 85 bool Model::create(){ 86 WorldEntity::create(); 84 87 if(meshSrc_.compare("")!=0){ 85 88 this->mesh_.setMesh(meshSrc_); … … 87 90 COUT(4) << "Loader: Created model" << std::endl; 88 91 } 89 registerAllVariables();90 92 return true; 91 93 } 92 94 93 95 void Model::registerAllVariables(){ 94 // registerVar(&meshSrc_, meshSrc_.length() + 1, network::STRING); 96 WorldEntity::registerAllVariables(); 97 registerVar(&meshSrc_, meshSrc_.length() + 1, network::STRING); 95 98 } 96 99 } -
code/trunk/src/orxonox/objects/Model.h
r871 r1021 22 22 bool create(); 23 23 24 protected: 25 void registerAllVariables(); 26 24 27 private: 25 28 std::string meshSrc_; 26 29 Mesh mesh_; 27 void registerAllVariables();28 30 }; 29 31 } -
code/trunk/src/orxonox/objects/NPC.cc
r790 r1021 85 85 void NPC::tick(float dt) 86 86 { 87 87 update(); 88 88 this->setVelocity(0.995*this->getVelocity() + this->getAcceleration()*dt); 89 89 this->translate(this->getVelocity()*dt); -
code/trunk/src/orxonox/objects/SpaceShip.cc
r978 r1021 39 39 #include "util/String2Number.h" 40 40 #include "util/Math.h" 41 #include "../core/CoreIncludes.h" 42 #include "../core/Debug.h" 43 #include "../Orxonox.h" 44 #include "../particle/ParticleInterface.h" 41 #include "core/CoreIncludes.h" 42 #include "core/Debug.h" 43 #include "Orxonox.h" 44 #include "InputHandler.h" 45 #include "particle/ParticleInterface.h" 45 46 #include "Projectile.h" 46 47 #include "core/XMLPort.h" … … 55 56 { 56 57 RegisterObject(SpaceShip); 58 this->registerAllVariables(); 57 59 58 60 this->setConfigValues(); … … 124 126 this->brakeLoop(loop); 125 127 */ 126 this->init(); 127 128 // this->create(); 129 130 128 131 COUT(3) << "Info: SpaceShip was loaded" << std::endl; 129 132 } … … 135 138 } 136 139 140 bool SpaceShip::create(){ 141 if(Model::create()) 142 this->init(); 143 else 144 return false; 145 return true; 146 } 147 148 void SpaceShip::registerAllVariables(){ 149 Model::registerAllVariables(); 150 151 152 153 } 154 137 155 void SpaceShip::init() 138 156 { … … 202 220 { 203 221 Model::loadParams(xmlElem); 222 this->create(); 204 223 /* 205 224 if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft")) … … 267 286 268 287 this->camNode_->attachObject(cam); 269 Orxonox::getSingleton()->getOgrePointer()->getR oot()->getAutoCreatedWindow()->addViewport(cam);288 Orxonox::getSingleton()->getOgrePointer()->getRenderWindow()->addViewport(cam); 270 289 } 271 290 … … 400 419 if (!this->setMouseEventCallback_) 401 420 { 402 if ( Orxonox::getSingleton()->getMouse())421 if (InputHandler::getSingleton()->getMouse()) 403 422 { 404 Orxonox::getSingleton()->getMouse()->setEventCallback(this);423 InputHandler::getSingleton()->getMouse()->setEventCallback(this); 405 424 this->setMouseEventCallback_ = true; 406 425 } … … 427 446 } 428 447 429 OIS::Keyboard* mKeyboard = Orxonox::getSingleton()->getKeyboard();430 OIS::Mouse* mMouse = Orxonox::getSingleton()->getMouse();448 OIS::Keyboard* mKeyboard = InputHandler::getSingleton()->getKeyboard(); 449 OIS::Mouse* mMouse = InputHandler::getSingleton()->getMouse(); 431 450 432 451 mKeyboard->capture(); -
code/trunk/src/orxonox/objects/SpaceShip.h
r978 r1021 21 21 SpaceShip(); 22 22 ~SpaceShip(); 23 bool create(); 24 void registerAllVariables(); 23 25 void init(); 24 26 void setConfigValues(); -
code/trunk/src/orxonox/objects/WorldEntity.cc
r871 r1021 49 49 RegisterObject(WorldEntity); 50 50 51 if (Orxonox::getSingleton()->getSceneManager()) 52 { 53 std::ostringstream name; 54 name << (WorldEntity::worldEntityCounter_s++); 55 this->setName("WorldEntity" + name.str()); 56 this->node_ = Orxonox::getSingleton()->getSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName()); 57 } 58 else 59 { 60 this->node_ = 0; 61 } 51 //create(); 62 52 63 53 this->bStatic_ = true; … … 67 57 this->rotationRate_ = 0; 68 58 this->momentum_ = 0; 59 60 if (Orxonox::getSingleton()->getSceneManager()) 61 { 62 std::ostringstream name; 63 name << (WorldEntity::worldEntityCounter_s++); 64 this->setName("WorldEntity" + name.str()); 65 this->node_ = Orxonox::getSingleton()->getSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName()); 66 67 registerAllVariables(); 68 } 69 else 70 { 71 this->node_ = 0; 72 } 69 73 } 70 74 … … 89 93 90 94 BaseObject::loadParams(xmlElem); 95 create(); 91 96 /* 92 97 if (xmlElem->Attribute("position")) … … 185 190 } 186 191 187 bool WorldEntity::create(){188 registerAllVariables();189 return true;190 }191 192 192 193 void WorldEntity::registerAllVariables() 193 194 { 194 /*// register coordinates195 // register coordinates 195 196 registerVar( (void*) &(this->getPosition().x), sizeof(this->getPosition().x), network::DATA); 196 197 registerVar( (void*) &(this->getPosition().y), sizeof(this->getPosition().y), network::DATA); … … 200 201 registerVar( (void*) &(this->getOrientation().x), sizeof(this->getOrientation().x), network::DATA); 201 202 registerVar( (void*) &(this->getOrientation().y), sizeof(this->getOrientation().y), network::DATA); 202 registerVar( (void*) &(this->getOrientation().z), sizeof(this->getOrientation().z), network::DATA); */203 registerVar( (void*) &(this->getOrientation().z), sizeof(this->getOrientation().z), network::DATA); 203 204 // not needed at the moment, because we don't have prediction yet 204 / *// register velocity_205 // register velocity_ 205 206 registerVar( (void*) &(this->getVelocity().x), sizeof(this->getVelocity().x), network::DATA); 206 207 registerVar( (void*) &(this->getVelocity().y), sizeof(this->getVelocity().y), network::DATA); … … 210 211 registerVar( (void*) &(this->getRotationAxis().x), sizeof(this->getRotationAxis().x), network::DATA); 211 212 registerVar( (void*) &(this->getRotationAxis().y), sizeof(this->getRotationAxis().y), network::DATA); 212 registerVar( (void*) &(this->getRotationAxis().z), sizeof(this->getRotationAxis().z), network::DATA); */213 registerVar( (void*) &(this->getRotationAxis().z), sizeof(this->getRotationAxis().z), network::DATA); 213 214 } 214 215 -
code/trunk/src/orxonox/objects/WorldEntity.h
r871 r1021 12 12 //#include "util/tinyxml/tinyxml.h" 13 13 #include "core/BaseObject.h" 14 #include " Tickable.h"14 #include "core/Tickable.h" 15 15 #include "../tools/Mesh.h" 16 16 17 17 namespace orxonox 18 18 { 19 class _OrxonoxExport WorldEntity : public BaseObject, public Tickable //, public network::Synchronisable19 class _OrxonoxExport WorldEntity : public BaseObject, public Tickable, public network::Synchronisable 20 20 { 21 21 public: … … 26 26 virtual void loadParams(TiXmlElement* xmlElem); 27 27 virtual void XMLPort(Element& xmlelement, bool loading); 28 bool create();28 inline bool create(){ return true; } 29 29 30 30 void attachWorldEntity(WorldEntity* entity); -
code/trunk/src/orxonox/objects/weapon/AmmunitionDump.cc
r871 r1021 45 45 { 46 46 RegisterObject(AmmunitionDump); 47 registerAllVariables(); 47 48 48 49 for (int i = 0; i < numberOfAmmos_; i++) … … 114 115 return stock_[id]; 115 116 } 117 118 void AmmunitionDump::registerAllVariables(){ 119 registerVar( &numberOfAmmos_, sizeof(int), network::DATA); 120 121 for (int i = 0; i < numberOfAmmos_; i++) 122 { 123 registerVar(&stock_[i], sizeof(int), network::DATA); 124 registerVar(&capacity_[i], sizeof(int), network::DATA); 125 } 126 } 116 127 } -
code/trunk/src/orxonox/objects/weapon/AmmunitionDump.h
r871 r1021 60 60 protected: 61 61 inline bool create() { return true; } 62 void registerAllVariables(); 62 63 63 64 int numberOfAmmos_; -
code/trunk/src/orxonox/objects/weapon/BulletManager.cc
r871 r1021 39 39 { 40 40 RegisterObject(BulletManager); 41 registerAllVariables(); 41 42 bullets_ = new Bullet*[bulletsSize_]; 42 43 } … … 103 104 } 104 105 106 void BulletManager::registerAllVariables(){ 107 registerVar(&bulletsSize_, sizeof(int), network::DATA); 108 registerVar(&bulletsIndex_, sizeof(int), network::DATA); 109 // TODO we got a problem here: 110 // there is no possibility (so far) to synchronise pointers to objects 111 } 112 105 113 } -
code/trunk/src/orxonox/objects/weapon/BulletManager.h
r871 r1021 39 39 #include "util/tinyxml/tinyxml.h" 40 40 #include "core/BaseObject.h" 41 #include " ../Tickable.h"41 #include "core/Tickable.h" 42 42 43 43 namespace orxonox { … … 60 60 protected: 61 61 inline bool create() { return true; } 62 void registerAllVariables(); 62 63 63 64 // Bullet array -
code/trunk/src/orxonox/particle/ParticleInterface.cc
r910 r1021 69 69 { 70 70 //Abgleichen der anderen Emitter an die Variabeln 71 for (int i= 0; i < numberOfEmitters_; i++) {71 for (int i=1; i < numberOfEmitters_; i++) { 72 72 particleSystem_->getEmitter(i)->setColour( colour_ ); 73 73 particleSystem_->getEmitter(i)->setTimeToLive( distance_ ); … … 84 84 } 85 85 86 void ParticleInterface::setRate( float r)86 void ParticleInterface::setRate(int r) 87 87 { 88 88 rate_ = r; … … 127 127 Vector3 ParticleInterface::getPositionOfEmitter ( int emitterNr ) 128 128 { 129 return particleSystem_->getEmitter( emitterNr)->getPosition();129 return particleSystem_->getEmitter(0)->getPosition(); 130 130 } 131 131 -
code/trunk/src/orxonox/particle/ParticleInterface.h
r910 r1021 48 48 void setVelocity( Real v ); 49 49 50 inline float getRate()50 inline int getRate() 51 51 { return rate_; }; 52 void setRate( float r );52 void setRate( int r ); 53 53 54 54 inline Real getDistance() … … 71 71 Real distance_; 72 72 Real velocity_; 73 float rate_;73 int rate_; 74 74 ColourValue colour_; 75 75 int numberOfEmitters_; -
code/trunk/src/orxonox/tools/Timer.cc
r890 r1021 46 46 this->time_ = 0; 47 47 } 48 49 /** 50 @brief Updates the timer before the frames are rendered. 51 */ 52 void TimerBase::tick(float dt) 53 { 54 if (this->bActive_) 55 { 56 // If active: Decrease the timer by the duration of the last frame 57 this->time_ -= dt; 58 59 if (this->time_ <= 0) 60 { 61 // It's time to call the function 62 if (this->bLoop_) 63 // Q: Why '+=' and not '='? A: Think about it. It's more accurate like that. Seriously. 64 this->time_ += this->interval_; 65 else 66 this->stopTimer(); // Stop the timer if we don't want to loop 67 68 this->run(); 69 } 70 } 71 } 72 48 73 } -
code/trunk/src/orxonox/tools/Timer.h
r871 r1021 58 58 #define _Timer_H__ 59 59 60 #include <OgreFrameListener.h>61 60 #include "../OrxonoxPrereqs.h" 61 #include "core/Tickable.h" 62 62 63 63 namespace orxonox 64 64 { 65 65 //! TimerBase is the parent of the Timer class. 66 class _OrxonoxExport TimerBase : public OrxonoxClass66 class _OrxonoxExport TimerBase : public Tickable 67 67 { 68 friend class TimerFrameListener;69 70 68 public: 71 69 TimerBase(); … … 83 81 /** @brief Returns true if the Timer is active (= not stoped, not paused). @return True = Time is active */ 84 82 inline bool isActive() const { return this->bActive_; } 83 84 void tick(float dt); 85 85 86 86 protected: … … 145 145 }; 146 146 147 //! The TimerFrameListener manages all Timers in the game.148 class TimerFrameListener : public Ogre::FrameListener149 {150 private:151 /** @brief Gets called before a frame gets rendered. */152 bool frameStarted(const Ogre::FrameEvent &evt)153 {154 // Iterate through all Timers155 for (Iterator<TimerBase> it = ObjectList<TimerBase>::start(); it; )156 {157 if (it->isActive())158 {159 // If active: Decrease the timer by the duration of the last frame160 it->time_ -= evt.timeSinceLastFrame;161 162 if (it->time_ <= 0)163 {164 // It's time to call the function165 if (it->bLoop_)166 it->time_ += it->interval_; // Q: Why '+=' and not '='? A: Think about it. It's more accurate like that. Seriously.167 else168 it->stopTimer(); // Stop the timer if we don't want to loop169 170 (it++)->run();171 }172 else173 ++it;174 }175 else176 ++it;177 }178 179 return FrameListener::frameStarted(evt);180 }181 };182 147 } 183 148 -
code/trunk/src/util/CMakeLists.txt
r871 r1021 2 2 3 3 AUX_SOURCE_DIRECTORY(tinyxml TINYXML_SRC_FILES) 4 AUX_SOURCE_DIRECTORY(tolua TOLUA_SRC_FILES) 4 5 5 6 SET (UTIL_SRC_FILES … … 11 12 MultiTypeMath.cc 12 13 ${TINYXML_SRC_FILES} 14 ${TOLUA_SRC_FILES} 13 15 ) 14 16 -
code/trunk/src/util/Sleep.h
r790 r1021 1 // hack for the usleep/Sleep problem 2 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) 1 /* 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * 4 * 5 * License notice: 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 * Author: 22 * Reto Grieder 23 * Co-authors: 24 * ... 25 * 26 */ 27 28 /** 29 @file Sleep.h 30 @brief Macros for using sleep() and usleep() under windows 31 */ 32 33 #include "OrxonoxPlatform.h" 34 35 #if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32 3 36 # include <windows.h> 4 # define usleep(x) Sleep((x)/1000) 37 # define usleep(x) Sleep((x) / 1000) 38 # define msleep(x) Sleep(x) 39 # define sleep(x) Sleep((x) * 1000) 5 40 #else 6 41 # include <unistd.h> 42 # define msleep(x) uleep((x) * 1000) 7 43 #endif -
code/trunk/visual_studio/base_properties.vsprops
r890 r1021 11 11 PreprocessorDefinitions="WIN32;__WIN32__;_WIN32;BOOST_ALL_DYN_LINK" 12 12 WarningLevel="3" 13 DisableSpecificWarnings="42 67; 4244; 4251;4522"13 DisableSpecificWarnings="4244;4251" 14 14 /> 15 15 <Tool … … 33 33 <UserMacro 34 34 Name="DependencyDir" 35 Value=" $(RootDir)dependencies\"35 Value="D:\orxonox\dependencies\orxonox\" 36 36 /> 37 37 <UserMacro -
code/trunk/visual_studio/network_properties.vsprops
r790 r1021 8 8 <Tool 9 9 Name="VCCLCompilerTool" 10 PreprocessorDefinitions="NETWORK_SHARED_BUILD; WIN32_LEAN_AND_MEAN; ZLIB_WINAPI"10 PreprocessorDefinitions="NETWORK_SHARED_BUILD; ZLIB_WINAPI;WIN32_LEAN_AND_MEAN" 11 11 /> 12 12 <Tool -
code/trunk/visual_studio/orxonox_vc8.sln
r890 r1021 19 19 {2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC} 20 20 {F101C2F0-1CB9-4A57-827B-6C399A99B28F} = {F101C2F0-1CB9-4A57-827B-6C399A99B28F} 21 EndProjectSection22 EndProject23 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "loader", "vc8\loader.vcproj", "{E283910F-F911-40FB-A09D-D025CA821912}"24 ProjectSection(WebsiteProperties) = preProject25 Debug.AspNetCompiler.Debug = "True"26 Release.AspNetCompiler.Debug = "False"27 EndProjectSection28 ProjectSection(ProjectDependencies) = postProject29 {2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC}30 21 EndProjectSection 31 22 EndProject … … 89 80 {271715F3-5B90-4110-A552-70C788084A86}.Release|Win32.ActiveCfg = Release|Win32 90 81 {271715F3-5B90-4110-A552-70C788084A86}.Release|Win32.Build.0 = Release|Win32 91 {E283910F-F911-40FB-A09D-D025CA821912}.Debug|Win32.ActiveCfg = Debug|Win3292 {E283910F-F911-40FB-A09D-D025CA821912}.Release_SSE|Win32.ActiveCfg = Release_SSE|Win3293 {E283910F-F911-40FB-A09D-D025CA821912}.Release_SSE2|Win32.ActiveCfg = Release_SSE2|Win3294 {E283910F-F911-40FB-A09D-D025CA821912}.Release|Win32.ActiveCfg = Release|Win3295 82 {35575B59-E1AE-40E8-89C4-2862B5B09B68}.Debug|Win32.ActiveCfg = Debug|Win32 96 83 {35575B59-E1AE-40E8-89C4-2862B5B09B68}.Debug|Win32.Build.0 = Debug|Win32 -
code/trunk/visual_studio/vc8/core.vcproj
r890 r1021 337 337 </File> 338 338 <File 339 RelativePath="..\..\src\orxonox\core\Tickable.cc" 340 > 341 </File> 342 <File 339 343 RelativePath="..\..\src\orxonox\core\XMLPort.cc" 340 344 > … … 447 451 </File> 448 452 <File 453 RelativePath="..\..\src\orxonox\core\Tickable.h" 454 > 455 </File> 456 <File 449 457 RelativePath="..\..\src\orxonox\core\XMLPort.h" 450 458 > -
code/trunk/visual_studio/vc8/orxonox.vcproj
r890 r1021 285 285 </File> 286 286 <File 287 RelativePath="..\..\src\orxonox\InputEventListener.cc" 288 > 289 </File> 290 <File 291 RelativePath="..\..\src\orxonox\InputHandler.cc" 292 > 293 </File> 294 <File 287 295 RelativePath="..\..\src\orxonox\InputManager.cc" 288 296 > 297 <FileConfiguration 298 Name="Debug|Win32" 299 ExcludedFromBuild="true" 300 > 301 <Tool 302 Name="VCCLCompilerTool" 303 /> 304 </FileConfiguration> 289 305 </File> 290 306 <File … … 572 588 </File> 573 589 <File 574 RelativePath="..\..\src\orxonox\objects\Tickable.cc"575 >576 </File>577 <File578 590 RelativePath="..\..\src\orxonox\objects\WorldEntity.cc" 579 591 > … … 633 645 <File 634 646 RelativePath="..\..\src\orxonox\tools\Timer.cc" 635 >636 </File>637 </Filter>638 <Filter639 Name="loader"640 >641 <File642 RelativePath="..\..\src\loader\LevelLoader.cc"643 647 > 644 648 </File> … … 655 659 </File> 656 660 <File 661 RelativePath="..\..\src\orxonox\InputEvent.h" 662 > 663 </File> 664 <File 665 RelativePath="..\..\src\orxonox\InputEventListener.h" 666 > 667 </File> 668 <File 669 RelativePath="..\..\src\orxonox\InputHandler.h" 670 > 671 </File> 672 <File 657 673 RelativePath="..\..\src\orxonox\InputManager.h" 658 674 > … … 743 759 <File 744 760 RelativePath="..\..\src\orxonox\objects\test3.h" 745 >746 </File>747 <File748 RelativePath="..\..\src\orxonox\objects\Tickable.h"749 761 > 750 762 </File> … … 807 819 <File 808 820 RelativePath="..\..\src\orxonox\tools\Timer.h" 809 >810 </File>811 </Filter>812 <Filter813 Name="loader"814 >815 <File816 RelativePath="..\..\src\loader\LevelLoader.h"817 >818 </File>819 <File820 RelativePath="..\..\src\loader\LoaderPrereqs.h"821 821 > 822 822 </File>
Note: See TracChangeset
for help on using the changeset viewer.