Diff of /parser.c [3af83f] .. [15dc8a]  Maximize  Restore

Switch to unified view

a/parser.c b/parser.c
...
...
57
static int      ReadImageDescription( Image *imPtr, stBuf *sPtr, char *line );
57
static int      ReadImageDescription( Image *imPtr, stBuf *sPtr, char *line );
58
static int      ReadPanoramaDescription( Image *imPtr, stBuf *sPtr, char *line );
58
static int      ReadPanoramaDescription( Image *imPtr, stBuf *sPtr, char *line );
59
static int      ReadModeDescription ( sPrefs *sP, char *line );
59
static int      ReadModeDescription ( sPrefs *sP, char *line );
60
static int      ReadCoordinates(    CoordInfo   *cp, char *line );
60
static int      ReadCoordinates(    CoordInfo   *cp, char *line );
61
61
62
static int panoExternalToInternalInputProjection(pt_int32 input);
62
static int panoExternalToInternalInputProjection(int32_t input);
63
63
64
#define MY_SSCANF( str, format, ptr )       if( sscanf( str, format, ptr ) != 1 )   \
64
#define MY_SSCANF( str, format, ptr )       if( sscanf( str, format, ptr ) != 1 )   \
65
                                            {                                       \
65
                                            {                                       \
66
                                                PrintError(                         \
66
                                                PrintError(                         \
67
                                                "Syntax error in script: Line %d\nCould not assign variable [%s]",\
67
                                                "Syntax error in script: Line %d\nCould not assign variable [%s]",\
...
...
778
778
779
    // Set up Panorama description
779
    // Set up Panorama description
780
    
780
    
781
    if( gl->pano.width == 0 && gl->im[0].hfov != 0.0)  // Set default for panorama width based on first image
781
    if( gl->pano.width == 0 && gl->im[0].hfov != 0.0)  // Set default for panorama width based on first image
782
        {
782
        {
783
            gl->pano.width = (pt_int32)(( gl->pano.hfov / gl->im[0].hfov ) * gl->im[0].width);
783
            gl->pano.width = ( gl->pano.hfov / gl->im[0].hfov ) * gl->im[0].width;
784
            gl->pano.width /= 10; gl->pano.width *= 10; // Round to multiple of 10
784
            gl->pano.width /= 10; gl->pano.width *= 10; // Round to multiple of 10
785
        }
785
        }
786
786
787
    if( gl->pano.height == 0 )
787
    if( gl->pano.height == 0 )
788
        gl->pano.height = gl->pano.width/2;
788
        gl->pano.height = gl->pano.width/2;
...
...
1670
    char buf[LINE_LENGTH];
1670
    char buf[LINE_LENGTH];
1671
    int  i;
1671
    int  i;
1672
    int    cropping = 0;
1672
    int    cropping = 0;
1673
    int tempInt;
1673
    int tempInt;
1674
    char typeParm;
1674
    char typeParm;
1675
    pt_int32 tempInt32;
1675
    int32_t tempInt32;
1676
1676
1677
    memcpy( &im,    imPtr,   sizeof(Image) );
1677
    memcpy( &im,    imPtr,   sizeof(Image) );
1678
    memcpy( &sBuf,  sPtr,    sizeof(stBuf ));
1678
    memcpy( &sBuf,  sPtr,    sizeof(stBuf ));
1679
    
1679
    
1680
    //    panoPrintImage("Before read image", imPtr);
1680
    //    panoPrintImage("Before read image", imPtr);
...
...
2454
    }
2454
    }
2455
    return NULL;
2455
    return NULL;
2456
}
2456
}
2457
2457
2458
2458
2459
int panoExternalToInternalInputProjection(pt_int32 input)
2459
int panoExternalToInternalInputProjection(int input)
2460
{
2460
{
2461
    // Internal and external projection do not match, unfortunately.
2461
    // Internal and external projection do not match, unfortunately.
2462
    // So this code does the remapping
2462
    // So this code does the remapping
2463
2463
2464
    switch (input) {
2464
    switch (input) {

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks