Changeset View
Changeset View
Standalone View
Standalone View
plugins/impex/xcf/3rdparty/xcftools/pixels.c
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Line(s) | 73 | { | |||
---|---|---|---|---|---|
94 | */ | 94 | */ | ||
95 | data = xcfL(ptr) ; | 95 | data = xcfL(ptr) ; | ||
96 | if( xcfL(ptr) != tiles->params->bpp ) | 96 | if( xcfL(ptr) != tiles->params->bpp ) | ||
97 | FatalBadXCF("%"PRIu32" bytes per pixel for %s drawable",xcfL(ptr),type); | 97 | FatalBadXCF("%"PRIu32" bytes per pixel for %s drawable",xcfL(ptr),type); | ||
98 | ptr = xcfOffset(ptr+4,3*4) ; | 98 | ptr = xcfOffset(ptr+4,3*4) ; | ||
99 | if( (ptr = tileDirectoryOneLevel(dim,ptr)) == 0 ) return ; | 99 | if( (ptr = tileDirectoryOneLevel(dim,ptr)) == 0 ) return ; | ||
100 | 100 | | |||
101 | xcfCheckspace(ptr,dim->ntiles*4+4,"Tile directory at %" PRIX32,ptr); | 101 | xcfCheckspace(ptr,dim->ntiles*4+4,"Tile directory at %" PRIX32,ptr); | ||
102 | if( xcfL(ptr + dim->ntiles*4) != 0 ) | 102 | /* if( xcfL(ptr + dim->ntiles*4) != 0 ) | ||
103 | FatalBadXCF("Wrong sized tile directory at %" PRIX32,ptr); | 103 | FatalBadXCF("Wrong sized tile directory at %" PRIX32,ptr);*/ | ||
104 | | ||||
104 | #define REUSE_RAW_DATA tiles->tileptrs = (uint32_t*)(xcf_file + ptr) | 105 | #define REUSE_RAW_DATA tiles->tileptrs = (uint32_t*)(xcf_file + ptr) | ||
105 | #if defined(WORDS_BIGENDIAN) && defined(CAN_DO_UNALIGNED_WORDS) | 106 | #if defined(WORDS_BIGENDIAN) && defined(CAN_DO_UNALIGNED_WORDS) | ||
106 | REUSE_RAW_DATA; | 107 | REUSE_RAW_DATA; | ||
107 | #else | 108 | #else | ||
108 | # if defined(WORDS_BIGENDIAN) | 109 | # if defined(WORDS_BIGENDIAN) | ||
109 | if( (ptr&3) == 0 ) REUSE_RAW_DATA; else | 110 | if( (ptr&3) == 0 ) REUSE_RAW_DATA; else | ||
110 | # endif | 111 | # endif | ||
111 | { | 112 | { | ||
▲ Show 20 Lines • Show All 379 Lines • Show Last 20 Lines |