void LEDaus() { int tan; for(tan=0;tan<tPWM-ton;tan++) { Ebene(EC); PORTC = 0; Reiheinit(); ReiheNext(); ReiheNext(); ReiheNext(); PORTC = 255; ReiheNext(); ReiheNext(); ReiheNext(); ReiheNext(); warte(Zeit1); resetReihe(); EC++; if(EC==9) { EC = 1; } } }
// Ausgabefunktionen ---------------------------------------------------------- Bool DPunkt :: OutPut (void) { long locEnum = Enum(); long locEnum2 = Enum2(); long locEbene = Ebene() + PUNKTEBENE0; DGeoObj *plocDGO = r_flag ? this : NULL; if (h_flag && pGDBElemente -> FindOrEnter (locEnum, locEnum2, plocDGO)) return FALSE; // bereits ausgegeben // nur alles bis zu einer vorgegebenen Stufe ausgeben if (Stufe() > MaxPunktStufe) return FALSE; if (!s_flag) { fprintf (stderr, "GDB-Element(PG): %7ld/%ld \r", cntEl++, locEnum); fflush (stderr); } // IdentifikatorSatz ausgeben fprintf (yyout, "P %10ld %08ld 1\n", locEnum, locEbene); // Merkmale ausgeben if (strcmp (_PunktKennzeichen, "T0") && *_PunktKennzeichen != '\0') OutputMK (MKPKZ, _PunktKennzeichen); if (_PunktNummer > 0) OutputMK (MKPNR, _PunktNummer); if (_Text) OutputMK (MKPTEXT, _Text); if (_Name) OutputMK (MKPNAME, _Name); if (_Code) OutputMK (MKPCODE, _Code); // DB-AnkopplungsCode // auf evtl. Begleitobjekt beziehen if (_RelSatz) { fprintf (yyout, "R B %08ld\n", _RelSatz); _RelSatz = 0; } // PunktGeoemtrie ausgeben fprintf (yyout, "G %10.4lf %10.4lf\n", X(), Y()); // fflush (yyout); return TRUE; }
Bool DLinie :: OutPut (void) { long locEnum = Enum(); long locEnum2 = Enum2(); long Cnt = Count(); long locEbene = Ebene() + LINIENEBENE0; DGeoObj *plocDGO = r_flag ? this : NULL; if (h_flag && pGDBElemente -> FindOrEnter (locEnum, locEnum2, plocDGO)) return FALSE; // bereits ausgegeben // nur alles bis zu einer vorgebebenen Stufe ausgeben if (Stufe() > MaxLinienStufe) return FALSE; if (!s_flag) { fprintf (stderr, "GDB-Element(LI): %7ld/%ld \r", cntEl++, locEnum); fflush (stderr); } // IdentifikatorSatz ausgeben fprintf (yyout, "L %10ld %08ld %5ld\n", locEnum, locEbene, Cnt); if (_Name) OutputMK (MKLNAME, _Name); if (_Code) OutputMK (MKLCODE, _Code); // DB-AnkopplungsCode if (_Text) OutputMK (MKLTEXT, _Text); // eigentlicher Text // auf evtl. Begleitobjekt beziehen if (_RelSatz) { fprintf (yyout, "R B %08ld\n", _RelSatz); _RelSatz = 0; } // Geometrie ausgeben CRing r (*_pDPL); OutputGI (r, Cnt); return TRUE; }
Bool DText :: OutPut (void) { long locEnum = Enum(); long locEnum2 = Enum2(); long locEbene = Ebene() + TEXTEBENE0; DGeoObj *plocDGO = r_flag ? this : NULL; if (h_flag && pGDBElemente -> FindOrEnter (locEnum, locEnum2, plocDGO)) return FALSE; // bereits ausgegeben // nur alles bis zu einer vorgegebenen Stufe ausgeben if (Stufe() > MaxTextStufe) return FALSE; if (!s_flag) { fprintf (stderr, "GDB-Element(TX): %7ld/%ld \r", cntEl++, locEnum); fflush (stderr); } char outBuff[80]; int iTHoehe, iTBreite; if (!b_flag) { // IdentifikatorSatz ausgeben fprintf (yyout, "P %10ld %08ld 1\n", locEnum, locEbene); // Merkmale Ausgeben if (_Text) OutputMK (MKTTEXT, _Text); // eigentlicher Text if (_THoehe != -1.0 && _THoehe != 0.0) OutputMK (MKTHOEHE, _THoehe); // TextH�he if (_TLaenge != -1.0 && _TLaenge != 0.0) OutputMK (MKTLAENGE, _TLaenge); // TextL�nge if (_TModus != -1.0) OutputMK (MKTMODUS, _TModus); // TextModus if (_Code) OutputMK (MKTCODE, _Code); // DB-AnkopplungsCode OutputMK (MKTSWINKEL, _TSWinkel); // TORIENT OutputMK (MKTWINKEL, _Winkel); // TextWinkel char Richt[2]; Richt[0] = (char)_TRicht; Richt[1] = '\0'; OutputMK (MKTRICHT, Richt); // TextAusrichtung // VisInfo als Merkmal ausgeben int iTTyp = 0x0; switch (_TRicht) { default: case 'L': break; case 'M': iTTyp |= TV_CentreAlign; break; case 'R': iTTyp |= TV_RightAlign; break; } if (_THoehe != -1 && _TModus != -1) { iTHoehe = int(_THoehe / 0.3176); iTBreite = int((_THoehe * _TModus) / 0.3176); sprintf (outBuff, "x { r=%d; o=%d; s=%d,%d; y=0x%x; }", -(int)_Winkel, -(int)_TSWinkel, -iTHoehe, iTBreite, iTTyp); } else { sprintf (outBuff, "x { r=%d; o=%d; y=0x%x; }", -(int)_Winkel, -(int)_TSWinkel, iTTyp); } OutputMK (MKTVISINFO, outBuff); // Geoemtrie des Bezugspunktes ausgeben fprintf (yyout, "G %12.5lf %12.5lf\n;\n", X(), Y()); // fflush (yyout); } else if (_Text) { // Texte als Begleitobjekte ausgeben fprintf (yyout, "B %10ld %08ld 1\n", locEnum, locEbene); // eigentlichen Text ausgeben OutputTO (_Text); // VisInfo als Merkmal ausgeben int iTTyp = 0x0; switch (_TRicht) { default: case 'L': break; case 'M': iTTyp |= TV_CentreAlign; break; case 'R': iTTyp |= TV_RightAlign; break; } if (_THoehe != -1 && _TModus != -1) { iTHoehe = int(_THoehe / 0.3176); iTBreite = int((_THoehe * _TModus) / 0.3176); sprintf (outBuff, "x { r=%d; o=%d; s=%d,%d; y=0x%x; }", -(int)_Winkel, -(int)_TSWinkel+(int)_Winkel, -iTHoehe, iTBreite, iTTyp); } else { sprintf (outBuff, "x { r=%d; o=%d; y=0x%x; }", -(int)_Winkel, -(int)_TSWinkel+(int)_Winkel, iTTyp); } OutputMK (MKTVISINFO, outBuff); // Geoemtrie des Bezugspunktes ausgeben fprintf (yyout, "G %10.4lf %10.4lf\n;\n", X(), Y()); // fflush (yyout); } return TRUE; }
Bool DFlaeche :: OutPut (void) { long locEnum = Enum(); long locEnum2 = Enum2(); long Cnt = Count(); long locEbene = Ebene() + FLAECHENEBENE0; DGeoObj *plocDGO = r_flag ? this : NULL; if (h_flag && pGDBElemente -> FindOrEnter (locEnum, locEnum2, plocDGO)) return FALSE; // bereits ausgegeben // nur alles bis zu einer vorgegebenen Stufe ausgeben if (Stufe() > MaxFlaechenStufe) return FALSE; if (!s_flag) { fprintf (stderr, "GDB-Element(FL): %7ld/%ld \r", cntEl++, locEnum); fflush (stderr); } #if defined(EWU) // spezialFall f�r EWU if (_Pointer[0] != '\0') { long Ident = atol (_Pointer); fprintf (yyout, "F %10ld 00910%3ld %5ld\n", locEnum, Ident/1000, Cnt); } else #endif // IdentifikatorSatz ausgeben fprintf (yyout, "F %10ld %08ld %5ld\n", locEnum, locEbene, Cnt); // Merkmale Ausgeben if (_Text) OutputMK (MKFTEXT, _Text); // eigentlicher Text if (_XKoord != -1.0 || _YKoord != -1.0) { // Bezugspunkt der F�che ausgeben OutputMK (MKFXKOORD, _XKoord); OutputMK (MKFYKOORD, _YKoord); } if (_SWinkel != -1.0 && _SWinkel != 0.0) OutputMK (MKFSWINKEL, _SWinkel); // Schraffurwinkel if (_SAbstand != -1.0 && _SAbstand != 0.0) OutputMK (MKFSABSTAND, _SAbstand); // Schraffurabstand if (_Code) OutputMK (MKFCODE, _Code); // DB-AnkopplungsCode if (_Pointer[0] != '\0') // #JB921506 OutputMK (MKFPOINTER, _Pointer);// dBase-AnkopplungsCode if (_Name) OutputMK (MKFNAME, _Name); // auf evtl. Begleitobjekt beziehen if (_RelSatz) { fprintf (yyout, "R B %08ld\n", _RelSatz); _RelSatz = 0; } // Geometrie ausgeben CRing rF (*_pDLL); int i = 0; for (i = 0, rF.First(); rF.Valid(); i++, rF.Next()) { DLinieLock l(rF); if (l) { CRing r(*(l -> _pDPL)); OutputGI (r, l -> _pDPL -> Count()); fprintf (yyout, "T\n"); //TrennSatz einf�gen } else break; } return TRUE; }
/* Kanten des Würfels läuchten, in der mitte fährt ein block hoch und runter */ void loadanim (int tpulse) { int ipulse; int a = 1; int ab = 1; for(ipulse=0;ipulse<tpulse;ipulse++) { f1 = 0; EC = 1; while(f1<96) { if(EC==a) { Ebene(EC); PORTC = 0b00000000; Reiheinit(); ReiheNext(); ReiheNext(); ReiheNext(); ReiheNext(); ReiheNext(); ReiheNext(); ReiheNext(); warte(Zeit2); resetReihe(); EC++; if (EC==9) { EC=1; f1++; } } else { Ebene(EC); PORTC = 0b11111111; Reiheinit(); ReiheNext(); ReiheNext(); ReiheNext(); ReiheNext(); ReiheNext(); ReiheNext(); warte(Zeit1); resetReihe(); EC++; if (EC==9) { EC=1; f1++; } } } f1 = 0; EC = 1; if (ab==1) { a++; if (a==7) { ab=2; } } if (ab==2) { a--; if (a==1) { ab=1; } } } }