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

Password:

Oworldmt.h Source File
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

Oworldmt.h

Go to the documentation of this file.
00001 //Filename   : OWORLDMT.H
00002 //Description: Header for Class MapMatrix and ZoomMatrix
00003 
00004 #ifndef __OWORLDMT_H
00005 #define __OWORLDMT_H
00006 
00007 #ifndef __OMATRIX_H
00008 #include <OMATRIX.H>
00009 #endif
00010 
00011 //-------- World matrix size ------------//
00012 
00013 #define MAX_WORLD_X_LOC  80
00014 #define MAX_WORLD_Y_LOC  80
00015 
00016 //------------- Map window -------------//
00017 
00018 #define MAP_X1          (MAP_X2-MAP_WIDTH+1)
00019 #define MAP_Y1          (MAP_Y2-MAP_HEIGHT+1)
00020 #define MAP_X2          (VGA_WIDTH-7)
00021 #define MAP_Y2        (VGA_HEIGHT-5)
00022 
00023 // 40 (MAX_WORLD_X_LOC/2) * 8 (MAP_LOC_WIDTH)  = 320
00024 #define MAP_WIDTH       (MAX_WORLD_X_LOC/2)*MAP_LOC_WIDTH
00025 // 40 (MAX_WORLD_Y_LOC/2) * 4 (MAP_LOC_HEIGHT) = 160
00026 #define MAP_HEIGHT    (MAX_WORLD_Y_LOC/2)*MAP_LOC_HEIGHT
00027 
00028 #define MAP_LOC_WIDTH    4
00029 #define MAP_LOC_HEIGHT   2
00030 
00031 #define MAP_BORDER_WIDTH  2
00032 #define MAP_BORDER_HEIGHT 2
00033 
00034 //----------- Zoom window -------------//
00035 
00036 #define ZOOM_X1     33
00037 #define ZOOM_Y1     58
00038 #define ZOOM_X2         769
00039 #define ZOOM_Y2         477
00040 
00041 #define ZOOM_WIDTH      (ZOOM_X2-ZOOM_X1+1)
00042 #define ZOOM_HEIGHT   (ZOOM_Y2-ZOOM_Y1+1)
00043 
00044 //------- 1st level zoom --------//
00045 
00046 #define ZOOM1_LOC_WIDTH   32
00047 #define ZOOM1_LOC_HEIGHT  16
00048 
00049 //------ 2nd level zoom ---------//
00050 
00051 #define ZOOM2_LOC_WIDTH   64
00052 #define ZOOM2_LOC_HEIGHT  32
00053 
00054 //----------- define class MapMatrix -----------//
00055 
00057 class MapMatrix : public Matrix {
00058 public:
00059     void  draw_all();
00060     void  draw_update();
00061 
00062     int   detect();
00063     void  scroll(int scrollX, int scrollY);
00064 
00065 private:
00066     void  draw_zoom_box(int useVgaBack);
00067 };
00068 
00069 //---------- define class ZoomMatrix -----------//
00070 
00073 class ZoomMatrix : public Matrix {
00074 private:
00075     unsigned long next_scroll_time;               // next scroll time
00076 
00077 public:
00078     ZoomMatrix();
00079 
00080     void  draw_all();
00081 #if(GAME_VERSION>=200)
00082     void  draw_text();
00083 #endif
00084     void  draw_update();
00085 
00086     int   detect();
00087 
00088 private:
00089     int   detect_scroll();
00090     int   detect_select();
00091 };
00092 
00093 //------------------------------------------------------//
00094 #endif

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