//--------------------------------------------------------------------------- #include #pragma hdrstop #include "Unit1.h" #include #include //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { //Form1->Canvas->Brush->Style=clBlack; Form1->Font->Color=0x0020C2DF; Form1->Color=0x00B44B73; } int line = 0; int letter = 0; bool iDontLoveYou = true; bool isThisTheFirstScreen = true; char clarisse[15][50] = { "I don't love you anymore", "I would be lying if I said that", "I still want you the way I've always wanted.", "I'm sure that", "Nothing was in vain.", "I feel inside me that", "You don't mean anything to me.", "I could never say that", "I nourish a great love.", "I feel more and more that", "I've already forgotten you!", "And I'll never use the phrase", "I LOVE YOU!", "I'm sorry, but I've got to say the truth", "It's too late..." }; char nextClarisse[15][50]; int linha = 0; int letra = 0; char poema[15][50] = { "Nao te amo mais", "Estarei mentindo dizendo que", "Ainda te quero como sempre quis.", "Tenho certeza de que", "Nada foi em vao.", "Sinto dentro de mim que", "Voce nao significa nada.", "Nao poderia dizer jamais que", "Alimento um grande amor.", "Sinto cada vez mais que", "Ja te esqueci!", "E jamais usarei a frase", "EU TE AMO!", "Sinto, mas tenho que dizer a verdade", "E tarde demais..." }; char poemaInverso[15][50]; //--------------------------------------------------------------------------- void __fastcall TForm1::ButtonDisplaySonnetClick(TObject *Sender) { /*//Refresh(); for (line = 0; line < 15; line++) { Form1->Canvas->TextOut (130, 20 * line + 80, clarisse[line]); } */ for (line = 0; line < 15; line++) { for (letter = 0; letter < 50; letter++) { nextClarisse[line][letter] = clarisse[14-line][letter]; } } for (line = 0; line < 15; line++) { for (letter = 0; letter < 50; letter++) { clarisse[line][letter] = nextClarisse[line][letter]; } } if (iDontLoveYou) { Form1->Font->Color=0x00B44B73; Form1->Color=0x0020C2DF; } else { Form1->Font->Color=0x0020C2DF; Form1->Color=0x00B44B73; } iDontLoveYou = !iDontLoveYou; Refresh(); for (line = 0; line < 15; line++) { Form1->Canvas->TextOut (130, 20 * line + 80, clarisse[line]); } } //--------------------------------------------------------------------------- void __fastcall TForm1::ButtonPortugueseClick(TObject *Sender) { Refresh(); for (linha = 0; linha < 15; linha++) { Form1->Canvas->TextOut (400, 20 * linha + 80, poema[linha]); } for (linha = 0; linha < 15; linha++) { for (letra = 0; letra < 50; letra++) { poemaInverso[linha][letra] = poema[14-linha][letra]; } } for (linha = 0; linha < 15; linha++) { for (letra = 0; letra < 50; letra++) { poema[linha][letra] = poemaInverso[linha][letra]; } } if (iDontLoveYou) { Form1->Font->Color=0x00B44B73; Form1->Color=0x0020C2DF; } else { Form1->Font->Color=0x0020C2DF; Form1->Color=0x00B44B73; } iDontLoveYou = !iDontLoveYou; Refresh(); for (linha = 0; linha < 15; linha++) { Form1->Canvas->TextOut (400, 20 * linha + 80, poema[linha]); } } //--------------------------------------------------------------------------- void __fastcall TForm1::FormPaint(TObject *Sender) { if (isThisTheFirstScreen == true) { for (line = 0; line < 15; line++) { Form1->Canvas->TextOut (130, 20 * line + 80, clarisse[line]); } } isThisTheFirstScreen = false; } //---------------------------------------------------------------------------