Changeset 949 for trunk/include/camera.h


Ignore:
Timestamp:
09/26/10 23:06:02 (3 years ago)
Author:
reyalp
Message:

add aspect correction for ixus95, should fix zebra and grids etc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/camera.h

    r948 r949  
    21892189        // camera name 
    21902190        #define PARAM_CAMERA_NAME 4 // parameter number for GetParameterData 
    2191 // TODO this was in the original zebra mess, not clear if needed or just for mem saving ? 
    2192    #define CAM_ZEBRA_ASPECT_ADJUST 1 
     2191 
     2192        // aspect correction 
     2193    #undef CAM_USES_ASPECT_CORRECTION 
     2194    #undef CAM_USES_ASPECT_YCORRECTION 
     2195    #define CAM_USES_ASPECT_CORRECTION          1  //camera uses the modified graphics primitives to map screens an viewports to buffers more sized  
     2196    #define CAM_USES_ASPECT_YCORRECTION         0  //only uses mappings on x coordinate 
     2197 
     2198    #undef ASPECT_XCORRECTION 
     2199    #define ASPECT_XCORRECTION(x)   ( ((x)<<1) ) 
     2200 
     2201    // Note color palette affects grids! 
     2202    #undef ASPECT_GRID_XCORRECTION 
     2203    #define ASPECT_GRID_XCORRECTION(x)   ( (x) ) 
     2204 
     2205    #undef ASPECT_GRID_YCORRECTION 
     2206    #define ASPECT_GRID_YCORRECTION(y)  ( (y) ) 
     2207 
     2208    #undef ASPECT_VIEWPORT_XCORRECTION  
     2209    #define ASPECT_VIEWPORT_XCORRECTION(x) ASPECT_GRID_XCORRECTION(x) 
     2210    #undef ASPECT_VIEWPORT_YCORRECTION  
     2211    #define ASPECT_VIEWPORT_YCORRECTION(y) ( (y) ) 
     2212 
     2213        //games mappings 
     2214        #undef GAMES_SCREEN_WIDTH 
     2215        #undef GAMES_SCREEN_HEIGHT 
     2216        #define GAMES_SCREEN_WIDTH              360 
     2217        #define GAMES_SCREEN_HEIGHT             240 
     2218        #undef ASPECT_GAMES_XCORRECTION 
     2219        // 720/360=2 same aspect than grids and viewport but another approach: there is a lot of corrections to do in game's code, and we decide to paint directly on display buffer wirh another resolution 
     2220        // used by gui.c that configures the draw environment (trhough new draw_gui function) depending on gui_mode: we have then 360x240 for games (but deformed output:circles are not circles) and 320x240 for 
     2221        // other modes in perfect aspect ratio 4/3: slightly better visualization: file menus more readable, ... 
     2222        #define ASPECT_GAMES_XCORRECTION(x)   ( ((x)<<1) ) 
     2223        #undef ASPECT_GAMES_YCORRECTION 
     2224        #define ASPECT_GAMES_YCORRECTION(y)   ( (y) )  //none 
     2225 
     2226    #define CAM_ZEBRA_ASPECT_ADJUST 1 
     2227 
    21932228//---------------------------------------------------------- 
    21942229 
Note: See TracChangeset for help on using the changeset viewer.