// Best project ever source code. // you really need to reconstruct this code class by class, simply pasting // won't help, because the RAD system in Borland creates alot of code for you in // the header as you make each class. // // speaking of the header file, you need to open it and add this; // bool dir; // int score; // in the "private" section in order for this to work. // // "Jeff" is the name of the mallet that crushes. //--------------------------------------------------------------------------- #include #pragma hdrstop #include "BestGameEVER.h" // this is the header file. //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" // you'll need to make a form too... TForm1 *Form1; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner){} //--------------------------------------------------------------------------- void __fastcall TForm1::Shape1MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) {Application->Terminate();} // this closes the program when you hit the puple button. //--------------------------------------------------------------------------- void __fastcall TForm1::Timer1Timer(TObject *Sender) { if (kirby0->Left<=LeftStopper->Left) { dir=true; } else if (kirby0->Left>=RightStopper->Left) {dir=false; } if (dir==true) {kirby0->Left=(kirby0->Left+10); eye1->Left=(eye1->Left+10); eye2->Left=(eye2->Left+10); blush1->Left=(blush1->Left+10); blush2->Left=(blush2->Left+10); } else {kirby0->Left=(kirby0->Left-10); eye1->Left=(eye1->Left-10); eye2->Left=(eye2->Left-10); blush1->Left=(blush1->Left-10); blush2->Left=(blush2->Left-10); } } //--------------------------------------------------------------------------- void __fastcall TForm1::FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { if (Key == VK_SPACE && jeff->Top==16) {jeff->Top=(jeff->Top+130); jeff2->Top=(jeff2->Top+130); if (kirby0->Left>=230 && kirby0->Left<=280) { kirby0->Top=(kirby0->Top+100); kirby0->Height=30; score++; Label1->Caption=score; } }// relates to Key=space } //--------------------------------------------------------------------------- void __fastcall TForm1::FormKeyUp(TObject *Sender, WORD &Key, TShiftState Shift) { if (jeff->Top==146) {jeff->Top=16; jeff2->Top=112;}//16 and 112 are the starting points of the shapes. kirby0->Top=288; kirby0->Height=145; //these are the marshmellows' starting points. } //------------------------------------------------