home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR2 / DVPG30FS.ZIP / VIEWDEF.H < prev   
C/C++ Source or Header  |  1993-12-04  |  7KB  |  184 lines

  1. /*       These are various definations which are used by the viewing program
  2.  *     (jvmain.c) and the video setup program (jvsetup.c).
  3.  *
  4.  *
  5.  */
  6.  
  7.  
  8. #ifndef jvsetup_used
  9. #define jvsetup_used
  10.  
  11.  
  12. #define viewing_defaults_file "dvpeg.vu"    /* file name for the picture defaults as saved */
  13. #define viewing_defaults_temp_file "dvpeg.vuu"    /* file name for the picture defaults temp storage (ie deleting an entry) */
  14.  
  15. #define line_buffer_bytes 2400        /* maximum number of bytes to buffer 1 line of the screen image ie 800 * 3 bytes/pixel */
  16.  
  17. #define video_mem_seg 0xA000                /* start of video mem.  This will change when I get to local-bus cards */
  18.  
  19. /*
  20.  * Window descriptions ie size
  21.  */
  22.  
  23. #define preview_win_x 60    /* window where you select resolution */
  24. #define preview_win_y 21
  25.  
  26.  
  27. #define text_line_x 5                /* position of text in the lower left corner */
  28. #define text_line_y y_max - 20
  29.  
  30. #define max_shrink 7            /* maximum shrinking size */
  31.  
  32. /*
  33.  * drawing routine contrast ... controls
  34.  */
  35.  
  36. #define con_ctrl(value) (((value - 128) * contrast_scale) >> 5)        /* contrast ... controls, >> 5 is divide by 32 */
  37. #define bright_ctrl(value)  ((value * color_scale) >> 6)            /* >> 6 is divide by 64 */
  38.  
  39. #define new_tint(data, tf_2) ( (((int)data * tint_factor_1) >> 6) + tf_2 )        /* this is a reduced version of the above 2 equations */
  40.  
  41. #define  cfg_file_marker 01            /* marker at start of config file as a unique signature */
  42.  
  43. #define    file_name_len 80                /* length of char string to store full file names + drive + path */
  44. #define    string_len 80                    /* default string length */
  45. #define    drive_list_length 10            /* the maximum number of drives in the file list ie # of letters shown */
  46. #define    max_files_selected 10        /* the maximum number of files selected for viewing ie slide show */
  47. #define  number_VGA_cards 20        /* the number of VGA cards supported - must be co-ordinated with the list in jvsetup.h */
  48. #define  number_modes_in_list 25    /* the max number of modes in the user selected list */
  49. #define    max_files_in_list 1000        /* absolute maximum number of files info pointers
  50.                                                     currently aprox 20 bytes each */
  51. #define  init_max_file_records 500    /* initial default value of size of file struct */
  52. #define    max_file_masks 8                /* array of file masks (14 char each ie 8.3 format + null), 0 if not used, string otherwise */
  53. #define    default_slide_show_pause 3    /* default pause for slide show in seconds */
  54.  
  55.  
  56. enum jpeg_formats{        /* different types of jpegs, to speedup drawing of most common ie h2v2 */
  57.     H1V1,
  58.     H1V2,
  59.     H2V1,
  60.     H2V2
  61.     };
  62.  
  63.  
  64. enum image_formats{        /* image formats supported */
  65.     GIF,
  66.     PPM,
  67.     JPG,
  68.     TGA
  69.     };
  70.  
  71. enum image_row_ordering{    /* different ways a file can be formated -> this is for fixing the munged saving to the buffer */
  72.     NORMAL,
  73.     UPSIDE_DOWN,
  74.     INTERLACED
  75.     };
  76.  
  77.  
  78. enum sorting_names{     /* enum for sorting modes */
  79.     NONE,
  80.     FF_NAME,
  81.     FF_DATE,
  82.     FF_SIZE
  83.     };
  84.  
  85.  
  86. enum card_resolution{        /* types of video cards */
  87.     VGA,
  88.     SVGA,                /* from here used to be 0, 1, 2, 3 .. */
  89.     SVGA_15_bit,
  90.     SVGA_16_bit,
  91.     SVGA_24_bit,
  92.     };
  93.  
  94.  
  95. /*
  96.  * masks for bits in word describing setup flags
  97.  * -> the view_defaults variable
  98.  */
  99. enum bit_locs{
  100.     grey_bit = 1,
  101.     dithering_bit = 2,
  102.     smoothing_bit = 4,
  103.     quantize_bit = 8,
  104.     panning_bit = 16,        /* disable panning completely ? */
  105.     ask_size_bit = 32,    /* show screen with defaults or pass it ?? */
  106.     beep_on = 64,
  107.     only_hi_color = 128,        /* flag to disable SVGA modes if hi_color is available for a jpeg */
  108.     not_less_hi_color = 256,    /* lock out all SVGA modes less than the lowest hi-color mode for non GIF/color mapped images */
  109.     ascending_bit = 512,        /* sort file info in ascending order ? */
  110.     fifty_line_text = 1024,    /* flag to indicate if 50 line mode should be forced */
  111.     always_pan = 2048,        /* fix the panning always on for zooming ... */
  112.     lock_shrink = 4096,        /* lock for shrink at a set ratio */
  113.     clear_during_pan = 8192,    /* flag to enable/disable clear of screen when there will be garbage left behind */
  114.     lock_during_pan = 16384,     /* flag to lock out switching video modes when zoom/shrinking picture */
  115.     };
  116.  
  117. /*
  118.  * bit locations of the "defaults" integer in the config file
  119.  */
  120. enum default_bits{
  121.     long_file_format = 3,        /* long file format; 0 = short, 1 = medium, 2 = long */
  122.     use_default_file = 4,
  123.     error_msg_on = 8,        /* flag to enable error msg window */
  124.     show_drives = 16,        /* show drives along with the file list ? */
  125.     show_tree = 32,            /* show the directory tree as well ? */
  126.     slide_show_continous = 64,        /* can make slide-show continous */
  127.     shrink_enable_flag = 128,    /* flag to disable shrink to fit */
  128.     clear_before_draw = 256,        /* flag to clear the screen before drawing */
  129.     rgb_flip = 512,              /* flag to indicate flipping R,B in R,G,B tripletts */
  130.     no_text = 1024,            /* disables return to text on program exit ie leaves graphics in tact */
  131.     show_text = 2048,        /* show text/file_name on the lower L corner if 1 */
  132.     show_title = 4096,    /* show title at top of screen */
  133.     dont_get_files = 8192,        /* get the file list when the program is first run, if not the it uses a supplied one ie the slide show arguements */
  134.     no_file_list = 16384        /* flag to lock out the file list -> reduce user to Next, Previous, Exit */
  135.     };
  136.  
  137. /*
  138.  * bit location of even more defaults -> variable: more_defaults
  139.  */
  140. enum more_defaults{
  141. /*    slow_gray = 1,            /* use quantizing for JPEGs at all ?? - used to force 16 & 256 color mode to quantize vs quick linear colormaping */
  142. /*    vga_as_color = 2,*/
  143.     high_jpeg_quality = 1        /* use faster, lower quality methods for JPEGs if not set */
  144.     };
  145.  
  146.  
  147. /*    definations for reading keyboard */
  148.  
  149. #define arrow_left 0x4b00
  150. #define arrow_right 0x4d00
  151. #define arrow_up 0x4800
  152. #define arrow_down 0x5000
  153. #define page_up 0x4900
  154. #define page_down 0x5100
  155. #define escape 27
  156. #define home 0x4700
  157. #define end 0x4f00
  158. #define RTN 13
  159. #define control_s 0x19
  160. #define insert 0x5200
  161. #define delete 0x5300
  162. #define plus 43
  163. #define minus 45
  164. #define back_space 8
  165. #define F1 0x3B00
  166. #define F2 0x3C00
  167. #define F3 0x3D00
  168. #define F4 0x3E00
  169. #define F5 0x3F00
  170. #define F6 0x4000
  171. #define F7 0x4100
  172.  
  173. #define red_up 55            /* red, green, blue tint adjustments ie shift - keypad */
  174. #define red_down 49
  175. #define red_normal 52
  176. #define green_up 56
  177. #define green_down 50
  178. #define green_normal 53
  179. #define blue_up 57
  180. #define blue_down 51
  181. #define blue_normal 54
  182.  
  183.  
  184. #endif   /* end of file and including if it has not been used */