Changeset 87:819d8b155771 in xplra for src/client/c
- Timestamp:
- 05/12/13 09:02:44 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/client/c/hu/varadiistvan/xplra
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/client/c/hu/varadiistvan/xplra/XPlane.cc
r57 r87 246 246 //------------------------------------------------------------------------------ 247 247 248 void XPlane::saveSituation(const char* path) throw(Exception) 249 { 250 stream->writeU8(Protocol::COMMAND_SAVE_SITUATION); 251 stream->writeString(path); 252 stream->flush(); 253 checkResult(); 254 } 255 256 //------------------------------------------------------------------------------ 257 248 258 void XPlane::getScalar(const char* name, uint8_t type) throw(Exception) 249 259 { -
src/client/c/hu/varadiistvan/xplra/XPlane.h
r66 r87 156 156 157 157 /** 158 * Save the current situation into the file with the given path, 159 * which is relative to the directory of X-Plane. 160 */ 161 void saveSituation(const char* path) throw(Exception); 162 163 /** 158 164 * Get the integer value of the dataref with the given name. 159 165 */ -
src/client/c/hu/varadiistvan/xplra/xplra.cc
r70 r87 530 530 //------------------------------------------------------------------------------ 531 531 532 extern "C" int xplra_save_situation(int connectionID, const char* path) 533 { 534 Connection* connection = ConnectionSlot::getValue(connectionID); 535 if (connection==0) return -1; 536 try { 537 connection->saveSituation(path); 538 return 0; 539 } catch (...) { 540 connection->handleException(); 541 return -1; 542 } 543 } 544 545 //------------------------------------------------------------------------------ 546 532 547 extern "C" int xplra_get_int(int* value, int connectionID, const char* name) 533 548 { -
src/client/c/hu/varadiistvan/xplra/xplra.h
r70 r87 165 165 166 166 /*----------------------------------------------------------------------------*/ 167 168 /** 169 * Save the current situation into the file with the given path 170 * relative to X-Plane's directory. 171 */ 172 int xplra_save_situation(int connectionID, const char* path); 173 174 /*----------------------------------------------------------------------------*/ 167 175 /* Single dataref support */ 168 176 /*----------------------------------------------------------------------------*/
Note:
See TracChangeset
for help on using the changeset viewer.