void Object::ToggleFlags(int mask) { if (GetFlags() & mask) { WriteFlags(~mask, 0); } else { WriteFlags(-1, mask); } }
/************* * DESCRIPTION: write texture to scene file * INPUT: iff iff handler * OUTPUT: FALSE if failed else TRUE *************/ BOOL TEXTURE_OBJECT::WriteObject(struct IFFHandle *iff) { VECTOR v[3]; if(PushChunk(iff, ID_ITXT, ID_FORM, IFFSIZE_UNKNOWN)) return FALSE; if(!WriteLongChunk(iff, ID_POSI, &pos, 3)) return FALSE; v[0] = orient_x; v[1] = orient_y; v[2] = orient_z; if(!WriteLongChunk(iff, ID_ALGN, v, 9)) return FALSE; if(!WriteLongChunk(iff, ID_SIZE, &size, 3)) return FALSE; if(!WriteTrack(iff)) return FALSE; if(!WriteFlags(iff)) return FALSE; if(PopChunk(iff)) return FALSE; return TRUE; }
void WaypointWriter::WriteWaypoint(TextWriter &writer, const Waypoint& wp) { // Write the waypoint id writer.printf("%u,", wp.original_id > 0 ? wp.original_id : wp.id); // Write the latitude WriteAngle(writer, wp.location.latitude, true); writer.write(','); // Write the longitude id WriteAngle(writer, wp.location.longitude, false); writer.write(','); // Write the altitude id WriteAltitude(writer, wp.altitude); writer.write(','); // Write the waypoint flags WriteFlags(writer, wp); writer.write(','); // Write the waypoint name writer.write(wp.name.c_str()); writer.write(','); // Write the waypoint description writer.writeln(wp.comment.c_str()); }
CEndGameState::CEndGameState() { WriteFlags(DELETE_WHEN_NOT_TOP_F); m_ResultTimer.SetTimeMS( I3D_RACE_FINISH_TIMEOUT ); }
void Object::ClearFlags(int mask) { WriteFlags(~mask, 0); }
void Object::SetFlags(int mask) { WriteFlags(-1, mask); }