Virtual U.org
Get Personal Training on VU Today
    
Top shadow
 
 register/help
User Name:

Password:

OBANKRUP.CPP Source File
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

OBANKRUP.CPP

Go to the documentation of this file.
00001 #include <OSYS.H>
00002 #include <OCONFIG.H>
00003 #include <OBANKRUP.H>
00004 #include <OGAMESET.H>
00005 #include <OWORLDMT.H>
00006 #include <OVGA.H>
00007 #include <COLOR.H>
00008 #include <OFONT.H>
00009 #include <OGAMESTR.H>
00010 #include <OMOUSE.H>
00011 #include <OMOUSE2.H>
00012 #include <OIFACE.H>
00013 #include <OINFO.H>
00014 #include <OBUTTON.H>
00015 
00016 enum {                                            // screen coordinates
00017     REPORT_X1 = ZOOM_X1+15,
00018     REPORT_Y1 = ZOOM_Y1+25,
00019     REPORT_X2 = ZOOM_X2-15,
00020     REPORT_Y2 = ZOOM_Y2-55
00021 };
00022 
00023 enum {
00024     BUTTON_X0 = REPORT_X1+100,
00025     BOTTOM_Y1 = REPORT_Y2+25,
00026 };
00027 
00028 enum {
00029     BOTTOM_BUTTON_WIDTH = 80,
00030     BOTTOM_BUTTON_HEIGHT = 25,
00031     BOTTOM_BUTTON_DISTANCE = 10,
00032 };
00033 
00034 enum {                                            // the bg image id
00035     BG_PIC_ID = 18
00036 };
00037 
00038 static char bankruptcy_report_init_flag;
00039 //------- Begin of function BankruptcyReport::BankruptcyReport -----------//
00041 BankruptcyReport::BankruptcyReport() {
00042     init();
00043 }
00044 
00045 //--------- End of function BankruptcyReport::BankruptcyReport -----------//
00046 
00047 //------- Begin of function BankruptcyReport::~BankruptcyReport -----------//
00049 BankruptcyReport::~BankruptcyReport() {
00050     deinit();
00051 }
00052 
00053 //--------- End of function BankruptcyReport::~BankruptcyReport -----------//
00054 
00055 //------- Begin of function BankruptcyReport::deinit ---------------//
00057 void BankruptcyReport::deinit() {
00058     bankruptcy_report_init_flag = 0;
00059 }
00060 
00061 //--------- End of function BankruptcyReport::deinit ---------------//
00062 
00063 //------- Begin of function BankruptcyReport::init -----------------//
00065 void BankruptcyReport::init() {
00066     bankruptcy_report_init_flag = 0;
00067 }
00068 
00069 //--------- End of function BankruptcyReport::init -----------------//
00070 
00071 //---------- Begin of function BankruptcyReport::eval_letter_report ------------//
00073 void BankruptcyReport::bankruptcy_report(int refreshFlag) {
00074     int tab1=REPORT_X1,tab2=REPORT_X1+100,
00075         tab3=REPORT_X1+200,tab4=REPORT_X1+700;
00076     int vtab1=REPORT_Y1+15,vtab2=REPORT_Y1+70,
00077         vtab3=REPORT_Y1+75,vtab4=REPORT_Y1+350;
00078     vga.use_back();
00079 
00080     sys.is_institution_report=1;
00081     if (refreshFlag == INFO_REPAINT) {
00082         if(bankruptcy_report_init_flag )
00083             deinit();
00084 
00085         //------------- paint the background ----------------//
00086         if (!bankruptcy_report_init_flag) {
00087             user_interface.bg_img(BG_PIC_ID, &vga_back);
00088             info.disp_column_bitmap(&vga_back);
00089             bankruptcy_report_init_flag=1;
00090         }
00091     }
00092     //------- blt the back buffer to front buffer -------//
00093     vga.blt_buf(ZOOM_X1, ZOOM_Y1, ZOOM_X2, ZOOM_Y2);
00094 }
00095 
00096 //---------- End of function Development::eval_letter_report ------------//
00097 
00099 
00100 int BankruptcyReport::bankruptcy_detect() {
00101     int tab1=REPORT_X1,tab2=REPORT_X1+100,
00102         tab3=REPORT_X1+200,tab4=REPORT_X1+600;
00103     int vtab1=REPORT_Y1+15,vtab2=REPORT_Y1+70,
00104         vtab3=REPORT_Y1+100,vtab4=REPORT_Y1+350;
00105 
00106     if (!bankruptcy_report_init_flag)
00107         return 0;
00108     if (mouse.single_click(2))
00109         sys.set_staying_view_mode(MODE_FINAL_SCORE);
00110     return 0;
00111 }

Generated on Fri Aug 23 01:37:14 2002 for VirtualU by doxygen1.2.17